/* ── Design tokens ───────────────────────────────────────────── */
:root {
  --bg: #070b12;
  --bg-elevated: #0d1219;
  --surface: rgba(16, 22, 32, 0.82);
  --surface-solid: #101620;
  --surface2: #161e2c;
  --surface3: #1c2636;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-glow: rgba(99, 102, 241, 0.35);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.15), 0 20px 50px rgba(0, 0, 0, 0.4);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --sidebar-w: 272px;
  --transition: 0.18s ease;
}

/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(34, 211, 238, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(99, 102, 241, 0.06), transparent 50%),
    linear-gradient(180deg, #0a0f18 0%, var(--bg) 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: #67e8f9; }

::selection {
  background: var(--accent-soft);
  color: #fff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface3);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ── Layout ──────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.brand-block {
  padding: 0.25rem 0.75rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.35rem;
  padding-left: 2.85rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav a:hover {
  background: var(--surface2);
  color: #fff;
  transform: translateX(2px);
}

.nav a:hover svg { opacity: 1; }

.nav a.active {
  background: var(--accent-soft);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav a.active svg {
  opacity: 1;
  color: #a5b4fc;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.85rem 0.75rem 0.25rem;
  border-top: 1px solid var(--border);
}

.sidebar-user-panel {
  padding: 0.75rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  border: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.user-card-text {
  min-width: 0;
  flex: 1;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.35), rgba(34, 211, 238, 0.15));
  border: 1px solid rgba(129, 140, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #c7d2fe;
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.sidebar-user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.sidebar-user-actions--single {
  grid-template-columns: 1fr;
}

.sidebar-logout-form {
  margin: 0;
  min-width: 0;
}

.sidebar-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
  line-height: 1.2;
}

.sidebar-action-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar-action-btn:hover {
  background: var(--surface3);
  border-color: var(--border-strong);
  color: #fff;
}

.sidebar-action-btn:hover svg {
  opacity: 1;
}

.sidebar-action-btn--logout:hover {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 3rem;
  width: 100%;
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.25;
  color: #fff;
}

.page-desc {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.page-title .muted {
  font-size: 1rem;
  font-weight: 500;
}

/* ── Stat cards ───────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent);
  opacity: 0.85;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card .label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card .value {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 0.35rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-accent-indigo { --card-accent: #6366f1; }
.card-accent-cyan { --card-accent: #22d3ee; }
.card-accent-green { --card-accent: #34d399; }
.card-accent-amber { --card-accent: #fbbf24; }
.card-accent-rose { --card-accent: #fb7185; }

/* ── Panels ───────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.panel-form { max-width: 480px; }
.panel-form-wide { max-width: 560px; }

.panel-highlight {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), var(--surface));
  box-shadow: var(--shadow-glow);
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(300px, 480px) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.panel-grid > .panel {
  min-width: 0;
}

.registration-keys-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.registration-keys-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  gap: 1rem 1.25rem;
  align-items: end;
}

.registration-keys-form-actions {
  margin: 0;
}

.registration-keys-form-actions .btn {
  white-space: nowrap;
}

.registration-keys-history-panel {
  margin-bottom: 0;
}

.registration-keys-history-panel .data-table {
  min-width: 960px;
}

.reg-key-branch {
  min-width: 7.5rem;
}

.reg-key-branch-name {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.reg-key-branch-code {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.08rem 0.35rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
  white-space: nowrap;
}

.reg-key-date {
  min-width: 9rem;
  line-height: 1.45;
  vertical-align: middle;
}

.registration-keys-history-panel .reg-key-used-at {
  min-width: 8.5rem;
  vertical-align: middle;
}

.reg-key-expires {
  margin-top: 0.2rem;
  font-size: 0.78rem;
}

.registration-keys-history-panel .reg-key-actions {
  width: 5.5rem;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.reg-key-delete-form {
  display: inline-flex;
  margin: 0;
  justify-content: flex-end;
}

.registration-keys-history-panel td code {
  white-space: nowrap;
}

.key-display {
  font-size: 1.35rem;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.08em;
  padding: 1rem 1.25rem;
  background: var(--surface2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  word-break: break-all;
}

.key-display-inline {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.branch-main-pc-key-col {
  white-space: nowrap;
}

.branch-main-pc-key-col .key-display-inline {
  font-size: 0.95rem;
}

.table-wrap table.data-table td.actions .inline-form {
  display: inline;
}

.branch-category-tree {
  margin: 1rem 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.92rem;
}

.category-admin-panel .panel-desc {
  margin: -0.25rem 0 1rem;
}

.category-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.category-add-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.category-add-card-head strong {
  display: block;
  font-size: 0.92rem;
}

.category-add-card-head p {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
}

.category-add-input,
.category-add-select {
  width: 100%;
}

.category-tree {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.category-region-card {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.category-region-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.category-region-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-size: 0.82rem;
  font-weight: 700;
}

.category-area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.category-area-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.18rem 0.2rem 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface3);
}

.category-area-name {
  font-size: 0.8rem;
}

.category-chip-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.category-chip-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.category-delete-form {
  display: inline;
  margin: 0;
}

.category-area-empty,
.category-tree-empty {
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .category-add-grid {
    grid-template-columns: 1fr;
  }
}

.branch-category-tree ul {
  margin: 0.35rem 0 0.5rem 1rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.25));
  list-style: none;
}

.branch-category-tree li {
  margin: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.panel-grid-span-2 {
  grid-column: 1 / -1;
}

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: -0.25rem -0.5rem;
  padding: 0.25rem 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

tbody tr:last-child td { border-bottom: none; }

code {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  padding: 0.15rem 0.45rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cyan);
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-online {
  background: var(--success-soft);
  color: var(--success);
}

.badge-offline {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.badge-main {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  margin-left: 0.45rem;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
}

.badge-main::before {
  display: none;
}

.badge-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-expired {
  background: var(--warning-soft);
  color: var(--warning);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
  filter: brightness(1.05);
  color: #fff;
}

.btn:active { transform: translateY(0); }

.btn-block { width: 100%; }

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--surface2);
  border-color: var(--border-strong);
  color: #fff;
  box-shadow: none;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-group label input[type="checkbox"] {
  width: auto;
  max-width: none;
  accent-color: var(--accent);
}

.input-action-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.input-action-row input {
  flex: 1;
  min-width: 0;
}

.input-action-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.field-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
}

.field-hint.ok { color: #34d399; }
.field-hint.err { color: #f87171; }

.form-divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.form-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1rem;
}

input, select, textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input::placeholder { color: #64748b; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface3);
}

select {
  cursor: pointer;
  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='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

/* ── Flash messages ───────────────────────────────────────────── */
.flash-wrap { margin-bottom: 1.25rem; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  animation: flash-in 0.3s ease;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash-success {
  background: var(--success-soft);
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.flash-danger {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.flash-warning {
  background: var(--warning-soft);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.flash-info {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

/* ── Auth pages ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(16, 22, 32, 0.9);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-glow);
}

.auth-card-wide { max-width: 460px; }

.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.auth-logo svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.auth-brand p {
  color: var(--muted);
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.auth-footer a {
  color: var(--cyan);
  font-weight: 600;
}

/* ── Utilities ────────────────────────────────────────────────── */
.inline-form { display: inline; }

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.muted { color: var(--muted); font-size: 0.88rem; }

.text-center { text-align: center; }

.panel-footer { margin-top: 1rem; }

.detail-list {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
}
.detail-list dt { margin: 0; color: var(--muted); font-size: 0.88rem; }
.detail-list dd { margin: 0; }

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: var(--cyan); font-weight: 600; }
.site-footer span { margin: 0 0.35rem; }

/* ── App footer (landing · branch · public) ─────────────────── */
.app-footer {
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 70% at 50% -60%, rgba(99, 102, 241, 0.1), transparent 55%),
    rgba(7, 11, 18, 0.85);
}

.app-footer--branch {
  margin-top: 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.app-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.25rem;
}

.app-footer-brand {
  min-width: 0;
  padding-bottom: 1.15rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.app-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  margin-bottom: 0.45rem;
}

.app-footer-logo:hover {
  color: #fff;
}

.app-footer-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.app-footer-logo-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.app-footer-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-footer-tagline {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.app-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
}

.app-footer-copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.app-footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  font-size: 0.78rem;
}

.app-footer-legal a {
  color: var(--muted);
  text-decoration: none;
}

.app-footer-legal a:hover {
  color: var(--cyan);
}

.app-footer-legal span {
  color: var(--muted);
  opacity: 0.5;
}

@media (max-width: 640px) {
  .app-footer-inner {
    padding: 1.35rem 1rem 1rem;
  }

  .app-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

.auth-legal-links {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-legal-links a { color: var(--cyan); }

.legal-panel h2 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.legal-panel ul { margin: 0.5rem 0 1rem 1.25rem; color: var(--text-secondary); }

.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.25); color: #fecaca; }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
}

/* ── Error pages ──────────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 5rem 1.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.error-code {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-page p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1rem 0 2rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* ── Quick link card ──────────────────────────────────────────── */
.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition);
}

.quick-link:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-soft);
}

/* ── Pending approval ─────────────────────────────────────────── */
.pending-plan-banner { margin-bottom: 1rem; }

.pending-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pending-bulk-toolbar-info {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.pending-bulk-count {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.pending-bulk-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pending-bulk-label-text {
  font-size: 0.85rem;
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pending-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.pending-card:hover { border-color: var(--border-strong); }

.pending-card:has(.pending-bulk-check:checked) {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.pending-card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  border-bottom: 1px solid var(--border);
}

.pending-bulk-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}

.pending-bulk-label:hover {
  border-color: var(--border-strong);
  background: var(--surface3);
}

.pending-bulk-label input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.pending-card-identity {
  flex: 1;
  min-width: 0;
}

.pending-status {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.pending-machine {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.pending-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.pending-meta-sep { opacity: 0.55; }

.pending-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.pending-tag-branch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.pending-tag-branch code {
  font-size: 0.75rem;
  color: var(--cyan);
  background: transparent;
  padding: 0;
}

.pending-form {
  padding: 1.15rem 1.35rem 1.25rem;
}

.pending-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

.pending-fields--main {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.1fr) minmax(220px, 1fr);
}

.pending-fields--single {
  grid-template-columns: minmax(280px, 420px);
}

.pending-form .field label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pending-form input,
.pending-form select {
  width: 100%;
  max-width: none;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.pending-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  align-items: center;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.pending-empty { text-align: center; padding: 3rem 1rem; }

/* ── PC management ────────────────────────────────────────────── */
.pc-summary { margin: -0.25rem 0 1.25rem; }

.pc-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.pc-category-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 8rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.pc-category-item:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: var(--surface2);
  color: #fff;
  transform: translateY(-1px);
}

.pc-category-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2), 0 4px 12px rgba(99, 102, 241, 0.15);
}

.pc-category-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

.pc-category-code {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.pc-category-meta {
  font-size: 0.76rem;
  color: var(--muted);
}

.pc-category-item.active .pc-category-meta { color: #a5b4fc; }

.pc-split-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.pc-branch-sidebar {
  position: sticky;
  top: 1rem;
  padding: 0.85rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* PC 카테고리 사이드바 (지역 → 동네 트리) */
.pc-category-sidebar {
  position: sticky;
  top: 1rem;
  padding: 0;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.pc-category-sidebar-head {
  padding: 0.9rem 0.9rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(99, 102, 241, 0.06);
}

.pc-category-sidebar-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.pc-category-sidebar-desc {
  margin: 0.2rem 0 0.65rem;
  font-size: 0.76rem;
  line-height: 1.35;
}

.pc-category-search {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M14 14l-3.2-3.2'/%3E%3C/svg%3E") no-repeat 0.65rem center;
  color: var(--text);
  font-size: 0.86rem;
}

.pc-category-search:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.pc-category-tree {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
  padding: 0.55rem;
}

.pc-category-node,
.pc-category-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.62rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.pc-category-node:hover,
.pc-category-child:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.pc-category-node.active,
.pc-category-child.active {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.45);
  color: #e0e7ff;
}

.pc-category-node--all {
  margin-bottom: 0.15rem;
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
}

.pc-category-node-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.pc-category-node-icon {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  color: #a5b4fc;
  flex-shrink: 0;
}

.pc-category-node-icon svg,
.pc-category-region-chevron svg,
.pc-details-dropdown-icon svg,
.pc-details-dropdown-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pc-category-node-label,
.pc-category-child-label {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.pc-category-node-meta,
.pc-category-child-meta,
.pc-category-region-meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-category-online {
  color: #86efac;
}

.pc-category-region {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.pc-category-region + .pc-category-region {
  margin-top: 0.15rem;
}

.pc-category-region-summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.65rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}

.pc-category-region-summary::-webkit-details-marker {
  display: none;
}

.pc-category-region-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pc-category-region-chevron {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.pc-category-region[open] .pc-category-region-chevron {
  transform: rotate(90deg);
  color: #a5b4fc;
}

.pc-category-region-main {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
}

.pc-category-region-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
}

.pc-category-region-children {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0 0.45rem 0.5rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pc-category-child {
  padding: 0.48rem 0.55rem 0.48rem 0.65rem;
}

.pc-category-child--area {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  padding-left: 0.55rem;
}

.pc-category-child-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.55);
  flex-shrink: 0;
  margin-right: -0.15rem;
}

.pc-category-child.active .pc-category-child-dot {
  background: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.pc-category-child--area .pc-category-child-label {
  font-weight: 600;
  font-size: 0.84rem;
}

/* PC 상세 설정 드롭다운 */
.pc-details-dropdown {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pc-details-dropdown:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.pc-details-dropdown[open] {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.pc-details-dropdown-summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}

.pc-details-dropdown-summary::-webkit-details-marker {
  display: none;
}

.pc-details-dropdown-summary:hover {
  background: rgba(99, 102, 241, 0.08);
}

.pc-details-dropdown[open] .pc-details-dropdown-summary {
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 1px solid var(--border);
}

.pc-details-dropdown-icon {
  display: inline-flex;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0.3rem;
  border-radius: 0.55rem;
  background: rgba(99, 102, 241, 0.15);
  color: #c4b5fd;
  flex-shrink: 0;
}

.pc-details-dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.pc-details-dropdown-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f8fafc;
}

.pc-details-dropdown-desc {
  font-size: 0.72rem;
  line-height: 1.3;
}

.pc-details-dropdown-chevron {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

.pc-details-dropdown[open] .pc-details-dropdown-chevron {
  transform: rotate(180deg);
  color: #a5b4fc;
}

.pc-details-dropdown-body {
  padding: 0.65rem 0.75rem 0.75rem;
}

.pc-details-dropdown .pc-details-stack {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  gap: 0.65rem;
}

.pc-branch-sidebar-head {
  margin-bottom: 0.75rem;
}

.pc-branch-sidebar-title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pc-branch-search {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.88rem;
}

.pc-branch-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.pc-branch-sidebar-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.pc-branch-sidebar-item:hover {
  background: var(--surface2);
  border-color: var(--border);
}

.pc-branch-sidebar-item.active {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.45);
}

.pc-branch-sidebar-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.pc-branch-sidebar-code {
  margin-left: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.pc-branch-sidebar-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

.pc-branch-sidebar-item--all {
  font-weight: 700;
}

.pc-branch-sidebar-item--region {
  margin-top: 0.15rem;
  font-weight: 600;
}

.pc-branch-sidebar-item--area {
  margin-left: 0.65rem;
  padding-left: 0.55rem;
  border-left: 2px solid rgba(99, 102, 241, 0.25);
}

.pc-branch-sidebar-item--area .pc-branch-sidebar-name {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.pc-branch-sidebar-region {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pc-branch-sidebar-area {
  font-size: 0.86rem;
  font-weight: 700;
}

.pc-branch-group-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.pc-branch-group-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.pc-branch-group-head {
  margin-bottom: 0.65rem;
}

.pc-branch-group-title {
  margin: 0;
  font-size: 1.05rem;
}

.pc-branch-detail-head--category {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.pc-branch-detail {
  min-width: 0;
}

.pc-branch-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pc-toolbar-global {
  margin-bottom: 1rem;
}

.audit-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.audit-filter-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.audit-filter-form select {
  min-width: 12rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.pc-toolbar { margin-bottom: 1.1rem; }

.pc-toolbar-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.pc-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.pc-toolbar-row-only-filter { justify-content: flex-end; }

.pc-cmd-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  flex: 1 1 auto;
}

.pc-cmd-form { margin: 0; display: inline; }

.pc-online-filter-form,
.pc-display-options-form {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pc-toolbar-form-grow { flex: 1 1 auto; margin: 0; }

.pc-online-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color var(--transition);
}

.pc-online-filter input {
  width: auto;
  max-width: none;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.pc-online-filter:hover { border-color: var(--accent); }

.pc-subsection {
  margin-bottom: 1.5rem;
}

.pc-subsection-main .pc-card-main {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.pc-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.pc-subsection-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.pc-subsection-meta {
  font-size: 0.85rem;
}

.pc-branch-section {
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.pc-branch-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.pc-branch-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.pc-branch-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.pc-branch-code {
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.35rem;
  color: var(--muted);
}

.pc-branch-meta {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.pc-toolbar-nested {
  margin-bottom: 0.9rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.pc-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pc-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem 0.8rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pc-card:hover { border-color: var(--border-strong); }

.pc-card.pc-card-focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25), var(--shadow-sm);
  animation: pc-card-focus-pulse 2.2s ease;
}

@keyframes pc-card-focus-pulse {
  0%, 100% { background: var(--surface); }
  20% { background: rgba(99, 102, 241, 0.1); }
  50% { background: rgba(99, 102, 241, 0.06); }
}

.pc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.pc-card-identity { min-width: 0; }

.pc-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.pc-name-host {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.pc-name-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.42rem;
}

.pc-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.22rem 0.55rem 0.22rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.25;
}

.pc-context-chip--geo {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
}

.pc-context-chip--branch {
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(99, 102, 241, 0.1);
}

.pc-context-chip-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
}

.pc-context-chip--geo .pc-context-chip-label {
  color: #7dd3fc;
}

.pc-context-chip--branch .pc-context-chip-label {
  color: #c4b5fd;
}

.pc-context-chip-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-context-sep {
  margin: 0 0.12rem;
  opacity: 0.5;
  font-weight: 400;
}

.pc-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.38rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.pc-meta-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  flex-shrink: 0;
}

/* legacy aliases */
.pc-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.pc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.pc-status-pill--online {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.32);
}

.pc-status-pill--offline {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.28);
}

.pc-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
}

.pc-status-pill--offline .pc-status-dot {
  box-shadow: none;
  opacity: 0.65;
}

.pc-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.5rem;
}

.pc-card-body--compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.pc-card-body--compact > .pc-details-dropdown,
.pc-card-body--compact > .pc-info-toggle,
.pc-card-body--compact > .pc-collapsible-section,
.pc-card-body--compact > .pc-card-block--assign,
.pc-card-body--compact > .pc-card-block--commands,
.pc-card-body--compact > .pc-card-block--media,
.pc-card-body--compact > .pc-maintain-history {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .pc-card-body--compact > .pc-maintain-details {
    grid-column: 1;
    grid-row: auto;
  }

  .pc-card-body--compact > .pc-destroy-details {
    grid-column: 2;
    grid-row: auto;
  }

  .pc-card-body--compact > .pc-maintain-details + .pc-destroy-details {
    grid-row: span 1;
  }
}

.pc-card-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.14);
  overflow: hidden;
  min-width: 0;
}

.pc-card-block--compact {
  background: rgba(255, 255, 255, 0.02);
}

.pc-card-block--danger {
  border-color: color-mix(in srgb, var(--danger, #dc3545) 28%, var(--border));
  background: color-mix(in srgb, var(--danger, #dc3545) 3%, rgba(0, 0, 0, 0.14));
}

.pc-card-block--status {
  background: rgba(255, 255, 255, 0.02);
}

.pc-card-block--media {
  background: rgba(0, 0, 0, 0.2);
}

.pc-card-block-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.pc-card-block-head--split {
  justify-content: space-between;
}

.pc-card-block-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pc-card-block-body {
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pc-card-block--compact > .pc-card-block-body {
  padding: 0.45rem 0.6rem;
  gap: 0.4rem;
}

.pc-card-block-body--toolbar {
  gap: 0.35rem;
}

.pc-card-block-body--flush-media {
  padding: 0;
}

.pc-inline-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.pc-card-offline-hint {
  margin: 0;
  font-size: 0.8rem;
}

.pc-card-foot,
.pc-row-delete {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--danger, #dc3545) 18%, var(--border));
  display: flex;
  justify-content: flex-end;
}

.pc-info-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pc-detail-panel--rename {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.pc-rename-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pc-info-toolbar .pc-inline-label {
  margin: 0;
}

.pc-info-toggle-btn,
.pc-section-toggle-btn,
.pc-details-toggle-btn {
  margin: 0;
  flex-shrink: 0;
}

.pc-details-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.pc-details-stack.is-hidden,
.pc-details-stack[hidden] {
  display: none !important;
}

.pc-details-block {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.pc-details-block-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pc-details-block--assign .pc-assign-form {
  margin: 0;
}

.pc-details-block--geo .pc-geo-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.45rem 0.55rem;
  align-items: end;
  margin: 0;
}

.pc-details-block--geo .pc-geo-form-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.82rem;
}

.pc-details-block--geo .pc-geo-form-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pc-details-block--maintain .pc-maintain-details,
.pc-details-block--destroy .pc-destroy-details {
  margin: 0;
  border: none;
  background: transparent;
}

.pc-details-block--maintain .pc-maintain-summary,
.pc-details-block--destroy .pc-destroy-summary {
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 720px) {
  .pc-details-block--geo .pc-geo-form {
    grid-template-columns: 1fr;
  }
}

.pc-detail-panel--scheduler-status,
.pc-detail-panel--scheduler-cmds,
.pc-detail-panel--assign,
.pc-detail-panel--info {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.pc-select-wrap {
  display: block;
  flex: 1 1 10rem;
  min-width: 0;
}

.pc-select-field,
.pc-assign-select {
  width: 100%;
  appearance: none;
  cursor: pointer;
  padding: 0.42rem 2.35rem 0.42rem 0.6rem;
  font-size: 0.84rem;
  line-height: 1.3;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background-color: var(--surface3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.pc-select-field:hover,
.pc-assign-select:hover {
  border-color: rgba(148, 163, 184, 0.65);
  background-color: rgba(255, 255, 255, 0.06);
}

.pc-select-field option,
.pc-assign-select option {
  background-color: #1a2030;
  color: #f1f5f9;
}

.pc-detail-panel--assign {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.pc-detail-panel--assign .pc-assign-form {
  margin: 0;
}

.pc-select-field:focus,
.pc-assign-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pc-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.45rem 0.65rem;
}

.pc-info-item { font-size: 0.82rem; min-width: 0; }
.pc-info-wide { grid-column: 1 / -1; }

.pc-info-label {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.1rem;
}

.pc-info-value { word-break: break-word; line-height: 1.3; }

.pc-info-truncate {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-info-detail {
  display: block;
  font-size: 0.76rem;
  margin-top: 0.15rem;
}

.pc-assign-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  width: 100%;
}

.pc-rename-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  width: 100%;
}

.pc-rename-field {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
}

.pc-rename-field input {
  width: 100%;
}

.pc-card-block--assign .pc-select-wrap {
  flex: 1 1 16rem;
}

.pc-cmd-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pc-cmd-grid--dense {
  gap: 0.28rem;
}

.pc-cmd-grid--dense .btn-sm {
  padding: 0.42rem 0.78rem;
  font-size: 0.84rem;
}

.pc-cmd-grid .pc-cmd-form { margin: 0; display: inline; }

.pc-row-form {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 0.55rem 0.75rem;
  align-items: center;
}

.pc-row-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pc-row-form select,
.pc-row-select {
  width: 100%;
  max-width: none;
  padding: 0.5rem 0.7rem;
  font-size: 0.88rem;
}

.pc-row-disabled { grid-template-columns: 5.5rem 1fr; }

.pc-row-commands {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.55rem 0.75rem;
  align-items: start;
}

.pc-row-commands .pc-cmd-buttons { grid-column: 2; }

.pc-scheduler-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pc-scheduler-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pc-scheduler-panel-status {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pc-scheduler-caption {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.pc-scheduler-actions {
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}

.pc-scheduler-actions-label {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.pc-cmd-grid--scheduler {
  gap: 0.38rem;
}

.pc-cmd-grid--scheduler .btn-sm {
  padding: 0.32rem 0.62rem;
  font-size: 0.78rem;
}

.pc-scheduler-row,
.pc-row-scheduler {
  margin-bottom: 0;
}

.pc-scheduler-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pc-scheduler-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.pc-scheduler-chip.on {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
  background: var(--success-soft);
}

.pc-scheduler-chip.off {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.pc-logon-maintain-summary {
  font-size: 0.76rem;
  line-height: 1.35;
  padding-top: 0.1rem;
}

.pc-panel-details {
  margin: 0;
}

.pc-panel-summary,
.pc-maintain-summary,
.pc-destroy-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.pc-panel-summary::-webkit-details-marker,
.pc-maintain-summary::-webkit-details-marker,
.pc-destroy-summary::-webkit-details-marker {
  display: none;
}

.pc-panel-summary:hover,
.pc-maintain-summary:hover,
.pc-destroy-summary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pc-panel-title {
  flex-shrink: 0;
  min-width: 4.5rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pc-panel-summary-meta,
.pc-maintain-summary-body,
.pc-destroy-summary-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.pc-panel-badge,
.pc-maintain-summary-count {
  flex-shrink: 0;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.pc-panel-badge--danger,
.pc-destroy-summary-count {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.32);
}

.pc-panel-summary-text,
.pc-maintain-summary-text,
.pc-destroy-summary-text {
  font-size: 0.76rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.pc-panel-details[open] .pc-maintain-summary-text,
.pc-maintain-details[open] .pc-maintain-summary-text,
.pc-panel-details[open] .pc-destroy-summary-text,
.pc-destroy-details[open] .pc-destroy-summary-text {
  display: none;
}

.pc-dropdown-trigger,
.pc-panel-chevron,
.pc-maintain-chevron,
.pc-destroy-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-shrink: 0;
  min-width: 3.4rem;
  height: 1.65rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: var(--surface3);
  color: #cbd5e1;
  transition: transform var(--transition), color var(--transition), border-color var(--transition), background var(--transition);
}

.pc-dropdown-trigger-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.pc-dropdown-trigger svg,
.pc-panel-chevron svg,
.pc-maintain-chevron svg,
.pc-destroy-chevron svg {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform var(--transition);
}

.pc-panel-summary:hover .pc-dropdown-trigger,
.pc-maintain-summary:hover .pc-dropdown-trigger,
.pc-destroy-summary:hover .pc-dropdown-trigger {
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(255, 255, 255, 0.06);
}

.pc-panel-details[open] .pc-dropdown-trigger {
  border-color: rgba(148, 163, 184, 0.55);
  color: #e2e8f0;
}

.pc-panel-details--danger[open] .pc-dropdown-trigger,
.pc-destroy-details[open] .pc-dropdown-trigger {
  border-color: color-mix(in srgb, var(--danger, #dc3545) 45%, var(--border));
  color: var(--danger, #dc3545);
}

.pc-panel-details[open] .pc-dropdown-trigger svg {
  transform: rotate(180deg);
}

.pc-panel-details[open] .pc-dropdown-trigger-label {
  font-size: 0;
}

.pc-panel-details[open] .pc-dropdown-trigger-label::before {
  content: "닫기";
  font-size: 0.68rem;
}

.pc-panel-body,
.pc-maintain-body,
.pc-destroy-body {
  padding: 0.55rem 0.65rem 0.65rem;
  border-top: 1px solid var(--border);
}

.pc-option-panel {
  display: grid;
  gap: 0.6rem;
}

.pc-option-note,
.pc-maintain-note,
.pc-destroy-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.pc-option-toolbar,
.pc-destroy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pc-option-section-title,
.pc-maintain-section-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pc-option-rows,
.pc-maintain-rows,
.pc-destroy-rows {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  gap: 0;
}

.pc-option-row,
.pc-maintain-row,
.pc-destroy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.pc-option-row:last-child,
.pc-maintain-row:last-child,
.pc-destroy-row:last-child {
  border-bottom: none;
}

.pc-option-row:hover,
.pc-maintain-row:hover,
.pc-destroy-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pc-option-row-main,
.pc-destroy-row-main {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.pc-option-row-label,
.pc-maintain-row-label,
.pc-destroy-row-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pc-option-row-desc,
.pc-destroy-row-desc {
  font-size: 0.74rem;
  line-height: 1.35;
}

.pc-option-row-check,
.pc-maintain-row-check,
.pc-destroy-row-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pc-option-switch,
.pc-maintain-row-switch,
.pc-destroy-row-switch {
  position: relative;
  width: 2.35rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--surface3);
  border: 1px solid var(--border-strong);
  transition: background var(--transition), border-color var(--transition);
}

.pc-option-switch::after,
.pc-maintain-row-switch::after,
.pc-destroy-row-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition), background var(--transition);
}

.pc-option-row-check:checked + .pc-option-switch,
.pc-maintain-row-check:checked + .pc-maintain-row-switch {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.45);
}

.pc-option-row-check:checked + .pc-option-switch::after,
.pc-maintain-row-check:checked + .pc-maintain-row-switch::after {
  transform: translateX(1.05rem);
  background: var(--accent);
}

.pc-option-row-check:checked + .pc-option-switch--danger,
.pc-destroy-row-check:checked + .pc-destroy-row-switch {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
}

.pc-option-row-check:checked + .pc-option-switch--danger::after,
.pc-destroy-row-check:checked + .pc-destroy-row-switch::after {
  transform: translateX(1.05rem);
  background: var(--danger, #dc3545);
}

.pc-option-row-check:focus-visible + .pc-option-switch,
.pc-maintain-row-check:focus-visible + .pc-maintain-row-switch,
.pc-destroy-row-check:focus-visible + .pc-destroy-row-switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pc-destroy-row--winpe-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.pc-destroy-row--winpe-disabled .pc-destroy-row-desc::after {
  content: " · 오프라인 디스크 초기화 시 비활성";
  font-size: 0.85em;
}

.pc-option-footer,
.pc-maintain-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding-top: 0.15rem;
}

.pc-maintain-form {
  display: grid;
  gap: 0.6rem;
  padding-top: 0;
}

.pc-maintain-section {
  display: grid;
  gap: 0.4rem;
}

.pc-maintain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pc-maintain-chip {
  display: inline-flex;
  cursor: pointer;
}

.pc-maintain-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pc-maintain-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.pc-maintain-chip:hover span {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.pc-maintain-chip input:checked + span {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.4);
}

.pc-maintain-chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pc-maintain-hint {
  font-size: 0.8rem;
}

.pc-maintain-details,
.pc-destroy-details {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.pc-destroy-summary {
  padding: 0.45rem 0.6rem;
}

.pc-maintain-history {
  margin: 0;
}

.pc-maintain-history.is-hidden {
  display: none;
}

.pc-maintain-history .pc-card-block-title {
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.68rem;
}

.pc-maintain-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.pc-maintain-history-item {
  font-size: 0.8rem;
  line-height: 1.35;
}

.plan-change-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
}

.plan-change-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.plan-change-list,
.plan-change-warnings {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}

.plan-change-warnings {
  color: #fbbf24;
}

.plan-change-push {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.45;
}

.plan-change-push input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.plan-change-push label {
  margin: 0;
  cursor: pointer;
  color: var(--text);
}

.pc-logon-maintain-summary {
  font-size: 0.82rem;
  margin: 0.2rem 0 0.55rem;
}

.branch-expiry-banner .flash-link,
.flash-warning .flash-link {
  margin-left: 0.65rem;
  color: inherit;
  text-decoration: underline;
}

.branch-expiry-panel {
  margin-bottom: 1rem;
}

.branch-expiry-warning {
  margin: 0;
  font-size: 0.95rem;
}

.panel-form .sub-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.form-hint {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.pending-plan-fixed {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  font-size: 0.9rem;
}

.pending-plan-name {
  font-weight: 600;
  color: #fff;
}

.pending-plan-desc,
.pending-plan-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.branch-main-pc-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* ── 메인 PC 온보딩 (매장) ───────────────────────────────────── */
.onboarding {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.onboarding-hero {
  padding: 0.25rem 0 0.5rem;
}

.onboarding-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.onboarding-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.onboarding-branch-chip {
  font-size: 0.88rem;
  color: var(--muted);
}

.onboarding-branch-chip code {
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.82rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.onboarding-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.onboarding-lead {
  margin: 0;
  max-width: 42rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}

.onboarding-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.onboarding-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1.1rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), background var(--transition);
}

.onboarding-step-body {
  width: 100%;
  min-width: 0;
}

.onboarding-step strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.onboarding-step-body > span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

.onboarding-step-num {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--surface2);
  border: 2px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.onboarding-step.is-active {
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), var(--surface));
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.onboarding-step.is-active .onboarding-step-num {
  color: #fff;
  background: var(--accent);
  border-color: transparent;
}

.onboarding-step.is-active strong { color: #fff; }

.onboarding-step.is-done {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

.onboarding-step.is-done .onboarding-step-num {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(52, 211, 153, 0.35);
}

.onboarding-panel {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.onboarding-panel--wait {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.08), var(--surface));
}

.onboarding-panel--code {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.08), var(--surface));
  margin-bottom: 1rem;
}

.onboarding-panel--compact {
  padding: 1.1rem 1.25rem;
}

.onboarding-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.onboarding-panel-desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.onboarding-wait-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.onboarding-wait-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid rgba(251, 191, 36, 0.35);
  animation: onboarding-pulse 2.4s ease-in-out infinite;
}

.onboarding-wait-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

@keyframes onboarding-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
}

.onboarding-count-badge {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.onboarding-pc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.onboarding-pc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.onboarding-pc-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}

.onboarding-pc-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.onboarding-pc-info {
  flex: 1;
  min-width: 0;
}

.onboarding-pc-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.onboarding-pc-sub {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.onboarding-pc-meta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.onboarding-pc-meta-sep { opacity: 0.5; }

.onboarding-pc-badge { flex-shrink: 0; }

.onboarding-tips {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
}

.onboarding-tips-title {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.onboarding-tips ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.onboarding-tips li + li { margin-top: 0.35rem; }

.onboarding-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 1.25rem;
  align-items: start;
}

.onboarding-grid-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.onboarding-grid-side .onboarding-panel {
  margin: 0;
}

.onboarding-grid-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.onboarding-howto {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.onboarding-howto li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.onboarding-howto-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #4f46e5);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.onboarding-howto strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}

.onboarding-howto p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

.onboarding-action-form { margin: 0; }

.onboarding-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.onboarding-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.onboarding-code-warn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--warning);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--warning-soft);
}

.onboarding-key-display {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 1.5rem;
}

.onboarding-store-code {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.85rem 1rem;
  text-align: center;
  border-radius: var(--radius-sm);
  color: var(--cyan);
  background: var(--surface2);
  border: 1px solid var(--border-strong);
}

.onboarding-key-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.onboarding-key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.onboarding-key-row:last-child { border-bottom: none; }

.onboarding-key-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.onboarding-key-date {
  grid-column: 1 / -1;
  font-size: 0.78rem;
}

.quick-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pc-screenshot,
.pc-monitor {
  margin: 0;
  padding: 0;
  border: none;
}

.pc-screenshot-head,
.pc-monitor-head {
  display: none;
}

.pc-screenshot-label,
.pc-monitor-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pc-screenshot-close-form { margin: 0; }

.pc-info-toggle {
  margin: 0;
}

.pc-detail-panel.is-hidden {
  display: none !important;
}

.pc-screenshot-link,
.pc-screenshot a {
  display: block;
}

.pc-delete-form {
  margin: 0;
}

.btn-ghost-danger {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  background: transparent;
}

.btn-ghost-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.btn-ghost-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pc-screenshot img,
.pc-screenshot-link img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: #000;
}

.pc-monitor {
  margin: 0;
  padding: 0;
  border: none;
}

.pc-monitor-close-form { margin: 0; }

.pc-monitor-body {
  position: relative;
  min-height: 180px;
  background: #000;
  border-radius: 0;
  overflow: hidden;
}

.pc-monitor-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pc-monitor-stream {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

.pc-monitor-stream.is-hidden {
  display: none !important;
}

.pc-monitor-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 10rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.pc-monitor-error.is-hidden {
  display: none !important;
}

.pc-monitor-error-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--muted);
  opacity: 0.85;
}

.pc-monitor-error-icon svg {
  width: 100%;
  height: 100%;
}

.pc-monitor-error-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.pc-monitor-error-detail {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 22rem;
}

.pc-empty { text-align: center; padding: 3rem 1rem; }

/* ── Responsive (tablet: horizontal nav, not phone drawer) ───── */
@media (min-width: 769px) and (max-width: 960px) {
  .layout { flex-direction: column; }

  .pc-split-layout {
    grid-template-columns: 1fr;
  }

  .pc-branch-sidebar,
  .pc-category-sidebar {
    position: static;
    max-height: 280px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 1rem;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .nav a {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }

  .nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }

  .sidebar-footer {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
  }

  .sidebar-user-panel {
    padding: 0.65rem;
  }

  .user-card {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
  }

  .main { padding: 1.25rem 1rem 2rem; }

  .page-title { font-size: 1.4rem; }

  .panel-grid { grid-template-columns: 1fr; }

  .registration-keys-form {
    grid-template-columns: 1fr;
  }

  .registration-keys-form-actions .btn { width: 100%; }
  .pending-fields--main,
  .pending-fields--single { grid-template-columns: 1fr; }

  .pending-bulk-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pending-bulk-toolbar-actions { justify-content: flex-end; }

  .pending-footer { justify-content: stretch; }

  .pending-footer .btn { flex: 1; }

  .onboarding-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onboarding-grid { grid-template-columns: 1fr; }
  .onboarding-wait-head { flex-wrap: wrap; }
  .onboarding-count-badge { margin-left: 0; }

  .pc-card-body--compact {
    grid-template-columns: 1fr;
  }

  .pc-card-body--compact > .pc-maintain-details,
  .pc-card-body--compact > .pc-destroy-details {
    grid-column: 1;
  }

  .pc-assign-form {
    flex-direction: column;
    align-items: stretch;
  }

  .pc-assign-form .btn {
    align-self: flex-end;
  }

  .pc-panel-summary,
  .pc-maintain-summary,
  .pc-destroy-summary {
    flex-wrap: wrap;
  }

  .pc-panel-title {
    min-width: 100%;
    margin-bottom: -0.05rem;
  }

  .pc-dropdown-trigger {
    margin-left: auto;
  }

  .pc-category-nav { gap: 0.4rem; }

  .pc-category-item {
    min-width: calc(50% - 0.4rem);
    flex: 1 1 calc(50% - 0.4rem);
  }

  .pc-info-grid { grid-template-columns: 1fr 1fr; }

  .pc-panel-summary-text,
  .pc-maintain-summary-text,
  .pc-destroy-summary-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
  .auth-card { padding: 1.75rem 1.35rem; }
}

/* ── Public landing (ProtectSwitch) ──────────────────────────── */
html.landing-doc {
  scroll-padding-top: 5.25rem;
}

.landing-body { overflow-x: hidden; }

.landing-section-head[id] {
  scroll-margin-top: 5.25rem;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.landing-logo:hover { color: #fff; }

.landing-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.landing-logo-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.landing-nav a:not(.btn) {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.landing-nav a:not(.btn):hover { color: #fff; }

.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

.landing-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 1rem;
}

.landing-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: #fff;
}

.landing-gradient {
  background: linear-gradient(135deg, #a5b4fc 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 34rem;
  margin: 0 0 1.25rem;
  line-height: 1.75;
}

.landing-hero-points {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 34rem;
}

.landing-hero-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.landing-hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.landing-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.landing-orbit {
  position: relative;
  width: 300px;
  height: 300px;
}

.landing-orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px var(--accent-glow);
  animation: landing-pulse 3s ease-in-out infinite;
}

.landing-orbit-core svg {
  width: 40px;
  height: 40px;
  color: #fff;
}

@keyframes landing-pulse {
  0%, 100% { box-shadow: 0 0 40px var(--accent-glow); }
  50% { box-shadow: 0 0 80px rgba(99, 102, 241, 0.55); }
}

.landing-orbit-node {
  position: absolute;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  animation: landing-float 4s ease-in-out infinite;
}

.landing-orbit-node.n1 { top: 8%; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.landing-orbit-node.n2 { bottom: 12%; left: 8%; animation-delay: 0.5s; }
.landing-orbit-node.n3 { top: 22%; right: 0; animation-delay: 1s; }
@keyframes landing-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.landing-orbit-node.n1 { animation-name: landing-float-center; }
@keyframes landing-float-center {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.landing-section {
  padding: 3.5rem 2rem;
}

.landing-section-inner {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.landing-section-alt {
  background: rgba(16, 22, 32, 0.45);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.landing-section-head {
  margin-bottom: 2rem;
}

.landing-section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: #fff;
}

.landing-section-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 40rem;
}

.landing-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.landing-overview-card {
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.landing-overview-card-accent {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), var(--surface));
}

.landing-overview-card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.landing-overview-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.landing-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  transition: border-color var(--transition), transform var(--transition);
}

.landing-feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.landing-feature h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.55rem;
  color: #fff;
}

.landing-feature p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

.landing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.landing-steps li {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.15rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
}

.landing-step-num {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  line-height: 1;
}

.landing-step-body {
  min-width: 0;
}

.landing-steps h3 {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.landing-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.landing-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.landing-trust-item {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.landing-trust-item h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.landing-trust-item p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

.landing-footer {
  /* legacy alias — use .app-footer */
  text-align: initial;
  padding: 0;
  border-top: none;
}

.landing-footer p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.landing-footer-legal a {
  color: var(--cyan);
  font-weight: 600;
}

.landing-footer-legal span {
  margin: 0 0.35rem;
  color: var(--muted);
}

.landing-footer-brand {
  font-weight: 700;
  color: var(--text-secondary) !important;
}

.public-footer {
  margin-top: 0;
}

@media (max-width: 960px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .landing-hero-visual { order: -1; min-height: 240px; }

  .landing-orbit { width: 260px; height: 260px; }

  .landing-features { grid-template-columns: repeat(2, 1fr); }

  .landing-overview { grid-template-columns: 1fr; }

  .landing-trust-grid { grid-template-columns: 1fr; }

  .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .landing-nav a:not(.btn):not(.btn-sm) { display: none; }
}

@media (max-width: 560px) {
  .landing-header { padding: 1rem; }

  .landing-hero,
  .landing-section { padding-left: 1rem; padding-right: 1rem; }

  .landing-features { grid-template-columns: 1fr; }

  .landing-steps { grid-template-columns: 1fr; }
}

/* ── Branch dashboard ─────────────────────────────────────────── */
.branch-dash-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.branch-dash-plan {
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 600;
}

.branch-dash-code {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--cyan);
}

.branch-dash-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.branch-dash-expiry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.branch-dash-expiry--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), var(--surface2));
}

.branch-dash-expiry-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.branch-dash-expiry-body strong:first-child {
  color: #fff;
  font-weight: 700;
}

.branch-dash-stats {
  margin-bottom: 1.25rem;
}

.branch-dash-stat-sub,
.branch-dash-stat-link {
  font-size: 0.78rem;
  margin-top: 0.35rem;
  color: var(--muted);
}

.branch-dash-stat-link {
  color: var(--cyan);
  font-weight: 600;
}

.branch-dash-stat-link:hover {
  color: #67e8f9;
}

.branch-dash-stat--alert {
  border-color: rgba(251, 191, 36, 0.28);
}

.branch-dash-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 1rem;
  align-items: start;
}

.branch-dash-pc-panel,
.branch-dash-quick-panel,
.branch-dash-connect-panel {
  margin-bottom: 0;
}

.branch-dash-aside {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.branch-dash-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.branch-dash-section-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.branch-dash-section-meta {
  font-size: 0.82rem;
}

.branch-dash-section-head .btn {
  margin-left: auto;
}

.branch-dash-pc-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.branch-dash-pc-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background var(--transition);
}

.branch-dash-pc-row:not(.is-static):hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.08);
}

.branch-dash-pc-row.is-live {
  border-color: rgba(52, 211, 153, 0.22);
}

.branch-dash-pc-row.is-static {
  cursor: default;
}

.branch-dash-pc-row--more {
  justify-content: center;
  font-size: 0.85rem;
  border-style: dashed;
  background: transparent;
}

.branch-dash-pc-row-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
}

.branch-dash-pc-row.is-live .branch-dash-pc-row-icon {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.25);
  background: var(--success-soft);
}

.branch-dash-pc-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.branch-dash-pc-row-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-dash-pc-row-meta {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-ghost-muted {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.branch-dash-empty-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.branch-dash-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.branch-dash-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}

.branch-dash-quick-tile:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--accent-soft);
  color: #fff;
}

.branch-dash-quick-tile.is-alert {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.06);
}

.branch-dash-quick-icon {
  color: #a5b4fc;
}

.branch-dash-quick-tile.is-alert .branch-dash-quick-icon {
  color: var(--warning);
}

.branch-dash-connect-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--surface3);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.branch-dash-connect-online {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--success), #22d3ee);
  min-width: 0;
  transition: width 0.35s ease;
}

.branch-dash-connect-label {
  font-size: 0.82rem;
  margin: 0;
}

.branch-dash-connect-label strong {
  color: #fff;
}

@media (max-width: 960px) {
  .branch-dash-body {
    grid-template-columns: 1fr;
  }

  .branch-dash-aside {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
  }
}

@media (max-width: 640px) {
  .branch-dash-header-actions {
    width: 100%;
  }

  .branch-dash-header-actions .btn {
    flex: 1;
  }

  .branch-dash-aside {
    grid-template-columns: 1fr;
  }

  .branch-dash-pc-row {
    flex-wrap: wrap;
  }

  .branch-dash-pc-row .badge {
    margin-left: auto;
  }
}

/* ── Admin dashboard ──────────────────────────────────────────── */
.admin-dash-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-dash-expiry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.admin-dash-expiry-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--warning);
  margin-right: 0.25rem;
}

