:root {
    /* Color Palette - Light Theme (White & Blue Mix) */
    --bg-main: #F4F7FB;
    --bg-card: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;

    /* Primary Blues */
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --primary-light: #EFF6FF;
    --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);

    /* State Colors */
    --success: #10B981;
    --success-light: #ECFDF5;
    --warning: #F59E0B;
    --danger: #EF4444;
    --danger-light: #FEF2F2;

    /* UI Elements */
    --border-color: #E2E8F0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --header-divider-line: rgba(59, 130, 246, 0.24);
    --header-divider-core: rgba(59, 130, 246, 0.46);
    --header-divider-glow: rgba(59, 130, 246, 0.14);
    --header-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);

    /* Avatar Colors */
    --avatar-text: #1E293B;
    --avatar-bg: linear-gradient(135deg, #E0E7FF 0%, #DBEAFE 100%);

    --nav-height: 65px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-main: #0B1120;
    /* Slightly deeper, richer background */
    --bg-card: #162032;
    /* Better contrast for cards */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #2A384F;
    /* Softer border for premium feel */
    --primary-light: #1e3a8a;

    /* Adjusted State Colors for Dark Mode (Softer, more premium) */
    --danger: #F87171;
    /* Softer red, easier on eyes in dark mode */
    --danger-light: rgba(239, 68, 68, 0.15);
    /* Translucent background for danger items */
    --warning: #FBBF24;
    /* Adjusted warning color */
    --success: #34D399;
    /* Adjusted success color */

    --header-divider-line: rgba(96, 165, 250, 0.25);
    --header-divider-core: rgba(147, 197, 253, 0.5);
    --header-divider-glow: rgba(96, 165, 250, 0.15);
    --header-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);

    /* Avatar Colors for Dark Theme */
    --avatar-text: #F8FAFC;
    --avatar-bg: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    /* better mobile feel */
}

/* Enable smooth scrolling globally */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Enable GPU acceleration for smoother animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

input,
textarea,
select,
[contenteditable="true"],
.allow-select {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* Utilities */
.mt-4 {
    margin-top: 1rem;
}

.full-width {
    width: 100%;
}

/* Buttons with premium animations */
.btn {
    display: inline-flex;

    .focus-presets-panel {
        margin-bottom: 1.6rem;
        padding: 0.9rem;
        border-radius: var(--radius-md);
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(37, 99, 235, 0.08));
        border: 1px solid var(--border-color);
    }

    .focus-presets-title {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: var(--text-muted);
        margin-bottom: 0.65rem;
    }

    .focus-presets-grid {
        display: grid;
        gap: 0.75rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .focus-preset-btn {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        background: var(--bg-card);
        color: var(--text-main);
        padding: 0.9rem 0.7rem;
        cursor: pointer;
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        position: relative;
        overflow: hidden;
    }

    .focus-preset-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(147, 51, 234, 0.05));
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .focus-preset-btn:hover::before {
        opacity: 1;
    }

    .focus-preset-btn strong {
        display: block;
        font-size: 0.875rem;
        margin-bottom: 0.15rem;
        font-weight: 600;
        position: relative;
        z-index: 1;
    }

    .focus-preset-btn small {
        font-size: 0.75rem;
        color: var(--text-muted);
        position: relative;
        z-index: 1;
    }

    .focus-preset-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
        border-color: rgba(59, 130, 246, 0.5);
    }

    .focus-preset-btn:active {
        transform: translateY(0);
    }

    @media (max-width: 768px) {
        .focus-presets-grid {
            grid-template-columns: 1fr;
            gap: 0.65rem;
        }

        .focus-preset-btn {
            padding: 1.1rem 1rem;
            text-align: left;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: 0.75rem;
        }

        .focus-preset-btn strong {
            font-size: 0.95rem;
            margin-bottom: 0;
        }

        .focus-preset-btn small {
            font-size: 0.8rem;
            white-space: nowrap;
        }
    }

    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    /* GPU acceleration */
    will-change: transform;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    background-color: var(--primary-hover);
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Ripple effect on buttons */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.4s ease;
    opacity: 0;
}

.btn:active::before {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0.3s;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

/* Application Container with premium gradient */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(180deg,
            var(--bg-main) 0%,
            var(--bg-main) 70%,
            rgba(59, 130, 246, 0.03) 100%);
    position: relative;
    overflow: hidden;
    /* Smooth rendering */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Header with glassmorphism effect */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 10;
    position: sticky;
    top: 0;
    box-shadow: var(--header-shadow);
    border-bottom: 1px solid var(--header-divider-line);
    /* Smooth transitions */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .app-header {
    background: rgba(30, 41, 59, 0.8);
}

.app-header::after {
    content: "";
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: -1px;
    height: 1.5px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent 0%, var(--header-divider-line) 24%, var(--header-divider-core) 50%, var(--header-divider-line) 76%, transparent 100%);
    box-shadow: 0 0 0.75rem var(--header-divider-glow);
    pointer-events: none;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.app-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Main Content area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem calc(var(--nav-height) + 1.5rem);
    /* Smooth momentum scrolling for iOS */
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for cleaner look in webview */
    scrollbar-width: none;
    /* Performance optimization */
    will-change: scroll-position;
}

.main-content::-webkit-scrollbar {
    display: none;
}

/* View Sections */
.view-section {
    display: none;
    animation: fadeInSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
    display: block;
}

