/* =========================================================
   AI Agent ODM Design Tokens
   Layer 1: Beyond Collective ODM design system | Layer 2: prototype aliases
   white-first, RMS action blue, tight radius (4/8)
   ========================================================= */

:root {
  /* =======================================================
     Layer 1. Beyond Collective ODM design system tokens
     Source: Design System artifact "Beyond Collective ODM" v4
     (docs/odm-platform/design-system/beyond-collective-odm/tokens.json)
     Keep names identical to the artifact. Replace this layer
     when the design system changes; never edit Layer 2 for values.
     ======================================================= */

  /* @ds-layer1:start (generated by tools/sync-design-tokens.mjs, do not edit by hand) */
  /* source: Beyond Collective ODM v5 */
  /* color */
  --primary-50: #e0eaff;
  --primary-100: #ccdfff;
  --primary-200: #99bfff;
  --primary-300: #669eff;
  --primary-400: #1f7eff;
  --primary-500: #005eff;
  --primary-600: #2563eb;
  --primary-700: #0046bf;
  --primary-800: #002f80;
  --ink-900: #111111;
  --ink-800: #222222;
  --ink-700: #333333;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca6b5;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f5f5f5;
  --gray-50: #f9fafb;
  --surface: #ffffff;
  --overlay: rgba(17, 17, 17, 0.48);
  --success: #3d8a58;
  --success-bg: #e8f1eb;
  --success-border: #a8cab4;
  --success-text: #2e6842;
  --warning: #fcaf16;
  --warning-bg: #fff5e3;
  --warning-border: #fedb96;
  --warning-text: #7a5a00;
  --error: #dc2626;
  --error-bg: #fbe5e5;
  --error-border: #ef9d9d;
  --error-text: #a51c1c;
  --error-strong-bg: #f6c9c9;
  --error-strong-text: #6e1313;
  --brand-500-rgb: 0, 94, 255; /* for rgba() focus ring, derived from primary-500 */
  /* spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  /* radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-full: 9999px;
  /* shadow */
  --focus-ring: 0 0 0 3px rgba(0, 94, 255, 0.12);
  /* @ds-layer1:end */

  /* =======================================================
     Layer 2. prototype aliases
     Names the prototype code references. Values point at Layer 1.
     ======================================================= */

  /* ---- Surfaces ------------------------------------------ */
  --bg-page:   var(--surface);
  --bg-card:   var(--surface);
  --bg-subtle: var(--gray-100);
  --bg-hover:  var(--gray-50);
  --bg-muted:  var(--surface);

  /* ---- Text ---------------------------------------------- */
  --text-strong:   var(--ink-900);
  --text-base:     var(--ink-800);
  --text-muted:    var(--gray-600);
  --text-weak:     var(--gray-500);
  --text-disabled: var(--gray-400);
  --text-on-brand: var(--surface);

  /* ---- Borders ------------------------------------------- */
  --border-base:   var(--gray-200);
  --border-strong: var(--gray-300);
  --border-subtle: var(--gray-100);
  --border-focus:  var(--primary-500);

  /* ---- Brand blue = primary ------------------------------ */
  --brand-50:   var(--primary-50);
  --brand-100:  var(--primary-100);
  --brand-200:  var(--primary-200);
  --brand-300:  var(--primary-300);
  --brand-400:  var(--primary-400);
  --brand-500:  var(--primary-500);
  --brand-600:  var(--primary-600);
  --brand-700:  var(--primary-700);
  --brand-800:  var(--primary-800);

  /* ---- Status ------------------------------------------- */
  /* --success-bg, --warning-bg, --success-text, --warning-text, --success-border, --warning-border: Layer 1 names already match */
  --danger:      var(--error);
  --danger-bg:   var(--error-bg);
  --danger-text: var(--error-text);
  --danger-border: var(--error-border);
  --danger-strong-bg:   var(--error-strong-bg);
  --danger-strong-text: var(--error-strong-text);
  --info:        var(--primary-500);
  --info-bg:     var(--primary-50);

  /* ---- Radius (RMS: 4 / 8 only, full for pills) --------- */
  --r-xs:  var(--radius-sm);
  --r-sm:  var(--radius-sm);
  --r-md:  var(--radius-md);
  --r-lg:  var(--radius-md);
  --r-xl:  var(--radius-md);
  --r-2xl: var(--radius-md);
  --r-full: var(--radius-full);

  /* ---- Shadow (very soft, layered) --------------------- */
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-brand: none;

  /* ---- Typography -------------------------------------- */
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont,
               system-ui, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  /* type scale (ODM prototype scale kept as is) */
  --t-display-1: 40px;
  --t-display-2: 28px;   /* display-28 */
  --t-h1: 24px;          /* title-24 */
  --t-h2: 20px;          /* title-20 */
  --t-h3: 18px;          /* heading-18 */
  --t-body: 16px;        /* body-16 */
  --t-label: 14px;       /* body-14: form labels, table body */
  --t-small: 13px;       /* caption-13 */
  --t-micro: 12px;       /* caption-12: minimum size in the UI */

  --lh-tight: 1.3;
  --lh-body:  1.5;
  --lh-small: 1.45;

  /* ---- Spacing (4px base) ------------------------------ */
  --s-1: var(--space-1);  --s-2: var(--space-2);   --s-3: var(--space-3); --s-4: var(--space-4);
  --s-5: var(--space-5);  --s-6: var(--space-6);   --s-8: var(--space-8); --s-10: var(--space-10);
  --s-12: var(--space-12); --s-16: var(--space-16);
}

