/* Console design system. Shared by every operations view. */
:root {
  --ink: #172c35; --ink-soft: #30434b; --muted: #647780;
  --line: #e0e7ea; --surface: #fff; --soft: #f5f7f9;
  --teal: #117b6a; --teal-soft: #edf7f3; --green: #117b6a; --green-dark: #096252;
  --radius: 12px; --shadow: 0 3px 16px rgba(23,44,53,.04);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px; color: var(--ink);
}
body { height: 100vh; height: 100dvh; overflow: hidden; background: var(--soft); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #57b5a5; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
button { transition: background .15s, border-color .15s, box-shadow .15s; }
* { scrollbar-width: thin; scrollbar-color: #c4d0d5 transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #c4d0d5; border-radius: 6px; }
.app-shell { display: grid; grid-template-columns: 224px minmax(0,1fr); height: 100%; min-height: 0; }
.sidebar { position: relative !important; top: auto; width: auto; height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; background: #142d35; border: 0; padding: 24px 14px 14px; }
.brand { padding: 0 10px 22px; gap: 12px; border-bottom: 1px solid #ffffff12; }
.brand strong { font-size: 21px; letter-spacing: .06em; color: #fff; }
.brand span { color: #96aeb6; font-size: 11px; }
.brand-mark { background: #ffffff10; border-radius: 12px; width: 40px; height: 40px; }
.sidebar nav { flex: 1; min-height: 0; overflow: auto; padding: 8px 0 14px; }
.nav-label { padding: 0 12px; margin: 18px 0 7px; color: #8ea9b2; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.nav-item { min-height: 38px; gap: 11px; padding: 9px 12px; margin: 2px 0; border: 0; border-radius: 7px; color: #bbcbd0; font-size: 13px; font-weight: 450; }
.nav-item img { width: 17px; height: 17px; opacity: .76; }
.nav-item:hover { background: #ffffff08; color: white; }
.nav-item.active { background: #2c514f; color: #f3fffb; box-shadow: inset 3px 0 #66d0b5; }
.nav-item.active img { opacity: 1; }
.sidebar-foot { min-height: 48px; border-top: 1px solid #ffffff12; padding: 14px 10px 0; color: #8ea9b2; font-size: 11px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.sidebar-foot .text-button { margin-left: auto; padding: 4px; color: #bbcbd0; }
.main-content { display: grid; grid-template-rows: auto minmax(0,1fr); min-width: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.topbar { position: relative; top: auto; z-index: 20; min-height: 78px; padding: 15px 28px; gap: 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: none; }
.page-heading { min-width: 180px; }
.topbar h1 { font-size: 21px; line-height: 1.35; margin: 4px 0 0; letter-spacing: -.02em; }
.breadcrumb { color: #7a8b93; font-size: 10px; }
.topbar-search { width: min(320px,30vw); margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; }
.topbar-search input { min-height: 38px; font-size: 12px; }
.topbar-actions { gap: 12px; }
.health-summary { padding: 7px 10px; font-size: 11px; white-space: nowrap; border-radius: 6px; }
.admin-badge { border: 0; font-size: 11px; padding: 0; }
.admin-avatar { background: #e9eff2; color: #48606a; width: 30px; height: 30px; }
.icon-button, .topbar-tool { border-radius: 7px; min-width: 32px; min-height: 32px; }
.content { overflow: auto; min-height: 0; padding: 26px 28px 48px; scroll-behavior: smooth; overscroll-behavior: contain; }
.content > * { max-width: 1600px; margin-left: auto; margin-right: auto; }
.panel-kicker, .eyebrow, .table-page-kicker { font-size: 10px; letter-spacing: .13em; color: #64858c; }
.workspace-header { gap: 18px; margin-bottom: 18px; align-items: center; }
.workspace-header h2, .settings-intro h2, .overview-intro h2, .runtime-intro h2 { font-size: 24px; letter-spacing: -.025em; line-height: 1.35; margin: 5px 0 8px; }
.workspace-header p, .overview-intro p { font-size: 12px; line-height: 1.7; color: var(--muted); }
.workspace-header .panel-kicker { color: #64858c; }
.workspace-stats { gap: 14px; margin: 0 0 20px; }
.workspace-stat, .metric, .table-summary article { padding: 18px 20px; min-height: 100px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.workspace-stat::after, .metric::after, .metric::before { display: none; }
.workspace-stat strong, .metric strong { font-size: 29px; font-weight: 650; letter-spacing: -.035em; line-height: 1.3; }
.workspace-stat > span, .metric-label { color: var(--muted); font-size: 12px; }
.workspace-stat small, .metric small { font-size: 11px; }
.workbench-panel, .section-panel, .settings-panel, .settings-side-panel, .settings-nav, .product-card, .membership-card, .model-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.workbench-panel { padding: 20px; }
.section-head { padding: 18px 20px; }
.workspace-toolbar, .table-toolbar, .filters { gap: 10px; }
.workspace-toolbar { padding: 12px 0; margin: 0 0 14px; background: transparent; }
.workspace-toolbar input, .workspace-toolbar select, .filters input, .filters select { min-height: 38px; border-radius: 7px; font-size: 12px; }
.filter-search-wrap { flex: 1; min-width: 180px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { border: 1px solid #d9e2e6; border-radius: 7px; background: #fff; color: var(--ink); padding: 10px 12px; min-height: 40px; box-shadow: none; }
input[readonly], input:disabled { background: #f6f8f9 !important; color: #71858d !important; }
input::placeholder, textarea::placeholder { color: #95a3aa; font-weight: 400; }
textarea { resize: vertical; line-height: 1.65; }
input[type=checkbox], input[type=radio] { accent-color: var(--teal); width: 16px; height: 16px; }
label { font-size: 12px; color: #435a65; line-height: 1.6; }
.primary-button, .secondary-button { min-height: 38px; border-radius: 7px; padding: 9px 15px; font-size: 12px; line-height: 1.5; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; }
.primary-button { color: #fff; background: var(--teal); border: 1px solid var(--teal); box-shadow: 0 2px 3px #117b6a15; }
.primary-button:hover { background: #096252; border-color: #096252; }
.secondary-button { background: white; border: 1px solid #d7e1e5; color: #3c5661; }
.secondary-button:hover { background: #f4f8f9; border-color: #aec2ca; }
.table-wrap, .workspace-table { overflow: auto; max-height: none; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { font-size: 11px; font-weight: 600; color: #768a94; background: #f8fafb; padding: 12px 14px; white-space: nowrap; }
td { padding: 14px; color: #314a54; border-bottom: 1px solid #edf1f3; }
tr:last-child td { border-bottom: 0; }
.selectable-row:hover { background: #f5faf8; }
.status { padding: 4px 8px; border-radius: 5px; font-size: 10px; font-weight: 550; line-height: 1.4; white-space: nowrap; }
.status.success { color: #147657; background: #eaf6f0; }
.status.danger { color: #b23e4d; background: #fff0f1; }
.status.warning { color: #97631e; background: #fff6e5; }
.pagination { padding: 14px 0 0; border-top: 1px solid var(--line); background: transparent; margin-top: 6px; font-size: 12px; gap: 8px; }
.pagination > span { margin-right: auto; color: #7b8d95; }
.empty-state, .state-box { padding: 40px 24px; background: transparent; min-height: 180px; border: 0; text-align: center; }
.empty-state strong, .state-box strong { color: #49616b; font-size: 15px; }
.drawer { width: min(580px,100vw); height: 100dvh; padding: 24px; border: 0; box-shadow: -10px 0 40px #142d351a; }
.drawer .detail-heading { position: sticky; top: -24px; padding: 16px 0; background: #fff; z-index: 2; }
.drawer h2, .drawer h3 { font-size: 20px; }
.drawer p, .drawer small { line-height: 1.6; }
.drawer-loading, .drawer-error { padding: 28px 0; }
.drawer-metrics > div { border-radius: 8px; }
.settings-layout { grid-template-columns: 180px minmax(0,1fr) 220px; gap: 18px; }
.settings-nav, .settings-aside { top: 0; }
.settings-grid, .product-fields, .catalog-fields { gap: 18px; }
.settings-grid input, .settings-grid select, .settings-grid textarea { font-size: 13px; }
.settings-actions { background: #f8fafb; border-top: 1px solid var(--line); padding: 14px 20px; }
.catalog-library-layout, .risk-layout { gap: 18px; }
.catalog-preview, .workbench-detail, .task-detail { padding: 20px; border-radius: 12px; background: white; border: 1px solid var(--line); }
.todo-panel { top: 68px; right: 24px; max-height: calc(100dvh - 90px); overflow: auto; border-radius: 10px; }
.toast { z-index: 100; bottom: 24px; border-radius: 8px; padding: 12px 18px; max-width: calc(100vw - 32px); font-size: 13px; }
.login-view { height: 100dvh; overflow: auto; background: #f4f7f8; }
.login-panel { padding: 36px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 16px 48px #142d350a; }
.login-panel h1 { font-size: 25px; }
.login-panel .primary-button { width: 100%; }
.library-audio { width: 100%; margin: 14px 0; }
.inline-error { color: #b23e4d; font-size: 12px; }
@media(max-width:1200px) {
 .app-shell { grid-template-columns: 208px minmax(0,1fr); }
 .topbar { padding: 14px 22px; gap: 14px; }
 .topbar-search { width: min(240px,24vw); }
 .admin-badge > span:last-child { display: none; }
 .content { padding: 22px; }
 .settings-layout { grid-template-columns: 170px minmax(0,1fr) !important; }
 .health-summary { display: none; }
}
@media(max-width:900px) {
 .topbar-search { display: none; }
 .workspace-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .settings-aside { display: none; }
 .catalog-library-layout, .risk-layout { grid-template-columns: 1fr; }
}
@media(max-width:720px) {
 .app-shell { display: block; }
 .sidebar { position: fixed !important; z-index: 50; inset: 0 auto 0 0; width: min(280px,calc(100vw - 48px)) !important; }
 .topbar { min-height: 68px; padding: 12px 16px; gap: 10px; }
 .topbar h1 { font-size: 18px; }
 .page-heading { min-width: 0; }
 .content { padding: 18px 14px 32px; }
 .workspace-header { align-items: start; flex-wrap: wrap; }
 .workspace-header h2 { font-size: 21px; }
 .workspace-stats { gap: 10px; }
 .workspace-stat, .metric { min-height: 88px; padding: 14px; }
 .workspace-stat strong, .metric strong { font-size: 25px; }
 .workbench-panel { padding: 14px; }
 .workspace-toolbar { flex-wrap: wrap; }
 .workspace-toolbar .filter-search-wrap { width: 100%; flex-basis: 100%; }
 .settings-layout { display: block !important; }
 .settings-nav { position: static; }
 .pagination { flex-wrap: wrap; }
 .drawer { padding: 18px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
/* Official samples: compact library and a focused, persistent editor. */
.sample-admin-hero { padding: 20px 24px; margin: 0 0 16px; border-radius: 12px; border-color: #d8e8e4; background: #eff7f4; gap: 20px; }
.sample-admin-hero h2 { font-size: 24px; color: #244c43; margin: 5px 0 6px; }
.sample-admin-hero p { color: #688079; font-size: 12px; line-height: 1.6; margin: 4px 0; }
.sample-admin-mascot { width: 66px; height: 74px; }
.sample-experience-details { border: 1px solid var(--line); border-radius: 10px; background: white; margin-bottom: 20px; }
.sample-experience-details > summary { cursor: pointer; padding: 15px 20px; color: #526b75; font-size: 12px; font-weight: 600; }
.sample-admin-settings { border: 0; box-shadow: none; margin: 0; padding: 10px 20px 20px; grid-template-columns: 1fr 1fr 1fr auto; border-radius: 0 0 12px 12px; gap: 16px; }
.sample-admin-settings > div:first-child { display: none; }
.sample-admin-workspace { grid-template-columns: minmax(250px,.68fr) minmax(0,1.5fr); gap: 20px; }
.sample-admin-workspace > .section-panel { padding: 20px; }
.sample-admin-list-head { padding-bottom: 14px; margin-bottom: 14px; }
.sample-admin-list-head h3 { font-size: 14px; }
.sample-admin-workspace > .section-panel > input[type=search] { width: 100%; margin-bottom: 10px; font-size: 12px; }
.sample-admin-list-item { border: 0; border-radius: 8px; padding: 12px 10px; min-height: 80px; margin: 4px 0; gap: 10px; }
.sample-admin-list-item:hover { background: #f7faf9; }
.sample-admin-list-item.selected { background: #edf7f3; box-shadow: inset 3px 0 #299880; }
.sample-admin-list-item > img { width: 42px; height: 42px; border-radius: 8px; }
.sample-admin-list-item strong { font-size: 12px; }
.sample-admin-list-item small { font-size: 10px; color: #7b8e95; line-height: 1.4; margin-top: 5px; }
.sample-admin-list-item .status { font-size: 10px; padding: 4px 6px; }
.sample-admin-empty { padding: 38px 12px; min-height: 230px; }
.sample-admin-empty h3 { font-size: 14px; color: #48626a; }
.sample-admin-empty p { font-size: 12px; color: #82949b; line-height: 1.7; }
.sample-admin-editor-head { margin-bottom: 0; padding-bottom: 16px; }
.sample-admin-editor-head h3 { font-size: 19px; margin: 4px 0 0; }
.sample-admin-form { gap: 0; }
.sample-editor-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.sample-editor-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; color: #84949b; padding: 14px 0 12px; font-size: 12px; }
.sample-editor-tabs button.active { color: var(--teal); border-color: var(--teal); font-weight: 600; }
.sample-form-panel { display: grid; gap: 20px; }
.sample-admin-field { gap: 7px; }
.sample-admin-field > label { font-size: 12px; font-weight: 600; color: #47606b; }
.sample-admin-field input:not([type=checkbox]), .sample-admin-field textarea, .sample-admin-field select { background: white; border-color: #dce4e8; border-radius: 7px; color: var(--ink); font-size: 13px; padding: 10px 12px; }
.sample-admin-field small { font-size: 11px; color: #8b9ba2; }
.sample-admin-row { gap: 18px; }
.sample-admin-row textarea { min-height: 40px; height: 40px; }
.sample-admin-upload { border: 1px dashed #c5d9d4; background: #f7faf9; min-height: 96px; justify-content: center; align-items: center; padding: 16px; border-radius: 8px; text-align: center; }
.sample-admin-upload.dragover { border-color: #16846d; background: #e9f5ef; }
.sample-admin-upload.uploaded { border-style: solid; }
.sample-upload-button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: #2a7161; padding: 5px 12px; max-width: 100%; }
.sample-upload-button img { width: 18px; height: 18px; }
.sample-upload-button strong { font-size: 12px; overflow-wrap: anywhere; }
.sample-admin-upload small { font-size: 10px; color: #859c95; }
.sample-admin-cover { width: 92px; height: 92px; border-radius: 8px; align-self: end; }
.sample-admin-form audio { margin: 0; width: 100%; }
.sample-editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; margin-top: 24px; border-top: 1px solid var(--line); }
.sample-save-state { font-size: 11px; color: #7b8e96; }
.sample-admin-error { margin-top: 5px; }
.sample-resource-details { border-top: 1px solid var(--line); padding-top: 14px; }
.sample-resource-details summary { cursor: pointer; font-size: 12px; color: #6c818b; margin-bottom: 12px; }
.sample-resource-details .sample-admin-field { margin-top: 12px; }
.sample-admin-check { color: #526b75; font-size: 12px; }
.sample-admin-note { background: #f4f7f9; color: #738993; font-size: 11px; }
.sample-filter-empty { padding: 24px 12px; text-align: center; color: var(--muted); }
@media(max-width:1000px) { .sample-admin-workspace {grid-template-columns: minmax(220px,.7fr) minmax(0,1.2fr);} .sample-admin-row {grid-template-columns:1fr;} .sample-admin-settings {grid-template-columns:1fr 1fr;} }
@media(max-width:720px) { .sample-admin-workspace {grid-template-columns:1fr;} .sample-admin-workspace>.section-panel {padding:16px;} .sample-admin-list {max-height:260px;overflow:auto;} .sample-admin-hero {padding:18px;} .sample-admin-hero h2 {font-size:20px;} .sample-admin-mascot {width:48px;height:60px;} .sample-editor-tabs {gap:20px;} .sample-admin-settings {grid-template-columns:1fr;} }
/* Resolve legacy intrinsic widths and label margins at the shell boundary. */
.content { width: 100%; max-width: none; margin: 0; }
.content > .sample-admin-hero, .content > .sample-experience-details, .content > .sample-admin-workspace { width: 100%; }
#main-nav { display: block !important; min-width: 0; overflow-y: auto !important; overflow-x: hidden !important; }
#main-nav .nav-item { width: 100%; min-width: 0; }
#main-nav .nav-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-search input[type=search] { padding: 0; min-height: 0; border: 0; background: transparent; }
.sample-admin-field > label, .sample-admin-check { margin: 0; }
.sample-form-panel { gap: 16px; }
.sample-admin-editor-head .panel-kicker { margin-bottom: 4px; }
#global-search { padding: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; }
.sample-editor-actions { position: sticky; bottom: 0; background: #fff; z-index: 3; padding: 16px 0 0; }
.sample-admin-row:has(.sample-admin-cover[hidden]) { grid-template-columns: 1fr; }
.catalog-filter-toolbar .workspace-toolbar { flex: 1; margin-bottom: 0; min-width: 180px; }
.catalog-filter-toolbar .filter-search-wrap input { padding-left: 34px; }
.catalog-library-panel table { min-width: 580px; }
.catalog-song-drawer { align-self: start; }
/* Dense model rows become readable forms at every viewport. */
.model-config-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 18px; align-items: start; width: 100%; min-width: 0; padding: 24px; }
.model-config-row > div:first-child { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.model-config-row > label { display: grid; gap: 6px; margin: 0; min-width: 0; }
.model-config-row > label.wide-field { grid-column: 1 / -1; }
.model-config-row .tier-model-option { display: flex; align-items: center; min-height: 40px; margin-top: 24px; }
.model-config-row input, .model-config-row select { width: 100%; }
.model-config-row input[type=checkbox] { width: 16px; flex-shrink: 0; }
.model-config-row > button { grid-column: 1 / -1; justify-self: end; }
@media(max-width:1000px) { .model-config-row { grid-template-columns: repeat(2,minmax(0,1fr)) !important; } }
@media(max-width:720px) { .model-config-row { grid-template-columns: minmax(0,1fr) !important; padding: 16px; } .model-config-row .tier-model-option { margin-top: 0; } }
.model-config-row > *, .tier-config-row > * { grid-column: auto !important; min-width: 0; }
.model-config-row > div:first-child, .model-config-row > .wide-field, .model-config-row > button { grid-column: 1 / -1 !important; }
.tier-config-row { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 18px; padding: 24px; align-items: start; }
.tier-config-row > div:first-child, .tier-config-row > .wide-field, .tier-config-row > fieldset, .tier-config-row > button { grid-column: 1 / -1 !important; }
.tier-config-row > button { justify-self: end; }
.tier-config-row label { min-width: 0; }
@media(max-width:1000px) { .tier-config-row { grid-template-columns: repeat(2,minmax(0,1fr)) !important; } }
@media(max-width:720px) { .tier-config-row { grid-template-columns: minmax(0,1fr) !important; padding:16px; } }
.sample-admin-editor, .sample-admin-form { overflow: visible; }
.sample-editor-actions { padding: 14px 0; box-shadow: 0 -6px 14px #ffffffed; }
.sample-cover-details { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.sample-cover-details summary { cursor: pointer; color: #526b75; font-size: 12px; font-weight: 600; }
.sample-cover-details[open] summary { margin-bottom: 12px; }
/* Keep the white brand glyph visible on the light login surface. */
.login-panel .brand-mark { background: #142d35; box-shadow: none; }
.login-panel .brand-mark img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
