/* ============================================================
   물류도우미 (warehouse.insng.co.kr) — 모던 SaaS 디자인
   다크 사이드바 + 라이트 콘텐트, Indigo-Blue primary
   ============================================================ */

:root {
  --bg:           #f8fafc;            /* slate 50 */
  --card:         #ffffff;
  --border:       #e2e8f0;            /* slate 200 */
  --border-soft:  #f1f5f9;            /* slate 100 */
  --text:         #0f172a;            /* slate 900 */
  --text-2:       #334155;            /* slate 700 */
  --muted:        #64748b;            /* slate 500 */
  --muted-soft:   #94a3b8;            /* slate 400 */

  --primary:      #2563eb;            /* blue 600 */
  --primary-d:    #1d4ed8;            /* blue 700 */
  --primary-l:    #3b82f6;            /* blue 500 */
  --primary-glow: rgba(37, 99, 235, .12);

  --accent:       #10b981;            /* emerald 500 */
  --success:      #059669;            /* emerald 600 */
  --warning:      #f59e0b;            /* amber 500 */
  --danger:       #dc2626;            /* red 600 */
  --info:         #0ea5e9;            /* sky 500 */

  --sidebar-bg:        #0f172a;       /* slate 900 */
  --sidebar-bg-dim:    #1e293b;       /* slate 800 */
  --sidebar-text:      #cbd5e1;       /* slate 300 */
  --sidebar-text-dim:  #94a3b8;       /* slate 400 */
  --sidebar-active-bg: #1e40af;       /* blue 800 */

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow:    0 4px 12px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, .14), 0 4px 10px rgba(15, 23, 42, .06);

  --sidebar-w: 260px;
  --topbar-h:  64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); text-decoration: underline; }
.link { color: var(--primary); font-weight: 600; }
small, .muted { color: var(--muted); }
code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .92em;
  padding: 2px 6px;
  background: var(--border-soft);
  border-radius: 4px;
}
[hidden] { display: none !important; }

/* skip link */
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: var(--primary); color: #fff; padding: 6px 10px;
  border-radius: 6px; z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* ============================================================
   Sidebar (다크) + Main shell
   ============================================================ */
.has-sidebar { padding-left: var(--sidebar-w); }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1e293b;
  z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sidebar-bg-dim);
}
.brand-mark {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-l));
  border-radius: 10px;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-brand-text {
  display: flex; flex-direction: column;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
  min-width: 0;
}
.sidebar-brand-text small {
  font-size: 11px; font-weight: 500;
  color: var(--sidebar-text-dim);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav { flex: 1 1 auto; padding: 12px 12px; overflow-y: auto; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 14px;
  transition: background-color .12s, color .12s;
  background: transparent; border: none; cursor: pointer;
  width: 100%; text-align: left;
}
.sidebar-link:hover {
  background: var(--sidebar-bg-dim);
  color: #fff;
  text-decoration: none;
}
.sidebar-link.is-active {
  background: var(--sidebar-active-bg);
  color: #fff;
}
.sidebar-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-icon svg { width: 18px; height: 18px; }
.sidebar-label { flex: 1; }

.sidebar-foot {
  border-top: 1px solid var(--sidebar-bg-dim);
  padding: 12px;
}
.sidebar-user {
  padding: 8px 12px 10px;
  font-size: 13px;
}
.sidebar-user-name { color: #f1f5f9; font-weight: 700; }
.sidebar-user-role { color: var(--sidebar-text-dim); font-size: 11.5px; margin-top: 2px; }
.sidebar-logout { margin-top: 4px; }
.sidebar-link--logout { color: var(--sidebar-text-dim); font-size: 13px; }
.sidebar-link--logout:hover { color: #fca5a5; background: var(--sidebar-bg-dim); }

/* topbar toggle (모바일) */
.topbar-toggle {
  position: fixed; top: 14px; left: 14px;
  width: 38px; height: 38px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer;
  z-index: 110;
}
.topbar-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
}

/* main */
.app-main-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.app-page-title { margin: 0; font-size: 17px; font-weight: 700; }
.app-topbar-spacer { flex: 1; }
.topbar-link {
  font-size: 13px; color: var(--muted); font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
}
.topbar-link:hover { background: var(--border-soft); color: var(--text); text-decoration: none; }

.app-content { padding: 24px; max-width: 1280px; }

/* mobile */
@media (max-width: 900px) {
  .has-sidebar { padding-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .topbar-toggle { display: flex; }
  .app-topbar { padding-left: 64px; }
  .app-content { padding: 16px; }
}

/* ============================================================
   Auth screens (login / signup) — 모던 SaaS, 부드러운 애니메이션
   ============================================================ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  background: var(--bg);
}
.auth-hero {
  background: linear-gradient(135deg, #0b1220 0%, #1e3a8a 50%, var(--primary) 100%);
  background-size: 200% 200%;
  color: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative; overflow: hidden;
  animation: gradientShift 18s ease-in-out infinite;
}
@keyframes gradientShift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

/* 부드럽게 떠다니는 그라데이션 blob */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
  will-change: transform;
}
.hero-blob-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -10%; left: -10%;
  animation: blobFloat1 22s ease-in-out infinite;
}
.hero-blob-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  bottom: -10%; right: -10%;
  animation: blobFloat2 26s ease-in-out infinite;
}
.hero-blob-3 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  top: 60%; left: 30%;
  opacity: .35;
  animation: blobFloat3 30s ease-in-out infinite;
}
@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, 60px) scale(1.1); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, -40px) scale(1.08); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .35; }
  50%      { transform: translate(60px, -50px) scale(1.15); opacity: .5; }
}