.admin-dash-expiry-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-secondary);
}

.admin-dash-expiry-chip:hover {
  border-color: var(--warning);
  color: #fff;
}

.admin-dash-stats {
  margin-bottom: 1.25rem;
}

.admin-dash-stat-sub,
.admin-dash-stat-link {
  font-size: 0.78rem;
  margin-top: 0.35rem;
  color: var(--muted);
}

.admin-dash-stat-link {
  color: var(--cyan);
  font-weight: 600;
}

.admin-dash-stat-link:hover {
  color: #67e8f9;
}

.admin-dash-stat--alert {
  border-color: rgba(251, 113, 113, 0.28);
}

.admin-dash-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
  gap: 1rem;
  align-items: start;
}

.admin-dash-branches-panel {
  grid-column: 1;
  grid-row: 1 / -1;
}

.admin-dash-aside {
  grid-column: 2;
  grid-row: 1;
}

.admin-dash-connect-panel {
  grid-column: 2;
  grid-row: 2;
}

.admin-dash-expiry-panel {
  grid-column: 2;
  grid-row: 3;
}

.admin-dash-branches-panel,
.admin-dash-quick-panel,
.admin-dash-connect-panel,
.admin-dash-expiry-panel,
.admin-dash-plan-panel {
  margin-bottom: 0;
}

