/* ==========================================================================
   TASK SCHEDULER - COMPLETE DESIGN SYSTEM & STYLESHEET
   Supports Light & Dark Modes, Universal Responsive Scaling across All Devices,
   Settings Menu, Mobile Drawer, Touch Ergonomics, and Fluid Layouts
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & Color Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand Primary & Accents */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    --primary-rgb: 37, 99, 235;
    --secondary: #6366f1;
    --secondary-hover: #4f46e5;
    
    /* Semantic Feedback Colors */
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    --info: #0284c7;
    --info-light: #f0f9ff;

    /* Theme Surfaces & Layout (Light Mode Default) */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --border-color-light: #f1f5f9;
    --border-color-focus: #2563eb;

    /* Typography Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --dark: #0f172a;

    /* Gray Scale */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;

    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -4px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 30px -6px rgba(0, 0, 0, 0.12), 0 8px 12px -4px rgba(0, 0, 0, 0.08);

    /* Transitions & Fonts */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --navbar-height: 70px;
}

/* --------------------------------------------------------------------------
   2. Dark Theme Palette Overrides
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
    --bg-body: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1e293b;
    --bg-subtle: #192231;
    --bg-input: #1a2234;
    --border-color: #27354a;
    --border-color-light: #1e293b;
    --border-color-focus: #3b82f6;

    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    --dark: #f8fafc;

    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.16);
    --primary-border: rgba(59, 130, 246, 0.35);

    --success: #34d399;
    --success-light: rgba(16, 185, 129, 0.16);
    --success-border: rgba(16, 185, 129, 0.35);

    --warning: #fbbf24;
    --warning-light: rgba(245, 158, 11, 0.16);
    --warning-border: rgba(245, 158, 11, 0.35);

    --danger: #f87171;
    --danger-light: rgba(239, 68, 68, 0.16);
    --danger-border: rgba(239, 68, 68, 0.35);

    --info: #38bdf8;
    --info-light: rgba(2, 132, 199, 0.16);

    --gray-50: #0b0f19;
    --gray-100: #1e293b;
    --gray-200: #27354a;
    --gray-300: #334155;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.65);
}

/* --------------------------------------------------------------------------
   3. Global Reset & Base Elements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

img, svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1.25rem, 4vw, 2rem);
    padding-right: clamp(1.25rem, 4vw, 2rem);
}

.page-container {
    width: 100%;
    padding-top: 0.25rem;
    padding-bottom: 2rem;
}

.main-content {
    flex: 1;
    padding: clamp(1.25rem, 3vw, 2.5rem) 0;
    width: 100%;
}

/* --------------------------------------------------------------------------
   4. Universal Header & Navigation
   -------------------------------------------------------------------------- */
.navbar-wrapper {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
    user-select: none;
    flex-shrink: 0;
}

.brand-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Quick Theme Toggle Button */
.btn-theme-quick {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    padding: 0;
    flex-shrink: 0;
}

.btn-theme-quick:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    transform: rotate(15deg) scale(1.05);
}

.btn-theme-quick .theme-icon-light {
    display: none;
}

.btn-theme-quick .theme-icon-dark {
    display: inline-block;
}

[data-theme="dark"] .btn-theme-quick .theme-icon-light {
    display: inline-block;
}

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

/* Settings Dropdown Wrapper */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.btn-user-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.75rem 0.35rem 0.4rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-user-dropdown:hover, .btn-user-dropdown[aria-expanded="true"] {
    background: var(--primary-light);
    border-color: var(--primary-border);
}

.user-avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
}

.user-name-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-chevron {
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.btn-user-dropdown[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu Popover */
.dropdown-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 270px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem 0;
    z-index: 150;
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.dropdown-popover.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-user-header {
    padding: 0.6rem 1rem 0.75rem;
}

.dropdown-user-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-user-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.4rem;
}

.badge-success-subtle {
    display: inline-block;
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.4rem 0;
}

.dropdown-link, .dropdown-item-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition-fast);
    text-decoration: none;
    cursor: pointer;
}

.dropdown-link:hover, .dropdown-link.active {
    background: var(--bg-subtle);
    color: var(--primary);
}

.dropdown-link-danger {
    color: var(--danger);
}