.auth-hero-inner { position: relative; max-width: 520px; z-index: 1; }
.auth-hero-inner--center {
  text-align: center;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: #f1f5f9; }
.brand:hover { text-decoration: none; color: #fff; }
.brand--xl { flex-direction: column; gap: 22px; }

.brand-text {
  display: flex; flex-direction: column;
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 12px; font-weight: 500; color: rgba(241,245,249,.7);
  margin-top: 2px;
}
.brand-text--xl {
  font-size: 44px; font-weight: 900; letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-mark--lg {
  width: 76px; height: 76px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(37,99,235,.45), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
.brand-mark--lg::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}

/* reveal — fade + slide-up. base 는 끝점, keyframe 시작점에서 진입 (캡쳐 안전) */
.reveal {
  opacity: 1;
  transform: none;
  animation: revealUp .9s cubic-bezier(.22,.9,.3,1) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* 안내 박스 */
.auth-tip {
  display: flex; align-items: flex-start; gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 18px;
}
.auth-tip svg { flex-shrink: 0; margin-top: 3px; }
.auth-tip a { color: #1e40af; font-weight: 700; text-decoration: underline; }
.auth-tip code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
}
.auth-card {
  width: 100%; max-width: 400px;
}
.auth-title { font-size: 26px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.auth-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 4px;
  margin: 0 0 16px;
  background: var(--card);
}
.auth-fieldset legend {
  font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 0 8px; letter-spacing: .04em; text-transform: uppercase;
}
.auth-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px; color: var(--muted);
}
.req { color: var(--danger); }

.auth-card-inline { max-width: 520px; }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 40px 24px; min-height: 220px; }
  .auth-hero-inner--center { gap: 14px; }
  .brand--xl { gap: 14px; }
  .brand-mark--lg { width: 60px; height: 60px; border-radius: 18px; }
  .brand-mark--lg svg { width: 34px; height: 34px; }
  .brand-text--xl { font-size: 32px; }
  .auth-panel { padding: 28px 20px 40px; }
}

/* fields */
.field, .field-inline {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}
.field > span, .field-inline > span { color: var(--text-2); font-weight: 600; font-size: 13px; }
.field input, .field-inline input,
.field select, .field-inline select,
.select-input {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .12s, box-shadow .12s;
  min-width: 0;
}
.field input:focus, .field-inline input:focus,
.field select:focus, .field-inline select:focus,
.select-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.field input:disabled { background: var(--border-soft); color: var(--muted); cursor: not-allowed; }
.field small.muted { font-size: 11.5px; }

/* date wrap */
.date-field-wrap { position: relative; display: inline-flex; align-items: center; }
.date-field-wrap input[type=date] { padding-right: 40px; width: 100%; }
.date-field-wrap input[type=date]::-webkit-calendar-picker-indicator {
  opacity: 0; position: absolute; right: 0; top: 0; bottom: 0; width: 40px; cursor: pointer;
}
.date-pick-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--primary); cursor: pointer; padding: 0; border-radius: 6px;
  transition: background .12s;
}
.date-pick-btn:hover { background: var(--primary-glow); }
.date-pick-btn svg { width: 18px; height: 18px; }

