/* ═══════════════════════════════════════════════════════════
   SurveyHub — Main Stylesheet
   Fonts: Sora (UI) + Caveat (accents)
   ═══════════════════════════════════════════════════════════ */

:root {
    --blue: #2563eb;
    --blue-light: #eff6ff;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --red: #dc2626;
    --red-light: #fef2f2;
    --yellow: #d97706;
    --yellow-light: #fffbeb;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;

    --admin-accent: #7c3aed;
    --teacher-accent: #0891b2;
    --student-accent: #16a34a;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Sora", sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Role-themed body ────────────────────────────── */
body.role-admin {
    --accent: var(--admin-accent);
}
body.role-teacher {
    --accent: var(--teacher-accent);
}
body.role-student {
    --accent: var(--student-accent);
}
body.role-guest {
    --accent: var(--blue);
}

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* ════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════ */
.navbar {
    background: var(--white);
    border-bottom: 3px solid var(--accent, var(--blue));
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.brand-icon {
    width: 100px;
}
.brand-icon img {
    width: 300px;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition:
        background 0.15s,
        color 0.15s;
}
.nav-links a:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    font-size: 0.875rem;
}

.user-name {
    color: var(--gray-700);
    font-weight: 500;
}

.user-badge,
.role-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.role-admin {
    background: #ede9fe;
    color: #6d28d9;
}
.role-teacher {
    background: #cffafe;
    color: #0e7490;
}
.role-student {
    background: #dcfce7;
    color: #15803d;
}

.btn-logout {
    background: none;
    border: 1.5px solid var(--gray-300);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--gray-600);
    transition: all 0.15s;
}
.btn-logout:hover {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}

/* ════════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-container {
    width: 100%;
}
/* Quick Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.stat-title {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

/* Charts Containers */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-box {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-box h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #374151;
    align-self: flex-start;
}

.chart-box canvas {
    max-width: 100% !important;
    max-height: 280px !important;
}

.footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    margin-top: auto;
}

/* ════════════════════════════════════════════════════
   ALERTS / FLASH
   ════════════════════════════════════════════════════ */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-success {
    background: var(--green-light);
    color: #14532d;
    border-left: 4px solid var(--green);
}
.alert-error {
    background: var(--red-light);
    color: #7f1d1d;
    border-left: 4px solid var(--red);
}

/* ════════════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════════════ */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}
.page-header p {
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* ════════════════════════════════════════════════════
   NAVIGATION STYLES
   ════════════════════════════════════════════════════ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Add your existing background/padding here */
}

/* Default Desktop Layout */
.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1; /* Pushes content to fill space if needed */
}

/* Hide hamburger on desktop */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block; /* Show hamburger */
    }

    .nav-content {
        display: none; /* Hide menu by default */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Drops right below the navbar */
        left: 0;
        width: 100%;
        background-color: #ffffff; /* Match your nav background */
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    /* When JS toggles this class, the menu appears */
    .nav-content.active {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1rem;
    }

    .nav-user {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-600); /* Optional separator */
        gap: 0.5rem;
    }
}

/* ════════════════════════════════════════════════════
   STATS GRID
   ════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid transparent;
}
.stat-card--blue {
    border-color: var(--blue);
}
.stat-card--green {
    border-color: var(--green);
}
.stat-card--red {
    border-color: var(--red);
}
.stat-card--yellow {
    border-color: var(--yellow);
}

.stat-icon {
    font-size: 2rem;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* ════════════════════════════════════════════════════
   ACTION CARDS
   ════════════════════════════════════════════════════ */
.admin-actions,
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}
.action-card:hover {
    border-color: var(--accent, var(--blue));
    color: var(--accent, var(--blue));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.action-card--primary {
    border-color: var(--blue);
    color: var(--blue);
}
.action-card--danger {
    border-color: var(--red);
    color: var(--red);
}
.action-icon {
    font-size: 2rem;
}

/* ════════════════════════════════════════════════════
   SECTION CARD
   ════════════════════════════════════════════════════ */
.section-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.section-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}
.section-card--danger {
    border-color: var(--red);
    border-width: 2px;
}
.section-card--danger h2 {
    color: var(--red);
}

