/* ============================================================
   GRUND – BAKGRUND & MASTERPAGE-JUSTERINGAR
   ============================================================ */

/* Ljus bakgrund och ingen svart topp-linje */
body {
    background: #f6f6f6 !important;
    border-top: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Dölj header/topnav från masterpage på login-sidan */
#topnav,
.navbar,
header,
#header,
.master-header {
    display: none !important;
}

/* Dölj footer från masterpage */
#footer,
#footer .container,
#footer .content-wrapper {
    display: none !important;
}

/* Ta bort extra padding/marginaler från masterns wrappers */
#body,
#maincontainer {
    margin: 0 !important;
    padding: 0 !important;
}

/* De element som i din master ger vänsterpadding */
.content-wrapper,
.main-content,
.container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================================
   STOR HUVUDPANEL – LOGIN + INFO (EN DELAD PANEL)
   ============================================================ */

#loginMasterPanel {
    width: 960px;                  /* lite smalare så den ser mer centrerad ut */
    margin: 60px auto;             /* horisontellt centrerad */
    padding: 40px 50px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    min-height: 420px;
}

/* Vänster och höger halva – lika breda */
.left-side,
.right-side {
    width: 48%;
    padding-top: 10px;
}

/* ============================================================
   MITTENSTRECKET + "OR"
   ============================================================ */

.center-divider {
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 50%;
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.center-divider .line {
    flex: 1;
    width: 1px;
    background: #d0d0d0;
}

.center-divider span {
    padding: 6px 10px;
    background: #ffffff;
    font-weight: 600;
    color: #666;
    margin: 8px 0;
}

/* ============================================================
   LOGIN-FORM – VÄNSTERSIDAN
   ============================================================ */

/* Fieldset & legend */
.left-side fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.left-side legend {
    border: none !important;
    margin: 0 0 14px 0;
    padding: 0;
}

/* Loggan */
.left-side legend img {
    display: block;
    margin-bottom: 10px;
}

/* Titel under loggan */
#Loginlegend {
    display: block;
    font-size: 20px;
    font-weight: 600;
    margin-top: 4px;
}

/* Lista med fält (din <ol> i LayoutTemplate) */
.left-side ol {
    list-style: none;
    margin: 15px 0 5px 0;
    padding: 0;
}

.left-side ol li {
    margin-bottom: 10px;
}

/* Etiketter */
.left-side label {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
}

/* Text- och lösenordsfält */
.left-side input[type="text"],
.left-side input[type="password"] {
    width: 280px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #bfbfbf;
    font-size: 14px;
    background: #ffffff;
}

/* Checkbox-layout (”Kom ihåg mig?”) */
.left-side table {
    margin-top: -4px;
}

.left-side table td {
    padding: 0;
    vertical-align: middle;
}

.logincheckbox {
    margin-top: 2px;
}

/* Valideringsfel */
.field-validation-error {
    color: #c0392b;
    font-size: 12px;
}

/* Textblock (Glömt lösenord, språktext etc) */
.left-side p {
    margin: 6px 0;
    font-size: 14px;
}

/* Språk-dropdown */
#ddllang {
    width: 220px;
    margin-top: 4px;
}

/* Länkar i vänsterpanel */
.left-side a {
    color: #0f843d;
    text-decoration: none;
}

.left-side a:hover {
    text-decoration: underline;
}

/* ============================================================
   INFO-PANEL – HÖGERSIDAN
   ============================================================ */

#loginInfo {
    padding-left: 40px;            /* luft mot mittstrecket */
}

#loginInfo h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 600;
    color: #0f843d;
}

#loginInfo p {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 10px;
    color: #333333;
}

#loginInfo a {
    color: #0f843d;
    text-decoration: none;
}

#loginInfo a:hover {
    text-decoration: underline;
}

/* ============================================================
   LOGIN-KNAPP – GRÖN FLEXYKEY-STIL (OVERRIDAR BOOTSTRAP)
   ============================================================ */

#loginMasterPanel .btn,
#loginMasterPanel input[type="submit"],
#loginMasterPanel button[type="submit"] {
    background: #0f843d !important;
    color: #ffffff !important;
    padding: 8px 22px !important;
    border-radius: 6px !important;
    border: none !important;
    font-size: 15px !important;
    cursor: pointer;
    margin-top: 6px !important;
}

#loginMasterPanel .btn:hover,
#loginMasterPanel input[type="submit"]:hover,
#loginMasterPanel button[type="submit"]:hover {
    background: #0c6d32 !important;
}

