/* ---------------------------------------------------------------- login */
body.locked { overflow: hidden; }
body.locked .app { display: none; }
body:not(.locked) .login { display: none; }

.login { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: #04080c; overflow: hidden; }
.login canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.login-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none; }
.login-glow.g1 { width: 620px; height: 620px; left: -160px; top: -200px; background: radial-gradient(circle, rgba(25,211,197,.55), transparent 65%); animation: drift 14s ease-in-out infinite alternate; }
.login-glow.g2 { width: 700px; height: 700px; right: -220px; bottom: -260px; background: radial-gradient(circle, rgba(102,143,69,.55), transparent 65%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(80px, 60px) scale(1.12); } }

.login-wrap { position: relative; z-index: 2; width: min(1180px, calc(100vw - 32px)); display: grid; grid-template-columns: 1.15fr 440px; gap: 56px; align-items: center; }
.login-hero { color: var(--text); animation: rise .8s cubic-bezier(.2,.9,.3,1) both; }
.lh-kaj { height: 40px; margin-bottom: 26px; filter: drop-shadow(0 0 22px rgba(255,255,255,.18)); }
.login-hero h1 { font-size: clamp(42px, 5.2vw, 72px); line-height: 1; margin: 0; letter-spacing: -2px; font-weight: 850; }
.login-hero h1 span { background: linear-gradient(90deg, #19d3c5, #a3e635 60%, #19d3c5); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }
.lh-sub { color: var(--muted); font-size: 17px; margin: 14px 0 30px; max-width: 520px; }
.lh-feats { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
.lh-feats li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: center; }
.lh-feats i { font-style: normal; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; color: #19d3c5; background: rgba(25,211,197,.1); border: 1px solid rgba(25,211,197,.3); }
.lh-feats b { display: block; font-size: 15px; }
.lh-feats span { color: var(--muted); font-size: 13px; }
.lh-stats { display: flex; gap: 34px; }
.lh-stats b { display: block; font-size: 30px; font-weight: 800; background: linear-gradient(180deg, #fff, #9fb4c3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lh-stats span { color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }

.login-card {
  position: relative; padding: 34px 34px 26px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(20,32,44,.78), rgba(10,18,26,.86));
  border: 1px solid rgba(140,200,230,.18);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px); animation: rise .8s .12s cubic-bezier(.2,.9,.3,1) both;
}
.login-card::before { content: ""; position: absolute; inset: -1px; border-radius: 22px; padding: 1px; background: linear-gradient(140deg, rgba(25,211,197,.7), transparent 35%, transparent 65%, rgba(163,230,53,.6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.lc-kaj { height: 24px; } .lc-te { height: 26px; } .lc-x { color: var(--dim); font-size: 18px; }
.login-card h2 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.lc-sub { color: var(--muted); margin: 6px 0 24px; font-size: 13.5px; }
.fld { display: block; margin-bottom: 16px; }
.fld > span { display: block; font-size: 12px; font-weight: 700; color: #cfe2ee; margin-bottom: 7px; letter-spacing: .3px; }
.inp { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-radius: 13px; background: rgba(4,10,16,.6); border: 1px solid rgba(140,200,230,.18); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.inp:focus-within { border-color: #19d3c5; box-shadow: 0 0 0 4px rgba(25,211,197,.15); color: #19d3c5; }
.inp input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.inp input::placeholder { color: #4d6272; }
.eye { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px; opacity: .7; }
.lc-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); margin: 4px 0 16px; }
.chk { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.chk input { accent-color: #19d3c5; }
.lc-err { min-height: 18px; color: #ff8a96; font-size: 12.5px; margin-bottom: 8px; }
.lc-btn { width: 100%; height: 52px; border: 0; border-radius: 13px; cursor: pointer; font: inherit; font-weight: 800; font-size: 15.5px; color: #00201c; letter-spacing: .3px;
  background: linear-gradient(135deg, #19d3c5, #7cf0c8 55%, #a3e635); background-size: 160% 100%; box-shadow: 0 12px 30px rgba(25,211,197,.35); transition: background-position .4s, transform .15s, box-shadow .2s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lc-btn:hover { background-position: 100% 0; box-shadow: 0 14px 38px rgba(25,211,197,.5); }
.lc-btn:active { transform: translateY(1px); }
.lc-btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(0,32,28,.3); border-top-color: #00201c; display: none; animation: spin .7s linear infinite; }
.lc-btn.busy .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-card.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lc-foot { margin-top: 22px; text-align: center; color: var(--dim); font-size: 11.5px; line-height: 1.8; }
.lc-foot img { height: 15px; vertical-align: middle; opacity: .85; }
.login.out { animation: loginOut .6s ease forwards; }
@keyframes loginOut { to { opacity: 0; transform: scale(1.04); filter: blur(6px); } }

@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; gap: 26px; }
  .login-hero { text-align: center; }
  .lh-feats, .lh-stats { display: none; }
  .lh-kaj { display: none; }
  .lh-sub { margin: 10px auto 0; }
  .login-card { width: min(440px, 100%); margin: 0 auto; padding: 26px 22px 20px; }
  body.locked { overflow: auto; }
}

/* ---------------------------------------------------------------- header extras */
.reset-btn { color: #ffd58a; border-color: rgba(255,176,32,.35); }
.reset-btn:hover { background: rgba(255,176,32,.12); }
.user { position: relative; }
#userInit { font-weight: 800; font-size: 13px; color: #00201c; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #19d3c5, #a3e635); }
.user-menu { position: absolute; right: 0; top: 46px; width: 210px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: none; z-index: 60; }
.user.open .user-menu { display: block; }
.um-h { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.um-h b { display: block; } .um-h small { color: var(--muted); }
.user-menu button { width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.user-menu button:hover { background: rgba(255,255,255,.06); }
.btn.sm { padding: 5px 10px; font-size: 12px; }

/* ---------------------------------------------------------------- accuracy panel */
.acc { padding: 2px 14px 14px; }
.acc-top { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; margin-bottom: 10px; }
.acc-ring { position: relative; width: 112px; height: 112px; }
.acc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.acc-ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.acc-ring b { font-size: 22px; font-weight: 800; }
.acc-ring small { display: block; color: var(--muted); font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase; }
.acc-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.acc-note b { color: var(--text); }
.acc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.acc th { text-align: left; color: var(--dim); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; font-weight: 700; padding: 5px 4px; border-bottom: 1px solid var(--line); }
.acc td { padding: 6px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.acc td.ok { color: var(--green); font-weight: 700; }
.acc td .zn { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 10px; font-weight: 800; color: #04121a; margin-right: 6px; }
.acc .io { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.acc .io div { padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.acc .io span { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.acc .io b { font-size: 20px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- camera wall & theatre */
.wall-hint { color: var(--dim); font-size: 11.5px; margin: 0 0 8px 2px; }
.cam { cursor: zoom-in; }
.cam .expand { opacity: .0; }
.cam:hover { border-color: var(--zc); }
.cam:hover .expand { opacity: 1; }
.theatre { position: fixed; inset: 0; z-index: 300; background: rgba(2,6,10,.94); backdrop-filter: blur(8px); display: none; flex-direction: column; padding: 14px 18px 18px; }
.theatre.show { display: flex; animation: fade .25s ease; }
.th-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.th-title { display: flex; align-items: center; gap: 12px; }
.th-title .zn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; color: #04121a; background: var(--zc, #19d3c5); }
.th-title b { font-size: 18px; display: block; } .th-title small { color: var(--muted); }
.th-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.th-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.th-stage { min-height: 0; display: grid; place-items: center; }
.th-stage .cam { width: 100%; max-height: 100%; cursor: default; }
.th-stage .cam.portrait { width: auto; height: 100%; max-width: 100%; }
.th-side { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow: auto; }
.th-side .big { font-size: 46px; font-weight: 850; line-height: 1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.th-side .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.th-side .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.th-side .row span { color: var(--muted); }
.th-side .how { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 12px; }
@media (max-width: 1000px) { .th-body { grid-template-columns: 1fr; } .th-side { max-height: 220px; } }

/* ---------------------------------------------------------------- misc */
.empty { color: var(--dim); font-size: 12.5px; padding: 14px; text-align: center; grid-column: 1 / -1; }
.sound-unlock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 120; padding: 10px 18px; border-radius: 99px; background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.5); color: #ffd58a; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
.modal.confirm { width: min(460px, 100%); text-align: center; }
.modal.confirm h3 { margin: 6px 0 8px; font-size: 20px; }
.modal.confirm p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 20px; }
.cf-ic { width: 58px; height: 58px; margin: 6px auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; color: #ffd58a; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.4); }
.cf-btns { display: flex; gap: 10px; justify-content: center; }
.reset-flash { position: fixed; inset: 0; z-index: 400; pointer-events: none; display: grid; place-items: center; background: radial-gradient(circle, rgba(25,211,197,.18), rgba(2,6,10,.75)); animation: rf 1.6s ease forwards; }
.reset-flash b { font-size: 26px; padding: 14px 26px; border-radius: 14px; background: rgba(10,18,26,.9); border: 1px solid rgba(25,211,197,.5); }
@keyframes rf { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* header density */
.nav button { white-space: nowrap; padding: 9px 12px; }
@media (max-width: 1880px) { .powered small { display: none; } .te-logo { height: 22px; } }
@media (max-width: 1300px) { #runBadge { display: none; } }
@media (max-width: 1640px) { .clock small { display: none; } .brand .prod small { display: none; } }
@media (max-width: 1500px) { .nav button span.t { display: none; } }
@media (max-width: 1600px) { #wall .cam .ts { display: none; } #wall .cam .camtag { font-size: 11px; } }