.admin-dash-aside {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.admin-dash-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-dash-section-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.admin-dash-section-meta {
  font-size: 0.82rem;
}

.admin-dash-section-head .btn {
  margin-left: auto;
}

.admin-dash-branch-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-dash-branch-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.admin-dash-branch-row.is-expiring {
  border-color: rgba(251, 191, 36, 0.35);
}

.admin-dash-branch-row.is-expired {
  border-color: rgba(248, 113, 113, 0.3);
  opacity: 0.92;
}

.admin-dash-branch-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.admin-dash-branch-main:hover .admin-dash-branch-name {
  color: var(--cyan);
}

.admin-dash-branch-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #a5b4fc;
}

.admin-dash-branch-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.admin-dash-branch-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.3;
}

.admin-dash-branch-meta {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-dash-branch-meta code {
  font-size: 0.72rem;
  color: var(--cyan);
  background: transparent;
  border: none;
  padding: 0;
}

.admin-dash-branch-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.admin-dash-branch-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.admin-dash-empty-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.admin-dash-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.admin-dash-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}

.admin-dash-quick-tile:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--accent-soft);
  color: #fff;
}

.admin-dash-quick-tile.is-alert {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.06);
}

.admin-dash-quick-icon {
  color: #a5b4fc;
}

.admin-dash-quick-tile.is-alert .admin-dash-quick-icon {
  color: var(--warning);
}

