:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --bg-dark: #1a1a1a;
    --box-bg: #252525;
    --input-bg: #2d2d2d;
    --text-main: #ffffff;
    --text-muted: #bbbbbb;
    --error-bg: rgba(255, 77, 77, 0.1);
    --error-text: #ff4d4d;
}

/* Container som sentrerer innholdet på siden */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Selve boksen - fungerer i modal og på egen side */
.auth-box {
    width: 100%;
    max-width: 420px;
    background: var(--box-bg);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    color: var(--text-main);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header img {
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
}

.auth-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Skjema-elementer */
.auth-form .field {
    margin-bottom: 1.2rem;
}

.auth-form input {
    width: 100%;
    height: 55px; /* Store felt for mobil-fingre */
    padding: 0 15px;
    font-size: 16px; /* Hindrer auto-zoom på iOS */
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    color: white;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    background: #333;
}

/* Knapper */
.auth-btn {
    width: 100%;
    height: 55px;
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.auth-btn:hover {
    background: var(--primary-hover);
}

.auth-btn:active {
    transform: scale(0.98);
}

/* Feilmeldinger */
.error-banner {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    border: 1px solid var(--error-text);
}

.link-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 15px;
}

.link-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Tilpasning for Modal/Dialog */
dialog .auth-box {
    box-shadow: none;
    padding: 1rem 0.5rem;
}

body{
    background:#1a1a1a;
}