/* =========================================================
   Scoped root + reset
   ========================================================= */
.toss {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--text-base);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
.toss *, .toss *::before, .toss *::after { box-sizing: border-box; }
.toss h1, .toss h2, .toss h3, .toss h4, .toss p { margin: 0; }
.toss button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  letter-spacing: inherit;
}
.toss input, .toss textarea { font-family: inherit; color: inherit; letter-spacing: inherit; }
.toss a { color: var(--brand-500); text-decoration: none; }
.toss a:hover { text-decoration: underline; }

/* =========================================================
   Type utilities
   ========================================================= */
.t-display { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-strong); }
.t-h1      { font-size: var(--t-h1); font-weight: 700; line-height: 1.3; color: var(--text-strong); letter-spacing: -0.015em; }
.t-h2      { font-size: var(--t-h2); font-weight: 700; line-height: 1.35; color: var(--text-strong); letter-spacing: -0.012em; }
.t-h3      { font-size: var(--t-h3); font-weight: 600; line-height: 1.4; color: var(--text-strong); }
.t-body    { font-size: var(--t-body); color: var(--text-base); }
.t-label   { font-size: var(--t-label); color: var(--text-base); }
.t-small   { font-size: var(--t-small); line-height: var(--lh-small); color: var(--text-muted); }
.t-micro   { font-size: var(--t-micro); line-height: var(--lh-small); color: var(--text-muted); }
.t-mono    { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.t-num     { font-variant-numeric: tabular-nums; }
.t-muted   { color: var(--text-muted); }
.t-weak    { color: var(--text-weak); }
.t-strong  { color: var(--text-strong); }
.t-brand   { color: var(--brand-500); }

/* =========================================================
   Primitives
   ========================================================= */

/* Cards ---------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-xl);
  padding: var(--s-6);
}
.card-flat   { border: 1px solid var(--border-base); border-radius: var(--r-xl); background: var(--bg-card); }
.card-raised { background: var(--bg-card); border-radius: var(--r-xl); border: 1px solid var(--border-base); }
.card-quiet  { background: transparent; border: 1px solid var(--border-base); border-radius: var(--r-md); padding: var(--s-4); }

/* Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 44px;
  padding: 0 var(--s-5);
  font-size: var(--t-body);
  font-weight: 600;
  border-radius: var(--r-md);
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.06s ease;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* .toss button { background: none } (specificity 0,1,1) used to beat .btn-* (0,1,0): variants never painted. Re-declare under .toss. */
.toss .btn-primary   { background: var(--brand-500); color: var(--text-on-brand); }
.toss .btn-primary:hover { background: var(--brand-600); }
.toss .btn-secondary { background: var(--bg-subtle); color: var(--text-strong); }
.toss .btn-secondary:hover { background: var(--gray-200); }
.toss .btn-outline   { background: var(--bg-card); color: var(--text-strong); border: 1px solid var(--border-strong); }
.toss .btn-outline:hover { background: var(--bg-hover); }
.toss .btn-ghost:hover { background: var(--bg-hover); }
/* same specificity issue for padding/color: .toss button { padding: 0; color: inherit } beat .btn sizes and .btn-link color */
.toss .btn        { padding: 0 var(--s-5); }
.toss .btn-sm     { padding: 0 var(--s-3); }
.toss .btn-lg     { padding: 0 var(--s-8); }
.toss .btn-link   { padding: 0; color: var(--brand-500); }
.toss .btn-link:hover { color: var(--brand-600); }
.toss .icon-btn   { padding: 0; }
.btn-primary {
  background: var(--brand-500);
  color: var(--text-on-brand);
}
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-strong);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-ghost {
  background: transparent;
  color: var(--text-base);
}
.btn-ghost:hover { background: var(--bg-hover); }
.btn-outline {
  background: var(--bg-card);
  color: var(--text-strong);
  border: 1px solid var(--border-base);
}
.btn-outline:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-link {
  height: auto;
  padding: 0;
  color: var(--brand-500);
  font-weight: 600;
}
.btn-link:hover { color: var(--brand-600); }
.btn-sm { height: 36px; padding: 0 var(--s-3); font-size: var(--t-label); border-radius: var(--r-sm); }
.btn-lg { height: 56px; padding: 0 var(--s-8); font-size: 16px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

/* Chips / Badges ------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  font-size: var(--t-small);
  font-weight: 600;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.chip-blue    { background: var(--brand-50);    color: var(--brand-700); }
.chip-warning { background: var(--warning-bg);  color: var(--warning-text); }
.chip-success { background: var(--success-bg);  color: var(--success-text); }
.chip-danger  { background: var(--danger-bg);   color: var(--danger-text); }
.chip-neutral { background: var(--bg-subtle);   color: var(--text-muted); }
/* status as plain text: dot + label, for secondary states that do not need a chip */
.status-text { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-label); color: var(--text-base); white-space: nowrap; }
.status-text::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-weak); flex-shrink: 0; }
.status-text.is-success::before { background: var(--success); }
.status-text.is-warning::before { background: var(--warning); }
.status-text.is-danger::before  { background: var(--danger); }
.status-text.is-neutral::before { background: var(--text-weak); }
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}