.view-section.active.view-anim-rise {
    animation: viewRise 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active.view-anim-slide {
    animation: viewSlide 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active.view-anim-zoom {
    animation: viewZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes viewRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes viewSlide {
    from {
        opacity: 0;
        transform: translateX(14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes viewZoom {
    from {
        opacity: 0;
        transform: scale(0.985);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reveal-in {
    animation: revealIn 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--reveal-delay, 0ms);
}

@keyframes revealIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
        filter: saturate(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: saturate(1);
    }
}

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

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.form-group.row {
    display: flex;
    gap: 1rem;
}

.form-group.row .col {
    flex: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    /* Mobile style drawer */
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#modal-attendance-input,
#modal-attendance-course-recap {
    z-index: 220;
}

/* Premium: Blur course detail modal when attendance modals are active */
#modal-attendance-input.active~#modal-course-detail .modal-content,
#modal-attendance-course-recap.active~#modal-course-detail .modal-content {
    filter: blur(8px) brightness(0.7);
    pointer-events: none;
    transition: filter 0.3s ease;
}

/* Make course detail blurred when any attendance modal is on top */
#modal-course-detail.blurred .modal-content {
    filter: blur(8px) brightness(0.7);
    pointer-events: none;
    transition: filter 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 2rem 1.5rem;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout paint;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 45%, transparent);
    opacity: 0.7;
    pointer-events: none;
}

.modal-content.sheet-dragging {
    transition: none !important;
}

.modal-content.modal-pop-in {
    animation: modalPopIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shared-card-clone {
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.24);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-main);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
}

#modal-transfer {
    align-items: center;
    padding: 1rem;
}

.transfer-modal-content {
    max-width: 420px;
    width: min(100%, 420px);
    max-height: min(88vh, 760px);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    text-align: center;
    padding-bottom: 1.25rem;
}

#transfer-qr-container {
    width: min(58vw, 220px);
    min-width: 0 !important;
    min-height: 0 !important;
}

#transfer-qr-container canvas,
#transfer-qr-container img {
    display: block;
    width: 100% !important;
    height: auto !important;
}

@media (max-width: 480px) {
    .transfer-modal-content {
        max-height: 90vh;
        border-radius: 16px;
        padding: 2.2rem 1rem 1rem;
    }

    #transfer-pin-display {
        font-size: 2rem !important;
        letter-spacing: 3px !important;
    }

    .transfer-pin-row {
        flex-direction: column;
    }

    .transfer-pin-row .btn {
        width: 100%;
    }
}

.task-swipe-card {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    transition: transform 0.2s ease;
}

.task-swipe-card::before,
.task-swipe-card::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.task-swipe-card::before {
    content: attr(data-swipe-right);
    left: 0.75rem;
    color: var(--success);
}

.task-swipe-card::after {
    content: attr(data-swipe-left);
    right: 0.75rem;
    color: var(--danger);
}

.task-swipe-card.swiping-right {
    box-shadow: inset 58px 0 0 rgba(16, 185, 129, 0.12);
}

.task-swipe-card.swiping-right::before {
    opacity: 1;
}

.task-swipe-card.swiping-left {
    box-shadow: inset -58px 0 0 rgba(239, 68, 68, 0.12);
}

.task-swipe-card.swiping-left::after {
    opacity: 1;
}

.task-swipe-card.task-complete-pop {
    animation: taskCompletePop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.task-swipe-card.task-delete-swipe-out {
    animation: taskDeleteOut 0.18s ease forwards;
}

@keyframes taskCompletePop {
    0% {
        transform: scale(1);
        box-shadow: inset 0 0 0 rgba(16, 185, 129, 0);
    }

    55% {
        transform: scale(1.015);
        box-shadow: inset 0 0 0 999px rgba(16, 185, 129, 0.08);
    }

    100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes taskDeleteOut {
    to {
        transform: translateX(-44px) scale(0.98);
        opacity: 0;
    }
}

@media (min-width: 769px) {
    .task-swipe-card {
        touch-action: auto;
    }
}

/* Bottom Navigation with glassmorphism */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-bottom: env(safe-area-inset-bottom);
    /* iOS safe area */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 50;
}

[data-theme="dark"] .bottom-nav {
    background: rgba(30, 41, 59, 0.9);
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    height: 100%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item i {
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active indicator circle */
.nav-item::before {
    content: '';
    position: absolute;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    opacity: 1;
    transform: translateY(0);
}

.nav-item.active i {
    transform: translateY(-2px) scale(1.1);
    fill: var(--primary);
}

/* Tap feedback for mobile */
.nav-item:active {
    transform: scale(0.95);
}

/* Premium Floating Nav Item - Specific for Grades Tab */
.nav-item.nav-premium-center {
    position: relative;
    top: -15px;
    /* Float upwards */
}

.nav-item.nav-premium-center .nav-icon-wrapper {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 0.1rem;
}

.nav-item.nav-premium-center i {
    font-size: 1.6rem;
    color: white;
}

.nav-item.nav-premium-center:hover .nav-icon-wrapper,
.nav-item.nav-premium-center.active .nav-icon-wrapper {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.nav-item.nav-premium-center.active i {
    fill: white;
    transform: translateY(0);
}

.nav-item.nav-premium-center span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0.9;
}

/* Generic Cards with premium effects */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    /* GPU acceleration */
    will-change: transform;
}

/* Subtle shine effect on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
}

.card:active {
    transform: translateY(-2px) scale(0.99);
    transition: transform 0.1s ease;
}

/* Premium Focus Timer */
.focus-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.focus-timer-shell {
    position: relative;
    width: min(78vw, 260px);
    aspect-ratio: 1;
    margin: 0 auto 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.15) 52%, transparent 70%),
        linear-gradient(145deg, rgba(59, 130, 246, 0.14), rgba(15, 23, 42, 0.04));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12), inset 0 0 0 1px rgba(59, 130, 246, 0.1);
    overflow: hidden;
}

