﻿/* ============================================================
   Aive Ops — master.css
   tokens.css + components.css 다음으로 로드.
   운영자용 고밀도 UI (테이블·필터·모달·감사로그 등)
   ============================================================ */

/* ---------- Global Scrollbar (admin-wide) ----------
   모든 스크롤 가능 영역에 공통 적용. 다크 테마에 맞춰 얇고 은은하게.
   사이드바(.sidebar)는 더 구체적 규칙으로 "영역 hover 시만 노출"로 별도 처리.
*/
html { scrollbar-width: thin; scrollbar-color: var(--bg-card-2) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--bg-card-2);
  border-radius: 3px;
  transition: background 0.2s;
}
*::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }
*::-webkit-scrollbar-corner { background: transparent; }

/* ---------- Master Login ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top left, rgba(212,255,58,0.05) 0%, transparent 48%),
    radial-gradient(ellipse at bottom right, rgba(77,163,255,0.05) 0%, transparent 48%),
    var(--bg);
}
.auth-wrap {
  width: 100%;
  max-width: 460px;
}
.auth-net {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(110,231,160,0.06);
  border: 1px solid rgba(110,231,160,0.25);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 20px;
}
.auth-net .dot-ok {
  width: 8px;
  height: 8px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(110,231,160,0.6);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.auth-brand {
  text-align: center;
  margin-bottom: 22px;
}
.auth-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.auth-logo .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(212,255,58,0.6);
}
.auth-logo .ops {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  text-transform: uppercase;
  font-weight: 500;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-left: 6px;
}
.auth-tagline {
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 6px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.auth-step {
  display: none;
}
.auth-step.active {
  display: block;
}
.auth-head {
  margin-bottom: 22px;
}
.auth-head h1 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}
.auth-head .sub {
  color: var(--text-sub);
  font-size: 12.5px;
}
.auth-policy {
  background: var(--bg-card-2);
  border-radius: 10px;
  padding: 14px;
  margin-top: 20px;
}
.auth-policy-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.auth-policy ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.7;
}
.auth-policy li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.auth-policy li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-mute);
  margin-top: 8px;
  flex-shrink: 0;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  font-size: 12.5px;
  padding: 0;
  margin-bottom: 16px;
}
.auth-back:hover {
  color: var(--accent);
}
.auth-method {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-card-2);
  color: var(--text);
  text-align: left;
  margin-bottom: 10px;
}
.auth-method:hover {
  border-color: var(--text-sub);
}
.auth-method .icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.auth-method strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}
.auth-method small {
  display: block;
  margin-top: 2px;
  color: var(--text-mute);
  font-size: 11.5px;
}
.auth-key {
  text-align: center;
  padding: 22px 8px 16px;
}
.auth-key-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: keyPulse 2s ease-in-out infinite;
}
@keyframes keyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,255,58,0.3); }
  50% { box-shadow: 0 0 0 12px rgba(212,255,58,0); }
}
.master-otp-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0 8px;
}
.master-otp-cell {
  width: 44px;
  height: 52px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  outline: none;
}
.master-otp-cell:focus,
.master-otp-cell.filled {
  border-color: var(--accent);
  background: rgba(212,255,58,0.04);
}
.auth-last {
  padding: 12px 14px;
  background: var(--bg-card-2);
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}
.auth-last .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}
.auth-last .k {
  color: var(--text-mute);
}
.auth-last .v {
  color: var(--text-sub);
  font-family: var(--font-mono);
  text-align: right;
}
.auth-foot {
  text-align: center;
  margin-top: 20px;
  color: var(--text-mute);
  font-size: 11px;
  font-family: var(--font-mono);
  line-height: 1.8;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(480px, 1fr);
  background:
    radial-gradient(circle at 12% 18%, rgba(212,255,58,0.12), transparent 28%),
    linear-gradient(135deg, #0a0a0b 0%, #111114 52%, #0a0a0b 100%);
}
.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: auto -18% -24% 12%;
  height: 42%;
  border: 1px solid rgba(212,255,58,0.18);
  transform: rotate(-8deg);
  pointer-events: none;
}
.login-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  text-decoration: none;
  color: var(--text);
  z-index: 1;
}
.login-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #0a0a0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
}
.login-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}
.login-brand small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
}
.login-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
}
.login-copy h1 {
  margin: 16px 0 22px;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}
.login-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.75;
}
.login-checks {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.login-checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 14px;
}
.login-checks li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(212,255,58,0.7);
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
}
.login-form {
  width: 100%;
  max-width: 420px;
}
.login-heading {
  margin-bottom: 34px;
}
.login-heading h2 {
  margin: 12px 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
}
.login-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--text-sub);
  font-size: 14px;
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 20px;
}
.login-notice {
  display: none;
  min-height: 22px;
  margin: 0 0 16px;
  color: var(--warn);
  font-size: 13px;
}
.login-notice.is-visible {
  display: block;
}
.login-submit {
  width: 100%;
  justify-content: center;
  min-height: 46px;
}

/* 잠금 안내 텍스트 (5회 실패 등) */
.login-lock-notice { font-size: var(--text-xs); }

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-visual {
    min-height: auto;
    padding: 32px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .login-copy {
    margin-top: 48px;
  }
  .login-copy h1 {
    font-size: 36px;
  }
  .login-panel {
    padding: 40px 24px;
  }
}

