/* ── Phoenix Mission Control — Realm Theme ──────────────────────────────── */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-hover: #22223a;
    --border: #2a2a45;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b8;
    --text-muted: #6868a0;
    --accent: #7c5cfc;
    --accent-glow: rgba(124, 92, 252, 0.15);
    --green: #34d399;
    --yellow: #fbbf24;
    --red: #f87171;
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 240px;
}

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

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

/* ── Sidebar ──────────────────────────────────────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

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

.brand-icon { font-size: 28px; }
.brand-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

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

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(124, 92, 252, 0.2);
}

.nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-weight: 500;
}

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

.logout { color: var(--red); opacity: 0.7; }
.logout:hover { opacity: 1; color: var(--red); }

/* ── Main Content ─────────────────────────────────────────────────────── */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 28px 36px;
    max-width: 1320px;
}

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

.page-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 2px;
}

.page-date {
    color: var(--text-secondary);
    font-size: 13px;
}

.header-stats {
    display: flex;
    gap: 24px;
    align-items: center;
}

.mini-stat {
    text-align: right;
    padding: 6px 0;
}

.mini-stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.mini-stat-value {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.mini-stat-sub {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.cost-today { color: var(--accent); }

/* ── Dashboard Grid ──────────────────────────────────────────────────── */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.card:hover { border-color: rgba(124, 92, 252, 0.3); }

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

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-badge {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bg-hover);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.card-body { padding: 20px; }

/* ── Calendar Events ──────────────────────────────────────────────────── */

.event-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-item {
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
}

/* ── Health Grid ───────────────────────────────────────────────────────── */

.health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.health-metric {
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.metric-unit {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Projects ──────────────────────────────────────────────────────────── */

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.project-name { font-weight: 500; }

.project-status { font-size: 12px; color: var(--green); }

/* ── Status ────────────────────────────────────────────────────────────── */

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

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
.status-dot.yellow { background: var(--yellow); box-shadow: 0 0 6px rgba(251, 191, 36, 0.4); }

.status-check { margin-left: auto; font-size: 14px; }

/* ── Empty State ──────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 24px 0;
}

/* ── Event Calendar Tags ─────────────────────────────────────────────── */

.event-calendar {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.event-summary { font-size: 13px; font-weight: 500; display: block; }

.event-time {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    display: block;
    margin-top: 2px;
}

/* ── Task List Compact (Dashboard) ───────────────────────────────────── */

.task-list-compact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-item-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.task-dim-icon { font-size: 14px; }

.task-text { flex: 1; }

.task-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.task-prio-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.task-prio-badge.high { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.task-prio-badge.medium { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }
.task-prio-badge.low { background: rgba(52, 211, 153, 0.15); color: var(--green); }

/* ── Knight: Dimension Grid ──────────────────────────────────────────── */

.dimension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.dim-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dim-card:hover {
    border-color: rgba(124, 92, 252, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.dim-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.dim-icon { font-size: 20px; }
.dim-name { font-size: 14px; font-weight: 600; }

.dim-body { padding: 12px 16px; }

.dim-task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dim-task-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
    font-size: 13px;
}

.task-title { flex: 1; font-weight: 500; }

.task-due, .task-reminder {
    font-size: 11px;
    color: var(--text-muted);
}

.task-action-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(124, 92, 252, 0.15);
    color: var(--accent);
}

.task-prio {
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
}

.task-prio.high { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.task-prio.medium { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }
.task-prio.low { background: rgba(52, 211, 153, 0.15); color: var(--green); }

/* ── Quick Add Form (Knight page) ────────────────────────────────────── */

.quick-add-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.quick-add-card h3 {
    font-size: 15px;
    margin-bottom: 14px;
    font-weight: 600;
}

.quick-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.qa-input {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.qa-input:focus { border-color: var(--accent); }

.qa-input[type="text"] { flex: 1; min-width: 200px; }

.qa-checkbox {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.qa-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qa-btn:hover { background: #6b4be0; }

/* ── Login Page ────────────────────────────────────────────────────────── */

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    width: 360px;
}

.login-icon { font-size: 48px; margin-bottom: 8px; }

.login-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-input {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

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

.login-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: #6b4be0;
    box-shadow: 0 0 20px var(--accent-glow);
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .main-content { margin-left: 0; padding: 20px; margin-top: 56px; }
    .sidebar { display: none; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .health-grid { grid-template-columns: 1fr 1fr; }
}


/* ── Top Navigation Bar ──────────────────────────────────────────────── */

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    z-index: 200;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.topnav::-webkit-scrollbar { display: none; }

.topnav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 4px;
    text-decoration: none;
    border-right: 1px solid var(--border);
    margin-right: 4px;
    flex-shrink: 0;
}

.brand-icon-top { font-size: 20px; }
.brand-text-top {
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.topnav-links {
    display: flex;
    gap: 2px;
    align-items: center;
}

.topnav-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.topnav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.topnav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.topnav-label {
    display: inline;
}

/* Show topnav on mobile, hide on desktop (sidebar handles desktop) */
@media (min-width: 901px) {
    .topnav { display: none; }
    .main-content { margin-top: 0; }
}

@media (max-width: 600px) {
    .topnav-label { display: none; }
    .topnav-item { padding: 8px 6px; font-size: 16px; }
    .main-content { padding: 12px; margin-top: 52px; }
}


/* ── Sidebar Section Labels ──────────────────────────────────────────── */

.sidebar-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 14px 4px;
    font-weight: 600;
}

/* ── Project Page ─────────────────────────────────────────────────────────── */

.project-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.task-check {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.task-edit-btn, .task-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.task-edit-btn:hover, .task-del-btn:hover {
    opacity: 1;
}

.task-del-btn:hover {
    color: var(--red);
}

/* ── Inline Editing ───────────────────────────────────────────────────────── */

.dim-task-item .task-title[contenteditable="true"] {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 2px 6px;
    outline: none;
}

@media (max-width: 900px) {
    .project-quick-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Dashboard — System Status Compact Row ──────────────────────────── */

.sys-status-row {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.sys-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    cursor: default;
    transition: border-color 0.2s;
}

.sys-status-item:hover {
    border-color: rgba(124, 92, 252, 0.3);
}

.sys-status-icon {
    font-size: 14px;
    line-height: 1;
}

.sys-status-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Dashboard — 3-Column Grid ──────────────────────────────────────── */

.dashboard-three-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* ── Calendar — 7-Day Week ──────────────────────────────────────────── */

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

.cal-day {
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    min-height: 90px;
}

.cal-day:hover {
    border-color: rgba(124, 92, 252, 0.3);
    background: var(--bg-secondary);
}

.cal-today {
    border-color: var(--accent);
    background: rgba(124, 92, 252, 0.08);
}

.cal-day-header {
    margin-bottom: 8px;
}

.cal-day-name {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cal-day-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.cal-today .cal-day-num {
    color: var(--accent);
}

.cal-day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}

.cal-event {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-secondary);
    text-align: left;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cal-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cal-event-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-no-events {
    font-size: 11px;
    color: var(--text-muted);
}

.cal-add-btn {
    width: 100%;
    background: rgba(124, 92, 252, 0.12);
    color: var(--accent);
    border: 1px dashed rgba(124, 92, 252, 0.3);
}

.cal-add-btn:hover {
    background: rgba(124, 92, 252, 0.2);
}

/* ── Health — Compact Card ──────────────────────────────────────────── */

.health-compact {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 80px;
}

.hc-metric {
    text-align: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 16px 10px;
    flex: 1;
    transition: background 0.2s;
}

.hc-metric:hover {
    background: rgba(124, 92, 252, 0.08);
}

.hc-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
}

.hc-value.na {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 20px;
}

.hc-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 600;
}

.hc-unit {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.health-link {
    display: block;
    text-align: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(124, 92, 252, 0.08);
    transition: background 0.2s;
}

.health-link:hover {
    background: rgba(124, 92, 252, 0.15);
}

/* ── System — Compact Status ────────────────────────────────────────── */

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

.sys-compact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.status-dot.red {
    background: var(--red);
    box-shadow: 0 0 6px rgba(248, 113, 113, 0.4);
}

/* ── Tasks Section ──────────────────────────────────────────────────── */

.tasks-section {
    margin-top: 4px;
}

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

.dim-link {
    margin-left: auto;
    font-size: 14px;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.dim-link:hover {
    opacity: 1;
}

/* ── Dimension Add Task Form ────────────────────────────────────────── */

.dim-add-form {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    align-items: center;
}

.dim-add-input {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 8px 10px;
}

.dim-add-prio {
    width: 90px;
    font-size: 11px;
    padding: 8px 6px;
    flex-shrink: 0;
}

.dim-add-btn {
    padding: 8px 12px;
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Modal ──────────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

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

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: flex-end;
}

/* ── Responsive: Grid columns ─────────────────────────────────────────── */

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

@media (max-width: 700px) {
    .dashboard-three-grid {
        grid-template-columns: 1fr;
    }
    .calendar-week {
        grid-template-columns: repeat(4, 1fr);
    }
    .health-compact {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .hc-metric {
        min-width: 80px;
    }
}

@media (max-width: 500px) {
    .calendar-week {
        grid-template-columns: repeat(2, 1fr);
    }
}
