/**
 * KalviYogi Student Life OS - Premium Design System
 * BLACK & GOLD Theme with Professional Icons
 */

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ======================================== */

:root {
    /* Primary Colors - BLACK & GOLD Theme */
    --color-primary: #0D0D0D;
    --color-primary-dark: #000000;
    --color-primary-light: #1A1A1A;

    /* Gold Accent - Premium */
    --color-accent: #D4AF37;
    --color-accent-light: #F4D03F;
    --color-accent-dark: #B8960C;
    --color-accent-glow: rgba(212, 175, 55, 0.5);

    /* Teal Secondary (subtle accent) */
    --color-secondary: #1B4965;
    --color-secondary-light: #2C7DA0;

    /* Glassmorphism Colors */
    --glass-bg: rgba(13, 13, 13, 0.85);
    --glass-border: rgba(212, 175, 55, 0.15);
    --glass-highlight: rgba(212, 175, 55, 0.1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
    --gradient-accent: linear-gradient(135deg, #D4AF37 0%, #F4D03F 50%, #D4AF37 100%);
    --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #B8960C 100%);
    --gradient-dark: linear-gradient(180deg, #000000 0%, #0D0D0D 50%, #1A1A1A 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    --gradient-card: linear-gradient(145deg, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0) 100%);

    /* Background Colors - Pure Black */
    --color-bg: #000000;
    --color-bg-elevated: #0A0A0A;
    --color-bg-card: #0D0D0D;
    --color-bg-input: #141414;
    --color-border: rgba(212, 175, 55, 0.12);
    --color-border-light: rgba(212, 175, 55, 0.25);

    /* Text Colors */
    --color-text: #FFFFFF;
    --color-text-secondary: #C0C0C0;
    --color-text-muted: #808080;
    --color-text-inverse: #000000;

    /* Semantic Colors - Mixed with Gold */
    --color-success: #2ECC71;
    --color-success-glow: rgba(46, 204, 113, 0.3);
    --color-warning: #F39C12;
    --color-warning-glow: rgba(243, 156, 18, 0.3);
    --color-error: #E74C3C;
    --color-error-glow: rgba(231, 76, 60, 0.3);
    --color-info: #3498DB;
    --color-info-glow: rgba(52, 152, 219, 0.3);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing (8pt Grid) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* Shadows - Gold Glow */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 40px rgba(212, 175, 55, 0.3);
    --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.4);
    --shadow-inner: inset 0 1px 0 0 rgba(212, 175, 55, 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --header-height: 64px;
    --nav-height: 76px;
    --max-width: 480px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* ========================================
   BASE STYLES
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium gold ambient glow */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Gold border frame */
body::after {
    content: '';
    position: fixed;
    inset: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius-xl);
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 60px rgba(212, 175, 55, 0.05);
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* Global Form Element Styling - Enforce Dark Theme */
input,
select,
textarea {
    background: var(--color-bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    color: var(--color-text);
    transition: all var(--transition-normal);
    width: 100%;
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23D4AF37' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

select option {
    background: var(--color-bg-card);
    color: var(--color-text);
    padding: var(--space-2);
}

/* Checkbox and Radio - Custom Styling */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    padding: 0;
    cursor: pointer;
    accent-color: var(--color-accent);
}

/* Date and Time inputs */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7) sepia(1) saturate(5) hue-rotate(10deg);
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

/* Selection */
::selection {
    background: var(--color-accent);
    color: var(--color-text-inverse);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-semibold);
    z-index: 10000;
    transition: top var(--transition-fast);
    text-decoration: none;
}

.skip-link:focus {
    top: var(--space-4);
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-3xl);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

h4 {
    font-size: var(--font-size-lg);
}

.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-accent {
    color: var(--color-accent) !important;
}

.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

.text-error {
    color: var(--color-error);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

/* Gold Gradient Text */
.text-gradient,
.text-gradient-gold {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.hidden {
    display: none !important;
}

/* ========================================
   GLASSMORPHISM CARDS (Black & Gold)
   ======================================== */

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

/* Gold highlight on top */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    opacity: 0.5;
}

.card:hover {
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-lg);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.card-gold {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-md), var(--shadow-gold);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.card-title {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.card-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--color-accent);
}

/* ========================================
   PREMIUM BUTTONS (Black & Gold)
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.btn-accent {
    background: var(--gradient-gold);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md), var(--shadow-gold);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-accent:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--color-accent);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-bg-input);
    border-color: var(--color-accent);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--glass-bg);
    color: var(--color-accent);
}

.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-lg);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ========================================
   FORM ELEMENTS (Black & Gold)
   ======================================== */

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: var(--space-4);
    color: var(--color-accent);
    pointer-events: none;
    z-index: 1;
    transition: color var(--transition-fast);
    opacity: 0.7;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    padding: var(--space-4);
    padding-left: calc(var(--space-4) + 30px);
    background: var(--color-bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    color: var(--color-text);
    transition: all var(--transition-normal);
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: var(--color-text-muted);
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), var(--shadow-glow);
}

.input-wrapper:focus-within svg {
    color: var(--color-accent);
    opacity: 1;
}

/* ========================================
   TABS (Black & Gold)
   ======================================== */

.tabs {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-1);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.tab {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    text-align: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.tab:hover {
    color: var(--color-text-secondary);
}

.tab.active {
    background: var(--gradient-gold);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

/* ========================================
   PROGRESS BARS (Gold)
   ======================================== */

.progress {
    width: 100%;
    height: 8px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    box-shadow: 0 0 16px var(--color-accent-glow);
}

/* ========================================
   BADGES & TAGS (Gold Theme)
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.badge-primary,
.badge-accent {
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-accent);
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-success {
    background: rgba(46, 204, 113, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.badge-error {
    background: rgba(231, 76, 60, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* ========================================
   BOTTOM NAVIGATION (Black & Gold)
   ======================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: var(--safe-area-bottom);
    z-index: var(--z-sticky);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    color: var(--color-text-muted);
    transition: all var(--transition-normal);
    border-radius: var(--radius-lg);
    position: relative;
}

.nav-item:hover {
    color: var(--color-text-secondary);
}

.nav-item.active {
    color: var(--color-accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    box-shadow: 0 0 12px var(--color-accent-glow);
}

.nav-item.active svg {
    filter: drop-shadow(0 0 8px var(--color-accent-glow));
}

.nav-item span {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

/* ========================================
   FAB (Gold)
   ======================================== */

.fab {
    position: fixed;
    right: var(--space-4);
    bottom: calc(var(--nav-height) + var(--space-4));
    width: 60px;
    height: 60px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
    z-index: var(--z-sticky);
    transition: all var(--transition-bounce);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.fab::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: var(--radius-full);
    background: var(--gradient-gold);
    opacity: 0.4;
    filter: blur(15px);
    z-index: -1;
    animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.6;
    }
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-xl), var(--shadow-gold);
}

.fab:active {
    transform: scale(0.95);
}

/* ========================================
   MODALS & BOTTOM SHEETS
   ======================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    border-top: 1px solid var(--glass-border);
    padding: var(--space-6);
    padding-bottom: calc(var(--space-6) + var(--safe-area-bottom));
    z-index: var(--z-modal);
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-5);
    opacity: 0.5;
}

/* Modal (Centered Popup) */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--color-bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-sm .modal-content {
    max-width: 360px;
}

.modal-lg .modal-content {
    max-width: 640px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(212, 175, 55, 0.05);
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    color: var(--color-accent);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--glass-bg);
    color: var(--color-accent);
}

.modal-body {
    padding: var(--space-5);
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-body .form-group {
    margin-bottom: var(--space-4);
}

.modal-body label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}

.modal-footer {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
}

/* ========================================
   PAGE HEADER
   ======================================== */

.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    z-index: var(--z-sticky);
}