[data-theme="dark"] .focus-timer-shell {
    background:
        radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0.08) 55%, transparent 75%),
        linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.55), inset 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.focus-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.focus-progress-track,
.focus-progress-bar {
    fill: none;
    stroke-width: 11;
}

.focus-progress-track {
    stroke: rgba(100, 116, 139, 0.2);
}

.focus-progress-bar {
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-dasharray: 603.19;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.9s linear, stroke 0.25s ease;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.32));
}

.pomodoro-container.is-break .focus-status-pill {
    color: var(--success) !important;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.26);
}

.pomodoro-container.is-break .focus-progress-bar {
    stroke: var(--success);
    filter: drop-shadow(0 0 9px rgba(16, 185, 129, 0.36));
}

.pomodoro-container.is-running .focus-timer-shell::after {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.16);
    animation: focusOrbitalPulse 1.8s ease-in-out infinite;
}

.pomodoro-container.is-running.is-break .focus-timer-shell::after {
    border-color: rgba(16, 185, 129, 0.2);
}

.focus-timer-helper {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.focus-ambience-panel {
    margin-bottom: 1.6rem;
    text-align: left;
    padding: 1.1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.03));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

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

.focus-ambience-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.focus-ambience-title i {
    color: var(--primary);
    font-size: 1.1rem;
}

.focus-ambience-status-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.focus-ambience-status-badge i {
    font-size: 0.9rem;
}

.focus-ambience-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.focus-ambience-btn {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.55rem 0.5rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.focus-ambience-btn i {
    font-size: 1.3rem;
    opacity: 0.75;
}

.focus-ambience-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);
}

.focus-ambience-btn.active {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px) scale(1.02);
}

.focus-ambience-btn.active i {
    opacity: 1;
}

.focus-ambience-btn-custom {
    grid-column: span 2;
    flex-direction: row;
    gap: 0.4rem;
}

.focus-ambience-btn-custom i {
    font-size: 1.1rem;
}

.focus-volume-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    background: rgba(59, 130, 246, 0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.focus-volume-wrap i {
    font-size: 1.1rem;
    color: var(--primary);
    opacity: 0.8;
}

.focus-volume-wrap input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
}

.focus-volume-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 35px;
    text-align: right;
}

.focus-custom-filename {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding: 0.55rem 0.7rem;
    background: rgba(147, 51, 234, 0.08);
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: var(--text-main);
}

.focus-custom-filename i {
    color: #9333ea;
    font-size: 1rem;
}

.focus-custom-filename span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-custom-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.focus-custom-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.focus-custom-remove i {
    font-size: 0.9rem;
}

/* Fullscreen Focus Mode Overlay */
.focus-fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .focus-fullscreen-overlay {
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 50%, #F1F5F9 100%);
}

.focus-fullscreen-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.focus-fullscreen-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
    padding: 2rem;
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}

.focus-fullscreen-overlay.active .focus-fullscreen-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

@keyframes focusFullscreenFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.focus-fullscreen-exit {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
}

.focus-fullscreen-exit:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
    color: var(--danger);
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.22);
}

.focus-fullscreen-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.focus-fullscreen-mode-badge i {
    font-size: 1.2rem;
}

.focus-fullscreen-mode-badge.is-break {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.focus-fullscreen-timer-wrap {
    position: relative;
    width: min(85vw, 320px);
    aspect-ratio: 1;
    margin: 0 auto 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.focus-fullscreen-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.focus-fullscreen-progress-track,
.focus-fullscreen-progress-bar {
    fill: none;
    stroke-width: 8;
}

.focus-fullscreen-progress-track {
    stroke: rgba(100, 116, 139, 0.2);
}

.focus-fullscreen-progress-bar {
    stroke: var(--primary);
    stroke-linecap: round;
    stroke-dasharray: 911.06;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
    filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.5));
}

.focus-fullscreen-mode-badge.is-break~.focus-fullscreen-timer-wrap .focus-fullscreen-progress-bar {
    stroke: var(--success);
    filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.5));
}

.focus-fullscreen-timer {
    font-size: clamp(4rem, 12vw, 6rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 4px 24px rgba(59, 130, 246, 0.3);
}

.focus-fullscreen-ambience {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    background: rgba(147, 51, 234, 0.12);
    border: 1px solid rgba(147, 51, 234, 0.25);
    border-radius: 999px;
    margin-bottom: 2rem;
}

.focus-fullscreen-ambience.hidden {
    display: none;
}

.focus-fullscreen-ambience-wave {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9333ea, #c026d3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    animation: focusAmbientPulse 2s ease-in-out infinite;
}

@keyframes focusAmbientPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.focus-fullscreen-ambience-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.focus-fullscreen-ambience-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.focus-fullscreen-ambience-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.focus-fullscreen-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.focus-fullscreen-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    min-width: 130px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.focus-fullscreen-btn i {
    font-size: 1.3rem;
}

.focus-fullscreen-btn-pause {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.focus-fullscreen-btn-pause:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.45);
}