/* ---------- Admin Layout ---------- */
.ops-layout,
.adm-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar (LNB) ---------- */
.sidebar,
.adm-sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--line-soft);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  /* 스크롤바: 평소 투명, hover 시만 표시 */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.sidebar:hover,
.adm-sidebar:hover {
  scrollbar-color: var(--line) transparent;
}
.sidebar::-webkit-scrollbar,
.adm-sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track,
.adm-sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb,
.adm-sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
  transition: background 0.2s;
}
.sidebar:hover::-webkit-scrollbar-thumb,
.adm-sidebar:hover::-webkit-scrollbar-thumb { background: var(--line); }
.sidebar::-webkit-scrollbar-thumb:hover,
.adm-sidebar::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }
.ops-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
  text-decoration: none;
  color: var(--text);
}
.ops-logo-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #0a0a0b;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.02em;
}
.ops-logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.ops-logo-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  margin-left: auto;
  text-transform: uppercase;
}
.env-badge {
  margin: 0 6px 14px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(255,107,61,0.1);
  color: var(--warn);
  border: 1px solid rgba(255,107,61,0.3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.env-badge.prod {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(212,255,58,0.3);
}
.env-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

.nav-group,
.adm-sb-group { margin-bottom: 10px; }
.nav-group-title,
.adm-sb-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 6px 12px 4px;
}
.nav-list,
.adm-sb-nav { list-style: none; padding: 0; margin: 0; }
.nav-item,
.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.15s;
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover,
.adm-nav-item:hover {
  background: var(--bg-card);
  color: var(--text);
}
.nav-item.active,
.adm-nav-item.active {
  background: var(--bg-card);
  color: var(--accent);
}
.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-item .badge-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--bg-card-2);
  color: var(--text-sub);
}
.nav-item.active .badge-count {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-item .badge-count.warn {
  background: rgba(255,107,61,0.15);
  color: var(--warn);
}
.nav-item .badge-count.new {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------- Main Area ---------- */
.ops-main {
  min-width: 0;
  background: var(--bg);
}

/* ---------- Top Bar (GNB) ---------- */
.topbar,
.adm-header {
  height: 60px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(10,10,11,0.85);
}
.topbar-search {
  position: relative;
  width: 360px;
}
.topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
}
.topbar-search input::placeholder { color: var(--text-mute); }
.topbar-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.topbar-search .icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
}
.topbar-search .kbd {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-mute);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.topbar-btn:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--line);
}
.topbar-btn .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warn);
  border: 2px solid var(--bg);
}

