/* ============================================
   GoVinn – Stilark
   ============================================ */

:root {
    --green:        #1D9E75;
    --green-light:  #EAF3DE;
    --green-dark:   #0F6E56;
    --amber:        #BA7517;
    --amber-light:  #FAEEDA;
    --red:          #A32D2D;
    --red-light:    #FCEBEB;
    --purple:       #534AB7;
    --purple-light: #EEEDFE;
    --gray-bg:      #F5F5F4;
    --gray-border:  #E0DFD8;
    --gray-text:    #888780;
    --text:         #2C2C2A;
    --text-sub:     #5F5E5A;
    --white:        #FFFFFF;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 1px 3px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--gray-bg);
    line-height: 1.5;
}

/* ── Auth-sider ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-container {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-border);
    padding: 36px 32px;
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.logo-icon { font-size: 32px; }

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: -0.5px;
}

.auth-sub {
    text-align: center;
    color: var(--gray-text);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--gray-text);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-border);
}

.auth-forgot {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray-text);
}

.auth-forgot a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

/* ── Skjema ── */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
}

.form-group .hint {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 5px;
}

/* ── Knapper ── */
.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline {
    background: transparent;
    color: var(--text-sub);
    border-color: var(--gray-border);
}

.btn-outline:hover { background: var(--gray-bg); }

.btn-danger {
    background: var(--red-light);
    color: var(--red);
    border-color: var(--red-light);
}

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

/* ── Varsler ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #F7C1C1;
}

.alert-success {
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid #9FE1CB;
}

.alert-info {
    background: var(--purple-light);
    color: var(--purple);
    border: 1px solid #AFA9EC;
}

/* ── Navigasjon (bunn) ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 16px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--gray-text);
    text-decoration: none;
    padding: 4px 12px;
}

.nav-item.active { color: var(--green); }

.nav-item .nav-icon { font-size: 22px; }

/* ── Topbar ── */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.star-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--amber-light);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #633806;
}

/* ── Kort / lister ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-border);
    margin-bottom: 12px;
    overflow: hidden;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--gray-border);
}

.card-row:last-child { border-bottom: none; }

.section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px 5px;
}

/* ── Oppgavekort ── */
.task-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-border);
    margin: 0 12px 10px;
    overflow: hidden;
}

.task-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.priority-bar {
    width: 4px;
    align-self: stretch;
    border-radius: 2px;
    flex-shrink: 0;
}

.priority-bar.high   { background: #E24B4A; }
.priority-bar.medium { background: #EF9F27; }
.priority-bar.low    { background: var(--green); }
.priority-bar.none   { background: var(--gray-border); }

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

.task-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-title.done {
    text-decoration: line-through;
    color: var(--gray-text);
    font-weight: 400;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.tag-easy   { background: var(--green-light);  color: #3B6D11; }
.tag-medium { background: var(--amber-light);  color: #854F0B; }
.tag-hard   { background: var(--red-light);    color: #993C1D; }
.tag-time   { background: var(--gray-bg);      color: var(--gray-text); }
.tag-rep    { background: #E6F1FB;             color: #185FA5; }
.tag-forfeit{ background: var(--red-light);    color: var(--red); }
.tag-session{ background: var(--purple-light); color: var(--purple); }

.task-points {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}

.points-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--amber);
}

.bonus-text { font-size: 11px; font-weight: 500; }
.bonus-text.positive { color: var(--green); }
.bonus-text.negative { color: var(--red); }

/* ── Fremgang (dagsmål) ── */
.progress-bar-wrap {
    height: 7px;
    background: var(--gray-bg);
    border-radius: 10px;
    overflow: hidden;
}

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

/* ── Responsiv ── */
.page-content {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 80px;
}

@media (max-width: 480px) {
    .auth-container { padding: 28px 20px; }
}
