/* ==========================================================================
   DCRUST ATTENDANCE CHECKER - MODERN GLASSMORPHIC CYBER DARK THEME
   ========================================================================== */

:root {
    --bg-color: #080a10;
    --bg-radial: radial-gradient(circle at 50% 0%, #171c2f 0%, #080a10 75%);
    --card-bg: rgba(16, 22, 38, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(99, 102, 241, 0.35);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-start: #6366f1;
    --accent-mid: #8b5cf6;
    --accent-end: #d946ef;
    --accent-gradient: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-mid) 50%, var(--accent-end) 100%);
    
    --wa-green: #25d366;
    --wa-green-glow: rgba(37, 211, 102, 0.25);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --danger: #f43f5e;
    --danger-glow: rgba(244, 63, 94, 0.3);

    --present-text-color: #10b981;
    --absent-text-color: #f43f5e;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-color: #f8fafc;
    --text-muted-color: #94a3b8;
    --accent-color: #6366f1;
    --accent-hover-color: #4f46e5;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* Reset & Ambient Background */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-radial);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Ambient Lighting Orbs */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

.bg-glow-1 {
    top: -120px;
    left: 10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 70%);
}

.bg-glow-2 {
    top: 300px;
    right: 5%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, transparent 70%);
}

.bg-glow-3 {
    bottom: -60px;
    left: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
}

/* Main Container Frame */
.container, .main-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 44rem;
    background: var(--card-bg);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(99, 102, 241, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 2rem;
    margin-bottom: 2.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Brand Header */
.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Official University Crest Banner */
.univ-crest-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 25px -5px rgba(99, 102, 241, 0.25);
    text-align: left;
}

.univ-crest-logo {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6));
    flex-shrink: 0;
}

.univ-crest-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.univ-haryana-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.univ-official-name {
    font-size: 0.96rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.univ-location {
    font-size: 0.74rem;
    color: #94a3b8;
    font-weight: 500;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.pulsing-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

h1, .main-title {
    font-size: 2.15rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 20%, #93c5fd 45%, #c084fc 75%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.sub-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* WhatsApp Official Community Pill */
.wa-community-pill {
    margin: 0.75rem auto 1.25rem;
    display: inline-block;
}

.wa-community-pill a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.3);
    color: #4ade80;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.1);
}

.wa-community-pill a:hover {
    background: rgba(37, 211, 102, 0.16);
    border-color: rgba(37, 211, 102, 0.5);
    color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.2);
}

.wa-icon {
    font-size: 1rem;
}

.arrow-right {
    transition: transform 0.2s ease;
}

.wa-community-pill a:hover .arrow-right {
    transform: translateX(3px);
}

/* Announcement Banner */
.ad-banner {
    background: rgba(99, 102, 241, 0.07);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    text-align: center;
}

.ad-banner a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
}

.ad-banner a:hover {
    text-decoration: underline;
}

/* Form Groups & Inputs */
#attendance-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.input-group, #attendance-form > div:not(.password-wrapper, .forgot-password-container, .tos-container) {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 0.95rem;
    opacity: 0.6;
    pointer-events: none;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.6rem;
    background: rgba(10, 14, 26, 0.65);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Fallback for form without input-wrapper icon */
#attendance-form input[type="text"]:not(.input-wrapper input),
#attendance-form .password-wrapper input {
    padding-left: 1rem;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--accent-start);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

input::placeholder {
    color: #475569;
}

/* Password Toggle Wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 3rem;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.toggle-password-btn:hover {
    color: var(--text-primary);
}

.toggle-password-btn svg {
    width: 20px;
    height: 20px;
}

/* Links & Tos */
.forgot-password-container {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.4rem;
}

.forgot-password-link {
    color: #818cf8;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

.tos-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

.tos-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-start);
    cursor: pointer;
}

.tos-container a {
    color: #818cf8;
    text-decoration: none;
}

.tos-container a:hover {
    text-decoration: underline;
}

/* Main Action Button - Vibrant University Level */
#submit-btn {
    width: 100%;
    padding: 1.05rem 1.75rem;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #10b981 100%);
    background-size: 200% auto;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.55), 0 0 20px rgba(6, 182, 212, 0.35);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

#submit-btn:hover:not(:disabled) {
    background-position: right center;
    transform: translateY(-2px) scale(1.008);
    box-shadow: 0 16px 36px -5px rgba(6, 182, 212, 0.65), 0 0 30px rgba(16, 185, 129, 0.45);
    filter: brightness(1.1);
}

#submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

#submit-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
}

/* Share Button */
.share-wa-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4ade80;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem auto 1.5rem;
    padding: 8px 16px;
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: var(--radius-full);
    width: fit-content;
    transition: all 0.2s ease;
}

