@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&display=swap');

/* ========================================
   WORDT NIET BETRAPT — GLOBALE STYLING
   ======================================== */

:root {
    --green-dark: #173d31;
    --green-deep: #102d25;
    --green: #397a56;
    --green-hover: #2d6344;
    --green-light: #e8f0e8;

    --text: #20372f;
    --text-muted: #6c7971;

    --background: #f5f7f3;
    --surface: #ffffff;
    --border: #d8e1d8;
    --danger: #9a352a;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-card: 0 8px 24px rgba(26, 56, 41, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--green);
}

.container {
    width: calc(100% - 32px);
    max-width: 1100px;
    margin-inline: auto;
}

.card {
    padding: 24px;
    border: 1px solid #e2e9e1;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.card-title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
}

.card-description {
    margin: 0 0 24px;
    color: var(--text-muted);
}

/* ========================================
   FORMULIEREN
   ======================================== */

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

.form-label,
label {
    display: block;
    margin-bottom: 8px;
    color: #30473b;
    font-size: 14px;
    font-weight: 650;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: #fbfcfa;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control::placeholder {
    color: #9aa69d;
}

.form-control:focus {
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(57, 122, 86, 0.12);
}

/* ========================================
   ALGEMENE KNOPPEN
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

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

.btn-primary:hover {
    background: var(--green-hover);
}

.btn-secondary {
    background: var(--green-light);
    color: var(--green-dark);
}

.btn-danger {
    background: #a83e35;
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ========================================
   LOGINPAGINA
   ======================================== */

body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 8% 85%, #e4ede2 0%, transparent 38%),
        radial-gradient(ellipse at 95% 75%, #e7efe5 0%, transparent 35%),
        var(--background);
}

.login-hero {
    position: relative;
    overflow: hidden;
    padding: 24px 20px 78px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(ellipse at 75% 10%, rgba(109, 153, 115, 0.20), transparent 36%),
        linear-gradient(145deg, var(--green-deep), #245441 65%, var(--green-dark));
}

.login-hero::before,
.login-hero::after {
    position: absolute;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-hero::before {
    top: -160px;
    left: -100px;
}

.login-hero::after {
    right: -130px;
    bottom: -190px;
    width: 320px;
    height: 320px;
}

.login-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.login-logo {
    display: block;
    width: 138px;
    height: 100px;
    margin: 0 auto 4px;
    object-fit: contain;
    object-position: center;
}

.login-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 5.5vw, 40px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1px;
}

.login-hero p {
    margin: 8px 0 0;
    color: #d5e3d9;
    font-size: 14px;
    line-height: 1.5;
}

.login-container {
    position: relative;
    z-index: 2;
    width: calc(100% - 32px);
    max-width: 440px;
    margin: -42px auto 36px;
}

.login-card {
    padding: 28px;
    border: 1px solid #e2e9e1;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.login-card h2 {
    margin: 0;
    color: #1c382d;
    font-size: 28px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.7px;
}

.login-intro {
    margin: 8px 0 24px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-card label {
    margin-bottom: 8px;
}

.login-card .form-control {
    min-height: 50px;
    border-radius: 11px;
    font-size: 15px;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    margin-top: 24px;
    padding: 13px 18px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #43845c, #2d6a49);
    color: #fff;
    font-size: 16px;
    font-weight: 750;
    box-shadow: 0 7px 16px rgba(45, 106, 73, 0.17);
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(45, 106, 73, 0.24);
}

.login-button:focus-visible {
    outline: 3px solid #9ac7a6;
    outline-offset: 3px;
}

.login-button-arrow {
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
}

.login-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #f0d0ca;
    border-radius: var(--radius-sm);
    background: #fff5f3;
    color: var(--danger);
    font-size: 14px;
}

/* Algemene meldingen */

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
}

.alert-error {
    border: 1px solid #f0d0ca;
    background: #fff5f3;
    color: var(--danger);
}

.alert-success {
    border: 1px solid #c9e5d0;
    background: #eff8f0;
    color: #28623d;
}

/* ========================================
   DASHBOARD
   ======================================== */

.app-header {
    background: var(--green-deep);
    color: #fff;
    box-shadow: 0 4px 18px rgba(20, 44, 31, 0.12);
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 72px;
    padding-block: 12px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
}