/* ============================================================
   SPINNER – NY CSS-SPINNER, DÖLJ GAMLA GIF:EN
   ============================================================ */

#imgShowWait {
    display: none;
    margin-left: 10px;
    align-items: center;
    gap: 8px;
}

#imgShowWait[style*="block"] {
    display: inline-flex !important;
}

.login-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #dddddd;
    border-top-color: #0f843d;
    animation: login-spin 0.6s linear infinite;
}

/* Dölj eventuell gammal GIF inuti imgShowWait */
#imgShowWait img {
    display: none !important;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVT – PANELER UNDER VARANDRA PÅ SMÅ SKÄRMAR
   ============================================================ */

@media (max-width: 1100px) {

    #loginMasterPanel {
        flex-direction: column;
        width: 92%;
        padding: 30px;
        margin-top: 30px;
    }

    .left-side,
    .right-side {
        width: 100%;
        padding-top: 10px;
    }

    #loginInfo {
        padding-left: 0;
        margin-top: 20px;
    }

    .center-divider {
        display: none;
    }
}


/* ============================================================
   FIX – TA BORT EXTRA HÖJD UNDER LOGINPANELEN
   ============================================================ */

/* Tvinga bort masterpage-min-height och vit bakgrund */
.content-wrapper,
.main-content,
#maincontainer,
#body {
    min-height: auto !important;
    height: auto !important;
    background: transparent !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Gör att hela sidan bara anpassar sig till loginpanelen */
form,
html,
body {
    height: auto !important;
}


/* ============================================================
   TOTAL FIX – ELIMINATE EXTRA HEIGHT BELOW LOGIN PANEL
   ============================================================ */

/* Stoppa alla masterpage-sektioner från att skapa extra höjd */
html, body, form,
#body, #maincontainer,
.content-wrapper,
.main-content,
.clear-fix {
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Den här är viktig – tar bort vit yta via <form> */
form {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    height: auto !important;
}

/* TA BORT all vit bottenyta */
body {
    background: #f6f6f6 !important; /* din grå loginbakgrund */
    overflow-y: visible !important;
}

/* Detta tvingar sidan att sluta växa efter panelen */
#loginMasterPanel {
    margin-bottom: 0 !important;
}



/* ============================================================
   FIX: Restore proper centering while keeping bottom clean
   ============================================================ */

/* Återställ form så det inte styr layouten */
form {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Detta är det som SKA centrera loginpanelen */
#loginMasterPanel {
    position: relative !important;
    width: 1100px !important;       /* din panelbredd */
    margin: 60px auto !important;   /* AUTO = centrerad */
    left: 0 !important;             /* neutralisera tidigare sväng */
    right: 0 !important;
}

/* Får INTE påverka centrering */
#maincontainer,
.content-wrapper,
.main-content {
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Sidan ska inte skapa extra höjd */
html, body {
    height: auto !important;
}


/* Mer luft mellan divider och högra infotexten */
#loginMasterPanel .right-side,
#loginInfo {
    padding-left: 40px !important;   /* prova 40, ändra till 50/60 om du vill ha mer */
}

/* På små skärmar vill vi inte ha stor indragning */
@media (max-width: 1100px) {
    #loginMasterPanel .right-side,
    #loginInfo {
        padding-left: 0 !important;
    }
}

/* Tvinga marginal mellan divider och höger text */
#loginMasterPanel #loginInfo.right-side {
    padding-left: 40px !important;   /* ändra till 50–60px om du vill */
}
.center-divider {
    left: calc(50% - 30px) !important;
}



/* Minska gapet mellan loggan och rubriken */
.left-side legend img {
    margin-bottom: 4px !important;   /* var ~10px */
}

/* Dra upp rubriken närmare loggan */
#Loginlegend {
    margin-top: 0 !important;        /* var 4px */
}

/* Dra upp fälten lite närmare rubriken */
.left-side ol {
    margin-top: 4px !important;      /* var 15px */
}




/* Mindre vertikal luft i vänstra login-fältet */

/* Ta bort extra padding i själva fieldseten */
.left-side fieldset {
    padding-top: 0 !important;
    padding-bottom: 8px !important;
}

/* Dra upp innehållet närmare toppen av panelen */
.left-side {
    padding-top: 0 !important;
}

/* Mindre luft mellan logga och rubriken */
.left-side legend img {
    margin-bottom: 2px !important;
}

