/* stormgate.addlogy.com — 관리 화면 · 반입 번들 공용. StormGate Center 콘솔과 같은 색, 다크 고정, 최대한 화려하게 */
:root {
  --bg: #04070C; --panel: rgba(13, 21, 32, .66); --panel2: rgba(20, 32, 48, .6); --line: rgba(120, 180, 220, .14); --ctrl: rgba(6, 12, 20, .8);
  --text: #E9F1F7; --muted: #8796A5; --faint: #4E5D6C; --accent: #00D4FF; --accent2: #7B5CFF; --pink: #FF4FD8;
  --ok: #2EE59D; --warn: #FFC542; --bad: #FF4D6A;
  --grad: linear-gradient(100deg, #00D4FF 0%, #7B5CFF 45%, #FF4FD8 80%, #00D4FF 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: -apple-system, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Segoe UI", sans-serif; background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); text-decoration: none; }
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(80px); opacity: .5;
  background: radial-gradient(40% 35% at 15% 10%, rgba(0, 212, 255, .22), transparent 70%),
              radial-gradient(35% 30% at 85% 20%, rgba(123, 92, 255, .25), transparent 70%),
              radial-gradient(40% 35% at 60% 95%, rgba(255, 79, 216, .14), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.08); } }
.shine { background: var(--grad); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 5s linear infinite; filter: drop-shadow(0 0 20px rgba(0, 212, 255, .35)); }
@keyframes shine { to { background-position: 220% center; } }
.dim { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; }
.r { margin-left: auto; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 단추 · 입력 */
.btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 11px; font-weight: 700; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); color: var(--text); background: var(--panel2); cursor: pointer; overflow: hidden; transition: transform .2s, box-shadow .3s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { border: 0; color: #03121A; background: var(--grad); background-size: 200% auto; animation: shine 6s linear infinite;
  box-shadow: 0 8px 30px rgba(0, 212, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .25); }
.btn.danger { border-color: rgba(255, 77, 106, .5); color: var(--bad); }
.btn::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg); transition: left .6s; }
.btn:hover::before { left: 130%; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { color: var(--text); }
button.link.bad { color: var(--bad); }
input, select, textarea { font: inherit; color: var(--text); background: var(--ctrl); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; outline: none;
  transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 212, 255, .15); }
textarea { width: 100%; resize: vertical; line-height: 1.6; }
input[type=file] { padding: 7px; }
.dot { position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); vertical-align: middle; }
.dot.ok { background: var(--ok); }
.dot.ok::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--ok); animation: ping 1.8s ease-out infinite; }
.dot.bad { background: var(--bad); }
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.msg { padding: 11px 15px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; backdrop-filter: blur(8px); }
.msg.bad { background: rgba(255, 77, 106, .12); border: 1px solid rgba(255, 77, 106, .35); color: var(--bad); }
.msg.ok { background: rgba(46, 229, 157, .1); border: 1px solid rgba(46, 229, 157, .35); color: var(--ok); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: var(--panel2); }
.chip.ok, .chip.k-download, .chip.k-register { color: var(--ok); border-color: rgba(46, 229, 157, .35); }
.chip.warn, .chip.k-consent { color: var(--warn); border-color: rgba(255, 197, 66, .35); }
.chip.bad, .chip.k-error { color: var(--bad); border-color: rgba(255, 77, 106, .4); }
.chip.k-admin { color: var(--accent2); border-color: rgba(123, 92, 255, .45); }
.chip.k-report, .chip.k-upload, .chip.k-bundle { color: var(--accent); border-color: rgba(0, 212, 255, .35); }
.chip.on { background: rgba(0, 212, 255, .15); color: var(--text); }

/* 로그인 */
body.login { display: grid; place-items: center; }
.loginbox { position: relative; z-index: 1; width: min(400px, 92vw); display: grid; gap: 12px; padding: 38px 34px; border-radius: 24px; text-align: center;
  background: var(--panel); backdrop-filter: blur(16px); isolation: isolate; }
.loginbox::before, .panel.glow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--a, 0deg), rgba(0, 212, 255, .8), rgba(123, 92, 255, .15), rgba(255, 79, 216, .7), rgba(0, 212, 255, .15), rgba(0, 212, 255, .8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 7s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.loginbox .logo img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 0 50px rgba(0, 212, 255, .5); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.loginbox h1 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.5px; }
.loginbox p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.adchip { justify-self: center; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; padding: 3px 12px; border-radius: 999px; color: var(--text);
  background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; border: 1px solid transparent; background-size: auto, 200% auto;
  animation: shine 6s linear infinite; box-shadow: 0 0 18px rgba(123, 92, 255, .25); }
.loginbox input { width: 100%; padding: 12px 14px; }
.loginbox .btn { justify-content: center; padding: 13px; font-size: 15px; }
.loginbox small { color: var(--muted); font-size: 12px; }