/* ---------- Page Content ---------- */
.page-content {
  padding: 24px 28px 60px;
  max-width: 1600px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.breadcrumb a {
  color: var(--text-mute);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--text-sub); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--accent); }

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-sub {
  color: var(--text-sub);
  font-size: 13.5px;
  margin: 6px 0 0;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Admin KPI Cards ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s;
}
.kpi-card:hover { border-color: var(--text-mute); }
.kpi-card .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kpi-card .value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.1;
}
.kpi-card .value .unit {
  font-size: 12px;
  color: var(--text-sub);
  margin-left: 6px;
  font-family: var(--font-mono);
}
.kpi-card .delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}
.kpi-card .delta.up { color: var(--ok); }
.kpi-card .delta.down { color: var(--warn); }
.kpi-card.alert { border-color: rgba(255,107,61,0.4); }
.kpi-card.success { border-color: rgba(110,231,160,0.3); }

/* 목업 Admin.Dashboard KPI 클래스명과 동일하게 노출한다. */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.admin-kpi {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s;
}
.admin-kpi:hover { border-color: var(--text-mute); }
.admin-kpi .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-kpi .value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.1;
}
.admin-kpi .value .unit {
  font-size: 12px;
  color: var(--text-sub);
  margin-left: 6px;
  font-family: var(--font-mono);
}
.admin-kpi .delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
}
.admin-kpi .delta.up { color: var(--ok); }
.admin-kpi .delta.down { color: var(--warn); }
.admin-kpi.alert { border-color: rgba(255,107,61,0.4); }
.admin-kpi.success { border-color: rgba(110,231,160,0.3); }

/* ---------- Section Card ---------- */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.section-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  gap: 16px;
  flex-wrap: wrap;
}
.section-card-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-card-head .sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 2px;
}
.section-card-body {
  padding: 18px 20px;
}
.section-card-body.no-pad { padding: 0; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.filter-chip-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-chip-mini:hover {
  border-color: var(--text-sub);
  color: var(--text);
}
.filter-chip-mini.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.filter-chip-mini .count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.filter-chip-mini.active .count {
  color: var(--accent);
  background: rgba(212,255,58,0.12);
}
.filter-divider-v {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
}
.filter-select, .filter-date {
  padding: 6px 28px 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-card-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12.5px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c6c74' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.filter-search-mini {
  position: relative;
  margin-left: auto;
  min-width: 220px;
}
.filter-search-mini input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 12.5px;
}
.filter-search-mini input::placeholder { color: var(--text-mute); }
.filter-search-mini .icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
}

/* ---------- Admin Table ---------- */
.data-table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card-2);
  white-space: nowrap;
}
.data-table thead th.sortable { cursor: pointer; user-select: none; }
.data-table thead th.sortable:hover { color: var(--text-sub); }
.data-table thead th .sort-icon {
  margin-left: 4px;
  opacity: 0.5;
  font-size: 9px;
}
.data-table thead th.sorted .sort-icon {
  opacity: 1;
  color: var(--accent);
}
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.015); }
.data-table tbody tr.selected { background: rgba(212,255,58,0.04); }
.data-table .col-check { width: 40px; }
.data-table .col-actions { width: 56px; text-align: right; white-space: nowrap; }
.data-table .col-numeric { text-align: right; font-family: var(--font-mono); font-size: 12.5px; }
.data-table .col-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-sub); }
.data-table .muted { color: var(--text-sub); font-size: 12px; }
.data-table .primary-cell { font-weight: 500; }
.data-table .primary-cell .id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  display: block;
  margin-top: 2px;
}