/* Dra ner rubriken närmare loggan */
#Loginlegend {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
}

/* Och mindre luft mellan rubriken och första fältet */
.left-side ol {
    margin-top: 4px !important;
}



/* =========================================
   JUSTERA BREDD + LUFT
   ========================================= */

/* Gör hela kombinerade panelen lite smalare men fortfarande centrerad */
#loginMasterPanel {
    max-width: 980px !important;   /* var 1100px */
    width: 100% !important;
    margin: 60px auto !important;
    padding: 30px 36px !important; /* mindre innerpadding */
}

/* Vänster + höger sida – dela mer jämnt och minska gapet mot mitten */
.left-side,
.right-side {
    width: 50% !important;         /* var 48% */
}

/* Vänsterblock: ta bort onödig höger-padding så fält kommer närmare strecket */
.left-side {
    padding-right: 8px !important;
}

/* Högerblock: lagom luft från strecket (du tyckte 30px såg bra ut) */
#loginInfo.right-side,
.right-side#loginInfo {
    padding-left: 30px !important;
}

/* Ta bort horisontell padding inne i fieldset så allt kryper lite inåt */
.left-side fieldset {
    padding-left: 0 !important;
    padding-right: 0 !important;
}


.qr-box {
    margin-top: 35px;
    display: flex;
    justify-content: flex-start;
    gap: 60px;
}

.qr-item { text-align: center; }

.qr-item p {
    margin-bottom: 6px;
    font-weight: 600;
}

.qr-item img {
    width: 130px;
    height: auto;
    margin-bottom: 10px;
}

.store-btn {
    width: 150px;
    margin-top: 4px;
}


/* --- QR-knapp + panel i högersidan --- */
#loginInfo #appDownloadBox {
    margin-top: 20px;
}

#loginInfo .app-toggle-btn {
    font-size: 13px;
    padding: 5px 12px;
    margin-bottom: 8px;
}

/* panelen när den är öppen */
#loginInfo .qr-box {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 4px;
}

/* Varje QR-kolumn */
#loginInfo .qr-item {
    text-align: center;
    font-size: 13px;
}

#loginInfo .qr-item p {
    margin-bottom: 4px;
    font-weight: 600;
}

/* Själva QR-bilderna – mindre än tidigare */
#loginInfo .qr-item img {
    width: 110px;
    height: auto;
    margin-bottom: 6px;
}

/* Store-badges */
#loginInfo .store-btn {
    width: 130px;
    height: auto;
}





/* =========================================
   FINJUSTERING – exakt enligt senaste bilden
   ========================================= */

/* Minska luft på vänster sida (närmare strecket) */
.left-side {
    padding-right: 0px !important;   /* var 8px – nu tajtare */
}

/* Öka luft på höger sida (från strecket) */
#loginMasterPanel .right-side,
#loginInfo.right-side {
    padding-left: 42px !important;   /* var 30px – nu snyggare luft */
}

/* Flytta ner högra textblocket något */
#loginInfo {
    margin-top: 12px !important;     /* fin liten vertikal justering */
}

/* Justera "OR"-streckens position om det behövs */
.center-divider {
    left: calc(50% - 62px) !important;   /* lite mindre offset → mer balans */
}


/* ============================================
   FINAL FIX – Right-side horizontal spacing
   ============================================ */
#loginMasterPanel .right-side#loginInfo {
    padding-left: 50px !important;   /* ändra till 40–60 px tills det känns perfekt */
}
#loginMasterPanel .left-side {
    padding-right: 4px !important;
}

/* Gör login-loggan lite mindre */
.left-side legend img {
    height: 40px !important;
    width: auto !important;   /* behåll proportioner */
}

#loginInfo p {
    position: relative;
    padding-left: 14px;
}

#loginInfo p::before {
    content: "•";
    color: #0f843d;
    font-size: 14px;
    position: absolute;
    left: 0;
    top: 2px;
}




/* Base info text: bullet + consistent left padding */
#loginInfo p {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 10px;
    color: #333333;

    padding-left: 18px;      /* space for the bullet */
    position: relative;
}

/* Default bullet */
#loginInfo p::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0.1em;
    font-size: 20px;
    line-height: 1;
    color: #0f843d;
}

/* Turn OFF bullet, but keep the same left padding/alignment */
#loginInfo p.nobullet::before {
    content: none;
}


