/* Modern Design Tokens — enterprise nonprofit shell */
:root {
    --shell-bg: #0A0A0F;
    --sidebar-bg: #111116;
    --card-surface: #1A1A24;
    --bg-dark: #0A0A0F;
    --bg-accent: #14141c;
    --text-primary: #ffffff;
    --text-secondary: #A0A0B0;
    --primary: #3b9eff;
    --primary-hover: #2b8ae6;
    --accent-teal: #2dd4bf;
    --danger: #f87171;
    --danger-hover: #ef4444;
    --border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(26, 26, 36, 0.72);
    --glass-blur: blur(20px);
}

.hidden { display: none !important; }

/* Light base: soft blue-gray + VMware-style teal / green (default in settings) */

/* Theme: Light */
html.theme-light body {
    --shell-bg: #d9dee8;
    --sidebar-bg: #ccd3e0;
    --card-surface: #e4e9f2;
    --bg-dark: #d9dee8;
    --bg-accent: #dfe4ee;
    --text-primary: #1c2533;
    --text-secondary: #5a6577;
    --primary: #0a6b7d;
    --primary-hover: #085566;
    --accent-teal: #0d8a7a;
    --danger: #b83232;
    --danger-hover: #9e2a2a;
    --border: rgba(28, 37, 54, 0.11);
    --glass-bg: rgba(228, 233, 242, 0.94);
    --glass-blur: blur(18px);
    background-image: none;
    background-color: var(--shell-bg);
}
html.theme-light .glass {
    background: var(--glass-bg);
    border: 1px solid rgba(28, 37, 54, 0.1);
    box-shadow: 0 8px 28px rgba(28, 37, 54, 0.07);
}
html.theme-light .overlay {
    background: rgba(22, 30, 42, 0.48);
}
html.theme-light input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
html.theme-light textarea,
html.theme-light .inline-input {
    background: #eef1f7;
    color: var(--text-primary);
    border: 1px solid rgba(28, 37, 54, 0.12);
}
html.theme-light input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']):focus,
html.theme-light textarea:focus,
html.theme-light .inline-input:focus {
    background: #f4f6fa;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 107, 125, 0.14);
}
html.theme-light th {
    background: #dce2ec;
    color: #4a5568;
    border-bottom: 2px solid rgba(28, 37, 54, 0.1);
}
html.theme-light .basic-select {
    background-color: #eef1f7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
html.theme-light .basic-select:focus {
    box-shadow: 0 0 0 2px rgba(10, 107, 125, 0.2);
}
html.theme-light .btn-outline:hover {
    background: rgba(28, 37, 54, 0.06);
}
html.theme-light .btn-text:hover {
    color: var(--text-primary);
}
html.theme-light .btn-badge {
    background: rgba(10, 107, 125, 0.12);
    color: #0a5c6b;
    border: 1px solid rgba(10, 107, 125, 0.2);
}
html.theme-light .btn-badge:hover {
    background: rgba(10, 107, 125, 0.18);
    color: #063d48;
}

/* Theme: Ocean */
html.theme-ocean body {
    --shell-bg: #0c1525;
    --sidebar-bg: #0f1a2e;
    --card-surface: #152238;
    --bg-dark: #0c1525;
    --bg-accent: #1e293b;
    --text-primary: #e0f2fe;
    --text-secondary: #94c4dc;
    --primary: #0ea5e9;
    --danger: #f43f5e;
    --glass-bg: rgba(30, 41, 59, 0.85);
    background-color: var(--shell-bg);
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse 100% 60% at 50% -15%, rgba(14, 165, 233, 0.14), transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
}

/* Theme: Dark (enterprise) */
html.theme-dark body {
    --shell-bg: #0A0A0F;
    --sidebar-bg: #111116;
    --card-surface: #1A1A24;
    --bg-dark: #0A0A0F;
    --bg-accent: #14141c;
    --text-primary: #ffffff;
    --text-secondary: #A0A0B0;
    --primary: #3b9eff;
    --glass-bg: rgba(26, 26, 36, 0.75);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(59, 158, 255, 0.12), transparent 55%);
    background-size: 48px 48px, 48px 48px, 100% 100%;
    background-color: var(--shell-bg);
}



* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--shell-bg, var(--bg-dark));
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: none;
    -webkit-font-smoothing: antialiased;
}

h2, h3 { font-weight: 500; letter-spacing: -0.5px; }