.dropdown-link-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.dropdown-link-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.dropdown-item-toggle {
    justify-content: space-between;
}

.toggle-label-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Mobile Actions & Hamburger */
.mobile-nav-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 38px;
    height: 38px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 7px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.hamburger-btn.active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    z-index: 210;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    overflow-y: auto;
}

.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-close {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.mobile-user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-subtle);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.mobile-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.mobile-user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-menu-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding: 0 0.25rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.925rem;
    text-decoration: none;
    transition: background var(--transition-fast);
}

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

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

.mobile-theme-item {
    justify-content: space-between;
}

.mobile-drawer-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   5. Interactive Toggle Switches
   -------------------------------------------------------------------------- */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--gray-300);
    transition: var(--transition-base);
    border-radius: 34px;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: var(--transition-base);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .switch-slider {
    background-color: var(--primary);
}

input:checked + .switch-slider::before {
    transform: translateX(22px);
}

.switch-toggle.switch-sm {
    width: 40px;
    height: 22px;
}

.switch-toggle.switch-sm .switch-slider::before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
}

.switch-toggle.switch-sm input:checked + .switch-slider::before {
    transform: translateX(18px);
}

/* --------------------------------------------------------------------------
   6. Buttons & UI Elements
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
    min-height: 42px;
    line-height: 1.2;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    min-height: 36px;
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1.05rem;
    min-height: 48px;
    border-radius: var(--radius-md);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

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

[data-theme="dark"] .btn-outline {
    border-color: var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .btn-outline:hover {
    border-color: var(--primary);
    color: #93c5fd;
    background-color: var(--primary-light);
}

.btn-outline-danger {
    background-color: transparent;
    border-color: var(--danger-border);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background-color: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

[data-theme="dark"] .btn-outline-danger {
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

[data-theme="dark"] .btn-outline-danger:hover {
    border-color: #ef4444;
    color: #fca5a5;
    background-color: rgba(239, 68, 68, 0.2);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    opacity: 0.9;
    color: #ffffff;
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-pending {
    background-color: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-in_progress {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

.badge-completed {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-priority-high {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-priority-medium {
    background-color: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-priority-low {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Dark mode high-contrast badge overrides */
