/* ============================================================
   IITM Course Planner - shadcn-inspired Design System
   ============================================================ */

/* ---------- CSS Variables (shadcn design tokens) ---------- */
:root {
    /* Light mode: clean white/grey, no blue tint */
    --background: #f4f5f7;
    --foreground: #111827;
    --card: #ffffff;
    --card-foreground: #111827;
    --popover: #ffffff;
    --popover-foreground: #111827;
    --primary: #2563eb;
    --primary-foreground: #ffffff;
    --secondary: #f1f2f5;
    --secondary-foreground: #374151;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --accent: #eef0f3;
    --accent-foreground: #1f2937;
    --destructive: #dc2626;
    --destructive-foreground: #ffffff;
    --success: #16a34a;
    --success-foreground: #ffffff;
    --warning: #d97706;
    --warning-foreground: #ffffff;
    --info: #0284c7;
    --info-foreground: #ffffff;
    --border: #e2e4e9;
    --input: #d1d5db;
    --ring: #2563eb;
    --radius: 0.75rem;
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --transition-speed: 0.25s;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.06);
    --shadow: 0 1px 4px 0 rgb(0 0 0 / 0.08);
    --shadow-md: 0 4px 8px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 12px 24px -4px rgb(0 0 0 / 0.12);
}

[data-theme="dark"] {
    /* Dark mode: true near-black, no blue cast */
    --background: #111111;
    --foreground: #e5e7eb;
    --card: #1e1e1e;
    --card-foreground: #e5e7eb;
    --popover: #252525;
    --popover-foreground: #e5e7eb;
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --secondary: #2a2a2a;
    --secondary-foreground: #d1d5db;
    --muted: #262626;
    --muted-foreground: #9ca3af;
    --accent: #2e2e2e;
    --accent-foreground: #d1d5db;
    --destructive: #f87171;
    --destructive-foreground: #ffffff;
    --success: #4ade80;
    --success-foreground: #052e16;
    --warning: #fbbf24;
    --warning-foreground: #1c1108;
    --info: #60a5fa;
    --info-foreground: #ffffff;
    --border: #333333;
    --input: #2a2a2a;
    --ring: #3b82f6;
}

[data-theme="dark"] button:not(.btn-text),
[data-theme="dark"] a.btn {
    color: var(--primary-foreground);
}

