﻿:root {
    /* Premium Fintech Palette v3 */
    --primary: #431874;
    /* Deep Purple */
    --primary-hover: #351260;
    --secondary: #2DD4BF;
    /* Soft Teal */
    --accent: #F43F5E;
    /* Rose */
    --accent-orange: #F97316;
    /* Vibrant Orange for priority */
    --accent-orange-light: #FED7AA;

    --background: #F0F2F5;
    /* Soft Gray-Blue Background */
    --surface: #FFFFFF;
    /* Clean White Surface */
    --surface-solid: #FFFFFF;
    --bg-card: #FFFFFF;

    --text-main: #1E293B;
    /* Slate 800 */
    --text-muted: #64748B;
    /* Slate 500 */
    --border: #E2E8F0;
    /* Slate 200 */

    --danger: #EF4444;
    --success: #10B981;
    --warning: #F59E0B;

    --radius: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    /* Softer, rounds corners */
    --shadow-sm: 0 2px 8px rgba(67, 24, 116, 0.05);
    /* Tinted shadow */
    --shadow: 0 8px 16px -4px rgba(67, 24, 116, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(67, 24, 116, 0.1), 0 8px 10px -6px rgba(67, 24, 116, 0.1);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Stat Card Backgrounds for Light Mode */
    --stat-success-bg: #F0FDF4;
    --stat-danger-bg: #FEF2F2;
    --stat-warning-bg: #FFFBEB;
    --stat-info-bg: #EFF6FF;
}

.dark-mode {
    --background: #0f172a;
    /* Slate 900 */
    --surface: rgba(30, 41, 59, 0.8);
    /* Slate 800 */
    --surface-solid: #1e293b;
    --bg-card: #1e293b;

    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border: #334155;
    /* Slate 700 */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3);

    /* Stat Card Backgrounds for Dark Mode */
    --stat-success-bg: rgba(16, 185, 129, 0.15);
    --stat-danger-bg: rgba(239, 68, 68, 0.15);
    --stat-warning-bg: rgba(245, 158, 11, 0.15);
    --stat-info-bg: rgba(59, 130, 246, 0.15);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

/* --- Layout --- */
.app-container {
    max-width: 600px;
    /* Mobile first focus */
    margin: 0 auto;
    min-height: 100vh;
    background: var(--background);
    position: relative;
    padding-bottom: 80px;
    /* Space for bottom nav */
}

@media (min-width: 640px) {
    .app-container {
        padding-top: 2rem;
    }
}

/* --- Components --- */

/* Buttons */
.btn,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    /* Pill shape */
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.btn {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--primary);
    background: #f1f5f9;
}