/* Inputs --------------------------------------------------- */
.input,
.textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: var(--t-body);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  color: var(--text-strong);
}
.input:focus,
.textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(var(--brand-500-rgb), 0.12);
}
.input::placeholder,
.textarea::placeholder { color: var(--text-weak); }
.input-sub {
  background: var(--bg-subtle);
  border-color: transparent;
}
.input-sub:focus { background: var(--bg-card); }

/* Tags / Soft pills for filters --------------------------- */
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  background: var(--bg-card); border: 1px solid var(--border-base);
  border-radius: var(--r-md); font-size: var(--t-label); color: var(--text-base);
  font-weight: 500;
}
.filter-pill:hover { background: var(--bg-hover); }

/* Section header (Card-internal) -------------------------- */
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-5);
}
.card-head .ttl { display: flex; align-items: center; gap: 10px; }
.card-head h3 { font-size: var(--t-h3); font-weight: 700; color: var(--text-strong); }

/* Key/value row used in summary cards -------------------- */
.kv {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--t-body);
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-muted); }
.kv .v { color: var(--text-strong); font-weight: 500; }

/* Icon button --------------------------------------------- */
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--bg-subtle); color: var(--text-base); }

/* Summary bar: KPI numbers in one row instead of four cards --- */
.toss .summary-bar { display: flex; flex-wrap: wrap; border: 1px solid var(--border-base); border-radius: var(--r-md); background: var(--bg-card); }
.toss .summary-item { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); padding: 14px 20px; border-right: 1px solid var(--border-base); flex: 1 1 0; min-width: 0; }
.toss .summary-item:last-child { border-right: none; }
.toss .summary-label { font-size: var(--t-small); font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.toss .summary-value { font-size: var(--t-h2); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Plain data table (factory list etc.) --------------------- */
.toss .data-table { font-size: var(--t-label); }
.toss .data-table th { text-align: left; font-weight: 700; color: var(--text-muted); font-size: var(--t-small); padding: 10px 12px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.toss .data-table td { padding: 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; color: var(--text-base); }
.toss .data-table tr:last-child td { border-bottom: none; }

/* Modal / Popover (Beyond Collective ODM: Modal component) ---- */
/* 휴대폰(≤640px) 규칙(모달 시트, 상단 바, 목록 카드, 하단 버튼 바, 필터 시트, 작업지시서 섹션 등)은 모두 mobile-layout.css에 있다. */
.toss .modal-backdrop { position: fixed; inset: 0; z-index: 100; background: var(--overlay); display: grid; place-items: center; padding: var(--s-6); }
.toss .modal { width: 100%; max-height: calc(100vh - 48px); overflow: auto; background: var(--bg-card); border: 1px solid var(--border-base); border-radius: var(--r-md); padding: var(--s-6); }
.toss .modal-sm { max-width: 480px; }
.toss .modal-md { max-width: 720px; }
.toss .modal-lg { max-width: 920px; }
.toss .modal-xl { max-width: 1120px; }
.toss .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.toss .modal-head h2 { font-size: var(--t-h2); font-weight: 700; line-height: 1.35; color: var(--text-strong); }
.toss .modal-head p { margin-top: 4px; }
.toss .modal-foot { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border-base); }
.toss .popover { position: absolute; z-index: 20; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: var(--s-4); }

/* FilterBar (Beyond Collective ODM: FilterBar component) ------ */
.toss .filter-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border-base); margin-bottom: 14px; }
.toss .filter-bar .input, .toss .filter-bar select.input { height: 40px; width: auto; min-width: 120px; padding: 0 12px; font-size: var(--t-label); }
.toss .filter-bar .filter-date { min-width: 128px; font-family: var(--font-mono); font-size: var(--t-small); }
.toss .filter-bar .filter-search { flex: 1 1 240px; min-width: 200px; }
.toss .filter-bar .filter-dash { color: var(--text-weak); }
.toss .filter-bar .filter-actions { display: flex; gap: var(--s-2); margin-left: auto; }