.focus-fullscreen-btn-stop {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.focus-fullscreen-btn-stop:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: translateY(-2px);
}

.focus-fullscreen-btn-music {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.32);
    color: #a78bfa;
}

.focus-fullscreen-btn-music:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.focus-fullscreen-btn-music.is-off {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--text-muted);
}

.focus-fullscreen-btn-music.is-off:hover {
    background: rgba(100, 116, 139, 0.22);
}

.focus-fullscreen-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

@media (max-width: 640px) {
    .focus-fullscreen-btn {
        width: 100%;
        justify-content: center;
    }
}

@keyframes focusOrbitalPulse {
    0% {
        transform: scale(0.96);
        opacity: 0.55;
    }

    70% {
        transform: scale(1.06);
        opacity: 0.1;
    }

    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* -------------------
   SCHEDULE SPECIFIC
   ------------------- */
.day-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
}

.day-tabs::-webkit-scrollbar {
    display: none;
}

.day-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.day-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.schedule-card {
    display: flex;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.schedule-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.schedule-time {
    min-width: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    display: flex;
    flex-direction: column;
}

.schedule-time span.end-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.schedule-info flex-1 {
    flex: 1;
}

.schedule-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.schedule-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.schedule-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.schedule-card.is-now::before {
    background: var(--warning);
}

.schedule-card.is-now {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.home-schedule-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.home-schedule-status-now {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.home-schedule-status-upcoming {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
}

.home-schedule-status-done {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

.attendance-option-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    background: var(--bg-main);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
}

.attendance-option-chip input {
    accent-color: var(--primary);
}

.attendance-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.attendance-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: progressSlide 0.8s ease;
}

@keyframes progressSlide {
    from {
        width: 0 !important;
    }
}

.attendance-good {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.attendance-warning {
    background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* -------------------
   GRADES SPECIFIC
   ------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.stat-card.primary-gradient {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.stat-card.primary-gradient .stat-value,
.stat-card.primary-gradient h3 {
    color: white;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.primary-gradient .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-info h3 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* -------------------
   TASKS SPECIFIC
   ------------------- */
.task-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.filter-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--bg-main);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.attendance-filter-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.attendance-filter-btn.active {
    background: var(--bg-main);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transform: scale(1.02);
}

/* ========== PREMIUM POLISH EFFECTS ========== */

/* Quick actions stagger animation */
.quick-actions>button:nth-child(1) {
    animation: fadeIn 0.4s ease 0.05s both;
}

.quick-actions>button:nth-child(2) {
    animation: fadeIn 0.4s ease 0.1s both;
}

.quick-actions>button:nth-child(3) {
    animation: fadeIn 0.4s ease 0.15s both;
}

.quick-actions>button:nth-child(4) {
    animation: fadeIn 0.4s ease 0.2s both;
}

.quick-actions>button:nth-child(5) {
    animation: fadeIn 0.4s ease 0.25s both;
}

.quick-actions>button {
    position: relative;
    overflow: hidden;
}

.quick-actions>button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.quick-actions>button:active::before {
    width: 200px;
    height: 200px;
}

/* Premium card hover effects with micro-interactions */
.card,
.schedule-card,
.task-item,
.note-card,
.inbox-item,
.home-schedule-card,
.attendance-card {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.3s ease,
        background 0.3s ease;
    will-change: transform;
}

.schedule-card:hover,
.task-item:hover,
.note-card:hover,
.inbox-item:hover,
.home-schedule-card:hover,
.attendance-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.schedule-card:active,
.task-item:active,
.note-card:active,
.inbox-item:active,
.home-schedule-card:active,
.attendance-card:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Enhanced button animations */
.btn,
.icon-btn,
.fab-main {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover,
.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active,
.icon-btn:active {
    transform: translateY(0) scale(0.96);
}

/* Premium modal entrance animation */
.modal-overlay.active .modal-content {
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 0, 0, 0.42);
        transition: opacity 0.2s ease;
    }

    .modal-content {
        transition: transform 0.2s ease-out;
        padding-top: 2.3rem;
    }

    .modal-overlay.active .modal-content {
        animation: none;
    }

    #modal-course-detail.blurred .modal-content,
    #modal-attendance-input.active~#modal-course-detail .modal-content,
    #modal-attendance-course-recap.active~#modal-course-detail .modal-content {
        filter: none;
        opacity: 0.88;
    }
}

@media (max-width: 600px) {

    .view-section.active.view-anim-rise,
    .view-section.active.view-anim-slide,
    .view-section.active.view-anim-zoom {
        animation-duration: 0.24s;
    }

    .reveal-in {
        animation-duration: 0.34s;
    }
}

@media (prefers-reduced-motion: reduce) {

    .view-section.active.view-anim-rise,
    .view-section.active.view-anim-slide,
    .view-section.active.view-anim-zoom,
    .reveal-in {
        animation: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .modal-overlay,
    .modal-content,
    .modal-overlay.active .modal-content {
        transition: none !important;
        animation: none !important;
    }
}

/* Fade-in animation for content */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shimmer loading effect */
.shimmer {
    background: linear-gradient(90deg,
            var(--bg-card) 0%,
            var(--bg-main) 50%,
            var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: shimmerAnimation 1.5s ease-in-out infinite;
}

@keyframes shimmerAnimation {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Pulse animation for status indicators */
.pulse {
    animation: pulseAnimation 2s ease-in-out infinite;
}

@keyframes pulseAnimation {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Scale pop animation */
.scale-pop {
    animation: scalePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scalePop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transition: all 0.2s ease;
}

/* Smooth transitions for status badges */
.home-schedule-status-now,
.home-schedule-status-upcoming,
.home-schedule-status-done {
    transition: all 0.3s ease;
    animation: scalePop 0.3s ease;
}

/* Glass morphism effect for overlays */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Premium shadow levels */
.shadow-premium {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--success));
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Smooth page transitions */
.view-section {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.view-section:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* ========== SKELETON LOADING SCREENS ========== */

/* Skeleton base styles */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-card) 0%,
            var(--bg-main) 50%,
            var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

@keyframes skeletonShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-card {
    height: 120px;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 0.75rem;
    border-radius: 4px;
}

.skeleton-text.skeleton-text-short {
    width: 60%;
}

.skeleton-title {
    height: 24px;
    width: 40%;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Skeleton pulse alternative */
.skeleton-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    background: var(--bg-main);
}

@keyframes skeletonPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ========== UTILITY ANIMATIONS ========== */

/* Bounce animation for notifications */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.animate-bounce {
    animation: bounce 0.6s ease;
}

/* Shake animation for errors */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-4px);
    }

    40%,
    80% {
        transform: translateX(4px);
    }
}

.animate-shake {
    animation: shake 0.5s ease;
}

/* Slide fade in animations for list items */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in-up {
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered animation delays */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* Rotate animation for loading spinners */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.animate-checkmark {
    animation: checkmark 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth height transitions */
.transition-height {
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Fade in/out utilities */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Scale animations */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating animation for floating elements */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Toast notification slide in */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-toast-in {
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========== END PREMIUM POLISH ========== */

/* Premium Export Button */
.btn-premium-export {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(59, 130, 246, 0.08);
    /* subtle primary bg */
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    /* pill shape */
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.02);
}

.btn-premium-export i {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.btn-premium-export:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.btn-premium-export:hover i {
    transform: translateY(1px);
}

/* Premium Grade Actions */
.btn-premium-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.15));
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    /* Pill shape */
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.05);
    width: 100%;
}

.btn-premium-grade i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.btn-premium-grade:hover {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-premium-grade:active {
    transform: translateY(0) scale(0.98);
}

.btn-premium-grade:hover i {
    transform: rotate(90deg) scale(1.1);
}

[data-theme="dark"] .btn-premium-grade {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(129, 140, 248, 0.15));
    color: #93C5FD;
    border-color: rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .btn-premium-grade:hover {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .btn-premium-export {
    background: rgba(96, 165, 250, 0.1);
    color: #93C5FD;
    border-color: rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .btn-premium-export:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ========== BUDGET TRACKER (PREMIUM UI) ========== */

.budget-premium-view {
    --budget-accent: #ec4899;
    --budget-accent-soft: rgba(236, 72, 153, 0.12);
    --budget-ink-soft: color-mix(in srgb, var(--text-main) 78%, transparent);
}

.budget-premium-view .card {
    border: 1px solid color-mix(in srgb, var(--border-color) 88%, var(--budget-accent-soft));
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.budget-premium-view .section-header h2 {
    letter-spacing: 0.2px;
}

.budget-actions-row {
    display: flex;
    align-items: center;
    gap: 0.55rem !important;
}

.budget-action-btn {
    border-radius: 999px;
    padding: 0.52rem 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, filter 0.22s ease;
}

.budget-action-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
}

.budget-action-btn-clone {
    color: #2563eb !important;
    border-color: rgba(37, 99, 235, 0.45) !important;
    background: rgba(37, 99, 235, 0.06) !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.budget-action-btn-csv {
    color: #0f766e !important;
    border-color: rgba(13, 148, 136, 0.45) !important;
    background: rgba(13, 148, 136, 0.06) !important;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.12);
}

.budget-action-btn-reset {
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.1);
}

.budget-action-btn-add {
    border-radius: 999px;
    padding: 0.52rem 1rem;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.28);
}

.premium-budget-card {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    backdrop-filter: blur(6px);
    border: 1px solid color-mix(in srgb, var(--budget-accent) 20%, var(--border-color)) !important;
}

.premium-budget-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(236, 72, 153, 0.2);
}

.budget-month-shell {
    border: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 90% 20%, rgba(236, 72, 153, 0.12), transparent 45%),
        radial-gradient(circle at 15% 80%, rgba(59, 130, 246, 0.12), transparent 40%),
        var(--bg-card);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.budget-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.budget-month-btn {
    width: 38px;
    height: 38px;
    box-shadow: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.budget-month-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(236, 72, 153, 0.45);
    background: rgba(236, 72, 153, 0.07);
}

.budget-month-center {
    text-align: center;
    flex: 1;
}

.budget-back-today {
    font-size: 0.78rem;
    border-color: rgba(236, 72, 153, 0.35);
    color: #db2777;
    background: rgba(236, 72, 153, 0.04);
    font-weight: 700;
}

.budget-back-today:hover {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.12);
}

.budget-insight-shell {
    border: 1px solid rgba(236, 72, 153, 0.2);
    background:
        linear-gradient(160deg, rgba(236, 72, 153, 0.07), rgba(59, 130, 246, 0.06)),
        var(--bg-card);
}

.budget-pro-signal-shell {
    border: 1px solid rgba(37, 99, 235, 0.26);
    background:
        radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.12), transparent 48%),
        radial-gradient(circle at 12% 82%, rgba(16, 185, 129, 0.08), transparent 44%),
        var(--bg-card);
}