/* ════════════════════════════════════════════════════
   DATA TABLE
   ════════════════════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table th {
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
}
.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}
.data-table tr:hover td {
    background: var(--gray-50);
}
.data-table tr.row-danger td {
    background: var(--red-light);
}

.suggestion-cell {
    max-width: 200px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ════════════════════════════════════════════════════
   STARS
   ════════════════════════════════════════════════════ */
.star {
    color: var(--gray-300);
    font-size: 1rem;
}
.star--filled {
    color: #f59e0b;
}
.rating-cell {
    white-space: nowrap;
}

/* ════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════ */
.btn-primary {
    background: var(--accent, var(--blue));
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        opacity 0.15s,
        transform 0.1s;
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s;
}
.btn-secondary:hover {
    background: var(--gray-100);
}

.btn-danger {
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    text-decoration: none;
    display: inline-block;
}
.btn-danger:hover {
    opacity: 0.9;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}
.btn-edit {
    background: var(--blue-light);
    color: var(--blue);
}
.btn-danger {
    background: var(--red-light);
    color: var(--red);
}

.btn-back {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.btn-back:hover {
    color: var(--gray-900);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--gray-900);
    background: var(--white);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent, var(--blue));
    box-shadow: 0 0 0 3px
        color-mix(in srgb, var(--accent, var(--blue)) 15%, transparent);
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.field-hint {
    font-size: 0.78rem;
    color: var(--gray-600);
    margin-top: 0.3rem;
    display: block;
}
.required {
    color: var(--red);
}
.muted {
    color: var(--gray-600);
    font-style: italic;
}

/* Table toolbar */
.table-toolbar {
    margin-bottom: 1rem;
}
.search-input {
    padding: 0.6rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    width: 300px;
}
.search-input:focus {
    outline: none;
    border-color: var(--blue);
}

.action-cell {
    white-space: nowrap;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

/* ════════════════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════════════════ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 0.25rem;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}
.auth-card--wide {
    max-width: 800px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}
.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}
.auth-header p {
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}
.auth-footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════
   PROFILE
   ════════════════════════════════════════════════════ */
.profile-card {
    position: relative;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent, var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.profile-table th {
    text-align: left;
    padding: 0.6rem 0;
    color: var(--gray-600);
    font-weight: 600;
    width: 160px;
}
.profile-table td {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-100);
}

/* ════════════════════════════════════════════════════
   NOTEBOOK SURVEY
   ════════════════════════════════════════════════════ */
.notebook-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.notebook-card {
    background: #fffdf0;
    border: 1px solid #e8e0c0;
    border-radius: 4px 16px 16px 4px;
    max-width: 720px;
    width: 100%;
    box-shadow:
        4px 4px 0 #c8b97a,
        var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* Notebook ruled lines */
.notebook-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 31px,
        #c8d8e8 31px,
        #c8d8e8 32px
    );
    pointer-events: none;
    opacity: 0.5;
}

