/* 4Brand App — page-specific styles */

/* === brands === */
    .brands-page { max-width: 800px; margin: 0 auto; }
    .brands-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
    .brands-header h1 { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-primary); }
    .brands-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
    .brand-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); transition: all 0.2s var(--ease-smooth); }
    .brand-card:hover { border-color: var(--brand-blue); box-shadow: var(--shadow-md); }
    .brand-avatar { width: 48px; height: 48px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
    .brand-avatar.personal { background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-light)); }
    .brand-info { flex: 1; min-width: 0; }
    .brand-name { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-primary); }
    .brand-sector { font-size: 13px; color: var(--text-light); margin-top: 2px; }
    .brand-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-actions { display: flex; gap: 8px; flex-shrink: 0; }
    .brand-actions button { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s var(--ease-smooth); }
    .brand-edit { color: var(--brand-blue); background: rgba(45,74,124,0.08); }
    .brand-edit:hover { background: rgba(45,74,124,0.15); }

    .brand-form { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 28px; display: none; }
    .brand-form.show { display: block; }
    .brand-form h2 { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; }
    .form-group { margin-bottom: 16px; }
    .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
    .form-group input, .form-group textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border-color); border-radius: var(--radius-md); font-size: 16px; font-family: 'Inter', sans-serif; color: var(--text-primary); background: var(--bg-primary); outline: none; transition: all 0.2s var(--ease-smooth); box-sizing: border-box; }
    .form-group input:focus, .form-group textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(45,74,124,0.08); }
    .form-group textarea { resize: vertical; min-height: 80px; }
    .form-actions { display: flex; gap: 12px; margin-top: 20px; }
    .form-btn { padding: 12px 24px; border: none; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease-smooth); }
    .form-btn-primary { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); color: white; box-shadow: var(--shadow-sm); }
    .form-btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .form-btn-secondary { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-color); }
    .form-btn-secondary:hover { background: var(--border-color); }

    .alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 20px; display: none; animation: msgIn 0.3s var(--ease-smooth); }
    .alert.show { display: block; }
    .alert-success { background: rgba(34,197,94,0.1); color: #16a34a; border: 1px solid rgba(34,197,94,0.2); }
    .alert-error { background: rgba(239,68,68,0.1); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }

    .empty-state { text-align: center; padding: 56px 24px; background: var(--bg-primary); border: 1px dashed var(--border-color); border-radius: var(--radius-lg); }
    .empty-state i { font-size: 40px; color: var(--border-color); margin-bottom: 16px; }
    .empty-state h3 { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
    .empty-state p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }
    .empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
    .empty-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all 0.2s var(--ease-smooth); }
    .empty-btn-primary { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); color: white; box-shadow: var(--shadow-sm); }
    .empty-btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .empty-btn-secondary { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-color); }
    .empty-btn-secondary:hover { background: var(--border-color); }

    @keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    @media (max-width: 768px) { .brand-card { flex-wrap: wrap; } .brand-actions { width: 100%; } .brand-actions button { flex: 1; } }
    @media (max-width: 480px) { .brands-page { padding: 0; } .brand-form { padding: 20px; } .form-actions { flex-direction: column; } .form-btn { width: 100%; text-align: center; } }

