@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg-dark: #0f0f1a;
    --bg-card: rgba(255,255,255,0.05);
    --glass: rgba(255,255,255,0.08);
    --glass-border: rgba(255,255,255,0.12);
    --text-bright: #f1f5f9;
    --text-muted: #94a3b8;
    --shadow-color: rgba(99,102,241,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-bright);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,0.14) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 60% 30%, rgba(16,185,129,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(15,15,26,0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 32px rgba(0,0,0,0.4);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #6366f1, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease, filter 0.3s ease;
    letter-spacing: -0.5px;
}
.navbar-brand:hover { transform: scale(1.06); filter: brightness(1.2); }

.nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.25s ease;
}
.nav-link:hover {
    color: #fff !important;
    background: rgba(99,102,241,0.2) !important;
    transform: translateY(-1px);
}

.dropdown-menu {
    background: rgba(20,20,35,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    padding: 0.5rem;
}
.dropdown-item {
    color: var(--text-bright);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.dropdown-item:hover { background: rgba(99,102,241,0.2); color: #fff; }

/* ===== CARDS ===== */
.card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.3),
        0 1px 0 rgba(255,255,255,0.08) inset;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform: perspective(1000px) rotateX(0deg);
}
.card:hover {
    transform: perspective(1000px) translateY(-6px) rotateX(1.5deg);
    box-shadow:
        0 24px 60px rgba(0,0,0,0.45),
        0 0 0 1px rgba(99,102,241,0.3),
        0 1px 0 rgba(255,255,255,0.1) inset;
    border-color: rgba(99,102,241,0.35) !important;
}

.card-header {
    background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(129,140,248,0.2)) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 1.1rem 1.4rem;
    letter-spacing: 0.01em;
}

.card-body { padding: 1.5rem; }

/* ===== BUTTONS ===== */
.btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
    border: none;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.4), 0 1px 0 rgba(255,255,255,0.15) inset;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99,102,241,0.55), 0 1px 0 rgba(255,255,255,0.2) inset;
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16,185,129,0.4);
}
.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(16,185,129,0.5);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239,68,68,0.4);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(239,68,68,0.5);
    color: #fff;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-light);
    border: 1.5px solid rgba(99,102,241,0.5) !important;
}
.btn-outline-primary:hover {
    background: rgba(99,102,241,0.15);
    color: #fff;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
}

.btn-outline-success {
    background: transparent;
    color: #34d399;
    border: 1.5px solid rgba(16,185,129,0.5) !important;
}
.btn-outline-success:hover {
    background: rgba(16,185,129,0.15);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid rgba(255,255,255,0.15) !important;
}
.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.3) !important;
}

.btn-dark {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border) !important;
    color: #fff;
}
.btn-dark:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-2px);
    color: #fff;
}

/* ===== FORMS ===== */
.form-control, .form-select {
    background: rgba(255,255,255,0.06) !important;
    border: 1.5px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px;
    color: var(--text-bright) !important;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}
.form-control::placeholder { color: rgba(148,163,184,0.6); }
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.09) !important;
    border-color: rgba(99,102,241,0.6) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.18) !important;
    outline: none;
    color: #fff !important;
}
.form-select option { background: #1a1a2e; color: #fff; }

.form-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
}

/* ===== CHECKBOXES ===== */
.form-check-input {
    width: 1.3em; height: 1.3em;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: transparent;
    transition: all 0.2s ease;
    appearance: none; -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 65% 65%;
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 8l4 4 8-8'/%3e%3c/svg%3e");
    box-shadow: 0 0 10px rgba(99,102,241,0.5);
}
.form-check-input:hover { border-color: var(--primary); }
.form-check-label {
    cursor: pointer;
    margin-left: 0.6rem;
    color: var(--text-bright);
    font-size: 0.92rem;
    transition: all 0.2s ease;
    user-select: none;
}
.form-check-input:checked ~ .form-check-label {
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ===== PROGRESS BAR ===== */
.progress {
    background: rgba(255,255,255,0.07);
    border-radius: 100px;
    height: 1.4rem;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
}
#progressBar, .progress-bar {
    background: linear-gradient(90deg, #6366f1, #818cf8, #a78bfa);
    background-size: 200% 100%;
    animation: shimmer 2.5s linear infinite;
    border-radius: 100px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 16px rgba(99,102,241,0.6);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== LIST GROUPS ===== */
.list-group-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 10px !important;
    padding: 0.9rem 1.1rem;
    color: var(--text-bright);
    transition: all 0.25s ease;
    margin-bottom: 0.4rem;
}
.list-group-item:hover {
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.3) !important;
    transform: translateX(4px);
}
.list-group-flush .list-group-item { border-radius: 0 !important; margin-bottom: 0; }

