/* ==========================================================================
   1. GLOBÁLNÍ RESET SCROLLBARU - Povoleno POUZE na html
   ========================================================================== */
html { 
    background:#020512 !important; 
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body, 
body *,
html:has(.db-cs-login) body,
html:has(.db-cs-login) #app,
html:has(.db-cs-login) #wrapper,
html:has(.db-cs-login) .page-wrapper,
html:has(.db-cs-login) main { 
    overflow: visible !important; 
}

body { 
    margin:0 !important; 
    background:#020512 !important; 
    min-height: 100% !important;
}

html:has(.db-cs-login), body:has(.db-cs-login) { overscroll-behavior-y:auto; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
body:has(.db-cs-login) { display:block !important; }
body:has(.db-cs-login) .navbar,
body:has(.db-cs-login) nav.navbar,
body:has(.db-cs-login) header.navbar,
body:has(.db-cs-login) .topbar,
body:has(.db-cs-login) .sidebar,
body:has(.db-cs-login) aside,
body:has(.db-cs-login) footer:not(.db-cs-footer) { display:none !important; }
body:has(.db-cs-login) > main,
body:has(.db-cs-login) > main > .container,
body:has(.db-cs-login) .container-fluid,
body:has(.db-cs-login) .main-content,
body:has(.db-cs-login) .content,
body:has(.db-cs-login) .page-content { max-width:none !important; width:100% !important; padding:0 !important; margin:0 !important; background:transparent !important; }

.db-cs-login, .db-cs-login * { box-sizing:border-box; }
.db-cs-login {
    --blue:#1595ff; --purple:#9428f6; --green:#71e34d; --text:#fff;
    width:100% !important;
    min-height: 100vh;
    margin:0 !important;
    position:relative;
    overflow-x:hidden;
    overflow-y:visible !important;
    color:var(--text);
    font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;
    background:
        radial-gradient(circle at 12% 86%, rgba(0,122,255,.28), transparent 23%),
        radial-gradient(circle at 96% 52%, rgba(147,40,246,.25), transparent 24%),
        radial-gradient(circle at 48% 55%, rgba(27,83,174,.18), transparent 35%),
        linear-gradient(135deg,#030613 0%,#040817 42%,#071022 72%,#02040d 100%);
}
.db-cs-login::before,.db-cs-login::after { content:""; position:absolute; pointer-events:none; z-index:0; }
.db-cs-login::before { left:-8%; right:-8%; bottom:-115px; height:310px; opacity:.60; background:radial-gradient(ellipse at 20% 65%, rgba(0,150,255,.9) 0 1px, transparent 2px), radial-gradient(ellipse at 76% 34%, rgba(150,42,255,.75) 0 1px, transparent 2px); background-size:16px 16px,18px 18px; mask-image:linear-gradient(to top,#000 0 35%,transparent 100%); transform:skewY(-8deg); }
.db-cs-login::after { width:430px; height:540px; right:-205px; top:118px; opacity:.50; background:radial-gradient(circle, rgba(41,132,255,.9) 0 1px, transparent 2px), radial-gradient(circle, rgba(153,43,246,.72) 0 1px, transparent 2px); background-size:18px 18px,22px 22px; mask-image:radial-gradient(circle at center,#000 0 54%,transparent 74%); }

.db-cs-wrap { 
    position:relative; 
    z-index:1; 
    min-height: 100vh; 
    display:grid; 
    grid-template-rows:auto 1fr auto; 
    overflow: visible !important;
}

/* DESIGN UPDATE: Dokonalé srovnání hlavičky na středovou osu */
.db-cs-header { width:min(1160px, calc(100% - 48px)); margin:0 auto; display:flex; align-items:center; justify-content:space-between; padding:22px 0 0; gap:18px; }
.db-cs-brand-row { display:flex; align-items:center; gap:22px; }
.db-cs-logo-link { display:inline-flex; align-items:center; text-decoration:none !important; line-height:0; }
.db-cs-logo-link img { display:block; object-fit:contain; transition:transform .18s ease, filter .18s ease; }
.db-cs-logo-link:hover img { transform:translateY(-1px); filter:drop-shadow(0 0 18px rgba(48,151,255,.34)); }
.db-cs-logo-digital img { width:260px; max-height:80px; }
.db-cs-logo-cyber img { width:230px; max-height:70px; filter:drop-shadow(0 0 15px rgba(148,40,246,.30)); }
.db-cs-separator { width:1px; height:38px; background:rgba(255,255,255,.34); }

/* DESIGN UPDATE: Vertikální zarovnání textu "100% zabezpečeno" */
.db-cs-secure { display:flex; gap:10px; align-items:center; color:#f7fbff; font-size:16px; font-weight:800; line-height:1.15; white-space:nowrap; }
.db-cs-secure span { color:#88ef62; font-size:29px; line-height:.9; }
.db-cs-secure small { display:block; margin-top:4px; color:#c8cedb; font-size:12px; font-weight:500; }

.db-cs-main { width:min(1160px, calc(100% - 48px)); margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr) minmax(360px,460px); align-items:center; gap:clamp(32px,5vw,74px); padding:30px 0 28px; }
.db-cs-left { min-width:0; }
.db-cs-kicker { margin:0 0 14px; color:#d073ff; font-size:14px; font-weight:850; letter-spacing:.25em; text-transform:uppercase; }
.db-cs-title { margin:0; font-size:clamp(38px,4.6vw,58px); line-height:1.05; letter-spacing:-.055em; font-weight:900; text-shadow:0 0 28px rgba(255,255,255,.12); }
.db-cs-title .grad { display:block; width:max-content; max-width:100%; background:linear-gradient(90deg,#19a2ff 0%,#6d65ff 45%,#9a35f4 100%); -webkit-background-clip:text; background-clip:text; color:transparent; }
.db-cs-copy { max-width:455px; margin:20px 0 22px; color:#d1d7e5; font-size:18px; line-height:1.38; }
.db-cs-accent { width:100px; height:4px; border-radius:999px; background:linear-gradient(90deg,var(--blue),var(--purple)); box-shadow:0 0 20px rgba(148,40,246,.7); margin-bottom:28px; }
.db-cs-feature-list { display:grid; gap:15px; }

/* DESIGN UPDATE: Striktní zarovnání textů vedle ikon k levé hraně */
.db-cs-feature { display:grid; grid-template-columns:58px 1fr; gap:15px; align-items:flex-start; }
.db-cs-feature div { text-align:left !important; }
.db-cs-feature h3, .db-cs-feature p { text-align:left !important; margin:0; }
.db-cs-feature p { margin-top:2px !important; }

.db-cs-feature-icon { width:56px; height:56px; border-radius:50%; display:grid; place-items:center; font-size:24px; border:1px solid rgba(138,155,188,.22); background:rgba(9,18,41,.58); box-shadow:inset 0 0 28px rgba(255,255,255,.025); }
.db-cs-feature-icon.purple { color:#9839ff; } .db-cs-feature-icon.green { color:#71e34d; } .db-cs-feature-icon.blue { color:#1595ff; }
.db-cs-feature h3 { font-size:17px; color:#fff; font-weight:850; }
.db-cs-feature p { color:#c3ccdd; font-size:14px; line-height:1.35; }

.db-cs-card { width:100%; border:1px solid rgba(154,170,205,.24); background:linear-gradient(145deg,rgba(15,25,55,.84),rgba(7,12,29,.90)); border-radius:24px; padding:28px 28px 24px; box-shadow:0 30px 80px rgba(0,0,0,.45), inset 0 0 45px rgba(255,255,255,.028); backdrop-filter:blur(18px); }
.db-cs-card-icon { width:76px; height:76px; border-radius:50%; margin:0 auto 14px; display:grid; place-items:center; color:#fff; font-size:34px; background:radial-gradient(circle,rgba(148,40,246,.18),transparent 62%); border:1px solid rgba(118,89,255,.13); box-shadow:0 0 0 13px rgba(38,52,95,.15); }
.db-cs-card h2 { margin:0; text-align:center; font-size:24px; letter-spacing:-.03em; font-weight:900; }
.db-cs-card-sub { text-align:center; color:#d6dbea; margin:9px 0 20px; font-size:15px; }
.db-cs-flashes { display:grid; gap:9px; margin-bottom:14px; }
.db-cs-flash { padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.075); border:1px solid rgba(255,255,255,.14); color:#fff; font-size:14px; }
.db-cs-form { display:grid; gap:15px; }
.db-cs-field label { display:block; margin:0 0 8px; color:#e7ebf5; font-size:12px; font-weight:850; letter-spacing:.045em; text-transform:uppercase; }
.db-cs-input { position:relative; }
.db-cs-input .ico { position:absolute; left:16px; top:50%; transform:translateY(-50%); color:#8aa0c5; font-size:18px; pointer-events:none; }

/* DESIGN UPDATE: Větší váha textu pro reálně zadané znaky */
.db-cs-input input { width:100%; height:56px; border-radius:12px; border:1px solid rgba(127,145,178,.34); background:rgba(4,10,24,.76) !important; color:#fff !important; outline:none; padding:0 104px 0 48px; font-size:15px; box-shadow:inset 0 0 22px rgba(0,0,0,.28); font-weight:500; }

/* DESIGN UPDATE: Ztmavení placeholderů pro jasný rozdíl oproti vyplněnému textu */
.db-cs-input input::placeholder { color: rgba(255, 255, 255, 0.4) !important; font-weight: 400; }
.db-cs-input input:focus { border-color:rgba(35,152,255,.95); box-shadow:0 0 0 4px rgba(35,152,255,.11), inset 0 0 22px rgba(0,0,0,.28); }
.db-cs-show { position:absolute; right:14px; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#cbd3e5; font-size:12px; font-weight:650; cursor:pointer; display:flex; align-items:center; gap:6px; padding:7px 0; }
.db-cs-submit { height:58px; border:0; border-radius:13px; cursor:pointer; color:#fff !important; font-size:18px; font-weight:850; display:flex; align-items:center; justify-content:center; gap:20px; background:linear-gradient(90deg,#1297ff 0%,#2764ff 46%,#9625ef 100%) !important; box-shadow:0 18px 44px rgba(39,100,255,.28); transition:transform .15s ease, box-shadow .15s ease; }
.db-cs-submit:hover { transform:translateY(-1px); box-shadow:0 22px 54px rgba(148,37,239,.34); }
.db-cs-submit b { font-size:30px; line-height:1; font-weight:300; }

/* DESIGN UPDATE: Výrazné prosvětlení a zvýšení čitelnosti textu v 2FA boxíku */
.db-cs-2fa-info { margin-top:14px; padding:11px 13px; border-radius:14px; border:1px solid rgba(148, 40, 246, 0.3) !important; background: rgba(148, 40, 246, 0.08) !important; color:#cbd5e1 !important; font-weight:500; }
.db-cs-2fa-info strong { color:#9428f6 !important; font-weight: 700; }

.db-cs-footer { width:min(1160px, calc(100% - 48px)); margin:0 auto; position:relative; z-index:1; display:flex !important; align-items:center; justify-content:space-between; gap:24px; padding:16px 0 20px; border-top:1px solid rgba(145,160,190,.18); background:transparent !important; color:#c9d2e3 !important; }
.db-cs-footer-left { display:grid; grid-template-columns:52px 1fr; gap:15px; align-items:center; }
.db-cs-footer-left .shield { width:52px; height:52px; display:grid; place-items:center; font-size:30px; color:#6a93ff; }

/* DESIGN UPDATE: Lepší typografická struktura textů v patičce */
.db-cs-footer strong { display:block; color:#fff !important; font-size:16px; letter-spacing: 0.02em; margin-bottom:6px !important; }
.db-cs-footer p { margin:0; color:#94a3b8 !important; max-width:480px; font-size:13.5px; line-height:1.4; }
.db-cs-footer-cyber img { width:168px; filter:drop-shadow(0 0 16px rgba(148,40,246,.32)); }

@media (max-width:1100px) {
    .db-cs-header,.db-cs-main,.db-cs-footer { width:min(100% - 32px, 1040px); }
    .db-cs-main { grid-template-columns:minmax(0,1fr) minmax(340px,430px); gap:32px; }
    .db-cs-title { font-size:clamp(34px,4.2vw,50px); }
    .db-cs-copy { font-size:16px; }
}
@media (min-width:981px) and (max-height:790px) {
    .db-cs-header{padding-top:14px}.db-cs-logo-digital img{width:150px}.db-cs-logo-cyber img{width:142px}.db-cs-secure{font-size:14px}.db-cs-secure span{font-size:25px}.db-cs-main{padding-top:14px;padding-bottom:14px}.db-cs-title{font-size:clamp(32px,3.6vw,44px)}.db-cs-kicker{font-size:12px;margin-bottom:9px}.db-cs-copy{font-size:15px;margin:13px 0 14px}.db-cs-accent{margin-bottom:18px}.db-cs-feature-list{gap:9px}.db-cs-feature{grid-template-columns:48px 1fr}.db-cs-feature-icon{width:46px;height:46px;font-size:21px}.db-cs-feature h3{font-size:15px}.db-cs-feature p{font-size:12.5px}.db-cs-card{padding:20px 22px 18px}.db-cs-card-icon{width:56px;height:56px;font-size:26px;margin-bottom:10px;box-shadow:0 0 0 10px rgba(38,52,95,.15)}.db-cs-card h2{font-size:20px}.db-cs-card-sub{font-size:13px;margin:7px 0 13px}.db-cs-form{gap:10px}.db-cs-input input{height:46px}.db-cs-submit{height:48px}.db-cs-2fa-info{margin-top:10px;font-size:11.8px;padding:9px 11px}.db-cs-footer{padding-top:10px;padding-bottom:12px}.db-cs-footer-left .shield{width:40px;height:40px;font-size:24px}.db-cs-footer strong{font-size:17px}.db-cs-footer p{font-size:12px}.db-cs-footer-cyber img{width:135px}
}

@media (max-width:680px) {
    .db-cs-header,.db-cs-main,.db-cs-footer { width:calc(100% - 32px); }
    .db-cs-header { padding-top:16px; gap:10px; }
    .db-cs-separator, .db-cs-secure { display:none; }
    .db-cs-form { gap:14px; }
    .db-cs-field label { font-size:11px; margin-bottom:7px; }
    .db-cs-input .ico { left:14px; font-size:17px; }
    .db-cs-show { right:10px; font-size:11px; gap:5px; }
}
@media (max-width:430px) { .db-cs-card { padding-left:14px; padding-right:14px; }.db-cs-input input { padding-right:72px; }.db-cs-show span:first-child { display:none; } }

/* Desktop fix */
@media (min-width:901px) {
    .db-cs-main {
        width:min(1040px, calc(100% - 48px));
        grid-template-columns:minmax(390px,520px) minmax(360px,460px);
        justify-content:center;
        gap:clamp(24px,3vw,42px);
    }
    .db-cs-left { max-width:520px; }
}

/* ==========================================================================
   FINÁLNÍ MOBILNÍ VERZE – JEDNOTNÁ PRO VŠECHNY MOBILY
   ========================================================================== */
@media (max-width: 900px) {
    html:has(.db-cs-login),
    body:has(.db-cs-login) {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .db-cs-login {
        min-height: 100vh !important; 
        height: auto !important;
        display: block !important; 
        padding: 24px 0 !important;
        position: relative !important;
    }

    .db-cs-wrap {
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }

    /* Vypnutí tří ikon natvrdo na VŠECH mobilech, aby se u nikoho neroztahoval layout */
    .db-cs-feature-list {
        display: none !important;
    }

    /* Vycentrování hlavičky */
    .db-cs-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 12px !important;
    }
    .db-cs-brand-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
    }
    .db-cs-logo-digital img { width: 150px !important; max-height: 45px !important; margin: 0 auto !important; }
    .db-cs-logo-cyber img { width: 120px !important; max-height: 35px !important; margin: 0 auto !important; }

    /* Hlavní kontejner */
    .db-cs-main {
        display: flex !important; 
        flex-direction: column !important;
        align-items: center !important;
        gap: 24px !important;
        padding: 0 16px !important;
        width: 100% !important;
    }

    /* Vycentrování textů na mobilu */
    .db-cs-left {
        width: 100% !important;
        text-align: center !important;
    }
    .db-cs-title {
        font-size: 28px !important;
        text-align: center !important;
        line-height: 1.15 !important;
        word-break: break-word !important;
    }
    .db-cs-title .grad {
        margin: 0 auto !important;
        display: inline-block !important;
        width: auto !important;
    }
    .db-cs-copy {
        font-size: 14px !important;
        margin: 10px auto !important;
        text-align: center !important;
        max-width: 340px !important;
    }
    .db-cs-accent {
        margin: 0 auto !important;
    }

    /* Stabilní přihlašovací karta */
    .db-cs-card {
        width: 100% !important;
        max-width: 420px !important; 
        margin: 0 auto !important;
        padding: 24px 20px !important;
        border-radius: 20px !important;
    }
    .db-cs-card-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }
    .db-cs-input input {
        height: 52px !important;
    }

    /* Patička se řadí pod obsah */
    .db-cs-footer {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 24px 16px !important;
        gap: 16px !important;
        width: calc(100% - 32px) !important;
    }
    .db-cs-footer-left {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 8px !important;
    }
    .db-cs-footer-left .shield {
        margin: 0 auto !important;
    }

    .db-cs-login::before,
    .db-cs-login::after {
        display: none !important; 
    }
}