/* === billing === */
    .billing-page { max-width: 640px; margin: 0 auto; }
    .billing-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 32px; margin-bottom: 20px; }
    .billing-card h2 { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
    .billing-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; margin-bottom: 16px; }
    .billing-status.active { background: rgba(34,197,94,0.1); color: #16a34a; }
    .billing-status.free { background: rgba(107,107,107,0.1); color: #6b6b6b; }
    .billing-info { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
    .billing-info strong { color: var(--text-primary); }
    .billing-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
    .billing-btn { padding: 12px 24px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; border: none; cursor: pointer; text-decoration: none; text-align: center; transition: all 0.2s var(--ease-smooth); }
    .billing-btn-primary { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); color: white; box-shadow: var(--shadow-sm); }
    .billing-btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
    .billing-btn-secondary { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-color); }
    .billing-btn-secondary:hover { background: var(--border-color); }

    .plan-card { background: var(--bg-primary); border: 2px solid var(--brand-gold); border-radius: var(--radius-xl); padding: 36px; text-align: center; position: relative; box-shadow: 0 12px 40px rgba(212,168,75,0.12); }
    .plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand-gold); color: white; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 20px; border-radius: var(--radius-full); }
    .plan-name { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 700; color: var(--text-primary); margin-top: 8px; }
    .plan-price { font-size: 48px; font-weight: 800; color: var(--brand-blue); margin: 12px 0 4px; }
    .plan-price span { font-size: 18px; font-weight: 600; }
    .plan-period { font-size: 14px; color: var(--text-light); margin-bottom: 24px; }
    .plan-features { list-style: none; padding: 0; text-align: left; margin-bottom: 28px; }
    .plan-features li { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); }
    .plan-features li:last-child { border-bottom: none; }
    .plan-features li i { color: var(--brand-gold); font-size: 14px; flex-shrink: 0; }

    .quota-bar { margin-top: 16px; }
    .quota-label { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
    .quota-track { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
    .quota-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
    .quota-fill.green { background: #34d399; }
    .quota-fill.amber { background: #f59e0b; }
    .quota-fill.red { background: #ef4444; }

    @media (max-width: 480px) { .billing-card { padding: 24px; } .plan-card { padding: 28px 20px; } .plan-price { font-size: 40px; } }

/* === dashboard === */
        /* Notification Dropdown */
        .dash-notif-wrapper {
            position: relative;
        }

        .dash-notif-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 320px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-xl);
            z-index: 200;
            overflow: hidden;
        }

        .dash-notif-dropdown.show {
            display: block;
        }

        .dash-notif-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .dash-notif-empty {
            padding: 40px 20px;
            text-align: center;
        }

        .dash-notif-empty i {
            font-size: 32px;
            color: var(--border-color);
            margin-bottom: 12px;
        }

        .dash-notif-empty p {
            font-size: 14px;
            color: var(--text-light);
            margin: 0;
        }

        @media (max-width: 480px) {
            .dash-notif-dropdown {
                width: 280px;
                right: -8px;
            }
        }

/* === login === */
    .auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: linear-gradient(180deg, #F8F9FC 0%, #F0F2F8 100%); }
    .auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border-color); border-radius: 20px; padding: 44px 36px; box-shadow: 0 16px 48px rgba(45,74,124,0.08); }
    .auth-logo { text-align: center; margin-bottom: 28px; }
    .auth-logo img { height: 32px; }
    .auth-title { font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 6px; }
    .auth-subtitle { text-align: center; color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
    .auth-field { margin-bottom: 16px; }
    .auth-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
    .auth-field input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border-color); border-radius: 10px; font-size: 16px; font-family: 'Inter', sans-serif; color: var(--text-primary); background: #FAFBFC; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
    .auth-field input:focus { border-color: var(--brand-blue); background: #fff; }
    .auth-btn { width: 100%; padding: 15px; min-height: 44px; border: none; border-radius: 10px; background: linear-gradient(135deg, var(--brand-blue), #3D5A8C); color: #fff; font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 8px; }
    .auth-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(45,74,124,0.2); }
    .auth-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
    .auth-forgot { text-align: right; margin: -8px 0 16px; }
    .auth-forgot a { font-size: 13px; color: var(--brand-blue); text-decoration: none; }
    .auth-forgot a:hover { text-decoration: underline; }
    .auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--text-light); font-size: 13px; }
    .auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
    .auth-magic { display: block; width: 100%; padding: 13px; border: 1.5px solid var(--border-color); border-radius: 10px; background: #fff; color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer; text-align: center; text-decoration: none; transition: all 0.2s; font-family: 'Inter', sans-serif; }
    .auth-magic:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
    .auth-magic i { margin-right: 8px; }
    .auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-light); }
    .auth-switch a { color: var(--brand-blue); font-weight: 600; text-decoration: none; }
    .auth-switch a:hover { text-decoration: underline; }
    @media (max-width: 480px) { .auth-card { padding: 32px 24px; border-radius: 16px; } .auth-title { font-size: 20px; } }
