/* SayPhant Web Dashboard — Design System */
/* Coordinated with mobile app (theme.dart) */

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

:root {
    --primary: #2B7CB8;
    --primary-dark: #1A5F8C;
    --primary-light: #E8F4FD;
    --bg: #F8FBFE;
    --white: #FFFFFF;
    --grey-bar: #F0F0F0;
    --text-dark: #1A1A2E;
    --text-grey: #6B7280;
    --text-light: #9CA3AF;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --teal: #14B8A6;
    --orange: #F59E0B;
    --purple: #8B5CF6;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

/* ── DARK THEME ── */
[data-theme="dark"] {
    --bg: #121212;
    --white: #1E1E1E;
    --grey-bar: #2A2A2A;
    --text-dark: #E0E0E0;
    --text-grey: #9CA3AF;
    --text-light: #6B7280;
    --primary-light: rgba(43, 124, 184, 0.15);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .login-card {
    background: rgba(30, 30, 30, 0.95);
}

[data-theme="dark"] .error-banner {
    background: #2D1B1B;
    border-color: #5C2A2A;
}

[data-theme="dark"] .nav-item.logout:hover {
    background: #2D1B1B;
}

[data-theme="dark"] .protected-badge {
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .card-icon.teal {
    background: rgba(20, 184, 166, 0.15);
}

[data-theme="dark"] .card-icon.orange {
    background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .modal-close {
    background: #333;
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
    color: var(--text-grey);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.theme-toggle .icon {
    font-size: 20px;
    width: 20px;
    text-align: center;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── LOGIN ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0F4C75 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.brand-icon {
    font-size: 52px;
    margin-bottom: 8px;
}

.brand-logo {
    width: 180px;
    height: auto;
    margin-bottom: 8px;
}

.sidebar-logo {
    width: 160px;
    height: auto;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.brand-tagline {
    color: var(--text-grey);
    font-size: 13px;
    margin-top: 4px;
}

.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 20px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 14px 14px 14px 48px;
    border: 2px solid var(--grey-bar);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(43, 124, 184, 0.1);
}

.form-input.error {
    border-color: var(--error);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-grey);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-banner {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: var(--error);
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    margin-bottom: 12px;
}

/* ── APP SHELL ── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--grey-bar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--grey-bar);
}

.sidebar-brand .emoji {
    font-size: 28px;
}

.sidebar-brand .name {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-grey);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.nav-item .icon {
    font-size: 20px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--grey-bar);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-grey);
    font-size: 13px;
}

.user-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.nav-item.logout {
    color: var(--error);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}

.nav-item.logout:hover {
    background: #FEF2F2;
}

/* ── CONTENT ── */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
    max-width: 1200px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-grey);
    font-size: 14px;
}

/* ── STAT CARDS ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card.blue {
    border-left-color: var(--primary);
}

.stat-card.teal {
    border-left-color: var(--teal);
}

.stat-card.orange {
    border-left-color: var(--orange);
}

.stat-card.purple {
    border-left-color: var(--purple);
}

.stat-card .stat-icon {
    font-size: 24px;
}

.stat-card.blue .stat-icon {
    color: var(--primary);
}

.stat-card.teal .stat-icon {
    color: var(--teal);
}

.stat-card.orange .stat-icon {
    color: var(--orange);
}

.stat-card.purple .stat-icon {
    color: var(--purple);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
}

.stat-label {
    font-size: 12px;
    color: var(--text-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── DASHBOARD GRID ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--grey-bar);
}

.card-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.card-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.card-icon.teal {
    background: #E6FFFA;
    color: var(--teal);
}

.card-icon.orange {
    background: #FFF7ED;
    color: var(--orange);
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 14px;
}

.empty-state .empty-icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 12px;
    display: block;
}

/* ── CALENDAR ── */
.month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.month-label {
    font-size: 16px;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
}

.icon-btn {
    background: var(--white);
    border: 1px solid var(--grey-bar);
    border-radius: var(--radius-xs);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-grey);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.icon-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 28px;
}

.cal-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-grey);
    padding: 8px 0;
    text-transform: uppercase;
}

.cal-cell {
    background: var(--white);
    border-radius: var(--radius-xs);
    padding: 8px;
    min-height: 60px;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.cal-cell.today {
    background: var(--primary-light);
    border-color: var(--primary);
}

.cal-cell.other-month {
    opacity: 0.35;
}

.cal-cell .day {
    font-size: 13px;
    font-weight: 600;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.cal-event-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── FILTER CHIPS ── */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--grey-bar);
    background: var(--white);
    color: var(--text-grey);
    text-decoration: none;
    display: inline-block;
}

.chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── DOCUMENT CARDS ── */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.doc-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--grey-bar);
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.doc-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

