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

:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --border: rgba(255, 255, 255, 0.05);
    --primary: #9333ea;
    --primary-glow: rgba(147, 51, 234, 0.2);
    --primary-hover: #a855f7;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --font: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Main Gradient Glow System */
    background-image:
        radial-gradient(circle at 20% 30%, rgba(147, 51, 234, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(147, 51, 234, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

input,
textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Atmospheric Mash Glow Blobs */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 10%, rgba(147, 51, 234, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 90% 100%, rgba(147, 51, 234, 0.08) 0%, transparent 50%);
    z-index: -2;
    filter: blur(100px);
    animation: float-glow 25s infinite alternate ease-in-out;
    pointer-events: none;
}

/* Premium Noise Texture Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle 4% Noise Grain */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
}

@keyframes float-glow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(-2%, 2%);
    }
}


/* Minimalist Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
}

/* Navbar & Mobile Menu Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

.brand-logo .material-icons {
    color: var(--primary);
    font-size: 1.6rem;
}

/* Desktop Navigation in Navbar (centered) */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

.logout-hover:hover {
    background: var(--danger) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.nav-center-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

@media (max-width: 1024px) {
    .nav-center-container {
        display: none;
    }
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Hamburger "X" Animation */
.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Dropdown Overlay (Croto.in style) */
/* Mobile Menu (Sidebar Style) */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-header span:first-child {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
}

.mobile-nav-tab .material-icons {
    font-size: 1.4rem;
}

.mobile-nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.mobile-nav-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.mobile-nav-tab.logout-btn {
    color: var(--danger);
    margin-top: 1rem;
}

.mobile-nav-tab.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}


/* Utility Classes */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.mt-6 {
    margin-top: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Classes (Premium) */
.glass-panel,
.glass-card,
.glass-header {
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}


/* Layout views */
.view-container {
    display: none;
    min-height: 90vh;
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

.active-view {
    display: flex;
    /* Overridden in dashboard */
}

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

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

/* Login specific layout */
#login-view.active-view,
#register-view.active-view {
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 2rem; */
}

/* Cards */
.login-card {
    padding: 1rem;
    width: 100%;
    max-width: 420px;
}

.brand {
    text-align: center;
    margin-bottom: 2rem;
}

.brand h1,
.brand h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.brand p {
    color: var(--text-muted);
    font-weight: 300;
}

.brand-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.brand-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.brand-small b {
    font-weight: 700;
}

/* Tabs */
.role-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

/* Admin Tabs Navigation (Premium Upgrade) */
.admin-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin: 1.5rem auto;
    max-width: 900px;
    width: fit-content;
    border-radius: 100px;
    /* Pill shape */
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    /* Pill buttons */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-tab i,
.nav-tab .material-icons {
    font-size: 1.2rem;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    transform: translateY(-1px);
}

.nav-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
    display: block;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        display: none !important;
    }

    /* Reduced padding for maximum screen usage */
    .dashboard-content {
        padding: 1.25rem 0.35rem 0.5rem !important;
    }

    .main-panel {
        padding: 1rem 0.5rem !important;
    }

    /* Stat Cards Optimization */
    .stat-card,
    .action-card {
        padding: 1.25rem 1rem !important;
    }

    .stat-value {
        font-size: 2rem !important;
        /* Smaller stat text */
    }

    /* Smaller Typography */
    h3 {
        font-size: 1.1rem !important;
    }

    .gradient-text {
        font-size: 1.2rem !important;
    }

    /* Hide elements not needed on mobile */
    .hide-mobile {
        display: none !important;
    }

    /* Compact table headers on mobile */
    .glass-table thead th {
        font-size: 0.7rem !important;
        padding: 0.5rem 0.4rem !important;
        letter-spacing: 0.02em;
    }

    .glass-table tbody td {
        padding: 0.5rem 0.4rem !important;
        font-size: 0.85rem !important;
    }

    /* Table Responsive Roster Stacking — Name on top, RegNo below */
    #admin-roster-body td:nth-child(1) {
        display: block !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
        font-size: 0.95rem !important;
        font-weight: 600;
    }

    #admin-roster-body td:nth-child(2) {
        display: block !important;
        padding-top: 0.15rem !important;
        padding-bottom: 0.5rem !important;
        font-size: 0.8rem !important;
        color: var(--text-muted) !important;
    }
}

/* Form Elements */
.input-group {
    margin-bottom: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-group input,
.glass-input,
.glass-select,
textarea {
    width: 100%;
    padding: 0.8rem 1.5rem 0.8rem 3rem;
    /* padding icon and arrow */
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus,
.glass-input:focus,
.glass-select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Custom Select Arrow Fix */
.glass-select, 
.input-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                      linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px),
                         calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px,
                     5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.5rem !important; /* Force space so text doesn't overlap arrow */
}

.glass-input,
.glass-select,
textarea {
    padding: 0.8rem 1rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.primary {
    background: var(--primary);
    color: white;
}

.primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px var(--primary-glow);
}