/* ===== Dark Mode: Sidebar ===== */
[data-theme="dark"] .sidebar {
    background: #1e1e1e;
    border-right: 1px solid #333333;
}
[data-theme="dark"] .sidebar-header { border-bottom-color: #333333; }
[data-theme="dark"] .sidebar-footer { border-top-color: #333333; }
[data-theme="dark"] .sidebar-section-title { color: #6b7280; }
[data-theme="dark"] .sidebar-brand { color: #e5e7eb; }
[data-theme="dark"] .sidebar-link { color: #d1d5db; }
[data-theme="dark"] .sidebar-link:hover { background: rgba(59,130,246,0.12); color: #93c5fd; }
[data-theme="dark"] .sidebar-link.active { background: rgba(59,130,246,0.18); border-left-color: #3b82f6; color: #93c5fd; }

/* ===== Dark Mode: Topbar ===== */
[data-theme="dark"] .topbar { background: #1e1e1e; border-bottom-color: #333333; }
[data-theme="dark"] .topbar-title { color: #e5e7eb; }

/* ===== Dark Mode: Cards ===== */
[data-theme="dark"] .card { background: #1e1e1e; border-color: #333333; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
[data-theme="dark"] .card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.5); border-color: #444444; }
[data-theme="dark"] .card-header { background: #262626; border-bottom-color: #333333; }
[data-theme="dark"] .card-footer { border-top-color: #333333; }
[data-theme="dark"] .card-title { color: #e5e7eb; }

/* ===== Dark Mode: Forms ===== */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #2a2a2a;
    border-color: #3f3f3f;
    color: #e5e7eb;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    background: #2a2a2a;
    border-color: #3b82f6;
    color: #e5e7eb;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}
[data-theme="dark"] .form-control::placeholder { color: #6b7280; }
[data-theme="dark"] .form-label { color: #d1d5db; }
[data-theme="dark"] .form-text { color: #9ca3af; }
[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* ===== Dark Mode: Tables ===== */
[data-theme="dark"] table,
[data-theme="dark"] .table { color: #e5e7eb; }
[data-theme="dark"] .table thead th { background: #262626; border-bottom-color: #333333; color: #9ca3af; }
[data-theme="dark"] .table tbody td { border-bottom-color: #2e2e2e; color: #e5e7eb; }
[data-theme="dark"] .table tbody tr:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .table > :not(caption) > * > * { background-color: transparent; border-bottom-color: #2e2e2e; }

/* ===== Dark Mode: Modal ===== */
[data-theme="dark"] .modal-content { background: #1e1e1e; border-color: #333333; color: #e5e7eb; }
[data-theme="dark"] .modal-header { border-bottom-color: #333333; }
[data-theme="dark"] .modal-footer { border-top-color: #333333; background: #111111; }
[data-theme="dark"] .modal-title { color: #e5e7eb; }
[data-theme="dark"] .modal-backdrop { background-color: rgba(0,0,0,0.75); }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ===== Dark Mode: Dropdown ===== */
[data-theme="dark"] .dropdown-menu { background: #252525; border-color: #333333; }
[data-theme="dark"] .dropdown-item { color: #e5e7eb; }
[data-theme="dark"] .dropdown-item:hover { background: #2e2e2e; color: #e5e7eb; }
[data-theme="dark"] .dropdown-divider { border-color: #333333; }

/* ===== Dark Mode: Alerts ===== */
[data-theme="dark"] .alert { background: #1e1e1e; border-color: #333333; color: #e5e7eb; }

/* ===== Dark Mode: Breadcrumb ===== */
[data-theme="dark"] .breadcrumb { background: transparent; }
[data-theme="dark"] .breadcrumb-item { color: #9ca3af; }
[data-theme="dark"] .breadcrumb-item.active { color: #d1d5db; }
[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: #6b7280; }

/* ===== Dark Mode: Lists/Nav ===== */
[data-theme="dark"] .list-group-item { background-color: #1e1e1e; color: #e5e7eb; border-color: #333333; }
[data-theme="dark"] .list-group-item:hover { background-color: #262626; }
[data-theme="dark"] .nav-pills .nav-link.active { background: #3b82f6; color: #ffffff; }

/* ===== Dark Mode: Accordion ===== */
[data-theme="dark"] .accordion-item { background-color: #1e1e1e; border-color: #333333; }
[data-theme="dark"] .accordion-button { background-color: #1e1e1e; color: #e5e7eb; }
[data-theme="dark"] .accordion-button:not(.collapsed) { background-color: #262626; color: #e5e7eb; box-shadow: inset 0 -1px 0 #333333; }

/* ===== Dark Mode: Progress ===== */
[data-theme="dark"] .progress { background-color: #2a2a2a; border-color: #333333; }
[data-theme="dark"] .progress-bar.bg-primary { background-color: #3b82f6 !important; color: white !important; }

/* ===== Dark Mode: Text utilities ===== */
[data-theme="dark"] .text-muted { color: #9ca3af !important; }
[data-theme="dark"] .text-dark { color: #e5e7eb !important; }
[data-theme="dark"] .text-secondary { color: #9ca3af !important; }
[data-theme="dark"] .text-success { color: #4ade80 !important; }
[data-theme="dark"] .text-info { color: #60a5fa !important; }
[data-theme="dark"] .text-danger { color: #f87171 !important; }
[data-theme="dark"] .text-warning { color: #fbbf24 !important; }
[data-theme="dark"] .text-primary { color: #60a5fa !important; }

/* ===== Dark Mode: Background utilities ===== */
[data-theme="dark"] .bg-light { background-color: #262626 !important; }
[data-theme="dark"] .bg-white { background-color: #1e1e1e !important; }
[data-theme="dark"] .bg-dark { background-color: #0a0a0a !important; }
[data-theme="dark"] .bg-secondary { background-color: #2a2a2a !important; color: #d1d5db !important; }

/* ===== Dark Mode: Borders/Dividers ===== */
[data-theme="dark"] hr { border-color: #333333; opacity: 1; }
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end { border-color: #333333 !important; }

/* ---------- Global Reset & Basics ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--muted-foreground);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--foreground); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--foreground);
}
.text-muted { color: var(--muted-foreground) !important; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--card);
    border-right: 1px solid var(--border);
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
.sidebar.collapsed {
    transform: translateX(-100%);
    border-right: none;
    overflow: hidden;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
}

body.sidebar-collapsed .topbar {
    left: 0;
}

.topbar .sidebar-toggle {
    display: inline-flex;
}

.sidebar-header {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--topbar-height);
}

.sidebar-brand {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.025em;
}

.sidebar-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-nav {
    padding: 0.75rem;
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.sidebar-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-foreground);
    padding: 1rem 0.75rem 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--foreground);
    transition: all var(--transition-speed);
    margin-bottom: 2px;
    font-weight: 500;
    text-decoration: none;
}

.sidebar-link:hover {
    background: rgba(59,130,246,0.16);
    color: var(--primary);
}

.sidebar-link.active {
    background: rgba(29,78,216,0.15);
    border-left: 3px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    opacity: 0.7;
}

.sidebar-link.active i {
    opacity: 1;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.25rem;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    display: none;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show { display: block; }

/* ---------- Topbar ---------- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1030;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--foreground);
    margin: 0;
}

.sidebar-toggle {
    display: inline-flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--foreground);
    border-radius: var(--radius);
}

.sidebar-toggle:hover {
    background: var(--accent);
}

/* ---------- Avatar ---------- */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* ---------- Main Content ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    width: calc(100vw - var(--sidebar-width));
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: clip;
    min-width: 0;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100vw;
}

/* ensure content can shrink on narrow screens */
@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        width: 100vw;
        overflow-x: auto;
    }
}
.main-content .content-wrapper {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    transition: max-width 0.3s ease;
}
/* ---------- Card Component ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08);
    transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.12);
    border-color: var(--accent);
}

.card-header {
    background: var(--muted);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.card-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* ---------- Button Component ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    transition: all var(--transition-speed);
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.5;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #1e40af;
    color: var(--primary-foreground);
    border-color: #1e40af;
}

[data-theme="light"] .btn-primary:hover {
    background: #1e40af;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--accent);
}

.btn-success {
    background: var(--success);
    color: var(--success-foreground);
    border-color: var(--success);
}

.btn-success:hover { 
    background: #16a34a;
    border-color: #16a34a;
}

.btn-warning {
    background: var(--warning);
    color: var(--warning-foreground);
    border-color: var(--warning);
}

.btn-warning:hover { 
    background: #d97706;
    border-color: #d97706;
}

.btn-danger, .btn-destructive {
    background: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}

.btn-danger:hover, .btn-destructive:hover { 
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-info {
    background: var(--info);
    color: var(--info-foreground);
    border-color: var(--info);
}

.btn-info:hover { 
    background: #0891b2;
    border-color: #0891b2;
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--border);
    color: var(--foreground);
}

.btn-outline-primary:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--border);
}

.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--muted-foreground);
}

.btn-outline-secondary:hover {
    background: var(--accent);
    color: var(--foreground);
}

.btn-outline-danger {
    background: transparent;
    border-color: var(--destructive);
    color: var(--destructive);
}

.btn-outline-danger:hover {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.btn-ghost {
    background: transparent;
    color: var(--foreground);
    border: none;
}

.btn-ghost:hover { background: var(--accent); }

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.625rem 1.5rem;
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
}

/* ---------- Input Component ---------- */
.form-control, .form-select {
    background: var(--background);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--foreground);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    line-height: 1.5;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
    outline: none;
    background: var(--background);
    color: var(--foreground);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 2px rgba(212, 212, 216, 0.15);
}

.form-control::placeholder {
    color: var(--muted-foreground);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--foreground);
}

.form-text {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.form-check-input {
    background-color: var(--background);
    border-color: var(--input);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* ---------- Badge Component ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid transparent;
    line-height: 1.5;
}

.badge-sm {
    font-size: 0.6875rem;
    padding: 0.1rem 0.5rem;
}

.bg-primary { background-color: var(--primary) !important; color: var(--primary-foreground) !important; }
.bg-secondary { background-color: var(--secondary) !important; color: var(--secondary-foreground) !important; }
.bg-success { background-color: var(--success) !important; color: var(--success-foreground) !important; }
.bg-danger { background-color: var(--destructive) !important; color: var(--destructive-foreground) !important; }
.bg-warning { background-color: var(--warning) !important; color: var(--warning-foreground) !important; }
.bg-info { background-color: var(--info) !important; color: var(--info-foreground) !important; }
.bg-dark { background-color: var(--primary) !important; color: var(--primary-foreground) !important; }

/* ---------- Table Component ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    color: var(--foreground);
}

.table thead th {
    background: var(--muted);
    padding: 0.75rem 1rem;
    font-weight: 500;
    text-align: left;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--foreground);
}

.table tbody tr {
    transition: background var(--transition-speed);
}

.table tbody tr:hover {
    background: var(--muted);
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: var(--border);
}

/* ---------- Progress Bar ---------- */
.progress {
    height: 1.75rem;
    border-radius: var(--radius);
    background-color: var(--muted);
    overflow: hidden;
    display: flex;
    border: 1px solid var(--border);
}

.progress-credits {
    height: 32px;
}

.progress-credits .progress-bar {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 28px;
    padding: 0 6px;
}

.progress-bar {
    font-weight: 500;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    transition: width 0.3s ease;
    color: white;
}

.progress-bar.bg-success { background-color: #16a34a !important; color: white !important; }
.progress-bar.bg-info { background-color: #3b82f6 !important; color: white !important; }
.progress-bar.bg-secondary { background-color: #94a3b8 !important; color: white !important; }
.progress-bar.bg-warning { background-color: #f59e0b !important; color: white !important; }
.progress-bar.bg-danger { background-color: #ef4444 !important; color: white !important; }
.progress-bar.bg-primary { background-color: #0f172a !important; color: white !important; }

[data-theme="dark"] .progress-bar.bg-primary { background-color: #fafafa !important; color: #18181b !important; }

.progress > .progress-bar:first-child { border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px) !important; }
.progress > .progress-bar:last-child { border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 !important; }
.progress > .progress-bar:only-child { border-radius: calc(var(--radius) - 1px) !important; }

.progress-bar-completed { background-color: var(--success); }
.progress-bar-ongoing { background-color: var(--warning); }
.progress-bar-planned { background-color: var(--info); }

/* ---------- Stats Card ---------- */
.stats-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stats-icon i { color: white; }
.stats-icon.bg-primary { background: var(--primary); }
.stats-icon.bg-success { background: var(--success); }
.stats-icon.bg-warning { background: var(--warning); }
.stats-icon.bg-danger { background: var(--destructive); }
.stats-icon.bg-info { background: var(--info); }

.stats-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--foreground);
}

.stats-label {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

/* ---------- Course Card ---------- */
.course-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background-color: var(--card);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.row.g-3 > [class*="col-"],
.row.g-4 > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.row.g-3 > [class*="col-"] > .course-card,
.row.g-4 > [class*="col-"] > .course-card {
    width: 100%;
    flex-grow: 1;
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--ring);
}

.course-card.selected {
    border-color: var(--primary);
    background-color: var(--accent);
    box-shadow: 0 0 0 2px var(--primary);
}

.course-card.selected .course-checkmark {
    display: flex;
}

.course-checkmark {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.course-card.completed {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.04);
    opacity: 0.7;
}

.course-card.planned {
    border-color: var(--info);
    background: rgba(59, 130, 246, 0.04);
}

.course-card.remaining {
    border-color: var(--border);
    background: var(--muted);
}

.course-card.ongoing {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.04);
}

.course-card.course-unavailable-term {
    opacity: 0.5;
    border-style: dashed;
    pointer-events: none;
}

.course-code {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--info);
    margin-bottom: 0.25rem;
}

.course-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

/* ---------- Icon Utilities ---------- */
.icon-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-circle i { color: white; font-size: 1rem; }
.icon-circle { background: var(--primary); }
.icon-circle.icon-success { background: var(--success); }
.icon-circle.icon-warning { background: var(--warning); }
.icon-circle.icon-danger { background: var(--destructive); }
.icon-circle.icon-info { background: var(--info); }

.icon-square {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-square i { color: white; font-size: 1rem; }
.icon-square { background: var(--primary); }
.icon-square.icon-primary { background: var(--primary); }
.icon-square.icon-success { background: var(--success); }
.icon-square.icon-warning { background: var(--warning); }
.icon-square.icon-danger { background: var(--destructive); }
.icon-square.icon-info { background: var(--info); }
.icon-square.icon-secondary { background: var(--muted-foreground); }

/* ---------- Logo ---------- */
.logo-img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

[data-theme="dark"] .alert-success {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.2);
    color: #86efac;
}

[data-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.2);
    color: #fde68a;
}

[data-theme="dark"] .alert-danger {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

[data-theme="dark"] .alert-info {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.2);
    color: #93c5fd;
}

/* ---------- Auth Pages ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8edf5 0%, #d0d9e8 50%, #bcc8db 100%);
    padding: 1rem;
    transition: background 0.3s ease;
}

[data-theme="dark"] .auth-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.auth-card {
    background: var(--card);
    border-radius: calc(var(--radius) * 2);
    box-shadow: var(--shadow-lg);
    max-width: 440px;
    width: 100%;
    padding: 2.5rem;
    animation: scaleIn 0.4s ease-out;
}

.auth-card .auth-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    overflow: hidden;
}

.auth-card .auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-card h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.separator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.separator::before, .separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---------- Modal ---------- */
.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    color: var(--foreground);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    background: transparent;
}

.modal-body {
    padding: 1.5rem;
    scroll-behavior: smooth;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    background: transparent;
}

.modal-title { color: var(--foreground); }

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ---------- Dropdown ---------- */
.dropdown-menu {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.25rem;
    min-width: 180px;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: calc(var(--radius) - 2px);
    transition: background var(--transition-speed);
    color: var(--foreground);
}

.dropdown-item:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.dropdown-divider { margin: 0.25rem 0; border-color: var(--border); }

/* ---------- Toast Notification ---------- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.app-toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
    min-width: 300px;
    max-width: 420px;
    pointer-events: all;
    display: block !important;
}

.app-toast.toast-success { border-left-color: #16a34a; }
.app-toast.toast-error,
.app-toast.toast-danger { border-left-color: #dc2626; }
.app-toast.toast-warning { border-left-color: #d97706; }
.app-toast.toast-info { border-left-color: #0284c7; }

.app-toast.hiding {
    animation: fadeOut 0.2s ease-out forwards;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-8px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-in { animation: fadeIn 0.3s ease-out both; }
.animate-slide-up { animation: slideUp 0.4s ease-out both; }
.animate-scale-in { animation: scaleIn 0.3s ease-out both; }

.stagger-children > * { animation: slideUp 0.4s ease-out both; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* ---------- Spinner ---------- */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ---------- Collapsible Sections ---------- */
.card-header[data-bs-toggle="collapse"],
h6[data-bs-toggle="collapse"] {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.card-header[data-bs-toggle="collapse"]:hover,
h6[data-bs-toggle="collapse"]:hover {
    opacity: 0.8;
}

.card-header[data-bs-toggle="collapse"] .fa-chevron-down,
h6[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s ease;
}

.card-header[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down,
h6[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.collapse { transition: height 0.35s ease; }
.collapsing { transition: height 0.35s ease; }

/* ---------- Score Display (Recommendations) ---------- */
.score-banner-card {
    border-color: var(--border);
}

.score-circle-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

/* ---------- Google OAuth Button ---------- */
.btn-google-oauth {
    background-color: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition-speed);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-google-oauth:hover {
    background-color: var(--accent);
    border-color: var(--ring);
    color: var(--foreground);
}

/* ---------- Dark Mode Course Card Overrides ---------- */
[data-theme="dark"] .course-card { background: #1e1e1e; border-color: #333333; }
[data-theme="dark"] .course-card:hover { border-color: #3b82f6; }
[data-theme="dark"] .course-card.selected { background-color: rgba(59,130,246,0.12); border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }
[data-theme="dark"] .course-card.completed { background: rgba(74,222,128,0.06); border-color: rgba(74,222,128,0.4); opacity: 0.8; }
[data-theme="dark"] .course-card.planned { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.4); }
[data-theme="dark"] .course-card.ongoing { background: rgba(251,191,36,0.06); border-color: rgba(251,191,36,0.4); }

/* ---------- Login legacy compat ---------- */
.login-container { display: none; }
.login-card { display: none; }
.login-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.25rem; color: var(--foreground); }
.login-subtitle { text-align: center; color: var(--muted-foreground); font-size: 0.875rem; margin-bottom: 2rem; }
.login-footer-text { color: var(--muted-foreground); font-size: 0.8125rem; }
.login-icon-wrapper { width: 56px; height: 56px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.login-icon-wrapper img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .topbar {
        left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {
    :root {
        --topbar-height: 52px;
    }

    .main-content .content-wrapper {
        padding: 1rem;
    }

    .topbar {
        padding: 0 0.75rem;
        height: 52px;
    }

    .topbar-title {
        font-size: 0.875rem;
    }

    .topbar-right {
        gap: 0.375rem;
    }

    .sidebar-brand {
        font-size: 0.8125rem;
    }

    .sidebar-link {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.625rem;
        gap: 0.5rem;
    }

    .sidebar-link i {
        font-size: 0.8125rem;
        width: 16px;
    }

    .sidebar-section-title {
        font-size: 0.625rem;
    }

    .card-header { padding: 0.75rem 1rem; }
    .card-body { padding: 1rem; }
    .card-title { font-size: 0.9375rem; }
    .card-description { font-size: 0.8125rem; }

    .stats-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9375rem;
    }
    .stats-value { font-size: 1.375rem; }
    .stats-label { font-size: 0.75rem; }

    .course-card { padding: 0.75rem; }
    .course-title { font-size: 0.875rem; }
    .course-code { font-size: 0.75rem; }

    h1 { font-size: 1.125rem; }
    h2 { font-size: 1rem; }
    h3 { font-size: 0.9375rem; }
    h5 { font-size: 0.9375rem; }
    h6 { font-size: 0.875rem; }

    /* Badge sizing */
    .badge {
        font-size: 0.6875rem;
        padding: 0.1rem 0.5rem;
    }

    /* Progress bars */
    .progress { height: 1.375rem; }
    .progress-credits { height: 26px; }
    .progress-credits .progress-bar {
        font-size: 0.75rem;
        min-width: 22px;
    }
    .progress-bar { font-size: 0.75rem; }

    /* Table */
    .table { font-size: 0.8125rem; }
    .table thead th {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    .table tbody td { padding: 0.5rem 0.75rem; }

    /* Buttons */
    .btn-lg { font-size: 0.875rem; padding: 0.5rem 1.25rem; }

    /* Form elements */
    .form-control, .form-select {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.625rem;
    }
    .form-label { font-size: 0.8125rem; }

    /* Score circle */
    .score-circle-large {
        width: 52px;
        height: 52px;
    }
    .score-value { font-size: 1.125rem; }

    /* Icon utilities */
    .icon-circle, .icon-square {
        width: 2rem;
        height: 2rem;
    }
    .icon-circle i, .icon-square i { font-size: 0.875rem; }

    /* Toast */
    .toast-container {
        top: 52px;
        bottom: auto;
        left: 1rem;
        right: 1rem;
    }
    .app-toast {
        min-width: auto;
        max-width: 100%;
        padding: 0.5rem 0.625rem;
        font-size: 0.8rem;
    }

    /* Alert */
    .alert { font-size: 0.8125rem; padding: 0.625rem 0.875rem; }

    /* Empty state */
    .empty-state { padding: 1.5rem 1rem; }

    /* Dropdown */
    .dropdown-item { font-size: 0.8125rem; padding: 0.4375rem 0.625rem; }
}

@media (max-width: 575.98px) {
    :root {
        --topbar-height: 48px;
    }

    .main-content .content-wrapper {
        padding: 0.75rem;
    }

    .topbar { padding: 0 0.625rem; height: 48px; }
    .topbar-right { gap: 0.25rem; }

    .btn { font-size: 0.8125rem; padding: 0.375rem 0.75rem; }
    .btn-sm { font-size: 0.75rem; padding: 0.3125rem 0.625rem; }
    .btn-icon { width: 2rem; height: 2rem; }

    .modal-dialog { margin: 0.5rem; }
    .modal-body { padding: 1rem; scroll-behavior: smooth; }
    .modal-header { padding: 0.875rem 1rem; }
    .modal-footer { padding: 0.75rem 1rem; }

    .badge { font-size: 0.625rem; padding: 0.0875rem 0.4rem; }

    h1 { font-size: 1rem; }
    h2 { font-size: 0.9375rem; }
    h3 { font-size: 0.875rem; }
    h5 { font-size: 0.875rem; }
    h6 { font-size: 0.8125rem; }

    .stats-icon { width: 2rem; height: 2rem; font-size: 0.875rem; }
    .stats-value { font-size: 1.25rem; }
    .stats-label { font-size: 0.6875rem; }

    .card-header { padding: 0.625rem 0.75rem; }
    .card-body { padding: 0.75rem; }
    .card-title { font-size: 0.875rem; }

    .form-control, .form-select {
        font-size: 0.8125rem;
        padding: 0.375rem 0.5625rem;
    }

    .sidebar-link { font-size: 0.75rem; padding: 0.375rem 0.5rem; gap: 0.375rem; }
    .sidebar-brand { font-size: 0.75rem; }
    .sidebar-section-title { font-size: 0.5625rem; }

    /* Toast - ultra-compact for small phones */
    .toast-container {
        top: 48px;
        left: 0.5rem;
        right: 0.5rem;
        gap: 0.25rem;
    }
    .app-toast {
        min-width: auto;
        max-width: 100%;
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        border-radius: 4px;
    }

    /* Login page: card fills the screen, no parent wrapper visible */
    .auth-wrapper {
        padding: 0;
        background: transparent;
        align-items: stretch;
    }
    .auth-card {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
        padding: 2rem 1.25rem;
        box-shadow: none;
    }
}

/* ---------- Print ---------- */
@media print {
    .sidebar, .topbar, .sidebar-overlay, .toast-container { display: none !important; }
    .main-content { margin-left: 0 !important; padding-top: 0 !important; }
    body { background: white !important; color: black !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ---------- Utility Overrides ---------- */
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.border-info { border-color: var(--info) !important; }
.border-warning { border-color: var(--warning) !important; }
.border-success { border-color: var(--success) !important; }
.border-danger { border-color: var(--destructive) !important; }

/* Ensure card body subsection headers look right */
.card-body h6 {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--foreground);
    padding-bottom: 0.5rem;
}

/* Tooltip override */
.tooltip-inner {
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    border-radius: var(--radius);
    padding: 0.375rem 0.625rem;
}

/* Status dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.active { background: var(--success); }
.status-dot.inactive { background: var(--muted-foreground); }
.status-dot.warning { background: var(--warning); }

/* Selected-course remove button in planner summary */
.selected-course-remove-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
}
.selected-course-remove-btn:hover,
.selected-course-remove-btn:focus {
    transform: scale(1.1);
    background-color: rgba(220, 38, 38, 0.2);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
    opacity: 1;
}
.selected-course-remove-btn i {
    font-size: 0.7rem;
}

/* Selection area highlighting */
::selection {
    background-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] ::selection {
    background-color: rgba(96, 165, 250, 0.3);
}

/* Card subsection header text color - important for dark theme */
[data-theme="dark"] .card-body h6 {
    color: var(--muted-foreground);
}

/* Pagination */
.page-link {
    background: var(--card);
    border-color: var(--border);
    color: var(--foreground);
    border-radius: var(--radius);
}

.page-link:hover {
    background: var(--accent);
    color: var(--foreground);
}
    
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--muted-foreground);
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

/* Score banner card compatibility */
.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navbar compatibility - the old .navbar class is still used on mobile offcanvas */
.navbar { display: none; }

/* Offcanvas overrides for dark mode */
[data-theme="dark"] .offcanvas {
    background: var(--card);
    color: var(--foreground);
    border-right: 1px solid var(--border);
}

[data-theme="dark"] .offcanvas .border-bottom,
[data-theme="dark"] .offcanvas .border-top {
    border-color: var(--border) !important;
}

/* Fix Bootstrap color overrides in dark mode */
[data-theme="dark"] label { color: var(--foreground); }
[data-theme="dark"] strong, [data-theme="dark"] b { color: inherit; }
[data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] div { color: inherit; }