.budget-chart-shell {
    border: 1px solid color-mix(in srgb, var(--budget-accent) 18%, var(--border-color));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 92%, white 8%) 0%, var(--bg-card) 100%);
}

.budget-insight-live {
    font-size: 0.68rem;
    font-weight: 700;
    color: #db2777;
    border: 1px solid rgba(236, 72, 153, 0.4);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    background: rgba(236, 72, 153, 0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.budget-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.budget-insight-card {
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.budget-insight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.budget-insight-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.55px;
    margin-bottom: 0.3rem;
}

.budget-insight-card h4 {
    font-size: 1.05rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.budget-insight-card small {
    font-size: 0.73rem;
    color: var(--text-muted);
}

.budget-clickable-insight {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.budget-clickable-insight:hover {
    border-color: rgba(236, 72, 153, 0.45);
}

.budget-category-rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.budget-category-rank-badge {
    min-width: 44px;
    text-align: center;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #db2777;
    background: rgba(236, 72, 153, 0.12);
    padding: 0.2rem 0.4rem;
}

.budget-cat-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.budget-cat-card input {
    display: none;
}

.budget-cat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.25rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.budget-cat-card input:checked+.budget-cat-content {
    background: rgba(236, 72, 153, 0.08);
    border-color: #ec4899;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.15);
}

.budget-cat-card input[name="budget-category-inc"]:checked+.budget-cat-content {
    background: rgba(16, 185, 129, 0.08);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.budget-cat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg-main);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.budget-cat-card input:checked+.budget-cat-content .budget-cat-icon {
    background: #ec4899;
    color: white;
}

.budget-cat-card input[name="budget-category-inc"]:checked+.budget-cat-content .budget-cat-icon {
    background: #10b981;
    color: white;
}

.budget-cat-content span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.budget-cat-card input:checked+.budget-cat-content span {
    color: #ec4899;
}

.budget-cat-card input[name="budget-category-inc"]:checked+.budget-cat-content span {
    color: #10b981;
}

.tx-card:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: rgba(236, 72, 153, 0.3);
}

.budget-reveal-card {
    opacity: 0;
    transform: translateY(16px) scale(0.995);
}

.view-section.active.budget-premium-view .budget-reveal-card {
    animation: budgetCardReveal 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.view-section.active.budget-premium-view .budget-reveal-card:nth-of-type(1) {
    animation-delay: 0.04s;
}

.view-section.active.budget-premium-view .budget-reveal-card:nth-of-type(2) {
    animation-delay: 0.1s;
}

.view-section.active.budget-premium-view .budget-reveal-card:nth-of-type(3) {
    animation-delay: 0.16s;
}

.view-section.active.budget-premium-view .budget-reveal-card:nth-of-type(4) {
    animation-delay: 0.22s;
}

.view-section.active.budget-premium-view .budget-reveal-card:nth-of-type(5) {
    animation-delay: 0.28s;
}

@keyframes budgetCardReveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.995);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

[data-theme="dark"] .budget-premium-view {
    --budget-accent: #f472b6;
    --budget-accent-soft: rgba(244, 114, 182, 0.14);
}

[data-theme="dark"] .budget-premium-view .card {
    border-color: color-mix(in srgb, var(--border-color) 72%, rgba(148, 163, 184, 0.2));
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.48);
}

[data-theme="dark"] .budget-action-btn-clone {
    color: #bfdbfe !important;
    border-color: rgba(147, 197, 253, 0.5) !important;
    background: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="dark"] .budget-action-btn-csv {
    color: #99f6e4 !important;
    border-color: rgba(45, 212, 191, 0.5) !important;
    background: rgba(13, 148, 136, 0.24) !important;
}

[data-theme="dark"] .budget-action-btn-reset {
    color: #fecaca !important;
    border-color: rgba(248, 113, 113, 0.5) !important;
    background: rgba(185, 28, 28, 0.2) !important;
}

[data-theme="dark"] .budget-action-btn-add {
    background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

[data-theme="dark"] .premium-budget-card {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.2), rgba(37, 99, 235, 0.15)) !important;
    border-color: rgba(244, 114, 182, 0.3) !important;
}

[data-theme="dark"] .budget-month-shell {
    background:
        radial-gradient(circle at 90% 20%, rgba(244, 114, 182, 0.2), transparent 45%),
        radial-gradient(circle at 15% 80%, rgba(59, 130, 246, 0.22), transparent 40%),
        var(--bg-card);
}

[data-theme="dark"] .budget-month-btn:hover {
    border-color: rgba(244, 114, 182, 0.45);
    background: rgba(244, 114, 182, 0.14);
}

[data-theme="dark"] .budget-back-today {
    color: #f9a8d4;
    border-color: rgba(249, 168, 212, 0.42);
    background: rgba(244, 114, 182, 0.16);
}

[data-theme="dark"] .budget-insight-shell {
    border-color: rgba(244, 114, 182, 0.35);
    background:
        linear-gradient(160deg, rgba(244, 114, 182, 0.16), rgba(59, 130, 246, 0.12)),
        var(--bg-card);
}

[data-theme="dark"] .budget-pro-signal-shell {
    border-color: rgba(147, 197, 253, 0.34);
    background:
        radial-gradient(circle at 88% 18%, rgba(147, 197, 253, 0.18), transparent 48%),
        radial-gradient(circle at 12% 82%, rgba(45, 212, 191, 0.12), transparent 44%),
        var(--bg-card);
}

[data-theme="dark"] .budget-insight-card {
    background: color-mix(in srgb, var(--bg-card) 82%, #0f172a 18%);
    border-color: rgba(148, 163, 184, 0.26);
}

[data-theme="dark"] .budget-insight-card small,
[data-theme="dark"] .budget-insight-label {
    color: #cbd5e1;
}

[data-theme="dark"] .budget-chart-shell {
    border-color: rgba(244, 114, 182, 0.3);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(22, 32, 50, 0.95));
}

#view-budget.budget-month-animating .premium-budget-card,
#view-budget.budget-month-animating .budget-insight-shell,
#view-budget.budget-month-animating #budget-transaction-list .tx-card,
#view-budget.budget-month-animating #budgetChart {
    animation: budgetFadeSlide 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

#budget-transaction-list .tx-card {
    animation: budgetListRise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes budgetFadeSlide {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes budgetListRise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .budget-insight-grid {
        grid-template-columns: 1fr;
    }

    .budget-month-shell {
        padding: 0.85rem;
    }

    #view-budget .section-header>div {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .budget-action-btn {
        font-size: 0.78rem;
        padding: 0.48rem 0.76rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .budget-reveal-card,
    .view-section.active.budget-premium-view .budget-reveal-card {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* End Budget Styles */

/* -------------------
   FAB MENU (Floating Action Button) 
   ------------------- */
.fab-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 100;
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 102;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.fab-main.active {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(10px) scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-menu.active .fab-menu-item {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Profile Avatar Styles */
.profile-avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.profile-avatar-initial {
    background: var(--avatar-bg);
    color: var(--avatar-text);
}

#profile-trigger {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid white;
}

[data-theme="dark"] #profile-trigger {
    border-color: var(--bg-card);
}

#prof-dash-photo {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--bg-card);
    margin-bottom: 1rem;
}

/* Premium Welcome Modal Styles */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

[data-theme="dark"] .welcome-modal {
    background: rgba(15, 23, 42, 0.8);
}

.welcome-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.premium-welcome {
    position: relative;
    background: var(--bg-card);
    border-radius: 32px;
    padding: 3rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-modal.active .premium-welcome {
    transform: translateY(0) scale(1);
}

.premium-welcome-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.premium-welcome-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    z-index: 1;
}

.premium-welcome-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.5);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .premium-welcome-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.4) 100%);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.premium-sparkle {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    color: #F59E0B;
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
    animation: sparkleFloat 3s ease-in-out infinite;
}

