﻿/* â”€â”€ Reset & tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    --bg: #f4f4f0;
    --surface: #ffffff;
    --surface-alt: #f7f7f4;
    --surface-green: #eef4ee;
    --text: #1a1a1a;
    --text-sub: #5a6a5e;
    --line: #e4e8e4;
    --accent: #2a6640;
    --accent-mid: #3a8050;
    --accent-soft: #d4e8d8;
    --walk-soft: #dceede;
    --danger: #b04040;
    --bar-track: #e0e8e0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.07);
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 20px;
    --r-xl: 24px;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    -webkit-text-size-adjust: 100%;
}

body.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

/* â”€â”€ Shell â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-shell {
    width: min(780px, 100% - 32px);
    margin: 0 auto;
    padding: 28px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* â”€â”€ Top bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    margin-bottom: 4px;
}

.top-bar-logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: -0.02em;
}

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.card + .card { margin-top: 0; }

/* â”€â”€ Eyebrow â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.eyebrow {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

/* â”€â”€ Denne uge â€” stat boxes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.this-week-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.stat-box {
    background: var(--surface-green);
    border-radius: var(--r-lg);
    padding: 16px;
}

.stat-box-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--accent);
}

.stat-box-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-box-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.stat-box-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 10px;
}

.stat-goal {
    font-size: 0.78rem;
    opacity: 0.7;
}

/* â”€â”€ Progress bar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.progress-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--bar-track);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent-mid);
    transition: width 0.4s ease;
}

/* â”€â”€ TrÃ¦ningsprogram â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.exercise-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exercise-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

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

.ex-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.ex-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ex-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.ex-target {
    font-size: 0.88rem;
    color: var(--text-sub);
}

/* â”€â”€ 4-ugers grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.week-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.week-card {
    background: var(--surface-alt);
    border-radius: var(--r-md);
    padding: 16px;
    border: 1px solid transparent;
}

.week-card.is-current {
    background: var(--surface-green);
    border-color: var(--accent-soft);
}

.week-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
}

.week-range {
    font-size: 0.82rem;
    color: var(--text-sub);
    margin-bottom: 14px;
}

.week-metric {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.week-metric strong {
    color: var(--text);
    font-weight: 700;
}

.week-metric .progress-bar {
    margin-top: 5px;
}

.week-metric-spaced {
    margin-top: 8px;
}

/* â”€â”€ Historik liste â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

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

.history-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-avatar svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-body {
    flex: 1;
    min-width: 0;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.type-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.type-pill.training {
    background: var(--accent-soft);
    color: var(--accent);
}

.type-pill.walk-run {
    background: var(--walk-soft);
    color: #2e5e38;
}

.history-date {
    font-size: 0.85rem;
    color: var(--text-sub);
}

.history-note {
    font-size: 0.88rem;
    color: var(--text-sub);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.history-note-inline {
    margin-top: 6px;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.inline-form {
    margin: 0;
}

.history-action-link,
.history-action-button,
.cancel-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-sub);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.history-action-button {
    font-family: inherit;
}

.danger-button {
    color: var(--danger);
}

.cancel-edit-link {
    width: 100%;
    margin-top: 10px;
}

.history-arrow {
    color: var(--text-sub);
    font-size: 1rem;
    flex-shrink: 0;
}

.see-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    background: none;
    border: none;
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--r-md);
    transition: background 0.15s;
}

.see-all-btn:hover { background: var(--surface-alt); }

/* â”€â”€ Flash messages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.alert, .success-banner {
    border-radius: var(--r-md);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

.alert { background: #fdecea; color: var(--danger); }
.success-banner { background: var(--accent-soft); color: var(--accent); }

/* â”€â”€ Quick-add form â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.quick-add { position: relative; }
.quick-add-floating {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 20;
}
.quick-add summary { list-style: none; }
.quick-add summary::-webkit-details-marker { display: none; }

.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(42,102,64,0.25);
    border: none;
}

.add-btn-plus {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

.quick-add-card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(340px, calc(100vw - 32px));
    padding: 20px;
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 10;
}
.quick-add-card-floating {
    top: auto;
    bottom: calc(100% + 12px);
}

.quick-add-card h2 { margin-bottom: 16px; font-size: 1.1rem; }

.quick-add-card label { display: block; margin-top: 12px; }
.quick-add-card label span { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--text-sub); }

input[type="text"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-alt);
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
}

input:focus, select:focus {
    border-color: var(--accent-mid);
}

.submit-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

/* â”€â”€ Log ud knap â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-sub);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

/* â”€â”€ Login page â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.login-card {
    width: min(440px, 100%);
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.login-card h1 { font-size: 1.6rem; margin-bottom: 8px; }
.login-card .intro { color: var(--text-sub); font-size: 0.92rem; margin-bottom: 24px; }

.stack { display: grid; gap: 14px; }

.stack label span { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--text-sub); }

.stack button {
    padding: 13px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-top: 4px;
}

.empty-state { color: var(--text-sub); font-size: 0.9rem; text-align: center; padding: 20px 0; }

.section-header {
    margin-bottom: 10px;
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 600px) {
    .app-shell { width: calc(100% - 24px); padding: 16px 0 40px; }

    .this-week-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-box { padding: 12px; }
    .stat-box-icon { width: 36px; height: 36px; margin-bottom: 8px; }
    .stat-box-num { font-size: 1.6rem; }

    .week-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(150px, 72vw);
        grid-template-columns: none;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .history-note { max-width: 80px; }

    .top-bar {
        gap: 12px;
        align-items: center;
    }

    .top-bar-logo {
        font-size: 1rem;
    }

    .card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    h1 {
        font-size: 1.45rem;
        margin-bottom: 16px;
    }

    h2 {
        font-size: 1.12rem;
    }

    .week-card {
        padding: 14px;
    }

    .history-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .history-note {
        max-width: none;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .history-arrow {
        display: none;
    }

    .history-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 56px;
    }

    .quick-add-floating {
        position: static;
        right: auto;
        bottom: auto;
        z-index: auto;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }

    .quick-add-card,
    .quick-add-card-floating {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: 10px;
        box-shadow: var(--shadow-md);
    }

    .logout-btn {
        padding: 10px 14px;
    }

    .history-action-link,
    .history-action-button {
        min-height: 38px;
    }
}