.admin-dash-connect-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--surface3);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.admin-dash-connect-online {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--success), #22d3ee);
  min-width: 0;
  transition: width 0.35s ease;
}

.admin-dash-connect-label {
  font-size: 0.82rem;
  margin: 0;
}

.admin-dash-connect-label strong {
  color: #fff;
}

.admin-dash-expiry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-dash-expiry-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.admin-dash-expiry-list a:hover {
  color: #fff;
}

.admin-dash-expiry-list strong {
  color: var(--warning);
}

.admin-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.admin-dash-search-wrap {
  flex: 1 1 160px;
  min-width: 0;
}

.admin-dash-search {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}

.admin-dash-search:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.55);
}

.admin-dash-select {
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-secondary);
}

.admin-dash-empty-filter {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.admin-dash-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  min-width: 0;
}

.admin-dash-signals--ok {
  opacity: 0.75;
}

.admin-dash-signal {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.admin-dash-signal--expired {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.35);
}

.admin-dash-signal--expiring {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.admin-dash-signal--inactive {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.3);
}

.admin-dash-signal--pending {
  color: #fbcfe8;
  background: rgba(244, 114, 182, 0.12);
  border-color: rgba(244, 114, 182, 0.35);
}

.admin-dash-signal--offline,
.admin-dash-signal--main_off {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.admin-dash-signal--no_main {
  color: #fdba74;
  background: rgba(251, 146, 60, 0.1);
  border-color: rgba(251, 146, 60, 0.3);
}

.admin-dash-signal--ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.admin-dash-plan-panel h2 {
  margin-bottom: 0.25rem;
}

.admin-dash-plan-summary {
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
}

.admin-dash-plan-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.admin-dash-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.admin-dash-plan-label {
  font-weight: 600;
}

.admin-dash-plan-label--basic {
  color: #94a3b8;
}

.admin-dash-plan-label--standard {
  color: #7dd3fc;
}

.admin-dash-plan-label--premium {
  color: #c4b5fd;
}

.admin-dash-plan-count {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.admin-dash-plan-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--surface3);
  overflow: hidden;
}