@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) scale(1.1) rotate(15deg);
    }
}

.premium-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.premium-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.premium-btn {
    padding: 1.1rem;
    border-radius: 100px;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    border: none;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    color: white;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
    color: white;
}

.premium-btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.premium-skip {
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.premium-skip:hover {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-main);
}

/* Notification System Styles */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger) !important;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
}

.notification-badge.pulse {
    animation: notificationBadgePulse 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes notificationBadgePulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.22);
    }

    100% {
        transform: scale(1);
    }
}

#notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

#notification-btn {
    position: relative;
}

.notification-panel {
    position: fixed;
    top: 70px;
    right: 10px;
    width: 380px;
    max-height: 600px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.notification-panel.sheet-dragging {
    transition: none !important;
}

.notification-drag-handle {
    display: none;
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-muted) 45%, transparent);
    margin: 0.5rem auto 0;
}

.notification-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 0; /* Required for flex overflow scroll to work correctly */
}

.notification-header-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.notif-header-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.notif-header-btn:active {
    transform: scale(0.97);
}

.notif-header-btn i {
    font-size: 0.95rem;
}

.notif-header-btn.danger {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 28%, var(--border-color));
    background: color-mix(in srgb, var(--danger-light) 50%, var(--bg-main));
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    text-align: center;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.notification-item::before,
.notification-item::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.notification-item::before {
    content: attr(data-swipe-right);
    left: 0.75rem;
    color: var(--success);
}

