/* ============================================================
   GRUNDINSTÄLLNINGAR & VARIABLER
   ============================================================ */
:root {
    --bas-storlek: 18px;
    --knapp-hojd: 56px;
    --primar: #0066cc;
    --primar-mork: #004d99;
    --primar-ljus: #e6f0fa;
    --bakgrund: #f4f6f8;
    --kort-bakgrund: #ffffff;
    --text: #1a1a1a;
    --text-ljus: #666;
    --text-dampad: #999;
    --grans: #e5e8eb;
    --skugga: 0 2px 8px rgba(0, 0, 0, 0.06);
    --radie: 14px;
    
    /* 3D-färger */
    --3d-bla: #0077ee;
    --3d-bla-mork: #0055aa;
    --3d-bla-skugga: #003366;
    --3d-rod: #f44336;
    --3d-rod-mork: #c62828;
    --3d-rod-skugga: #7f1d1d;
    --3d-gron: #00aa44;
    --3d-gron-mork: #007733;
    --3d-gron-skugga: #003d1a;
}

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

html {
    font-size: var(--bas-storlek);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    background: var(--bakgrund);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.vy { min-height: 100vh; }
.dold { display: none !important; }

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

main {
    padding: 20px 16px 40px;
}

.liten-text {
    font-size: 0.85rem;
    color: var(--text-dampad);
    margin-top: 8px;
}

/* ============================================================
   GEMENSAM 3D-KNAPP (Bas för alla knappar)
   ============================================================ */
.knapp-3d {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: all 0.1s ease;
    cursor: pointer;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.knapp-3d:active {
    transform: translateY(3px);
}

/* ============================================================
   KNAPPAR – FÄRGER & EFFEKTER
   ============================================================ */

/* 1. Standard (Blå) - För Spara, Skicka, Logga in */
.knapp-primar, 
.login-box button,
header button,
.kalender-nav button,
.tankkod-rad button {
    background: linear-gradient(135deg, var(--3d-bla) 0%, var(--3d-bla-mork) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 
        0 4px 0 var(--3d-bla-skugga),
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.knapp-primar {
    width: 100%;
    padding: 20px;
    font-size: 1.15rem;
    margin-top: 24px;
    min-height: var(--knapp-hojd);
}

.knapp-primar:active,
.login-box button:active,
header button:active,
.kalender-nav button:active,
.tankkod-rad button:active {
    box-shadow: 
        0 1px 0 var(--3d-bla-skugga),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(3px);
    background: linear-gradient(135deg, var(--3d-bla-mork) 0%, #003d7a 100%);
}

/* 2. Fara (Röd) - För Logga ut, Ta bort */
.logga-ut-knapp,
.knapp-ta-bort {
    background: linear-gradient(135deg, var(--3d-rod) 0%, var(--3d-rod-mork) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 
        0 4px 0 var(--3d-rod-skugga),
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.logga-ut-knapp {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    min-height: var(--knapp-hojd);
}

.knapp-ta-bort {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 12px;
    min-height: 48px;
}

.logga-ut-knapp:active,
.knapp-ta-bort:active {
    box-shadow: 
        0 1px 0 var(--3d-rod-skugga),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(3px);
    background: linear-gradient(135deg, var(--3d-rod-mork) 0%, #8b1a1a 100%);
}

/* 3. Framgång (Grön) - För Godkänn */
.knapp-godkann {
    background: linear-gradient(135deg, var(--3d-gron) 0%, var(--3d-gron-mork) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.5);
    border-bottom-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    box-shadow: 
        0 3px 0 var(--3d-gron-skugga),
        0 5px 10px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
    color: white;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 14px;
}

.knapp-godkann:active {
    box-shadow: 
        0 1px 0 var(--3d-gron-skugga),
        0 2px 4px rgba(0, 0, 0, 0.25);
    transform: translateY(2px);
    background: linear-gradient(135deg, var(--3d-gron-mork) 0%, #005522 100%);
}

/* 4. Sekundär (Grå) - För Avbryt, Ladda ner */
.knapp-sekundar,
.knapp-redigera {
    background: linear-gradient(135deg, #f0f2f5 0%, #d9dfe6 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-top-color: rgba(255, 255, 255, 1);
    border-bottom-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    box-shadow: 
        0 3px 0 #b0b7bf,
        0 5px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.1s ease;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    padding: 16px 20px;
    font-size: 1rem;
    min-height: var(--knapp-hojd);
    margin-bottom: 16px;
    width: 100%;
}

.knapp-sekundar.small {
    padding: 10px 14px;
    font-size: 0.9rem;
    min-height: auto;
    margin-bottom: 0;
}

.knapp-redigera {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0066cc;
    box-shadow: 
        0 3px 0 #90caf9,
        0 5px 10px rgba(0, 0, 0, 0.15);
    padding: 10px 14px;
    min-height: 44px;
    width: auto;
    margin-bottom: 0;
}

.knapp-sekundar:active,
.knapp-redigera:active {
    box-shadow: 
        0 1px 0 #b0b7bf,
        0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(2px);
    background: linear-gradient(135deg, #d9dfe6 0%, #c0c8d1 100%);
}

/* 5. Stäng/Nej (Röd, liten) */
.knapp-nej {
    background: linear-gradient(135deg, var(--3d-rod) 0%, var(--3d-rod-mork) 100%);
    color: white;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 3px 0 var(--3d-rod-skugga);
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.knapp-nej:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--3d-rod-skugga);
}

/* ============================================================
   HEADER & MENY
   ============================================================ */
header {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 68px;
    box-shadow: 0 2px 12px rgba(0, 102, 204, 0.25);
}

.meny-knapp {
    font-size: 32px;
    line-height: 1;
    min-width: 48px;
    min-height: 48px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#anvandare-namn {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Hamburgermeny */
.meny-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.hamburger-meny {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 90vw;
    background: white;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.hamburger-meny.oppen {
    transform: translateX(0);
}

.meny-header {
    background: linear-gradient(135deg, #0066cc 0%, #004d99 100%);
    color: white;
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
}

.meny-stang {
    font-size: 24px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* Menylista */
.meny-lista {
    list-style: none;
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
}

.meny-grupp {
    padding: 20px 24px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.meny-grupp-rubrik {
    background: linear-gradient(135deg, #f9fafb 0%, #f0f2f5 100%);
    padding: 16px 20px 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    min-height: 44px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.1s ease;
}

.meny-grupp-rubrik:active {
    background: linear-gradient(135deg, #e6e9ee 0%, #dfe3e8 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: scale(0.99);
}

.meny-pil {
    font-size: 0.7rem;
    color: #999;
    transition: transform 0.2s;
    display: inline-block;
    width: 12px;
}

.meny-grupp-rubrik.oppen .meny-pil { transform: rotate(0deg); }
.meny-grupp-rubrik.stangd .meny-pil { transform: rotate(-90deg); }

.meny-grupp-innehall { display: block; padding: 0; }
.meny-grupp-innehall.stangd { display: none; }

.meny-grupp-innehall ul { list-style: none; padding: 0; margin: 0; }

.meny-grupp-innehall ul li button {
    width: 100%;
    text-align: left;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 24px 16px 36px;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 4px solid transparent;
    min-height: 52px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.1s ease;
}

.meny-grupp-innehall ul li button:active {
    background: linear-gradient(135deg, #e6f0fa 0%, #d9e8f5 100%);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: scale(0.98);
}

.meny-grupp-innehall ul li button.aktiv {
    background: linear-gradient(135deg, #e6f0fa 0%, #cfe3f7 100%);
    border-left: 4px solid #0066cc;
    color: #0066cc;
    font-weight: 600;
    box-shadow: 
        inset 0 2px 4px rgba(0, 102, 204, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

.meny-footer {
    padding: 16px;
    border-top: 1px solid #eee;
}

/* ============================================================
   INLOGGNING
   ============================================================ */
#login-vy {
    background: linear-gradient(135deg, #0066cc 0%, #003d7a 50%, #001a33 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

#login-vy::before,
#login-vy::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: flyta 15s infinite ease-in-out;
}

#login-vy::before { width: 400px; height: 400px; top: -150px; left: -100px; }
#login-vy::after { width: 300px; height: 300px; bottom: -100px; right: -80px; animation-delay: -7s; }

@keyframes flyta {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px 32px;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
    animation: glidaIn 0.6s ease-out;
}

@keyframes glidaIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-box h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-align: center;
    color: #0066cc;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

.login-box h1::after {
    content: 'Välkommen tillbaka';
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #666;
    margin-top: 8px;
    letter-spacing: 0;
    text-shadow: none;
}

.login-box input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    margin-bottom: 16px;
    border: 2px solid #e0e5eb;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s;
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px;
    min-height: var(--knapp-hojd);
}

.login-box input#anvandarnamn {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.login-box input#losenord {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.login-box input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    background-color: #f8fbff;
}

.login-box button {
    width: 100%;
    padding: 20px;
    font-size: 1.15rem;
    margin-top: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fel {
    color: #cc0000;
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
}

/* ============================================================
   FORMULÄR & KORT
   ============================================================ */
label {
    display: block;
    margin: 20px 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}

input[type="number"],
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    background: var(--kort-bakgrund);
    border: 1.5px solid var(--grans);
    border-radius: var(--radie);
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-bottom: 4px;
    min-height: var(--knapp-hojd);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primar);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
    font-family: inherit;
}

/* Kort */
.kort, .fordon-kort, .admin-rad, .tid-rad, .meddelande, .gt-dag, .faktura-rad {
    background: var(--kort-bakgrund);
    border-radius: var(--radie);
    box-shadow: var(--skugga);
    transition: box-shadow 0.2s, transform 0.2s;
}

.kort {
    padding: 24px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.kort-namn { font-weight: 600; font-size: 1.15rem; }
.kort-skillnad { font-size: 1.15rem; font-weight: 700; color: #666; }
.kort-skillnad.billigast { color: #00aa00; }
.kort-skillnad.dyr { color: #cc3333; }

.fordon-kort {
    padding: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
    gap: 12px;
}

.fordon-kort strong { font-size: 1.15rem; }

.fordon-status {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 8px;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.fordon-status.korforbud { background: #ffebee; color: #c62828; }
.fordon-status.besiktning { background: #fff3e0; color: #e65100; }

/* Form-box */
.form-box {
    background: var(--kort-bakgrund);
    border-radius: var(--radie);
    padding: 24px 20px;
    margin: 20px 0;
    box-shadow: var(--skugga);
    border-top: 4px solid var(--primar);
}

.form-box h3 { margin-bottom: 20px; color: #0066cc; }

.knapp-rad { display: flex; gap: 10px; margin-top: 20px; }
.knapp-rad button { flex: 1; }

/* Info-box */
.info-box {
    background: var(--primar-ljus);
    border-left: 4px solid var(--primar);
    border-radius: var(--radie);
    padding: 18px 20px;
    margin: 20px 0;
}

.info-rad {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1rem;
    gap: 12px;
}

.info-rad span { color: #666; }
.info-rad strong { color: #0066cc; font-size: 1.1rem; text-align: right; }

/* ============================================================
   DIVERSE SEKTIONER (Kalender, Admin, etc.)
   ============================================================ */
.kalender-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.kalender-nav button { padding: 14px 18px; font-size: 1rem; min-height: 48px; }
.kalender-nav strong { font-size: 1.05rem; color: #333; }

.kalender-dag {
    background: white;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 10px;
    box-shadow: var(--skugga);
    min-height: 72px;
}

.kalender-datum { font-weight: 600; color: #0066cc; font-size: 1.05rem; }
.kalender-namn { color: #333; font-size: 1rem; margin-top: 6px; }
.kalender-namn.tom { color: #bbb; font-style: italic; }

/* Admin-listor */
.admin-rad {
    padding: 16px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.admin-rad-info { flex: 1; min-width: 0; }
.admin-rad-titel { font-weight: 600; font-size: 1.05rem; word-break: break-word; }
.admin-rad-detalj { font-size: 0.85rem; color: #999; margin-top: 4px; word-break: break-word; }
.admin-rad-knappar { display: flex; gap: 8px; flex-shrink: 0; }

.admin-rad-knappar button {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    min-height: 44px;
}

/* Tankkoder */
.tankkod-rad {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tankkod-rad button { min-width: 52px; height: 48px; padding: 0; font-size: 1.2rem; }

.tankkod-rad input {
    flex: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 2px;
    min-height: 48px;
    margin-bottom: 0;
}

.tankkod-rad-leverantor { font-weight: 600; font-size: 0.95rem; min-width: 100px; }

/* Tidrapportering */
.tid-rad { padding: 16px 20px; margin-bottom: 10px; }
.tid-rad-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tid-rad-fordon { font-weight: 700; font-size: 1.1rem; color: #0066cc; }
.tid-rad-datum { font-size: 0.9rem; color: #666; }
.tid-rad-tid { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 4px; }
.tid-rad-beskrivning { font-size: 0.95rem; color: #555; margin-top: 6px; }
.tid-rad-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: #999; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee; }

#ti-total-box { background: #e8f5e9; border-left-color: #2e7d32; }
#ti-total-box .info-rad strong { color: #2e7d32; font-size: 1.3rem; }

/* Fordonsdetaljer */
.fordon-detalj-header { background: white; border-radius: 12px; padding: 24px 20px; margin-bottom: 20px; box-shadow: var(--skugga); }
.fordon-detalj-regnr { font-size: 1.8rem; font-weight: 700; color: #0066cc; margin-bottom: 6px; }
.fordon-detalj-beskrivning { font-size: 1.05rem; color: #333; margin-bottom: 8px; }
.fordon-detalj-status { display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; background: #e8f5e9; color: #2e7d32; }
.fordon-detalj-status.korforbud { background: #ffebee; color: #c62828; }
.fordon-detalj-status.besiktning { background: #fff3e0; color: #e65100; }

.fordon-sektion { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: var(--skugga); }
.fordon-sektion h3 { margin-top: 0; margin-bottom: 16px; font-size: 1.15rem; color: #333; display: flex; align-items: center; gap: 8px; }

.fordon-rad { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; gap: 12px; }
.fordon-rad:last-child { border-bottom: none; }
.fordon-rad-info { flex: 1; min-width: 0; }
.fordon-rad-titel { font-weight: 600; font-size: 1rem; color: #222; }
.fordon-rad-detalj { font-size: 0.85rem; color: #888; margin-top: 2px; }
.fordon-rad-varde { font-weight: 700; color: #0066cc; text-align: right; white-space: nowrap; }
.fordon-tom { color: #999; font-style: italic; padding: 8px 0; }
.fordon-oppna-fel { background: #ffebee; color: #c62828; padding: 10px 14px; border-radius: 8px; font-size: 0.95rem; font-weight: 600; margin-bottom: 12px; display: inline-block; }

.fordon-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0066cc;
    font-weight: 600;
    margin-bottom: 16px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 8px 0;
    min-height: 44px;
}

/* Statistik */
.statistik-flikar { display: flex; gap: 8px; margin-bottom: 20px; }

.stat-flik {
    flex: 1;
    padding: 14px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 52px;
}

.stat-flik.aktiv { background: #0066cc; color: white; }

.statistik-rad { background: white; border-radius: 10px; padding: 16px 20px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: var(--skugga); }
.statistik-fordon { font-weight: 700; font-size: 1.1rem; color: #0066cc; }
.statistik-detalj { font-size: 0.85rem; color: #888; margin-top: 2px; }
.statistik-varde { font-size: 1.3rem; font-weight: 700; color: #222; white-space: nowrap; }
.statistik-varde.lag { color: #2e7d32; }
.statistik-varde.medel { color: #e65100; }
.statistik-varde.hog { color: #c62828; }
.statistik-tom { color: #999; font-style: italic; padding: 16px; text-align: center; background: white; border-radius: 10px; }

/* Fakturaunderlag */
.faktura-rad { padding: 16px 20px; margin-bottom: 10px; }
.faktura-rad-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.faktura-rad-datum { font-weight: 700; color: #0066cc; }
.faktura-rad-tid { font-weight: 600; color: #333; }
.faktura-rad-info { font-size: 0.9rem; color: #666; margin-top: 4px; }
.faktura-rad-taggar { display: flex; gap: 8px; margin-top: 8px; }
.faktura-tagg { background: #fff3e0; color: #e65100; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }

/* Görans Tidsredovisning */
.gt-dag { padding: 16px 20px; margin-bottom: 10px; }
.gt-dag-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
.gt-dag-datum { font-weight: 700; color: #0066cc; font-size: 1.05rem; }
.gt-dag-summa { font-weight: 700; color: #00aa00; font-size: 1.05rem; }
.gt-rad { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; gap: 10px; }
.gt-rad-enhet { font-weight: 600; color: #333; }
.gt-rad-tid { color: #666; font-weight: 600; }
.gt-rad-knappar { display: flex; gap: 6px; }
.gt-rad-knappar button { padding: 6px 10px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; }
.gt-tom-dag { color: #bbb; font-style: italic; padding: 8px 0; }

/* Meddelanden */
.meddelande { padding: 16px 20px; margin-bottom: 10px; border-left: 4px solid #0066cc; }
.meddelande.olast { background: #e6f0fa; border-left-color: #f44336; }
.meddelande-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.meddelande-avsandare { font-weight: 700; color: #0066cc; }
.meddelande-datum { font-size: 0.8rem; color: #999; white-space: nowrap; }
.meddelande-amne { font-weight: 600; color: #333; margin-bottom: 6px; }
.meddelande-text { color: #555; font-size: 0.95rem; line-height: 1.5; }
.meddelande-till { font-size: 0.8rem; color: #999; margin-top: 8px; }
.meddelande-knappar { display: flex; gap: 8px; margin-top: 12px; }
.meddelande-knappar button { padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; cursor: pointer; font-weight: 600; }

/* Notis-badge */
.notis-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f44336;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Badge */
.badge { display: inline-block; font-size: 0.75rem; padding: 4px 10px; border-radius: 12px; font-weight: 600; margin-top: 4px; }
.badge-vantar { background: #fff3e0; color: #e65100; }
.badge-godkand { background: #e8f5e9; color: #2e7d32; }
.badge-nekad { background: #ffebee; color: #c62828; }

/* Dokument */
.dokument-kort {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: var(--skugga);
    min-height: 72px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.dokument-info { flex: 1; }
.dokument-titel { font-weight: 600; font-size: 1.1rem; }
.dokument-kategori { font-size: 0.85rem; color: #999; margin-top: 4px; }
.dokument-pil { color: #0066cc; font-size: 1.5rem; }

/* Bilder & filer */
input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1.5px dashed #ccc;
    border-radius: 12px;
    background: #fafafa;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

input[type="file"]:active { border-color: #0066cc; background: #e6f0fa; }

img[id$="-preview"] {
    display: block;
    max-width: 100%;
    border-radius: 12px;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rapport-bild {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.rapport-bild:active { transform: scale(0.98); }

.bild-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
}

.bild-overlay img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* Offline-indikator */
#offline-indikator {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #ff9800;
    color: white;
    text-align: center;
    padding: 12px;
    font-size: 1rem;
    z-index: 100;
    font-weight: 600;
}

/* Skroll-indikator */
.skroll-indikator {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.skroll-indikator.syns { opacity: 1; }

.skroll-indikator::after {
    content: '↓';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: rgba(0,0,0,0.4);
    animation: pulsera 1.5s infinite;
}

@keyframes pulsera {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
    50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}
/* ===== FIX FÖR INLOGGNING (ta bort ikoner) ===== */
.login-box input {
    padding: 16px !important; /* Tar bort utrymmet för ikonerna */
    background-image: none !important; /* Tar bort gubbarna */
}

/* ===== FIX FÖR KRYSSET I MENYN ===== */
.meny-stang {
    background: linear-gradient(135deg, #0077ee 0%, #0055aa 100%) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom-color: rgba(0, 0, 0, 0.3) !important;
    box-shadow: 
        0 4px 0 #003366,
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    padding: 6px 12px !important;
}

.meny-stang:active {
    box-shadow: 
        0 1px 0 #003366,
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(3px) !important;
    background: linear-gradient(135deg, #0055aa 0%, #003d7a 100%) !important;
}

/* ===== FIX FÖR DE FRISTÅENDE MENYKNAPPARNA ===== */
/* Detta ger "Skicka meddelande", "Görans" och "Ladda upp dokument" rätt storlek och 3D-effekt */
.meny-lista > li > button.meny-valj {
    width: 100%;
    text-align: left;
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 24px; /* Större padding för fristående knappar */
    font-size: 1.05rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: var(--knapp-hojd);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.1s ease;
}

.meny-lista > li > button.meny-valj:active {
    background: linear-gradient(135deg, #e6f0fa 0%, #d9e8f5 100%);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: scale(0.98);
}

.meny-lista > li > button.meny-valj.aktiv {
    background: linear-gradient(135deg, #e6f0fa 0%, #cfe3f7 100%);
    border-left: 4px solid #0066cc;
    color: #0066cc;
    font-weight: 600;
}
/* FILTER-FLIKAR (Verkstad: Inkomna felrapporter) */
.statistik-flikar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.vf-flik {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #f0f2f5 0%, #d9dfe6 100%);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 52px;
    box-shadow: 
        0 3px 0 #b0b7bf,
        0 5px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.1s ease;
}

.vf-flik:active {
    box-shadow: 0 1px 0 #b0b7bf, 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(2px);
}

.vf-flik.aktiv {
    background: linear-gradient(135deg, #0077ee 0%, #0055aa 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom-color: rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 0 #003366,
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* ============================================================
   VERSIONSINDIKATOR
   ============================================================ */
.meny-version {
    padding: 12px 20px;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    border-top: 1px solid #eee;
    background: #f9fafb;
}

.meny-version span {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}
