/* Grunnlayout */
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header med tema-knapp */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1.5em 0;
}

header h1 {
    margin: 0;
}

/* Tema-bryter-knapp */
#theme-toggle {
    position: absolute;
    right: 20px;
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #0055aa;
    color: #fff;
}

#theme-toggle:hover {
    background: #003f80;
}

/* Sentrerer login-boksen */
.login-page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Selve boksen */
.login-box {
    width: 320px;
    padding: 20px;
    border-radius: 8px;
    background: #f7f7f7;
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.login-box h2 {
    margin-top: 0;
    text-align: center;
}

/* Label + input under hverandre */
.login-box label {
    display: block;
    text-align: left;
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 14px;
}

.login-box input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Login-knapp */
.login-button {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}

.login-button:hover {
    background: #1d4ed8;
}

/* Status / feilmelding */
#status {
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
}

#status.error {
    color: #cc0000;
}

/* Tilbake-lenke */
.back-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 14px;
}

/* ---------- Mørk modus spesifikt for login ---------- */

body.dark {
    background-color: #111111;
    color: #eeeeee;
}

body.dark header {
    color: #eeeeee;
}

body.dark .login-box {
    background: #1e1e1e;
    box-shadow: 0 0 8px rgba(255,255,255,0.05);
}

body.dark .login-box input {
    background: #2a2a2a;
    border-color: #444444;
    color: #eeeeee;
}

body.dark .login-button {
    background: #3b82f6;
    color: #000000;
}

body.dark .login-button:hover {
    background: #2563eb;
}

body.dark #theme-toggle {
    background: #66aaff;
    color: #000;
}

body.dark #theme-toggle:hover {
    background: #3b82f6;
}