.notification-item::after {
    content: attr(data-swipe-left);
    right: 0.75rem;
    color: var(--danger);
}

.notification-item.swiping-right {
    box-shadow: inset 56px 0 0 rgba(16, 185, 129, 0.12);
}

.notification-item.swiping-right::before {
    opacity: 1;
}

.notification-item.swiping-left {
    box-shadow: inset -56px 0 0 rgba(239, 68, 68, 0.12);
}

.notification-item.swiping-left::after {
    opacity: 1;
}

.notification-item:hover {
    background-color: var(--primary-light);
}

.notification-item.unread {
    background-color: rgba(59, 130, 246, 0.05);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-message {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
}

/* -------------------
   NOTES PREMIUM STYLES
   ------------------- */
.note-card-premium {
    will-change: transform, box-shadow;
    backdrop-filter: blur(10px);
}

.note-card-premium .icon-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

/* Responsive grid for notes */
@media (max-width: 768px) {
    #notes-dashboard-list {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #notes-dashboard-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Search input focus effect */
#notes-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transition: all 0.2s;
}

/* Sort select focus effect */
#notes-sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transition: all 0.2s;
}

.notification-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notif-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.notif-action-btn.danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .notification-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 18px 18px 0 0;
        max-height: min(calc(100dvh - max(64px, env(safe-area-inset-top))), 620px);
        transform: translateY(100%);
        transition: transform 0.24s ease, opacity 0.24s ease, visibility 0.24s;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.18);
    }

    .notification-panel.active {
        transform: translateY(0);
    }

    .notification-drag-handle {
        display: block;
    }

    .notification-panel-header {
        padding-top: 0.6rem;
    }

    .notification-actions {
        opacity: 1;
    }

    .notif-header-btn span {
        display: none;
    }

    .notif-header-btn {
        width: 30px;
        height: 30px;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .notif-header-btn i {
        font-size: 1rem;
    }

    .notification-item {
        transition: background-color 0.2s ease, transform 0.2s ease;
    }
}

