@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #09090B;
    --bg-card: #18181B;
    --bg-sidebar: #000000;
    --border-color: #27272A;
    --text-main: #FAFAFA;
    --text-muted: #A1A1AA;
    --accent: #68A9FF;
    --accent-glow: rgba(104, 169, 255, 0.16);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(circle at 10% 10%, rgba(104, 169, 255, 0.07) 0%, transparent 40%);
}

.app-container { display: flex; height: 100vh; width: 100%; }

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    transition: left 0.3s ease-in-out;
}

.logo-container { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; padding: 0 8px; width: 100%; justify-content: space-between; }
.logo-left { display: flex; align-items: center; gap: 12px; }
.logo-icon { background-color: var(--accent); color: #000; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.logo-text { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; }
.close-menu { cursor: pointer; color: var(--text-muted); }

.nav-menu { display: flex; flex-direction: column; gap: 8px; }
.nav-item[hidden]{display:none!important}
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; border-radius: 8px; transition: all 0.2s; }
.nav-item:hover { background-color: rgba(255, 255, 255, 0.05); color: var(--text-main); }
.nav-item.active { background-color: var(--accent-glow); color: var(--accent); }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; width: 100%; }

.top-navbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border-color); background-color: rgba(9, 9, 11, 0.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.menu-toggle { display: block; color: var(--text-muted); cursor: pointer; }

.user-profile { display: flex; align-items: center; gap: 16px; }
.notification-icon { color: var(--text-muted); width: 20px; height: 20px; }
.avatar { width: 36px; height: 36px; background-color: var(--border-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; }

/* Dashboard Content */
.dashboard-content { padding: 32px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
.welcome-section { margin-bottom: 32px; }
.date { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.welcome-section h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.5px; }
.text-gradient { background: linear-gradient(to right, var(--accent), #A8D1FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: var(--text-muted); font-size: 1rem; }

/* Stat Cards */
.stats-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px; transition: transform 0.2s, border-color 0.2s; }
.stat-card:hover { border-color: #3F3F46; transform: translateY(-2px); }
.stat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stat-title { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.stat-icon { color: var(--text-muted); background-color: rgba(255, 255, 255, 0.05); padding: 8px; border-radius: 8px; }
.stat-value { font-size: 2.5rem; font-weight: 700; margin-bottom: 12px; }
.stat-trend { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 500; padding: 4px 8px; border-radius: 20px; }
.stat-trend.positive { color: var(--accent); background-color: var(--accent-glow); }

/* Table Container */
.table-container { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px; }
.table-container h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--text-muted); font-size: 0.8rem; font-weight: 500; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
td { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }
.font-medium { font-weight: 500; }
.text-muted { color: var(--text-muted); }

/* Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-new { background-color: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.status-contacted { background-color: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.status-viewing { background-color: rgba(16, 185, 129, 0.15); color: #34D399; }

/* Kanban Board */
.kanban-board { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; }
.kanban-column { flex: 1; min-width: 280px; background-color: var(--bg-main); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.kanban-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.col-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-blue { background-color: #60A5FA; }
.dot-yellow { background-color: #FBBF24; }
.dot-green { background-color: #34D399; }
.dot-gray { background-color: #A1A1AA; }
.col-count { background-color: var(--bg-card); padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; color: var(--text-muted); }
.kanban-card { background-color: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; cursor: grab; }
.kanban-card:hover { border-color: #3F3F46; }
.card-header { display: flex; gap: 12px; margin-bottom: 16px; }
.avatar-small { width: 32px; height: 32px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; }
.card-title h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.card-title p { font-size: 0.75rem; color: var(--text-muted); }
.card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 12px; }
.card-price { font-weight: 600; color: var(--accent); }
.card-date { color: var(--text-muted); }
.empty-state { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 20px 0; font-style: italic; }

/* --- MOBILE RESPONSIVENESS FIX --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -100% !important; 
        width: 260px;
        height: 100vh;
        z-index: 9999 !important;
        background-color: var(--bg-sidebar);
        display: flex !important; 
        transition: left 0.3s ease-in-out;
    }

    .sidebar.show-mobile {
        left: 0 !important;
    }

    .menu-toggle {
        display: block !important; 
        cursor: pointer;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}


/* AgentCopilot architectural workspace backdrop */
body {
    background-color: #080D14;
    background-image:
        linear-gradient(115deg, rgba(5, 10, 18, 0.91), rgba(5, 10, 18, 0.82)),
        url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=2400&q=85");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.sidebar {
    background-color: rgba(3, 7, 13, 0.94);
    backdrop-filter: blur(16px);
}
.top-navbar {
    background-color: rgba(8, 13, 20, 0.78);
}
.stat-card, .table-container, .kanban-column, .kanban-card {
    background-color: rgba(24, 24, 27, 0.86);
    backdrop-filter: blur(12px);
}
.login-box {
    background-color: rgba(18, 22, 29, 0.92) !important;
    backdrop-filter: blur(16px);
}
.menu-toggle {
    border: 0;
    background: transparent;
    padding: 4px;
    font: inherit;
}
.logout-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
}
.logout-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.06); }
@media (max-width: 768px) {
    .sidebar { background-color: rgba(3, 7, 13, 0.98); }
    .dashboard-content { padding: 24px 16px; }
    .table-container { overflow-x: auto; }
}

/* Functional notification inbox */
.user-profile{position:relative;display:flex;align-items:center;gap:12px}
.notification-button{position:relative;border:1px solid var(--border-color);background:rgba(24,24,27,.9);color:var(--text-main);border-radius:10px;padding:9px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.notification-button svg{width:19px;height:19px}
.notification-count{position:absolute;right:-5px;top:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:20px;background:#ef4444;color:white;font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center}
.notification-count[hidden]{display:none}
.notification-panel{position:absolute;right:0;top:calc(100% + 12px);z-index:1000;width:min(390px,calc(100vw - 28px));max-height:70vh;overflow:auto;background:#111827;border:1px solid #3f3f46;border-radius:12px;box-shadow:0 18px 50px rgba(0,0,0,.45);padding:12px}
.notification-panel[hidden]{display:none}
.notification-heading{display:flex;justify-content:space-between;align-items:center;padding:5px 4px 12px}
.notification-heading button,.notification-actions button{background:transparent;border:0;color:#8fc2ff;cursor:pointer;font:inherit;font-size:.78rem}
.notification-item{padding:12px 5px;border-top:1px solid #333;display:flex;gap:10px;justify-content:space-between}
.notification-item.unread{background:rgba(104,169,255,.08)}
.notification-item p{margin:5px 0;color:#d4d4d8;font-size:.84rem;line-height:1.4}
.notification-item small{color:#a1a1aa;font-size:.72rem}
.notification-actions{display:flex;flex-direction:column;gap:7px;align-items:flex-end;white-space:nowrap}
.notification-actions a{color:#8fc2ff;font-size:.78rem;text-decoration:none}
.notification-actions span{color:#a1a1aa;font-size:.75rem}
.contact button{font:inherit;font-size:.82rem;padding:9px 12px;border:0;border-radius:8px;background:#3b82f6;color:#ffffff;font-weight:800;cursor:pointer}


/* Accessible mobile navigation drawer and outside-tap backdrop */
.close-menu{display:none;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;border:1px solid var(--border-color);border-radius:9px;background:rgba(255,255,255,.06);color:var(--text-main);cursor:pointer;position:relative;z-index:10003;pointer-events:auto}
.close-menu svg{width:21px;height:21px}
.menu-backdrop{display:none}
@media(max-width:768px){
 .sidebar{left:-280px!important;right:auto!important;width:min(280px,85vw)!important;height:100dvh!important;overflow-y:auto;z-index:10001!important;transition:left .28s ease-in-out!important;box-shadow:12px 0 35px rgba(0,0,0,.35)}
 .sidebar.show-mobile{left:0!important}
 .sidebar .logo-container{display:flex;align-items:center;justify-content:space-between;gap:10px}
 .close-menu{display:inline-flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
 .menu-backdrop{display:block;position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.58);border:0;padding:0;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .28s ease,visibility .28s ease}
 body.menu-open .menu-backdrop{opacity:1;visibility:visible;pointer-events:auto}
 body.menu-open{overflow:hidden}
 .menu-toggle{display:inline-flex!important;align-items:center;justify-content:center;min-width:40px;min-height:40px;border:0;background:transparent;color:var(--text-main);cursor:pointer}
}

/* Click-to-open full notification and payment receipt */
.notification-preview{display:block;flex:1;min-width:0;text-align:left;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit}
.notification-preview strong{display:block;color:#f4f4f5}
.notification-preview p{margin:5px 0;color:#d4d4d8;font-size:.84rem;line-height:1.4}
.notification-preview small{color:#a1a1aa;font-size:.72rem}
.notification-detail-backdrop{position:fixed;inset:0;z-index:3000;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.notification-detail-backdrop[hidden]{display:none}
.notification-detail{width:min(620px,100%);max-height:85vh;overflow:auto;background:#111827;color:#f4f4f5;border:1px solid #3f3f46;border-radius:16px;padding:20px;box-shadow:0 24px 70px rgba(0,0,0,.55)}
.notification-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #3f3f46;padding-bottom:12px;margin-bottom:14px}
.notification-detail-head h2{font-size:1.1rem;margin:0}
.notification-detail-head button{background:transparent;border:0;color:#f4f4f5;font-size:1.7rem;cursor:pointer}
.notification-detail-body>p{line-height:1.6;overflow-wrap:anywhere}
.notification-detail-date{color:#a1a1aa;font-size:.8rem}
.notification-receipt{margin-top:18px;padding:16px;background:#18181b;border:1px solid #3f3f46;border-radius:12px}
.notification-receipt h3{margin:0 0 12px;font-size:1rem}
.notification-receipt dl{display:grid;grid-template-columns:minmax(110px,.8fr) minmax(0,1.4fr);gap:9px 12px;margin:0;font-size:.84rem}
.notification-receipt dt{color:#a1a1aa}.notification-receipt dd{margin:0;overflow-wrap:anywhere}
.notification-receipt-state{color:#a1a1aa;font-size:.85rem;margin-top:14px}
@media(max-width:520px){.notification-detail{padding:15px}.notification-receipt dl{grid-template-columns:1fr;gap:3px}.notification-receipt dd{margin-bottom:8px}}

/* Seller listing lifecycle controls */
.seller-listings{margin-top:22px;padding-top:18px;border-top:1px solid #3f3f46}
.seller-listings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.seller-listings-head h3{margin:0 0 5px;font-size:1rem}
.seller-listings-head p{margin:0}
.seller-listing{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:13px 0;border-bottom:1px solid #27272a}
.seller-listing-main{display:grid;gap:4px;flex:1;min-width:160px}
.seller-listing-main strong{color:#f4f4f5}
.seller-status{font-size:.72rem;text-transform:capitalize;border-radius:20px;padding:5px 9px;background:#27272a;color:#d4d4d8}
.seller-status-sold{background:rgba(234,179,8,.13);color:#facc15}
.seller-status-published{background:rgba(16,185,129,.13);color:#34d399}
.seller-status-paused{color:#fbbf24}
.seller-listing-actions{display:flex;gap:8px}
.seller-action,.seller-delete{border:0;border-radius:8px;padding:9px 12px;font-weight:700;cursor:pointer}
.seller-delete{background:#7f1d1d;color:#fee2e2}
.seller-action:disabled,.seller-delete:disabled{opacity:.55;cursor:wait}
@media(max-width:560px){.seller-listings-head{align-items:flex-start}.seller-listing{align-items:flex-start}.seller-listing-actions{width:100%}.seller-listing-actions button{width:100%}}


/* Shared account profile and help centre */
.profile-avatar-link{overflow:hidden;color:var(--text-main);text-decoration:none;cursor:pointer;border:1px solid var(--border-color);flex-shrink:0}
.profile-avatar-link:focus-visible,.faq-item summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.account-page{width:min(900px,100%);margin:34px auto;padding:0 24px 48px}
.account-eyebrow{margin:0 0 8px;color:#8fc2ff;font-size:.76rem;font-weight:700;letter-spacing:.12em}
.account-page h1{margin:0;font-size:clamp(1.7rem,4vw,2.35rem);color:#fafafa}
.account-intro{margin:9px 0 24px;color:#a1a1aa;line-height:1.6}
.profile-card{padding:24px;background:#111827;border:1px solid #333;border-radius:16px;box-shadow:0 12px 35px rgba(0,0,0,.16)}
.profile-identity{display:flex;align-items:center;gap:17px;padding-bottom:22px;border-bottom:1px solid #333}
.profile-large-avatar{width:72px;height:72px;flex:0 0 72px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(16,185,129,.16);border:1px solid rgba(16,185,129,.4);color:#8fc2ff;font-size:1.35rem;font-weight:800}
.profile-identity h2{margin:0 0 6px;color:#fafafa;font-size:1.2rem;overflow-wrap:anywhere}
.profile-identity p{margin:0;color:#a1a1aa;overflow-wrap:anywhere}
.profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;margin:0}
.profile-fields>div{padding:17px 0;border-bottom:1px solid #29292f;min-width:0}
.profile-fields dt{margin-bottom:7px;color:#a1a1aa;font-size:.78rem}
.profile-fields dd{margin:0;color:#f4f4f5;font-size:.95rem;font-weight:600;overflow-wrap:anywhere}
.profile-security-note{margin:20px 0 0;color:#a1a1aa;font-size:.82rem;line-height:1.6}
.faq-page{max-width:850px}
.faq-search-label{display:block;margin:0 0 8px;color:#d4d4d8;font-size:.85rem;font-weight:600}
.faq-search{width:100%;box-sizing:border-box;padding:13px 15px;margin-bottom:18px;border:1px solid #3f3f46;border-radius:10px;background:#111827;color:#fafafa;font:inherit}
.faq-search:focus{outline:2px solid rgba(104,169,255,.55);border-color:#68a9ff}
.faq-list{display:flex;flex-direction:column;gap:10px}
.faq-item{background:#111827;border:1px solid #333;border-radius:12px;overflow:hidden}
.faq-item[hidden]{display:none}
.faq-item summary{position:relative;list-style:none;cursor:pointer;padding:17px 48px 17px 18px;color:#f4f4f5;font-weight:600;line-height:1.5}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary:after{content:'+';position:absolute;right:18px;top:50%;transform:translateY(-50%);color:#8fc2ff;font-size:1.45rem;font-weight:400}
.faq-item[open] summary:after{content:'−'}
.faq-item[open] summary{border-bottom:1px solid #333;color:#8fc2ff}
.faq-answer{padding:2px 18px 14px;color:#d4d4d8;line-height:1.7;font-size:.9rem}
.faq-answer p{margin:12px 0 0}
.faq-no-results{color:#a1a1aa;padding:16px}
@media(max-width:600px){.account-page{margin:22px auto;padding:0 16px 36px}.profile-card{padding:17px}.profile-fields{grid-template-columns:1fr}.profile-identity{align-items:flex-start}.profile-large-avatar{width:58px;height:58px;flex-basis:58px}.faq-item summary{padding:15px 42px 15px 14px}.faq-answer{padding:1px 14px 13px}}


.profile-avatar-link img{width:100%;height:100%;object-fit:cover;border-radius:50%}

.profile-edit-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.profile-edit-button,.profile-cancel-button{border:1px solid #3f3f46;border-radius:9px;padding:10px 16px;font:inherit;font-size:.9rem;font-weight:600;cursor:pointer}.profile-edit-button{background:#3b82f6;color:#ffffff;border-color:#3b82f6}.profile-cancel-button{background:#18181b;color:#f4f4f5}.profile-edit-form{margin-top:20px;padding-top:18px;border-top:1px solid #333}.profile-edit-form[hidden]{display:none}.profile-edit-form label{display:block;margin:14px 0 7px;color:#d4d4d8;font-size:.85rem;font-weight:600}.profile-edit-form input{box-sizing:border-box;width:100%;max-width:520px;padding:12px 13px;border:1px solid #3f3f46;border-radius:9px;background:#09090b;color:#fafafa;font:inherit}.profile-edit-form input:focus{outline:2px solid rgba(104,169,255,.55);border-color:#68a9ff}.profile-edit-form button:disabled{opacity:.65;cursor:wait}.profile-save-success{color:#8fc2ff;font-weight:600}

/* Light appearance and theme switch control */
html[data-theme="light"]{color-scheme:light;--bg-main:#f4f7fb;--bg-card:#ffffff;--bg-sidebar:#ffffff;--border-color:#e2e8f0;--text-main:#172033;--text-muted:#64748b;--accent:#2563eb;--accent-glow:rgba(37,99,235,.12)}
html[data-theme="light"] body{background-color:var(--bg-main);background-image:radial-gradient(circle at 10% 10%,rgba(104,169,255,.08) 0%,transparent 40%)}
html[data-theme="light"] .sidebar{box-shadow:2px 0 18px rgba(15,23,42,.04)}
html[data-theme="light"] .top-navbar{background-color:rgba(255,255,255,.9)}
html[data-theme="light"] .nav-item:hover{background-color:rgba(15,23,42,.05)}
html[data-theme="light"] .stat-card,html[data-theme="light"] .table-container,html[data-theme="light"] .kanban-column,html[data-theme="light"] .kanban-card,html[data-theme="light"] .col-count,html[data-theme="light"] .profile-card,html[data-theme="light"] .faq-item,html[data-theme="light"] .profile-edit-form,html[data-theme="light"] .lead-card,html[data-theme="light"] .admin-card,html[data-theme="light"] .admin-panel,html[data-theme="light"] .admin-table-wrap,html[data-theme="light"] .payment-card,html[data-theme="light"] .panel,html[data-theme="light"] .property-card{background:#fff!important;color:#172033!important;border-color:#e2e8f0!important}
html[data-theme="light"] .faq-item summary,html[data-theme="light"] .faq-answer,html[data-theme="light"] .profile-edit-form label,html[data-theme="light"] .lead-main p,html[data-theme="light"] .lead-card small{color:#334155!important}
html[data-theme="light"] .faq-item[open] summary{color:#2563eb!important;border-color:#e2e8f0!important}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea,html[data-theme="light"] .faq-search,html[data-theme="light"] .profile-edit-form input,html[data-theme="light"] .lead-controls select,html[data-theme="light"] .admin-table select{background:#fff!important;color:#172033!important;border-color:#cbd5e1!important}
html[data-theme="light"] td{border-bottom-color:#e2e8f0!important}
html[data-theme="light"] .profile-cancel-button{background:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;min-height:36px;padding:7px 11px;border:1px solid var(--border-color);border-radius:9px;background:var(--bg-card);color:var(--text-main);font:inherit;font-size:.78rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s,border-color .2s}
.theme-toggle:hover{border-color:var(--accent);background:var(--accent-glow)}
.theme-toggle svg{width:17px;height:17px;color:var(--accent)}
@media(max-width:480px){.theme-toggle{padding:7px 8px;gap:5px;font-size:.7rem}.user-profile{gap:9px!important}}

html[data-theme="light"] .hero{background:linear-gradient(135deg,#fff,#f1f5f9)!important;border-color:#e2e8f0!important;color:#172033!important}
html[data-theme="light"] .hero p,html[data-theme="light"] .muted,html[data-theme="light"] .account-intro,html[data-theme="light"] .account-eyebrow,html[data-theme="light"] .account-page .profile-field label{color:#64748b!important}
html[data-theme="light"] .tabs{border-color:#e2e8f0!important}
html[data-theme="light"] .tab{background:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}
html[data-theme="light"] .tab.active{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important}
html[data-theme="light"] .chip{background:#f1f5f9!important;color:#475569!important;border-color:#cbd5e1!important}
html[data-theme="light"] .notice,html[data-theme="light"] .empty,html[data-theme="light"] .results-head{background:#f8fafc!important;color:#475569!important;border-color:#e2e8f0!important}
html[data-theme="light"] .profile-fields .profile-field,html[data-theme="light"] .profile-identity{background:#f8fafc!important;border-color:#e2e8f0!important}
html[data-theme="light"] .profile-fields .profile-field strong,html[data-theme="light"] .profile-identity h2{color:#172033!important}
html[data-theme="light"] .admin-wrap,html[data-theme="light"] .admin-section,html[data-theme="light"] .admin-stats .stat{color:#172033}



/* Notification inbox and receipt must follow the selected theme. */
html[data-theme="light"] .notification-button{background:#fff!important;color:#334155!important;border-color:#cbd5e1!important}
html[data-theme="light"] .notification-panel{background:#fff!important;color:#172033!important;border-color:#e2e8f0!important;box-shadow:0 18px 50px rgba(15,23,42,.16)!important}
html[data-theme="light"] .notification-heading{color:#172033!important}
html[data-theme="light"] .notification-heading button,html[data-theme="light"] .notification-actions button,html[data-theme="light"] .notification-actions a{color:#2563eb!important}
html[data-theme="light"] .notification-item{border-top-color:#e2e8f0!important}
html[data-theme="light"] .notification-item.unread{background:#eaf3ff!important}
html[data-theme="light"] .notification-item p,html[data-theme="light"] .notification-preview p{color:#475569!important}
html[data-theme="light"] .notification-preview,html[data-theme="light"] .notification-preview strong{color:#172033!important}
html[data-theme="light"] .notification-item small,html[data-theme="light"] .notification-preview small,html[data-theme="light"] .notification-actions span{color:#64748b!important}
html[data-theme="light"] .notification-detail-backdrop{background:rgba(15,23,42,.38)!important}
html[data-theme="light"] .notification-detail{background:#fff!important;color:#172033!important;border-color:#e2e8f0!important;box-shadow:0 24px 70px rgba(15,23,42,.24)!important}
html[data-theme="light"] .notification-detail-head{border-bottom-color:#e2e8f0!important}
html[data-theme="light"] .notification-detail-head h2{color:#172033!important}
html[data-theme="light"] .notification-detail-head button{color:#475569!important}
html[data-theme="light"] .notification-detail-date,html[data-theme="light"] .notification-receipt-state{color:#64748b!important}
html[data-theme="light"] .notification-receipt{background:#f8fafc!important;color:#172033!important;border-color:#e2e8f0!important}
html[data-theme="light"] .notification-receipt dt{color:#64748b!important}
html[data-theme="light"] .notification-receipt dd{color:#172033!important}

/* Mobile drawer + hamburger must follow the selected theme too. */
html[data-theme="light"] .sidebar,html[data-theme="light"] .sidebar.show-mobile{background:#fff!important;background-color:#fff!important;color:#172033!important;border-right:1px solid #e2e8f0!important;box-shadow:12px 0 35px rgba(15,23,42,.12)!important}
html[data-theme="light"] .sidebar .logo-container{background:#fff!important;background-color:#fff!important;border-bottom:1px solid #e2e8f0!important;color:#172033!important}
html[data-theme="light"] .sidebar .logo-text,html[data-theme="light"] .sidebar .close-menu,html[data-theme="light"] .sidebar .close-menu svg{color:#334155!important}
html[data-theme="light"] .sidebar .nav-menu .nav-item{color:#475569!important;background:transparent!important;border-color:transparent!important}
html[data-theme="light"] .sidebar .nav-menu .nav-item:hover,html[data-theme="light"] .sidebar .nav-menu .nav-item.active{background:#eaf3ff!important;color:#2563eb!important;border-color:#bfdbfe!important}
html[data-theme="light"] .sidebar .nav-menu .nav-item svg{color:inherit!important}
html[data-theme="light"] .sidebar .nav-menu .nav-item[href="./profile.html"],
html[data-theme="light"] .sidebar .nav-menu .nav-item[href="profile.html"]{color:#334155!important;-webkit-text-fill-color:#334155!important;font-weight:650!important;opacity:1!important}
html[data-theme="light"] .sidebar .nav-menu .nav-item[href="./profile.html"] *,
html[data-theme="light"] .sidebar .nav-menu .nav-item[href="profile.html"] *{color:inherit!important;-webkit-text-fill-color:inherit!important;opacity:1!important}
html[data-theme="light"] .sidebar .nav-menu .nav-item[href="./profile.html"].active,
html[data-theme="light"] .sidebar .nav-menu .nav-item[href="profile.html"].active{color:#2563eb!important;-webkit-text-fill-color:#2563eb!important;background:#eaf3ff!important}
html[data-theme="light"] .sidebar .logout-btn{background:#f8fafc!important;color:#334155!important;border-color:#e2e8f0!important}
html[data-theme="light"] .menu-toggle{background:transparent!important;background-color:transparent!important;color:#334155!important;border-color:transparent!important}
html[data-theme="light"] .menu-toggle svg{color:#334155!important;stroke:#334155!important}
html[data-theme="light"] .close-menu{background:#f1f5f9!important;color:#334155!important;border-color:#cbd5e1!important}
html[data-theme="light"] .close-menu svg{stroke:#334155!important}
html[data-theme="light"] .menu-backdrop{background:rgba(15,23,42,.22)!important}
html[data-theme="light"] body.menu-open .top-navbar{background:#fff!important}


/* Profile page typography and readable identity/details in both themes */
.account-page{font-family:'Manrope','Inter',sans-serif}
.account-page h1,.profile-identity h2{font-family:'Manrope','Inter',sans-serif;letter-spacing:-.035em}
.profile-card{background:#111827;border:1px solid #334155;border-radius:18px}
.profile-identity{background:rgba(30,41,59,.42);border-bottom:1px solid #334155;border-radius:12px;padding:18px;margin-bottom:8px}
.profile-identity h2{color:#f8fafc;font-size:1.45rem;font-weight:800;line-height:1.25}
.profile-identity p{color:#cbd5e1;font-size:.92rem;line-height:1.5}
.profile-fields>div{padding:17px 14px;border-bottom:1px solid #334155}
.profile-fields dt{color:#94a3b8;font-size:.76rem;font-weight:700;letter-spacing:.055em;text-transform:uppercase}
.profile-fields dd{color:#f1f5f9;font-family:'Manrope','Inter',sans-serif;font-size:1rem;font-weight:700;line-height:1.5}
html[data-theme="light"] .account-page .profile-card{background:#fff!important;border:1px solid #dbe4ee!important;box-shadow:0 14px 36px rgba(15,23,42,.07)!important}
html[data-theme="light"] .account-page .profile-identity{background:#f1f5f9!important;border:1px solid #e2e8f0!important;border-bottom:1px solid #e2e8f0!important}
html[data-theme="light"] .account-page .profile-identity h2{color:#0f172a!important;font-weight:800!important}
html[data-theme="light"] .account-page .profile-identity p{color:#475569!important}
html[data-theme="light"] .account-page .profile-fields>div{background:#fff!important;border-bottom:1px solid #e2e8f0!important}
html[data-theme="light"] .account-page .profile-fields dt{color:#64748b!important}
html[data-theme="light"] .account-page .profile-fields dd{color:#172033!important;font-weight:750!important}
html[data-theme="light"] .account-page .profile-security-note{color:#64748b!important}

/* Ensure the account page title remains dark and legible in light mode. */
html[data-theme="light"] .account-page h1{color:#0f172a!important;-webkit-text-fill-color:#0f172a!important;font-weight:800!important;opacity:1!important}
html[data-theme="light"] .account-page .account-eyebrow{color:#475569!important;-webkit-text-fill-color:#475569!important}

/* Official AgentCoPilot brand image */
/* Legacy logo background removed: the sidebar logo is rendered by the img element only. */

/* Official AgentCoPilot sidebar logo: use the image element, never stack it over the old home icon. */
.sidebar img.logo-icon{display:block!important;width:38px!important;height:38px!important;min-width:38px!important;object-fit:contain!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;background-image:none!important;flex:0 0 38px!important}
.sidebar img.logo-icon+i,.sidebar .logo-icon i{display:none!important}


/* AgentCoPilot blue brand system: shared primary actions and interactive states. */
:root{--brand-blue:#68a9ff;--brand-blue-strong:#3b82f6;--brand-blue-soft:rgba(104,169,255,.16)}
button.btn-primary,.btn-primary,a.btn-primary,.btn.primary,button.primary,.primary-button,.primary-btn,.submit-btn,.profile-edit-button,.contact button,input[type=submit],button[type=submit]{background:linear-gradient(135deg,#68a9ff,#3b82f6)!important;color:#071321!important;border-color:#3b82f6!important}
button.btn-primary:hover,.btn-primary:hover,a.btn-primary:hover,.btn.primary:hover,button.primary:hover,.primary-button:hover,.primary-btn:hover,.submit-btn:hover,.profile-edit-button:hover,.contact button:hover,input[type=submit]:hover,button[type=submit]:hover{background:#2563eb!important;color:#fff!important;border-color:#2563eb!important}
.nav-item.active,.tab.active{background:var(--accent-glow)!important;color:var(--accent)!important;border-color:rgba(104,169,255,.32)!important}
.notification-heading button,.notification-actions button,.notification-actions a,.faq-item summary:after,.faq-item[open] summary{color:#8fc2ff}
.profile-edit-form input:focus,.profile-avatar-link:focus-visible,.faq-item summary:focus-visible{outline-color:rgba(104,169,255,.65);border-color:#68a9ff}
html[data-theme="light"] .nav-item.active,html[data-theme="light"] .sidebar .nav-menu .nav-item.active,html[data-theme="light"] .tab.active{background:#eaf3ff!important;color:#2563eb!important;border-color:#bfdbfe!important}
html[data-theme="light"] .notification-heading button,html[data-theme="light"] .notification-actions button,html[data-theme="light"] .notification-actions a{color:#2563eb!important}