/* ---------- Cell: Seller ---------- */
.cell-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.cell-seller .avatar {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}
.cell-seller .avatar.premium {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.cell-seller .meta { line-height: 1.25; min-width: 0; }
.cell-seller .name {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.cell-seller .sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  margin-top: 1px;
}

/* ---------- Status Pills (Admin) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.pill-ok { background: var(--accent-soft); color: var(--accent); }
.pill-live { background: rgba(110,231,160,0.12); color: var(--ok); }
.pill-run { background: rgba(77,163,255,0.12); color: #7ab8ff; }
.pill-warn { background: rgba(255,107,61,0.12); color: var(--warn); }
.pill-err { background: rgba(255,85,85,0.14); color: #ff7a7a; }
.pill-mute { background: rgba(160,160,168,0.1); color: var(--text-sub); }
.pill-hold { background: rgba(198,143,255,0.12); color: #c68fff; }

.pill-plan {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  font-weight: 500;
}
.plan-free { background: rgba(160,160,168,0.1); color: var(--text-sub); }
.plan-starter { background: rgba(77,163,255,0.12); color: #7ab8ff; }
.plan-growth { background: var(--accent-soft); color: var(--accent); }
.plan-pro { background: var(--accent-soft); color: var(--accent); }
.plan-enterprise { background: rgba(198,143,255,0.14); color: #c68fff; }
.plan-trial { background: rgba(255,107,61,0.12); color: var(--warn); }
/* v1.5 신규 Plan 상태 */
.plan-past_due, .plan-past-due { background: rgba(255,107,61,0.16); color: #ff8e69; border: 1px dashed var(--warn); }
.plan-suspended { background: rgba(255,85,85,0.16); color: #ff7a7a; }
.plan-canceled { background: rgba(100,100,112,0.2); color: var(--text-mute); text-decoration: line-through; }

/* NEW 배지 */
.pill-new {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  font-family: var(--font-mono);
}

/* 채널 배지 (ADM-018) */
.pill-channel { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.pill-cafe24 { background: rgba(255,209,102,0.14); color: #ffd166; }
.pill-smartstore { background: rgba(6,214,160,0.14); color: #06d6a0; }

/* System 행위자 배지 */
.pill-system { background: rgba(100,100,112,0.2); color: var(--text-mute); font-family: var(--font-mono); font-size: 10px; }

/* Role 배지 (권한 매트릭스용) */
.pill-role-super { background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 6px; }

/* ADM-018 행 에러 강조 */
.row-error { background: rgba(255,85,85,0.04); }

/* ADM-018 행별 액션 팝오버 */
.row-action-popover {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  min-width: 160px;
  z-index: 100;
}
.row-action-popover button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
}
.row-action-popover button:hover { background: var(--bg-card-2); }
.row-action-popover button.danger { color: var(--warn); }
.row-action-popover button.danger:hover { background: rgba(255,107,61,0.1); }

/* 스위치 토글 (llms.txt 설정용) */
.switch-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
}
.switch-toggle input { accent-color: var(--accent); }

/* mono-link (URL 링크) */
.mono-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-sub);
  text-decoration: none;
}
.mono-link:hover { color: var(--accent); }

/* 버튼 sm */
.btn-sm { padding: 4px 10px !important; font-size: 11px !important; }

/* ---------- RBAC Role Badge ---------- */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
}
.role-super { background: rgba(255,85,85,0.14); color: #ff7a7a; }
.role-ops { background: var(--accent-soft); color: var(--accent); }
.role-readonly { background: rgba(160,160,168,0.1); color: var(--text-sub); }

/* ---------- Row Action Menu ---------- */
.row-action {
  background: transparent;
  border: 1px solid transparent;
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--text-mute);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.row-action:hover {
  background: var(--bg-card-2);
  color: var(--text);
  border-color: var(--line);
}

/* ---------- Checkbox (table) ---------- */
.check {
  appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-card-2);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
}
.check:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check:checked::after {
  content: "✓";
  color: #0a0a0b;
  font-weight: 700;
  font-size: 11px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.check.indeterminate {
  background: var(--accent);
  border-color: var(--accent);
}
.check.indeterminate::after {
  content: "";
  position: absolute;
  top: 50%; left: 25%; right: 25%;
  height: 2px;
  background: #0a0a0b;
  transform: translateY(-50%);
  border-radius: 1px;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-sub);
  flex-wrap: wrap;
  gap: 12px;
}
.pagination a,
.pagination strong {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}
.pagination a:hover {
  border-color: var(--text-sub);
  color: var(--text);
}
.pagination strong.current {
  background: var(--accent);
  color: #0a0a0b;
  border-color: var(--accent);
  font-weight: 500;
}
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--ink-400); }
.pager button { font-size: 12px; padding: 5px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm); cursor: pointer; color: var(--ink-700); }
.pager button.active { background: var(--ink-900); color: var(--accent); border-color: var(--ink-900); }
.pager button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination-info { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-mute); }
.pagination-ctrls { display: flex; align-items: center; gap: 4px; }
.pagination-ctrls button {
  min-width: 30px; height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.pagination-ctrls button:hover:not(:disabled) {
  border-color: var(--text-sub);
  color: var(--text);
}
.pagination-ctrls button.active {
  background: var(--accent);
  color: #0a0a0b;
  border-color: var(--accent);
}
.pagination-ctrls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-size-select {
  padding: 5px 26px 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 11.5px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236c6c74' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}

/* ---------- Bulk Action Bar (sticky) ---------- */
.bulk-bar {
  position: sticky;
  bottom: 20px;
  margin: 20px auto 0;
  max-width: 640px;
  background: var(--bg-card-2);
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 60px -15px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,255,58,0.1);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.bulk-bar .count {
  font-size: 13px;
  color: var(--text);
}
.bulk-bar .count strong {
  color: var(--accent);
  font-family: var(--font-mono);
  margin-right: 4px;
}
.bulk-bar .spacer { flex: 1; }
.bulk-bar button {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
}
.bulk-bar button:hover {
  color: var(--text);
  border-color: var(--text-sub);
}
.bulk-bar button.primary {
  background: var(--accent);
  color: #0a0a0b;
  border-color: var(--accent);
  font-weight: 500;
}
.bulk-bar button.danger {
  color: var(--warn);
  border-color: rgba(255,107,61,0.3);
}
.bulk-bar button.danger:hover {
  background: rgba(255,107,61,0.08);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.15s ease;
}
.modal.wide { max-width: 720px; }
@keyframes modalIn {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-mute);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover {
  background: var(--bg-card-2);
  color: var(--text);
}
.modal-body { padding: 20px 22px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-elev);
}
.modal-destructive .modal-head {
  background: rgba(255,107,61,0.05);
}
.modal-destructive h4 { color: var(--warn); }

.confirm-input {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}
.confirm-input:focus {
  outline: none;
  border-color: var(--warn);
}
.confirm-hint {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 8px;
}
.confirm-hint code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 11.5px;
  border: 1px solid var(--line);
}