/* Modals & Overlay */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 21, 0.85); /* Semi-transparent */
    z-index: 1000;
    transition: opacity 0.3s ease;
}
.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Idle warning above main shell; below future higher modals */
#idle-session-overlay {
    z-index: 1100;
}
.modal-card {
    width: 98%;
    max-width: 1450px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
}
.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.glass-header {
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

/* Base Inputs — exclude native controls (checkbox/radio/etc.) so they keep OS sizing; width:100% on those overlaps labels */
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
textarea,
.inline-input,
.basic-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.basic-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-accent);
    color: var(--text-primary);
    cursor: pointer;
    border: 1px solid var(--border);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']):focus,
textarea:focus,
.inline-input:focus,
.basic-select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

.basic-select:focus {
    background: var(--bg-accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 500;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s;
    font-size: 14px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); padding: 8px 12px; }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-text { background: none; color: var(--text-secondary); padding: 8px; }
.btn-text:hover { color: white; }
.btn-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 12px;
}
.btn-badge:hover { background: rgba(59, 130, 246, 0.4); color: white; }

/* Contacts column — matches table row controls better than a bright pill */
#crm-table td.crm-contacts-cell {
    vertical-align: middle;
}
#crm-table .crm-contacts-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.38);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
    text-align: left;
    max-width: 100%;
}
#crm-table .crm-contacts-top {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
#crm-table .crm-contacts-btn:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
}
#crm-table .crm-contacts-count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.95);
}
#crm-table .crm-contacts-btn:hover .crm-contacts-count {
    color: #bfdbfe;
}
#crm-table .crm-contacts-label {
    color: rgba(203, 213, 225, 0.88);
    font-weight: 500;
}
#crm-table .crm-contacts-btn:hover .crm-contacts-label {
    color: rgba(255, 255, 255, 0.85);
}
#crm-table .crm-contacts-action {
    padding-top: 4px;
    margin-top: 2px;
    border-top: 1px solid rgba(59, 130, 246, 0.45);
    width: 100%;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e0f2fe;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.45), 0 1px 0 rgba(0, 0, 0, 0.5);
}
#crm-table .crm-contacts-btn:hover .crm-contacts-action {
    color: #fff;
    border-top-color: rgba(147, 197, 253, 0.65);
    text-shadow: 0 0 14px rgba(96, 165, 250, 0.55), 0 1px 0 rgba(0, 0, 0, 0.45);
}

html.theme-light #crm-table .crm-contacts-btn {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(241, 245, 249, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}
html.theme-light #crm-table .crm-contacts-count {
    color: #0f172a;
}
html.theme-light #crm-table .crm-contacts-label {
    color: #334155;
}
html.theme-light #crm-table .crm-contacts-action {
    color: #1d4ed8;
    border-top-color: rgba(37, 99, 235, 0.35);
    text-shadow: none;
    font-weight: 800;
}

/* App shell */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    color: var(--text-primary);
}
.app-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

/* Tables */
.table-container { border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
th, td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: rgba(0, 0, 0, 0.2); color: var(--text-secondary); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

.empty-state { padding: 40px; text-align: center; color: var(--text-secondary); }

/* Card Layouts in Grid Modal */
.contacts-grid-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px;
}
/* Compact row layout for entity “people” count on index table — NOT for manage_people.html full editor */
.person-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.5fr auto;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}
.card-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-field label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}

/* Base grids for wide screens */
.pc-name { grid-column: span 1; }
.pc-email { grid-column: span 1; }
.pc-phone { grid-column: span 1; }
.pc-delete { grid-column: span 1; display:flex; justify-content:flex-end; align-items:center; }

.pc-notes { grid-column: span 4; }

.pc-cdate { grid-column: span 1; }
.pc-ctime { grid-column: span 1; }
.pc-lastcontact { grid-column: span 1; }

@media (max-width: 900px) {
    .person-card { grid-template-columns: 1fr; }
    .pc-name, .pc-email, .pc-phone, .pc-delete, .pc-notes, .pc-cdate, .pc-ctime, .pc-lastcontact {
        grid-column: span 1;
    }
    .pc-delete { justify-content: flex-start; }
}

