/* ═══════════════════════════════════════════════
   ATTENDANCE ALERT — GRIET Cream Institutional Theme
   Matches the GRIET internal website (cream + crimson)
   ═══════════════════════════════════════════════ */

:root {
    /* Core Palette — cream / ivory */
    --bg-base: #f6efdf;
    --bg-elevated: #fffdf6;
    --bg-surface: #fffdf6;
    --bg-surface-hover: #fbf6e9;
    --border: #e3d7bd;
    --border-bright: rgba(176, 30, 40, 0.35);

    /* GRIET Crimson Accents */
    --accent-1: #b01e28;
    /* GRIET crimson */
    --accent-2: #8f1620;
    /* Dark maroon */
    --accent-3: #d4a017;
    /* Warm gold */
    --gradient-main: linear-gradient(135deg, #c1121f, #8f1620);
    --gradient-warm: linear-gradient(135deg, #d4a017, #b01e28);
    --gradient-cool: linear-gradient(135deg, #b01e28, #6e1019);
    --glow-red: rgba(176, 30, 40, 0.18);
    --glow-gold: rgba(212, 160, 23, 0.15);

    /* Text — warm browns */
    --text-primary: #33261a;
    --text-secondary: #6b5a45;
    --text-muted: #9c8a6e;

    /* Status */
    --success: #1c7c3d;
    --success-soft: rgba(28, 124, 61, 0.12);
    --warning: #b57708;
    --warning-soft: rgba(181, 119, 8, 0.12);
    --danger: #c1121f;
    --danger-soft: rgba(193, 18, 31, 0.10);
    --info: #1d4ed8;

    /* Spacing & Shape */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s var(--ease);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Soft Warm Background ── */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(193, 18, 31, 0.05), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212, 160, 23, 0.06), transparent),
        var(--bg-base);
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(112, 84, 48, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 84, 48, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    animation: floatGlow 20s ease-in-out infinite;
    pointer-events: none;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(193, 18, 31, 0.05);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(212, 160, 23, 0.06);
    bottom: -10%;
    right: -5%;
    animation-delay: -7s;
}

.bg-glow-3 {
    width: 300px;
    height: 300px;
    background: rgba(230, 200, 150, 0.10);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes floatGlow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* ── Layout ── */
.app-container {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    padding-top: 90px;
    position: relative;
    z-index: 1;
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.hidden {
    display: none !important;
}

.ml-auto {
    margin-left: auto;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 1100px);
    z-index: 100;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: rgba(255, 253, 246, 0.9);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 24px rgba(112, 84, 48, 0.12),
        0 0 0 1px rgba(176, 30, 40, 0.03) inset;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gradient-main);
    color: white;
}

.logo-text {
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.logo-accent {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--danger-soft);
    color: var(--accent-1);
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Buttons ── */
button {
    cursor: pointer;
    font-family: var(--font);
    border: none;
    outline: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--glow-red);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled::before {
    display: none;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-outline:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: var(--danger-soft);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.btn-ghost:hover {
    color: var(--accent-1);
    background: var(--danger-soft);
}

.btn-icon {
    background: rgba(112, 84, 48, 0.06);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(112, 84, 48, 0.12);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #c1121f, #8f1620);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(193, 18, 31, 0.3);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(0);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Cards ── */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(112, 84, 48, 0.10);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
}

/* ── Sections ── */
section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.fade-in {
    animation: fadeIn 0.5s var(--ease) forwards;
}

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

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

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-header p {
    margin-top: 2px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.upload-icon {
    background: var(--danger-soft);
    color: var(--accent-1);
}

.review-icon {
    background: rgba(212, 160, 23, 0.15);
    color: #a07510;
}

.status-icon {
    background: var(--success-soft);
    color: var(--success);
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ── Login Card (GRIET internal-portal style) ── */
.login-card {
    max-width: 440px;
    width: 100%;
    margin: 40px auto 0;
    text-align: center;
    background: var(--bg-elevated);
}

.login-brand {
    margin-bottom: 28px;
}

.brand-logo {
    width: 110px;
    height: auto;
    margin: 4px auto 16px;
    display: block;
}

.login-brand h1 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--accent-1);
    margin-bottom: 4px;
}

.brand-college {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.4;
    max-width: 320px;
    margin: 0 auto;
}

.brand-divider {
    width: 64px;
    height: 3px;
    background: var(--gradient-main);
    border-radius: 3px;
    margin: 14px auto;
}

.brand-portal {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Inputs ── */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 1;
    display: flex;
}

.input-group input {
    width: 100%;
    padding: 13px 15px 13px 44px;
    background: #fffef9;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(176, 30, 40, 0.10);
    background: #fff;
}

.input-group input:focus~.input-icon,
.input-group input:focus+.input-icon {
    color: var(--accent-1);
}

.input-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.date-group input {
    padding-left: 15px;
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
}

/* ── Upload Zone ── */
.upload-card {
    width: 100%;
    position: relative;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    transition: var(--transition);
    background: rgba(255, 253, 246, 0.6);
    margin-bottom: 16px;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--border-bright);
    background: var(--danger-soft);
}

.upload-zone.dragover {
    border-color: var(--accent-1);
    background: rgba(176, 30, 40, 0.08);
    box-shadow: 0 0 40px rgba(176, 30, 40, 0.06) inset;
}

.upload-illustration {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.drop-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.drop-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.file-name {
    color: var(--success);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.form-row {
    margin-bottom: 20px;
}

/* ── Review Layout ── */
.review-card {
    width: 100%;
}

.review-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

.panel {
    background: rgba(246, 239, 223, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.panel-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.raw-content {
    max-height: 400px;
    overflow-y: auto;
    flex: 1;
}

.raw-content pre {
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.badge {
    background: var(--gradient-main);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 4px;
}

/* ── Checkbox ── */
.list-controls {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    gap: 8px;
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.custom-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-wrapper input:checked~.custom-check {
    background: var(--accent-1);
    border-color: var(--accent-1);
}

.checkbox-wrapper input:checked~.custom-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ── Student List ── */
.student-list {
    list-style: none;
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.student-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fffdf6;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.student-list li:hover {
    background: #fbf6e9;
    border-color: var(--border);
}

.student-list li .student-checkbox {
    accent-color: var(--accent-1);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.student-list li strong {
    font-weight: 600;
    font-size: 0.9rem;
}

.student-list li small {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Alerts ── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-warning {
    background: var(--warning-soft);
    border: 1px solid rgba(181, 119, 8, 0.25);
    color: var(--warning);
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-box {
    background: #fffdf6;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-box:hover {
    border-color: var(--border-bright);
    background: #fbf6e9;
    transform: translateY(-2px);
}

.stat-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    margin: 0 auto 12px;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-top: 6px;
    letter-spacing: -1px;
}

.stat-total .stat-icon-wrap {
    background: var(--danger-soft);
    color: var(--accent-1);
}

.stat-total .stat-value {
    color: var(--text-primary);
}

.stat-completed .stat-icon-wrap {
    background: var(--success-soft);
    color: var(--success);
}

.stat-completed .stat-value {
    color: var(--success);
}

.stat-pending .stat-icon-wrap {
    background: var(--warning-soft);
    color: var(--warning);
}

.stat-pending .stat-value {
    color: var(--warning);
}

.stat-failed .stat-icon-wrap {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-failed .stat-value {
    color: var(--danger);
}

/* ── Table ── */
.status-card {
    width: 100%;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(176, 30, 40, 0.05);
}

th {
    padding: 14px 18px;
    text-align: left;
    color: var(--accent-2);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(227, 215, 189, 0.6);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

tr:hover td {
    background: rgba(246, 239, 223, 0.6);
}

.status-completed {
    color: var(--success);
    font-weight: 600;
}

.status-failed {
    color: var(--danger);
    font-weight: 600;
}

.status-pending {
    color: var(--warning);
    font-weight: 600;
}

/* ── Scrollbar ── */
.custom-scroll::-webkit-scrollbar {
    width: 5px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(112, 84, 48, 0.2);
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(112, 84, 48, 0.35);
}

/* ── Loader ── */
.loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 253, 246, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-xl);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(112, 84, 48, 0.12);
    border-top-color: var(--accent-1);
    border-right-color: var(--accent-3);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

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

.loader-overlay p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

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

.toast {
    background: #fffdf6;
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: 0 16px 48px rgba(112, 84, 48, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    transform: translateX(120%);
    animation: toastIn 0.4s var(--ease) forwards;
    font-size: 0.9rem;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--accent-1);
}

@keyframes toastIn {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ════════════════════════════════
   RESPONSIVE DESIGN
   ════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .app-container {
        padding: 16px;
        padding-top: 80px;
    }

    .navbar {
        top: 10px;
        width: 96%;
    }

    .nav-inner {
        padding: 10px 16px;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
    }

    .logo-icon svg {
        width: 18px;
        height: 18px;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        display: none;
    }

    .card {
        padding: 24px 18px;
        border-radius: var(--radius-lg);
    }

    .login-card {
        margin-top: 20px;
    }

    .login-brand h1 {
        font-size: 1.5rem;
    }

    .brand-logo {
        width: 90px;
    }

    .section-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .section-icon {
        width: 38px;
        height: 38px;
    }

    /* Review layout stacks on mobile */
    .review-layout {
        grid-template-columns: 1fr;
    }

    .raw-content {
        max-height: 200px;
    }

    .student-list {
        max-height: 250px;
    }

    /* Stats 2 columns on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-box {
        padding: 16px 12px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-icon-wrap {
        width: 34px;
        height: 34px;
        margin-bottom: 8px;
    }

    /* Table horizontal scroll */
    .table-wrapper {
        margin: 0 -18px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    th,
    td {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Upload zone smaller */
    .upload-zone {
        padding: 32px 16px;
    }

    /* Toasts full width */
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: unset;
        max-width: unset;
    }

    /* Button sizing */
    .btn-primary,
    .btn-danger {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: 13px 24px;
    }

    .header-actions {
        margin-top: 12px;
        width: 100%;
        justify-content: flex-end;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .app-container {
        padding: 10px;
        padding-top: 72px;
    }

    .card {
        padding: 20px 14px;
    }

    .login-brand h1 {
        font-size: 1.3rem;
    }

    .brand-logo {
        width: 80px;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-value {
        font-size: 1.4rem;
    }
}