/* ---------- Tabs ---------- */
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-item {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-sub);
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab-item:hover { color: var(--text); }
.tab-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-item .count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 6px;
  background: var(--bg-card);
  border-radius: 10px;
  color: var(--text-mute);
}
.tab-item.active .count { background: var(--accent-soft); color: var(--accent); }

/* ---------- Info Rows (detail) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px 24px;
}
.info-row .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.info-row .v {
  font-size: 14px;
  color: var(--text);
}
.info-row .v.mono { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------- Timeline (audit log) ---------- */
.timeline {
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px; bottom: 4px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding: 0 0 18px 14px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -19px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
}
.timeline-item.create::before { border-color: var(--accent); }
.timeline-item.update::before { border-color: #7ab8ff; }
.timeline-item.delete::before { border-color: var(--warn); }
.timeline-item .time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.timeline-item .what {
  font-size: 13px;
  margin-top: 3px;
}
.timeline-item .actor {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 12px;
}

/* ---------- Empty State ---------- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-mute);
}
.empty .icon { font-size: 32px; margin-bottom: 12px; opacity: 0.5; }
.empty h4 { color: var(--text-sub); font-size: 15px; margin: 0 0 6px; font-weight: 500; }
.empty p { font-size: 12.5px; margin: 0; }

/* ---------- Progress Bar ---------- */
.prog {
  width: 100%;
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.prog .bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
  border-radius: 3px;
}
.prog .bar.warn { background: var(--warn); }
.prog .bar.ok { background: var(--ok); }
.prog.striped .bar {
  background-image: linear-gradient(45deg, rgba(0,0,0,0.15) 25%, transparent 25%, transparent 50%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.15) 75%, transparent 75%);
  background-size: 14px 14px;
  animation: stripes 0.8s linear infinite;
}
@keyframes stripes {
  from { background-position: 0 0; }
  to { background-position: 14px 0; }
}

/* ---------- Mini Chart (SVG) ---------- */
.mini-chart { width: 100%; height: 60px; }