/* 1. Hide the "Information" header visually (keep for screen readers if needed) */
#loginInfo h3 {
    display: none;
}

/* 2. Vertically center the right-side content inside the panel */
#loginMasterPanel {
    align-items: stretch; /* make children use full column height */
}

#loginInfo.right-side {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* vertical centering */
    padding-top: 0 !important; /* avoid extra top padding fighting centering */
    padding-bottom: 0 !important;
}







/* Softer, more elegant Information header */
#loginInfo h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 21px;
    font-weight: 600;
    color: #0f843d;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
}

 /* Clean, simple Information header – no bullets, no bar */
#loginInfo h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #0f843d;
    letter-spacing: 0.2px;
}

/* Make sure no pseudo-elements sneak in */
#loginInfo h3::before,
#loginInfo h3::after {
    content: none !important;
}
/* Hide the "Information" header completely */
#loginInfo h3 {
    display: none !important;
}
.left-side {
    line-height: 1.32 !important;
}


/* ===========================
   Modern unified inputs (left)
   =========================== */

/* Username + Password */
.left-side input[type="text"],
.left-side input[type="password"] {
    width: 280px;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 6px;

    /* soft green tint */
    background: rgba(15, 132, 61, 0.05) !important;
    border: 1px solid #c9d6d0 !important;
    color: #333 !important;

    box-shadow: none !important;
}

/* FORCE modern soft-green textbox style */
#loginMasterPanel .left-side input[type="text"],
#loginMasterPanel .left-side input[type="password"] {
    background-color: #f3f8f5 !important;      /* soft green tint */
    border: 1px solid #c8d5cd !important;      /* subtle green-gray border */
    color: #333 !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    box-shadow: none !important;
}

/* Focus effect */
#loginMasterPanel .left-side input[type="text"]:focus,
#loginMasterPanel .left-side input[type="password"]:focus {
    border-color: #0f843d !important;
    box-shadow: 0 0 5px rgba(15, 132, 61, 0.25) !important;
    outline: none !important;
}
/* Modern compact dropdown */
#loginMasterPanel select[id$="ddllang"] {
    background-color: #f3f8f5 !important;   /* same soft-green tint */
    border: 1px solid #c8d5cd !important;
    color: #333 !important;
    border-radius: 6px !important;
    padding: 6px 28px 6px 10px !important;  /* smaller, tighter */
    font-size: 14px !important;
    width: 180px !important;               /* NOT big like textbox */
    height: auto !important;
    line-height: 1.2 !important;

    appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%230f843d'><polygon points='5,7 15,7 10,13'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

/* Hover + focus */
#loginMasterPanel select[id$="ddllang"]:focus {
    border-color: #0f843d !important;
    box-shadow: 0 0 5px rgba(15, 132, 61, 0.25) !important;
    outline: none !important;
}





/* ============================================
   INPUT BASE STYLES (Username + Password)
   ============================================ */

#MainContent_Login1_UserName,
#MainContent_Login1_Password {
    background-color: #f3f8f5 !important;
    border: 1px solid #c8d5cd !important;
    color: #333 !important;
    border-radius: 6px !important;
    padding: 8px 10px !important;
    box-shadow: none !important;
}

#MainContent_Login1_UserName:focus,
#MainContent_Login1_Password:focus {
    border-color: #0f843d !important;
    background-color: #f8fcf9 !important;
    box-shadow: 0 0 5px rgba(15,132,61,0.25) !important;
    outline: none !important;
}

/* ============================================
   CHROME AUTOFILL — FINAL HARD OVERRIDE
   (Wrapper class required: .no-autofill)
   ============================================ */

.no-autofill input:-webkit-autofill,
.no-autofill input:-webkit-autofill:hover,
.no-autofill input:-webkit-autofill:focus,
.no-autofill input:-webkit-autofill:active {
    -webkit-text-fill-color: #333 !important;

    /* Prevent Chrome blue autofill */
    transition: background-color 50000s ease-in-out 0s !important;
    background-color: #f3f8f5 !important;
    box-shadow: 0 0 0 1000px #f3f8f5 inset !important;
    -webkit-box-shadow: 0 0 0 1000px #f3f8f5 inset !important;

    border: 1px solid #c8d5cd !important;
}

/* Hide language + version footer lines on login page (prod only) */

/* First line (left side) */
#footer + div {
    display: none !important;
}

/* Second line (right side) */
#footer + div + div {
    display: none !important;
}