[data-theme="dark"] .badge-pending {
    color: #fcd34d;
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .badge-in_progress {
    color: #93c5fd;
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .badge-completed {
    color: #6ee7b7;
    background-color: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .badge-priority-high {
    color: #fca5a5;
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .badge-priority-medium {
    color: #fcd34d;
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .badge-priority-low {
    color: #cbd5e1;
    background-color: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.925rem;
    border: 1px solid transparent;
}

.alert-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.alert-text {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background-color: var(--success-light);
    color: #065f46;
    border-color: var(--success-border);
}

[data-theme="dark"] .alert-success {
    color: #6ee7b7;
}

.alert-danger {
    background-color: var(--danger-light);
    color: #991b1b;
    border-color: var(--danger-border);
}

[data-theme="dark"] .alert-danger {
    color: #fca5a5;
}

.alert-warning {
    background-color: var(--warning-light);
    color: #92400e;
    border-color: var(--warning-border);
}

[data-theme="dark"] .alert-warning {
    color: #fcd34d;
}

.alert-info {
    background-color: var(--info-light);
    color: #075985;
    border-color: #bae6fd;
}

[data-theme="dark"] .alert-info {
    color: #7dd3fc;
}

.dev-otp-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background-color: #fef08a;
    color: #854d0e;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

[data-theme="dark"] .dev-otp-banner {
    background-color: rgba(245, 158, 11, 0.16);
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.dev-badge {
    background: #854d0e;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

[data-theme="dark"] .dev-badge {
    background: #d97706;
    color: #0f172a;
}

.dev-otp-code {
    background: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.1em;
}

[data-theme="dark"] .dev-otp-code {
    background: #1e293b;
    color: #fef08a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* OTP Cooldown Timer Notice */
.otp-timer-notice {
    font-size: 0.85rem;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}

[data-theme="dark"] .otp-timer-notice {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.35);
}

/* --------------------------------------------------------------------------
   7. Forms & Inputs
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.7rem 0.95rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* High-contrast placeholders across light & dark themes */
input::placeholder, textarea::placeholder {
    color: var(--text-light);
    opacity: 0.85;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
    opacity: 0.85;
}

[data-theme="dark"] select option {
    background-color: #1e293b;
    color: #f8fafc;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Form Row Grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Strength Meter */
.strength-meter-container {
    margin-top: 0.5rem;
}

.meter-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.meter-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rule-item.valid {
    color: var(--success);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Auth Pages (Login, Register, OTP, Credentials)
   -------------------------------------------------------------------------- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(0.75rem, 2.5vw, 1.5rem);
    min-height: calc(100vh - var(--navbar-height) - 180px);
    width: 100%;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-card-wide {
    max-width: 520px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-header h1 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.auth-header p {
    font-size: 0.925rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.otp-input {
    letter-spacing: clamp(0.2em, 2.5vw, 0.45em);
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    text-align: center;
}

.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   9. Landing Page (index.html & index.php)
   -------------------------------------------------------------------------- */
.hero-section {
    padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
    text-align: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-pill);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.1rem, 5.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2.25rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.features-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.step-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
}

.step-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.4;
    display: block;
    margin-bottom: 0.5rem;
}

.step-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   10. Dashboard & Study Records
   -------------------------------------------------------------------------- */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-title h1 {
    font-size: clamp(1.4rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.dashboard-title p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.progress-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.progress-title {
    font-weight: 700;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-main);
}

.progress-percent {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--primary);
}

.progress-bar-bg {
    height: 12px;
    background: var(--border-color-light);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-pill);
    transition: width 0.6s ease;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon-blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-amber { background: var(--warning-light); color: var(--warning); }
.stat-icon-indigo { background: rgba(99, 102, 241, 0.15); color: var(--secondary); }
.stat-icon-green { background: var(--success-light); color: var(--success); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Dashboard Main 2-Column Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.dashboard-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1.5rem;
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Task Cards & Lists */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.task-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.task-item:hover {
    border-color: var(--primary-border);
    transform: translateX(2px);
}

.task-item-main {
    flex: 1;
    min-width: 0;
}

.task-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    word-break: break-word;
}

.task-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.task-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Filter Card */
.filter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

/* Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.925rem;
    min-width: 640px;
}

.task-table th {
    background: var(--bg-subtle);
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.825rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
}

.task-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.task-table tr:last-child td {
    border-bottom: none;
}

.task-table tr:hover td {
    background-color: var(--primary-light);
}

.task-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.task-title.is-completed {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.8;
}

[data-theme="dark"] .task-title.is-completed {
    color: var(--text-muted);
    opacity: 0.75;
}

.task-subject {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .task-subject {
    color: #93c5fd;
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.task-desc {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.task-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filters-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}


/* --------------------------------------------------------------------------
   11. Settings Page (`settings.php`)
   -------------------------------------------------------------------------- */
.settings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.settings-nav-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--navbar-height) + 1.5rem);
}

.settings-user-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.settings-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.settings-user-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.settings-user-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

.settings-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.95rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.settings-menu-item:hover, .settings-menu-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.settings-menu-logout {
    color: var(--danger);
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

.settings-menu-logout:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.settings-menu-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.settings-content-area {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.settings-section-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.section-card-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
}

.section-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-stats-pill-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}

.pill-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    display: flex;
    flex-direction: column;
}

.pill-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pill-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.settings-form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* Theme Setting Control */
.theme-setting-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.theme-setting-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.theme-setting-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.theme-setting-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-status-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.theme-preview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.theme-preview-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
}

.theme-preview-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.preview-box {
    border-radius: var(--radius-sm);
    height: 80px;
    margin-bottom: 0.75rem;
    border: 1px solid #cbd5e1;
    overflow: hidden;
}

.preview-light { background: #f8fafc; }
.preview-light .preview-header { height: 16px; background: #ffffff; border-bottom: 1px solid #e2e8f0; }
.preview-light .preview-content { padding: 8px; }
.preview-light .preview-line { height: 6px; background: #e2e8f0; border-radius: 3px; margin-bottom: 6px; width: 80%; }
.preview-light .preview-line.short { width: 50%; }

.preview-dark { background: #0b0f19; border-color: #334155; }
.preview-dark .preview-header { height: 16px; background: #111827; border-bottom: 1px solid #334155; }
.preview-dark .preview-content { padding: 8px; }
.preview-dark .preview-line { height: 6px; background: #334155; border-radius: 3px; margin-bottom: 6px; width: 80%; }
.preview-dark .preview-line.short { width: 50%; }

.preview-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.session-info-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.session-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--success);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 0 3px var(--success-border);
}

.logout-action-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
}

/* --------------------------------------------------------------------------
   12. Modals
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer-wrapper {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: clamp(2rem, 4vw, 3.5rem) 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.6;
    max-width: 420px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links li, .footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. Comprehensive Media Queries (Universal Responsive Scaling)
   -------------------------------------------------------------------------- */

/* Large Desktops & Wide Screens (>= 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1240px;
    }
}

/* Laptops & Tablets Landscape (<= 1024px) */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-layout {
        grid-template-columns: 240px 1fr;
        gap: 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-col:first-child {
        grid-column: span 2;
    }
}

/* Tablets Portrait & Large Phones (<= 860px) */
@media (max-width: 860px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav-card {
        position: static;
    }

    .settings-menu-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .settings-menu-item {
        flex: 1;
        min-width: 140px;
        justify-content: center;
        border: 1px solid var(--border-color);
    }

    .settings-menu-logout {
        margin-top: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 0.7rem;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    /* Hide desktop nav, reveal mobile actions */
    .desktop-nav {
        display: none !important;
    }

    .mobile-nav-actions {
        display: flex;
    }

    .navbar {
        height: 60px;
    }

    :root {
        --navbar-height: 60px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .theme-preview-cards {
        grid-template-columns: 1fr;
    }

    .logout-action-box {
        flex-direction: column;
        align-items: stretch;
    }

    .logout-action-box .btn {
        width: 100%;
    }

    /* Mobile Task Card Layout on <= 768px */
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .task-item-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.5rem;
        border-top: 1px dashed var(--border-color);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-col:first-child {
        grid-column: span 1;
    }
}

/* Small Phones & Compact Displays (<= 480px) */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions .btn {
        width: 100%;
    }

    .container {
        padding-left: clamp(0.875rem, 3.5vw, 1.25rem);
        padding-right: clamp(0.875rem, 3.5vw, 1.25rem);
    }

    .auth-wrapper {
        padding: 1.25rem 0.5rem;
    }

    .auth-card {
        padding: 1.25rem 1rem;
        border-radius: var(--radius-md);
    }

    .settings-menu-item {
        min-width: 100%;
    }

    .modal-overlay {
        padding: 0.75rem 0.5rem;
    }

    .modal-dialog {
        max-height: calc(100vh - 1.5rem);
        border-radius: var(--radius-md);
        margin: 0.75rem auto;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 0.875rem 1rem;
    }
}

/* --------------------------------------------------------------------------
   14. On-Time Task Completion Streak & Approaching Deadline Highlighting
   -------------------------------------------------------------------------- */

/* Streak Card */
.streak-card {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(239, 68, 68, 0.08));
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .streak-card {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(239, 68, 68, 0.12));
    border-color: rgba(249, 115, 22, 0.4);
}

.streak-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.streak-flame {
    font-size: 2.2rem;
    line-height: 1;
    display: inline-block;
    animation: flamePulse 2s infinite ease-in-out;
}

@keyframes flamePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.streak-count-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.streak-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.streak-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.825rem;
    background: #f97316;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
    white-space: nowrap;
}

/* Approaching Deadline Table Row Highlighting */
.task-table tr.deadline-urgent td {
    background-color: rgba(239, 68, 68, 0.08);
}

.task-table tr.deadline-urgent td:first-child {
    border-left: 4px solid var(--danger);
}

.task-table tr.deadline-soon td {
    background-color: rgba(245, 158, 11, 0.08);
}

.task-table tr.deadline-soon td:first-child {
    border-left: 4px solid var(--warning);
}

.task-table tr.deadline-overdue td {
    background-color: rgba(239, 68, 68, 0.06);
}

.task-table tr.deadline-overdue td:first-child {
    border-left: 4px solid #b91c1c;
}

[data-theme="dark"] .task-table tr.deadline-urgent td {
    background-color: rgba(239, 68, 68, 0.16);
}

[data-theme="dark"] .task-table tr.deadline-soon td {
    background-color: rgba(245, 158, 11, 0.14);
}

[data-theme="dark"] .task-table tr.deadline-overdue td {
    background-color: rgba(239, 68, 68, 0.12);
}

.badge-deadline-urgent {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-weight: 700;
    animation: urgentPulse 1.8s infinite ease-in-out;
}

[data-theme="dark"] .badge-deadline-urgent {
    color: #fca5a5;
    background-color: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.45);
}

.badge-deadline-soon {
    background-color: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-weight: 700;
}

[data-theme="dark"] .badge-deadline-soon {
    color: #fde68a;
    background-color: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.45);
}

@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

/* Approaching Deadline Alert Banner */
.deadline-alert-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.deadline-alert-banner-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.925rem;
    color: var(--text-main);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   16. Sequential Status, Study Timer & Celebration Styles
   -------------------------------------------------------------------------- */
.btn-start-task {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff !important;
    border: 1px solid #4338ca;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.btn-start-task:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-complete-task {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border: 1px solid #059669;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    transition: all 0.2s ease;
}

.btn-complete-task:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

/* Task Study Timer Widget */
.task-timer-widget {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.35rem;
    padding: 0.3rem 0.55rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-sm);
    color: #1e40af;
    font-size: 0.775rem;
    font-weight: 600;
    max-width: 175px;
}

[data-theme="dark"] .task-timer-widget {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: -0.01em;
}

.timer-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

[data-theme="dark"] .timer-progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.timer-progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 9999px;
    transition: width 1s linear;
}

[data-theme="dark"] .timer-progress-bar {
    background: #60a5fa;
}

.task-timer-widget.timer-completed {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #065f46;
}

[data-theme="dark"] .task-timer-widget.timer-completed {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.task-timer-widget.timer-completed .timer-progress-bar {
    background: #10b981;
}

/* 1-Minute Anti-Accidental Click Shield */
.shield-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    color: #92400e;
    font-size: 0.775rem;
    font-weight: 700;
    cursor: not-allowed;
    user-select: none;
    white-space: nowrap;
}

[data-theme="dark"] .shield-lock-badge {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fde68a;
}

.shield-seconds {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
}

.complete-btn-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Hours & Minutes Study Time Dropdowns */
.time-dropdown-wrapper {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    width: 100%;
}

.time-dropdown-col {
    flex: 1;
    min-width: 0;
}

.time-dropdown-col .form-select {
    width: 100%;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Celebration & Motivational Modal */
.celebration-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(5, 9, 20, 0.82);
}

.celebration-dialog {
    position: relative;
    max-width: 550px;
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: #ffffff;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 40px rgba(245, 158, 11, 0.18);
    overflow: hidden;
    text-align: center;
    animation: celebrationPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .celebration-dialog {
    background: #0f172a;
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.85), 0 0 50px rgba(245, 158, 11, 0.22);
}

@keyframes celebrationPop {
    0% { transform: scale(0.88) translateY(24px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Canvas Confetti */
.celebration-confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.celebration-header {
    position: relative;
    padding: 2.25rem 2rem 1.25rem;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-bottom: 1px solid var(--border-color);
    z-index: 6;
}

[data-theme="dark"] .celebration-header {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.16) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom-color: #334155;
}

.celebration-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #d97706 100%);
    background-size: 200% auto;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 9999px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
    margin-bottom: 0.85rem;
    animation: badgeShimmer 3s ease-in-out infinite;
}

.celebration-badge-top.celebration-badge-standard {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #4338ca 100%);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

@keyframes badgeShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.badge-sparkle-dot {
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #ffffff;
    display: inline-block;
    animation: sparklePulse 1.5s infinite;
}

@keyframes sparklePulse {
    0%, 100% { transform: scale(0.8); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
}

.celebration-icon-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.celebration-icon-halo {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.32) 0%, rgba(245, 158, 11, 0.08) 50%, transparent 70%);
    animation: haloPulse 2.4s ease-in-out infinite alternate;
}

@keyframes haloPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 1; }
}

.celebration-icon {
    font-size: 3.5rem;
    position: relative;
    z-index: 2;
    animation: celebrationBounce 2s infinite ease-in-out;
}

@keyframes celebrationBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-7px) scale(1.06); }
}