/* ---------- Diff Viewer (ADM-017) ---------- */
.diff-col {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.6;
}
.diff-col .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.diff-col.ai { border-color: rgba(77,163,255,0.3); }
.diff-col.ai .label { color: #7ab8ff; }
.diff-col.final { border-color: rgba(212,255,58,0.3); }
.diff-col.final .label { color: var(--accent); }
.diff-add { background: rgba(110,231,160,0.12); color: var(--ok); padding: 0 2px; border-radius: 2px; }
.diff-del { background: rgba(255,107,61,0.12); color: var(--warn); padding: 0 2px; border-radius: 2px; text-decoration: line-through; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.toast {
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 280px;
  max-width: 380px;
  font-size: 13px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
  animation: toastIn 0.2s ease;
}
.toast.warn { border-left-color: var(--warn); }
.toast.err { border-left-color: #ff5555; }
.toast .t-title { font-weight: 500; margin-bottom: 2px; }
.toast .t-desc { color: var(--text-sub); font-size: 12px; }
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- Two-column layout ---------- */
.split-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 1100px) {
  .split-2 { grid-template-columns: 1fr; }
}

/* ---------- Code Block ---------- */
.code-block {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

/* ---------- Small Utils ---------- */
.h-stack { display: flex; align-items: center; gap: 10px; }
.v-stack { display: flex; flex-direction: column; gap: 10px; }
.h-between { display: flex; align-items: center; justify-content: space-between; }
.grow { flex: 1; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-sub { color: var(--text-sub); }
.text-mute { color: var(--text-mute); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-mono { font-family: var(--font-mono); }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }

/* ---------- Admin buttons (compact) ---------- */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-sans);
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-admin-primary { background: var(--accent); color: #0a0a0b; }
.btn-admin-primary:hover { box-shadow: 0 6px 20px -6px var(--accent); }
.btn-admin-ghost { background: transparent; color: var(--text-sub); border-color: var(--line); }
.btn-admin-ghost:hover { color: var(--text); border-color: var(--text-sub); }
.btn-admin-danger { background: transparent; color: var(--warn); border-color: rgba(255,107,61,0.3); }
.btn-admin-danger:hover { background: rgba(255,107,61,0.08); border-color: var(--warn); }
.btn-admin-sm { padding: 5px 10px; font-size: 12px; }

/* Popup / iframe */
.pop-wrap { padding: 16px 20px 5px; }
.pop-head { margin-bottom: 18px; }

.pop-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 20px;
	border-top: 1px solid var(--line, #eeeeee);
}
.pop-footer-compact {
	padding: 10px 20px;
}
.pop-footer-loose {
	margin-top: 12px;
	padding: 12px 20px;
}
.proc-frame-hidden {
	display: none;
}
.pop-note {
	font-size: 11px;
	color: var(--text-muted, #aaaaaa);
	margin-top: 3px;
}
.pop-section-gap {
	margin-bottom: 8px;
}
.pop-section-title {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
}
.pop-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.pop-check-inline {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 13px;
}
.pop-table-sm {
	font-size: 12px;
}
.pop-th-menu,
.pop-td-menu {
	padding-left: 14px;
}
.pop-th-menu {
	text-align: left;
}
.pop-td-menu {
	font-weight: 600;
}
.pop-form-inline {
	display: flex;
	gap: 6px;
	align-items: center;
}
.pop-phone-row {
	display: flex;
	gap: 4px;
	align-items: center;
}
.pop-phone-first {
	width: 70px;
}
.pop-phone-part {
	width: 80px;
}
.pop-nowrap {
	white-space: nowrap;
}
.pop-hidden {
	display: none;
}
.pop-status-ok {
	color: var(--color-ok, #22c55e);
	font-size: 12px;
}
.pop-status-warn {
	color: var(--color-warn, #f59e0b);
}
.pop-check-text {
	font-size: 13px;
}
.pop-totp-status {
	font-size: 13px;
	margin-bottom: 8px;
}
.pop-totp-status-ok {
	color: var(--color-ok, #22c55e);
}
.pop-totp-status-muted {
	color: var(--text-mute);
}
.pop-totp-row {
	flex: 1;
}
.pop-totp-code {
	width: 130px;
}
.pop-totp-qr-area {
	display: none;
	margin-top: 10px;
}
.pop-totp-qr {
	width: 140px;
	height: 140px;
	margin-bottom: 6px;
}
.pop-help-xs {
	font-size: 11px;
	color: var(--text-mute);
}

/* ---------- Security Assist JSP refresh ---------- */
.security-assist-page {
  display: block;
}
.security-assist-page .section {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.security-assist-page .title_section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.security-assist-page .title_section span {
  color: var(--accent);
  font-family: var(--font-mono);
}
.security-assist-page .title_section .rightarea {
  margin-left: auto;
}
.security-assist-page .tbl_cols,
.security-assist-page .tbl_rows {
  padding: 0;
}
.security-assist-page .tbl_cols table,
.security-assist-page .tbl_rows table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.security-assist-page .tbl_cols caption,
.security-assist-page .tbl_rows caption,
.security-assist-page .data-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.security-assist-page .tbl_cols th,
.security-assist-page .tbl_cols td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.security-assist-page .tbl_cols th {
  width: 170px;
  background: var(--bg-card-2);
  color: var(--text-sub);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.security-assist-page .tbl_cols tr:last-child th,
.security-assist-page .tbl_cols tr:last-child td {
  border-bottom: none;
}
.security-assist-page .tbl_rows {
  overflow-x: auto;
}
.security-assist-page .tbl_rows thead th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card-2);
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.security-assist-page .tbl_rows tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}
.security-assist-page .tbl_rows tbody tr:hover {
  background: rgba(255,255,255,0.015);
}
.security-assist-page .tbl_rows tbody tr:last-child td {
  border-bottom: none;
}
.security-assist-page input[type="text"],
.security-assist-page input[type="password"],
.security-assist-page textarea,
.security-assist-page select {
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
}
.security-assist-page input[type="text"],
.security-assist-page input[type="password"],
.security-assist-page select {
  min-height: 34px;
  padding: 6px 10px;
}
.security-assist-page textarea {
  width: 100%;
  padding: 9px 10px;
  resize: vertical;
}
.security-assist-page .info,
.security-assist-page .remark {
  color: var(--text-mute);
  font-size: 12px;
}
.security-assist-page .arrange {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.security-assist-page .button,
.security-assist-page .button.large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-size: 12.5px;
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.security-assist-page .button:hover {
  color: var(--text);
  border-color: var(--text-sub);
}
.security-assist-page .button.blue,
.security-assist-page .button.black {
  background: var(--accent);
  color: #0a0a0b;
  border-color: transparent;
}
.security-assist-page .button.gray,
.security-assist-page .button.borderb,
.security-assist-page .button.borderbk {
  background: transparent;
  color: var(--text-sub);
  border-color: var(--line);
}
.security-assist-page .button_box,
.security-assist-page .ops-page-actions,
.security-assist-page .ops-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
}
.security-assist-page .button_box.search,
.security-assist-page .ops-card-actions {
  padding: 0 20px 18px;
  margin-top: 0;
}
.security-assist-page .paging {
  margin-top: 18px;
}
.security-assist-page .data_none {
  padding: 48px 20px !important;
  color: var(--text-mute);
  text-align: center;
}
.security-assist-page .color_g66 {
  color: var(--text-mute);
}
.security-assist-page .status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--text-sub);
  font-size: 11.5px;
}
.security-assist-page .status-badge.ok {
  color: var(--ok);
  border-color: rgba(110,231,160,0.3);
  background: rgba(110,231,160,0.08);
}
.security-assist-page .status-badge.muted {
  color: var(--text-mute);
  background: rgba(255,255,255,0.03);
}
.security-assist-page .totp-qr-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 204px;
  min-height: 204px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.security-assist-page .totp-qr-box img,
.security-assist-page .totp-qr-box canvas {
  display: block;
  width: 180px;
  height: 180px;
}
.auth-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 204px;
  min-height: 204px;
  margin: 0 auto 16px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.auth-qr img,
.auth-qr canvas {
  display: block;
  width: 180px;
  height: 180px;
}
.security-assist-page .ops-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.security-assist-page .ops-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.security-assist-page .ops-field-wide {
  grid-column: 1 / -1;
}
.security-assist-page .ops-field > label {
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.security-assist-page .ops-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.security-assist-page .ops-sep {
  color: var(--text-mute);
}
.security-assist-page .ops-period {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.security-assist-page .ops-period button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
}
.security-assist-page .ops-radio-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 34px;
  align-items: center;
}
@media (max-width: 900px) {
  .security-assist-page .ops-form-grid {
    grid-template-columns: 1fr;
  }
  .security-assist-page .tbl_cols th,
  .security-assist-page .tbl_cols td {
    display: block;
    width: auto;
  }
  .security-assist-page .tbl_cols th {
    border-bottom: none;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 1024px) {
  .ops-layout { grid-template-columns: 68px 1fr; }
  .sidebar { padding: 16px 8px; }
  .ops-logo-text, .ops-logo-sub, .nav-item span, .nav-group-title, .env-badge, .user-meta { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item .badge-count { display: none; }
}
@media (max-width: 640px) {
  .ops-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .page-content { padding: 20px 16px; }
  .topbar-search { width: 100%; }
}

/* ==================================================================
   Form controls (모달 안 폼 필드)
   ================================================================== */
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  padding: 8px 11px;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus {
  border-color: var(--accent);
}
.form-input::placeholder { color: var(--text-mute); }

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9aa5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

textarea.form-input {
  font-family: inherit;
  line-height: 1.6;
}

/* Horizontal rule (모달 내부 등) */
.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 14px 0;
}

/* Split grid helper (split-2 없다면 추가) */
.split-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
@media (max-width: 1100px) {
  .split-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Badge 확장 — badge-info / badge-err
   ============================================================ */

/* 정보성 배지 (파란 계열 · OPS 역할 등 중립 강조) */
.badge-info {
  background: rgba(96,165,250,0.12);
  color: #60a5fa;
  border: none;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 오류·차단 상태 배지 (붉은 계열 · 정지/잠금 상태) */
.badge-err {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border: none;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
   버튼 그룹 래퍼
   ============================================================ */

/* 여러 버튼을 가로로 묶는 래퍼 (gap --sp-2 = 8px) */
.btn-group {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* ============================================================
   타이포그래피 유틸리티
   ============================================================ */

/* 보조 정보용 극소 텍스트 */
.text-xs { font-size: var(--text-xs); }

/* ============================================================
   Dashboard 전용 유틸리티 (main/index.jsp)
   ============================================================ */

/* 동적 너비 progress bar — style="--prog:X%" 와 조합 사용 */
.prog-bar { width: var(--prog, 0%); }
/* 플랜별 progress bar 색상 오버라이드 */
.plan-bar-free       { background: #6c6c74; }
.plan-bar-enterprise { background: #c68fff; }

/* 차트 범례 행 (gap + font-size) */
.chart-legend { gap: 20px; font-size: 12px; }

/* 차트 범례 색상 스와치 */
.chart-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.chart-swatch-ok   { background: var(--accent); }
.chart-swatch-warn { background: var(--warn); }

/* SVG 차트 높이 변형 */
.mini-chart-lg { height: 240px; }

/* 탭바 플러시 변형 (margin·border 제거) */
.tab-bar-flush { margin: 0; border: 0; }

/* 이벤트 스트림 body (스크롤 고정 높이) */
.event-body { padding: 14px 20px; max-height: 420px; overflow-y: auto; }

/* 대시보드 하단 3열 그리드 */
.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}
@media (max-width: 1100px) { .dash-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .dash-grid-3 { grid-template-columns: 1fr; } }

/* v-stack gap 변형 */
.v-stack-sm { gap: 14px; }
.v-stack-md { gap: var(--sp-4); }

/* 텍스트 크기 보조 유틸리티 */
.text-sm   { font-size: var(--text-sm); }   /* 12px */
.text-body { font-size: 13px; }             /* 본문 소형 텍스트 */

/* section-card-body 패딩 없음 */
.section-card-body-flush { padding: 0; }

/* 경고 항목 리스트 행 */
.alert-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.alert-row:last-child { border-bottom: none; }

/* ============================================================
   Input 고정 너비 헬퍼 (filter-bar 내 텍스트 입력)
   ============================================================ */
.input-w-140 { width: 140px; }
.input-w-160 { width: 160px; }