.share-wa-link:hover {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

/* Loading & Messages */
.loading-container {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #a5b4fc;
    font-size: 1rem;
    font-weight: 500;
}

.loading-container p {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.loading-container p::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--accent-start);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fda4af;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Results Table & Subject Cards */
.results-container-div {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.sem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.25rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    font-weight: 600;
}

.page-sem {
    color: #c7d2fe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-date {
    color: var(--text-muted);
}

/* Overall University Scoreboard Card */
.univ-scoreboard-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px -5px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
}

.univ-scoreboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981, #f59e0b, #ec4899);
}

.scoreboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.scoreboard-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scoreboard-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.scoreboard-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.scoreboard-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
}

.scoreboard-main-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 520px) {
    .scoreboard-main-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.scoreboard-circular-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 20px;
    padding: 1.25rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

.scoreboard-grand-perc {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.scoreboard-perc-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.scoreboard-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.scoreboard-stat-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scoreboard-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.scoreboard-stat-lbl {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.scoreboard-badge-row {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.univ-eligibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.univ-eligibility-badge.safe {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
}

.univ-eligibility-badge.warning {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.univ-eligibility-badge.danger {
    background: rgba(244, 63, 94, 0.18);
    border: 1px solid rgba(244, 63, 94, 0.45);
    color: #f87171;
}

/* Subject List Card */
.subject-list-item {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.subject-list-item.status-safe {
    border-left: 5px solid var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.75) 100%);
}

.subject-list-item.status-warning {
    border-left: 5px solid var(--warning);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0.75) 100%);
}

.subject-list-item.status-danger {
    border-left: 5px solid var(--danger);
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(15, 23, 42, 0.75) 100%);
}

.univ-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.univ-status-pill.safe {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.univ-status-pill.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.univ-status-pill.danger {
    background: rgba(244, 63, 94, 0.2);
    color: #f87171;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.subject-list-item:hover {
    background: rgba(24, 33, 56, 0.85);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-3px) scale(1.006);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 25px -5px rgba(99, 102, 241, 0.3);
}

.subject-list-item.changed {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 15px -3px rgba(16, 185, 129, 0.25);
}

.upd-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: var(--success);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.sl-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.sl-left {
    flex: 1;
}

.sl-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.sl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.sl-code {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #f1f5f9;
}

.sl-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.sl-right {
    text-align: right;
    flex-shrink: 0;
}

.sl-perc {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 3px;
}

.sl-ratio {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.sl-prediction {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.sl-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Progress Track */
.sl-progress-container {
    margin-bottom: 0.5rem;
}

.sl-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.sl-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px currentColor;
}

/* Accordion Daily Details & Class Logs */
.sl-logs-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sl-logs-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

.subject-list-item.is-expanded .sl-logs-toggle-btn {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.45);
    color: #a5b4fc;
}

.sl-logs-toggle-btn .toggle-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
    font-size: 0.75rem;
    margin-left: 6px;
}

.subject-list-item.is-expanded .sl-logs-toggle-btn .toggle-arrow {
    transform: rotate(180deg);
}

.mini-pill-group {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    margin-left: 6px;
}

.mini-pill {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.mini-pill.present {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.2);
}

.mini-pill.absent {
    background: rgba(244, 63, 94, 0.22);
    color: #ff453a;
    border: 1px solid rgba(244, 63, 94, 0.55);
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.25);
}

.mini-pill.leave {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
}

/* Master Expand All button */
.expand-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expand-all-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* Daily Details Container */
.subject-details-container {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    animation: fadeIn 0.25s ease;
}