/* 로그인 옆 게이트 무대 — 지나가는 고양이(2026-10-21 사용자 지정) */
.loginwrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 560px) 400px; gap: 40px; align-items: center; padding: 20px; }
.stage { position: relative; height: 560px; perspective: 1100px; }
.stage svg { width: 100%; height: 100%; overflow: visible; transition: transform .4s ease-out; }
.stage .tag { position: absolute; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; backdrop-filter: blur(10px);
  border: 1px solid var(--line); background: var(--panel2); transition: opacity .4s, transform .4s; white-space: nowrap; }
.stage .tag small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.stage .tag.pass { left: 2%; top: 14%; color: var(--ok); }
.stage .tag.alarm { right: 0; top: 28%; color: var(--bad); border-color: rgba(255, 77, 106, .5); box-shadow: 0 0 30px rgba(255, 77, 106, .35); opacity: 0; transform: translateY(8px); }
.stage .tag.alarm.on { opacity: 1; transform: none; }
.stage .tag.ai { right: 0; bottom: 3%; color: var(--accent); }   /* 고양이 얼굴(게이트 안)을 가리지 않게 바닥 아래로 */

/* 임시 기능: 통과 판정 배지(안전 · 인증 통과 · 차단) — 게이트 한가운데에서 튀어나온다 */
.stage .safe { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none;
  display: grid; justify-items: center; gap: 2px; padding: 14px 22px; border-radius: 16px; white-space: nowrap;
  background: rgba(8, 40, 30, .78); border: 1.5px solid var(--ok); backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(46, 229, 157, .55), inset 0 0 24px rgba(46, 229, 157, .18);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, 1.6, .4, 1); }
.stage .safe.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.stage .safe b { font-size: 26px; color: var(--ok); letter-spacing: 1px; text-shadow: 0 0 18px rgba(46, 229, 157, .9); }
.stage .safe span { font-size: 14px; font-weight: 700; color: var(--text); }
.stage .safe small { font-size: 11px; color: var(--muted); }
.stage .safe.cert { background: rgba(40, 32, 8, .8); border-color: var(--warn); box-shadow: 0 0 40px rgba(255, 197, 66, .5), inset 0 0 24px rgba(255, 197, 66, .15); }
.stage .safe.block { background: rgba(48, 8, 16, .82); border-color: var(--bad); box-shadow: 0 0 46px rgba(255, 77, 106, .6), inset 0 0 24px rgba(255, 77, 106, .18); }
.stage .safe.block b { color: var(--bad); text-shadow: 0 0 18px rgba(255, 77, 106, .9); }
/* 인증 방울: 노란 삼각형 경고 → 카드가 뒤집히며 ✔ 허용 */
.stage .safe.warn { background: rgba(44, 34, 6, .84); border-color: var(--warn); box-shadow: 0 0 46px rgba(255, 197, 66, .55), inset 0 0 24px rgba(255, 197, 66, .18); }
.stage .safe.warn b { color: var(--warn); font-size: 34px; text-shadow: 0 0 20px rgba(255, 197, 66, .95); animation: tri .45s ease-in-out infinite alternate; }
@keyframes tri { to { transform: scale(1.15); } }
.stage .safe.flip { transition: transform .16s ease-in; transform: translate(-50%, -50%) scale(1) rotateY(90deg) !important; }

/* 고양이 무늬 — #walker[data-cat] 로 고른다. gray = 처음 회색 실루엣, tuxedo = 검은 몸 · 흰 가슴 · 주둥이 · 발 */
#walker .c-fill { fill: #9FB4C8; }
#walker .c-stroke { stroke: #9FB4C8; }
#walker .c-back { stroke: #7F95AA; }
#walker .c-light { display: none; }
#walker .c-iris { fill: #C9E36A; }
#walker .c-lid { stroke: #2A3440; }
#walker .c-whisker { stroke: #4E5D6C; }
#walker .c-mouth { stroke: #2A3440; }
#walker[data-cat="tuxedo"] { filter: drop-shadow(0 0 1.5px rgba(0, 212, 255, .9)) drop-shadow(0 0 8px rgba(0, 212, 255, .35)); }  /* 검은 몸이 배경에 묻히지 않게 테두리 빛 */
#walker[data-cat="tuxedo"] .c-fill { fill: #14181F; }
#walker[data-cat="tuxedo"] .c-stroke { stroke: #14181F; }
#walker[data-cat="tuxedo"] .c-back { stroke: #0C0F14; }
#walker[data-cat="tuxedo"] .c-light { display: inline; fill: #F4F7FA; }
#walker[data-cat="tuxedo"] .c-iris { fill: #D7F25A; }
#walker[data-cat="tuxedo"] .c-lid { stroke: #E9F1F7; }   /* 검은 얼굴 위 감은 눈 */
#walker[data-cat="tuxedo"] .c-whisker { stroke: #E9F1F7; }
#walker[data-cat="tuxedo"] .c-mouth { stroke: #2A2F38; }   /* 흰 주둥이 위 */