.admin-dash-plan-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  min-width: 0;
  transition: width 0.35s ease;
}

.admin-dash-plan-fill--basic {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

.admin-dash-plan-fill--standard {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.admin-dash-plan-fill--premium {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.admin-dash-plan-chip {
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-dash-plan-chip--basic {
  color: #94a3b8;
}

.admin-dash-plan-chip--standard {
  color: #7dd3fc;
}

.admin-dash-plan-chip--premium {
  color: #c4b5fd;
}

.admin-dash-pending-btn {
  color: #f9a8d4;
}

.admin-dash-branch-row.has-signals {
  border-color: rgba(251, 191, 36, 0.12);
}

@media (max-width: 720px) {
  .admin-dash-branch-row {
    flex-wrap: wrap;
  }

  .admin-dash-signals {
    order: 3;
    width: 100%;
    padding-left: 2.75rem;
  }

  .admin-dash-branch-actions {
    order: 2;
  }
}

@media (max-width: 960px) {
  .admin-dash-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .admin-dash-body > .panel,
  .admin-dash-body > .admin-dash-aside {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
  }

  .admin-dash-branches-panel {
    order: 1;
    grid-column: unset;
    grid-row: unset;
  }

  .admin-dash-connect-panel {
    order: 2;
    grid-column: unset;
    grid-row: unset;
  }

  .admin-dash-aside {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    grid-column: unset;
    grid-row: unset;
  }

  .admin-dash-expiry-panel {
    order: 4;
    grid-column: unset;
    grid-row: unset;
  }

  .admin-dash-aside > .panel,
  .admin-dash-aside > .apk-email-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Native app WebView often reports width > 960px — stack dashboard regardless */
body.ps-mobile-app .admin-dash-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body.ps-mobile-app .admin-dash-body > .panel,
body.ps-mobile-app .admin-dash-body > .admin-dash-aside {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

body.ps-mobile-app .admin-dash-branches-panel {
  order: 1;
  grid-column: unset;
  grid-row: unset;
}

body.ps-mobile-app .admin-dash-connect-panel {
  order: 2;
  grid-column: unset;
  grid-row: unset;
}

body.ps-mobile-app .admin-dash-aside {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  grid-column: unset;
  grid-row: unset;
}

body.ps-mobile-app .admin-dash-expiry-panel {
  order: 4;
  grid-column: unset;
  grid-row: unset;
}

body.ps-mobile-app .admin-dash-aside > .panel,
body.ps-mobile-app .admin-dash-aside > .apk-email-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* App shell — WebView may report width > 768px; do not rely on viewport media alone */
body.ps-mobile-app .mobile-nav-toggle {
  display: inline-flex;
}

body.ps-mobile-app .layout {
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

body.ps-mobile-app .sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(280px, 88vw);
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  transform: translateX(-105%);
  transition: transform 0.22s ease;
  overflow-y: auto;
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  box-shadow: var(--shadow);
}

body.ps-mobile-app.sidebar-open .sidebar {
  transform: translateX(0);
}

body.ps-mobile-app .main {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-top: calc(3.75rem + env(safe-area-inset-top, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: 2rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

body.ps-mobile-app .cards,
body.ps-mobile-app .admin-dash-stats {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .admin-dash-branch-row {
    flex-wrap: wrap;
  }

  .admin-dash-branch-badges {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .admin-dash-branch-actions {
    margin-left: auto;
  }

  .admin-dash-header-actions {
    width: 100%;
  }

  .admin-dash-header-actions .btn {
    flex: 1;
  }
}

/* PC 명령 비동기 피드백 — 앱 다크 테마와 통일 */
.pc-cmd-toast-root {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.pc-cmd-toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: auto;
}

.pc-cmd-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pc-cmd-toast-success {
  border-color: rgba(52, 211, 153, 0.4);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), var(--surface-solid));
  color: var(--success);
}

.pc-cmd-toast-info {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), var(--surface-solid));
  color: #c7d2fe;
}

.pc-cmd-toast-error {
  border-color: rgba(248, 113, 113, 0.45);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), var(--surface-solid));
  color: var(--danger);
}

/* ── 결과 모달 ─────────────────────────────────────────────── */
.pc-cmd-modal[hidden] { display: none !important; }

.pc-cmd-modal {
  position: fixed;
  inset: 0;
  z-index: 12010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.pc-cmd-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(8px);
}

.pc-cmd-modal-panel {
  position: relative;
  width: min(32rem, 100%);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.pc-cmd-modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.pc-cmd-modal-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text-secondary);
}

.pc-cmd-modal-icon--success {
  background: var(--success-soft);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--success);
}

.pc-cmd-modal-icon--success::before { content: "✓"; }

.pc-cmd-modal-icon--warning {
  background: var(--warning-soft);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--warning);
}

.pc-cmd-modal-icon--warning::before { content: "!"; }

.pc-cmd-modal-icon--error {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.pc-cmd-modal-icon--error::before { content: "×"; }

.pc-cmd-modal-icon--info {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.pc-cmd-modal-icon--info::before { content: "i"; font-style: italic; }

.pc-cmd-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.pc-cmd-modal-body {
  padding: 1rem 1.35rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.pc-cmd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem 1.15rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

body.pc-cmd-modal-open { overflow: hidden; }

.ps-dialog-body {
  white-space: pre-line;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ps-dialog-field {
  margin-top: 0.85rem;
}

.ps-dialog-input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: #fff;
  font: inherit;
}

.ps-dialog-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

@media (max-width: 768px) {
  .ps-dialog .pc-cmd-modal-panel {
    width: min(22rem, calc(100% - 1.5rem));
    margin: auto;
  }

  .ps-dialog-actions {
    flex-direction: column-reverse;
    gap: 0.55rem;
  }

  .ps-dialog-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

body.ps-mobile-app .ps-dialog .pc-cmd-modal-panel {
  width: min(22rem, calc(100% - 1.5rem));
}

body.ps-mobile-app .ps-dialog-actions {
  flex-direction: column-reverse;
  gap: 0.55rem;
  padding-bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
}

body.ps-mobile-app .ps-dialog-actions .btn {
  width: 100%;
  justify-content: center;
}

.pc-cmd-modal-summary {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.pc-cmd-modal-summary-count {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.pc-cmd-modal-summary-label {
  font-size: 0.88rem;
  color: var(--muted);
}

.pc-cmd-result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  overflow: hidden;
}

.pc-cmd-result-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.pc-cmd-result-pc {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.pc-cmd-result-detail {
  padding: 0.85rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  word-break: break-word;
}

.pc-cmd-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pc-cmd-result-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  overflow: hidden;
}

.pc-cmd-result-item--ok { border-color: rgba(52, 211, 153, 0.22); }
.pc-cmd-result-item--fail { border-color: rgba(248, 113, 113, 0.28); }

/* ── 사이트 정보 추출 결과 모달 ─────────────────────────────── */
.pc-cmd-modal--chrome-extract .pc-cmd-modal-panel,
.pc-cmd-modal-panel--chrome-extract {
  max-width: min(760px, 96vw);
}

.pc-cmd-chrome-extract-card {
  overflow: hidden;
}

.pc-cmd-chrome-extract-pre {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  max-height: min(52vh, 440px);
  overflow: auto;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.pc-cmd-chrome-extract-list .pc-cmd-result-item {
  padding: 0;
  background: transparent;
  border: none;
}

.pc-cmd-chrome-extract-list .pc-cmd-chrome-extract-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
}

/* ── 폭파 결과 모달 ─────────────────────────────────────────── */
.pc-cmd-modal--destroy .pc-cmd-modal-panel,
.pc-cmd-modal-panel--destroy {
  width: min(44rem, 100%);
  max-height: min(92vh, 760px);
}

.pc-cmd-destroy-result {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pc-cmd-destroy-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), var(--surface2));
}

.pc-cmd-destroy-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.pc-cmd-destroy-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
}

.pc-cmd-destroy-stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.pc-cmd-destroy-stat-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.pc-cmd-destroy-stat--ok .pc-cmd-destroy-stat-num { color: var(--success); }
.pc-cmd-destroy-stat--fail .pc-cmd-destroy-stat-num { color: var(--danger); }
.pc-cmd-destroy-stat--total .pc-cmd-destroy-stat-num { color: #fff; }

.pc-cmd-destroy-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pc-cmd-destroy-filter-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pc-cmd-destroy-filter-btn:hover {
  border-color: rgba(99, 102, 241, 0.45);
  color: #e2e8f0;
}

.pc-cmd-destroy-filter-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}

.pc-cmd-destroy-stage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.pc-cmd-destroy-stage-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  padding: 0.55rem 0.65rem;
}

.pc-cmd-destroy-stage-row--done {
  border-color: rgba(52, 211, 153, 0.2);
}

.pc-cmd-destroy-stage-row--fail {
  border-color: rgba(248, 113, 113, 0.32);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.06), var(--surface2));
}