/* Admin top bar (AdminShell) ----------------------------------- */
.toss .admin-topbar { min-height: 54px; padding: 0 28px; display: flex; align-items: center; gap: 18px; background: var(--text-strong); color: #fff; }
.toss .admin-brand { display: flex; align-items: center; gap: 10px; padding: 0; border: none; background: transparent; color: #fff; cursor: pointer; }
.toss .admin-brand-name { font-size: var(--t-body); font-weight: 800; }
.toss .admin-brand-badge { font-size: var(--t-micro); font-weight: 800; padding: 3px 7px; border-radius: var(--r-sm); background: var(--brand-500); letter-spacing: 0.08em; }
.toss .admin-nav { display: flex; gap: 4px; margin-left: 8px; }
.toss .admin-nav-item { padding: 7px 12px; border: none; border-radius: var(--r-md); background: transparent; color: rgba(255, 255, 255, 0.64); font-size: var(--t-label); font-weight: 700; white-space: nowrap; cursor: pointer; }
.toss .admin-nav-item.is-current { color: #fff; background: rgba(255, 255, 255, 0.12); }
.toss .admin-me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.toss .admin-me-tag { font-size: var(--t-micro); font-weight: 700; color: rgba(255, 255, 255, 0.72); padding: 3px 7px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.10); }
.toss .admin-me-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-500); color: #fff; display: grid; place-items: center; font-size: var(--t-small); font-weight: 800; }
.toss .admin-me-name { line-height: 1.15; font-size: var(--t-label); font-weight: 800; }
.toss .admin-me-role { font-size: var(--t-micro); font-weight: 400; color: rgba(255, 255, 255, 0.6); }
.toss .admin-logout { height: 28px; padding: 0 8px; border: none; border-radius: var(--r-sm); background: transparent; color: rgba(255, 255, 255, 0.72); font-size: var(--t-small); cursor: pointer; }
.toss .admin-logout:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* Factory candidate card (production detail, 공장 배정) -------------- */
.toss .factory-candidate { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border-base); border-radius: var(--r-md); background: var(--bg-card); }
.toss .factory-candidate.is-selected { border-color: var(--brand-500); background: var(--brand-50); }
.toss .factory-candidate__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.toss .factory-candidate__title { min-width: 0; }
.toss .factory-candidate__name { font-size: var(--t-label); font-weight: 700; color: var(--text-strong); }
.toss .factory-candidate__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: var(--t-small); color: var(--text-muted); }
.toss .factory-candidate__metrics { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }
.toss .factory-candidate__metrics > div { display: flex; gap: 4px; font-size: var(--t-small); }
.toss .factory-candidate__metrics dt { color: var(--text-muted); }
.toss .factory-candidate__metrics dd { margin: 0; font-weight: 700; color: var(--text-strong); }
.toss .factory-candidate__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.toss .factory-candidate__tag { font-size: var(--t-small); font-weight: 600; }
.toss .factory-candidate__tag.is-good { color: var(--success-text); }
.toss .factory-candidate__tag.is-caution { color: var(--warning-text); }

/* FilterTabs (list screens: 운영자 계정 N | 고객 계정 N) ------------ */
.toss .filter-tabs { display: flex; align-items: center; gap: 4px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--border-base); }
.toss .filter-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-md); border: 0; background: transparent; color: var(--text-muted); font-size: var(--t-label); font-weight: 700; cursor: pointer; }
.toss .filter-tabs button:hover { background: var(--bg-hover); }
.toss .filter-tabs button.active, .toss .filter-tabs button[aria-selected="true"] { background: var(--brand-50); color: var(--brand-700); }
.toss .filter-tabs button .count { font-family: var(--font-mono); font-size: var(--t-micro); font-weight: 500; }