.page-header h1 {
    flex: 1;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    color: var(--color-accent);
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.back-btn:hover {
    background: var(--glass-bg);
}

.header-actions {
    display: flex;
    gap: var(--space-2);
}

/* Content spacing */
.pt-header {
    padding-top: calc(var(--header-height) + var(--space-4));
}

.pb-safe {
    padding-bottom: calc(var(--nav-height) + var(--space-4));
}

.main-content {
    min-height: 100vh;
    min-height: 100dvh;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: var(--color-success);
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--color-error);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
    color: var(--color-text-muted);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.empty-state h3 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-2);
    color: var(--color-accent);
}

/* ========================================
   TASK ITEMS
   ======================================== */

.task-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
    transition: all var(--transition-normal);
}

.task-item:hover {
    transform: translateX(4px);
    border-color: var(--color-accent);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    opacity: 0.7;
}

.task-checkbox:hover {
    opacity: 1;
}

.task-checkbox.checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
    opacity: 1;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-1);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.task-subject::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--subject-color, var(--color-accent));
}

.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.priority-dot.high {
    background: var(--color-error);
    box-shadow: 0 0 8px var(--color-error-glow);
}

.priority-dot.medium {
    background: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning-glow);
}

.priority-dot.low {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success-glow);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease;
}

.animate-slideUp {
    animation: slideUp 0.5s ease;
}