:root {
  color: #101828;
  background: #f9fafb;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  --brand-25: #f2f7ff;
  --brand-50: #ecf3ff;
  --brand-100: #dde9ff;
  --brand-200: #c2d6ff;
  --brand-300: #9cb9ff;
  --brand-500: #465fff;
  --brand-600: #3641f5;
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f2f4f7;
  --gray-200: #e4e7ec;
  --gray-300: #d0d5dd;
  --gray-400: #98a2b3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1d2939;
  --sidebar-width: 250px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--gray-50); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.admin-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  border-right: 1px solid var(--gray-200);
  background: #fff;
  padding: 0 20px;
}
.brand { display: flex; height: 92px; align-items: center; gap: 11px; padding: 0 10px; text-decoration: none; }
.brand-mark, .user-avatar { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--brand-500); color: #fff; font-size: 18px; font-weight: 700; }
.brand-name { color: var(--gray-800); font-size: 16px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.brand-name span { display: block; margin-top: 3px; color: var(--gray-500); font-size: 12px; font-weight: 500; letter-spacing: .08em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0 24px; }
.nav-label { margin: 0 12px 14px; color: var(--gray-400); font-size: 12px; line-height: 20px; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 12px; margin: 0 0 7px; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--gray-700); font-weight: 500; text-align: left; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--gray-100); }
.nav-item.active { background: var(--brand-50); color: var(--brand-500); }
.nav-item svg, .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 14px 10px; border-top: 1px solid var(--gray-100); }
.sidebar-user .user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gray-100); color: var(--gray-600); font-size: 13px; }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user strong { color: var(--gray-700); font-size: 13px; }
.sidebar-user small { margin-top: 3px; color: var(--gray-400); font-size: 11px; }
.sidebar-overlay { display: none; }

