﻿/* Base */
html, body {
    margin: 0;
    background: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#pwa-update-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
}

.pwa-update-inner {
    max-width: 520px;
    margin: 0 auto;
    background: #0f172a;
    color: white;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25);
}

    .pwa-update-inner button {
        border: 0;
        border-radius: 10px;
        padding: 8px 12px;
        font-weight: 600;
    }

#pwa-update-btn {
    background: white;
    color: #0f172a;
}

#pwa-update-dismiss {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
}

/* App shell */
.attendance-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.attendance-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.attendance-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header content */
.attendance-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attendance-logo {
    font-size: 20px;
}

.attendance-title {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Logout */
.logout-btn {
    border: 0;
    background: #0f172a;
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
}

/* Main content */
.attendance-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Titles */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.meta-text {
    color: #64748b;
    margin-bottom: 16px;
}

/* Class grid (desktop optimized) */
.class-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 15px; /* This forces the space above the cards */
}

/* Cards */
.class-card {
    display: block;
    text-decoration: none;
    background: white;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: 0.15s ease;
    color: inherit;
}

    .class-card:hover {
        transform: translateY(-3px);
    }

.class-name {
    font-weight: 700;
    font-size: 1.05rem;
}

.class-meta {
    margin-top: 5px;
    color: #64748b;
    font-size: 0.9rem;
}

/* Student cards */
.student-card {
    background: white;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.student-name {
    font-weight: 800;
    margin-bottom: 10px;
}

/* Status grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* Status buttons */
.status-pill {
    position: relative;
}

    .status-pill input {
        position: absolute;
        opacity: 0;
    }

    .status-pill label {
        display: block;
        text-align: center;
        padding: 10px;
        border-radius: 12px;
        border: 1px solid #cbd5e1;
        font-weight: 600;
        cursor: pointer;
    }

    /* Selected */
    .status-pill input:checked + label {
        background: #0f172a;
        color: white;
        border-color: #0f172a;
    }

/* Remarks */
.remarks-box input {
    margin-top: 10px;
    border-radius: 10px;
    min-height: 42px;
}

/* Sticky submit */
.sticky-submit {
    position: sticky;
    bottom: 0;
    padding-top: 12px;
    background: #f8fafc;
}

    .sticky-submit .btn {
        width: 100%;
        min-height: 56px;
        border-radius: 14px;
        font-weight: 700;
    }

/* Mobile tweaks */
@media (max-width: 600px) {
    .attendance-header-inner {
        padding: 12px 14px;
    }

    .attendance-main {
        padding: 14px;
    }

    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