.pc-cmd-destroy-stage-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pc-cmd-destroy-stage-label {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.pc-cmd-destroy-stage-detail {
  margin: 0.45rem 0 0 1.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.18);
  font-size: 0.76rem;
  line-height: 1.5;
  color: #fca5a5;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pc-cmd-destroy-fallback {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-secondary);
  word-break: break-word;
}

.pc-cmd-destroy-result-multi {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pc-cmd-destroy-multi-summary {
  margin-bottom: 0.25rem;
}

/* ── 진행 상태 패널 ─────────────────────────────────────────── */
.pc-cmd-progress {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 12005;
  max-width: 28rem;
  margin: 0 auto;
  pointer-events: none;
}

.pc-cmd-progress[hidden] { display: none !important; }

.pc-cmd-progress-panel {
  pointer-events: auto;
  background: var(--surface-solid);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glow);
  overflow: hidden;
}

.pc-cmd-progress-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem 0.75rem;
}

.pc-cmd-progress-leading {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.pc-cmd-progress-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pc-cmd-progress-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.pc-cmd-progress-meta {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.pc-cmd-progress-bar-track {
  height: 3px;
  background: var(--surface3);
  margin: 0 1.1rem;
}

.pc-cmd-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border-radius: 99px;
  transition: width 0.35s ease;
}

.pc-cmd-progress-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.1rem 0.75rem;
}

.pc-cmd-progress-alerts[hidden] {
  display: none !important;
}

.pc-cmd-progress-alert {
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  border: 1px solid transparent;
}

.pc-cmd-progress-alert--disconnect {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--text);
}

.pc-cmd-progress-alert-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #fbbf24;
}

.pc-cmd-progress-alert-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.pc-cmd-destroy-disconnect-notice {
  margin: 0.75rem 0 0.5rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.pc-cmd-destroy-disconnect-notice strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fbbf24;
  font-size: 0.84rem;
}