/* ===== ALERTS ===== */
.alert {
    border: none !important;
    border-radius: 12px;
    border-left: 4px solid transparent !important;
    backdrop-filter: blur(10px);
    animation: slideInDown 0.3s ease;
    font-size: 0.92rem;
}
.alert-danger {
    background: rgba(239,68,68,0.12) !important;
    border-left-color: #ef4444 !important;
    color: #fca5a5;
}
.alert-success {
    background: rgba(16,185,129,0.12) !important;
    border-left-color: #10b981 !important;
    color: #6ee7b7;
}
.alert-warning {
    background: rgba(245,158,11,0.12) !important;
    border-left-color: #f59e0b !important;
    color: #fcd34d;
}
.alert-info {
    background: rgba(59,130,246,0.12) !important;
    border-left-color: #3b82f6 !important;
    color: #93c5fd;
}
.btn-close { filter: invert(1) opacity(0.7); }

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 6px;
    padding: 0.3em 0.65em;
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 1.5rem 0 0.5rem;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f1f5f9, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 18px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 18px 18px 0 0;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(99,102,241,0.25);
}
.stat-card h6 {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}
.stat-card h2, .stat-card h3 {
    color: var(--primary-light);
    font-weight: 800;
    margin: 0;
}
.stat-card.success-stat::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.success-stat h2, .stat-card.success-stat h3 { color: #34d399; }
.stat-card.danger-stat::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card.danger-stat h2, .stat-card.danger-stat h3 { color: #f87171; }
.stat-card.warning-stat::before { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.stat-card.warning-stat h2, .stat-card.warning-stat h3 { color: #fcd34d; }

/* ===== AUTH PAGES ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0a0a18;
}

.auth-bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.auth-bg-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: orbFloat 12s ease-in-out infinite;
}
.auth-bg-orbs .orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #6366f1, transparent);
    top: -150px; left: -150px;
    animation-delay: 0s;
}
.auth-bg-orbs .orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #a78bfa, transparent);
    bottom: -100px; right: -100px;
    animation-delay: -6s;
}
.auth-bg-orbs .orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #10b981, transparent);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -3s;
}
@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    33% { transform: translateY(-30px) scale(1.05); }
    66% { transform: translateY(20px) scale(0.95); }
}

.auth-card-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
}

.auth-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    box-shadow:
        0 32px 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 1px 0 rgba(255,255,255,0.15) inset;
    animation: cardEntrance 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    transform-style: preserve-3d;
}
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: perspective(1000px) translateY(40px) rotateX(8deg);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) translateY(0) rotateX(0deg);
    }
}

.auth-logo {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 12px 40px rgba(99,102,241,0.5);
    animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
    0%, 100% { box-shadow: 0 12px 40px rgba(99,102,241,0.5); }
    50% { box-shadow: 0 16px 55px rgba(99,102,241,0.75), 0 0 0 8px rgba(99,102,241,0.08); }
}

.auth-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 1.2;
}
.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.4rem;
}

.auth-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 1.8rem 0;
}

.auth-footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0;
}
.auth-footer-text a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.auth-footer-text a:hover { color: #fff; }

.auth-copyright {
    text-align: center;
    color: rgba(148,163,184,0.4);
    font-size: 0.78rem;
    margin-top: 1.5rem;
}

/* Input group icons */
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(148,163,184,0.6);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 5;
}
.input-icon-wrap .form-control {
    padding-left: 2.7rem !important;
}
.input-icon-wrap .form-control:focus + .input-icon,
.input-icon-wrap:focus-within .input-icon { color: var(--primary-light); }

/* ===== CALENDAR ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
    margin-top: 1.5rem;
}
.calendar-header {
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.calendar-cell {
    display: block;
    min-height: 80px;
    border-radius: 12px;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--text-bright);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.calendar-cell:hover {
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.1);
    box-shadow: 0 6px 20px rgba(99,102,241,0.2);
    transform: translateY(-3px) scale(1.02);
    color: #fff;
}
.calendar-cell.empty { background: transparent; border: none; }
.calendar-cell.completed {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
}
.calendar-cell.partial {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.3);
}
.calendar-cell.missed {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.25);
}
.day-number { font-weight: 700; font-size: 1.1rem; }
.day-points { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ===== TEXT UTILITIES ===== */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-light) !important; }
h1, h2, h3, h4, h5, h6 { color: var(--text-bright); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar-brand { font-size: 1.2rem; }
    .card-body { padding: 1rem; }
    .auth-card { padding: 2rem 1.5rem; }
    .calendar-cell { min-height: 65px; padding: 0.5rem; }
    .day-number { font-size: 0.95rem; }
    .day-points { font-size: 0.7rem; }
    h1 { font-size: 1.5rem !important; }
}
@media (max-width: 576px) {
    .auth-card-wrap { padding: 1rem; }
    .auth-card { padding: 1.75rem 1.25rem; border-radius: 20px; }
    .calendar-cell { min-height: 55px; padding: 0.4rem; }
    .btn { font-size: 0.85rem; }
    .stat-card { margin-bottom: 1rem; }
}
@media (max-width: 400px) {
    .calendar-cell { min-height: 48px; font-size: 0.75rem; }
    .day-number { font-size: 0.8rem; }
}
