:root{--bg:#020617;--panel:#0f172a;--card:#1f2937;--text:#e5e7eb;--mut:#94a3b8;--acc:#f97316;--line:#334155;--green:#22c55e}
*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:radial-gradient(circle at top left,#334155,#020617 55%);color:var(--text)}
.shell{display:flex;min-height:100vh}aside{width:270px;background:rgba(15,23,42,.95);border-right:1px solid #334155;padding:24px;position:sticky;top:0;height:100vh}main{flex:1;padding:34px}
.brand{display:flex;gap:12px;align-items:center;margin-bottom:26px}.brand b{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#f97316,#facc15);display:grid;place-items:center;color:#111827}.brand small,.muted{color:var(--mut)}
nav a{display:block;color:#cbd5e1;text-decoration:none;padding:12px;border-radius:12px;margin-bottom:6px}nav a:hover{background:rgba(249,115,22,.16);color:white}
.card,.stat{background:rgba(31,41,55,.9);border:1px solid rgba(148,163,184,.2);border-radius:20px;padding:22px;margin:18px 0;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.stat span{display:block;color:var(--mut)}.stat b{font-size:34px}.head{display:flex;justify-content:space-between;align-items:center}
a.btn,button{background:linear-gradient(135deg,#f97316,#ea580c);color:white;border:0;border-radius:12px;padding:11px 16px;text-decoration:none;font-weight:700;cursor:pointer}
input,select,textarea{width:100%;background:#020617;color:var(--text);border:1px solid var(--line);border-radius:12px;padding:12px;margin:7px 0 16px}textarea{min-height:110px}.code{min-height:460px;font-family:Consolas,monospace;color:#86efac}
table{width:100%;border-collapse:collapse}th,td{border-bottom:1px solid rgba(148,163,184,.18);padding:11px;text-align:left}code{color:#93c5fd}.alert{background:rgba(239,68,68,.18);border:1px solid rgba(239,68,68,.35);padding:13px;border-radius:12px}
.sim{display:grid;grid-template-columns:1fr 1fr;gap:18px}.row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(148,163,184,.16);padding:10px 0}.row input{width:auto}.led{width:18px;height:18px;border-radius:50%;background:#334155;display:inline-block}.led.on{background:var(--green);box-shadow:0 0 14px var(--green)}
@media(max-width:900px){.shell{display:block}aside{width:auto;height:auto;position:static}.grid4,.sim{grid-template-columns:1fr}}

/* =========================================================
   COMPACT ADMIN OVERRIDE - PLC Web Studio
   Přidáno kvůli užšímu a přehlednějšímu adminu
========================================================= */

.main-area {
    padding: 28px 30px;
}

.content-wrap {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar {
    width: 230px;
    min-width: 230px;
}

.card,
.stat {
    border-radius: 18px;
    padding: 20px 22px;
}

.head {
    margin-bottom: 22px;
}

.head h1,
.content-wrap > h1 {
    font-size: 30px;
    margin-bottom: 18px;
}

.grid4 {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
}

.stat {
    min-height: 110px;
}

.stat b {
    font-size: 34px;
}

table {
    min-width: 0;
}

th,
td {
    padding: 11px 12px;
}

.card table {
    font-size: 15px;
}

.card:has(table) {
    padding: 18px 22px;
}

/* Kompaktnější tlačítko vpravo nahoře */
.head .btn,
.head a.btn {
    padding: 10px 15px;
    border-radius: 12px;
}

/* Když je tabulka prázdná, karta nebude zbytečně obrovská */
.card table tbody:empty::after {
    content: "Zatím zde nejsou žádné záznamy.";
    display: block;
    color: var(--muted);
    padding: 18px 12px;
}

/* Lepší chování širokých tokenů a UID */
td code {
    display: inline-block;
    max-width: 360px;
    white-space: normal;
    word-break: break-all;
}

/* Profesionálnější horní mezera */
.content-wrap > .head:first-child,
.content-wrap > h1:first-child {
    margin-top: 6px;
}

/* Desktop - neprotahovat obsah přes celé 4K/velké monitory */
@media (min-width: 1500px) {
    .content-wrap {
        max-width: 1180px;
    }
}

/* Notebooky */
@media (max-width: 1280px) {
    .content-wrap {
        max-width: 100%;
    }

    .main-area {
        padding: 24px;
    }

    .grid4 {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

/* Tablety */
@media (max-width: 992px) {
    .main-area {
        padding: 16px;
    }

    .mobile-topbar {
        max-width: 100%;
    }

    .content-wrap {
        max-width: 100%;
    }

    .head h1,
    .content-wrap > h1 {
        font-size: 27px;
    }
}

/* Mobily */
@media (max-width: 640px) {
    .main-area {
        padding: 12px;
    }

    .card,
    .stat {
        padding: 16px;
        border-radius: 16px;
    }

    .head {
        align-items: stretch;
    }

    .head .btn,
    .head a.btn {
        width: 100%;
    }

    .grid4 {
        grid-template-columns: 1fr;
    }

    .content-wrap > h1,
    .head h1 {
        font-size: 24px;
    }

    table {
        min-width: 620px;
    }
}


/* =========================================================
   COMPACT ADMIN OVERRIDE - PLC Web Studio
   Přidáno kvůli užšímu a přehlednějšímu adminu
========================================================= */

.main-area {
    padding: 28px 30px;
}

.content-wrap {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar {
    width: 230px;
    min-width: 230px;
}

.card,
.stat {
    border-radius: 18px;
    padding: 20px 22px;
}

.head {
    margin-bottom: 22px;
}

.head h1,
.content-wrap > h1 {
    font-size: 30px;
    margin-bottom: 18px;
}

.grid4 {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
}

.stat {
    min-height: 110px;
}

.stat b {
    font-size: 34px;
}

table {
    min-width: 0;
}

th,
td {
    padding: 11px 12px;
}

.card table {
    font-size: 15px;
}

.card:has(table) {
    padding: 18px 22px;
}

/* Kompaktnější tlačítko vpravo nahoře */
.head .btn,
.head a.btn {
    padding: 10px 15px;
    border-radius: 12px;
}

/* Když je tabulka prázdná, karta nebude zbytečně obrovská */
.card table tbody:empty::after {
    content: "Zatím zde nejsou žádné záznamy.";
    display: block;
    color: var(--muted);
    padding: 18px 12px;
}

/* Lepší chování širokých tokenů a UID */
td code {
    display: inline-block;
    max-width: 360px;
    white-space: normal;
    word-break: break-all;
}

/* Profesionálnější horní mezera */
.content-wrap > .head:first-child,
.content-wrap > h1:first-child {
    margin-top: 6px;
}

/* Desktop - neprotahovat obsah přes celé 4K/velké monitory */
@media (min-width: 1500px) {
    .content-wrap {
        max-width: 1180px;
    }
}

/* Notebooky */
@media (max-width: 1280px) {
    .content-wrap {
        max-width: 100%;
    }

    .main-area {
        padding: 24px;
    }

    .grid4 {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

/* Tablety */
@media (max-width: 992px) {
    .main-area {
        padding: 16px;
    }

    .mobile-topbar {
        max-width: 100%;
    }

    .content-wrap {
        max-width: 100%;
    }

    .head h1,
    .content-wrap > h1 {
        font-size: 27px;
    }
}

/* Mobily */
@media (max-width: 640px) {
    .main-area {
        padding: 12px;
    }

    .card,
    .stat {
        padding: 16px;
        border-radius: 16px;
    }

    .head {
        align-items: stretch;
    }

    .head .btn,
    .head a.btn {
        width: 100%;
    }

    .grid4 {
        grid-template-columns: 1fr;
    }

    .content-wrap > h1,
    .head h1 {
        font-size: 24px;
    }

    table {
        min-width: 620px;
    }
}


/* =========================================================
   NARROW PROFESSIONAL ADMIN LAYOUT
   Užší CMS vzhled pro PLC Web Studio
========================================================= */

/* Celkově užší levé menu */
.sidebar {
    width: 210px !important;
    min-width: 210px !important;
    padding: 18px 14px 22px !important;
}

.brand {
    gap: 10px;
    margin-bottom: 26px;
}

.brand b {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 13px;
    font-size: 14px;
}

.sidebar-nav a {
    padding: 11px 12px;
    font-size: 15px;
}

/* Hlavní obsah */
.main-area {
    padding: 34px 26px !important;
}

/* Toto je hlavní zúžení administrace */
.content-wrap {
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Nadpisy */
.content-wrap > h1,
.head h1 {
    font-size: 29px !important;
    margin-bottom: 16px !important;
}

.content-wrap > p.muted {
    margin-bottom: 26px;
}

/* Dashboard karty - ne přes celou šířku */
.grid4 {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
}

.stat {
    min-height: 96px !important;
    padding: 18px 20px !important;
}

.stat span {
    font-size: 14px;
}

.stat b {
    font-size: 32px !important;
}

/* Běžné karty */
.card {
    padding: 20px 22px !important;
    border-radius: 18px !important;
    margin: 18px 0 !important;
}

/* Karta s postupem nebude zbytečně vysoká */
.card h2 {
    font-size: 20px;
    margin-bottom: 14px;
}

.card ol {
    margin-top: 8px;
    margin-bottom: 0;
}

/* Tabulky kompaktně */
table {
    min-width: 0 !important;
}

th,
td {
    padding: 10px 11px !important;
    font-size: 14px;
}

/* Stránky typu Zařízení */
.head {
    margin-bottom: 18px !important;
}

/* Tlačítko Přidat zařízení */
.head .btn,
.head a.btn {
    padding: 10px 15px !important;
    font-size: 14px;
}

/* Velké obrazovky - pořád držet úzký CMS vzhled */
@media (min-width: 1300px) {
    .content-wrap {
        max-width: 1040px !important;
    }
}

/* Notebook */
@media (max-width: 1200px) {
    .content-wrap {
        max-width: 100% !important;
    }

    .grid4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Tablet a mobil */
@media (max-width: 992px) {
    .sidebar {
        width: 260px !important;
        min-width: 260px !important;
    }

    .main-area {
        padding: 16px !important;
    }

    .content-wrap {
        max-width: 100% !important;
    }
}

/* Mobil */
@media (max-width: 640px) {
    .grid4 {
        grid-template-columns: 1fr !important;
    }

    .main-area {
        padding: 12px !important;
    }

    .content-wrap > h1,
    .head h1 {
        font-size: 24px !important;
    }

    .card,
    .stat {
        padding: 16px !important;
        border-radius: 16px !important;
    }

    table {
        min-width: 620px !important;
    }
}


/* =========================================================
   FINAL FIX - ZÚŽENÍ ADMINISTRACE I BEZ content-wrap
========================================================= */

/* Hlavní plocha nesmí natahovat obsah na celou obrazovku */
main,
.content,
.main-area {
    width: 100% !important;
}

/* Všechny hlavní děti v mainu zúžit a centrovat */
main > h1,
main > p,
main > .head,
main > .card,
main > .grid4,
main > .sim,
main > .stats-grid,
main > .content-wrap,
.content > h1,
.content > p,
.content > .head,
.content > .card,
.content > .grid4,
.content > .sim,
.content > .stats-grid,
.main-area > h1,
.main-area > p,
.main-area > .head,
.main-area > .card,
.main-area > .grid4,
.main-area > .sim,
.main-area > .stats-grid,
.content-wrap {
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Když je uvnitř content-wrap, zúžit i jeho obsah */
.content-wrap > h1,
.content-wrap > p,
.content-wrap > .head,
.content-wrap > .card,
.content-wrap > .grid4,
.content-wrap > .sim,
.content-wrap > .stats-grid {
    max-width: 1080px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* U stránky Programy / Zařízení: hlavička s tlačítkem zůstane v rámci šířky */
.head {
    width: 100% !important;
}

/* Hlavní odsazení */
main,
.content,
.main-area {
    padding-left: 34px !important;
    padding-right: 34px !important;
}

/* Sidebar kompaktně */
.sidebar,
.shell > aside {
    width: 210px !important;
    min-width: 210px !important;
    max-width: 210px !important;
}

/* Karty a tabulky kompaktně */
.card {
    width: 100% !important;
    border-radius: 18px !important;
    padding: 18px 22px !important;
}

table {
    width: 100% !important;
    min-width: 0 !important;
}

th,
td {
    padding: 10px 11px !important;
    font-size: 14px !important;
}

/* Dashboard statistiky */
.grid4,
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.stat {
    min-height: 96px !important;
    padding: 18px 20px !important;
}

.stat b {
    font-size: 32px !important;
}

/* Velké monitory */
@media (min-width: 1500px) {
    main > h1,
    main > p,
    main > .head,
    main > .card,
    main > .grid4,
    main > .sim,
    main > .stats-grid,
    main > .content-wrap,
    .content > h1,
    .content > p,
    .content > .head,
    .content > .card,
    .content > .grid4,
    .content > .sim,
    .content > .stats-grid,
    .main-area > h1,
    .main-area > p,
    .main-area > .head,
    .main-area > .card,
    .main-area > .grid4,
    .main-area > .sim,
    .main-area > .stats-grid,
    .content-wrap,
    .content-wrap > h1,
    .content-wrap > p,
    .content-wrap > .head,
    .content-wrap > .card,
    .content-wrap > .grid4,
    .content-wrap > .sim,
    .content-wrap > .stats-grid {
        max-width: 1040px !important;
    }
}

/* Notebook */
@media (max-width: 1200px) {
    main,
    .content,
    .main-area {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .grid4,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Tablet a mobil */
@media (max-width: 992px) {
    .sidebar,
    .shell > aside {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }

    main,
    .content,
    .main-area {
        padding: 16px !important;
    }

    main > h1,
    main > p,
    main > .head,
    main > .card,
    main > .grid4,
    main > .sim,
    main > .stats-grid,
    main > .content-wrap,
    .content > h1,
    .content > p,
    .content > .head,
    .content > .card,
    .content > .grid4,
    .content > .sim,
    .content > .stats-grid,
    .main-area > h1,
    .main-area > p,
    .main-area > .head,
    .main-area > .card,
    .main-area > .grid4,
    .main-area > .sim,
    .main-area > .stats-grid,
    .content-wrap {
        max-width: 100% !important;
    }
}

/* Mobil */
@media (max-width: 640px) {
    main,
    .content,
    .main-area {
        padding: 12px !important;
    }

    .grid4,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .head {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .head .btn,
    .head a.btn {
        width: 100% !important;
    }

    table {
        min-width: 620px !important;
    }
}


/* =========================================================
   LEFT BALANCED CMS LAYOUT
   Užší obsah, ale zarovnaný více doleva v pracovní ploše
========================================================= */

main > h1,
main > p,
main > .head,
main > .card,
main > .grid4,
main > .sim,
main > .stats-grid,
main > .content-wrap,
.content > h1,
.content > p,
.content > .head,
.content > .card,
.content > .grid4,
.content > .sim,
.content > .stats-grid,
.main-area > h1,
.main-area > p,
.main-area > .head,
.main-area > .card,
.main-area > .grid4,
.main-area > .sim,
.main-area > .stats-grid,
.content-wrap,
.content-wrap > h1,
.content-wrap > p,
.content-wrap > .head,
.content-wrap > .card,
.content-wrap > .grid4,
.content-wrap > .sim,
.content-wrap > .stats-grid {
    max-width: 1120px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Hlavní plocha bude mít příjemné odsazení od menu */
main,
.content,
.main-area {
    padding-left: 44px !important;
    padding-right: 28px !important;
}

/* Dashboard karty lépe využijí šířku */
.grid4,
.stats-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
}

/* Karta s postupem nebude tak široká jako plná obrazovka */
.card {
    max-width: 1120px !important;
}

/* Na velkých monitorech držet CMS vzhled */
@media (min-width: 1500px) {
    main > h1,
    main > p,
    main > .head,
    main > .card,
    main > .grid4,
    main > .sim,
    main > .stats-grid,
    main > .content-wrap,
    .content > h1,
    .content > p,
    .content > .head,
    .content > .card,
    .content > .grid4,
    .content > .sim,
    .content > .stats-grid,
    .main-area > h1,
    .main-area > p,
    .main-area > .head,
    .main-area > .card,
    .main-area > .grid4,
    .main-area > .sim,
    .main-area > .stats-grid,
    .content-wrap,
    .content-wrap > h1,
    .content-wrap > p,
    .content-wrap > .head,
    .content-wrap > .card,
    .content-wrap > .grid4,
    .content-wrap > .sim,
    .content-wrap > .stats-grid {
        max-width: 1120px !important;
    }
}

/* Notebook */
@media (max-width: 1200px) {
    main,
    .content,
    .main-area {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .grid4,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobil/tablet - tam musí být obsah na celou šířku */
@media (max-width: 992px) {
    main,
    .content,
    .main-area {
        padding: 16px !important;
    }

    main > h1,
    main > p,
    main > .head,
    main > .card,
    main > .grid4,
    main > .sim,
    main > .stats-grid,
    main > .content-wrap,
    .content > h1,
    .content > p,
    .content > .head,
    .content > .card,
    .content > .grid4,
    .content > .sim,
    .content > .stats-grid,
    .main-area > h1,
    .main-area > p,
    .main-area > .head,
    .main-area > .card,
    .main-area > .grid4,
    .main-area > .sim,
    .main-area > .stats-grid,
    .content-wrap,
    .content-wrap > h1,
    .content-wrap > p,
    .content-wrap > .head,
    .content-wrap > .card,
    .content-wrap > .grid4,
    .content-wrap > .sim,
    .content-wrap > .stats-grid {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 640px) {
    .grid4,
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    main,
    .content,
    .main-area {
        padding: 12px !important;
    }
}


/* =========================================================
   MANUAL COLUMN + MENU ICONS + FOOTER
========================================================= */

.sidebar-nav a {
    display: flex !important;
    align-items: center;
    gap: 11px;
}

.nav-ico {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.nav-dashboard .nav-ico {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.nav-devices .nav-ico {
    background: linear-gradient(135deg, #22c55e, #15803d);
}

.nav-projects .nav-ico {
    background: linear-gradient(135deg, #a855f7, #7e22ce);
}

.nav-programs .nav-ico {
    background: linear-gradient(135deg, #f97316, #c2410c);
}

.nav-simulator .nav-ico {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.nav-modbus .nav-ico {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.nav-logs .nav-ico {
    background: linear-gradient(135deg, #ef4444, #991b1b);
}

.nav-logout .nav-ico {
    background: linear-gradient(135deg, #64748b, #334155);
}

.sidebar-nav a.active {
    background: rgba(249, 115, 22, .18);
    color: #fff;
}

.sidebar-nav a.active .nav-ico {
    box-shadow:
        0 0 0 2px rgba(255,255,255,.14),
        0 0 18px rgba(249,115,22,.24);
}

/* Nové rozložení: manuál vlevo, obsah vpravo */
.admin-workspace {
    display: grid;
    grid-template-columns: 280px minmax(0, 1120px);
    gap: 26px;
    align-items: start;
    max-width: 1430px;
    margin-left: 0;
    margin-right: auto;
}

.admin-content {
    min-width: 0;
}

/* Přepis starého centrování pouze uvnitř nového obsahu */
.admin-content > h1,
.admin-content > p,
.admin-content > .head,
.admin-content > .card,
.admin-content > .grid4,
.admin-content > .sim,
.admin-content > .stats-grid,
.admin-content > .content-wrap {
    max-width: 1120px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Manuálový sloupec */
.section-manual {
    position: sticky;
    top: 28px;
}

.manual-card {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .90));
    border: 1px solid rgba(148, 163, 184, .20);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.manual-kicker {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .16);
    color: #fed7aa;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.manual-card h2 {
    font-size: 19px;
    margin: 0 0 10px;
}

.manual-card p {
    color: var(--muted);
    margin: 0 0 14px;
    font-size: 14px;
}

.manual-card ul {
    margin: 0;
    padding-left: 18px;
}

.manual-card li {
    color: #e2e8f0;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.45;
}

/* Footer */
.admin-footer {
    max-width: 1430px;
    margin: 28px 0 0;
    padding: 18px 0 8px;
    border-top: 1px solid rgba(148, 163, 184, .16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
}

.admin-footer strong {
    color: #f8fafc;
    margin-right: 8px;
}

.admin-footer div {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Větší obrazovky */
@media (min-width: 1500px) {
    .admin-workspace {
        grid-template-columns: 300px minmax(0, 1120px);
        gap: 30px;
    }
}

/* Notebooky - manuál ještě necháme */
@media (max-width: 1320px) {
    .admin-workspace {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 20px;
    }

    .manual-card {
        padding: 18px;
    }
}

/* Tablety a menší obrazovky - manuál jde pod obsah */
@media (max-width: 1100px) {
    .admin-workspace {
        display: flex;
        flex-direction: column-reverse;
        gap: 18px;
        max-width: 100%;
    }

    .section-manual {
        position: static;
        width: 100%;
    }

    .manual-card {
        width: 100%;
    }

    .admin-footer {
        max-width: 100%;
    }
}

/* Mobil */
@media (max-width: 640px) {
    .nav-ico {
        width: 26px;
        height: 26px;
        min-width: 26px;
        border-radius: 9px;
        font-size: 13px;
    }

    .manual-card {
        padding: 16px;
        border-radius: 16px;
    }

    .admin-footer {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 16px;
    }
}


/* =========================================================
   MANUAL COLUMN ON RIGHT SIDE
   Přesun manuálu napravo od hlavního obsahu
========================================================= */

.admin-workspace {
    display: grid !important;
    grid-template-columns: minmax(0, 1120px) 280px !important;
    gap: 26px !important;
    align-items: start !important;
    max-width: 1430px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.admin-content {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
}

.section-manual {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: sticky !important;
    top: 28px !important;
}

/* Na větší obrazovce může být manuál trochu širší */
@media (min-width: 1500px) {
    .admin-workspace {
        grid-template-columns: minmax(0, 1120px) 300px !important;
        gap: 30px !important;
    }
}

/* Notebook */
@media (max-width: 1320px) {
    .admin-workspace {
        grid-template-columns: minmax(0, 1fr) 250px !important;
        gap: 20px !important;
    }
}

/* Tablet a mobil: manuál bude pod hlavním obsahem */
@media (max-width: 1100px) {
    .admin-workspace {
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        max-width: 100% !important;
    }

    .admin-content {
        order: 1 !important;
        width: 100% !important;
    }

    .section-manual {
        order: 2 !important;
        position: static !important;
        width: 100% !important;
    }
}


/* =========================================================
   MANUAL COLUMN TOP ALIGN
   Posun nápovědy nahoru k horní liště
========================================================= */

.section-manual {
    top: 8px !important;
    align-self: start !important;
}

.manual-card {
    margin-top: 0 !important;
}

/* Srovnání horní hrany pravého manuálu s obsahem */
.admin-workspace {
    align-items: start !important;
}

/* Pokud je v hlavním obsahu horní mezera, manuál držíme výše */
@media (min-width: 1101px) {
    .section-manual {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}


/* =========================================================
   MANUAL WHOLE COLUMN UP
   Posun celého pravého sloupce nápovědy nahoru
========================================================= */

@media (min-width: 1101px) {
    .section-manual {
        margin-top: -78px !important;
        top: 12px !important;
    }

    .manual-card {
        margin-top: 0 !important;
    }
}

/* Na tabletu a mobilu nápovědu neposouvat */
@media (max-width: 1100px) {
    .section-manual {
        margin-top: 0 !important;
        top: auto !important;
    }
}


/* =========================================================
   PROFESSIONAL MANUAL COLUMN POLISH
   Širší pravý sloupec + lepší odsazení nápovědy
========================================================= */

/* Celkové rozložení: hlavní obsah + profesionálnější pravý manuál */
@media (min-width: 1101px) {
    .admin-workspace {
        grid-template-columns: minmax(0, 1080px) 340px !important;
        gap: 34px !important;
        max-width: 1480px !important;
        align-items: start !important;
    }

    .section-manual {
        width: 340px !important;
        min-width: 340px !important;
        max-width: 340px !important;
        padding-left: 10px !important;
        padding-right: 18px !important;
        margin-top: -78px !important;
        top: 14px !important;
        border-left: 1px solid rgba(148, 163, 184, .16);
    }

    .manual-card {
        width: 100% !important;
        max-width: 280px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        padding: 22px 20px !important;
        border-radius: 22px !important;
    }
}

/* Větší monitory */
@media (min-width: 1500px) {
    .admin-workspace {
        grid-template-columns: minmax(0, 1120px) 360px !important;
        gap: 38px !important;
        max-width: 1540px !important;
    }

    .section-manual {
        width: 360px !important;
        min-width: 360px !important;
        max-width: 360px !important;
        padding-left: 16px !important;
        padding-right: 24px !important;
    }

    .manual-card {
        max-width: 300px !important;
    }
}

/* Vzhled samotné karty nápovědy */
.manual-card {
    background:
        linear-gradient(180deg, rgba(20, 31, 52, .98), rgba(17, 24, 39, .96)) !important;
    border: 1px solid rgba(148, 163, 184, .24) !important;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, .22),
        inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

.manual-kicker {
    margin-bottom: 16px !important;
    padding: 6px 11px !important;
    font-size: 12px !important;
    background: rgba(249, 115, 22, .20) !important;
    color: #fed7aa !important;
}

.manual-card h2 {
    font-size: 20px !important;
    line-height: 1.25 !important;
    margin-bottom: 12px !important;
}

.manual-card p {
    font-size: 14px !important;
    line-height: 1.55 !important;
    margin-bottom: 16px !important;
    color: #d4dbe8 !important;
}

.manual-card ul {
    padding-left: 18px !important;
    margin-top: 8px !important;
}

.manual-card li {
    font-size: 14px !important;
    line-height: 1.55 !important;
    margin: 9px 0 !important;
    color: #e5e7eb !important;
}

.manual-card li::marker {
    color: #f97316;
}

/* Na menších noteboocích trochu zúžit, ale stále čitelné */
@media (max-width: 1320px) and (min-width: 1101px) {
    .admin-workspace {
        grid-template-columns: minmax(0, 1fr) 310px !important;
        gap: 24px !important;
    }

    .section-manual {
        width: 310px !important;
        min-width: 310px !important;
        max-width: 310px !important;
        padding-left: 10px !important;
        padding-right: 14px !important;
    }

    .manual-card {
        max-width: 260px !important;
        padding: 20px 18px !important;
    }
}

/* Tablet a mobil: manuál pod obsah, bez bočního sloupce */
@media (max-width: 1100px) {
    .section-manual {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0 !important;
        border-left: 0 !important;
    }

    .manual-card {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}


/* =========================================================
   FIX MANUAL CARD TOP SPACING
   Oprava horního odsazení nápovědy
========================================================= */

@media (min-width: 1101px) {
    .section-manual {
        margin-top: -58px !important;
        padding-top: 18px !important;
        top: 12px !important;
        overflow: visible !important;
    }

    .manual-card {
        margin-top: 0 !important;
        transform: none !important;
        border-radius: 20px !important;
    }
}

/* Pokud by se horní část stále dotýkala okraje */
.manual-card {
    overflow: visible !important;
}

.manual-kicker {
    position: relative !important;
    z-index: 2 !important;
}


/* =========================================================
   LOGIN PAGE - DESIGNSTRIPE STYLE CZ
   Úvodní stránka pro nepřihlášené
========================================================= */

.layout-guest {
    background:
        radial-gradient(circle at top, rgba(96, 165, 250, .10), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #1f2937 !important;
}

.guest-main {
    min-height: 100vh !important;
    display: grid !important;
    place-items: center !important;
    padding: 28px !important;
    background: transparent !important;
}

.guest-content {
    width: 100% !important;
    max-width: 430px !important;
}

.auth-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 360px;
    text-align: center;
    color: #2a1736;
}

.auth-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-logo-mark {
    position: relative;
    width: 54px;
    height: 48px;
}

.auth-logo-mark span {
    position: absolute;
    width: 28px;
    height: 34px;
    border-radius: 8px 8px 4px 4px;
    transform: rotate(-8deg);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}

.auth-logo-mark span:nth-child(1) {
    left: 4px;
    top: 3px;
    background: #fbbf24;
}

.auth-logo-mark span:nth-child(2) {
    left: 14px;
    top: 8px;
    background: #fb7185;
}

.auth-logo-mark span:nth-child(3) {
    left: 24px;
    top: 13px;
    background: #2563eb;
}

.auth-card h1 {
    margin: 0 0 10px !important;
    font-size: 30px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    color: #2d1740 !important;
}

.auth-subtitle {
    margin: 0 0 18px !important;
    color: #7c6f86 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}

.google-login-btn {
    width: 100%;
    max-width: 250px;
    margin: 0 auto 22px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: #67c7f4 !important;
    color: #172033 !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 12px 28px rgba(103, 199, 244, .28);
    opacity: 1 !important;
    cursor: not-allowed;
    transform: none !important;
}

.google-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    color: #2563eb;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.auth-form-panel {
    background:
        radial-gradient(circle at top left, rgba(255, 237, 213, .9), transparent 55%),
        rgba(255, 247, 243, .92);
    border: 1px solid rgba(255, 228, 220, .95);
    border-radius: 24px;
    padding: 22px 22px 24px;
    box-shadow:
        0 22px 60px rgba(148, 77, 61, .10),
        inset 0 1px 0 rgba(255,255,255,.7);
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.auth-divider span {
    height: 1px;
    background: rgba(148, 126, 136, .20);
}

.auth-divider em {
    font-style: normal;
    font-size: 12px;
    color: #9b8b95;
    white-space: nowrap;
}

.auth-form-panel input {
    width: 100% !important;
    height: 52px !important;
    margin: 0 0 14px !important;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 17px !important;
    background: #fff !important;
    color: #2d1740 !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow:
        0 6px 18px rgba(148, 77, 61, .06),
        inset 0 0 0 1px rgba(148, 126, 136, .08);
}

.auth-form-panel input::placeholder {
    color: #c2b7bf;
}

.auth-form-panel input:focus {
    box-shadow:
        0 0 0 4px rgba(103, 199, 244, .20),
        inset 0 0 0 1px rgba(103, 199, 244, .75);
}

.auth-links {
    text-align: left;
    margin: -4px 0 13px;
}

.auth-links a {
    font-size: 12px;
    color: #9b7c8f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-submit {
    width: 100%;
    height: 52px;
    border-radius: 16px !important;
    border: 0 !important;
    background: #67c7f4 !important;
    color: #1d2738 !important;
    font-weight: 900 !important;
    box-shadow: 0 14px 28px rgba(103, 199, 244, .30);
    transform: none !important;
}

.auth-submit:hover {
    background: #55bdec !important;
}

.auth-alert {
    background: rgba(239, 68, 68, .10);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, .20);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
    text-align: left;
}

.auth-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
    font-size: 13px;
    color: #2d1740;
}

.auth-bottom a {
    color: #2d1740;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.auth-bottom strong {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: #67c7f4;
    color: #1d2738;
    font-size: 18px;
    line-height: 1;
}

.auth-footer-note {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    color: #a197a2;
    font-size: 12px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Přepíše staré card/login styly jen pro přihlašování */
.login.card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

@media (max-width: 480px) {
    .guest-main {
        padding: 18px !important;
    }

    .auth-card {
        max-width: 100%;
    }

    .auth-form-panel {
        padding: 20px 18px 22px;
        border-radius: 22px;
    }

    .auth-card h1 {
        font-size: 28px !important;
    }

    .auth-bottom {
        gap: 12px;
        flex-wrap: wrap;
    }
}


/* =========================================================
   LOGIN REDESIGN - DARKER CENTERED PLC STYLE
========================================================= */

body.layout-guest {
    background:
        radial-gradient(circle at top, rgba(56, 189, 248, .10), transparent 24%),
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, .10), transparent 22%),
        linear-gradient(135deg, #0b1120 0%, #111827 38%, #0f172a 100%) !important;
    color: #e5e7eb !important;
}

.layout-guest .guest-main {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px !important;
    background: transparent !important;
}

.layout-guest .guest-content {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.plc-auth-page {
    width: 100%;
}

.auth-shell {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(360px, 520px);
    gap: 42px;
    align-items: center;
    justify-content: center;
}

.auth-card-modern {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    text-align: center;
    color: #f8fafc;
}

.auth-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-logo-mark {
    position: relative;
    width: 56px;
    height: 50px;
}

.auth-logo-mark span {
    position: absolute;
    width: 28px;
    height: 34px;
    border-radius: 8px 8px 5px 5px;
    transform: rotate(-8deg);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.auth-logo-mark span:nth-child(1) {
    left: 4px;
    top: 3px;
    background: #fbbf24;
}

.auth-logo-mark span:nth-child(2) {
    left: 14px;
    top: 8px;
    background: #fb7185;
}

.auth-logo-mark span:nth-child(3) {
    left: 24px;
    top: 13px;
    background: #2563eb;
}

.auth-heading h1 {
    margin: 0 0 10px !important;
    font-size: 42px !important;
    line-height: 1.08 !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -.02em;
}

.auth-subtitle {
    margin: 0 0 22px !important;
    color: #a8b3c7 !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
}

.google-login-btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 24px;
    border: 0;
    border-radius: 16px;
    padding: 13px 18px;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8) !important;
    color: #0f172a !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 16px 34px rgba(56, 189, 248, .22);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}

.google-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(56, 189, 248, .28);
}

.google-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.auth-form-panel {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .86), rgba(15, 23, 42, .94)) !important;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 28px;
    padding: 24px;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, .28),
        inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(10px);
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-divider span {
    height: 1px;
    background: rgba(148, 163, 184, .18);
}

.auth-divider em {
    font-style: normal;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.auth-form-panel input {
    width: 100% !important;
    height: 54px !important;
    margin: 0 0 14px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(148, 163, 184, .14) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.06) !important;
    color: #f8fafc !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.auth-form-panel input::placeholder {
    color: #94a3b8;
}

.auth-form-panel input:focus {
    border-color: rgba(56, 189, 248, .65) !important;
    box-shadow:
        0 0 0 4px rgba(56, 189, 248, .14),
        inset 0 1px 0 rgba(255,255,255,.04);
}

.auth-links {
    text-align: left;
    margin: -3px 0 15px;
}

.auth-links a {
    font-size: 12px;
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-submit {
    width: 100%;
    height: 54px;
    border-radius: 16px !important;
    border: 0 !important;
    background: linear-gradient(135deg, #38bdf8, #2563eb) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 18px 38px rgba(37, 99, 235, .24);
    transition: transform .16s ease, box-shadow .16s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, .30);
}

.auth-alert {
    background: rgba(239, 68, 68, .14);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, .28);
    border-radius: 14px;
    padding: 11px 13px;
    margin-bottom: 14px;
    font-size: 13px;
    text-align: left;
}

.auth-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
    font-size: 14px;
    color: #cbd5e1;
}

.auth-bottom a {
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-bottom strong {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: #38bdf8;
    color: #0f172a;
    font-size: 18px;
    line-height: 1;
}

.auth-footer-note {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    color: #7c8aa0;
    font-size: 12px;
}

.auth-visual-panel {
    position: relative;
    padding: 28px 28px 26px;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, .78), rgba(15, 23, 42, .92));
    border: 1px solid rgba(148, 163, 184, .14);
    box-shadow:
        0 28px 80px rgba(0, 0, 0, .30),
        inset 0 1px 0 rgba(255,255,255,.04);
    overflow: hidden;
}

.auth-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, .16), transparent 28%),
        radial-gradient(circle at bottom left, rgba(249, 115, 22, .10), transparent 22%);
    pointer-events: none;
}

.auth-visual-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(56, 189, 248, .14);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    margin-bottom: 14px;
}

.auth-visual-panel h2 {
    position: relative;
    z-index: 1;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #ffffff;
}

.auth-visual-panel p {
    position: relative;
    z-index: 1;
    margin: 0 0 22px;
    color: #a8b3c7;
    line-height: 1.6;
    font-size: 15px;
}

.plc-hero {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin: 18px 0 22px;
}

.plc-device {
    width: 100%;
    max-width: 430px;
}

.plc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.plc-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 7px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111827;
    font-weight: 900;
    font-size: 13px;
    box-shadow: 0 10px 22px rgba(249, 115, 22, .28);
}

.plc-model {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
}

.plc-main {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: 78px 1fr 78px;
    gap: 14px;
    box-shadow:
        0 25px 55px rgba(0, 0, 0, .30),
        inset 0 1px 0 rgba(255,255,255,.04);
}

.plc-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.plc-side-title {
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
}

.plc-terminal {
    width: 46px;
    height: 18px;
    background: linear-gradient(180deg, #0f172a, #1f2937);
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 6px;
    position: relative;
}

.plc-terminal::after {
    content: "";
    position: absolute;
    right: 5px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
}

.plc-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.plc-screen {
    width: 100%;
    min-height: 170px;
    border-radius: 18px;
    padding: 18px 14px;
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .92), rgba(17, 24, 39, .98));
    border: 1px solid rgba(148, 163, 184, .18);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plc-screen-title {
    color: #f8fafc;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: .03em;
}

.plc-leds {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.led {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(255,255,255,.12);
}

.led.green {
    background: #22c55e;
    box-shadow: 0 0 14px rgba(34, 197, 94, .45);
}

.led.red {
    background: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, .40);
}

.plc-port-row {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.plc-port {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .55);
}

.plc-port.ethernet {
    color: #7dd3fc;
}

.plc-port.rs485 {
    color: #86efac;
}

.plc-rail {
    height: 14px;
    width: 88%;
    margin: 14px auto 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #9ca3af, #6b7280);
    opacity: .75;
}

.auth-visual-list {
    position: relative;
    z-index: 1;
    margin: 0;
    padding-left: 18px;
    color: #dbe4f0;
}

.auth-visual-list li {
    margin: 10px 0;
    line-height: 1.5;
}

.auth-visual-list li::marker {
    color: #38bdf8;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 26px;
        max-width: 460px;
    }

    .auth-card-modern,
    .auth-visual-panel {
        max-width: 100%;
    }

    .auth-visual-panel {
        order: 2;
    }

    .auth-card-modern {
        order: 1;
    }
}

@media (max-width: 640px) {
    .layout-guest .guest-main {
        padding: 18px !important;
    }

    .auth-heading h1 {
        font-size: 34px !important;
    }

    .auth-form-panel,
    .auth-visual-panel {
        border-radius: 24px;
        padding: 20px;
    }

    .plc-main {
        grid-template-columns: 58px 1fr 58px;
        gap: 10px;
        padding: 14px;
    }

    .plc-terminal {
        width: 34px;
        height: 16px;
    }

    .plc-screen {
        min-height: 150px;
        padding: 14px 10px;
    }

    .plc-screen-title {
        font-size: 18px;
    }

    .auth-bottom {
        flex-wrap: wrap;
        gap: 10px;
    }
}


/* =========================================================
   FINAL PROFESSIONAL LOGIN - PLC WEB STUDIO
========================================================= */

body.layout-guest {
    min-height: 100vh !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(56, 189, 248, .14), transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(249, 115, 22, .10), transparent 24%),
        linear-gradient(135deg, #07111f 0%, #0f172a 44%, #111827 100%) !important;
    color: #e5e7eb !important;
}

.layout-guest .guest-main {
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px !important;
    background: transparent !important;
}

.layout-guest .guest-content {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
}

/* Schovej staré login styly, pokud zůstaly v CSS */
.auth-page,
.plc-auth-page,
.auth-shell,
.auth-card,
.auth-card-modern,
.auth-visual-panel {
    all: unset;
}

/* Hlavní layout */
.pro-login-page {
    width: 100%;
}

.pro-login-shell {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 390px;
    gap: 34px;
    align-items: stretch;
}

/* Levý profesionální panel */
.pro-login-info {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    border-radius: 32px;
    padding: 34px;
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .72), rgba(15, 23, 42, .88));
    border: 1px solid rgba(148, 163, 184, .16);
    box-shadow:
        0 28px 90px rgba(0, 0, 0, .34),
        inset 0 1px 0 rgba(255,255,255,.04);
}

.pro-login-info::before {
    content: "";
    position: absolute;
    inset: -120px -120px auto auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(56, 189, 248, .12);
    filter: blur(2px);
}

.pro-login-info::after {
    content: "";
    position: absolute;
    left: -80px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(249, 115, 22, .10);
}

.pro-login-brand,
.pro-login-copy,
.pro-plc-card,
.pro-login-features {
    position: relative;
    z-index: 1;
}

.pro-login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 54px;
}

.pro-login-brand-icon,
.pro-login-mini-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #111827;
    font-weight: 950;
    box-shadow: 0 12px 28px rgba(249, 115, 22, .24);
}

.pro-login-brand strong {
    display: block;
    color: #ffffff;
    font-size: 17px;
}

.pro-login-brand span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 2px;
}

.pro-login-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(56, 189, 248, .13);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 16px;
}

.pro-login-copy h1 {
    max-width: 560px;
    margin: 0 0 16px;
    font-size: 44px;
    line-height: 1.06;
    letter-spacing: -.035em;
    color: #ffffff;
}

.pro-login-copy p {
    max-width: 570px;
    margin: 0;
    color: #b9c5d6;
    font-size: 16px;
    line-height: 1.65;
}

/* PLC vizuál */
.pro-plc-card {
    margin-top: 34px;
    max-width: 620px;
    border-radius: 28px;
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .78), rgba(2, 6, 23, .72));
    border: 1px solid rgba(148, 163, 184, .16);
    box-shadow:
        0 24px 60px rgba(0,0,0,.30),
        inset 0 1px 0 rgba(255,255,255,.035);
}

.pro-plc-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}

.pro-plc-card-head span {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.pro-plc-card-head strong {
    color: #fed7aa;
    font-size: 13px;
}

.pro-plc-body {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) 118px;
    gap: 16px;
}

.pro-plc-column,
.pro-plc-center {
    border-radius: 20px;
    background: rgba(15, 23, 42, .74);
    border: 1px solid rgba(148, 163, 184, .14);
    padding: 16px;
}

.pro-plc-title {
    text-align: center;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    margin-bottom: 12px;
}

.pro-plc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(148, 163, 184, .08);
}

.pro-plc-row:last-child {
    border-bottom: 0;
}

.pro-plc-row span {
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 800;
}

.pro-plc-row i {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 13px rgba(34,197,94,.42);
}

.pro-plc-center {
    display: grid;
    place-items: center;
}

.pro-plc-display {
    width: 100%;
    min-height: 170px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .90), rgba(17, 24, 39, .98));
    border: 1px solid rgba(148, 163, 184, .16);
}

.pro-plc-display strong {
    color: #ffffff;
    font-size: 24px;
    letter-spacing: .04em;
}

.pro-plc-leds,
.pro-plc-ports {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pro-plc-leds i {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.pro-plc-leds .ok {
    background: #22c55e;
    box-shadow: 0 0 14px rgba(34,197,94,.48);
}

.pro-plc-leds .warn {
    background: #ef4444;
    box-shadow: 0 0 14px rgba(239,68,68,.42);
}

.pro-plc-ports span {
    min-width: 60px;
    height: 34px;
    border-radius: 11px;
    display: inline-grid;
    place-items: center;
    background: rgba(2, 6, 23, .58);
    border: 1px solid rgba(148,163,184,.14);
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 900;
}

.pro-login-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.pro-login-features div {
    padding: 15px;
    border-radius: 18px;
    background: rgba(15, 23, 42, .58);
    border: 1px solid rgba(148,163,184,.12);
}

.pro-login-features strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
    margin-bottom: 5px;
}

.pro-login-features span {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.45;
}

/* Pravá přihlašovací karta */
.pro-login-card {
    align-self: center;
    border-radius: 32px;
    padding: 30px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(241, 245, 249, .94));
    color: #111827;
    border: 1px solid rgba(255,255,255,.76);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, .36),
        inset 0 1px 0 rgba(255,255,255,.9);
}

.pro-login-card-head {
    text-align: center;
    margin-bottom: 22px;
}

.pro-login-mini-logo {
    margin: 0 auto 16px;
    width: 48px;
    height: 48px;
    border-radius: 15px;
}

.pro-login-card h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 30px;
    letter-spacing: -.025em;
}

.pro-login-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
    font-size: 14px;
}

.pro-login-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(239, 68, 68, .10);
    border: 1px solid rgba(239,68,68,.20);
    color: #991b1b;
    font-size: 13px;
}

.pro-google-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background: #111827 !important;
    color: #ffffff !important;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(15,23,42,.16);
}

.pro-google-btn span {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ffffff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

.pro-login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 11px;
    align-items: center;
    margin: 20px 0;
}

.pro-login-divider span {
    height: 1px;
    background: rgba(100,116,139,.22);
}

.pro-login-divider em {
    font-style: normal;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.pro-login-form label {
    display: block;
    margin: 0 0 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
}

.pro-login-form input {
    width: 100% !important;
    height: 50px !important;
    margin: 0 0 14px !important;
    padding: 0 15px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(100,116,139,.22) !important;
    background: #ffffff !important;
    color: #111827 !important;
    outline: 0 !important;
    font-size: 14px !important;
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.pro-login-form input::placeholder {
    color: #94a3b8;
}

.pro-login-form input:focus {
    border-color: rgba(37,99,235,.58) !important;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.pro-login-help {
    margin: -4px 0 16px;
    text-align: right;
}

.pro-login-help a {
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
    font-weight: 750;
}

.pro-login-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    font-weight: 950 !important;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(37,99,235,.24);
}

.pro-login-bottom {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(100,116,139,.16);
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 13px;
}

.pro-login-bottom a {
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

/* Responzivita */
@media (max-width: 1050px) {
    .pro-login-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .pro-login-info {
        display: none;
    }

    .pro-login-card {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .layout-guest .guest-main {
        padding: 18px !important;
    }

    .pro-login-card {
        padding: 24px;
        border-radius: 26px;
    }

    .pro-login-card h2 {
        font-size: 27px;
    }
}


/* =========================================================
   TECHNICAL LOGIN BACKGROUND EFFECT
   Technické pozadí pro nepřihlášenou stránku
========================================================= */

body.layout-guest {
    position: relative !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    background:
        radial-gradient(circle at 18% 22%, rgba(56, 189, 248, .20), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(249, 115, 22, .16), transparent 25%),
        radial-gradient(circle at 50% 92%, rgba(34, 197, 94, .10), transparent 28%),
        linear-gradient(135deg, #050b16 0%, #0b1220 42%, #111827 100%) !important;
}

/* technická mřížka */
body.layout-guest::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, .075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .075) 1px, transparent 1px),
        linear-gradient(rgba(56, 189, 248, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, .055) 1px, transparent 1px);
    background-size:
        48px 48px,
        48px 48px,
        12px 12px,
        12px 12px;
    mask-image: radial-gradient(circle at center, black 0%, black 54%, transparent 86%);
    opacity: .65;
}

/* jemný diagonální technický overlay */
body.layout-guest::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, transparent 0%, transparent 42%, rgba(56, 189, 248, .08) 43%, transparent 44%, transparent 100%),
        linear-gradient(300deg, transparent 0%, transparent 57%, rgba(249, 115, 22, .06) 58%, transparent 59%, transparent 100%);
    opacity: .85;
}

/* obsah nad pozadím */
.layout-guest .guest-main,
.layout-guest .guest-content,
.pro-login-page,
.pro-login-shell {
    position: relative !important;
    z-index: 2 !important;
}

/* technické světelné body */
.pro-login-page::before,
.pro-login-page::after {
    content: "";
    position: fixed;
    z-index: 1;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(1px);
}

.pro-login-page::before {
    width: 420px;
    height: 420px;
    left: -120px;
    top: 12%;
    background:
        radial-gradient(circle, rgba(56, 189, 248, .22), transparent 64%);
    animation: plcGlowMoveA 9s ease-in-out infinite alternate;
}

.pro-login-page::after {
    width: 360px;
    height: 360px;
    right: -100px;
    bottom: 10%;
    background:
        radial-gradient(circle, rgba(249, 115, 22, .18), transparent 66%);
    animation: plcGlowMoveB 11s ease-in-out infinite alternate;
}

/* přidáme na levý panel jemný “circuit” efekt */
.pro-login-info {
    position: relative !important;
}

.pro-login-info .pro-login-brand::after {
    content: "";
    position: absolute;
    left: 34px;
    right: 34px;
    top: 106px;
    height: 1px;
    background:
        linear-gradient(90deg, transparent, rgba(56, 189, 248, .34), rgba(249, 115, 22, .26), transparent);
    opacity: .7;
}

/* technické čáry uvnitř info panelu */
.pro-login-info::before {
    background:
        radial-gradient(circle at 80% 12%, rgba(56, 189, 248, .18), transparent 28%),
        linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, .10) 49%, transparent 50%),
        linear-gradient(0deg, transparent 0%, rgba(249, 115, 22, .07) 49%, transparent 50%) !important;
    background-size: auto, 110px 110px, 86px 86px !important;
}

/* karta loginu víc vystoupí z technického pozadí */
.pro-login-card {
    position: relative !important;
    overflow: hidden !important;
}

.pro-login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, .12), transparent 36%),
        linear-gradient(135deg, rgba(255,255,255,.40), transparent 35%);
    opacity: .55;
}

.pro-login-card > * {
    position: relative;
    z-index: 1;
}

/* decentní pulzování LED v PLC vizuálu */
.pro-plc-row i,
.pro-plc-leds .ok,
.pro-plc-leds .warn {
    animation: plcLedPulse 2.2s ease-in-out infinite;
}

.pro-plc-row:nth-child(odd) i {
    animation-delay: .35s;
}

.pro-plc-leds .warn {
    animation-delay: .7s;
}

/* animace */
@keyframes plcGlowMoveA {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: .75;
    }
    to {
        transform: translate3d(45px, 28px, 0) scale(1.08);
        opacity: .95;
    }
}

@keyframes plcGlowMoveB {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: .70;
    }
    to {
        transform: translate3d(-38px, -24px, 0) scale(1.10);
        opacity: .92;
    }
}

@keyframes plcLedPulse {
    0%, 100% {
        opacity: .74;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.18);
    }
}

/* Na mobilech zjemnit efekty kvůli výkonu */
@media (max-width: 760px) {
    body.layout-guest {
        overflow: auto !important;
    }

    body.layout-guest::before {
        background-size:
            38px 38px,
            38px 38px,
            14px 14px,
            14px 14px;
        opacity: .45;
    }

    .pro-login-page::before,
    .pro-login-page::after {
        display: none;
    }
}

/* Respektování nastavení omezení animací */
@media (prefers-reduced-motion: reduce) {
    .pro-login-page::before,
    .pro-login-page::after,
    .pro-plc-row i,
    .pro-plc-leds .ok,
    .pro-plc-leds .warn {
        animation: none !important;
    }
}


/* =========================================================
   LOGIN BRAND TITLE ONLY
========================================================= */

.pro-login-brand {
    display: none !important;
}

.pro-login-info .pro-login-brand::after {
    display: none !important;
}

.pro-login-brand-title {
    position: relative;
    z-index: 2;
    display: block;
    text-align: center;
    margin: 4px 0 42px;
    font-size: 44px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow:
        0 2px 12px rgba(0,0,0,.28),
        0 0 24px rgba(56, 189, 248, .10);
}

.pro-login-brand-title::after {
    content: "";
    display: block;
    width: 140px;
    height: 3px;
    margin: 16px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #f97316);
    box-shadow: 0 0 22px rgba(56, 189, 248, .22);
}

@media (max-width: 560px) {
    .pro-login-brand-title {
        font-size: 30px;
        letter-spacing: .08em;
        margin-bottom: 28px;
    }

    .pro-login-brand-title::after {
        width: 110px;
        margin-top: 12px;
    }
}


/* =========================================================
   LOGIN ADMIN ONLY NOTE
========================================================= */

.pro-login-bottom {
    display: none !important;
}

.pro-login-admin-note {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(100,116,139,.16);
    text-align: center;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   REMOVE GOOGLE LOGIN FROM ADMIN LOGIN
========================================================= */

.pro-google-btn,
.pro-login-divider,
.google-login-btn,
.auth-divider {
    display: none !important;
}