.pc-cmd-destroy-disconnect-notice p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.pc-cmd-progress-list {
  list-style: none;
  margin: 0;
  padding: 0.65rem 1.1rem 0.85rem;
  max-height: 11rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pc-cmd-progress-item {
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.pc-cmd-progress-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.pc-cmd-progress-pc {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-cmd-progress-detail {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.pc-cmd-progress-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(99, 102, 241, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pc-cmd-spin 0.75s linear infinite;
}

.pc-cmd-progress-spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.pc-cmd-progress--destroy .pc-cmd-progress-list {
  max-height: 20rem;
}

.pc-cmd-progress-group {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
}

.pc-cmd-progress-group-title {
  display: block;
  padding: 0.2rem 0.65rem 0.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.pc-cmd-progress-stage .pc-cmd-progress-item-head {
  gap: 0.5rem;
  align-items: flex-start;
}

.pc-cmd-progress-stage-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pc-cmd-progress-stage .pc-cmd-progress-pc {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.pc-cmd-progress-stage .pc-cmd-progress-detail {
  margin: 0;
}

.pc-cmd-progress-stage-done .pc-cmd-progress-detail {
  color: var(--muted);
}

.pc-cmd-progress-stage-running .pc-cmd-progress-detail {
  color: var(--text);
  opacity: 0.88;
}

.pc-cmd-progress-stage-fail .pc-cmd-progress-detail {
  color: #fca5a5;
}

.pc-cmd-progress-stage .pc-cmd-status-chip {
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.pc-cmd-stage-icon {
  flex-shrink: 0;
  width: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1;
}

.pc-cmd-stage-icon--done {
  color: #34d399;
  font-weight: 800;
}

.pc-cmd-stage-icon--fail {
  color: #f87171;
  font-weight: 800;
}

.pc-cmd-stage-icon--wait {
  color: var(--muted);
  opacity: 0.65;
}

.pc-cmd-progress-stage-running {
  border-color: rgba(99, 102, 241, 0.28);
}

.pc-cmd-progress-stage-done {
  border-color: rgba(52, 211, 153, 0.22);
}

.pc-cmd-progress-stage-fail {
  border-color: rgba(248, 113, 113, 0.28);
}

@keyframes pc-cmd-spin {
  to { transform: rotate(360deg); }
}

.pc-cmd-status-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
}

.pc-cmd-status-chip--active {
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.pc-cmd-status-chip--done {
  background: var(--success-soft);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--success);
}

.pc-cmd-status-chip--fail {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.pc-cmd-status-chip--neutral {
  background: var(--surface3);
  border-color: var(--border);
  color: var(--muted);
}

.pc-cmd-progress-polling .pc-cmd-progress-pc,
.pc-cmd-progress-sent .pc-cmd-progress-pc {
  color: #e2e8f0;
}

.pc-cmd-progress-done {
  border-color: rgba(52, 211, 153, 0.2);
}

.pc-cmd-progress-fail,
.pc-cmd-progress-timeout {
  border-color: rgba(248, 113, 113, 0.25);
}

@media (max-width: 640px) {
  .pc-cmd-progress {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .pc-cmd-modal-panel {
    width: 100%;
    max-height: 90vh;
  }

  .pc-cmd-toast-root {
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
  }
}

/* ── App page UX (non-dashboard shared) ───────────────────────── */
.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.app-page-header {
  align-items: flex-start;
}

.panel-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.panel-section-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.panel-section-meta {
  font-size: 0.78rem;
}

.panel-section-actions {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
}

.panel-desc {
  margin: -0.35rem 0 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

.app-form-panel {
  max-width: 520px;
}

.app-form-panel-wide {
  max-width: 640px;
}

.app-form-panel form {
  display: flex;
  flex-direction: column;
}

.app-form-panel .form-actions {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.app-form-panel .form-actions .btn {
  width: 100%;
}

.panel-grid .panel-form.app-form-panel,
.panel-grid .panel-form-wide.app-form-panel {
  max-width: none;
  width: 100%;
}

.app-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.85rem;
}

.app-search-wrap {
  flex: 1 1 180px;
  min-width: 0;
}

.app-search {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}

.app-search:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.55);
}

.app-table-count {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.table-wrap table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}

.table-wrap table.data-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.table-wrap table.data-table tbody tr:hover td {
  background: rgba(99, 102, 241, 0.06);
}

.table-wrap table.data-table td.actions,
.table-wrap table.data-table th.actions-col {
  text-align: right;
  white-space: nowrap;
}

.app-empty-panel {
  margin-bottom: 1.25rem;
}

.app-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.25rem;
}

.app-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #a5b4fc;
  margin-bottom: 0.85rem;
}

.app-empty-icon svg {
  width: 24px;
  height: 24px;
}

.app-empty-title {
  margin: 0;
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.app-empty-hint {
  margin: 0.45rem 0 0;
  max-width: 28rem;
  line-height: 1.55;
}

.app-empty-actions {
  margin-top: 1rem;
}

.app-info-banner {
  margin-bottom: 1rem;
}

.app-info-banner .panel-highlight {
  margin-bottom: 0;
}

.app-danger-panel {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.06), var(--surface));
}

.app-danger-panel .panel-section-head {
  border-bottom-color: rgba(248, 113, 113, 0.2);
}

.app-danger-panel .panel-section-head h2 {
  color: #fecaca;
}

.app-detail-cards .card .card-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.app-detail-cards .card .card-value {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.35rem;
  color: #fff;
}

.app-pc-page-header .page-desc code {
  font-size: 0.88em;
  color: var(--cyan);
  background: transparent;
  border: none;
  padding: 0;
}

.pc-toolbar.app-toolbar-panel {
  border-color: rgba(99, 102, 241, 0.2);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), var(--surface));
}

.audit-filter-panel .audit-filter-form {
  margin: 0;
}

.audit-filter-panel .audit-filter-form select {
  min-width: 14rem;
}

.auth-page {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.18), transparent),
    var(--bg);
}

.auth-card {
  border-color: rgba(129, 140, 248, 0.22);
}

.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  border-color: rgba(129, 140, 248, 0.55);
}

.error-page {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.error-code {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  background: linear-gradient(135deg, #a5b4fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-page p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.legal-doc-panel {
  max-width: 52rem;
  line-height: 1.75;
}

.legal-doc-panel h2 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.65rem;
  color: #fff;
}

.legal-doc-panel h2:first-child {
  margin-top: 0;
}

.legal-doc-panel p,
.legal-doc-panel li {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .registration-keys-form {
    grid-template-columns: 1fr;
  }
}

/* ── Public legal pages (no app sidebar) ─────────────────────── */
html.public-doc {
  scroll-padding-top: 5.25rem;
}

.public-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.public-main {
  min-height: calc(100vh - 12rem);
}

.public-header .public-nav a.is-active {
  color: #fff;
}

.public-footer {
  margin-top: 0;
}

.legal-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.legal-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.legal-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.65rem;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
}

.legal-hero-desc {
  margin: 0.75rem 0 0;
  max-width: 40rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  color: var(--muted);
}

.legal-meta-item strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 5.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(16, 22, 32, 0.72);
  backdrop-filter: blur(12px);
}

.legal-toc-title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.legal-toc a {
  display: block;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.45;
  transition: background var(--transition), color var(--transition);
}

.legal-toc a:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.12);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legal-section {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.legal-section[id] {
  scroll-margin-top: 5.5rem;
}

.legal-section-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.legal-section-num {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #a5b4fc;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.legal-section h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.legal-section p {
  margin: 0 0 0.75rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.legal-section li + li {
  margin-top: 0.35rem;
}

.legal-section li strong {
  color: var(--text);
}

.legal-section a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}

.legal-section a:hover {
  color: #fff;
  text-decoration: underline;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.legal-table th,
.legal-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-table td {
  color: var(--text-secondary);
}

.legal-callout {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
  font-size: 0.88rem;
  color: #a5f3fc;
  line-height: 1.65;
}

.legal-callout-warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.25rem;
  }
}

@media (max-width: 640px) {
  .legal-page {
    padding: 1.5rem 1rem 3rem;
  }

  .legal-section {
    padding: 1.1rem 1rem;
  }

  .public-header {
    padding: 0.85rem 1rem;
  }

  .public-nav a:not(.btn) {
    font-size: 0.82rem;
  }
}

/* ── Agent release (admin) ───────────────────────────────────── */
.agent-release-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.agent-release-body--single {
  grid-template-columns: 1fr;
}

.agent-release-body--equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-release-body > .panel {
  margin-bottom: 0;
  min-width: 0;
}

.agent-release-version-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.agent-release-version-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.agent-release-version-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.85rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.15);
  border-right: 1px solid var(--border);
}

.agent-release-version-input input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.72rem 0.9rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.agent-release-version-input input:focus {
  outline: none;
  box-shadow: none;
}

.agent-release-dropzone {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.08), transparent 70%),
    var(--surface2);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.agent-release-dropzone:hover,
.agent-release-dropzone:focus-visible {
  border-color: var(--accent);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.14), transparent 70%),
    var(--surface2);
  outline: none;
}

.agent-release-dropzone.is-dragover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.agent-release-dropzone.has-file {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.45);
  background: var(--success-soft);
}

.agent-release-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.agent-release-dropzone-inner {
  padding: 1.75rem 1.25rem;
  text-align: center;
  pointer-events: none;
}

.agent-release-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.agent-release-dropzone-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.agent-release-dropzone-hint {
  margin: 0;
  font-size: 0.88rem;
}

.agent-release-dropzone-file {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--success);
}

.agent-release-info-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.agent-release-info-row dt {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.agent-release-info-row dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.agent-release-code {
  flex: 1 1 100%;
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--text-secondary);
}