/* Table row selection (Table component, 행 선택) ----------------- */
.toss .data-table th.col-check, .toss .data-table td.col-check { width: 40px; padding-right: 0; }
.toss .data-table input[type="checkbox"] { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--brand-500); }
.toss .data-table tr.is-selected { background: var(--brand-50); }
.toss .data-table tr.is-selected td { background: transparent; border-bottom-color: var(--brand-100); }
.toss .data-table tr.is-clickable { cursor: pointer; }
.toss .data-table tr.is-clickable:hover td { background: var(--bg-hover); }
.toss .data-table td .cell-link { color: var(--brand-500); font-weight: 600; }
.toss .table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: 10px; }
.toss .table-toolbar .count { font-size: var(--t-small); color: var(--text-muted); }
.toss .table-toolbar .count b { color: var(--text-strong); font-family: var(--font-mono); }
.toss .selection-bar { display: inline-flex; align-items: center; gap: 10px; height: 36px; color: var(--text-strong); font-size: var(--t-label); font-weight: 600; }
.toss .selection-bar .count { font-family: var(--font-mono); }

/* Pagination (Pagination component) ------------------------------ */
.toss .pagination { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 16px 0 4px; }
.toss .pagination button { font-family: var(--font-mono); font-size: var(--t-small); font-weight: 500; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; display: inline-grid; place-items: center; }
.toss .pagination button:hover { background: var(--bg-hover); }
.toss .pagination button.is-current { border-color: var(--brand-500); color: var(--brand-700); font-weight: 700; }
.toss .pagination button:disabled { color: var(--border-strong); cursor: default; background: transparent; }

/* FormTable (FormTable component) -------------------------------- */
.toss .form-table { border: 1px solid var(--border-base); border-radius: var(--r-md); overflow: hidden; }
.toss .form-table .form-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); border-top: 1px solid var(--border-subtle); }
.toss .form-table .form-row:first-child { border-top: none; }
.toss .form-table .form-label { padding: 12px 14px; background: var(--bg-hover); color: var(--gray-700); font-size: var(--t-label); font-weight: 600; display: flex; align-items: center; gap: 4px; border-right: 1px solid var(--border-subtle); }
.toss .form-table .form-label .req { color: var(--danger); }
.toss .form-table .form-value { padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.toss .form-table .form-value .input, .toss .form-table .form-value select.input { width: min(100%, 360px); height: 40px; padding: 0 12px; font-size: var(--t-label); }
.toss .form-table .form-value .input.is-full, .toss .form-table .form-value .textarea { width: 100%; }
.toss .form-table .form-value .input[readonly], .toss .form-table .form-value .input.is-readonly { background: var(--bg-subtle); border-color: transparent; color: var(--text-muted); }
.toss .form-table .form-hint { width: 100%; font-size: var(--t-small); color: var(--danger-text); } /* validation errors only; explanations go in .help tooltips */

/* Help tooltip (설명은 레이블 옆 ? 아이콘) ------------------------ */
.toss .help { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: var(--r-full); border: 1px solid var(--border-strong); color: var(--text-weak); font-size: 11px; font-weight: 700; line-height: 1; cursor: help; margin-left: 2px; flex-shrink: 0; background: transparent; padding: 0; }
.toss .help::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: 300px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--text-strong); color: var(--text-on-brand); font-size: var(--t-micro); font-weight: 400; line-height: 1.5; white-space: normal; text-align: left; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.toss .help:hover::after, .toss .help:focus-visible::after { opacity: 1; }
.toss .form-foot { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border-base); }
.toss .form-foot .is-destructive { margin-right: auto; color: var(--danger-text); }

/* Scrollbar polish ---------------------------------------- */
.toss ::-webkit-scrollbar { width: 8px; height: 8px; }
.toss ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.toss ::-webkit-scrollbar-thumb:hover { background: var(--text-weak); }
.toss ::-webkit-scrollbar-track { background: transparent; }

/* Admin detail summary ----------------------------------- */
.admin-detail-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.admin-detail-summary-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.admin-detail-header-controls {
  display: grid;
  grid-template-columns: 240px 200px;
  gap: 10px;
}
.admin-detail-lifecycle-control { display: flex; gap: var(--s-2); align-items: stretch; }
.admin-detail-lifecycle-control > .btn { height: auto; }
.admin-detail-lifecycle-control > select { flex: 1; min-width: 0; }