/* Action Block */
.action-stack { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* Utils */
.input-with-copy {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}
.copy-btn {
    background: transparent;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-secondary);
    opacity: 0.4;
}
.copy-btn:hover {
    color: white;
    opacity: 1;
    transform: scale(1.1);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: white;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Dashboard Summary Stats */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover { 
    transform: translateY(-2px);
    border-color: var(--primary);
}
.stat-label { font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 600; color: white; }
.stat-trend { font-size: 11px; font-weight: 500; }
.trend-up { color: #10b981; }
.trend-down { color: var(--danger); }

/* Category Tags */
.cat-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
}
.cat-donor { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }
.cat-volunteer { background: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.cat-grantor { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }

@media (max-width: 768px) {
    .dashboard-summary { grid-template-columns: 1fr 1fr; }
}

/* Settings Modal Redesign */
.settings-modal-large {
    max-width: 900px;
    width: 95%;
    flex-direction: row;
    height: 600px;
    overflow: hidden;
    padding: 0;
}
.settings-sidebar {
    width: 240px;
    border-right: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 32px 24px;
}
.sidebar-header h3 {
    font-size: 18px;
    color: white;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
    gap: 4px;
}
.nav-item {
    text-align: left;
    background: transparent;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}
.nav-item .icon { font-size: 16px; opacity: 0.8; }
.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.settings-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
}
.settings-content-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.settings-content-header h2 { font-size: 20px; color: white; }
.settings-content-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.settings-tab.hidden { display: none; }

.user-management-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* User Card Styles */
.user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.user-card:hover { border-color: rgba(255,255,255,0.2); }
.user-info { display: flex; flex-direction: column; gap: 4px; }
.user-tag {
    font-size: 10px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
}

@media (max-width: 768px) {
    .settings-modal-large { flex-direction: column; height: auto; max-height: 90vh; }
    .settings-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .sidebar-nav { flex-direction: row; overflow-x: auto; padding-bottom: 12px; }
    .nav-item { white-space: nowrap; }
}

/* --- Enterprise dashboard shell (VMware-inspired) --- */
html.theme-dark body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#app-container {
    position: relative;
    z-index: 1;
}

.dash-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 28px 16px 20px;
    min-height: 0;
}

.dash-sidebar__brand {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 8px 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.dash-sidebar__brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.dash-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 158, 255, 0.35), rgba(45, 212, 191, 0.25));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 24px rgba(59, 158, 255, 0.15);
}

.dash-sidebar__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dash-logo-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.dash-logo-sub {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.dash-logo-company {
    margin-top: 16px;
    margin-left: 0;
    padding-right: 4px;
    align-self: flex-start;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-primary);
    opacity: 0.98;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-logo-company.hidden {
    display: none;
}

html.theme-light .dash-logo-company {
    color: var(--text-primary);
    opacity: 0.95;
}

.dash-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sidebar-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.sidebar-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-nav-btn.active {
    color: var(--text-primary);
    background: rgba(59, 158, 255, 0.1);
    border-color: rgba(59, 158, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(59, 158, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.sidebar-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
}

.sidebar-nav-btn.active .sidebar-nav-icon {
    background: rgba(59, 158, 255, 0.18);
}

.sidebar-nav-label {
    letter-spacing: -0.01em;
}

.dash-sidebar__profile {
    margin-top: auto;
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-profile-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sidebar-profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-role {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.dash-topbar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

html.theme-light .dash-topbar {
    background: rgba(228, 233, 242, 0.92);
    border-bottom-color: var(--border);
}

.dash-page-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.dash-page-sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 42ch;
    line-height: 1.45;
}

.dash-topbar__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.dash-date-pill {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    letter-spacing: 0.02em;
}

.dash-search-mock {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 280px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(26, 26, 36, 0.5);
    color: var(--text-secondary);
    font-size: 13px;
    user-select: none;
}

html.theme-light .dash-search-mock {
    background: #dfe5ef;
    border-color: rgba(28, 37, 54, 0.12);
    color: var(--text-secondary);
}

.dash-search-mock__glyph {
    opacity: 0.45;
    font-size: 15px;
}

.dash-topbar__tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Follow-up reminder bell (dashboard) */
.dash-remind-wrap {
    position: relative;
}

.dash-remind-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding-left: 12px;
    padding-right: 12px;
}

.dash-remind-bell__glyph {
    display: flex;
    color: var(--text-secondary);
    transition: color 0.2s, filter 0.2s;
}

.dash-remind-bell__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(10, 10, 15, 0.85);
}

html.theme-light .dash-remind-bell__badge {
    box-shadow: 0 0 0 2px rgba(228, 233, 242, 0.95);
}

.dash-remind-bell.dash-remind-bell--active .dash-remind-bell__glyph {
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65));
    animation: dash-remind-bounce 1.1s ease-in-out infinite;
}