.notebook-header {
    background: linear-gradient(135deg, #3b5fc0, #6d4fc0);
    color: white;
    padding: 2rem 2rem 1.5rem;
    position: relative;
}

.notebook-rings {
    display: flex;
    gap: 28px;
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
}
.ring {
    width: 28px;
    height: 28px;
    border: 4px solid #c0c8d8;
    border-radius: 50%;
    background: var(--white);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notebook-header h1 {
    font-size: 1.4rem;
    font-family: "Caveat", cursive;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.notebook-header p {
    font-size: 0.85rem;
    opacity: 0.85;
}

.notebook-form {
    padding: 2rem;
}

.form-section {
    border: none;
    background: transparent;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1.5px dashed var(--gray-300);
    margin-bottom: 1.5rem;
}

.form-section legend {
    font-weight: 700;
    font-family: "Caveat", cursive;
    font-size: 1.15rem;
    padding: 0 0.5rem;
    color: var(--gray-700);
}

/* ── Star Rating (CSS trick) ───────────────────────── */
.star-rating-group {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.star-rating-group input[type="radio"] {
    display: none;
}

.star-rating-group label {
    font-size: 2.5rem;
    color: var(--gray-300);
    cursor: pointer;
    transition:
        color 0.15s,
        transform 0.1s;
    display: block;
    margin: 0;
}

.star-rating-group label:hover,
.star-rating-group label:hover ~ label,
.star-rating-group input:checked ~ label {
    color: #f59e0b;
}

.star-rating-group label:hover {
    transform: scale(1.2);
}

/* ── Checkbox ─────────────────────────────────────── */
.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
    cursor: pointer;
}

.checkbox-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-notebook {
    background: linear-gradient(135deg, #3b5fc0, #6d4fc0);
    font-family: "Caveat", cursive;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

/* ════════════════════════════════════════════════════
   DISASTER SURVEY
   ════════════════════════════════════════════════════ */
.disaster-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.disaster-card {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 760px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--red);
}

.disaster-header {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: white;
    padding: 2rem;
}

.alert-banner {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.alert-icon {
    font-size: 1rem;
}

.disaster-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.disaster-header p {
    font-size: 0.875rem;
    opacity: 0.85;
}

.disaster-form {
    padding: 2rem;
}

.form-section--alert {
    border-color: #fca5a5;
    background: var(--red-light);
}

/* Radio yes/no */
/* ════════════════════════════════════════════════════
   FIX: RESET CHECKBOX AND RADIO SIZES
   ════════════════════════════════════════════════════ */

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    /* Override global input width/padding */
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    margin: 0;

    /* Force native appearance back */
    appearance: auto;
    -webkit-appearance: auto;

    /* Style the check/dot */
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0; /* Prevents flexbox from squishing them */
}

/* Make sure the checkbox layout looks clean */
.checkbox-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

@keyframes pulse {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.8;
    }
}

/* Map Placeholder */
.map-placeholder {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    margin: 1.5rem 0;
    overflow: hidden;
}

.map-placeholder-inner {
    background: linear-gradient(135deg, #f0f4ff, #e8f4fd);
    padding: 2.5rem;
    text-align: center;
    color: var(--gray-600);
}
#map {
    height: 350px; /* Or whatever height fits your design */
    width: 100%;
}

.map-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}
.map-placeholder-inner strong {
    color: var(--gray-700);
}
.map-placeholder-inner small {
    font-size: 0.78rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions-row {
    display: flex;
    gap: 1rem;
}
.form-actions-row .btn-full {
    flex: 1;
}

/* ════════════════════════════════════════════════════
   FILTER BAR
   ════════════════════════════════════════════════════ */
.filter-bar {
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin: 0;
    flex: 1;
    min-width: 160px;
}
.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.results-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.subject-tag {
    background: var(--blue-light);
    color: var(--blue);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Emergency kit badges */
.kit-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
}
.kit-yes {
    background: var(--green-light);
    color: var(--green);
}
.kit-no {
    background: var(--red-light);
    color: var(--red);
}

/* ════════════════════════════════════════════════════
   TEACHER — Subject Bars
   ════════════════════════════════════════════════════ */
.subject-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subject-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.subject-label {
    width: 160px;
    font-weight: 600;
}

.bar-track {
    flex: 1;
    background: var(--gray-100);
    border-radius: 99px;
    height: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, var(--blue)), #60a5fa);
    border-radius: 99px;
    transition: width 0.6s ease;
}

.subject-count {
    width: 32px;
    text-align: right;
    font-weight: 700;
    color: var(--gray-600);
}

/* ════════════════════════════════════════════════════
   PRINT STYLES
   ════════════════════════════════════════════════════ */
@media print {
    .no-print,
    .navbar,
    .footer,
    .btn-secondary {
        display: none !important;
    }
    .main-content {
        padding: 0;
        max-width: 100%;
    }
    .section-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    body {
        font-size: 12px;
    }
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
        gap: 0.75rem;
    }
    .main-content {
        padding: 1rem;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .filter-form {
        flex-direction: column;
    }
    .form-actions-row {
        flex-direction: column;
    }
    .notebook-rings {
        display: none;
    }
    .action-card {
        padding: 1rem 0.75rem;
        font-size: 0.8rem;
    }
    .data-table {
        font-size: 0.78rem;
    }
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.5rem;
    }
}
