/* ============================================
   واعي User Portal — LeakRadar-Inspired Design
   Dark Purple/Navy Theme
   ============================================ */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #161625;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --bg-input: #12121f;
    --bg-sidebar: #12121f;
    --border: rgba(108, 92, 231, 0.15);
    --border-light: rgba(255, 255, 255, 0.06);

    --accent: #6c5ce7;
    --accent-hover: #7f71ef;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --accent2: #a29bfe;

    --green: #00b894;
    --green-bg: rgba(0, 184, 148, 0.12);
    --red: #ff6b6b;
    --red-bg: rgba(255, 107, 107, 0.12);
    --yellow: #feca57;
    --yellow-bg: rgba(254, 202, 87, 0.12);
    --blue: #54a0ff;
    --blue-bg: rgba(84, 160, 255, 0.12);
    --purple: #a29bfe;
    --purple-bg: rgba(162, 155, 254, 0.12);

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --sidebar-width: 240px;
    --topbar-height: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================
   Auth Screen
   ============================================ */
.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(108,92,231,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(162,155,254,0.06) 0%, transparent 50%);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 12px;
    animation: floatAuth 3s ease-in-out infinite;
}
@keyframes floatAuth {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-field {
    text-align: left;
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    transition: all 0.2s;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-error {
    background: var(--red-bg);
    color: var(--red);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 12px;
}

.auth-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.auth-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.auth-switch {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* ============================================
   App Layout
   ============================================ */
.app {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.brand-icon { font-size: 24px; }
.brand-text {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.nav-group { margin-bottom: 4px; }

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}
.nav-group-header:hover { color: var(--text-primary); }

.nav-chevron {
    font-size: 12px;
    transition: transform 0.2s;
}
.nav-group-items:not(.open) + .nav-chevron,
.nav-group-header.closed .nav-chevron {
    transform: rotate(-90deg);
}

.nav-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.nav-group-items.open {
    max-height: 200px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.nav-link:hover {
    color: var(--text-primary);
    background: rgba(108,92,231,0.06);
}
.nav-link.active {
    color: var(--accent);
    background: rgba(108,92,231,0.08);
    border-left-color: var(--accent);
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    margin-left: 12px;
}
.nav-link.active .nav-dot { background: var(--accent); }

.nav-badge {
    margin-left: auto;
    background: var(--green-bg);
    color: var(--green);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}
.nav-badge.purple {
    background: var(--purple-bg);
    color: var(--purple);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.user-avatar { font-size: 28px; }
.user-name { font-size: 13px; font-weight: 600; }
.user-plan { font-size: 11px; color: var(--text-muted); }

.logout-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255,107,107,0.08);
    border: 1px solid rgba(255,107,107,0.2);
    border-radius: var(--radius-sm);
    color: var(--red);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.logout-btn:hover {
    background: rgba(255,107,107,0.15);
}

/* ============================================
   Main Content
   ============================================ */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-primary);
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.topbar-stats {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.stat-pill {
    padding: 5px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.stat-pill.green {
    border-color: rgba(0,184,148,0.3);
    color: var(--green);
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    transition: all 0.2s;
}
.topbar-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
}

/* ============================================
   Pages
   ============================================ */
.page {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}
.page.active { display: block; }

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

.page-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ============================================
   Search Hero
   ============================================ */
.search-hero {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.search-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
}

.hero-counter {
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent2), #74b9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -2px;
}

.hero-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hero-badge {
    padding: 6px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}
.hero-badge strong { color: var(--text-primary); }

.hero-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-bar {
    display: flex;
    max-width: 700px;
    margin: 0 auto 12px;
    gap: 0;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-btn {
    padding: 14px 32px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.search-btn:hover {
    background: var(--accent-hover);
}

.search-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   Features Grid
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(108,92,231,0.15);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Results Table
   ============================================ */
.search-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.result-stat {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.result-stat.total { background: var(--blue-bg); color: var(--blue); }
.result-stat.email { background: var(--green-bg); color: var(--green); }
.result-stat.username { background: var(--purple-bg); color: var(--purple); }

.results-actions { display: flex; gap: 8px; }

.action-btn {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.results-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.results-filter {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
}

.results-table-wrap {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    padding: 10px 14px;
    background: rgba(108,92,231,0.08);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: left;
    border: none;
    white-space: nowrap;
}

.results-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-secondary);
    vertical-align: middle;
}

.results-table tr:hover td {
    background: rgba(108,92,231,0.04);
}

.results-table .empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.results-table.compact th,
.results-table.compact td {
    padding: 8px 12px;
    font-size: 12px;
}

/* Result Cells */
.url-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.url-link:hover { text-decoration: underline; }

.type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.type-badge.email {
    background: var(--green-bg);
    color: var(--green);
}
.type-badge.username {
    background: var(--purple-bg);
    color: var(--purple);
}
.type-badge.stealer {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.credential-val {
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
}

.password-locked {
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.password-locked:hover { color: var(--accent); }

.password-revealed {
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(0,184,148,0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.new-badge {
    display: inline-block;
    background: var(--red-bg);
    color: var(--red);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Pagination */
.results-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}

.page-btn {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ============================================
   Domain Tabs
   ============================================ */
.domain-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.domain-tab {
    padding: 10px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.domain-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.tab-count {
    font-weight: 700;
    margin-left: 4px;
}

/* ============================================
   Mass Check
   ============================================ */
.mass-check-area {
    max-width: 800px;
}

.upload-zone {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}
.upload-zone:hover {
    border-color: var(--accent);
    background: rgba(108,92,231,0.04);
}
.upload-icon { font-size: 32px; margin-bottom: 10px; }
.upload-zone p { font-size: 14px; }
.upload-zone span { font-size: 12px; color: var(--text-muted); }

.paste-area {
    margin-bottom: 20px;
}
.paste-area label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.paste-area textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'SF Mono', monospace;
    resize: vertical;
    outline: none;
}
.paste-area textarea:focus {
    border-color: var(--accent);
}

/* ============================================
   Monitoring
   ============================================ */
.monitor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.monitor-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.msc-icon { font-size: 24px; }
.msc-value { font-size: 22px; font-weight: 700; }
.msc-label { font-size: 12px; color: var(--text-muted); }

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}
.section-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.section-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.add-btn {
    padding: 8px 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    white-space: nowrap;
}
.add-btn:hover { background: var(--accent-hover); }

/* ============================================
   Pricing
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}
.price-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}
.price-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
}

.price-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.price-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.price-amount {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.price-amount span {
    font-size: 14px;
    font-weight: 500;
    -webkit-text-fill-color: var(--text-muted);
}

.price-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
}
.price-features li {
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.price-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.price-btn:hover { background: var(--accent-hover); }
.price-btn.active {
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: default;
}

/* ============================================
   Settings
   ============================================ */
.settings-sections {
    max-width: 700px;
}

.settings-form {
    margin-top: 16px;
}

.s-field {
    margin-bottom: 14px;
}
.s-field label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.s-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
}
.s-input:focus { border-color: var(--accent); }
.s-input:disabled { opacity: 0.5; }

.save-btn {
    padding: 10px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    margin-top: 8px;
    transition: all 0.2s;
}
.save-btn:hover { background: var(--accent-hover); }

.api-key-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.api-key-box code {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); }

.modal-field {
    margin-bottom: 14px;
}
.modal-field label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.modal-field input,
.modal-field select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
}
.modal-field input:focus,
.modal-field select:focus {
    border-color: var(--accent);
}

/* ============================================
   Toast
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: white;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.3s;
    max-width: 360px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--accent); }

/* ============================================
   Subscribe Prompt
   ============================================ */
.subscribe-prompt {
    margin-bottom: 16px;
}
.sub-prompt-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(108,92,231,0.15));
    border: 1px solid rgba(255,107,107,0.3);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.sub-prompt-inner.subscribed {
    background: linear-gradient(135deg, rgba(0,184,148,0.1), rgba(108,92,231,0.1));
    border-color: rgba(0,184,148,0.3);
}
.subscribe-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff6b6b, var(--accent));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    transition: all 0.3s;
}
.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,107,107,0.3);
}
.subscribe-btn.pulse {
    animation: btnPulse 2s ease-in-out infinite;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255,107,107,0); }
}
.subscribe-btn.full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}
.sub-price-box {
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.sub-price {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sub-price span {
    font-size: 14px;
    font-weight: 500;
    -webkit-text-fill-color: var(--text-muted);
}
.sub-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Plan Toggle */
.plan-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.plan-opt {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.plan-opt:hover { border-color: var(--accent); }
.plan-opt.active {
    border-color: var(--accent);
    background: rgba(108,92,231,0.15);
    color: var(--text-primary);
}
.save-tag {
    display: inline-block;
    padding: 2px 6px;
    background: var(--green);
    color: white;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}
.plan-prices { margin-bottom: 16px; }
.plan-price-card {
    display: none;
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.plan-price-card.active { display: block; }
.plan-detail {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   Payment Form
   ============================================ */
.payment-page { margin-top: 4px; }
.payment-summary {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}
.payment-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.payment-summary-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
}
.payment-form {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.payment-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-icon { font-size: 24px; }
.form-field {
    margin-bottom: 14px;
}
.form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    letter-spacing: 1px;
    transition: border-color 0.3s;
}
.form-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.payment-btn {
    background: linear-gradient(135deg, var(--green), #27ae60) !important;
    font-size: 16px !important;
    padding: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}
.payment-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(46,204,113,0.3);
}
.payment-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   Notification Items
   ============================================ */
.notif-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(108,92,231,0.04); }
.notif-item.unread {
    background: rgba(108,92,231,0.06);
    border-left: 3px solid var(--accent);
}
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.notif-message { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-muted); }

/* Clickable notification (e.g. domain approval → pay now) */
.notif-item.notif-clickable {
    cursor: pointer;
    border-left: 3px solid #ff9f43;
}
.notif-item.notif-clickable:hover {
    background: rgba(255,159,67,0.08);
    box-shadow: inset 0 0 0 1px rgba(255,159,67,0.2);
}
.notif-item.notif-clickable .notif-title {
    color: #ff9f43;
}

/* ============================================
   Page Header Bar
   ============================================ */
.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

/* Notification Dot (badge) */
.notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    background: var(--red);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main { margin-left: 0; }
    .mobile-menu { display: block; }
    .hero-counter { font-size: 36px; }
    .search-bar { flex-direction: column; }
    .search-input { border-radius: var(--radius); border-right: 1px solid var(--border); }
    .search-btn { border-radius: var(--radius); }
    .pricing-grid { grid-template-columns: 1fr; }
}