@keyframes dash-remind-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    55% { transform: translateY(1px); }
}

.dash-remind-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 100;
    min-width: 300px;
    max-width: min(420px, 92vw);
    max-height: 70vh;
    overflow-y: auto;
    padding: 12px 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-surface);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

html.theme-light .dash-remind-panel {
    box-shadow: 0 16px 40px rgba(28, 37, 54, 0.18);
}

.dash-remind-panel__empty {
    margin: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.dash-remind-panel__item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.dash-remind-panel__item:last-child {
    border-bottom: none;
}

.dash-remind-panel__item-line {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.35;
}

.dash-remind-panel__item-meta {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 10px;
}

.dash-remind-panel__when {
    white-space: nowrap;
}

.dash-remind-panel__item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

/* Volunteer tab — company admin interest configuration (compact collapsible) */
.vol-interest-admin {
    margin-bottom: 16px;
}

.vol-interest-admin__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    text-align: left;
    font: inherit;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.vol-interest-admin__toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

html.theme-light .vol-interest-admin__toggle:hover {
    background: rgba(28, 37, 54, 0.06);
}

.vol-interest-admin__chevron-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

html.theme-light .vol-interest-admin__chevron-wrap {
    background: rgba(28, 37, 54, 0.08);
    color: var(--text-secondary);
}

.vol-interest-admin__chevron {
    display: block;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
}

.vol-interest-admin:not(.vol-interest-admin--collapsed) .vol-interest-admin__chevron {
    transform: rotate(90deg);
}

.vol-interest-admin__toggle-labels {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.vol-interest-admin__toggle-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.vol-interest-admin__toggle-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
}

.vol-interest-admin__body {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html.theme-light .vol-interest-admin__body {
    border-top-color: rgba(28, 37, 54, 0.1);
}

.vol-interest-admin__hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 12px 0 10px;
    line-height: 1.45;
    max-width: 52rem;
}

.vol-interest-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 0.35rem;
    align-items: start;
}

@media (max-width: 640px) {
    .vol-interest-check-grid {
        grid-template-columns: 1fr;
    }
}

.vol-interest-check-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: start;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.35;
    cursor: pointer;
    margin: 0;
    padding: 4px 0;
    font-weight: 500;
}

.vol-interest-check-item > span {
    min-width: 0;
    padding-top: 1px;
}

.vol-interest-check-item input[type='checkbox'] {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    margin: 2px 0 0;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    accent-color: var(--primary);
    border: none;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
}

.vol-interest-custom-add {
    margin-top: 14px;
}

.vol-interest-custom-add__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.vol-interest-custom-add__row .inline-input {
    max-width: 420px;
    flex: 1;
    min-width: 200px;
}

.vol-interest-custom-list {
    margin-top: 10px;
}

.vol-interest-custom-list__empty {
    font-size: 12px;
    opacity: 0.65;
    margin: 0;
}

.vol-interest-custom-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
}

html.theme-light .vol-interest-custom-row {
    border-bottom-color: rgba(28, 37, 54, 0.08);
}

.vol-interest-custom-row:last-child {
    border-bottom: none;
}

.vol-interest-custom-row span {
    flex: 1;
    min-width: 0;
}

.vol-interest-save-row {
    margin-top: 14px;
}

.vol-log-interest-row .basic-select {
    min-width: 0;
}

.btn-toolbar {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-toolbar:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-toolbar--primary {
    background: rgba(59, 158, 255, 0.2);
    border-color: rgba(59, 158, 255, 0.35);
    color: #e8f4ff;
}

.btn-toolbar--primary:hover {
    background: rgba(59, 158, 255, 0.32);
    box-shadow: 0 0 20px rgba(59, 158, 255, 0.2);
}

.btn-toolbar--ghost {
    color: var(--text-secondary);
    background: transparent;
}

.btn-toolbar--ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.dash-scroll {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dash-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 24px;
}

.dash-panel {
    margin-top: 8px;
}

.dashboard-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    padding: 16px 32px 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
}

.dashboard-footer__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.dashboard-footer__status {
    color: #6ee7b7;
    font-weight: 600;
}