.subject-details-container.open {
    display: block !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Filter pills in logs container */
.logs-filter-bar {
    display: flex;
    gap: 7px;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.chip-all.active {
    background: var(--accent-start);
    border-color: var(--accent-start);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.filter-chip.chip-absent {
    color: #ff453a;
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(244, 63, 94, 0.08);
}

.filter-chip.chip-absent:hover, .filter-chip.chip-absent.active {
    background: #f43f5e;
    border-color: #f43f5e;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}

.filter-chip.chip-leave {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.08);
}

.filter-chip.chip-leave:hover, .filter-chip.chip-leave.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.filter-chip.chip-present {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}

.filter-chip.chip-present:hover, .filter-chip.chip-present.active {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.details-table-header {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.4rem;
}

.inner-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.84rem;
    border-radius: 6px;
    margin-bottom: 3px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.inner-details-row.row-status-present {
    border-left: 3px solid #10b981;
    background: rgba(16, 185, 129, 0.03);
}

.inner-details-row.row-status-present:hover {
    background: rgba(16, 185, 129, 0.08);
}

.inner-details-row.row-status-absent {
    border-left: 3px solid #ff453a;
    background: rgba(244, 63, 94, 0.04);
}

.inner-details-row.row-status-absent:hover {
    background: rgba(244, 63, 94, 0.1);
}

.inner-details-row.row-status-leave {
    border-left: 3px solid #f59e0b;
    background: rgba(245, 158, 11, 0.03);
}

.inner-details-row.row-status-leave:hover {
    background: rgba(245, 158, 11, 0.08);
}

.inner-details-row:last-child {
    border-bottom: none;
}

/* Distinct Status Badges */
.status-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}

/* PRESENT - Emerald Green */
.status-badge.status-present {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.45);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

/* ABSENT - High-Contrast Crimson Red */
.status-badge.status-absent {
    background: rgba(244, 63, 94, 0.22);
    color: #ff453a !important;
    border: 1px solid rgba(244, 63, 94, 0.55);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

/* LEAVE - Warm Golden Amber */
.status-badge.status-leave {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}


/* Footer & Metrics */
footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 22rem;
    margin: 0 auto 1rem;
}

.stat-item {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.6rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.stat-item span {
    display: block;
    font-size: 1.45rem;
    font-weight: 900;
    background: linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.stat-item label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-since {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

.footer-credits {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-credits p {
    font-size: 0.82rem;
}

.footer-founders {
    color: #cbd5e1;
    font-weight: 600;
}

.footer-founders strong {
    color: #818cf8;
}

.footer-thanks {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.footer-admin-link {
    margin-top: 1rem;
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s ease;
    opacity: 0.5;
}

.footer-admin-link:hover {
    opacity: 1;
    color: #818cf8;
}

/* Student Initiative Disclaimer Modal */
.disclaimer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    transition: opacity 0.25s ease;
}

.disclaimer-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 100%);
    border: 1px solid rgba(99, 102, 241, 0.45);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px rgba(99, 102, 241, 0.35);
    padding: 2.25rem 2rem;
    max-width: 32rem;
    width: 100%;
    text-align: center;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.disclaimer-icon-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.disclaimer-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
}

.disclaimer-highlight-pill {
    display: inline-block;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disclaimer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.disclaimer-text p {
    margin: 0 0 0.75rem 0;
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

.disclaimer-checkbox-container {
    margin: 1.25rem 0 1.5rem 0;
    text-align: left;
}

.disclaimer-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #e2e8f0;
    user-select: none;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.disclaimer-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
}

.disclaimer-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #6366f1;
}

.disclaimer-confirm-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.95rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, opacity 0.2s ease;
}

.disclaimer-confirm-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
    filter: brightness(1.1);
}

.disclaimer-confirm-btn:active:not(:disabled) {
    transform: translateY(0);
}

.disclaimer-confirm-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: grayscale(0.6);
    pointer-events: none;
}

/* Promo Modal Popup */
.promo-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.popup-content {
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 30px rgba(99, 102, 241, 0.25);
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
    position: relative;
    text-align: center;
}

.popup-content h3 {
    font-size: 1.3rem;
    color: #f8fafc;
    margin-bottom: 0.75rem;
}

.popup-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.popup-btn {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-btn:hover {
    color: #fff;
}

.hidden {
    display: none !important;
}

/* Today's Schedule & Live Class Tracker Card */
.today-overview-box {
    background: rgba(17, 24, 39, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.today-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.today-overview-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.today-overview-badge.active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.today-overview-badge.neutral {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}

.live-indicator-pill {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    animation: statusPulse 1.8s infinite ease-in-out;
}

.today-highlight-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.highlight-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.highlight-row.live {
    border-left: 3px solid #ef4444;
    padding-left: 10px;
    margin-bottom: 8px;
}

.highlight-row.next {
    border-left: 3px solid #38bdf8;
    padding-left: 10px;
}

.highlight-row.done {
    border-left: 3px solid #10b981;
    padding-left: 10px;
}

.highlight-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.highlight-row.live .highlight-label { color: #f87171; }
.highlight-row.next .highlight-label { color: #38bdf8; }
.highlight-row.done .highlight-label { color: #34d399; }

.highlight-subject {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.highlight-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.today-status-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0.5rem 0 0.25rem 0;
}

.today-sub-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.today-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}

.timeline-slot {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
}

.timeline-slot.live {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
}

.timeline-slot.upcoming {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
}

.timeline-slot.completed {
    opacity: 0.5;
}

.slot-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.slot-code {
    font-weight: 700;
    color: #f8fafc;
}

.slot-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.slot-badge.live { background: rgba(239, 68, 68, 0.25); color: #f87171; }
.slot-badge.upcoming { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.slot-badge.completed { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }

/* Responsive adjustments */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.5rem;
    }

    .container, .main-wrapper {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }

    .univ-crest-badge {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 1rem;
    }

    .univ-crest-logo {
        margin: 0 auto;
    }

    .univ-haryana-badge {
        justify-content: center;
    }

    h1, .main-title {
        font-size: 1.6rem;
    }

    .sl-main {
        flex-direction: column;
        gap: 0.5rem;
    }

    .sl-right {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 10px;
    }

    .sl-perc {
        font-size: 1.25rem;
    }

    .scoreboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