.workspace { min-width: 0; min-height: 100vh; min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 28px; border-bottom: 1px solid var(--gray-200); background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.topbar-heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.topbar-heading p { margin-bottom: 4px; color: var(--gray-400); font-size: 12px; }
.topbar h1 { color: #101828; font-size: 19px; line-height: 1.3; white-space: nowrap; }
.icon-button { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; color: var(--gray-500); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
#save-status { min-width: 120px; color: #039855; font-size: 13px; text-align: right; }
button:not(.nav-item):not(.icon-button):not(.entity-card):not(.entity-select):not(.start-stage-button):not(.table-action):not(.content-tab):not(.source-tab):not(.collection-content-tab):not(.upload-cover):not(.user-list-cover-button):not(.modal-close):not(.modal-backdrop) { min-height: 40px; padding: 0 16px; border: 1px solid var(--brand-500); border-radius: 8px; background: var(--brand-500); color: #fff; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
button:not(.nav-item):not(.icon-button):not(.entity-card):not(.entity-select):not(.start-stage-button):not(.table-action):not(.content-tab):not(.source-tab):not(.collection-content-tab):not(.upload-cover):not(.user-list-cover-button):not(.modal-close):not(.modal-backdrop):hover { background: var(--brand-600); }
button.secondary { border-color: var(--gray-300); background: #fff; color: var(--gray-700); }
button.secondary:hover { background: var(--gray-50); }
button:disabled { cursor: wait; opacity: .55; }

.content { width: 100%; max-width: none; margin: 0; padding: 24px; }
.page-panel { display: none; }
.page-panel.active { display: block; width: 100%; }
.content-tabs { display: flex; width: 100%; gap: 4px; margin-bottom: 20px; padding: 4px; overflow-x: auto; border: 1px solid var(--gray-200); border-radius: 10px; background: #fff; }
.content-tab { flex: 1 0 92px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--gray-500); font-size: 13px; font-weight: 500; white-space: nowrap; }
.content-tab:hover { background: var(--gray-50); color: var(--gray-700); }
.content-tab.active { background: var(--brand-50); color: var(--brand-500); }
.content-source-tabs { display: flex; gap: 22px; margin: 0 0 14px; padding: 0 4px; border-bottom: 1px solid var(--gray-200); }
.source-tab { position: relative; min-height: 40px; padding: 0 4px 10px; border: 0; background: transparent; color: var(--gray-500); font-size: 13px; font-weight: 500; }
.source-tab.active { color: var(--brand-500); font-weight: 600; }
.source-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--brand-500); content: ""; }
.collection-content-tabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--gray-200); border-radius: 10px; background: #fff; }
.collection-content-tab { flex: 1; min-height: 38px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--gray-500); font-size: 13px; font-weight: 500; }
.collection-content-tab:hover { background: var(--gray-50); color: var(--gray-700); }
.collection-content-tab.active { background: var(--brand-50); color: var(--brand-500); font-weight: 600; }
.result-showcase-tabs { display: flex; gap: 8px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--gray-200); border-radius: 10px; background: #fff; }
.result-showcase-tab { flex: 1; min-height: 38px !important; padding: 0 16px !important; border: 0 !important; border-radius: 7px !important; background: transparent !important; color: var(--gray-500) !important; box-shadow: none !important; }
.result-showcase-tab.active { background: var(--brand-50) !important; color: var(--brand-500) !important; font-weight: 600; }
.result-enabled { display: flex; align-items: center; gap: 8px; color: var(--gray-600); font-size: 13px; }
.result-enabled input { width: 16px; height: 16px; margin: 0; }
.media-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.media-field input { min-width: 0; }
.table-media-field { display: grid; min-width: 290px; grid-template-columns: minmax(160px,1fr) auto; gap: 6px; }
.media-upload-button { min-height: 34px !important; padding: 0 11px !important; font-size: 12px; }
.login-screen { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: 24px; background: #f2f4f7; }
.login-card { width: min(420px,100%); padding: 36px; border: 1px solid var(--gray-200); border-radius: 18px; background: #fff; box-shadow: 0 20px 30px rgba(16,24,40,.08); }
.login-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: var(--brand-500); color: #fff; font-size: 26px; font-weight: 700; }
.login-card > p:first-of-type { margin-top: 22px; color: var(--gray-400); font-size: 13px; }
.login-card h1 { margin: 5px 0 26px; color: var(--gray-900); font-size: 28px; }
.login-card label, .modal-field { display: grid; gap: 8px; margin-top: 16px; color: var(--gray-600); font-size: 13px; font-weight: 500; }
.login-card button { width: 100%; min-height: 44px; margin-top: 22px; }
.login-error { min-height: 20px; margin-top: 10px !important; color: #d92d20 !important; font-size: 12px !important; }
.form-submit-button { align-self: end; min-height: 42px; }
.module-stack { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: 20px; }
.workspace-grid { display: grid; width: 100%; grid-template-columns: 240px minmax(0,1fr); gap: 24px; }

.ui-card, .side-card, .metric-card { border: 1px solid var(--gray-200); background: #fff; }
.ui-card { width: 100%; margin-bottom: 20px; overflow: hidden; border-radius: 16px; }
.module-stack .ui-card { margin-bottom: 0; }
.ui-card-header { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-bottom: 1px solid var(--gray-100); }
.ui-card-header h2 { margin-top: 3px; color: var(--gray-900, #101828); font-size: 20px; }
.ui-card-header h3 { color: var(--gray-800); font-size: 16px; font-weight: 600; }
.ui-card-header p { margin-top: 5px; color: var(--gray-500); font-size: 13px; }
.ui-card-body { padding: 22px; }
.eyebrow { color: var(--brand-500); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.outline-badge, .count-chip { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; border: 1px solid var(--gray-200); border-radius: 999px; background: #fff; color: var(--gray-500); font-size: 11px; font-weight: 600; white-space: nowrap; }
.table-tools { display: flex; align-items: center; gap: 10px; }
.table-search { width: 240px; height: 38px; }
.table-actions { display: flex; align-items: center; gap: 6px; }
.table-action { min-height: 30px; padding: 0 9px; border: 1px solid var(--gray-200); border-radius: 6px; background: #fff; color: var(--gray-600); font-size: 12px; white-space: nowrap; }
.table-action:hover { border-color: var(--brand-300); color: var(--brand-500); }
.table-action.danger { color: #b42318; }
.table-action.danger:hover { border-color: #fda29b; background: #fef3f2; }
.table-action:disabled { cursor: not-allowed; opacity: .4; }
.user-summary-cell { min-width: 170px; }
.user-rank-cell { min-width: 72px; text-align: left; }
.user-rank { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--brand-50); color: var(--brand-500); font-size: 12px; font-weight: 700; }
.user-list-cover-button { position: relative; display: block; width: 72px; height: 42px; overflow: hidden; padding: 0; border: 0; border-radius: 6px; background: var(--gray-100); }
.user-list-cover-button.has-video { cursor: pointer; }
.user-list-cover-button:disabled { cursor: default; opacity: 1; }
.user-list-cover { display: block; width: 72px; height: 42px; border-radius: 6px; object-fit: cover; }
.user-list-cover.is-default { object-fit: contain; opacity: .2; }
.user-list-cover-play { position: absolute; top: 50%; left: 50%; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: rgba(16,24,40,.58); color: #fff; font-size: 10px; transform: translate(-50%,-50%); }
.user-summary-cell strong, .user-summary-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary-cell strong { color: var(--gray-700); font-size: 13px; font-weight: 600; }
.user-summary-cell small { min-height: 20px; margin-top: 6px; color: var(--gray-400); font-size: 12px; }
.user-summary-cell small .status-badge { vertical-align: top; }
.upload-cover { position: relative; display: block; width: 92px; height: 54px; overflow: hidden; padding: 0; border: 0; border-radius: 7px; background: var(--gray-100); }
.upload-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.upload-cover span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(16,24,40,.42); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.upload-cover:hover span { opacity: 1; }
.upload-cover:disabled { cursor: not-allowed; opacity: .5; }
.upload-cover:disabled span { display: none; }
.video-address { display: block; max-width: 280px; overflow: hidden; color: var(--gray-500); font-size: 12px; text-overflow: ellipsis; }
.status-badge { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: #ecfdf3; color: #027a48; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-badge.muted { background: var(--gray-100); color: var(--gray-500); }
.status-badge.info { background: var(--brand-50); color: var(--brand-500); }
.stage-entity-card .status-badge.info { background: #d92d20; color: #fff; }
.status-badge.error { background: #fef3f2; color: #b42318; }

.side-card { align-self: start; padding: 16px; border-radius: 16px; }
.side-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-card-heading h3 { color: var(--gray-800); font-size: 14px; font-weight: 600; }
.side-card-heading p { margin-top: 3px; color: var(--gray-400); font-size: 11px; }
.entity-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.entity-card { display: flex; width: 100%; min-height: 76px; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; border: 1px solid var(--gray-200); border-radius: 12px; background: #fff; color: var(--gray-700); text-align: left; box-shadow: none; }
.entity-card:hover { border-color: var(--brand-200); background: var(--brand-25); }
.entity-card.active { border-color: var(--brand-300); background: var(--brand-50); }
.stage-entity-card { min-height: 112px; flex-direction: column; align-items: stretch; }
.entity-select { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.start-stage-button { width: 100%; height: 30px; margin-top: 10px; border: 1px solid var(--brand-200); border-radius: 7px; background: #fff; color: var(--brand-500); font-size: 12px; font-weight: 600; }
.start-stage-button:hover { border-color: var(--brand-500); background: var(--brand-500); color: #fff; }
.entity-main { display: flex; min-width: 0; align-items: center; gap: 10px; }
.entity-number { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--gray-100); color: var(--gray-500); font-size: 12px; font-weight: 600; }
.entity-card.active .entity-number { background: var(--brand-100); color: var(--brand-500); }
.entity-copy { min-width: 0; }
.entity-copy strong, .entity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-copy strong { color: var(--gray-800); font-size: 13px; }
.entity-copy small { margin-top: 4px; color: var(--gray-400); font-size: 11px; }
.entity-count { flex: 0 0 auto; color: var(--gray-400); font-size: 11px; }

.form-grid { display: grid; grid-template-columns: repeat(3,minmax(180px,1fr)); gap: 18px 20px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-grid label, .compact-select { display: grid; gap: 7px; color: var(--gray-600); font-size: 13px; font-weight: 500; }
.form-grid .wide { grid-column: 1/-1; }
input, select, textarea { width: 100%; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; color: var(--gray-800); outline: none; box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: border .15s, box-shadow .15s; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 10px 12px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-300); box-shadow: 0 0 0 4px rgba(70,95,255,.1); }
.compact-select { min-width: 220px; grid-template-columns: auto 150px; align-items: center; white-space: nowrap; }
.compact-select select { height: 38px; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.metric-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric-card { display: flex; min-height: 104px; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; }
.metric-icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 12px; font-size: 14px; font-weight: 700; }
.metric-icon.blue { background: var(--brand-50); color: var(--brand-500); }
.metric-icon.green { background: #ecfdf3; color: #039855; }
.metric-icon.purple { background: #f4f3ff; color: #7a5af8; }
.metric-icon.orange { background: #fff6ed; color: #ec4a0a; }
.metric-card small, .metric-card strong { display: block; }
.metric-card small { color: var(--gray-500); font-size: 12px; }
.metric-card strong { margin-top: 6px; color: var(--gray-800); font-size: 20px; line-height: 1.15; }

.schedule-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); }
.schedule-step { position: relative; min-width: 0; padding: 0 12px; text-align: center; }
.schedule-step:not(:last-child)::after { position: absolute; top: 17px; left: calc(50% + 22px); width: calc(100% - 44px); height: 2px; background: var(--gray-200); content: ""; }
.schedule-step.done:not(:last-child)::after { background: var(--brand-300); }
.step-dot { position: relative; z-index: 1; display: grid; width: 36px; height: 36px; margin: 0 auto; place-items: center; border: 4px solid #fff; border-radius: 50%; background: var(--gray-100); color: var(--gray-500); box-shadow: 0 0 0 1px var(--gray-200); font-size: 11px; font-weight: 600; }
.schedule-step.done .step-dot { background: var(--brand-100); color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-200); }
.schedule-step.current .step-dot { background: var(--brand-500); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.schedule-step strong, .schedule-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-step strong { margin-top: 12px; color: var(--gray-700); font-size: 12px; }
.schedule-step small { margin-top: 4px; color: var(--gray-400); font-size: 11px; }

.toggle-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.toggle-row { position: relative; display: flex; min-height: 86px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--gray-200); border-radius: 12px; cursor: pointer; }
.toggle-row:hover { border-color: var(--brand-200); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { color: var(--gray-700); font-size: 13px; }
.toggle-row small { margin-top: 5px; color: var(--gray-400); font-size: 11px; font-weight: 400; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-row i { position: relative; flex: 0 0 auto; width: 40px; height: 22px; border-radius: 999px; background: var(--gray-300); transition: background .15s; }
.toggle-row i::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.18); content: ""; transition: transform .15s; }
.toggle-row input:checked + i { background: var(--brand-500); }
.toggle-row input:checked + i::after { transform: translateX(18px); }

.ui-table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { min-width: 108px; padding: 13px 16px; border-bottom: 1px solid var(--gray-100); text-align: left; vertical-align: middle; white-space: nowrap; }
th { background: var(--gray-25); color: var(--gray-500); font-size: 12px; font-weight: 500; }
td { color: var(--gray-600); font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--gray-25); }
td:first-child, th:first-child { min-width: 90px; }
td input, td select { min-width: 108px; height: 34px; border-radius: 6px; font-size: 12px; box-shadow: none; }
.works-table button { min-width: 58px; min-height: 32px !important; padding: 0 11px !important; font-size: 12px; }
.empty-state { height: 150px; text-align: center; }
.empty-box { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; color: var(--gray-400); }
.empty-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--gray-100); color: var(--gray-500); font-weight: 700; }
.admin-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(16,24,40,.45); }
.modal-card { position: relative; z-index: 1; width: min(520px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-x: hidden; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: 16px; background: #fff; box-shadow: 0 20px 24px -4px rgba(16,24,40,.12); }
.modal-card-small { width: min(460px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--gray-100); }
.modal-header h3 { color: var(--gray-800); font-size: 18px; }
.modal-header p { margin-top: 5px; color: var(--gray-500); font-size: 13px; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--gray-100); color: var(--gray-500); font-size: 22px; line-height: 1; }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--gray-100); }
.danger-button { border-color: #d92d20 !important; background: #d92d20 !important; }
.danger-button:hover { background: #b42318 !important; }
.delete-warning { color: var(--gray-600); line-height: 1.7; }
.delete-warning strong { color: var(--gray-800); }
.video-preview-card { width: min(760px, 100%); }
.video-preview-card .modal-body { padding: 0; background: #101828; }
.video-preview-card video { display: block; width: 100%; max-height: min(70vh, 520px); background: #101828; }

@media (max-width: 1200px) {
  .form-grid { grid-template-columns: repeat(2,minmax(180px,1fr)); }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .toggle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 40; display: none; background: rgba(16,24,40,.35); }
  .sidebar-overlay.open { display: block; }
  .icon-button { display: flex; }
  .topbar { padding: 12px 16px; }
  .topbar-actions #save-status { display: none; }
  .content { padding: 20px 16px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .entity-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 660px) {
  .topbar-heading p { display: none; }
  .topbar h1 { font-size: 16px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions button { min-height: 36px !important; padding: 0 9px !important; font-size: 12px; }
  .form-grid, .metric-grid, .metric-grid.three, .entity-list { grid-template-columns: 1fr; }
  .ui-card-header { align-items: flex-start; padding: 16px; }
  .table-tools { width: 100%; flex-wrap: wrap; }
  .table-search { width: 100%; }
  .ui-card-body { padding: 16px; }
  .compact-select { min-width: 120px; grid-template-columns: 1fr; }
  .schedule-steps { min-width: 620px; }
  .schedule-card .ui-card-body { overflow-x: auto; }
  .metric-card { min-height: 88px; }
}
