/* T掌柜 admin refresh: calm, task-first surfaces with the existing brand mark. */
:root {
  --graphite: #242622;
  --black: #242622;
  --white: #ffffff;
  --raw: #ffffff;
  --warm: #f6f7f3;
  --orange: #ffcc00;
  --secondary: #858982;
  --caption: #858982;
  --border: #e9ebe5;
  --divider: #e9ebe5;
  --success: #237448;
  --sidebar-width: 224px;
  --radius-card: 12px;
  --font-cn: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-en: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --brand-soft: #fff5c3;
  --brand-hint: #fffbeb;
  --surface-shadow: 0 1px 2px rgba(32, 36, 30, .035), 0 8px 24px rgba(32, 36, 30, .025);
}

html,
body {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: clip;
  background: var(--warm);
  color: var(--graphite);
  font-family: var(--font-cn);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { color: #242622; background: #ffe781; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration-thickness: .07em; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #997800 !important; outline-offset: 2px; }

.admin-shell,
.main,
.content,
.login-page,
.product-editor,
.product-list,
.table-wrap { min-width: 0; max-width: 100%; }
.admin-shell { min-height: 100vh; }

/* Persistent navigation */
.admin-shell .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  padding: 20px 12px 12px;
  background: #fff;
  color: var(--graphite);
  border-right: 1px solid var(--border);
  box-shadow: none;
  transition: transform .2s ease;
}
.brand {
  display: block;
  padding: 8px 10px 18px;
  border-bottom: 1px solid var(--divider);
}
.brand-logo {
  justify-content: flex-start;
  width: 138px;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}
.brand-logo img { width: 138px; height: auto; max-height: none; object-fit: contain; }
.brand-caption { display: grid; gap: 1px; margin: 15px 0 0; padding: 0 2px; }
.brand-caption b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand-caption span { color: var(--caption); font-size: 11px; }
.brand-cn { margin-top: 5px; color: var(--caption); font: 11px var(--font-en); letter-spacing: .08em; }
.env-block { margin: 16px 9px 18px; gap: 9px; }
.env-block b { color: var(--graphite); font: 600 11px var(--font-en); letter-spacing: .03em; }
.env-block small { color: var(--caption); }
.env-dot { flex: 0 0 7px; width: 7px; height: 7px; background: #42a46b; box-shadow: 0 0 0 3px #e8f5ec; }
.nav {
  flex: 1 1 auto;
  gap: 3px;
  padding: 8px 0 12px;
  scrollbar-color: #d5d9d1 transparent;
}
.nav-label {
  margin: 0 10px 5px;
  color: #767d74;
  font: 600 10px var(--font-cn);
  letter-spacing: .02em;
  text-transform: none;
}
.nav-label:not(:first-child) { margin-top: 17px; }
.nav-link,
.nav-group-title {
  min-height: 38px;
  padding: 0 10px;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  color: #454a43;
  font-size: 13px;
  transition: background-color .14s ease, color .14s ease;
}
.nav-link:hover,
.nav-group-title:hover { color: var(--graphite); background: #f5f6f2; }
.nav-link.active,
.nav-group-title.active {
  color: #292714;
  background: var(--brand-soft);
  font-weight: 600;
}
.nav-link.active { box-shadow: inset 3px 0 0 var(--orange); }
.nav-mark { width: 16px; height: 16px; border: 0; opacity: .88; }
.nav-link.active .nav-mark { background: transparent; border: 0; }
.nav-link.active .menu-icon { color: #6b5700; }
.nav-link > .menu-icon,
.nav-group-title > .menu-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.nav-group { margin: 0; }
.nav-group-title { justify-content: flex-start; padding-left: 10px; cursor: pointer; list-style: none; }
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-title.active { color: #292714; }
.nav-group-chevron { display: grid; place-items: center; flex: 0 0 14px; width: 14px; height: 14px; margin-left: auto; border: 0; transform: none; }
.nav-group-chevron .menu-icon { width: 13px; height: 13px; flex: 0 0 13px; }
.nav-group[open] .nav-group-chevron { transform: rotate(90deg); }
.nav-submenu { margin: 3px 0 6px 10px; padding: 3px 0 3px 10px; border-left: 1px solid var(--border); }
.nav-submenu .nav-link { min-height: 34px; padding-left: 10px; font-size: 12px; }
.nav-submenu .nav-link.active { background: var(--brand-soft); }
.nav-submenu .nav-mark { width: 7px; height: 7px; border-radius: 50%; background: transparent; border: 1px solid currentColor; }
.nav-submenu .nav-link.active .nav-mark { background: var(--orange); border-color: #997800; }
.sidebar-account {
  flex: 0 0 auto;
  margin: auto 2px 0;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
}
.sidebar-account .account-menu-wrap { width: 100%; }
.sidebar-user {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  gap: 9px;
  padding: 5px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--graphite);
  text-align: left;
}
.sidebar-user:hover { background: #f5f6f2; }
.sidebar-user:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.sidebar-account-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: 2px; }
.sidebar-account-copy b { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-copy small { display: flex; align-items: center; min-width: 0; gap: 5px; overflow: hidden; color: var(--caption); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-copy .env-dot { width: 6px; height: 6px; box-shadow: none; }
.sidebar-user .account-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--graphite); color: #fff; font-size: 12px; }
.sidebar-user .menu-icon { flex: 0 0 14px; width: 14px; height: 14px; color: var(--caption); }
.sidebar-account .account-menu { top: auto; right: 0; bottom: calc(100% + 7px); left: 0; width: 100%; }

/* Workspace top bar */
.admin-shell .main {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  background: var(--warm);
}
.admin-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  height: 70px;
  min-height: 70px;
  gap: 24px;
  padding: 0 32px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.topbar-leading { display: flex; align-items: center; min-width: 0; gap: 12px; }
.breadcrumbs { display: flex; align-items: center; min-width: 0; gap: 9px; color: var(--caption); font-size: 12px; }
.breadcrumbs > span[aria-hidden="true"] { color: #a6aba4; }
.breadcrumbs a { color: #666c65; }
.breadcrumbs a:hover { color: var(--graphite); }
.breadcrumbs .breadcrumb-current { overflow: hidden; color: var(--graphite); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { gap: 16px; }
.feature-search { position: relative; width: min(290px, 28vw); }
.feature-search > label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8f9f6;
  color: #767c74;
  transition: border-color .14s ease, background-color .14s ease;
}
.feature-search > label:focus-within { border-color: #c8a500; background: #fff; }
.feature-search > label .menu-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.feature-search input { min-width: 0; width: 100%; height: 32px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--graphite); font-size: 12px; }
.feature-search input::placeholder { color: #81877f; opacity: 1; }
.feature-search kbd { display: none; }
.menu-search-results {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(24,28,22,.12);
}
.menu-search-result { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 7px 9px; border-radius: 7px; }
.menu-search-result:hover, .menu-search-result[aria-selected="true"] { background: var(--brand-hint); }
.menu-search-result-copy { display: grid; gap: 1px; }
.menu-search-result-copy b { font-size: 12px; font-weight: 600; }
.menu-search-result-copy small { color: var(--caption); font-size: 11px; }
.menu-search-empty { padding: 14px; color: var(--caption); font-size: 12px; }
.account-menu-wrap { position: relative; }
.topbar-user {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 9px;
  padding: 3px 5px 3px 3px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}
.topbar-user:hover { background: #f5f6f2; }
.topbar-user > .menu-icon { width: 14px; height: 14px; color: var(--caption); }
.topbar-user-copy { display: grid; max-width: 140px; gap: 0; }
.topbar-user-copy b { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-copy small { overflow: hidden; color: var(--caption); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; flex: 0 0 auto; border: 0; background: #f2e7b4; color: #4b3f09; font-size: 13px; font-weight: 650; }
.account-avatar:hover { background: #f0db80; }
.account-menu { top: calc(100% + 5px); width: 220px; padding: 6px; border-radius: 10px; border-color: var(--border); box-shadow: 0 12px 30px rgba(24,28,22,.12); }
.account-menu-user { padding: 10px; border-color: var(--divider); }
.account-menu-user b { font-size: 12px; }
.account-menu-user small { color: var(--caption); font-size: 11px; }
.account-menu > button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; border-radius: 7px; font-size: 12px; }
.account-menu > button .menu-icon { width: 15px; height: 15px; }

.mobile-menu-button { display: none; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.mobile-menu-button .menu-icon { width: 18px; height: 18px; }
.mobile-scrim { display: none; }

/* Page rhythm and shared controls */
.admin-shell .content {
  width: 100%;
  max-width: 1750px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  overflow-x: clip;
}
.page-heading { align-items: center; gap: 18px; margin: 0 0 22px; }
.page-heading h2 { margin: 0 0 4px; font-size: 27px; line-height: 1.28; font-weight: 650; letter-spacing: -.025em; }
.page-heading p { max-width: 72ch; color: var(--secondary); font-size: 13px; line-height: 1.55; }
.heading-actions { flex-wrap: wrap; gap: 8px; }
.button { min-height: 36px; height: auto; padding: 0 13px; border-radius: 7px; font-size: 12px; font-weight: 550; transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease; }
.button:hover { opacity: 1; transform: none; }
.button:disabled, .button[aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
.button.primary { color: #27240f; background: var(--orange); border-color: var(--orange); }
.button.primary:hover { background: #f0bf00; border-color: #f0bf00; }
.button.secondary { color: var(--graphite); background: #fff; border-color: var(--border); }
.button.secondary:hover { background: #f8f9f6; border-color: #cbd0c7; }
.button.text { min-height: 32px; color: #52584f; }
.button.compact { min-height: 30px; height: auto; padding: 0 9px; border-radius: 6px; font-size: 11px; }
.panel, .form-panel, .category-group, .scene-settings-panel, .report-subsection {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--surface-shadow);
}
.panel { padding: 20px; }
.form-panel { padding: 20px; }
.panel-head { align-items: center; gap: 14px; margin-bottom: 16px; }
.panel-head h3, .form-panel h3 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.01em; }
.panel-head > a { color: #5f655e; font-size: 12px; }
.panel-head > a:hover { color: #282b26; }
.eyebrow, .crumb { color: #747a73; font: 600 10px var(--font-en); letter-spacing: .07em; }

.toolbar {
  min-height: 58px;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.toolbar select, .toolbar input,
.field input, .field select, .field textarea,
.product-fields-grid .field input, .product-fields-grid .field select,
.product-first-row .field input {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--graphite);
  outline: 0;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.toolbar select, .toolbar input { height: 38px; padding: 0 10px; font-size: 12px; }
.field input, .field select, .field textarea { min-height: 39px; padding: 8px 10px; font-size: 13px; }
.field textarea { min-height: 96px; }
.field input::placeholder, .field textarea::placeholder, .toolbar input::placeholder { color: #858982; opacity: 1; }
.toolbar select:focus, .toolbar input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #b19100; box-shadow: 0 0 0 3px rgba(255,204,0,.17); }
.field { gap: 6px; min-width: 0; }
.field > span, .process-choice > span { color: #52584f; font-size: 12px; font-weight: 550; }
.field small { color: var(--caption); font-size: 11px; line-height: 1.45; }
.toolbar-count { color: var(--caption); font: 12px var(--font-cn); letter-spacing: 0; }

.table-wrap, .pc-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--surface-shadow);
  scrollbar-color: #c8cdc3 transparent;
}
.table-wrap table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-wrap th, .pc-table th {
  padding: 11px 13px;
  background: #f8f9f6;
  color: #5e645d;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.table-wrap td, .pc-table td { padding: 12px 13px; border-bottom: 1px solid var(--divider); color: var(--graphite); font-size: 12px; vertical-align: middle; }
.table-wrap tbody tr:last-child td, .pc-table tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover, .pc-table tbody tr:hover { background: #fdfdfb; }
.table-wrap td small { display: block; color: var(--caption); font-size: 11px; }
.table-wrap img { max-width: 100%; }

.status, .badge, .pill, .pc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 2px 8px;
  border: 0;
  border-radius: 6px;
  background: #f0f1ed;
  color: #545a52;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
}
.status.success, .badge.success, .pill.success, .pc-life { color: #216c43; background: #eaf5ed; }
.status.warning, .badge.warning, .pill.warning, .pc-badge { color: #705700; background: #fff5cf; }
.status.danger, .badge.danger, .pill.danger, .pc-life-closed { color: #a23c34; background: #faecea; }
.status.info, .badge.info, .pill.info { color: #345f7d; background: #eaf2f8; }
.status.neutral, .badge.neutral, .pill.neutral { color: #565d55; background: #f0f1ed; }

.product-editor .product-info-section,
.product-editor .product-parameter-section,
.product-editor .product-measurements-panel,
.product-editor .product-color-panel,
.product-editor .four-view-panel,
.product-editor .product-media-stack > .panel { border-radius: 10px; }
.product-editor-columns { gap: 14px 16px; }
.product-editor .panel-head h3 { font-size: 16px; }
.product-first-row .field input, .product-fields-grid .field input, .product-fields-grid .field select { min-height: 36px; height: 36px; border-radius: 6px; }
.product-first-row .field > span, .product-fields-grid .field > span { color: #555b53; }
.product-size-pane, .product-measurements-panel { min-width: 0; }
.product-measurements-panel .table-wrap, .product-size-pane .table-wrap { box-shadow: none; }
.product-bulk-price .button { border-radius: 6px; }
.product-color-panel, .four-view-panel, .scene-settings-panel, .scene-settings-row, .scene-create-form { min-width: 0; }

.toast { right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; background: #272a25; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.16); font-size: 12px; }
.login-page { min-height: 100dvh; padding: 24px; background: var(--warm); }
.login-box { width: min(420px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 12px 36px rgba(28,32,26,.07); }
.login-box .brand-logo { width: 138px; min-height: 0; margin: 0 0 18px; padding: 0; background: transparent; }
.login-box .brand-logo img { width: 138px; height: auto; }
.login-box .brand-cn { margin: 0 0 30px; }
.login-box h1 { margin: 0 0 6px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.login-box p { margin: 0 0 22px; color: var(--secondary); font-size: 13px; }
.login-box .field input { height: 40px; }
.login-box .button.primary { width: 100%; min-height: 40px; margin-top: 6px; }

/* Project center uses the same neutral and brand palette as the admin shell. */
.pc {
  --pc-ink: #242622;
  --pc-muted: #666c65;
  --pc-line: #e3e6de;
  --pc-yellow: #ffcc00;
  --pc-surface: #fff;
  --pc-soft: #f6f7f3;
}
.pc-area-nav a.active { border-bottom-color: var(--orange); color: var(--graphite); }
.pc-scope-tabs button.active,
.pc-stage-tabs button.active,
.pc-view-toggle button.active {
  border-color: #e5c400;
  background: var(--brand-soft);
  color: var(--graphite);
}
.pc-scope-tabs button.active { border-bottom: 2px solid #e5c400; }
.pc :focus-visible { outline-color: #997800; }
.pc-btn { min-height: 36px; padding: 0 13px; border-color: var(--border); border-radius: 7px; font-size: 12px; }
.pc-btn.primary { background: #ffcc00; border-color: #ffcc00; color: #242622; }
.pc-btn.primary:hover { background: #f0bf00; }
.pc-btn.dark { background: #343830; border-color: #343830; }
.pc-card, .pc-table-scroll, .pc-filters, .pc-modal { border-color: var(--border); box-shadow: var(--surface-shadow); }
.pc-hero { background: #fff7d9; border-color: #efe3ad; }
.pc-modal-backdrop { background: rgba(27,30,25,.42); }
.content:has(.workbench-dept-grid) .workbench-dept::before { display: none; }

@media (min-width: 1500px) {
  .admin-shell .content { padding-right: 44px; padding-left: 44px; }
  .admin-shell .topbar { padding-right: 44px; padding-left: 44px; }
}

@media (max-width: 1100px) {
  .admin-shell .content { padding-right: 24px; padding-left: 24px; }
  .admin-shell .topbar { padding-right: 24px; padding-left: 24px; }
  .feature-search { width: min(250px, 26vw); }
}

@media (max-width: 900px) {
  html, body { overflow-x: clip; }
  .admin-shell .sidebar,
  body:has(.product-editor) .admin-shell .sidebar,
  body:has(.product-list-toolbar) .admin-shell .sidebar,
  body:has(.pc) .admin-shell .sidebar {
    display: flex !important;
    width: min(286px, calc(100vw - 52px));
    min-width: 0;
    transform: translateX(-105%);
    box-shadow: none;
  }
  .admin-shell.menu-open .sidebar { transform: translateX(0); box-shadow: 14px 0 36px rgba(18,21,16,.13); }
  .admin-shell .mobile-menu-button { display: grid; flex: 0 0 auto; }
  .admin-shell .mobile-scrim { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(27,30,25,.34); }
  .admin-shell.menu-open .mobile-scrim { display: block; }
  .admin-shell .main { width: 100%; margin-left: 0; }
  .admin-shell .topbar { gap: 12px; }
  .admin-shell .content { padding-top: 24px; }
  .feature-search { width: min(250px, 32vw); }
}

/* project-center.css predates the shared shell and hid navigation on phones.
   Keep the same mobile drawer behavior on every route, including project center. */
@media (max-width: 760px) {
  body:has(.pc) .admin-shell .sidebar {
    display: flex !important;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(286px, calc(100vw - 52px));
    min-width: 0;
    transform: translateX(-105%);
    box-shadow: none;
  }
  body:has(.admin-shell.menu-open .pc) .admin-shell .sidebar {
    transform: translateX(0);
    box-shadow: 14px 0 36px rgba(18,21,16,.13);
  }
  body:has(.pc) .admin-shell .main { width: 100%; min-width: 0; margin-left: 0; }
  body:has(.pc) .admin-shell .topbar { height: 66px; min-height: 66px; padding: 0 16px; }
}

@media (max-width: 640px) {
  .admin-shell .topbar { height: 62px; min-height: 62px; gap: 8px; padding: 0 14px; }
  .topbar-leading { gap: 8px; }
  .breadcrumbs { gap: 6px; font-size: 11px; }
  .breadcrumbs > span:nth-last-child(2) { display: none; }
  .breadcrumbs > span[aria-hidden="true"]:nth-last-child(3) { display: none; }
  .top-actions { gap: 7px; }
  .feature-search { width: 38px; }
  .feature-search > label { justify-content: center; width: 38px; height: 36px; padding: 0; }
  .feature-search input { position: absolute; inset: 0; width: 38px; height: 36px; opacity: 0; cursor: pointer; }
  .feature-search > label:focus-within { position: fixed; top: 9px; left: 62px; z-index: 28; justify-content: flex-start; width: calc(100vw - 126px); padding: 0 10px; box-shadow: 0 0 0 100vmax rgba(27,30,25,.12); }
  .feature-search > label:focus-within input { position: static; width: 100%; opacity: 1; cursor: text; }
  .menu-search-results { position: fixed; top: 52px; left: 14px; z-index: 61; }
  .topbar-user { min-height: 38px; padding: 2px; }
  .topbar-user-copy, .topbar-user > .menu-icon { display: none; }
  .account-avatar { width: 31px; height: 31px; }
  .admin-shell .content { padding: 20px 14px 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .page-heading h2 { font-size: 23px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 0 0 auto; }
  .panel, .form-panel { padding: 15px; border-radius: 10px; }
  .toolbar { gap: 7px; padding: 8px; }
  .toolbar input { flex: 1 1 100%; }
  .toolbar select { max-width: 100%; }
  .table-wrap { border-radius: 8px; }
  .table-wrap th, .pc-table th { padding: 9px 10px; }
  .table-wrap td, .pc-table td { padding: 10px; }
  .login-box { padding: 24px; }
  .pc-heading { align-items: flex-start; flex-direction: column; }
  .pc-hero { grid-template-columns: 1fr; min-height: 0; padding: 20px; }
  .pc-hero-counts { border-top: 1px solid rgba(36,38,34,.15); border-left: 0; }
  .pc-hero-counts div { min-height: 86px; padding: 12px 8px; }
  .pc-work-grid { grid-template-columns: minmax(0,1fr); }
  .pc-filter-row { align-items: flex-start; flex-direction: column; }
  .pc-filter-tools, .pc-search { width: 100%; min-width: 0; }
  .pc-modal-backdrop { padding: 10px; }
  .pc-modal { max-height: calc(100dvh - 20px); }
  .pc-modal-head, .pc-modal-scroll { padding-right: 16px; padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Product center: category-first inventory workspace. */
.product-center-page {
  --product-accent: #efbf00;
  --product-ink: #272a25;
  --product-muted: #858a82;
  --product-line: #e8eae4;
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  color: var(--product-ink);
}
.product-center-page .page-heading {
  margin: 0 0 2px;
  align-items: flex-end;
  gap: 20px;
}
.product-center-page .page-heading h2 {
  margin: 3px 0 2px;
  font-size: clamp(25px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -.045em;
}
.product-center-page .page-heading p { margin: 0; color: var(--product-muted); font-size: 12px; }
.product-center-page .eyebrow { color: #90958b; font-size: 9px; letter-spacing: .2em; }
.product-center-actions { display: flex; align-items: center; gap: 9px; }
.product-center-actions .button { min-height: 36px; padding: 0 13px; gap: 7px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.product-center-actions .button.primary { color: #292b25; background: var(--orange); border-color: var(--orange); }
.product-center-actions .button.primary:hover { background: #f2c000; border-color: #f2c000; }
.product-center-actions svg,
.product-category-manage svg,
.product-view-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.product-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-overview-tile {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 124px;
  padding: 17px 19px 14px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--product-line);
  border-radius: 13px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.product-overview-tile::after { content: "↗"; position: absolute; right: 16px; bottom: 13px; color: #9ba097; font-size: 14px; }
.product-overview-tile > span { display: block; color: #747a71; font-size: 12px; }
.product-overview-tile > b { display: block; margin-top: 9px; font-size: 29px; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.04em; }
.product-overview-tile > b small { margin-left: 6px; color: #979c94; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.product-overview-tile p { margin: 10px 0 0; color: #9a9f97; font-size: 11px; }
.product-overview-tile.is-selected { border-color: #e8c641; background: linear-gradient(145deg, #fffefa 0%, #fff 75%); box-shadow: inset 0 0 0 1px rgba(239,191,0,.12); }
.product-overview-tile.is-selected > span::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; vertical-align: 1px; background: #d7a900; border-radius: 50%; }

.product-center-panel { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--product-line); border-radius: 13px; box-shadow: 0 2px 8px rgba(36,38,34,.018); }
.product-category-bar { display: flex; min-height: 57px; align-items: stretch; justify-content: space-between; gap: 12px; padding: 0 17px; border-bottom: 1px solid var(--product-line); }
.product-category-tabs { display: flex; min-width: 0; align-items: stretch; gap: 1px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d9ddd4 transparent; }
.product-category-tab {
  position: relative;
  display: inline-flex;
  min-height: 57px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: #6d736b;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  transition: color .15s ease, background .15s ease;
}
.product-category-tab:hover { color: #31352e; background: #fbfbf8; }
.product-category-tab.is-active { color: #292b25; font-weight: 650; }
.product-category-tab.is-active::after { content: ""; position: absolute; right: 13px; bottom: 0; left: 13px; height: 2px; background: var(--orange); border-radius: 2px 2px 0 0; }
.product-category-tab > span,
.product-subcategory-tab > span { display: inline-grid; min-width: 19px; height: 18px; place-items: center; padding: 0 5px; color: #85897f; background: #f2f3ee; border-radius: 5px; font-size: 10px; font-weight: 500; }
.product-category-tab.is-active > span { color: #655100; background: #fff0a6; }
.product-category-manage { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: #737970; font-size: 11px; text-decoration: none; }
.product-category-manage:hover { color: #363a33; }
.product-category-manage svg { width: 14px; height: 14px; }
.product-subcategory-bar { display: flex; min-height: 47px; align-items: center; gap: 8px; padding: 7px 20px; overflow-x: auto; background: #fffdf5; border-bottom: 1px solid #f0eddf; }
.product-subcategory-bar[hidden] { display: none; }
.product-subcategory-label { flex: 0 0 auto; margin-right: 4px; color: #85897f; font-size: 11px; }
.product-subcategory-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 5px 10px; color: #6c7168; background: transparent; border: 1px solid transparent; border-radius: 16px; cursor: pointer; font-size: 11px; }
.product-subcategory-tab:hover { background: #fff; border-color: #e9e7db; }
.product-subcategory-tab.is-active { color: #574700; background: #fff2b7; border-color: #f1d65d; font-weight: 600; }
.product-subcategory-tab.is-active > span { background: #fff; }
.product-subcategory-empty { flex: 0 0 auto; color: #92978f; font-size: 11px; }
.product-subcategory-empty a { color: #806700; text-decoration: none; }
.product-subcategory-empty a:hover { text-decoration: underline; }

.product-list-toolbar { display: flex; min-height: 66px; align-items: center; gap: 10px; padding: 13px 20px; }
.product-search { width: min(380px, 36%); min-width: 210px; height: 37px; gap: 8px; padding-left: 0; border: 0; }
.product-search > svg { width: 15px; height: 15px; flex: 0 0 15px; margin-left: 11px; fill: none; stroke: #969b93; stroke-width: 1.7; stroke-linecap: round; }
.product-search input { width: 100%; height: 37px; padding: 0 12px 0 35px; color: var(--product-ink); background: #fff; border: 1px solid var(--product-line); border-radius: 8px; font-size: 11px; }
.product-search input { padding-left: 12px; }
.product-search input::placeholder { color: #a0a49d; }
.product-list-toolbar select { min-width: 126px; height: 37px; padding: 0 29px 0 12px; color: #555b52; background: #fff; border: 1px solid var(--product-line); border-radius: 8px; font-size: 11px; }
.product-filter-reset { padding: 7px 5px; color: #737a6e; background: transparent; border: 0; cursor: pointer; font-size: 11px; }
.product-filter-reset:hover { color: #514300; }
.product-list-toolbar .toolbar-count { margin-left: auto; color: #8e938b; font-size: 11px; white-space: nowrap; }
.product-view-switch { display: inline-flex; align-items: center; padding: 2px; background: #f7f8f5; border: 1px solid var(--product-line); border-radius: 8px; }
.product-view-switch button { display: grid; width: 30px; height: 27px; place-items: center; padding: 0; color: #858a81; background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.product-view-switch button.is-active { color: #34372f; background: #fff; box-shadow: 0 1px 3px rgba(22,27,20,.1); }
.product-view-switch svg { width: 14px; height: 14px; }

.product-list-wrap { width: 100%; overflow-x: auto; border: 0; border-radius: 0; box-shadow: none; }
.product-list-table { width: 100%; min-width: 1020px; border-collapse: separate; border-spacing: 0; table-layout: auto; }
.product-list-table thead th { height: 39px; padding: 0 12px; color: #858a82; background: #f7f8f5; border-top: 1px solid #f1f2ee; border-bottom: 1px solid var(--product-line); font-size: 10px; font-weight: 500; text-align: left; white-space: nowrap; }
.product-list-table tbody td { height: 91px; padding: 12px; color: #343830; background: #fff; border-bottom: 1px solid #eceee8; font-size: 11px; vertical-align: middle; }
.product-list-table tbody tr:hover td { background: #fffefa; }
.product-list-table th:first-child,
.product-list-table td:first-child { width: 48px; padding-left: 20px; padding-right: 4px; }
.product-list-table th:nth-child(2) { min-width: 340px; }
.product-list-table th:nth-child(3) { min-width: 155px; }
.product-list-table th:nth-child(4) { min-width: 150px; }
.product-list-table th:nth-child(5) { min-width: 116px; }
.product-list-table th:nth-child(6) { min-width: 144px; }
.product-list-table th:nth-child(7) { min-width: 108px; }
.product-list-table th:nth-child(8) { min-width: 94px; }
.product-list-table input[type="checkbox"], .product-card-select input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: #d8ad00; cursor: pointer; }
.product-cell { display: flex; min-width: 0; align-items: center; gap: 13px; }
.product-cell > div { display: grid; min-width: 0; gap: 4px; }
.product-cell > div b { overflow: hidden; color: #30332d; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.product-cell small, .product-list-table td > small, .product-list-table td small { display: block; margin-top: 4px; color: #9a9f97; font-size: 10px; line-height: 1.45; }
.product-cell small { margin-top: 0; }
.product-cell img, .product-cell .product-image-placeholder { display: block; width: 58px; height: 58px; flex: 0 0 58px; object-fit: contain; background: #f4f5f1; border-radius: 8px; }
.product-image-placeholder { position: relative; background: linear-gradient(135deg, #f1f2ed, #fafbf8); }
.product-image-placeholder::after { content: ""; position: absolute; inset: 16px 19px; border: 1px solid #d8dcd3; border-radius: 3px; }
.product-list-table td > b { color: #373a34; font-size: 11px; font-weight: 550; }
.product-list-table .product-price-cell > b { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.product-list-table .product-price-cell > small { color: #989d95; }
.product-list-table .status { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; font-size: 10px; }
.product-list-table .status-active::before { width: 5px; height: 5px; margin-right: 5px; background: #38a66a; border-radius: 50%; content: ""; }
.product-row-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.product-row-actions .row-link { padding: 2px 0; color: #797e74; background: transparent; border: 0; font-size: 10px; text-decoration: none; cursor: pointer; }
.product-row-actions .row-link:first-child { color: #8c6c00; }
.product-row-actions .row-link:hover { color: #282b25; text-decoration: underline; }
.product-list-footer { display: flex; min-height: 48px; align-items: center; gap: 16px; padding: 0 20px; color: #888e85; font-size: 10px; }
.product-list-footer small { flex: 1; color: #a0a49d; text-align: center; }
.product-list-footer [data-product-pagination] { padding: 5px 9px; color: #73786f; border: 1px solid #eee5bb; border-radius: 6px; white-space: nowrap; }
.product-center-note { display: flex; align-items: center; gap: 7px; margin: 0; color: #8b9087; font-size: 10px; }
.product-center-note span { color: #a5aa9f; font-size: 13px; }
.product-empty-state { display: grid; min-height: 190px; align-content: center; justify-items: center; gap: 9px; color: #777d73; border-top: 1px solid var(--product-line); }
.product-empty-state b { color: #3b3e37; font-size: 13px; }
.product-empty-state span { font-size: 11px; }
.product-empty-state .button { margin-top: 3px; }
.product-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; padding: 18px 20px 22px; border-top: 1px solid var(--product-line); }
.product-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--product-line); border-radius: 10px; transition: border-color .16s ease, transform .16s ease; }
.product-card:hover { border-color: #dfcc6e; transform: translateY(-2px); }
.product-card-select { position: absolute; top: 11px; left: 11px; z-index: 1; display: grid; width: 24px; height: 24px; place-items: center; background: rgba(255,255,255,.92); border: 1px solid var(--product-line); border-radius: 6px; }
.product-card-image { display: grid; height: 176px; place-items: center; padding: 15px; background: #f7f8f5; }
.product-card-image img, .product-card-image .product-image-placeholder { width: 100%; height: 100%; object-fit: contain; }
.product-card-body { display: grid; gap: 7px; padding: 13px; }
.product-card-name { overflow: hidden; color: #30332d; font-size: 12px; font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.product-card-body > small, .product-card-meta { color: #969b93; font-size: 10px; }
.product-card-meta { display: flex; justify-content: space-between; gap: 8px; }
.product-card-prices { display: flex; align-items: baseline; gap: 9px; padding-top: 7px; border-top: 1px solid #f0f1ed; }
.product-card-prices b { font-size: 12px; }
.product-card-prices small { color: #999e96; font-size: 10px; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

@media (max-width: 1050px) {
  .product-overview { gap: 10px; }
  .product-overview-tile { min-height: 112px; padding: 14px; }
  .product-category-bar { padding: 0 10px; }
  .product-category-tab { padding: 0 10px; }
  .product-list-toolbar { flex-wrap: wrap; padding: 12px; }
  .product-search { width: min(100%, 340px); }
}
@media (max-width: 760px) {
  .product-center-page { gap: 12px; }
  .product-center-page .page-heading { align-items: flex-start; }
  .product-center-actions { width: 100%; }
  .product-center-actions .button { flex: 1; justify-content: center; }
  .product-overview { grid-template-columns: 1fr; gap: 8px; }
  .product-overview-tile { min-height: 90px; padding: 12px 15px; }
  .product-overview-tile > b { margin-top: 6px; font-size: 24px; }
  .product-overview-tile p { margin-top: 6px; }
  .product-category-bar { min-height: 53px; }
  .product-category-tabs { margin-right: auto; }
  .product-category-tab { min-height: 53px; padding: 0 9px; font-size: 11px; }
  .product-category-manage { max-width: 62px; gap: 4px; font-size: 10px; }
  .product-subcategory-bar { padding: 7px 12px; }
  .product-list-toolbar { gap: 8px; }
  .product-search { width: 100%; min-width: 100%; }
  .product-list-toolbar select { flex: 1; min-width: 0; }
  .product-list-toolbar .toolbar-count { margin-left: auto; }
  .product-list-footer { flex-wrap: wrap; gap: 7px; padding: 10px 12px; }
  .product-list-footer small { order: 3; flex-basis: 100%; text-align: left; }
  .product-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 12px; }
  .product-card-image { height: 135px; }
  .product-card-body { padding: 10px; }
  .product-card-meta { flex-direction: column; gap: 2px; }
  .product-card-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 390px) {
  .product-card-grid { grid-template-columns: 1fr; }
  .product-category-manage svg { display: none; }
}

/* Compact card layouts for category and usage scene maintenance. */
.taxonomy-settings-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--product-line, var(--border));
  border-radius: 12px;
}
.taxonomy-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
}
.taxonomy-category-card {
  display: grid;
  min-width: 0;
  min-height: 132px;
  align-content: start;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e8df;
  border-radius: 11px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.taxonomy-category-card:hover,
.taxonomy-scene-card:hover { border-color: #d6d8c9; box-shadow: 0 4px 14px rgba(45, 48, 38, .045); }
.taxonomy-category-card { gap: 8px; padding: 14px 16px 10px; }
.taxonomy-category-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr) 22px; align-items: center; gap: 10px; }
.taxonomy-category-icon,
.taxonomy-scene-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  color: #7b846d;
  background: #f3f4ee;
  border-radius: 9px;
}
.taxonomy-category-icon svg { width: 20px; height: 20px; }
.taxonomy-category-icon img { width: 100%; height: 100%; object-fit: cover; }
.taxonomy-category-title { display: grid; min-width: 0; gap: 3px; }
.taxonomy-category-title b,
.taxonomy-scene-info b { overflow: hidden; color: #30332d; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.taxonomy-category-title small,
.taxonomy-scene-info > span { color: #8e938a; font-size: 10px; }
.taxonomy-add-child {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  color: #7f8772;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}
.taxonomy-add-child:hover { color: #4e5a3a; background: #f1f3eb; }
.taxonomy-category-children { display: flex; min-height: 26px; flex-wrap: wrap; align-items: center; gap: 6px; }
.taxonomy-child-chip { display: inline-flex; min-height: 25px; align-items: center; padding: 0 7px; color: #68725d; background: #f4f5f0; border: 1px solid #eceee7; border-radius: 4px; font-size: 10px; }
.taxonomy-empty-child { color: #a0a49c; font-size: 10px; }
.taxonomy-child-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding-top: 10px; border-top: 1px solid #eef0ea; }
.taxonomy-child-create[hidden] { display: none; }
.taxonomy-child-create .field { min-width: 0; margin: 0; }
.taxonomy-child-create .field > span { font-size: 10px; }
.taxonomy-child-create input { height: 34px; padding: 0 9px; font-size: 11px; }
.taxonomy-child-create .button { min-height: 34px; padding: 0 11px; font-size: 11px; }
.taxonomy-category-edit { min-width: 0; border-top: 0; justify-self: end; margin-top: -4px; }
.taxonomy-category-edit > summary,
.scene-card-edit > summary {
  display: flex;
  min-height: 18px;
  align-items: center;
  color: #72796d;
  cursor: pointer;
  font-size: 10px;
  list-style: none;
}
.taxonomy-category-edit > summary::-webkit-details-marker,
.scene-card-edit > summary::-webkit-details-marker,
.taxonomy-create-details > summary::-webkit-details-marker { display: none; }
.taxonomy-category-edit > summary::after,
.scene-card-edit > summary::after { margin-left: auto; color: #90968b; content: '+'; font-size: 15px; }
.taxonomy-category-edit > summary { min-height: 14px; color: #858b7d; font-size: 9px; }
.taxonomy-category-edit > summary::after { font-size: 12px; }
.taxonomy-category-edit[open] > summary::after,
.scene-card-edit[open] > summary::after { content: '−'; }
.taxonomy-category-edit-list { display: grid; gap: 8px; padding-top: 8px; }
.taxonomy-category-edit-list .category-editor-row,
.taxonomy-orphans .category-editor-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 10px 0; border-top: 1px solid #eff0eb; }
.taxonomy-category-edit-list .category-editor-row.is-child,
.taxonomy-orphans .category-editor-row.is-child { padding-left: 0; }
.taxonomy-category-edit-list .category-row-form,
.taxonomy-orphans .category-row-form { display: grid; grid-template-columns: 1fr minmax(64px, 84px) auto; gap: 7px; }
.taxonomy-category-edit-list .category-depth-label,
.taxonomy-orphans .category-depth-label,
.taxonomy-category-edit-list .category-visible,
.taxonomy-orphans .category-visible { grid-column: 1 / -1; }
.taxonomy-category-edit-list .category-alt-input,
.taxonomy-orphans .category-alt-input { width: 100%; grid-column: 1 / -1; }
.taxonomy-category-edit-list .category-image-editor,
.taxonomy-orphans .category-image-editor { width: 100%; grid-template-columns: 54px minmax(0, auto) minmax(0, auto); flex: auto; }
.taxonomy-category-edit-list .category-image-preview,
.taxonomy-orphans .category-image-preview { width: 54px; height: 48px; }
.taxonomy-category-edit-list .category-delete-button,
.taxonomy-orphans .category-delete-button { justify-self: start; }
.taxonomy-create-details { position: relative; }
.taxonomy-create-details > summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 13px;
  color: #4e4630;
  background: #fff;
  border: 1px solid #e3dfcf;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
  list-style: none;
  white-space: nowrap;
}
.taxonomy-create-details > summary:hover { border-color: #d6bc4f; background: #fffdf5; }
.taxonomy-create-details[open] > summary { margin-bottom: 10px; }
.taxonomy-create-details .category-create-form,
.taxonomy-create-details .scene-create-form {
  min-width: 260px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6e8df;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(28, 32, 25, .08);
}
.taxonomy-create-details .category-create-form { grid-template-columns: minmax(180px, 1fr) auto; align-items: end; gap: 10px; }
.taxonomy-create-details .category-create-form .field,
.taxonomy-create-details .scene-create-form .field { min-width: 0; margin: 0; }
.taxonomy-settings-note { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 20px; color: #899080; background: #fbfcf9; border-top: 1px solid #eceee7; font-size: 10px; }
.taxonomy-settings-note > span { color: #8d977b; font-size: 14px; }
.taxonomy-orphans { grid-column: 1 / -1; padding: 12px 16px; background: #fffdf8; border: 1px dashed #e2d9bc; border-radius: 10px; }
.taxonomy-orphans h3 { margin: 0; color: #746b53; font-size: 12px; }
.taxonomy-scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.taxonomy-scene-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 164px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-rows: 52px minmax(42px, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #e5e8df;
  border-radius: 11px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.taxonomy-scene-icon { width: 52px; height: 52px; grid-column: 1; grid-row: 1; }
.taxonomy-scene-icon svg { width: 23px; height: 23px; }
.taxonomy-scene-icon.tone-0 { background: #eef1e7; }
.taxonomy-scene-icon.tone-1 { background: #f0eee8; }
.taxonomy-scene-icon.tone-2 { background: #eaf0f2; }
.taxonomy-scene-icon.tone-3 { background: #f0eee8; }
.taxonomy-scene-icon.tone-4 { background: #eeebf3; }
.taxonomy-scene-info { display: grid; min-width: 0; grid-column: 1 / -1; grid-row: 2; align-content: end; gap: 3px; padding-right: 70px; }
.taxonomy-scene-info b { font-size: 13px; }
.taxonomy-scene-disabled { display: inline-flex; margin-left: 7px; padding: 1px 5px; color: #8a6e3e; background: #f9f3e6; border-radius: 4px; font-size: 9px; font-weight: 500; vertical-align: 1px; }
.scene-card-edit { z-index: 1; min-width: 0; grid-column: 3; grid-row: 2; align-self: end; }
.scene-card-edit > summary { justify-content: flex-end; color: #6f7865; font-size: 10px; white-space: nowrap; }
.scene-card-edit > summary::after { display: none; }
.scene-card-edit[open] { grid-column: 1 / -1; grid-row: 3; align-self: stretch; padding-top: 9px; border-top: 1px solid #eef0ea; }
.scene-card-edit[open] > summary { justify-content: flex-start; }
.scene-card-edit[open] > summary::after { display: block; }
.scene-card-edit .scene-settings-row { grid-template-columns: minmax(0, 1fr) 72px 90px auto auto; gap: 8px; padding: 9px 0 0; border: 0; }
.scene-card-edit .scene-settings-row .field > span { font-size: 10px; }
.scene-card-edit .scene-settings-row .field input,
.scene-card-edit .scene-settings-row .field select { min-width: 0; height: 34px; padding: 0 7px; font-size: 11px; }
.scene-card-edit .scene-settings-row > .button,
.scene-card-edit .scene-settings-row > .row-link { min-height: 32px; padding: 0 8px; font-size: 10px; }
.taxonomy-scene-help { margin-top: 12px; }
.heading-actions:has(.taxonomy-create-details) { align-items: flex-start; }

@media (max-width: 1250px) {
  .taxonomy-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .taxonomy-scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .taxonomy-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
  .taxonomy-scene-grid { gap: 12px; padding: 14px; }
  .taxonomy-create-details .category-create-form,
  .taxonomy-create-details .scene-create-form { min-width: min(300px, calc(100vw - 36px)); }
}
@media (max-width: 620px) {
  .taxonomy-category-grid,
  .taxonomy-scene-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
  .taxonomy-category-card { min-height: 120px; padding: 13px; }
  .taxonomy-scene-card { min-height: 140px; padding: 15px; }
  .taxonomy-create-details .category-create-form,
  .taxonomy-create-details .scene-create-form { min-width: min(280px, calc(100vw - 30px)); }
  .taxonomy-create-details .scene-create-form { grid-template-columns: minmax(0, 1fr) 70px auto; }
  .scene-card-edit .scene-settings-row { grid-template-columns: minmax(0, 1fr) 68px; }
  .scene-card-edit .scene-settings-row .scene-status { grid-column: 1 / -1; }
}
