/* HaHACCP - Stylesheet */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: #f3f4f6; color: #1f2937; font-size: 15px; }
a { color: #0f766e; }

.app { display: flex; min-height: 100vh; }

/* Zijbalk */
.zijbalk { width: 230px; background: #134e4a; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.logo { font-size: 20px; font-weight: 700; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.zijbalk nav { flex: 1; padding: 12px 0; }
.zijbalk nav a { display: block; padding: 12px 20px; color: #ccfbf1; text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.zijbalk nav a:hover { background: rgba(255,255,255,.08); }
.zijbalk nav a.actief { background: rgba(255,255,255,.12); border-left-color: #2dd4bf; color: #fff; font-weight: 600; }
.badge { background: #ef4444; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.zijbalk-onder { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1); }
.gebruiker-info { font-size: 13px; color: #ccfbf1; margin-bottom: 10px; }
.uitloggen { color: #fca5a5; font-size: 13px; text-decoration: none; }

/* Inhoud */
.inhoud { flex: 1; padding: 28px 32px; max-width: 1200px; }
h1 { font-size: 24px; color: #111827; margin-bottom: 6px; }
h2 { font-size: 17px; color: #111827; margin: 24px 0 12px; }
.sub { color: #6b7280; font-size: 14px; margin-bottom: 22px; }

/* Kaarten en grids */
.kaarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kaart { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.kaart .cijfer { font-size: 28px; font-weight: 700; color: #0f766e; }
.kaart .label { font-size: 13px; color: #6b7280; margin-top: 2px; }
.kaart.rood .cijfer { color: #dc2626; }
.kaart.oranje .cijfer { color: #d97706; }
.paneel { background: #fff; border-radius: 12px; padding: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.07); margin-bottom: 20px; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
th { text-align: left; padding: 12px 14px; background: #f9fafb; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; border-bottom: 1px solid #e5e7eb; }
td { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #f9fafb; }

/* Status labels */
.status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status.ok { background: #d1fae5; color: #065f46; }
.status.afwijking, .status.open { background: #fee2e2; color: #991b1b; }
.status.opgelost { background: #d1fae5; color: #065f46; }
.status.laag { background: #e0f2fe; color: #075985; }
.status.middel { background: #fef3c7; color: #92400e; }
.status.hoog { background: #ffedd5; color: #9a3412; }
.status.kritiek { background: #fee2e2; color: #991b1b; }

/* Formulieren */
label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin: 12px 0 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #0f766e; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.rij { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rij3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Knoppen */
.knop, button.knop { display: inline-block; padding: 10px 18px; background: #0f766e; color: #fff; border: 0; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; margin-top: 14px; }
.knop:hover { background: #115e59; }
.knop.klein { padding: 6px 12px; font-size: 13px; margin: 0; }
.knop.grijs { background: #6b7280; }
.knop.rood { background: #dc2626; }

/* Meldingen */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* Prestaties */
.prestatie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.prestatie { background: #fff; border-radius: 12px; padding: 18px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.prestatie.vergrendeld { opacity: .45; filter: grayscale(1); }
.prestatie .icoon { font-size: 36px; }
.prestatie .naam { font-weight: 700; margin: 8px 0 4px; }
.prestatie .omschrijving { font-size: 13px; color: #6b7280; }
.prestatie .pt { margin-top: 8px; font-size: 12px; color: #0f766e; font-weight: 600; }

/* Voortgangsbalk */
.balk { background: #e5e7eb; border-radius: 8px; height: 10px; overflow: hidden; margin-top: 6px; }
.balk > div { background: #0f766e; height: 100%; border-radius: 8px; }

/* Mobiel */
@media (max-width: 760px) {
    .app { flex-direction: column; }
    .zijbalk { width: 100%; }
    .zijbalk nav { display: flex; flex-wrap: wrap; padding: 0; }
    .zijbalk nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 10px 12px; }
    .zijbalk nav a.actief { border-bottom-color: #2dd4bf; border-left: 0; }
    .inhoud { padding: 18px 14px; }
    .rij, .rij3 { grid-template-columns: 1fr; }
    table { display: block; overflow-x: auto; }
}