.celebration-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    letter-spacing: -0.015em;
}

.celebration-sub {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
    padding: 0 0.5rem;
}

.student-name-highlight {
    color: #d97706;
    font-weight: 800;
}

[data-theme="dark"] .student-name-highlight {
    color: #fbbf24;
}

.celebration-body {
    position: relative;
    z-index: 6;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    text-align: left;
}

/* Completed Task Record Card */
.celebration-task-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .celebration-task-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.celebration-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.celebration-task-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
}

[data-theme="dark"] .celebration-task-badge {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.celebration-status-pill {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #047857;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
}

[data-theme="dark"] .celebration-status-pill {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.45);
}

.celebration-task-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 0.85rem;
}

.celebration-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    text-align: center;
}

.celebration-stat {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.4rem;
    transition: transform 0.2s ease;
}

[data-theme="dark"] .celebration-stat {
    background: #0f172a;
    border-color: #334155;
}

.celebration-stat .stat-icon {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.15rem;
}

.celebration-stat .stat-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.2;
}

.celebration-stat .stat-lbl {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.2rem;
}

.celebration-stat.stat-highlight {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.celebration-stat.stat-highlight .stat-num {
    color: #047857;
}

.celebration-stat.stat-highlight .stat-lbl {
    color: #065f46;
}

[data-theme="dark"] .celebration-stat.stat-highlight {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .celebration-stat.stat-highlight .stat-num {
    color: #34d399;
}

[data-theme="dark"] .celebration-stat.stat-highlight .stat-lbl {
    color: #6ee7b7;
}

.celebration-stat.stat-complete {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.celebration-stat.stat-complete .stat-num {
    color: #4338ca;
}

[data-theme="dark"] .celebration-stat.stat-complete {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
}

[data-theme="dark"] .celebration-stat.stat-complete .stat-num {
    color: #a5b4fc;
}

/* Motivational Quote Card */
.motivational-quote-card {
    position: relative;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(99, 102, 241, 0.06) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    padding: 1.15rem 1.35rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .motivational-quote-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-color: rgba(245, 158, 11, 0.35);
    border-left-color: #fbbf24;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.quote-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.quote-sparkle {
    font-size: 0.85rem;
}

.quote-card-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #d97706;
}

[data-theme="dark"] .quote-card-label {
    color: #fbbf24;
}

.quote-mark {
    position: absolute;
    top: 0.35rem;
    right: 0.85rem;
    font-size: 3.25rem;
    line-height: 1;
    color: #f59e0b;
    opacity: 0.2;
    font-family: Georgia, serif;
    pointer-events: none;
}

.quote-text {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
    line-height: 1.6;
    font-weight: 600;
    font-style: italic;
    color: var(--text-main);
}

[data-theme="dark"] .quote-text {
    color: #f1f5f9;
}

.quote-author-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.quote-line {
    flex: 1;
    height: 1px;
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .quote-line {
    background: rgba(251, 191, 36, 0.25);
}

.quote-author {
    display: inline-block;
    font-size: 0.825rem;
    font-weight: 700;
    color: #4338ca;
    font-style: normal;
    text-align: right;
}

[data-theme="dark"] .quote-author {
    color: #a5b4fc;
}

/* Celebration Footer CTA */
.celebration-footer {
    position: relative;
    z-index: 6;
    padding: 1rem 1.75rem 1.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

[data-theme="dark"] .celebration-footer {
    border-top-color: #334155;
}

.btn-celebration-cta {
    width: 100%;
    padding: 0.9rem 1.75rem;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-celebration-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(217, 119, 6, 0.5);
}

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

@media (max-width: 480px) {
    .celebration-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    .celebration-header {
        padding: 1.75rem 1.25rem 1rem;
    }
    .celebration-body {
        padding: 1.25rem 1rem;
    }
    .celebration-stats-row {
        gap: 0.4rem;
    }
    .celebration-stat .stat-num {
        font-size: 1rem;
    }
    .celebration-footer {
        padding: 0.85rem 1.25rem 1.25rem;
    }
}


