/* ==========================================
   SIBLINK Teacher PWA — Mobile-First Styles
   Primary: #1A56DB | Accent: #3B82F6
   Success: #10B981 | Warning: #F59E0B | Danger: #EF4444
   ========================================== */

:root {
    --primary: #1A56DB;
    --primary-light: #3B82F6;
    --primary-dark: #1E40AF;
    --accent: #3B82F6;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --bottom-tab-height: 64px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   LOGIN SCREEN
   ========================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.login-header h1 {
    font-size: 22px;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.login-header p {
    color: var(--gray-500);
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
    background: var(--gray-50);
}

.form-group input:focus {
    border-color: var(--primary);
    background: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-full {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-100);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    min-height: 18px;
}

/* ==========================================
   APP SHELL
   ========================================== */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    position: relative;
}

/* Top Header */
.app-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 18px;
    font-weight: 700;
}

.app-header-sub {
    font-size: 12px;
    opacity: 0.85;
}

/* Main Content */
.app-content {
    flex: 1;
    padding: 16px;
    padding-bottom: calc(var(--bottom-tab-height) + 24px);
    overflow-y: auto;
}

/* ==========================================
   BOTTOM TAB BAR
   ========================================== */
.bottom-tabs {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--bottom-tab-height);
    background: #fff;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
}

.tab-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
}

.card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 16px;
}

/* Stat Cards (Beranda) */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:active {
    transform: scale(0.97);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Announcement Card */
.announcement-card {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.announcement-card .ann-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.announcement-card .ann-body {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.5;
}

.announcement-card .ann-date {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 8px;
}

/* ==========================================
   SECTION PAGES
   ========================================== */
.tab-page {
    display: none;
}

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

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

/* ==========================================
   PROFIL PAGE
   ========================================== */
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.profile-info {
    text-align: center;
    margin-bottom: 24px;
}

.profile-info h2 {
    font-size: 18px;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 13px;
    color: var(--gray-500);
}

.profile-field {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

.profile-field .field-label {
    color: var(--gray-500);
}

.profile-field .field-value {
    color: var(--gray-800);
    font-weight: 500;
    text-align: right;
}

/* ==========================================
   CHANGE PASSWORD
   ========================================== */
.password-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.password-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
}

/* ==========================================
   TOAST NOTIFICATION
   ========================================== */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--gray-800);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--gray-900); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
    margin-top: 8px;
}

/* ==========================================
   LIST ITEMS
   ========================================== */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.list-item:last-child {
    border-bottom: none;
}

.list-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.list-icon.blue { background: #EFF6FF; }
.list-icon.green { background: var(--success-light); }
.list-icon.yellow { background: var(--warning-light); }
.list-icon.red { background: var(--danger-light); }

.list-info {
    flex: 1;
    min-width: 0;
}

.list-info .list-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.list-info .list-sub {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* ==========================================
   SUB-TABS (Belajar page)
   ========================================== */
.sub-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 16px;
}

.sub-tab {
    flex: 1;
    padding: 8px 4px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.sub-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.sub-page {
    display: none;
}

.sub-page.active {
    display: block;
}

.sub-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* ==========================================
   FILTER ROW
   ========================================== */
.filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.filter-row select,
.filter-row input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    color: var(--gray-800);
    outline: none;
}

.filter-row select:focus,
.filter-row input[type="text"]:focus {
    border-color: var(--primary);
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-warning { background: var(--warning-light); color: #92400E; }
.badge-success { background: var(--success-light); color: #065F46; }
.badge-danger { background: var(--danger-light); color: #991B1B; }
.badge-info { background: #DBEAFE; color: #1E40AF; }

/* ==========================================
   EVAL CARDS (Evaluasi Al-Quran)
   ========================================== */
.eval-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow);
}

.eval-card:active {
    transform: scale(0.98);
}

.eval-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.eval-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.eval-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.eval-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-400);
}

.eval-audio {
    font-size: 11px;
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 500;
    padding: 0;
}

.modal-card {
    background: #fff;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 18px;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.review-info {
    margin-bottom: 12px;
}

.review-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-50);
    font-size: 13px;
}

.review-field .field-label {
    color: var(--gray-500);
}

textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    background: var(--gray-50);
}

textarea:focus {
    border-color: var(--primary);
    background: #fff;
}

/* ==========================================
   BUTTON SIZES
   ========================================== */
.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* ==========================================
   DATA TABLE (Monitor Progress)
   ========================================== */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 420px;
}

.data-table thead th {
    background: var(--gray-50);
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table thead th:first-child {
    text-align: left;
}

.data-table tbody td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody td:first-child {
    text-align: left;
}

.td-center {
    text-align: center !important;
    color: var(--gray-400);
    padding: 24px 8px !important;
}

.student-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}

.student-grade {
    font-size: 11px;
    color: var(--gray-400);
}

.count-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

/* Stat grid 4 columns */
.stat-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.stat-card.mini {
    padding: 10px 6px;
}

.stat-card.mini .stat-value {
    font-size: 18px;
}

.stat-card.mini .stat-label {
    font-size: 10px;
}

/* ==========================================
   MATERI CARDS
   ========================================== */
