*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

    :root { --safe-top:env(safe-area-inset-top,0px); --safe-bot:env(safe-area-inset-bottom,0px); }

    body {
      font-family:'DM Sans',-apple-system,sans-serif; color:#fff;
      min-height:100vh; -webkit-font-smoothing:antialiased;
      display:flex; flex-direction:column; overflow-x:hidden;
      background:
        radial-gradient(ellipse 120% 70% at 50% -5%, rgba(255,255,255,.07) 0%, transparent 55%),
        #0a0a0a;
    }

     
    .top-bar {
      position:fixed; top:0; left:0; right:0; z-index:200;
      padding-top:var(--safe-top);
      height:calc(54px + var(--safe-top));
      display:flex; align-items:flex-end;
      border-bottom:1px solid rgba(255,255,255,.07);
      background:rgba(10,10,10,.9);
      -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
    }
    .top-bar-inner {
      width:100%; display:flex; align-items:center; justify-content:space-between;
      gap:12px; padding:0 32px 14px;
    }
    @media(max-width:640px){ .top-bar-inner { padding-left:18px; padding-right:18px; } }
    .top-logo {
      font-size:10px; font-weight:500; letter-spacing:7px; text-transform:uppercase;
      color:rgba(255,255,255,.6); text-decoration:none; transition:color .2s;
    }
    .top-logo:hover { color:rgba(255,255,255,.9); }

     
    .lang-switch {
      display:flex; gap:1px;
      background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.09);
      border-radius:6px; padding:2px;
    }
    .lang-btn {
      padding:4px 10px; border-radius:4px; font-size:9px; font-weight:500;
      letter-spacing:1.5px; text-transform:uppercase; cursor:pointer;
      border:none; background:transparent; color:rgba(255,255,255,.28);
      transition:all .15s; font-family:inherit;
    }
    .lang-btn.active { background:rgba(255,255,255,.11); color:rgba(255,255,255,.82); }
    .lang-btn:hover:not(.active) { color:rgba(255,255,255,.5); }

     
    .center {
      flex:1; display:flex; align-items:center; justify-content:center;
      padding:calc(70px + var(--safe-top)) 20px calc(32px + var(--safe-bot));
      position:relative; z-index:10;
    }

     
    .login-card {
      width:100%; max-width:340px;
      background:rgba(255,255,255,.03);
      border:1px solid rgba(255,255,255,.09);
      border-radius:14px; padding:36px 32px;
    }
    @media(max-width:380px){ .login-card { padding:28px 20px; } }

    .login-brand { text-align:center; margin-bottom:30px; }
    .login-logo {
      font-size:22px; font-weight:200; letter-spacing:10px;
      text-transform:uppercase; color:rgba(255,255,255,.88);
    }
    .login-sub {
      font-size:9px; letter-spacing:4px; text-transform:uppercase;
      color:rgba(255,255,255,.22); margin-top:5px;
    }

     
    .login-input {
      width:100%; padding:11px 14px;
      background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
      border-radius:8px; color:#fff; font-size:13px; margin-bottom:10px;
      font-family:inherit; transition:border-color .2s,background .15s; outline:none;
    }
    .login-input::placeholder { color:rgba(255,255,255,.2); }
    .login-input:focus { border-color:rgba(255,255,255,.22); background:rgba(255,255,255,.06); }

     
    /* Preskočenie druhého faktora na tomto prehliadači. Objaví sa až vtedy,
       keď server naozaj pýta kód. */
    .login-remember { display:none; align-items:center; gap:9px; margin:2px 0 12px;
      font-size:12px; color:rgba(255,255,255,.55); cursor:pointer; text-align:left; }
    .login-remember.on { display:flex; }
    .login-remember input { width:15px; height:15px; accent-color:#d4d4d8; cursor:pointer;
      margin:0; flex-shrink:0; }

    .login-btn {
      width:100%; padding:11px;
      background:rgba(255,255,255,.88); color:#0a0a0a;
      border:none; border-radius:8px;
      font-size:10px; font-weight:600; letter-spacing:2px; text-transform:uppercase;
      cursor:pointer; transition:background .2s;
      font-family:inherit; display:flex; align-items:center; justify-content:center; gap:8px;
    }
    .login-btn:hover { background:#fff; }
    .login-btn:disabled { opacity:.4; cursor:default; }

     
    .login-btn-ghost {
      width:100%; padding:11px;
      background:transparent; color:rgba(255,255,255,.45);
      border:1px solid rgba(255,255,255,.1); border-radius:8px;
      font-size:10px; font-weight:500; letter-spacing:2px; text-transform:uppercase;
      cursor:pointer; transition:all .2s;
      font-family:inherit; display:flex; align-items:center; justify-content:center; gap:8px;
      margin-top:8px;
    }
    .login-btn-ghost:hover { border-color:rgba(255,255,255,.25); color:rgba(255,255,255,.75); }

     
    .login-link {
      color:rgba(255,255,255,.32); font-size:11px; text-decoration:none;
      border-bottom:1px dotted rgba(255,255,255,.18); padding-bottom:1px;
      cursor:pointer; transition:color .2s;
    }
    .login-link:hover { color:rgba(255,255,255,.65); }

    .login-error { color:#f87171; font-size:12px; margin-top:12px; display:none; }
    .login-ok    { color:#34d399; font-size:12px; margin-top:12px; display:none; }

    .links-row { display:flex; gap:16px; flex-wrap:wrap; margin-top:16px; }
    .divider { height:1px; background:rgba(255,255,255,.06); margin:18px 0; }

    .admin-link-box { text-align:center; margin-top:10px; font-size:10px; color:rgba(255,255,255,.18); }
    .admin-link-box a { color:rgba(255,255,255,.28); text-decoration:none; border-bottom:1px dotted rgba(255,255,255,.14); }
    .admin-link-box a:hover { color:rgba(255,255,255,.55); }

     
    .modal-overlay {
      display:none; position:fixed; inset:0; z-index:10000;
      background:rgba(0,0,0,.7); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
      align-items:center; justify-content:center; padding:20px;
    }
    .modal-overlay.open { display:flex; }
    .modal-box {
      background:#111; border:1px solid rgba(255,255,255,.09);
      border-radius:14px; padding:32px; width:100%; max-width:400px;
    }
    .modal-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:22px; gap:16px; }
    .modal-title-wrap .modal-ttl { font-size:18px; font-weight:400; }
    .modal-title-wrap .modal-stl { font-size:9px; text-transform:uppercase; letter-spacing:2.5px; color:rgba(255,255,255,.3); margin-top:3px; }
    .close-x {
      width:32px; height:32px; border-radius:50%; flex-shrink:0;
      background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.09);
      color:rgba(255,255,255,.5); cursor:pointer;
      display:flex; align-items:center; justify-content:center; font-size:12px;
      transition:all .15s;
    }
    .close-x:hover { background:rgba(255,255,255,.1); color:#fff; }
    .modal-err  { color:#f87171; font-size:12px; margin-top:10px; min-height:14px; }
    .modal-ok   { color:#34d399; font-size:12px; margin-top:4px;  min-height:14px; }
    .modal-warn { color:#fbbf24; font-size:12px; margin-top:10px; line-height:1.55; min-height:14px; }

    .code-inputs { display:flex; gap:8px; justify-content:center; margin-bottom:14px; }
    .code-input {
      width:42px; height:50px; text-align:center; font-size:20px; font-weight:500;
      background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1);
      border-radius:8px; color:#fff; font-family:'DM Mono',monospace;
      transition:border-color .15s; outline:none;
    }
    .code-input:focus { border-color:rgba(255,255,255,.3); }

    .hint-box {
      padding:10px 14px; background:rgba(255,255,255,.04);
      border:1px solid rgba(255,255,255,.1); border-radius:8px;
      font-size:12px; color:rgba(255,255,255,.45); line-height:1.55; margin-bottom:14px;
    }

     
    footer {
      position:relative; z-index:10; text-align:center;
      padding:18px 20px calc(18px + var(--safe-bot));
      font-size:9px; color:rgba(255,255,255,.14); letter-spacing:2px; text-transform:uppercase;
    }

     
    .theme-toggle {
      position:fixed; top:calc(54px + var(--safe-top) + 10px); left:16px;
      z-index:199; width:32px; height:32px; border-radius:8px;
      background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1);
      color:rgba(255,255,255,.38); cursor:pointer;
      display:flex; align-items:center; justify-content:center; font-size:12px;
      transition:background .2s, border-color .2s, color .2s;
    }
    .theme-toggle:hover { background:rgba(255,255,255,.13); color:rgba(255,255,255,.75); }

     
    body.light {
      background:
        radial-gradient(ellipse 120% 70% at 50% -5%, rgba(0,0,0,.055) 0%, transparent 55%),
        #e6e3e0;
      color:rgba(0,0,0,.85);
    }
    body.light .top-bar { background:rgba(230,227,224,.94); border-bottom-color:rgba(0,0,0,.13); }
    body.light .top-logo { color:rgba(0,0,0,.6); }
    body.light .top-logo:hover { color:rgba(0,0,0,.88); }
    body.light .lang-switch { background:rgba(0,0,0,.07); border-color:rgba(0,0,0,.14); }
    body.light .lang-btn { color:rgba(0,0,0,.42); }
    body.light .lang-btn.active { background:rgba(0,0,0,.14); color:rgba(0,0,0,.85); }
    body.light .login-card { background:#dad7d3; border-color:rgba(0,0,0,.14); }
    body.light .login-logo { color:rgba(0,0,0,.85); }
    body.light .login-sub { color:rgba(0,0,0,.42); }
    body.light .login-input { background:rgba(0,0,0,.06); border-color:rgba(0,0,0,.14); color:rgba(0,0,0,.85); }
    body.light .login-input::placeholder { color:rgba(0,0,0,.38); }
    body.light .login-input:focus { border-color:rgba(0,0,0,.28); background:rgba(0,0,0,.09); }
    body.light .login-btn { background:rgba(0,0,0,.82); color:#e6e3e0; }
    body.light .login-btn:hover { background:#000; color:#fff; }
    body.light .login-btn-ghost { border-color:rgba(0,0,0,.16); color:rgba(0,0,0,.52); }
    body.light .login-btn-ghost:hover { border-color:rgba(0,0,0,.34); color:rgba(0,0,0,.82); }
    body.light .login-link { color:rgba(0,0,0,.48); border-bottom-color:rgba(0,0,0,.22); }
    body.light .login-link:hover { color:rgba(0,0,0,.75); }
    body.light .login-error { color:#b91c1c; }
    body.light .login-ok { color:#15803d; }
    body.light .divider { background:rgba(0,0,0,.12); }
    body.light .admin-link-box { color:rgba(0,0,0,.32); }
    body.light .admin-link-box a { color:rgba(0,0,0,.45); border-bottom-color:rgba(0,0,0,.2); }
    body.light .modal-box { background:#d4d1ce; border-color:rgba(0,0,0,.14); }
    body.light .modal-ttl { color:rgba(0,0,0,.85); }
    body.light .modal-stl { color:rgba(0,0,0,.45); }
    body.light .close-x { background:rgba(0,0,0,.07); border-color:rgba(0,0,0,.14); color:rgba(0,0,0,.55); }
    body.light .close-x:hover { background:rgba(0,0,0,.14); color:rgba(0,0,0,.88); }
    body.light .code-input { background:rgba(0,0,0,.06); border-color:rgba(0,0,0,.14); color:rgba(0,0,0,.85); }
    body.light .code-input:focus { border-color:rgba(0,0,0,.34); }
    body.light .hint-box { background:rgba(0,0,0,.06); border-color:rgba(0,0,0,.14); color:rgba(0,0,0,.55); }
    body.light footer { color:rgba(0,0,0,.32); }
    body.light .theme-toggle { background:rgba(0,0,0,.07); border-color:rgba(0,0,0,.16); color:rgba(0,0,0,.5); }
    body.light .theme-toggle:hover { background:rgba(0,0,0,.12); color:rgba(0,0,0,.8); }