.app-brand img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-nav a {
    padding: 8px 10px;
    border-radius: 8px;
    color: #e5eee7;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.app-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dashboard-page {
    width: calc(100% - 32px);
    max-width: 960px;
    margin-inline: auto;
    padding-top: 32px;
    padding-bottom: 48px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    color: #1b382b;
    font-size: clamp(27px, 4vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.8px;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

/* Score */

.score-panel {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 92px;
    margin-bottom: 26px;
    padding: 17px 22px;
    overflow: hidden;
    border-radius: 17px;
    background: linear-gradient(120deg, #244b37, #416b50);
    color: #fff;
    box-shadow: 0 8px 22px rgba(36, 75, 55, 0.12);
}

.score-panel::after {
    position: absolute;
    top: -60px;
    right: -25px;
    width: 165px;
    height: 165px;
    border: 17px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.score-label {
    position: relative;
    z-index: 1;
    margin: 0 0 5px;
    color: #e0ebe2;
    font-size: 13px;
    font-weight: 650;
}

.score-value {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

/* Opdrachtsectie */

.dashboard-tasks > h2 {
    margin: 0 0 16px;
    color: #20372f;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}

.task-card {
    min-width: 0;
    padding: 21px;
    border: 1px solid #e0e8df;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(28, 53, 36, 0.045);
}

.task-number {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 5px 9px;
    border-radius: 7px;
    background: #edf2eb;
    color: #4d6754;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.task-content h3 {
    margin: 0 0 15px;
    color: #20372f;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.task-status {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 14px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #e9f0e8;
    color: #356346;
    font-size: 12px;
    font-weight: 700;
}

/* Opdrachtknoppen */

.task-content form {
    width: 100%;
    margin: 9px 0 0;
}

.task-content form button,
.task-content form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.task-content form button:active {
    transform: scale(0.985);
}

/* Klaar en Gehaald */

.task-content form button.btn-primary {
    background: #326447;
    color: #fff;
    box-shadow: 0 3px 7px rgba(50, 100, 71, 0.12);
}

.task-content form button.btn-primary:hover {
    background: #244b37;
}

/* Betrapt */

.task-content form:has(input[name="action"][value="caught"]) button {
    border-color: #f0d6d2;
    background: #fbefed;
    color: #9a3e35;
}

.task-content form:has(input[name="action"][value="caught"]) button:hover {
    background: #f5dfdc;
}

/* Overslaan */

.task-content form:has(input[name="action"][value="skip"]) button {
    border-color: #e1e7df;
    background: #f2f4f0;
    color: #4b594e;
}

.task-content form:has(input[name="action"][value="skip"]) button:hover {
    background: #e7ece5;
}

/* Timer */

.timer-countdown {
    display: inline-block;
    margin-top: 5px;
    padding: 9px 14px;
    border-radius: 9px;
    background: var(--green-deep);
    color: #fff;
    font-size: 23px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* Leeg slot */

.task-empty {
    padding: 16px 0 8px;
    text-align: left;
}

.task-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #edf2eb;
    font-size: 23px;
}

.task-empty h3 {
    margin: 0 0 7px;
    color: #20372f;
    font-size: 16px;
    font-weight: 750;
}

.task-empty p {
    margin: 0;
    color: #6c7971;
    font-size: 13px;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE EN TOEGANKELIJKHEID
   ======================================== */

:focus-visible {
    outline: 3px solid #9ac7a6;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .app-header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        padding-block: 12px;
    }

    .app-brand {
        font-size: 15px;
    }

    .app-brand img {
        width: 38px;
        height: 38px;
    }

    .app-nav {
        flex-wrap: wrap;
        gap: 5px;
    }

    .app-nav a {
        padding: 7px 9px;
        font-size: 13px;
    }

    .dashboard-page {
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .page-header {
        margin-bottom: 20px;
    }

    .score-panel {
        min-height: 86px;
        margin-bottom: 22px;
        padding: 16px;
        border-radius: 15px;
    }

    .score-value {
        font-size: 30px;
    }

    .dashboard-tasks > h2 {
        margin-bottom: 14px;
        font-size: 20px;
    }

    .task-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .task-card {
        padding: 19px;
        border-radius: 15px;
    }

    .task-content h3 {
        font-size: 16px;
    }

    .task-content form button,
    .task-content form .btn {
        min-height: 44px;
    }
}

@media (max-width: 380px) {
    .dashboard-page {
        width: calc(100% - 24px);
    }

    .task-card {
        padding: 16px;
    }

    .score-panel {
        padding: 18px;
    }

    .app-brand {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .login-hero {
        padding: 18px 16px 66px;
    }

    .login-logo {
        width: 112px;
        height: 82px;
        margin-bottom: 4px;
    }

    .login-hero h1 {
        font-size: 29px;
        letter-spacing: -0.8px;
    }

    .login-hero p {
        max-width: 330px;
        margin: 7px auto 0;
        font-size: 13px;
    }

    .login-container {
        margin-top: -34px;
    }

    .login-card {
        padding: 23px 20px;
        border-radius: 18px;
    }

    .login-card h2 {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
/* ========================================
   DASHBOARD-TIMER EN ACTIEKNOPPEN
   ======================================== */

.task-content form {
    width: 100%;
    margin: 8px 0 0;
}

.task-timer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 8px 0;
}

.task-timer-row .success-form {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
}

.task-timer-row .success-button,
.task-timer-row .timer-countdown {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 10px;
    border-radius: 10px;
    line-height: 1;
}

.task-timer-row .success-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid transparent;
    background: #326447;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.18s ease, opacity 0.18s ease;
}

.task-timer-row .success-button:hover:not(:disabled) {
    background: #244b37;
}

.task-timer-row .success-button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
}

.task-timer-row .timer-countdown {
    display: flex;
    flex: 0 0 76px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #19372b;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.task-content form:has(input[name="action"][value="caught"]),
.task-content form:has(input[name="action"][value="skip"]) {
    margin-top: 8px;
}

@media (max-width: 380px) {
    .task-timer-row {
        gap: 7px;
    }

    .task-timer-row .timer-countdown {
        flex-basis: 72px;
        font-size: 16px;
    }

    .task-timer-row .success-button {
        padding-inline: 8px;
        font-size: 14px;
    }
}


/* ========================================
   GEDEELDE HEADER MET NAVIGATION TABS
   ======================================== */

.app-header {
    width: 100%;
    padding: 18px 16px 0;
    background: var(--green-deep);
    color: #fff;
    box-shadow: 0 4px 18px rgba(20, 44, 31, 0.12);
}

.app-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    max-width: 960px;
    min-height: 0;
    margin: 0 auto;
    padding: 0;
}

.app-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    color: #fff;
    text-decoration: none;
}

.app-brand img {
    display: block;
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.app-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 4px;
    border-radius: 13px 13px 0 0;
    background: #214334;
}

.app-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 12px 10px;
    border-radius: 9px 9px 0 0;
    color: #e0ebe2;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.app-nav a:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.app-nav a.is-active {
    background: var(--background);
    color: var(--green-dark);
    box-shadow: 0 -2px 0 #70a67b inset;
}

.app-nav a:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #9ac7a6;
    outline-offset: -3px;
}

@media (max-width: 640px) {
    .app-header {
        padding: 14px 12px 0;
    }

    .app-header-inner {
        gap: 12px;
        padding: 0;
    }

    .app-brand img {
        width: 60px;
        height: 60px;
    }

    .app-nav {
        gap: 3px;
        padding: 3px;
    }

    .app-nav a {
        min-height: 46px;
        padding: 11px 8px;
        font-size: 14px;
    }
}

/* Merknaam onder het logo en tabs over de volledige breedte */
.app-brand {
    flex-direction: column;
    gap: 2px;
}

.app-brand::after {
    content: "Wordt Niet Betrapt!";
    display: block;
    color: #f5f7f2;
    font-family: 'Baloo 2', 'Trebuchet MS', sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.15px;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.app-nav {
    align-self: stretch;
    width: 100%;
}

@media (max-width: 640px) {
    .app-brand::after {
        font-size: 17px;
    }
}

/* Header blijft zichtbaar tijdens scrollen; logo iets groter */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: 14px;
    box-shadow: 0 8px 22px rgba(13, 34, 24, 0.12);
}

.app-header-inner {
    gap: 12px;
}

.app-brand img {
    display: block;
    width: 84px;
    height: 84px;
    object-fit: contain;
}

.app-brand::after {
    margin-top: 1px;
}

@media (max-width: 640px) {
    .app-header {
        padding: 12px 12px 0;
    }

    .app-brand img {
        width: 76px;
        height: 76px;
    }

    .app-header-inner {
        gap: 10px;
    }
}



/* Definitieve header-afwerking: tabs sluiten naadloos aan */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-bottom: 0;
    border: 0;
    box-shadow: none;
    background: var(--green-deep);
}

.app-header-inner {
    gap: 10px;
    padding-bottom: 0;
    border: 0;
    box-shadow: none;
}

.app-nav {
    position: relative;
    z-index: 1;
    width: 100%;
    align-self: stretch;
    margin: 0 0 -1px;
    padding: 4px 4px 0;
    transform: none;
    border: 0;
    border-radius: 13px 13px 0 0;
    box-shadow: none;
    background: #214334;
}

.app-nav a {
    border-radius: 9px 9px 0 0;
}

.app-nav a.is-active {
    background: var(--background);
    color: var(--green-dark);
    box-shadow: inset 0 -3px 0 #70a67b;
}

@media (max-width: 640px) {
    .app-header {
        padding: 12px 12px 0;
    }

    .app-nav {
        margin-bottom: -1px;
        padding: 3px 3px 0;
    }
}