.materi-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.materi-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.materi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.materi-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.materi-subtitle {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.materi-arab {
    font-size: 20px;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
    color: var(--gray-800);
    padding: 12px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin: 8px 0;
}

.materi-body {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
}

.materi-detail {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-top: 6px;
}

/* ==========================================
   LAPORAN KELAS
   ========================================== */
.laporan-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.laporan-stat {
    text-align: center;
    padding: 8px 4px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.laporan-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.laporan-stat-label {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.top-performers {
    border-top: 1px solid var(--gray-100);
    padding-top: 10px;
}

.top-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.top-item {
    font-size: 13px;
    color: var(--gray-700);
    padding: 4px 0;
}

.top-score {
    color: var(--gray-400);
    font-size: 12px;
    float: right;
}

/* ==========================================
   INFO SUB-TABS (scrollable)
   ========================================== */
.sub-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.sub-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.sub-tabs-scroll .sub-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
}

.info-sub-page {
    display: none;
}

.info-sub-page.active {
    display: block;
}

/* Info Card hover/active */
.info-card {
    transition: transform 0.1s, box-shadow 0.1s;
}

.info-card:active {
    transform: scale(0.98);
}

/* Meeting list tab buttons */
.meeting-list-tab {
    background: var(--gray-100);
    color: var(--gray-500);
    border: none;
    font-weight: 600;
}

.meeting-list-tab.active {
    background: var(--primary);
    color: #fff;
}

/* Form selects inside modal */
.modal-body select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--gray-50);
    color: var(--gray-800);
    outline: none;
    appearance: auto;
}

.modal-body select:focus {
    border-color: var(--primary);
    background: #fff;
}

.modal-body input[type="date"],
.modal-body input[type="time"],
.modal-body input[type="number"],
.modal-body input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--gray-50);
    color: var(--gray-800);
    outline: none;
}

.modal-body input:focus {
    border-color: var(--primary);
    background: #fff;
}

/* Field label used outside review */
.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
}

/* ==========================================
   PROFIL MENU GRID
   ========================================== */
.profil-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.profil-menu-item {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow);
}

.profil-menu-item:active {
    transform: scale(0.96);
}

.profil-menu-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 8px;
}

.profil-menu-icon.green { background: var(--success-light); }
.profil-menu-icon.blue { background: #DBEAFE; }
.profil-menu-icon.yellow { background: var(--warning-light); }
.profil-menu-icon.red { background: var(--danger-light); }
.profil-menu-icon.purple { background: #EDE9FE; }
.profil-menu-icon.gray { background: var(--gray-100); }

.profil-menu-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.3;
}

/* ==========================================
   GPS CHECK-IN
   ========================================== */
.btn-checkin {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--radius);
    background: var(--success);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-checkin:active {
    transform: scale(0.98);
}

.btn-checkin:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gps-warning {
    background: var(--warning-light);
    color: #92400E;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.5;
}

/* ==========================================
   LEAVE QUOTA GRID
   ========================================== */
.leave-quota-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.leave-quota-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.leave-quota-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.leave-quota-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 2px;
}

.leave-quota-detail {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
}

/* ==========================================
   LEAVE QUOTA LIST (V2 — with progress bars)
   ========================================== */
.leave-quota-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leave-quota-item {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 14px;
    box-shadow: var(--shadow);
}

.leave-quota-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.leave-quota-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.leave-quota-item-remaining {
    font-size: 12px;
    color: var(--gray-500);
}

.leave-quota-bar {
    background: var(--gray-100);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.leave-quota-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.leave-quota-item-detail {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 4px;
}

.leave-quota-item-warning {
    font-size: 10px;
    color: #92400E;
    background: #FEF3C7;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

/* ==========================================
   LEAVE FORM V2 — Preview & Supervisor
   ========================================== */
.leave-preview-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    color: #1E40AF;
    line-height: 1.5;
    margin-bottom: 12px;
}

.leave-preview-box .leave-preview-warning {
    color: #92400E;
    background: #FEF3C7;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 6px;
    font-size: 12px;
}

.leave-supervisor-info {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    color: #166534;
    margin-top: 4px;
}

/* ==========================================
   STUDENT ATTENDANCE GRID
   ========================================== */
.sa-grid-header,
.sa-grid-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.sa-grid-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: #fff;
}

.sa-name-col {
    flex: 1;
    min-width: 0;
}

.sa-status-col {
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.sa-status-col input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ==========================================
   AI ATTENDANCE — SEAT GRID
   ========================================== */
.sa-seat-grid {
    display: grid;
    gap: 6px;
    padding: 8px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.sa-seat-cell {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    user-select: none;
}

.sa-seat-cell.present {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.sa-seat-cell.absent {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.sa-seat-cell.empty-seat {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: default;
    border-color: transparent;
}

.sa-seat-cell:active:not(.empty-seat) {
    transform: scale(0.92);
}

.sa-seat-cell .seat-icon {
    font-size: 16px;
    line-height: 1;
}

.sa-seat-cell .seat-label {
    font-size: 9px;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 44px;
}

/* Absent student row in confirmation */
.sa-absent-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.sa-absent-row:last-child {
    border-bottom: none;
}

.sa-absent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
    min-width: 100px;
}

.sa-absent-pos {
    font-size: 11px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
}

.sa-absent-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    background: white;
}

.sa-absent-note {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
    width: 100%;
    margin-top: 4px;
}

/* ==========================================
   RESPONSIVE (tablet)
   ========================================== */
@media (min-width: 481px) {
    .app-shell {
        box-shadow: var(--shadow-lg);
    }

    body {
        background: var(--gray-100);
    }
}