.btn-icon-only {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* Cards */
/* Cards */
.card {
    background: var(--surface);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .card {
    border-color: rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

/* Navigation - Modern Bottom Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.5rem;
}

.nav-item.active {
    color: white;
    background: var(--primary);
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item.active i {
    color: white;
}

.nav-item:not(.active):hover {
    background: var(--border);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .bottom-nav {
        padding: 12px 10px !important;
        min-height: 70px;
    }

    .nav-item {
        padding: 8px 12px;
        min-width: 60px;
        /* Larger touch target */
    }

    .nav-item i {
        font-size: 1.7rem;
        /* Larger icon */
        margin-bottom: 2px;
    }

    .nav-item span {
        font-size: 0.85rem;
        /* Larger text */
    }
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card.secondary {
    background: linear-gradient(135deg, var(--secondary), #be185d);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Debts & Todos Lists */
.list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.list-item:hover {
    transform: scale(1.01);
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e0e7ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: var(--text-main);
}

.item-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.item-amount {
    font-weight: 700;
    color: var(--danger);
}

/* Forms */
input,
select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9fafb;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Loading */
.loading-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 70, 229, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    /* Mobile sheet style */
    justify-content: center;
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
    }
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 2rem;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
    .modal-content {
        border-radius: 20px;
        animation: scaleIn 0.2s;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Toasts */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s;
    border-left: 4px solid var(--primary);
    font-weight: 500;
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.success {
    border-left-color: var(--success);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

/* Completed Todo */
.todo-completed .item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Custom Checkbox */
.todo-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    margin-right: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    flex-shrink: 0;
}

.todo-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.todo-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.todo-checkbox:focus {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
}

.category-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
    margin-bottom: 4px;
    display: inline-block;
}

.cat-casa {
    background: #dcfce7;
    color: #166534;
}

.cat-compras {
    background: #dbeafe;
    color: #1e40af;
}

.cat-trabajo {
    background: #f3e8ff;
    color: #6b21a8;
}

.cat-reparaciones {
    background: #ffedd5;
    color: #9a3412;
}

.cat-otros {
    background: #f3f4f6;
    color: #4b5563;
}

.dark-mode .cat-casa {
    background: #064e3b;
    color: #a7f3d0;
}

.dark-mode .cat-compras {
    background: #1e3a8a;
    color: #bfdbfe;
}

.dark-mode .cat-trabajo {
    background: #581c87;
    color: #e9d5ff;
}

.dark-mode .cat-reparaciones {
    background: #7c2d12;
    color: #fed7aa;
}

.dark-mode .cat-otros {
    background: #374151;
    color: #9ca3af;
}

.dark-mode .todo-checkbox {
    background-color: #374151;
    border-color: #4b5563;
}

.dark-mode .todo-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Larger Buttons for Touch */
.btn-icon-only {
    width: 44px;
    /* Finger-friendly size */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: background-color 0.2s, color 0.2s;
}

.btn-icon-only:active {
    transform: scale(0.95);
}

/* --- Debt Progress & Intelligence --- */

/* Recommendation Badge */
.recommendation-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    margin-bottom: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Progress Bar */
.progress-container {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.75rem;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

/* Chips / Filter Buttons */
.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-chip {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-chip:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-chip.danger {
    color: var(--danger);
    border-color: #fecaca;
    background: #fef2f2;
}

.btn-chip.danger:hover {
    background: #fee2e2;
}

/* Specific Chip Colors */
.btn-chip.chip-all.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-chip.chip-pending {
    color: var(--warning);
    border-color: #fcd34d;
    background: #fffbeb;
}

.btn-chip.chip-pending:hover {
    background: #fef3c7;
}

.btn-chip.chip-pending.active {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
}

.btn-chip.chip-done {
    color: var(--success);
    border-color: #86efac;
    background: #f0fdf4;
}

.btn-chip.chip-done:hover {
    background: #dcfce7;
}

.btn-chip.chip-done.active {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Creditor Avatar/Color */
.creditor-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Dark Mode Overrides */
.dark-mode .btn-secondary {
    background: #374151;
    color: white;
    border-color: #4b5563;
}

.dark-mode .btn-secondary:hover {
    background: #4b5563;
}

.dark-mode .nav-item {
    color: #9ca3af;
}

.dark-mode .nav-item.active {
    color: var(--primary);
}

.dark-mode .bottom-nav {
    background: rgba(31, 41, 55, 0.95);
    border-top-color: #374151;
}

.dark-mode input,
.dark-mode select {
    background: #1f2937;
    color: white;
    border-color: #4b5563;
}

.dark-mode input:focus {
    background: #374151;
}

.dark-mode .list-item {
    background: #1f2937;
    border: 1px solid #374151;
}

.dark-mode .card {
    border: 1px solid #374151;
}

.dark-mode .modal-content {
    background: #1f2937;
}

.dark-mode .btn-chip {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

.dark-mode .btn-chip:hover {
    background: #4b5563;
    color: #d1d5db;
}

.dark-mode .btn-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Loading Skeletons --- */
@keyframes skeleton-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, #e2e8f0 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-card {
    background: var(--surface-solid);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.skeleton-line {
    height: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 70%;
}

.skeleton-line.full {
    width: 100%;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.dark-mode .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* --- Empty States --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 280px;
}

/* --- View Transitions --- */
.view-transition {
    animation: fadeSlideIn 0.3s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Gamification --- */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

.gamification-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 165, 0, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    }
}

.streak-counter {
    background: linear-gradient(135deg, #FF4500, #FF6347);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Swipe Actions (Gmail Style) --- */
.swipe-action-left,
.swipe-action-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 24px;
    z-index: 1;
    /* Behind content */
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    /* Let clicks pass through */
}

.swipe-action-left {
    right: 0;
    justify-content: flex-end;
    color: var(--danger);
}

.swipe-action-right {
    left: 0;
    justify-content: flex-start;
    color: var(--success);
}

/* Ensure content floats above actions */
.list-content-wrapper {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    /* Opaque background to hide actions */
    width: 100%;
    height: 100%;
    transition: transform 0.1s linear;
}

/* Fix for todo item structure change */
.todo-list .list-item {
    padding: 0 !important;
    background: transparent !important;
    /* Allow swipe bg to show */
    overflow: hidden;
    /* Clip actions */
    border: none !important;
}

.todo-list .list-item .list-content-wrapper {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================================
   PREMIUM DEBT CARD STYLES (v3.0)
   Modern Fintech Banking Design
   ========================================= */

/* Main Card Container */
.debt-card-premium {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
}

.debt-card-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.debt-card-premium.priority-high {
    border-left: 4px solid var(--accent-orange);
}

.debt-card-premium.liquidated {
    border-left: 4px solid var(--success);
    opacity: 0.85;
}

/* Card Header */
.debt-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.debt-creditor-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.debt-creditor-info {
    flex-grow: 1;
    min-width: 0;
}

.debt-creditor-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.debt-creditor-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Priority Badge */
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--accent-orange), #fb923c);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
    white-space: nowrap;
}

.priority-badge i {
    font-size: 0.8rem;
}

/* Dropdown Menu Button */
.debt-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.debt-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.dark-mode .debt-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(67, 24, 116, 0.05);
}

.dark-mode .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger i {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Hero Section - Main Amount */
.debt-hero {
    text-align: center;
    padding: 16px 0;
}

.debt-hero-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.debt-hero-amount.success {
    color: var(--success);
}

.debt-hero-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Contextual Info Section */
.debt-contextual-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.debt-contextual-info i {
    font-size: 1rem;
}

.debt-contextual-info .highlight {
    font-weight: 600;
    color: var(--text-main);
}

/* Progress Section */
.debt-progress-section {
    margin-bottom: 12px;
}

.debt-progress-bar-container {
    height: 10px;
    background: rgba(var(--text-muted), 0.1);
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.dark-mode .debt-progress-bar-container {
    background: #374151;
}

.debt-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.debt-progress-bar.gradient-purple {
    background: linear-gradient(90deg, var(--primary), #7c3aed);
}

.debt-progress-bar.gradient-orange {
    background: linear-gradient(90deg, var(--accent-orange), #fb923c);
}

.debt-progress-bar.gradient-green {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.debt-progress-bar.gradient-blue {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.debt-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.debt-progress-text .percentage {
    font-weight: 600;
}

/* Insight Tip */
.insight-tip {
    background: linear-gradient(135deg, rgba(67, 24, 116, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px solid rgba(67, 24, 116, 0.1);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dark-mode .insight-tip {
    background: rgba(67, 24, 116, 0.15);
    border-color: rgba(124, 58, 237, 0.2);
}

.insight-tip i {
    font-size: 1rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.insight-tip strong {
    color: var(--text-main);
}

/* Footer Actions */
.debt-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.debt-next-payment {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.debt-next-payment .amount {
    font-weight: 600;
    color: var(--text-main);
}

.debt-next-payment i {
    font-size: 0.9rem;
    cursor: help;
}

/* Pay Now Button */
.btn-pay-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(67, 24, 116, 0.25);
}

.btn-pay-now:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 24, 116, 0.35);
}

.btn-pay-now:active {
    transform: translateY(0);
}

.btn-pay-now i {
    font-size: 1rem;
}

/* Available Credit Indicator */
.available-credit-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.owe-indicator {
    font-size: 0.7rem;
    color: var(--danger);
    margin-top: 2px;
}

/* Installments Info */
.installments-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(59, 130, 246, 0.05);
    padding: 6px 10px;
    border-radius: 8px;
}

.dark-mode .installments-info {
    background: rgba(59, 130, 246, 0.1);
}

.installments-info i {
    color: #3b82f6;
}

.installments-info strong {
    color: var(--text-main);
}

/* Interest Breakdown */
.interest-breakdown {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(59, 130, 246, 0.03);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
}

.dark-mode .interest-breakdown {
    background: rgba(59, 130, 246, 0.08);
}

.interest-breakdown i {
    color: #3b82f6;
}

/* Quick Actions Row */
.debt-quick-actions {
    display: flex;
    gap: 8px;
}

.debt-quick-actions .btn-action {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
}

.debt-quick-actions .btn-action.edit {
    background: rgba(67, 24, 116, 0.08);
    color: var(--primary);
}

.debt-quick-actions .btn-action.edit:hover {
    background: rgba(67, 24, 116, 0.15);
}

.debt-quick-actions .btn-action.delete {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

.debt-quick-actions .btn-action.delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Completed Badge */
.completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--success), #34d399);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Dashboard Widgets */
.debt-free-date-widget {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.debt-free-date-widget .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.debt-free-date-widget .date {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Streak Badge */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.streak-badge i {
    font-size: 1rem;
}

/* Trend Indicator */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.trend-indicator.positive {
    color: var(--success);
}

.trend-indicator.negative {
    color: var(--danger);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .debt-hero-amount {
        font-size: 2rem;
    }

    .debt-card-premium {
        padding: 16px;
    }

    .btn-pay-now {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .priority-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}

/* === Modal Menu Improvements === */

/* Modal Header */
.modal-header-menu {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Close Button - Larger hitbox for accessibility */
.modal-close-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.2s ease;
    margin: -10px;
}

.modal-close-btn:hover {
    background: var(--border);
    color: var(--text-main);
}

.modal-close-btn:active {
    transform: scale(0.95);
}

/* Menu Options Container */
.menu-options-container {
    padding: 12px;
}

/* Menu Option Button */
.menu-option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.menu-option-btn:hover {
    background: var(--background);
}

.menu-option-btn:active {
    transform: scale(0.98);
}

/* Menu Option Icon */
.menu-option-icon {
    width: 40px;
    height: 40px;
    background: var(--background);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Menu Option Label */
.menu-option-label {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}

/* Menu Divider */
.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 16px;
}

/* Danger/Logout Styling */
.menu-option-danger .menu-option-label {
    color: var(--danger);
}

.menu-icon-danger {
    background: #FEE2E2;
    color: var(--danger);
}

.menu-option-danger:hover {
    background: #FEF2F2;
}

/* Dark Mode Overrides for Menu */
.dark-mode .menu-option-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .menu-option-icon {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode .menu-icon-danger {
    background: rgba(239, 68, 68, 0.2);
}

.dark-mode .menu-option-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* === Stat Mini Cards === */
.stat-mini-card {
    padding: 1rem;
    border-radius: 16px;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-mini-card.stat-success {
    background: var(--stat-success-bg);
}

.stat-mini-card.stat-danger {
    background: var(--stat-danger-bg);
}

.stat-mini-card.stat-warning {
    background: var(--stat-warning-bg);
}

.stat-mini-card.stat-info {
    background: var(--stat-info-bg);
}

/* ========================================
   AUTH SCREEN - Premium Login Experience
   ======================================== */

.auth-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

/* Animated Background Shapes */
.auth-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: floatShape 20s ease-in-out infinite;
}

.auth-bg-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #431874, #7c3aed);
    top: -100px;
    right: -50px;
    animation-delay: 0s;
}

.auth-bg-shape:nth-child(2) {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #2DD4BF, #14b8a6);
    bottom: -80px;
    left: -60px;
    animation-delay: -5s;
}

.auth-bg-shape:nth-child(3) {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #F43F5E, #ec4899);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-20px) rotate(5deg) scale(1.05);
    }

    50% {
        transform: translateY(10px) rotate(-3deg) scale(0.95);
    }

    75% {
        transform: translateY(-15px) rotate(2deg) scale(1.02);
    }
}

/* Logo Section */
.auth-logo-section {
    text-align: center;
    margin-bottom: 2rem;
    z-index: 1;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 20px 40px rgba(67, 24, 116, 0.4), 0 0 60px rgba(124, 58, 237, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
    position: relative;
}

.auth-logo-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--secondary), var(--primary), var(--secondary));
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 20px 40px rgba(67, 24, 116, 0.4), 0 0 60px rgba(124, 58, 237, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 25px 50px rgba(67, 24, 116, 0.5), 0 0 80px rgba(124, 58, 237, 0.4);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

.auth-logo-icon i {
    font-size: 44px;
    color: white;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 400;
}

/* Main Card - Glassmorphism */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle Segmented Control */
.auth-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 1.75rem;
    position: relative;
}

.auth-toggle-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

.auth-toggle-btn.active {
    color: white;
}

.auth-toggle-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(67, 24, 116, 0.4);
}

.auth-toggle-indicator.register {
    transform: translateX(100%);
}

/* Input Groups */
.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.25rem;
    transition: color 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15), 0 0 20px rgba(45, 212, 191, 0.1);
}

.auth-input:focus+.auth-input-icon,
.auth-input-group:focus-within .auth-input-icon {
    color: var(--secondary);
}

/* Password toggle visibility */
.auth-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    font-size: 1.25rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.auth-password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(67, 24, 116, 0.4);
}

.auth-submit-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 ease;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(67, 24, 116, 0.5);
}

.auth-submit-btn:hover::before {
    left: 100%;
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.auth-submit-btn:hover i {
    transform: translateX(4px);
}

/* Loading State */
.auth-submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-submit-btn.loading .auth-btn-text {
    opacity: 0;
}

.auth-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Footer Links */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-footer-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.auth-footer-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-footer-link:hover {
    color: #5eead4;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-screen {
        padding: 1.5rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.875rem;
    }

    .auth-logo-icon {
        width: 80px;
        height: 80px;
    }

    .auth-logo-icon i {
        font-size: 38px;
    }
}

/* ========================================
   ADMIN PANEL - Mobile-First Design
   ======================================== */

/* Admin Header */
.admin-header {
    margin-bottom: 1.5rem;
}

.admin-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Admin Section Cards */
.admin-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* User Cards */
.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-user-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.admin-user-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.admin-user-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.admin-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.admin-user-avatar.admin {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
}

.admin-user-avatar.user {
    background: linear-gradient(135deg, var(--secondary), #14b8a6);
    color: #0f3d39;
}

.admin-user-info {
    flex: 1;
    min-width: 0;
}

.admin-user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.admin-user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-badge-admin {
    background: #f3e8ff;
    color: #7c3aed;
}

.admin-badge-user {
    background: #e0f2fe;
    color: #0284c7;
}

.admin-badge-active {
    background: #dcfce7;
    color: #16a34a;
}

.admin-badge-blocked {
    background: #fee2e2;
    color: #dc2626;
}

.dark-mode .admin-badge-admin {
    background: rgba(124, 58, 237, 0.2);
}

.dark-mode .admin-badge-user {
    background: rgba(2, 132, 199, 0.2);
}

.dark-mode .admin-badge-active {
    background: rgba(22, 163, 74, 0.2);
}

.dark-mode .admin-badge-blocked {
    background: rgba(220, 38, 38, 0.2);
}

/* Permissions Section */
.admin-permissions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.admin-permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.admin-permission-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-permission-label i {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* iOS-style Toggle Switch */
.admin-toggle {
    position: relative;
    width: 52px;
    height: 32px;
    flex-shrink: 0;
}

.admin-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 32px;
    transition: all 0.3s ease;
}

.admin-toggle-slider::before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-toggle input:checked+.admin-toggle-slider {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}

.admin-toggle input:checked+.admin-toggle-slider::before {
    transform: translateX(20px);
}

.admin-toggle input:focus+.admin-toggle-slider {
    box-shadow: 0 0 0 3px rgba(67, 24, 116, 0.2);
}

.dark-mode .admin-toggle-slider {
    background-color: #475569;
}

/* User Actions */
.admin-user-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-action-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.admin-action-btn i {
    font-size: 1.1rem;
}

.admin-action-access {
    background: var(--primary);
    color: white;
}

.admin-action-access:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.admin-action-block {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.admin-action-block:hover {
    background: #fee2e2;
}

.admin-action-activate {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.admin-action-activate:hover {
    background: #bbf7d0;
}

.admin-action-delete {
    background: transparent;
    color: var(--danger);
    min-width: 48px;
    flex: 0;
    padding: 0.75rem;
}

.admin-action-delete:hover {
    background: #fee2e2;
}

.dark-mode .admin-action-block {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
}

.dark-mode .admin-action-activate {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(22, 163, 74, 0.3);
}

/* Tabs List */
.admin-tabs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-tab-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.admin-tab-item:hover {
    border-color: var(--primary);
}

.admin-tab-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-tab-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.admin-tab-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.admin-tab-delete {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fee2e2;
    color: var(--danger);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.admin-tab-delete:hover {
    background: #fecaca;
    transform: scale(1.05);
}

.dark-mode .admin-tab-delete {
    background: rgba(220, 38, 38, 0.2);
}

/* Empty State */
.admin-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.admin-empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.admin-empty-state p {
    font-size: 0.9rem;
}

/* Add Button */
.admin-add-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(67, 24, 116, 0.3);
}

.admin-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 24, 116, 0.4);
}

.admin-add-btn i {
    font-size: 1.25rem;
}

/* Responsive - Desktop */
@media (min-width: 640px) {
    .admin-user-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1rem;
    }

    .admin-section {
        padding: 1.5rem;
    }

    .admin-user-card {
        padding: 1.25rem;
    }
}

/* ========================================
   CALENDAR - Premium Mobile-First Design
   ======================================== */

/* Calendar Container */
.calendar-container {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

/* Calendar Header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-title {
    display: flex;
    flex-direction: column;
}

.calendar-month {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.calendar-year {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.calendar-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.calendar-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-nav-btn:active {
    transform: scale(0.95);
}

.calendar-today-btn {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary), #14b8a6);
    color: #0f3d39;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.3);
}

.calendar-today-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.4);
}

/* Calendar Grid */
.calendar-grid-premium {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
}

.calendar-weekday.weekend {
    color: var(--danger);
    opacity: 0.7;
}

/* Calendar Cells */
.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 48px;
}

.calendar-cell:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(67, 24, 116, 0.15);
    transform: translateY(-1px);
}

.calendar-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-cell.empty:hover {
    transform: none;
    box-shadow: none;
}

.calendar-cell-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.calendar-cell.today {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(67, 24, 116, 0.3);
}

.calendar-cell.today .calendar-cell-date {
    color: white;
}

.calendar-cell.today:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(67, 24, 116, 0.4);
}

.calendar-cell.has-events {
    background: linear-gradient(135deg, rgba(67, 24, 116, 0.08), rgba(124, 58, 237, 0.05));
    border-color: rgba(67, 24, 116, 0.2);
}

.calendar-cell.today.has-events {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}

/* Event Badge on Cell */
.calendar-event-badge {
    position: absolute;
    bottom: 4px;
    display: flex;
    gap: 3px;
    align-items: center;
}

.calendar-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-event-count {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--background);
    padding: 0 4px;
    border-radius: 4px;
}

.calendar-cell.today .calendar-event-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Upcoming Events Section */
.calendar-upcoming {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.calendar-upcoming-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.calendar-upcoming-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.calendar-upcoming-icon {
    color: var(--primary);
    font-size: 1.25rem;
}

.calendar-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-event-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.calendar-event-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.calendar-event-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.calendar-event-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.calendar-event-icon.primary {
    background: #f3e8ff;
    color: #7c3aed;
}

.calendar-event-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.calendar-event-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.calendar-event-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.calendar-event-icon.other {
    background: #f3f4f6;
    color: #6b7280;
}

.calendar-event-details {
    flex: 1;
    min-width: 0;
}

.calendar-event-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.calendar-event-time i {
    font-size: 0.9rem;
}

.calendar-empty-upcoming {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
}

.calendar-empty-upcoming i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Event Type Chips */
.event-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.event-type-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.event-type-chip.success {
    background: #dcfce7;
    color: #16a34a;
}

.event-type-chip.success.selected {
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.event-type-chip.primary {
    background: #f3e8ff;
    color: #7c3aed;
}

.event-type-chip.primary.selected {
    border-color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.event-type-chip.danger {
    background: #fee2e2;
    color: #dc2626;
}

.event-type-chip.danger.selected {
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.event-type-chip.warning {
    background: #fef3c7;
    color: #d97706;
}

.event-type-chip.warning.selected {
    border-color: #d97706;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.event-type-chip.info {
    background: #dbeafe;
    color: #2563eb;
}

.event-type-chip.info.selected {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.event-type-chip.other {
    background: #f3f4f6;
    color: #6b7280;
}

.event-type-chip.other.selected {
    border-color: #6b7280;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

/* Day Modal Improvements */
.day-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.day-modal-weekday {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.day-modal-date {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.day-modal-events {
    margin-bottom: 1.5rem;
}

.day-modal-events-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    border-left: 4px solid;
}

.day-event-content {
    flex: 1;
    min-width: 0;
}

.day-event-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.day-event-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.day-event-delete {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fee2e2;
    color: var(--danger);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.day-event-delete:hover {
    background: #fecaca;
    transform: scale(1.05);
}

.day-modal-form {
    background: var(--background);
    border-radius: 16px;
    padding: 1rem;
}

.day-modal-form-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.day-modal-input {
    width: 100%;
    padding: 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.day-modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 24, 116, 0.1);
}

.day-modal-input::placeholder {
    color: var(--text-muted);
}

/* Dark mode calendar adjustments */
.dark-mode .calendar-event-icon.success {
    background: rgba(22, 163, 74, 0.2);
}

.dark-mode .calendar-event-icon.primary {
    background: rgba(124, 58, 237, 0.2);
}

.dark-mode .calendar-event-icon.danger {
    background: rgba(220, 38, 38, 0.2);
}

.dark-mode .calendar-event-icon.warning {
    background: rgba(217, 119, 6, 0.2);
}

.dark-mode .calendar-event-icon.info {
    background: rgba(37, 99, 235, 0.2);
}

.dark-mode .event-type-chip.success {
    background: rgba(22, 163, 74, 0.2);
}

.dark-mode .event-type-chip.primary {
    background: rgba(124, 58, 237, 0.2);
}

.dark-mode .event-type-chip.danger {
    background: rgba(220, 38, 38, 0.2);
}

.dark-mode .event-type-chip.warning {
    background: rgba(217, 119, 6, 0.2);
}

.dark-mode .event-type-chip.info {
    background: rgba(37, 99, 235, 0.2);
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .calendar-cell {
        border-radius: 8px;
        min-height: 40px;
    }

    .calendar-cell-date {
        font-size: 0.85rem;
    }

    .calendar-month {
        font-size: 1.5rem;
    }

    .calendar-nav-btn {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   MODAL IMPROVEMENTS - Scroll Fix
   ======================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    overflow-y: auto;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.modal-content {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile adjustments for modal */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        padding: 1.25rem;
        margin-bottom: 0;
    }

    .day-modal-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }

    .day-modal-date {
        font-size: 1.5rem;
    }

    .event-type-chips {
        gap: 0.375rem;
    }

    .event-type-chip {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .day-modal-form {
        padding: 0.875rem;
    }

    .day-modal-input {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
}

/* Ensure delete button is clickable */
.day-event-delete {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 10;
}

/* Dark mode modal */
.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.dark-mode .modal-content {
    background: var(--bg-card);
}

/* ========================================
   ADVANCED CALENDAR MODAL STYLES
   ======================================== */

.modal-view-transition {
    transition: all 0.3s ease;
}

.event-detail-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.event-detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.event-detail-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.event-detail-row i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.event-detail-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-icon-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    flex: 1;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-icon-label:active {
    transform: scale(0.98);
}

.btn-edit {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.floating-add-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.floating-add-btn:active {
    transform: scale(0.9);
}

.form-group-icon {
    position: relative;
}

.form-group-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.form-input-icon {
    padding-left: 2.5rem !important;
}

.date-range-inputs {
    background: var(--surface);
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

/* Event Type Chips */
.event-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, background-color 0.2s;
    background: #f1f5f9;
}

.event-chip:hover {
    transform: scale(1.1);
    background: #e2e8f0;
}

.event-chip.selected {
    background: white;
    box-shadow: 0 0 0 2px var(--background), 0 0 0 4px currentColor;
    transform: scale(1.1);
}

.dark-mode .event-chip {
    background: #334155;
}

.dark-mode .event-chip:hover {
    background: #475569;
}

.dark-mode .event-chip.selected {
    background: #1e293b;
}