.doc-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.doc-card-desc {
    font-size: 13px;
    color: var(--text-grey);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-card-footer {
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-light);
}

.doc-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.doc-tag {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
}

/* ── NOTE CARDS ── */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.note-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--grey-bar);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.note-card.protected {
    border-left-color: var(--orange);
}

.note-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.note-card-body {
    font-size: 13px;
    color: var(--text-grey);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-card-body.masked {
    color: var(--text-light);
    font-style: italic;
}

.note-card-footer {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-light);
}

.protected-badge {
    background: #FFF7ED;
    color: var(--orange);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: auto;
}

/* ── CLICKABLE ── */
.clickable {
    cursor: pointer;
}

.clickable:hover {
    border-color: var(--primary) !important;
}

/* ── SELECTED CALENDAR CELL ── */
a.cal-cell {
    display: block;
}

.cal-cell.selected {
    background: var(--primary);
    border-color: var(--primary-dark);
}

.cal-cell.selected .day {
    color: white;
}

.cal-cell.selected .cal-dot {
    background: white;
}

.cal-cell.selected .cal-event-count {
    background: white;
    color: var(--primary);
}

/* ── MODAL ── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    animation: modalSlide 0.3s ease;
}

.modal-wide {
    max-width: 680px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--grey-bar);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    border: none;
    background: var(--grey-bar);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-grey);
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-body {
    padding: 20px 24px;
}

.modal-loading {
    text-align: center;
    font-size: 32px;
    padding: 40px;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: var(--text-grey);
    min-width: 120px;
    font-size: 13px;
}

.detail-desc {
    margin-top: 16px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-grey);
    white-space: pre-wrap;
}

/* ── FILE PREVIEW ── */
.doc-preview {
    margin-top: 16px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.file-thumb {
    border-radius: var(--radius-xs);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--grey-bar);
}

.file-thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: var(--transition);
}

.file-thumb:hover img {
    transform: scale(1.05);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-xs);
    font-size: 13px;
    transition: var(--transition);
}

.file-item:hover {
    background: var(--primary-light);
}

.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.btn-download:hover {
    background: var(--primary-dark);
}

/* ── WEEK VIEW ── */
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 24px;
}

.week-day {
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--grey-bar);
    min-height: 200px;
    overflow: hidden;
}

.week-day.today {
    border-color: var(--primary);
    border-width: 2px;
}

.week-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--grey-bar);
    transition: var(--transition);
}

.week-day-header:hover {
    background: var(--primary-light);
}

.week-day-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-grey);
    text-transform: uppercase;
}

.week-day-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.week-day-events {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.week-event {
    padding: 6px 8px;
    background: var(--primary-light);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.week-event:hover {
    background: var(--primary);
    color: white;
}

.week-event-time {
    font-weight: 700;
    margin-right: 4px;
}

.week-empty {
    text-align: center;
    padding: 12px;
    color: var(--text-light);
    font-size: 12px;
}

/* ── DAY VIEW ── */
.day-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.day-view-header h3 {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.day-timeline {
    display: flex;
    flex-direction: column;
}

.timeline-slot {
    display: flex;
    gap: 16px;
    min-height: 48px;
    border-top: 1px solid var(--grey-bar);
    padding: 4px 0;
}

.timeline-slot.has-event {
    background: var(--primary-light);
    border-radius: var(--radius-xs);
}

.timeline-hour {
    width: 50px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    padding-top: 4px;
    text-align: right;
}

.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}

.timeline-event {
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-event:hover {
    background: var(--primary-dark);
    transform: translateX(2px);
}

.timeline-event strong {
    font-size: 14px;
}

.timeline-event span {
    font-size: 11px;
    opacity: 0.85;
}

/* ── NOTE CONTENT ── */
.note-full-content {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-wrap: break-word;
    border-left: 4px solid var(--primary);
    max-height: 400px;
    overflow-y: auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .doc-grid,
    .notes-grid {
        grid-template-columns: 1fr;
    }

    .week-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        max-width: 100%;
    }
}