.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.logout-hover:hover {
    background: var(--danger) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.success {
    background: var(--success);
    color: white;
}

.success:hover {
    opacity: 0.9;
}

.icon-btn {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.full-width {
    width: 100%;
}

.error-msg {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
    min-height: 1.2em;
}

.register-prompt {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.register-prompt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.register-prompt a:hover {
    text-decoration: underline;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    accent-color: var(--primary);
    padding: 0;
    width: auto;
}

/* Dashboard Layout */
.dashboard-layout {
    flex-direction: column;
}

#student-view.active-view,
#admin-view.active-view {
    display: flex;
}

.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

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

.stat-card {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

.stat-subtitle {
    color: var(--text-muted);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.action-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}

.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(45deg, var(--primary), transparent, var(--success));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.3;
}

/* Table styling */
.main-panel {
    padding: 1.5rem;
}

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

.custom-table-wrapper {
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.glass-table th,
.glass-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.glass-table tbody tr {
    transition: background-color 0.2s;
}

.glass-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.glass-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.text-center {
    text-align: center !important;
}

/* Admin Controls */
.attendance-controls {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.control-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-align {
    min-width: 150px;
    flex: 0;
}

/* Toggle Switch / Radio */
.switch-wrapper {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.status-radio {
    display: none;
}

.status-label {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-radio.present:checked+.status-label {
    background: var(--success);
    color: white;
}

.status-radio.absent:checked+.status-label {
    background: var(--danger);
    color: white;
}

.roster-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.5rem;
}

/* Consolidated Modal styles are below at Premium Section */

.modal-card {
    padding: 2rem;
    width: 90%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-subtitle {
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* Utilities */
.icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    aspect-ratio: 1/1;
    padding: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

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

.mt-6 {
    margin-top: 2rem;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Desktop overrides */
@media (min-width: 768px) {
    .action-align {
        flex: initial;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide desktop links */
    }

    .hamburger {
        display: flex;
        /* Show completely */
    }

    .glass-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }

    .user-profile {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .panel-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .attendance-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group,
    .action-align {
        width: 100%;
        min-width: unset;
    }

    .glass-table th,
    .glass-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .login-card {
        padding: 1.5rem;
        margin: 1rem;
        max-width: 90%;
    }

    .brand h1,
    .brand h2 {
        font-size: 2rem;
    }

    .switch-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .status-label {
        width: 100%;
        text-align: center;
        display: block;
    }
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    background: var(--surface);
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out forwards;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Custom Modal Popups (Premium) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-card {
    width: 90%;
    max-width: 420px;
    padding: 2rem;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

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

.btn.outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Quick Actions (3-dot kebab menu) */
.action-menu-container {
    position: relative;
    display: inline-block;
}

.btn-more {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
}

.btn-more:hover {
    background: rgba(147, 51, 234, 0.3);
    border-color: var(--primary);
    transform: scale(1.1);
}

.action-dropdown {
    position: absolute;
    right: 1.5rem;
    top: 0;
    width: 180px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 5000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-dropdown.active {
    display: flex;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

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

.action-dropdown .menu-item {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 0.8rem 1rem;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-dropdown .menu-item .material-icons {
    font-size: 1.1rem;
}

.action-dropdown .menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.action-dropdown .menu-item.danger {
    color: var(--danger);
}

.action-dropdown .menu-item.success {
    color: var(--success);
}

.action-dropdown .menu-item:hover:not(.danger):not(.success) {
    color: var(--primary);
}

/* ======================================
   Attendance Toggle Pill (Mobile Switch)
   ====================================== */

/* The two radio labels — visible on desktop, hidden on mobile */
.switch-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.status-radio {
    display: none;
    /* Always hidden, JS reads values */
}

/* Desktop: show labels as pill buttons */
.status-label {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.status-radio.present:checked+.status-label {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.status-radio.absent:checked+.status-label {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.status-label:not(.status-radio:checked + .status-label) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile single-tap toggle pill */
.att-toggle-pill {
    display: none;
    /* Hidden on desktop */
}

@media (max-width: 768px) {

    /* Hide the two desktop labels on mobile */
    .desktop-only {
        display: none !important;
    }

    /* Show the single toggle pill on mobile */
    .att-toggle-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 1.4rem;
        border-radius: 999px;
        border: none;
        font-size: 0.9rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        min-width: 90px;
        letter-spacing: 0.02em;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .att-toggle-pill.is-present {
        background: var(--success);
        color: white;
        box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
    }

    .att-toggle-pill.is-absent {
        background: var(--danger);
        color: white;
        box-shadow: 0 3px 12px rgba(239, 68, 68, 0.4);
    }

    .att-toggle-pill:active {
        transform: scale(0.95);
    }
}

/* ======================================
   Premium Login Page CSS
   ====================================== */

.login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    width: 100%;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 24px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.login-logo-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.2);
    margin-bottom: 1rem;
    box-shadow: inset 0 0 20px rgba(147, 51, 234, 0.1), 0 0 20px rgba(147, 51, 234, 0.15);
}

.login-logo-ring .brand-icon {
    font-size: 2rem;
    color: var(--primary);
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-footer-link {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
}

.login-footer-link a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-footer-link a:hover {
    color: var(--text);
}

/* Mobile Login Optimization (for 395px heights / standard phones to prevent scrolling) */
@media (max-width: 480px) {
    .login-page-wrapper {
        padding: 0.75rem;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
        /* Drastically reduce inner padding */
        margin: 10px
    }

    .login-logo-ring {
        width: 48px;
        height: 48px;
        margin-bottom: 0.5rem;
        /* Less space under logo */
    }

    .login-logo-ring .brand-icon {
        font-size: 1.5rem;
    }

    .login-subtitle {
        margin-bottom: 1.25rem;
        /* Less space above inputs */
        font-size: 0.75rem;
    }

    .login-footer-link {
        margin-top: 1.25rem;
        /* Less space above footer link */
    }

    .input-group {
        margin-bottom: 1rem;
        /* Less vertical margin on inputs */
    }
}