/* 관리 틀 */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px;
  background: linear-gradient(180deg, rgba(6, 11, 18, .85), rgba(6, 11, 18, .6)); border-right: 1px solid var(--line); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 10px 18px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 18px rgba(0, 212, 255, .45); }
.brand b { font-size: 17px; }
.brand small { color: var(--accent); font-size: 12px; border: 1px solid rgba(0, 212, 255, .4); border-radius: 6px; padding: 0 6px; }
.side nav { display: grid; gap: 3px; }
.side nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; transition: background .2s, color .2s; }
.side nav a i { font-style: normal; width: 20px; text-align: center; color: var(--faint); }
.side nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.side nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(0, 212, 255, .16), rgba(123, 92, 255, .06)); box-shadow: inset 0 0 0 1px rgba(0, 212, 255, .25); }
.side nav a.on i { color: var(--accent); }
.side nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.me { margin-top: auto; padding: 12px; font-size: 12px; color: var(--muted); display: grid; gap: 8px; border-top: 1px solid var(--line); }
.main { padding: 30px 36px 60px; max-width: 1180px; }
.ttl { font-size: 32px; letter-spacing: -.8px; margin: 0 0 22px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; padding: 20px 20px 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px); overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(rgba(0, 212, 255, .25), transparent 70%); }
.kpi small { color: var(--muted); font-size: 13px; }
.kpi b { display: block; font-size: 42px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums;
  background: var(--grad); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
.kpi b.sm { font-size: 24px; padding: 9px 0; }
.kpi em { font-style: normal; color: var(--faint); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.panel { position: relative; padding: 20px 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px); margin-bottom: 16px; isolation: isolate; }
.panel h2 { font-size: 16px; margin: 0 0 14px; }
.panel.center.off { opacity: .6; }
.chead { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.chead b { font-size: 16px; }
.crow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid rgba(120, 180, 220, .07); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.frm { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.frm label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); min-width: 140px; }
.frm label.w { flex: 1 1 320px; }
.frm label.ck { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; padding-bottom: 10px; }
.frm.inline { margin: 0; }
.frm.inline input { width: 200px; }
.tokbox { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 16px; border-radius: 18px;
  background: linear-gradient(100deg, rgba(0, 212, 255, .14), rgba(123, 92, 255, .14)); border: 1px solid rgba(0, 212, 255, .45); box-shadow: 0 0 50px rgba(0, 212, 255, .2); }
.tokbox small { width: 100%; color: var(--muted); }
.tokbox b { font-size: 28px; letter-spacing: 3px; text-shadow: 0 0 20px rgba(0, 212, 255, .6); }
.tabs { margin-bottom: 14px; }
.tabs form.r input { width: 240px; }
.kpis.kpi6 { grid-template-columns: repeat(3, 1fr); }
.side nav a .badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; padding: 0 7px; border-radius: 999px; background: var(--warn); color: #1A1300; }
.tbl tr.off td { opacity: .45; }
.tbl td.bad { color: var(--bad); font-weight: 700; }
pre.lic { max-height: 260px; overflow: auto; background: var(--ctrl); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12px; color: var(--muted); margin: 0 0 12px; }

/* 반입 번들(공개) */
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
header.top { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
header.top img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 18px rgba(0, 212, 255, .45); }
header.top b { font-size: 18px; }
.kicker { color: var(--accent); font-size: 13px; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; }
form.drop { position: relative; border-radius: 20px; padding: 34px; display: grid; gap: 16px; background: var(--panel); backdrop-filter: blur(12px);
  border: 2px dashed rgba(0, 212, 255, .3); transition: border-color .3s, box-shadow .3s; }
form.drop.over { border-color: var(--accent); box-shadow: 0 0 60px rgba(0, 212, 255, .25); }

/* 좁은 화면(휴대폰 · 태블릿 세로): 게이트 연출을 로그인 상자 위에 작게. 옆 꼬리표는 겹치니 빼고 판정 배지 · 말풍선만 */
@media (max-width: 1040px) {
  body.login { place-items: start center; }
  .loginwrap { grid-template-columns: 1fr; gap: 6px; justify-items: center; padding: 8px 12px 24px; }
  .stage { width: min(100%, 460px); height: min(62vh, 470px); }
  .loginbox { width: min(400px, 94vw); padding: 26px 22px; }
}
@media (max-width: 640px) {
  .stage .tag { display: none; }
  .stage .safe { padding: 10px 16px; }
  .stage .safe b { font-size: 21px; }
  .stage .safe.warn b { font-size: 26px; }
  .stage .safe span { font-size: 12.5px; }
  .stage .safe small { font-size: 10px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side nav { display: flex; flex-wrap: wrap; }
  .me { margin: 0 0 0 auto; border: 0; }
  .main { padding: 20px 16px 50px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