.fab-menu.active .fab-menu-item:nth-child(1) {
    transition-delay: 0.05s;
}

.fab-menu.active .fab-menu-item:nth-child(2) {
    transition-delay: 0.1s;
}

.fab-menu.active .fab-menu-item:nth-child(3) {
    transition-delay: 0.15s;
}

.fab-menu.active .fab-menu-item:nth-child(4) {
    transition-delay: 0.2s;
}

.fab-menu-label {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 0.5rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.fab-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.fab-menu-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fab-menu-btn.inbox {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    border: none;
}

.fab-menu-btn.schedule {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    border: none;
}

.fab-menu-btn.task {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
}

.fab-menu-btn.note {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    border: none;
}

.fab-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.fab-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================================
   CALL MANAGER STYLES
   ========================================================= */

/* Modal overlay */
.call-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
    padding: 1rem;
}

.call-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.call-modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.call-modal-overlay.active .call-modal-box {
    transform: translateY(0) scale(1);
}

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

.call-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Lobby */
.call-lobby {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.25rem;
    overflow-y: auto;
}

/* My ID card */
.call-id-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.call-id-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.call-id-value {
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
    color: var(--text-main);
    word-break: break-all;
    letter-spacing: 0.02em;
}

.call-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Input row */
.call-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.call-input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.02em;
    transition: border-color 0.18s;
}

.call-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.call-icon-pill {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}

.call-icon-pill:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* Call type buttons */
.call-type-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.call-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

.call-type-btn i {
    font-size: 1.4rem;
}

.call-type-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.call-type-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.call-type-btn.voice:not(:disabled):hover { border-color: #10B981; color: #10B981; background: rgba(16, 185, 129, 0.08); }
.call-type-btn.video:not(:disabled):hover { border-color: #3B82F6; color: #3B82F6; background: rgba(59, 130, 246, 0.08); }
.call-type-btn.screen:not(:disabled):hover { border-color: #8B5CF6; color: #8B5CF6; background: rgba(139, 92, 246, 0.08); }

.call-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin: 0;
    padding: 0.5rem;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.call-hint i { flex-shrink: 0; margin-top: 0.1rem; }

/* In-call screen */
.call-screen {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #0a0a0a;
}

.call-screen-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.call-videos {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.call-video.remote {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-video.local {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 28%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

/* Controls */
.call-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.call-ctrl-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, transform 0.14s;
}

.call-ctrl-btn:hover { background: rgba(255, 255, 255, 0.22); transform: scale(1.08); }
.call-ctrl-btn.active { background: rgba(251, 191, 36, 0.85); color: #1a1a1a; }
.call-ctrl-btn.end { background: #EF4444; }
.call-ctrl-btn.end:hover { background: #DC2626; }

/* Incoming call overlay */
.call-incoming-overlay {
    position: fixed;
    inset: 0;
    z-index: 9200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem 1rem max(1.5rem, env(safe-area-inset-bottom));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s;
}

.call-incoming-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.call-incoming-box {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(20px);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.call-incoming-overlay.active .call-incoming-box {
    transform: translateY(0);
}

.call-incoming-ring {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10B981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    flex-shrink: 0;
    animation: callRingPulse 1s ease-in-out infinite;
}

@keyframes callRingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.call-incoming-info {
    flex: 1;
    min-width: 0;
}

.call-incoming-mode-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}

.call-incoming-peer-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.call-incoming-actions {
    display: flex;
    gap: 0.5rem;
}

.call-incoming-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.14s;
}

.call-incoming-btn:active { transform: scale(0.92); }
.call-incoming-btn.accept { background: #10B981; color: #fff; }
.call-incoming-btn.reject { background: #EF4444; color: #fff; }

/* Toast */
.call-toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 1rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    z-index: 9300;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.call-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile sheet style */
@media (max-width: 600px) {
    .call-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .call-modal-box {
        border-radius: 20px 20px 0 0;
        max-height: 92dvh;
        max-width: 100%;
        transform: translateY(100%);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .call-modal-overlay.active .call-modal-box {
        transform: translateY(0);
    }
}