:root {
    --accent: #f00347;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f6f6f6;
    color: #111;
}

/* --------------------
   Navigation & Hamburger Menu
   -------------------- */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.nav-main {
    display: flex;
    gap: 12px;
}

.navbar a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    width: auto;
    margin: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger:active {
    opacity: 0.7;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.menu-overlay.active {
    display: flex;
    justify-content: flex-end;
}

.menu-content {
    background: #fff;
    width: 280px;
    height: 100%;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 36px;
    color: #666;
    cursor: pointer;
    width: auto;
    padding: 8px;
    margin: 0;
    line-height: 1;
}

.menu-close:active {
    opacity: 0.7;
}

.menu-nav {
    padding: 60px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 18px;
    padding: 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-nav a:active {
    background: #f0f0f0;
}

/* Old nav styles (keeping for compatibility) */
nav {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

nav a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

main {
    padding: 16px;
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    min-height: calc(100vh - 60px);
}

button,
select,
input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
}

button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

button:active {
    opacity: 0.85;
}

.card {
    margin: 0 auto;
}

/* --------------------
   Scan-result styling
   -------------------- */

.tegoed-groen {
    color: #2e7d32;
    font-weight: 700;
}

.tegoed-oranje {
    color: #ef6c00;
    font-weight: 700;
}

.tegoed-rood-knipper {
    color: #c62828;
    font-weight: 700;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%   { opacity: 1; }
    50%  { opacity: 0.2; }
    100% { opacity: 1; }
}

/* --------------------
   Attendance History styling
   -------------------- */

.percentage-bar {
    width: 100%;
    height: 32px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.percentage-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    min-width: 40px;
    transition: width 0.3s ease;
}

.percentage-fill.low {
    background: linear-gradient(90deg, #ff9800 0%, #ffb74d 100%);
}

.percentage-fill.critical {
    background: linear-gradient(90deg, #f44336 0%, #ef5350 100%);
}

.attendance-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attendance-list li {
    padding: 8px 12px;
    background: #f5f5f5;
    border-left: 3px solid var(--accent);
    font-size: 14px;
    border-radius: 2px;
}

.attendance-list li:hover {
    background: #efefef;
}