.agent-release-code--hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.agent-release-info-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.agent-release-history-table .agent-release-history-ver {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.agent-release-history-current-badge {
  margin-left: 0.4rem;
  vertical-align: middle;
}

.agent-release-history-notes-cell {
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-release-history-table tbody tr.is-current td {
  background: rgba(99, 102, 241, 0.07);
}

.agent-release-history-table tbody tr.is-current:hover td {
  background: rgba(99, 102, 241, 0.1);
}

.agent-release-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
}

.agent-release-section-header {
  margin-bottom: 1.25rem;
}

.agent-release-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

@media (max-width: 960px) {
  .agent-release-body,
  .agent-release-body--equal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .agent-release-body > .panel .form-actions .btn {
    width: 100%;
  }
}

/* ── APK 배포 / 이메일 전송 ───────────────────────────────────── */
.apk-email-send-inline {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.apk-email-send-title {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.apk-email-send-desc {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}

.apk-email-send-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.apk-email-send-form--panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.65rem;
  width: 100%;
  min-width: 0;
}

.apk-email-send-form--panel .apk-email-field {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

.apk-email-send-form--panel .apk-email-field input[type="email"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.apk-email-send-form--panel .btn-block {
  width: 100%;
}

.apk-email-send-form .app-search-wrap {
  flex: 1 1 200px;
  min-width: 0;
}

.apk-email-panel {
  margin-top: 1rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.apk-email-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  min-width: 0;
}

.apk-email-panel-head > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.apk-email-panel-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.apk-email-panel-meta {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
}

.apk-email-panel-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.apk-email-panel-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.apk-email-panel-foot {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
}

.sidebar-apk-cta {
  margin: 0.75rem 0 0.35rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(129, 140, 248, 0.22);
  background: rgba(99, 102, 241, 0.08);
}

.sidebar-apk-cta-label {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.sidebar-apk-cta-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sidebar-apk-cta-input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
}

/* ── Mobile app & narrow viewport (WebView / phone) ───────────── */
body.ps-mobile-app {
  overscroll-behavior-y: none;
}

body.ps-mobile-app .ps-ptr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: calc(var(--ps-ptr-offset, 0px) + env(safe-area-inset-top, 0px));
  padding-bottom: 0.35rem;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-100%);
  transition:
    height 0.22s ease,
    opacity 0.18s ease,
    transform 0.22s ease;
}

body.ps-mobile-app .ps-ptr.is-active {
  opacity: 1;
  transform: translateY(0);
}

body.ps-mobile-app .ps-ptr.is-ready .ps-ptr-spinner {
  border-top-color: var(--accent, #3b82f6);
  transform: scale(1.08);
}

body.ps-mobile-app .ps-ptr.is-refreshing .ps-ptr-spinner {
  animation: ps-btn-spin 0.65s linear infinite;
}

body.ps-mobile-app .ps-ptr-spinner {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-top-color: rgba(148, 163, 184, 0.85);
  border-radius: 50%;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

body.ps-mobile-app .ps-ptr-label {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted, #94a3b8);
  opacity: 0;
  transition: opacity 0.15s ease;
}

body.ps-mobile-app .ps-ptr.is-active .ps-ptr-label {
  opacity: 1;
}

body.ps-mobile-app .ps-ptr.is-ready .ps-ptr-label {
  color: var(--accent, #3b82f6);
}

@media (max-width: 768px) {
  html,
  body {
    overscroll-behavior-y: none;
  }
}

.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: max(0.65rem, env(safe-area-inset-top, 0px));
  left: max(0.75rem, env(safe-area-inset-left, 0px));
  right: auto;
  z-index: 1101;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(13, 18, 25, 0.92);
  backdrop-filter: blur(12px);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: left 0.22s ease, right 0.22s ease, background 0.18s ease;
}

body.sidebar-open .mobile-nav-toggle {
  left: auto;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  background: rgba(13, 18, 25, 0.96);
}

.mobile-nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

body.sidebar-open .sidebar-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .ps-mobile-hide {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .layout {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 88vw);
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    overflow-y: auto;
    padding-top: max(1rem, env(safe-area-inset-top, 0px));
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    box-shadow: var(--shadow);
  }

  body.sidebar-open .sidebar .brand-block {
    padding-left: 0.25rem;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.2rem;
  }

  .nav a {
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .nav a.active {
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .main {
    padding-top: calc(3.75rem + env(safe-area-inset-top, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    padding-bottom: 2rem;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .page-header-actions,
  .admin-dash-header-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cards,
  .admin-dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .card {
    padding: 0.85rem 1rem;
  }

  .card .value {
    font-size: 1.35rem;
  }

  .btn,
  .sidebar-action-btn {
    min-height: 44px;
  }

  .table-wrap {
    overflow-x: visible;
    margin: 0;
    padding: 0;
  }

  .data-table {
    min-width: 0;
  }

  .data-table--stacked {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    margin-top: 0;
  }

  .data-table--stacked thead {
    display: none;
    height: 0;
    visibility: collapse;
  }

  .data-table--stacked tbody tr {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .data-table--stacked tbody tr:hover td {
    background: transparent;
  }

  .data-table--stacked tbody tr:nth-child(even) td {
    background: transparent;
  }

  .data-table--stacked tbody tr.app-table-empty {
    border: none;
    background: transparent;
  }

  .data-table--stacked tbody tr.app-table-empty td {
    display: block;
    padding: 1rem 0.5rem;
    text-align: center;
    border: none;
  }

  .data-table--stacked tbody tr.app-table-empty td::before {
    display: none;
  }

  .data-table--stacked td {
    display: grid;
    grid-template-columns: 4.85rem minmax(0, 1fr);
    gap: 0.2rem 0.65rem;
    align-items: start;
    justify-content: initial;
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    word-break: break-word;
  }

  .data-table--stacked td::before {
    content: attr(data-label);
    flex: unset;
    max-width: none;
    text-align: left;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
    padding-top: 0.12rem;
  }

  .data-table--stacked td:last-child {
    border-bottom: none;
  }

  .data-table--stacked td.actions {
    display: block;
    padding: 0.65rem 0.9rem 0.8rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.22);
    margin-top: 0.1rem;
    text-align: left;
  }

  .data-table--stacked td.actions::before {
    display: none;
  }

  .data-table--stacked td.actions .btn {
    width: 100%;
    justify-content: center;
  }

  .registration-keys-history-panel .data-table {
    min-width: 0;
  }

  .registration-keys-history-panel .table-wrap {
    overflow-x: visible;
  }

  .data-table--stacked .reg-key-date {
    font-size: 0.84rem;
    line-height: 1.5;
    word-break: keep-all;
  }

  .data-table--stacked .reg-key-branch .reg-key-branch-name {
    display: block;
    font-weight: 600;
  }

  .data-table--stacked .reg-key-branch .reg-key-branch-code {
    margin-top: 0.28rem;
    width: fit-content;
    max-width: 100%;
  }

  .data-table--stacked td:first-child .key-display-inline,
  .data-table--stacked td:first-child code {
    font-size: 1rem;
    letter-spacing: 0.1em;
    word-break: break-all;
    white-space: normal;
  }

  .data-table--stacked .reg-key-actions {
    width: auto;
    text-align: left;
  }

  .app-table-toolbar {
    margin-bottom: 0.45rem;
    gap: 0.4rem;
  }

  .app-search-wrap {
    flex: 1 1 100%;
    width: 100%;
  }

  .admin-dash-search-wrap {
    flex: 0 0 auto;
    width: 100%;
  }

  .admin-dash-toolbar {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.4rem;
  }

  .admin-dash-select {
    width: 100%;
  }

  .admin-dash-branch-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.7rem 0.75rem;
  }

  .admin-dash-signals {
    order: unset;
    width: 100%;
    padding-left: 0;
  }

  .admin-dash-branch-actions {
    order: unset;
    width: 100%;
    margin-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .admin-dash-branch-actions .btn {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
    justify-content: center;
  }

  .panel-grid > .panel-form-wide,
  .panel-grid > .panel-form,
  .panel-grid > .app-form-panel {
    max-width: none;
    width: 100%;
  }

  .pc-split-layout {
    grid-template-columns: 1fr;
  }

  .pc-branch-sidebar,
  .pc-category-sidebar {
    position: static;
    max-height: none;
  }

  .pc-card {
    padding: 0.85rem;
  }

  .pc-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .pc-card-identity {
    padding-right: 0;
  }

  .pc-name-host {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .pc-name-context {
    margin-top: 0.5rem;
  }

  .pc-context-chip-value {
    white-space: normal;
  }

  .pc-name {
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .pc-status-pill {
    align-self: flex-start;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  .pc-card-body--compact {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .pc-card-body--compact > .pc-maintain-details,
  .pc-card-body--compact > .pc-destroy-details,
  .pc-card-body--compact > .pc-details-dropdown,
.pc-card-body--compact > .pc-info-toggle,
  .pc-card-body--compact > .pc-collapsible-section,
  .pc-card-body--compact > .pc-card-block--assign,
  .pc-card-body--compact > .pc-card-block--commands,
  .pc-card-body--compact > .pc-card-block--media,
  .pc-card-body--compact > .pc-maintain-history {
    grid-column: 1;
  }

  .pc-card-block-body {
    padding: 0.65rem 0.75rem;
  }

  .pc-assign-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .pc-assign-form .btn {
    width: 100%;
    align-self: stretch;
  }

  .pc-card-block--assign .pc-select-wrap {
    flex: 1 1 auto;
    width: 100%;
  }

  .pc-panel-summary,
  .pc-maintain-summary,
  .pc-destroy-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "meta chevron";
    align-items: center;
    gap: 0.4rem 0.55rem;
    padding: 0.65rem 0.75rem;
  }

  .pc-panel-title {
    grid-area: title;
    min-width: 0;
    margin: 0;
  }

  .pc-panel-summary-meta,
  .pc-maintain-summary-body,
  .pc-destroy-summary-body {
    grid-area: meta;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
  }

  .pc-dropdown-trigger,
  .pc-panel-chevron,
  .pc-maintain-chevron,
  .pc-destroy-chevron {
    grid-area: chevron;
    margin-left: 0;
    min-height: 36px;
  }

  .pc-panel-summary-text,
  .pc-maintain-summary-text,
  .pc-destroy-summary-text {
    white-space: normal;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    text-overflow: unset;
    flex: 1 1 100%;
    font-size: 0.8rem;
  }

  .pc-scheduler-status {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .pc-scheduler-chip {
    justify-content: center;
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }

  .pc-cmd-grid,
  .pc-cmd-grid--dense,
  .pc-cmd-grid--scheduler {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .pc-cmd-grid .pc-cmd-form {
    display: block;
    width: 100%;
  }

  .pc-cmd-grid .btn,
  .pc-cmd-grid--dense .btn-sm,
  .pc-cmd-grid--scheduler .btn-sm {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    justify-content: center;
  }

  .pc-info-grid {
    grid-template-columns: 1fr;
  }

  .pc-card-foot,
  .pc-row-delete {
    justify-content: stretch;
  }

  .pc-card-foot .btn,
  .pc-row-delete .btn {
    width: 100%;
  }

  .pc-category-nav {
    gap: 0.45rem;
  }

  .pc-category-item {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .pc-toolbar,
  .pc-online-filter-form {
    flex-wrap: wrap;
  }

  .audit-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .audit-filter-form select {
    min-width: 0;
    width: 100%;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }

  .auth-page {
    padding: max(1.25rem, env(safe-area-inset-top, 0px))
      max(1.25rem, env(safe-area-inset-right, 0px))
      max(1.25rem, env(safe-area-inset-bottom, 0px))
      max(1.25rem, env(safe-area-inset-left, 0px));
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .admin-dash-expiry-strip {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .admin-dash-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-dash-search-wrap {
    flex: 0 0 auto;
  }

  .pending-bulk-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pending-fields,
  .pending-fields--main,
  .pending-fields--single {
    grid-template-columns: 1fr;
  }

  .pc-monitor-stream {
    max-height: min(55dvh, 480px);
  }

  .pc-monitor-body {
    min-height: 140px;
  }
}

@media (max-width: 420px) {
  .cards,
  .admin-dash-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile motion (WebView / narrow viewport) ───────────────── */
@keyframes ps-page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ps-stagger-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ps-auth-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ps-logo-glow {
  0%,
  100% {
    box-shadow: 0 8px 24px var(--accent-glow);
  }
  50% {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.55);
  }
}

@keyframes ps-status-pulse {
  0% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ps-card-dismiss {
  to {
    opacity: 0;
    transform: translateX(12px) scale(0.97);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    overflow: hidden;
  }
}

@keyframes ps-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .main.ps-page-enter {
    animation: ps-page-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .auth-page.ps-auth-enter .auth-card {
    animation: ps-auth-card-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .auth-logo.ps-auth-logo-glow {
    animation: ps-logo-glow 1.4s ease 0.15s 1;
  }

  .ps-motion-fade-in {
    opacity: 0;
    animation: ps-stagger-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  .btn,
  .nav a,
  .sidebar-action-btn,
  .admin-dash-expiry-chip,
  .pc-category-item,
  .mobile-nav-toggle {
    transition: transform 0.1s ease, background 0.12s ease, border-color 0.12s ease;
  }

  .btn:active:not(:disabled),
  .nav a:active,
  .sidebar-action-btn:active,
  .admin-dash-expiry-chip:active,
  .pc-category-item:active,
  .mobile-nav-toggle:active {
    transform: scale(0.97);
  }

  .flash.ps-flash-mobile {
    animation: flash-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition: opacity 0.28s ease, transform 0.28s ease;
  }

  .flash.ps-flash-out {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }

  .pending-card.ps-card-dismiss {
    animation: ps-card-dismiss 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    overflow: hidden;
  }

  .pc-status-pill {
    transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  }

  .pc-status-pill.ps-status-changing {
    animation: ps-status-pulse 0.28s ease;
  }

  .btn.is-processing {
    position: relative;
    pointer-events: none;
    opacity: 0.88;
  }

  .ps-btn-spinner,
  .btn.is-processing::before {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    margin-right: 0.35rem;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: currentColor;
    border-radius: 50%;
    vertical-align: -0.1em;
    animation: ps-btn-spin 0.65s linear infinite;
  }

  .btn.is-processing::before {
    content: "";
    margin-right: 0.4rem;
  }

  .ps-count-up {
    font-variant-numeric: tabular-nums;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main.ps-page-enter,
  .auth-page.ps-auth-enter .auth-card,
  .auth-logo.ps-auth-logo-glow,
  .ps-motion-fade-in,
  .pending-card.ps-card-dismiss,
  .pc-status-pill.ps-status-changing,
  .flash.ps-flash-mobile {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:active:not(:disabled),
  .nav a:active,
  .sidebar-action-btn:active,
  .admin-dash-expiry-chip:active,
  .pc-category-item:active,
  .mobile-nav-toggle:active {
    transform: none;
  }
}