html.theme-light .dashboard-footer__status {
    color: #0d6f58;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 1200px) {
    .dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-summary {
        grid-template-columns: 1fr;
    }
    .dash-sidebar {
        width: 72px;
        padding: 20px 10px;
    }
    .dash-sidebar__brand-text,
    .dash-logo-company,
    .sidebar-nav-label,
    .sidebar-profile-text {
        display: none;
    }
    .dash-sidebar__brand {
        align-items: center;
        padding-left: 0;
        padding-right: 0;
    }
    .dash-sidebar__brand-row {
        justify-content: center;
        width: 100%;
    }
    .dash-sidebar__profile {
        justify-content: center;
        padding: 12px 8px;
    }
    .sidebar-nav-btn {
        justify-content: center;
        padding: 12px 8px;
    }
}

.dash-card {
    position: relative;
    border-radius: 12px;
    padding: 22px 22px 20px;
    background: linear-gradient(165deg, rgba(26, 26, 36, 0.98), rgba(18, 18, 26, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 24px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

html.theme-light .dash-card {
    background: linear-gradient(165deg, #eef2f8 0%, #e2e8f2 100%);
    border-color: rgba(28, 37, 54, 0.1);
    box-shadow: 0 6px 22px rgba(28, 37, 54, 0.08);
}
html.theme-light .dash-card:hover {
    border-color: rgba(10, 107, 125, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.65) inset,
        0 0 0 1px rgba(10, 107, 125, 0.12),
        0 12px 32px rgba(28, 37, 54, 0.1);
}
html.theme-light .dash-card__accent {
    background: linear-gradient(90deg, #0a6b7d, #6b9f37);
}
html.theme-light .dash-card__accent--teal {
    background: linear-gradient(90deg, #0d8a7a, #0a6b7d);
}
html.theme-light .dash-card__accent--violet {
    background: linear-gradient(90deg, #4a6fa5, #0a6b7d);
}
html.theme-light .dash-card__accent--amber {
    background: linear-gradient(90deg, #b9892e, #c4782a);
}
html.theme-light .dash-card__icon-ph {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(223, 229, 239, 0.45));
    border-color: rgba(28, 37, 54, 0.1);
}
html.theme-light .dash-progress {
    background: rgba(28, 37, 54, 0.08);
}
html.theme-light .dash-progress__fill {
    background: linear-gradient(90deg, #0a6b7d, #1a8ca0);
    box-shadow: 0 0 10px rgba(10, 107, 125, 0.35);
}
html.theme-light .dash-progress__fill--teal {
    background: linear-gradient(90deg, #0d8a7a, #12a896);
    box-shadow: 0 0 10px rgba(13, 138, 122, 0.3);
}
html.theme-light .dash-progress__fill--violet {
    background: linear-gradient(90deg, #4a6fa5, #5e87c0);
    box-shadow: 0 0 10px rgba(74, 111, 165, 0.28);
}
html.theme-light .dash-progress__fill--amber {
    background: linear-gradient(90deg, #c4782a, #d9a23a);
    box-shadow: 0 0 10px rgba(196, 120, 42, 0.25);
}
html.theme-light .dash-date-pill {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(28, 37, 54, 0.1);
}
html.theme-light .btn-toolbar {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(28, 37, 54, 0.12);
    color: var(--text-primary);
}
html.theme-light .btn-toolbar:hover {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(28, 37, 54, 0.16);
}
html.theme-light .btn-toolbar--primary {
    background: linear-gradient(180deg, #0c7a8e, #0a6b7d);
    border-color: rgba(8, 70, 82, 0.45);
    color: #f0fafb;
}
html.theme-light .btn-toolbar--primary:hover {
    background: linear-gradient(180deg, #0e8ca3, #0a6b7d);
    box-shadow: 0 4px 16px rgba(10, 107, 125, 0.28);
}
html.theme-light .btn-toolbar--ghost:hover {
    background: rgba(28, 37, 54, 0.06);
}
html.theme-light .dash-logo-mark {
    background: linear-gradient(135deg, rgba(10, 107, 125, 0.42), rgba(107, 159, 55, 0.36));
    border-color: rgba(28, 37, 54, 0.12);
    box-shadow: 0 2px 12px rgba(10, 107, 125, 0.18);
}
html.theme-light .dashboard-footer__dot {
    background: rgba(28, 37, 54, 0.22);
}

/* Hover: subtle glow (visual affordance; cards are still static content) */
.dash-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 0 1px rgba(59, 158, 255, 0.12),
        0 28px 56px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(59, 158, 255, 0.08);
}

.dash-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b9eff, #2dd4bf);
    opacity: 0.95;
}

.dash-card__accent--teal {
    background: linear-gradient(90deg, #2dd4bf, #22d3ee);
}

.dash-card__accent--violet {
    background: linear-gradient(90deg, #a78bfa, #60a5fa);
}

.dash-card__accent--amber {
    background: linear-gradient(90deg, #fbbf24, #f97316);
}

.dash-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dash-card__icon-ph {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dash-card__eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.dash-stat-value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: block;
    margin-bottom: 8px;
}

.dash-card__hint {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.dash-progress {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.dash-progress__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b9eff, #60a5fa);
    box-shadow: 0 0 12px rgba(59, 158, 255, 0.45);
}

.dash-progress__fill--teal {
    background: linear-gradient(90deg, #14b8a6, #2dd4bf);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.35);
}

.dash-progress__fill--violet {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.dash-progress__fill--amber {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.stat-card {
    /* legacy class kept if referenced elsewhere */
    padding: 24px;
    background: var(--card-surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

html.theme-light .dash-sidebar {
    border-right-color: rgba(28, 37, 54, 0.12);
}

html.theme-light .dash-sidebar__profile {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(28, 37, 54, 0.1);
}

html.theme-light .sidebar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.38);
    border-color: rgba(28, 37, 54, 0.08);
    color: var(--text-primary);
}

html.theme-light .sidebar-nav-btn.active {
    background: rgba(10, 107, 125, 0.12);
    border-color: rgba(10, 107, 125, 0.28);
    color: #063844;
    box-shadow: 0 4px 14px rgba(10, 107, 125, 0.12);
}

html.theme-light .sidebar-nav-btn.active .sidebar-nav-icon {
    background: rgba(10, 107, 125, 0.15);
    color: #0a5c6b;
}

html.theme-light .card-field label {
    color: rgba(28, 37, 54, 0.55);
}

html.theme-light .person-card {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(28, 37, 54, 0.1);
}

/* Platform admin — companies: user roster + account menu */
.platform-users-cell {
    min-width: 0;
    max-width: 520px;
}

.platform-users-empty {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.85;
}

.platform-users-roster {
    margin-bottom: 10px;
}

.platform-users-roster__label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.platform-users-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.platform-user-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
    padding: 4px 9px 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    line-height: 1.25;
}

.platform-user-pill__name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.platform-user-pill__role {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.platform-users-menu {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.platform-users-menu__summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.15s ease, background 0.15s ease;
}

.platform-users-menu__summary::-webkit-details-marker {
    display: none;
}

.platform-users-menu__summary::after {
    content: '▸';
    float: right;
    font-size: 9px;
    opacity: 0.65;
    margin-left: 8px;
    line-height: 1.6;
}

.platform-users-menu[open] .platform-users-menu__summary::after {
    content: '▾';
}

.platform-users-menu[open] .platform-users-menu__summary {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.platform-users-menu__summary:hover {
    color: var(--text-primary);
}

.platform-users-menu__panel {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-user-manage {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.platform-user-manage:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.platform-user-manage__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.platform-user-manage__idblock {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 10px;
    min-width: 0;
}

.platform-user-manage__login {
    font-size: 13px;
    color: var(--text-primary);
}

.platform-user-manage__role {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.platform-user-manage__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.platform-user-manage__row .inline-input {
    min-width: 0;
    flex: 1 1 120px;
    max-width: 200px;
}

.platform-user-manage__row .btn-outline {
    padding: 7px 12px;
    font-size: 12px;
    flex-shrink: 0;
}

html.theme-light .platform-user-pill {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(28, 37, 54, 0.12);
}

html.theme-light .platform-users-menu {
    border-color: rgba(28, 37, 54, 0.12);
    background: rgba(255, 255, 255, 0.45);
}

html.theme-light .platform-users-menu[open] .platform-users-menu__summary {
    background: rgba(255, 255, 255, 0.65);
    border-bottom-color: rgba(28, 37, 54, 0.1);
}

html.theme-light .platform-user-manage {
    border-bottom-color: rgba(28, 37, 54, 0.08);
}
