:root,
[data-bs-theme="light"] {
    --ip-brand: #1f3d7a;
    --ip-brand-soft: #dbe8ff;
    --ip-brand-hover: #eef2ff;
    --ip-brand-on: #ffffff;
    --ip-page-bg: #f8f9fb;
    --ip-surface: #ffffff;
    --ip-surface-muted: #f8fafc;
    --ip-muted: #6b7280;
    --ip-border: #e5e7eb;
    --ip-border-strong: #d1d5db;
    --ip-nav-text: #495057;
    --ip-mobile-border: #dee2e6;
}

[data-bs-theme="dark"] {
    --ip-brand: #8ab4f8;
    --ip-brand-soft: #1a2f4a;
    --ip-brand-hover: #243656;
    --ip-brand-on: #0f172a;
    --ip-page-bg: #121418;
    --ip-surface: #1e2128;
    --ip-surface-muted: #181b21;
    --ip-muted: #9ca3af;
    --ip-border: #374151;
    --ip-border-strong: #4b5563;
    --ip-nav-text: #ced4da;
    --ip-mobile-border: #374151;
}

html,
body {
    background-color: var(--ip-page-bg);
    min-height: 100%;
}

h1:focus {
    outline: none;
}

.dashboard-main-card {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.theme-toggle-icon-light {
    display: none;
}

.theme-toggle-icon-dark {
    display: inline;
}

.theme-toggle-icon {
    font-size: 0.9rem;
    line-height: 1;
}

[data-bs-theme="dark"] .theme-toggle-icon-light {
    display: inline;
}

[data-bs-theme="dark"] .theme-toggle-icon-dark {
    display: none;
}

.patient-shell {
    min-height: 100vh;
    background-color: var(--ip-page-bg);
}

.unauth-shell {
    min-height: 100vh;
    background-color: var(--ip-page-bg);
}

.dashboard-nav-link {
    align-items: center;
    display: flex;
    gap: 0.625rem;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: var(--ip-nav-text);
    background-color: var(--ip-surface);
    border: 1px solid var(--ip-border);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-nav-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 1.1rem;
    font-size: 1rem;
    justify-content: center;
    line-height: 1;
    width: 1.1rem;
}

.dashboard-nav-link:hover {
    background-color: var(--ip-brand-hover);
    border-color: var(--ip-brand);
    color: var(--ip-brand);
}

.dashboard-nav-link:focus-visible {
    outline: 2px solid var(--ip-brand);
    outline-offset: 2px;
}

.dashboard-nav-link.active {
    background-color: var(--ip-brand);
    border-color: var(--ip-brand);
    color: var(--ip-brand-on);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.dashboard-nav-link.active:hover {
    background-color: var(--ip-brand);
    border-color: var(--ip-brand);
    color: var(--ip-brand-on);
    filter: brightness(1.05);
}

.questionnaire-shell-card {
    border: 1px solid var(--ip-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.questionnaire-shell-card .card-body {
    background-color: var(--ip-surface);
}

.questionnaire-section-card {
    border: 1px solid var(--ip-border);
    border-radius: 0.5rem;
    overflow: hidden;
}

.questionnaire-section-header {
    background-color: var(--ip-brand);
    color: var(--ip-brand-on);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
}

.questionnaire-section-body {
    background-color: var(--ip-surface);
    padding: 0.8rem;
}

.questionnaire-answer-group {
    background-color: var(--ip-surface-muted);
    border: 1px solid var(--ip-border);
    border-radius: 0.5rem;
    padding: 0.65rem 0.75rem;
}

.questionnaire-list-item {
    border: 1px solid var(--ip-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.questionnaire-list-item .card-body {
    background-color: var(--ip-surface);
}