/* fetch-controls */
.fetch-controls {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.fetch-controls .field-inline { margin-bottom: 0; }

/* ============================================================
   Button
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background-color .12s, transform .06s, box-shadow .12s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(37,99,235,.20);
}
.btn-primary:hover { background: var(--primary-d); color: #fff; }
.btn-secondary {
  background: var(--card); color: var(--text-2); border-color: var(--border);
}
.btn-secondary:hover { background: var(--border-soft); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-block { width: 100%; }

/* row buttons */
.btn-row {
  display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px; font-weight: 600;
  background: var(--card); color: var(--text-2);
  cursor: pointer; font-family: inherit;
  transition: background .12s, color .12s, border-color .12s;
}
.btn-row:hover { background: var(--border-soft); }
.btn-row svg { width: 14px; height: 14px; }
.btn-row--ghost { color: var(--muted); }
.btn-row--sky    { color: var(--info);    border-color: rgba(14,165,233,.35); background: rgba(14,165,233,.08); }
.btn-row--sky:hover { background: rgba(14,165,233,.18); color: #0369a1; }
.btn-row--danger { color: var(--danger);  border-color: rgba(220,38,38,.35); background: rgba(220,38,38,.06); }
.btn-row--danger:hover { background: rgba(220,38,38,.14); color: #991b1b; }

.btn-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  padding: 0 8px; min-width: 28px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); color: var(--text-2); cursor: pointer;
  font-weight: 700; font-size: 14px;
  font-family: inherit;
  transition: background .12s;
}
.btn-mini:hover { background: var(--border-soft); }
.btn-mini:disabled { opacity: .55; cursor: not-allowed; }

.form-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Cards / Panel / KPI
   ============================================================ */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 18px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 4px;
}
.panel h2, .panel h3 { letter-spacing: -0.01em; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .14s, box-shadow .14s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.kpi-value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.kpi-value-sm { font-size: 16px; font-weight: 700; color: var(--text); }

/* alerts */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px;
  background: var(--border-soft);
  color: var(--text-2);
  line-height: 1.5;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-error    { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success  { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.alert-info     { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-warning  { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ============================================================
   Tables
   ============================================================ */
.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table thead th {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--border-soft);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr { transition: background-color .1s; }
.data-table tbody tr:hover { background: var(--border-soft); }
.data-table .t-num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .muted { color: var(--muted); }
.muted-link { color: var(--muted); text-decoration: underline; }
.muted-link:hover { color: var(--primary); }

.empty-state {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  background: var(--bg);
}

/* sheet list 행 색상 */
.sheet-row.is-counted-row > td {
  background: rgba(16,185,129,.06);
}
.sheet-row.is-counted-row:hover > td {
  background: rgba(16,185,129,.12) !important;
}
.sheet-row.is-counted-row > td:first-child {
  box-shadow: inset 4px 0 0 0 var(--success);
}
.sheet-row.is-counted-row .cell-sheetname .sheet-link {
  color: var(--success); font-weight: 700;
}
.sheet-row.is-progress-row > td {
  background: rgba(245,158,11,.06);
}
.sheet-row.is-progress-row:hover > td {
  background: rgba(245,158,11,.13) !important;
}
.sheet-row.is-progress-row > td:first-child {
  box-shadow: inset 4px 0 0 0 var(--warning);
}
.sheet-row.is-progress-row .cell-sheetname .sheet-link {
  color: #b45309; font-weight: 700;
}
.is-hidden-row > td { opacity: .55; }

.sheet-link {
  background: transparent; border: none; padding: 0;
  font: inherit; color: var(--primary); cursor: pointer;
  text-align: left; font-weight: 600;
}
.sheet-link:hover { text-decoration: underline; }
.cell-sheetname { word-break: break-word; max-width: 600px; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 100px;
  background: var(--border-soft); color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip-counted { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.chip-counted svg { width: 11px; height: 11px; }
.chip-counting { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.chip-pending { background: var(--border-soft); color: var(--muted); border-color: var(--border); }
.chip-hidden  { background: #fee2e2; color: #991b1b; border-color: #fecaca; margin-left: 8px; }

.badge-stack {
  display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.chip-soft { opacity: .72; font-weight: 600; }
.chip b { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; opacity: .82; margin-right: 3px; }

/* user table specifics */
.user-table tr.is-me { background: rgba(37,99,235,.05); }
.user-table tr.is-inactive { opacity: .7; }
.user-table .user-name { font-weight: 600; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.role-chip {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent;
}
.role-super_admin { background: #1e40af; color: #fff; }
.role-manager     { background: #5b21b6; color: #fff; }
.role-user        { background: var(--border-soft); color: var(--muted); border-color: var(--border); }
.chip-me { background: #dbeafe; color: #1e40af; border-color: #93c5fd; padding: 2px 8px; font-size: 10px; font-weight: 700; margin-left: 6px; }
.chip-locked { background: #fef2f2; color: #991b1b; border-color: #fca5a5; padding: 2px 8px; font-size: 10px; font-weight: 700; margin-left: 6px; }

/* ============================================================
   Modals
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: modalFade .2s ease-out both;
}
.modal-backdrop[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

#confirmModal { z-index: 350; }
#sheetModal   { z-index: 250; }
#camScanModal { z-index: 360; }

.modal-card {
  width: 100%; max-width: 460px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalPop .25s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes modalPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-glow);
  color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 14px;
}
.modal-card.is-danger .modal-icon { background: rgba(220,38,38,.12); color: var(--danger); }
.modal-card.is-warning .modal-icon { background: rgba(245,158,11,.15); color: #b45309; }
.modal-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: var(--text); letter-spacing: -0.01em; }
.modal-text  { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 18px; white-space: pre-line; }
.modal-actions { display: flex; gap: 8px; justify-content: center; }

/* form modal */
.modal-card--form {
  width: 100%; max-width: 540px;
  max-height: calc(100dvh - 40px);
  padding: 0; overflow: hidden; text-align: left;
  display: flex; flex-direction: column;
}
.modal-form-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.modal-form-head .modal-title { margin: 0; font-size: 18px; }
.modal-card--form form {
  padding: 18px 22px 0;
  overflow-y: auto; flex: 1 1 auto; min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.modal-card--form .form-actions {
  position: sticky; bottom: 0;
  margin: 14px -22px 0;
  padding: 14px 22px;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 1;
}
.modal-close {
  background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; color: var(--muted);
  transition: background .12s;
}
.modal-close:hover { background: var(--border-soft); color: var(--text); }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-row input[type=text],
.form-row input[type=email],
.form-row select {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  background: var(--card); color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.form-row input:focus, .form-row select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-row input:disabled { background: var(--border-soft); color: var(--muted); }
.form-row small.muted { font-size: 11.5px; }

.pw-input-wrap { display: flex; gap: 8px; align-items: stretch; }
.pw-input-wrap input { flex: 1; min-width: 0; }
.pw-input-wrap .btn-mini { width: auto; padding: 0 14px; height: 42px; }

/* perm grid */
.perm-grid {
  display: grid; gap: 14px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; background: var(--bg);
}
.is-locked .perm-grid { opacity: .85; background: var(--border-soft); }
.perm-group-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.perm-group-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 560px) { .perm-group-items { grid-template-columns: 1fr; } }
.perm-item {
  display: flex; gap: 8px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.perm-item:hover { border-color: var(--primary); background: var(--primary-glow); }
.perm-item input[type=checkbox] { margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.perm-item:has(input:checked) { border-color: var(--primary); background: var(--primary-glow); }
.perm-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.perm-label { font-size: 13px; font-weight: 600; color: var(--text); }
.perm-desc  { font-size: 11.5px; color: var(--muted); }
.perm-bulk { display: flex; gap: 8px; margin-top: 10px; }

/* large modal (sheet detail) */
.modal-card--xl {
  width: 100%; max-width: 1100px;
  max-height: calc(100dvh - 40px);
  padding: 0; overflow: hidden; text-align: left;
  display: flex; flex-direction: column;
}
.modal-xl-header {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  background: var(--card);
}
.mxh-titles { flex: 1; min-width: 0; }
.modal-xl-eyebrow {
  font-size: 11px; font-weight: 700; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
}
.modal-xl-title {
  margin: 2px 0 0; font-size: 16px; font-weight: 700; color: var(--text);
  word-break: break-word;
}
.modal-xl-progress {
  flex: 0 0 auto; min-width: 220px; text-align: right;
}
.modal-xl-progress .mxp-text { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.modal-xl-progress .badge-stack { justify-content: flex-end; gap: 6px; }
.modal-xl-progress .mxp-bar {
  height: 6px; background: var(--border); border-radius: 100px; overflow: hidden;
}
.modal-xl-progress .mxp-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-l));
  width: 0%; transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.modal-xl-progress.is-done .mxp-bar-fill { background: linear-gradient(90deg, var(--success), var(--accent)); }

.modal-tts-btn {
  background: transparent; border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 8px; cursor: pointer;
  color: var(--muted); transition: background .12s;
}
.modal-tts-btn .tts-off { display: inline; }
.modal-tts-btn .tts-on  { display: none; }
.modal-tts-btn.is-on .tts-off { display: none; }
.modal-tts-btn.is-on .tts-on  { display: inline; color: var(--primary); }

.modal-xl-scanbar { padding: 14px 22px; background: var(--bg); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.scan-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.scan-input-wrap { position: relative; display: flex; align-items: center; }
.scan-icon {
  position: absolute; left: 14px; width: 18px; height: 18px;
  color: var(--primary); pointer-events: none;
}
#sm-scan {
  width: 100%; height: 48px;
  padding: 0 60px 0 42px;
  background: var(--card); color: var(--text);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 16px; font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 0 0 4px var(--primary-glow);
  transition: box-shadow .12s, border-color .12s;
}
#sm-scan:focus { outline: none; box-shadow: 0 0 0 6px var(--primary-glow); }
.scan-cam-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-l));
  color: #fff; border: none; border-radius: 8px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(37,99,235,.25);
}
.scan-cam-btn:hover { transform: translateY(-50%) scale(1.05); }
.scan-cam-btn:active { transform: translateY(-50%) scale(.96); }

.scan-flash { margin-top: 8px; min-height: 18px; font-size: 12.5px; font-weight: 600; }
.scan-flash.ok  { color: var(--success); }
.scan-flash.err { color: var(--danger); }

.modal-xl-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 22px; }
.modal-xl-loading { padding: 40px 0; text-align: center; color: var(--muted); }
.modal-xl-error { padding: 16px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: var(--radius-sm); }
.count-table tbody tr.is-counted { background: rgba(16,185,129,.04); }
.count-table .num-counted, .count-table .num-expected { font-weight: 700; }

.row-pulse { animation: rowPulse .55s ease; }
@keyframes rowPulse {
  0%   { background: rgba(37,99,235,.18); }
  100% { background: transparent; }
}
.cell-pulse { animation: cellPulse .65s ease; border-radius: 6px; }
@keyframes cellPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.45); background: rgba(16,185,129,.04); }
  50%  { box-shadow: 0 0 0 6px rgba(16,185,129,.00); background: rgba(16,185,129,.18); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,.00); background: transparent; }
}
.row-fade-out { transition: opacity .25s, transform .25s; opacity: 0; transform: translateX(-8px); }

.modal-xl-footer {
  flex-shrink: 0;
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

@media (max-width: 760px) {
  .modal-xl-header { flex-direction: column; align-items: stretch; gap: 8px; }
  .modal-xl-progress { min-width: 0; text-align: left; }
  .modal-xl-progress .badge-stack { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .modal-card--xl, .modal-card--form, .modal-card--cam {
    max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0;
  }
  .modal-backdrop { padding: 0; align-items: stretch; }
  #sm-scan { font-size: 16px; }
}

/* cam scan modal */
.modal-card--cam {
  width: 100%; max-width: 480px;
  max-height: calc(100dvh - 40px);
  padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.cam-stage {
  position: relative; flex: 1 1 auto;
  background: #000; min-height: 360px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cam-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-guide {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(82%, 320px); aspect-ratio: 5/3;
  border: 2px solid rgba(37,99,235,.95);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
  pointer-events: none; overflow: hidden;
}
.cam-laser {
  position: absolute; left: 6%; right: 6%; height: 2px; top: 50%;
  background: linear-gradient(90deg, transparent, #60a5fa 40%, #60a5fa 60%, transparent);
  box-shadow: 0 0 8px #60a5fa;
  animation: camLaser 1.6s ease-in-out infinite;
}
@keyframes camLaser {
  0% { top: 14%; opacity: .4; }
  50% { top: 86%; opacity: 1; }
  100% { top: 14%; opacity: .4; }
}
.cam-hint {
  position: absolute; left: 0; right: 0; bottom: 12px;
  text-align: center; color: #fff; font-size: 13px; font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,.7); padding: 0 16px; pointer-events: none;
}
.cam-actions {
  flex-shrink: 0; display: flex; gap: 8px; padding: 12px 18px;
  background: var(--card); border-top: 1px solid var(--border);
}
.cam-actions .btn { flex: 1; }
#cam-torch.is-on { background: var(--warning); color: #422006; border-color: var(--warning); }

/* ============================================================
   Excel upload screen
   ============================================================ */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
@media (max-width: 760px) { .upload-grid { grid-template-columns: 1fr; } }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.dropzone:hover, .dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-glow);
}
.dropzone-inner svg { color: var(--primary); margin-bottom: 12px; }
.dropzone-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.dropzone-sub { font-size: 12.5px; color: var(--muted); margin: 0; }
.dropzone-file { font-size: 13px; color: var(--primary); font-weight: 600; margin: 12px 0 0; }

.upload-help {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.upload-help h4 { font-size: 13px; font-weight: 700; }
.upload-help-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.upload-help-table th, .upload-help-table td {
  padding: 6px 8px; border-bottom: 1px solid var(--border-soft); text-align: left;
}
.upload-help-table th { color: var(--muted); font-weight: 600; font-size: 11px; }

/* ============================================================
   Auth hero — extended (TallyMate v4)
   - 풍부한 hero (login) + 컴팩트 hero (signup, 모바일 1화면)
   - 회전 메시지, 그라데이션 일러스트, 칩
   ============================================================ */

/* 큰 브랜드 (auth hero 상단) */
.brand--big { gap: 14px; }
.brand-mark--md {
  width: 52px; height: 52px;
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(37,99,235,.4), inset 0 1px 0 rgba(255,255,255,.18);
  position: relative; overflow: hidden;
}
.brand-mark--md::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.2), transparent 55%);
  pointer-events: none;
}
.brand-mark--md svg { width: 28px; height: 28px; }
.brand-text--md {
  font-size: 28px; font-weight: 900; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* hero title / sub */
.hero-title {
  margin: 24px 0 12px;
  font-size: 38px; line-height: 1.18;
  font-weight: 900; letter-spacing: -0.03em;
  color: #f8fafc;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, #fbbf24 0%, #fde68a 50%, #fbbf24 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroEmShine 6s ease-in-out infinite;
}
@keyframes heroEmShine {
  0%, 100% { background-position:   0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-title--sm { font-size: 28px; margin: 14px 0 8px; }

.hero-sub {
  margin: 0 0 18px;
  font-size: 15px; line-height: 1.65;
  color: rgba(241,245,249,.86);
}
.hero-sub strong {
  color: #fde68a;
  font-weight: 800;
}
.hero-sub--sm { font-size: 13.5px; margin: 0 0 12px; }

/* 회전 메시지 */
.hero-rotating {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 4px 0 22px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  padding: 8px 14px;
  border-radius: 100px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13.5px; font-weight: 600;
}
.rotate-prefix {
  color: rgba(255,255,255,.7);
  font-weight: 500;
  flex-shrink: 0;
}
.rotate-stage {
  position: relative;
  height: 1.4em;
  min-width: 200px;
  overflow: hidden;
  display: inline-block;
}
.rotate-item {
  position: absolute; left: 0; top: 0;
  white-space: nowrap;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(60%);
  transition: opacity .45s ease, transform .55s cubic-bezier(.22,.9,.3,1);
}
.rotate-item.is-active {
  opacity: 1;
  transform: translateY(0);
}
.rotate-item.is-leaving {
  opacity: 0;
  transform: translateY(-60%);
}

/* 일러스트 */
.hero-illust {
  position: relative;
  width: 100%; max-width: 480px;
  margin: 8px 0 22px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(15,23,42,.45), 0 4px 14px rgba(15,23,42,.3);
  animation: heroIllustFloat 7s ease-in-out infinite;
}
.hero-illust img {
  display: block; width: 100%; height: auto;
  border-radius: 18px;
}
.hero-illust-glow {
  position: absolute; inset: -10%;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,.35), transparent 60%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}
@keyframes heroIllustFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.hero-illust--sm { max-width: 320px; margin: 4px 0 14px; }

/* 칩 */
.hero-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 6px;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 100px;
  font-size: 12px; font-weight: 700;
  color: #f1f5f9;
  letter-spacing: .01em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hero-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,.18);
  animation: chipDotPulse 2.4s ease-in-out infinite;
}
.dot-emerald { background: #34d399; }
.dot-blue    { background: #60a5fa; animation-delay: .4s; }
.dot-amber   { background: #fbbf24; animation-delay: .8s; }
@keyframes chipDotPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 0 0 0 rgba(255,255,255,.4); }
  50%      { box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 0 0 6px rgba(255,255,255,0); }
}

/* 컴팩트 hero (signup) — 모바일 1화면 fit */
.auth-hero--compact {
  padding: 36px 40px;
}
.auth-hero--compact .auth-hero-inner { max-width: 460px; }

/* 미니멀 hero (login) — 브랜드명 + 한 줄 카피만 */
.auth-hero--minimal { display: flex; align-items: center; justify-content: center; }
.auth-hero--minimal .auth-hero-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  width: 100%;
  max-width: 540px;
}
.auth-hero--minimal .brand-text--xl { font-size: 56px; }
.auth-hero--minimal .hero-title { margin: 0; font-size: 30px; line-height: 1.35; }
@media (max-width: 880px) {
  .auth-hero--minimal { padding: 44px 24px 32px; }
  .auth-hero--minimal .brand-text--xl { font-size: 40px; }
  .auth-hero--minimal .hero-title { font-size: 22px; }
}

/* hero 푸터 — 영구 무료 어필 (절제된 한 줄) */
.hero-foot {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: rgba(241,245,249,.78);
  letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-foot::before {
  content: '';
  width: 18px; height: 1px;
  background: rgba(255,255,255,.35);
}
.hero-foot::after {
  content: '';
  width: 18px; height: 1px;
  background: rgba(255,255,255,.35);
}
.hero-foot-em {
  position: relative;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: .02em;
}
.hero-foot-em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px; height: 2px;
  background: linear-gradient(90deg, transparent, #fde68a 30%, #fde68a 70%, transparent);
  opacity: .55;
  animation: heroFootUnderline 3.4s ease-in-out infinite;
}
@keyframes heroFootUnderline {
  0%, 100% { opacity: .35; transform: scaleX(.85); }
  50%      { opacity: .85; transform: scaleX(1); }
}
@media (max-width: 880px) {
  .hero-foot { font-size: 12px; gap: 6px; }
  .hero-foot::before, .hero-foot::after { width: 12px; }
}

/* hero title 회전 (여러 카피 fade) */
.hero-title-rotator {
  position: relative;
  width: 100%;
  min-height: 2.7em;            /* 2 lines 높이 확보 */
  margin: 0;
  display: block;
}
.title-line {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: block;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .65s cubic-bezier(.22,.9,.3,1);
  pointer-events: none;
}
.title-line.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.title-line.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
}
@media (prefers-reduced-motion: reduce) {
  .title-line { transition: none; }
}

/* ============================================================
   Wizard (signup 2-step)
   ============================================================ */
.auth-card--wizard { max-width: 440px; }

.wizard-steps {
  display: flex; align-items: center;
  list-style: none; padding: 0; margin: 6px 0 18px;
  gap: 10px;
  font-size: 12px;
}
.wizard-steps .step {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  color: var(--muted);
  font-weight: 600;
  position: relative;
}
.wizard-steps .step + .step::before {
  content: ''; position: absolute;
  left: -10px; right: calc(100% + -10px + 26px);
  height: 1px; background: var(--border);
  top: 50%;
}
.step-num {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--border-soft);
  color: var(--muted);
  font-size: 11px; font-weight: 800;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background .18s, color .18s, border-color .18s;
}
.step-label { font-size: 12px; }
.wizard-steps .step.is-active .step-num {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.wizard-steps .step.is-active { color: var(--text); }
.wizard-steps .step.is-done .step-num {
  background: var(--success); color: #fff; border-color: var(--success);
}

.wizard-pane { display: none; animation: paneIn .35s cubic-bezier(.22,.9,.3,1) both; }
.wizard-pane.is-active { display: block; }
@keyframes paneIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.wizard-actions {
  display: flex; gap: 8px;
  margin-top: 4px;
}
.wizard-actions .btn { flex: 1; }
.wizard-actions .btn-secondary { flex: 0 0 auto; }

/* 2-column field layout (모바일 1화면 fit) */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field-row .field { margin-bottom: 14px; }
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

.muted-inline { color: var(--muted); font-weight: 500; font-size: 11.5px; }

/* ============================================================
   모바일 — auth shell, hero compact, signup 1화면 fit
   ============================================================ */
@media (max-width: 880px) {
  .auth-hero { padding: 32px 24px 28px; min-height: 0; }
  .auth-hero--compact { padding: 22px 24px 18px; }

  .hero-title { font-size: 26px; margin: 16px 0 8px; }
  .hero-title--sm { font-size: 20px; margin: 8px 0 6px; }
  .hero-sub { font-size: 13.5px; margin: 0 0 12px; }
  .hero-sub--sm { font-size: 12.5px; margin: 0 0 8px; }
  .hero-rotating { font-size: 12.5px; padding: 6px 12px; margin-bottom: 12px; }
  .rotate-stage { min-width: 160px; }
  .hero-illust { max-width: 320px; margin: 4px 0 12px; }
  .hero-illust--sm { max-width: 220px; margin: 4px 0 8px; }
  .hero-chip { font-size: 11px; padding: 4px 10px; }
  .brand-mark--md { width: 44px; height: 44px; border-radius: 12px; }
  .brand-mark--md svg { width: 24px; height: 24px; }
  .brand-text--md { font-size: 22px; }
}

/* signup 1화면 fit — 더 좁은 디바이스 */
@media (max-width: 880px) {
  .auth-hero--compact .hero-illust--sm { display: none; }
  .auth-hero--compact .hero-chips { display: none; }
  .auth-card--wizard .wizard-steps { margin: 4px 0 12px; }
  .auth-card--wizard .field { margin-bottom: 10px; }
  .auth-card--wizard .field input { height: 40px; }
  .auth-card--wizard .auth-title { font-size: 22px; margin: 0 0 2px; }
  .auth-panel { padding: 16px 16px 20px; }
}

/* misc */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
