:root {
    --primary: #0F766E;
    --primary-dark: #0B5C56;
    --ink: #0B1220;
    --bg: #F4F7F6;
    --text: #12202B;
    --border: #D9E2DE;
    --sidebar-width: 248px;
    --topbar-height: 72px;
    --radius: 14px;
    --shadow: 0 1px 3px rgba(11,18,32,.06), 0 8px 24px rgba(15,118,110,.06);
}

* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); margin: 0; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: #1d4ed8; }

/* Layout */
.app-wrapper { display: flex; min-height: 100vh; }
.app-main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }
.app-content { padding: 24px 32px; max-width: 1400px; }

/* Sidebar */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width);
    background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 1000;
}
.sidebar-brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.brand-icon { width: 36px; height: 36px; background: var(--primary); color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.brand-text { font-weight: 700; font-size: 18px; letter-spacing: -.3px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px;
    color: #64748b; font-weight: 500; margin-bottom: 2px; transition: all .15s;
}
.nav-item:hover { background: #f1f5f9; color: var(--text); }
.nav-item.active { background: #eff6ff; color: var(--primary); }
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-footer { padding: 12px 10px; border-top: 1px solid var(--border); }

/* Topbar */
.topbar {
    height: var(--topbar-height); background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 100;
}
.topbar-search { flex: 1; max-width: 480px; position: relative; }
.topbar-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 13px; }
.topbar-search input {
    width: 100%; padding: 9px 14px 9px 38px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg); font-size: 13px; outline: none; transition: border .15s;
}
.topbar-search input:focus { border-color: var(--primary); background: #fff; }
.search-results {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow); margin-top: 4px; display: none; max-height: 320px; overflow-y: auto; z-index: 200;
}
.search-results.show { display: block; }
.search-result-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.search-result-item:hover { background: #f8fafc; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-sprint, .topbar-clock { font-size: 13px; color: #64748b; }
.notif-badge { position: absolute; top: 2px; right: 2px; background: #ef4444; color: #fff; font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; }

/* Cards & Stats */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: 16px 20px; font-weight: 600; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 16px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.stat-label { font-size: 12px; color: #64748b; margin-top: 4px; font-weight: 500; }
.project-card, .idea-card, .report-card { transition: transform .15s, box-shadow .15s; }
.project-card:hover, .idea-card:hover, .report-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* Page */
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -.5px; margin: 0; }
.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: #64748b; }

/* Forms */
.form-control, .form-select { border-radius: 8px; border-color: var(--border); font-size: 14px; padding: 9px 14px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.btn { border-radius: 8px; font-weight: 500; font-size: 14px; padding: 8px 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

/* Task detail */
.task-meta dt { font-size: 12px; color: #64748b; margin-top: 12px; }
.task-meta dd { margin: 2px 0 0; font-weight: 500; }

/* Activity */
.activity-list { padding: 8px 0; }
.activity-item { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #f1f5f9; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }

/* Auth */
.auth-body { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-card { background: #fff; border-radius: var(--radius); padding: 40px 32px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-logo { width: 48px; height: 48px; background: var(--primary); color: #fff; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
a.auth-logo, a.auth-logo:hover { color: #fff; }

/* Table */
.table { font-size: 14px; }
.table thead th { font-weight: 600; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; border-bottom-width: 1px; padding: 12px 16px; }
.table td { padding: 14px 16px; vertical-align: middle; }

/* Badges */
.badge { font-weight: 500; font-size: 11px; padding: 4px 10px; border-radius: 6px; }

/* Responsive */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s; }
    .sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .app-content { padding: 16px; }
}

/* Floating action */
.fab { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; border: none; box-shadow: 0 4px 12px rgba(37,99,235,.4); font-size: 20px; z-index: 50; cursor: pointer; }
.fab:hover { background: #1d4ed8; }

/* Work day timer */
.work-timer-panel { padding: 4px 0; }
.work-day-progress { height: 14px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.work-day-progress .progress-bar { border-radius: 999px; transition: width 1s linear; background: linear-gradient(90deg, #2563EB, #3b82f6); }
.work-day-progress .progress-bar.is-complete { background: linear-gradient(90deg, #16a34a, #22c55e); }
.work-day-progress .progress-bar.is-break { background: #94a3b8; animation: none !important; }
.work-timer-main { font-variant-numeric: tabular-nums; }
.work-day-timer-compact .topbar-timer-bar-wrap { width: 100px; }
.work-day-timer-compact .work-day-progress { height: 6px; }
.work-day-timer-compact .work-timer-count { font-variant-numeric: tabular-nums; color: var(--primary); }
.topbar-timer-inner { min-width: 180px; padding: 4px 10px; background: #f8fafc; border-radius: 8px; border: 1px solid var(--border); }

/* Log hours reminder blink */
@keyframes logHoursBlink {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8); transform: scale(1); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); transform: scale(1.03); }
}
#btnLogHours.btn-log-hours-alert {
    animation: logHoursBlink 1s ease-in-out infinite;
    background: #f59e0b !important;
    border-color: #d97706 !important;
    color: #fff !important;
}
.break-progress .progress-bar { transition: width 1s linear; }
.logged-progress .progress-bar { transition: width 1s linear; background: linear-gradient(90deg, #0891b2, #06b6d4) !important; }

/* Today work panel */
.today-work-panel { --today-track: #e2e8f0; }
.today-empty-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: #eff6ff; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.today-attendance-badge, .today-session-badge { font-weight: 600; padding: 6px 10px; }
.today-pulse-dot { font-size: 8px; animation: todayPulse 1.5s ease-in-out infinite; }
@keyframes todayPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.today-time-track { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 16px; background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); }
.today-time-node { text-align: center; }
.today-time-node.is-active .today-time-value { color: var(--primary); }
.today-time-value { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.today-time-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; margin-top: 4px; }
.today-time-connector { position: relative; min-width: 120px; text-align: center; padding: 8px 0; color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.today-time-connector::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: var(--today-track); border-radius: 999px; z-index: 0; transform: translateY(-50%); }
.today-time-connector.is-live::before { background: linear-gradient(90deg, #2563EB 0%, #2563EB 50%, var(--today-track) 50%); background-size: 200% 100%; animation: todayTrackPulse 2s linear infinite; }
.today-time-connector.is-done::before { background: linear-gradient(90deg, #2563EB, #22c55e); }
.today-time-elapsed { position: relative; z-index: 1; background: #f8fafc; padding: 0 8px; display: inline-block; }
@keyframes todayTrackPulse { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.today-metrics { display: flex; flex-direction: column; gap: 18px; }
.today-metric { padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.today-metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.today-metric-label { font-size: 13px; font-weight: 600; color: #334155; }
.today-metric-value { font-variant-numeric: tabular-nums; font-size: 14px; }
.today-metric-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.today-controls-wrap { flex-shrink: 0; }

/* Topbar attendance toolbar — always visible in header */
.topbar-attendance {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
}
.topbar-attendance-status {
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    padding-right: 8px;
    border-right: 1px solid var(--border);
}
.topbar-attendance-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: todayPulse 1.5s ease-in-out infinite;
}
.topbar-attendance-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}
.topbar-attendance-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

/* Attendance panel — dashboard & attendance page */
.attendance-panel {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.attendance-panel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.attendance-panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.attendance-panel-title { font-weight: 700; font-size: 1.1rem; color: #0f172a; }
.attendance-panel-sub { font-size: 13px; color: #64748b; margin-top: 2px; }
.attendance-panel-live {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 10px;
    border-radius: 999px;
}
.attendance-panel--break .attendance-panel-live { color: #b45309; background: #fffbeb; }
.attendance-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
}
.attendance-done-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

/* Shared attendance buttons */
.attendance-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    white-space: nowrap;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.attendance-btn:active:not(:disabled) { transform: scale(0.98); }
.attendance-btn:disabled { opacity: 0.65; cursor: wait; }
.attendance-btn--clock-in {
    background: #16a34a;
    color: #fff;
}
.attendance-btn--clock-in:hover { background: #15803d; color: #fff; }
.attendance-btn--clock-out {
    background: #dc2626;
    color: #fff;
}
.attendance-btn--clock-out:hover { background: #b91c1c; color: #fff; }
.attendance-btn--break {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.attendance-btn--break:hover { background: #fde68a; color: #78350f; }
.attendance-btn--break-end {
    background: #f59e0b;
    color: #fff;
}
.attendance-btn--break-end:hover { background: #d97706; color: #fff; }
.attendance-btn--log {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.attendance-btn--log:hover { background: #dbeafe; color: #1e40af; }
.attendance-btn--log.btn-log-hours-alert {
    animation: logHoursBlink 1s ease-in-out infinite;
    background: #f59e0b !important;
    border-color: #d97706 !important;
    color: #fff !important;
}
.topbar-attendance .attendance-btn { padding: 6px 10px; font-size: 12px; }
.attendance-panel-actions .attendance-btn { padding: 10px 18px; font-size: 14px; }
.attendance-panel-actions .attendance-btn--clock-in { min-width: 140px; }
.attendance-schedule-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 10px 18px 14px;
    font-size: 12px;
    color: #64748b;
    border-top: 1px dashed #e2e8f0;
    background: #fafafa;
}
.attendance-schedule-strip strong { color: #334155; }

@media (max-width: 991px) {
    .topbar-attendance .attendance-btn span { display: none; }
    .topbar-attendance { padding: 4px 6px; gap: 4px; }
}
@media (max-width: 575px) {
    .attendance-panel-actions { flex-direction: column; }
    .attendance-panel-actions .attendance-btn { width: 100%; }
}
.today-time-connector.is-paused::before { background: #fcd34d; }
.today-time-connector.is-paused { color: #b45309; }
.today-time-connector.is-away::before { background: linear-gradient(90deg, #2563EB, var(--today-track)); }
.today-time-connector.is-away { color: #64748b; }
.today-time-sessions { display: block; position: relative; z-index: 1; font-size: 0.7rem; font-weight: 500; color: #94a3b8; margin-top: 2px; }
.today-work-panel--break .today-time-elapsed { background: #fffbeb; }

@media (max-width: 575px) {
    .attendance-dock-actions { flex-direction: column; }
    .attendance-dock-actions .attendance-btn { width: 100%; margin-left: 0 !important; }
    .attendance-dock-live-pill { display: none; }
}

@media (max-width: 575px) {
    .today-time-track { grid-template-columns: 1fr; gap: 8px; }
    .today-time-connector { min-width: 0; order: 3; }
    .today-time-connector::before { display: none; }
}

/* Entity discussion (project / sprint) */
.entity-discussion .discussion-item:last-child { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.discussion-decision-item:last-child { border-bottom: none !important; }
.discussion-body { line-height: 1.5; }
.discussion-filter .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.discussion-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15); }

/* Task import drafts */
.draft-card--saved { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35); }
.draft-card--created { opacity: 0.85; }
.format-json-preview { font-size: 12px; max-height: 520px; overflow: auto; background: #f8fafc; }
.conversation-preview { white-space: pre-wrap; max-height: 240px; overflow: auto; }

/* Reports — live attendance indicator */
.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* Calendar */
.calendar-card { min-height: 620px; }
.calendar-card .fc { font-size: 0.875rem; }
.calendar-card .fc-toolbar-title { font-size: 1.15rem; font-weight: 600; }
.calendar-card .fc-button { box-shadow: none !important; }
.calendar-card .fc-event { cursor: pointer; border-radius: 4px; padding: 1px 2px; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.calendar-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #64748b; }
.calendar-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* StudyT */
a:hover { color: var(--primary-dark); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.nav-item.active { background: #E7F3F1; color: var(--primary); }
.brand-sub { font-size: 11px; color: #64748b; letter-spacing: .02em; }
.sidebar-role { font-size: 11px; color: #64748b; padding: 0 14px 8px; }
.page-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #0F766E; font-weight: 600; }
.topbar { align-items: flex-start; padding-top: 14px; padding-bottom: 12px; height: auto; min-height: var(--topbar-height); }
.auth-wide { max-width: 460px; }
.auth-local { max-width: 720px; }
.quick-login { margin-bottom: 8px; }
.quick-login-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #0F766E; margin-bottom: 10px; }
.quick-login-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.auth-local .quick-login-grid { grid-template-columns: 1fr 1fr; }
.quick-user {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
}
.quick-user:hover { border-color: var(--primary); background: #E7F3F1; }
.quick-user.is-current, .quick-user:disabled { opacity: .65; cursor: default; }
.quick-user-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quick-user-copy strong { font-size: 14px; }
.quick-user-copy span { font-size: 12px; color: #64748b; }
.switch-menu { min-width: 260px; max-height: 420px; overflow: auto; }
@media (max-width: 640px) {
    .auth-local .quick-login-grid { grid-template-columns: 1fr; }
}
.auth-split { display: flex; align-items: center; gap: 12px; color: #94a3b8; font-size: 12px; margin: 8px 0 18px; }
.auth-split::before, .auth-split::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.btn-google { background: #fff; border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.btn-google:hover { background: #f8fafc; color: var(--text); }
.stat-card.tone-danger { border-color: #fecaca; }
.stat-card.tone-warn { border-color: #fde68a; }
.stat-card.tone-ok { border-color: #bbf7d0; }
.plan-row, .grant-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.plan-row:last-child, .grant-line:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.study-progress { height: 8px; border-radius: 99px; background: #e2e8f0; }
.study-progress .progress-bar { border-radius: 99px; }
.mini-stat { background: #f8fafc; border-radius: 10px; padding: 12px; font-size: 12px; color: #64748b; }
.report-quote { background: #E7F3F1; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.syllabus-hero { background: linear-gradient(135deg, #0B1220, #0F766E); color: #fff; }
.syllabus-hero .text-muted { color: rgba(255,255,255,.72) !important; }
.syllabus-subject { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.syllabus-chapter { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #f8fafc; }
.syllabus-chapter[open] { background: #fff; border-color: #cfe4e0; }
.syllabus-chapter summary { cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; list-style: none; }
.syllabus-chapter summary::-webkit-details-marker { display: none; }
.syllabus-count { font-size: 12px; color: #64748b; font-weight: 500; white-space: nowrap; }
.syllabus-topics { margin: 12px 0 0; padding-left: 18px; }
.syllabus-topics > li { margin-bottom: 10px; }
.syllabus-topics ul { margin: 6px 0 0; padding-left: 18px; color: #475569; }
.syllabus-admin-list { max-height: 640px; overflow: auto; }
.topic-progress-row {
    display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
    padding: 14px 18px; border-bottom: 1px solid #f1f5f9;
}
.topic-progress-row:last-child { border-bottom: 0; }
.topic-mark { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.topic-mark-form { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.topic-mark-now, .topic-mark-btn {
    border-radius: 999px; font-size: 12px; font-weight: 700; padding: 4px 10px; border: 1px solid transparent;
}
.topic-mark-btn { background: #fff; cursor: pointer; }
.topic-mark-btn.is-active { color: #fff; }
.topic-mark-now.tone-slate, .topic-mark-btn.tone-slate { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.topic-mark-now.tone-blue, .topic-mark-btn.tone-blue { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.topic-mark-now.tone-indigo, .topic-mark-btn.tone-indigo { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
.topic-mark-now.tone-amber, .topic-mark-btn.tone-amber { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.topic-mark-now.tone-teal, .topic-mark-btn.tone-teal { color: #0F766E; background: #E7F3F1; border-color: #9EE4DC; }
.topic-mark-now.tone-green, .topic-mark-btn.tone-green { color: #166534; background: #ecfdf5; border-color: #bbf7d0; }
.topic-mark-btn.tone-slate.is-active { background: #475569; color: #fff; }
.topic-mark-btn.tone-blue.is-active { background: #1d4ed8; color: #fff; }
.topic-mark-btn.tone-indigo.is-active { background: #4338ca; color: #fff; }
.topic-mark-btn.tone-amber.is-active { background: #d97706; color: #fff; }
.topic-mark-btn.tone-teal.is-active { background: #0F766E; color: #fff; }
.topic-mark-btn.tone-green.is-active { background: #166534; color: #fff; }
.stat-card.tone-slate { border-color: #e2e8f0; }
.stat-card.tone-blue { border-color: #bfdbfe; }
.stat-card.tone-indigo { border-color: #c7d2fe; }
.stat-card.tone-amber { border-color: #fde68a; }
.stat-card.tone-teal { border-color: #9EE4DC; }
.stat-card.tone-green { border-color: #bbf7d0; }
@media (max-width: 767px) {
    .topic-progress-row { flex-direction: column; }
    .topic-mark { align-items: flex-start; }
    .topic-mark-form { justify-content: flex-start; }
}
.impersonation-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: #0B1220; color: #fff; padding: 10px 20px; font-size: 13px; position: sticky; top: 0; z-index: 1100;
}
.impersonation-banner-copy span { color: #94a3b8; }
.impersonation-banner .btn { white-space: nowrap; }
body:has(.impersonation-banner) .sidebar { top: 46px; }
@media (max-width: 640px) {
    .impersonation-banner { flex-wrap: wrap; }
}
.passport-hero { background: linear-gradient(135deg, #0B1220, #0F766E); color: #fff; }
.passport-hero .text-muted { color: rgba(255,255,255,.7) !important; }
.metric { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
@media (max-width: 991px) {
    .topbar { flex-wrap: wrap; }
    .topbar-search { order: 3; flex: 1 1 100%; max-width: none; }
}

/* Public landing */
.landing-body { background: #fff; color: var(--text); margin: 0; }
.landing-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.landing-nav {
    position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.landing-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.landing-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.landing-brand:hover { color: var(--ink); }
.landing-brand strong { display: block; font-size: 18px; letter-spacing: -.3px; }
.landing-brand small { display: block; color: #64748b; font-size: 11px; letter-spacing: .04em; }
.landing-nav-toggle { border: 0; background: transparent; color: var(--ink); font-size: 20px; padding: 8px; }
.landing-menu { display: flex; align-items: center; gap: 22px; }
.landing-menu a { color: #334155; font-weight: 600; font-size: 14px; }
.landing-menu a:hover { color: var(--primary); }
.landing-cta { color: #fff !important; }
.landing-hero {
    background: linear-gradient(145deg, #0B1220 0%, #0F766E 78%, #12857C 100%);
    color: #fff; padding: 72px 0 80px;
}
.landing-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.landing-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.landing-hero .landing-kicker { color: #9EE4DC; }
.landing-hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -.8px; font-weight: 700; margin-bottom: 16px; }
.landing-lead { font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.82); max-width: 36rem; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.landing-proof { margin: 0; padding: 0; list-style: none; color: rgba(255,255,255,.78); display: grid; gap: 8px; }
.landing-proof li { padding-left: 22px; position: relative; }
.landing-proof li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9EE4DC; position: absolute; left: 0; top: 8px; }
.landing-passport {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    border-radius: 20px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.18);
}
.landing-passport-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9EE4DC; font-weight: 700; }
.landing-passport h2 { font-size: 26px; margin: 8px 0 8px; }
.landing-passport p { color: rgba(255,255,255,.75); }
.landing-metric { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.landing-passport-note { margin: 16px 0 0; font-size: 13px; }
.landing-strip { background: #fff; border-bottom: 1px solid var(--border); }
.landing-strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; }
.landing-strip-grid div { display: flex; align-items: center; gap: 10px; color: #334155; font-weight: 600; font-size: 13px; }
.landing-strip-grid i { color: var(--primary); }
.landing-section { padding: 80px 0; }
.landing-section-alt { background: var(--bg); }
.landing-section h2, .landing-close h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -.5px; font-weight: 700; margin-bottom: 12px; }
.landing-intro { max-width: 46rem; color: #475569; font-size: 16px; margin-bottom: 32px; }
.landing-card, .landing-panel {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow); height: 100%;
}
.landing-card h3, .landing-panel h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.landing-card p, .landing-panel p, .landing-role p { color: #475569; margin-bottom: 12px; }
.landing-step {
    width: 32px; height: 32px; border-radius: 8px; background: #E7F3F1; color: var(--primary);
    font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.landing-list { padding-left: 18px; color: #334155; }
.landing-list li { margin-bottom: 10px; }
.landing-dl { display: grid; gap: 14px; margin: 0; }
.landing-dl div { padding-top: 12px; border-top: 1px solid #eef2f1; }
.landing-dl dt { font-weight: 700; }
.landing-dl dd { margin: 2px 0 0; color: #64748b; }
.landing-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.landing-chips li { background: #E7F3F1; color: #0B5C56; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.landing-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary); background: #E7F3F1; border-radius: 999px; padding: 4px 10px; }
.landing-tag-wait { color: #92400e; background: #fef3c7; }
.landing-close { padding: 72px 0 88px; }
.landing-close-inner { text-align: center; max-width: 640px; margin: 0 auto; }
.landing-close p { color: #475569; font-size: 16px; }
.landing-close .landing-actions { justify-content: center; }
.landing-footer { background: #0B1220; color: rgba(255,255,255,.75); padding: 36px 0; }
.landing-footer-inner { display: grid; gap: 16px; }
.landing-brand-foot { color: #fff; }
.landing-brand-foot:hover { color: #fff; }
.landing-brand-foot small { color: rgba(255,255,255,.6); }
.landing-footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.landing-footer-links a { color: #9EE4DC; font-weight: 600; }
.landing-copy { margin: 0; font-size: 13px; }
@media (min-width: 992px) {
    .landing-menu.collapse { display: flex !important; }
}
@media (max-width: 991px) {
    .landing-hero { padding: 48px 0 56px; }
    .landing-hero-grid, .landing-strip-grid { grid-template-columns: 1fr; }
    .landing-menu { padding: 8px 0 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .landing-nav-inner { flex-wrap: wrap; }
    .landing-section { padding: 56px 0; }
}
