:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: #f8fafc;
  font-size: 14px;
  --border: #e5e9ef;
  --muted: #64748b;
  --blue: #2563eb;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--blue); text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.symbol-library { position: absolute; width: 0; height: 0; overflow: hidden; }
:is(button, a, input):focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.4; letter-spacing: -.35px; }
h2 { font-size: 14px; line-height: 1.5; font-weight: 650; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.6; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; color: #334155; box-shadow: 0 1px 2px #0f172a08; white-space: nowrap; transition: background .15s, border-color .15s; }
.button:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e1; }
.button.primary { background: #111827; color: #fff; border-color: #111827; }
.button.primary:hover:not(:disabled) { background: #25324a; }
.button.small { min-height: 30px; font-size: 12px; padding: 5px 10px; border-radius: 8px; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; background: transparent; border-radius: 8px; color: var(--muted); }
.icon-button:hover { background: #f1f5f9; }
input { min-width: 0; width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; color: #111827; }
input::placeholder { color: #94a3b8; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; background: #17243b; border: 1px solid #334155; color: #fff; font-weight: 750; border-radius: 9px; }
.sidebar { width: 240px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: #fcfdff; border-right: 1px solid var(--border); z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; height: 60px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: #111827; }
.brand strong { font-size: 15px; letter-spacing: -.3px; }
nav { padding: 12px 10px; overflow-y: auto; flex: 1; }
.nav-group { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 20px); margin: 22px 10px 10px; padding: 4px 0; border: 0; background: transparent; color: #64748b; font-size: 11px; font-weight: 600; text-align: left; }
.nav-group::after { content: ''; width: 5px; height: 5px; border-right: 1px solid #94a3b8; border-bottom: 1px solid #94a3b8; transform: rotate(45deg); margin-right: 3px; }
.nav-group[aria-expanded="false"]::after { transform: rotate(-45deg); }
.nav-group:first-child { margin-top: 4px; }
nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 4px 0; border: 1px solid transparent; border-radius: 8px; color: #475569; font-size: 13px; }
nav a:hover { background: #f1f5f9; }
nav a[aria-current="page"] { background: #eff6ff; border-color: #dbe7f7; color: #1d4ed8; }
nav a[aria-current="page"]::before { content: ""; position: absolute; width: 3px; height: 18px; background: #3b82f6; left: 2px; border-radius: 3px; }
.sidebar-footer { display: flex; justify-content: space-between; padding: 16px; color: #64748b; border-top: 1px solid var(--border); font-size: 11px; gap: 8px; }
.main-shell { margin-left: 240px; min-width: 0; }
.topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 24px; background: #ffffffed; border-bottom: 1px solid var(--border); }
.breadcrumb, .account { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 12px; }
.breadcrumb > span { color: var(--muted); }
.account > span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { display: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: #fff; }
.page-heading h1 { margin-bottom: 3px; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.content { padding: 24px; max-width: 2100px; margin: 0 auto; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.summary-card { position: relative; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #0f172a05; min-width: 0; }
.summary-card:nth-child(1) { background: linear-gradient(145deg, #fff 45%, #f0fdf9); border-color: #d4e9e2; }
.summary-card:nth-child(4) { background: linear-gradient(145deg, #fff 45%, #f4f5ff); }
.summary-label { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: #475569; font-size: 12px; }
.summary-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eff6ff; color: #3b82f6; }
.summary-card:first-child .summary-icon { background: #dcfce7; color: #059669; }
.summary-value { display: block; margin-bottom: 6px; font-size: 27px; font-weight: 700; line-height: 1.2; letter-spacing: -.7px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.card { min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 1px 2px #0f172a05; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #f0f2f5; }
.card-header a { flex-shrink: 0; font-size: 12px; }
.card-header p { margin-top: 3px; }
.card-body { padding: 18px 20px; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.media-row, .job-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-width: 0; border-bottom: 1px solid #f1f5f9; }
.media-row:last-child, .job-row:last-child { border-bottom: 0; }
.media-row > svg { color: #6482bd; width: 24px; height: 24px; }
.row-copy { flex: 1; min-width: 0; }
.row-copy strong { display: block; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; line-height: 1.6; }
.row-copy p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.badge { display: inline-flex; padding: 3px 8px; border-radius: 6px; color: #64748b; background: #f1f5f9; font-size: 11px; white-space: nowrap; }
.badge.success { color: #047857; background: #ecfdf5; }
.badge.danger { color: #be123c; background: #fff1f2; }
.badge.blue { color: #1d4ed8; background: #eff6ff; }
.search-label { width: min(100%, 400px); }
.search-label input { min-height: 36px; font-size: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.media-tile { padding: 16px; min-width: 0; background: #fcfdff; border: 1px solid var(--border); border-radius: 12px; }
.media-tile > svg { padding: 12px; width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; color: #6482bd; margin-bottom: 12px; }
.media-tile h3 { overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; font-weight: 600; margin-bottom: 7px; }
.media-tile p { color: var(--muted); font-size: 11px; }
.list-footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; min-width: 620px; }
th { padding: 13px 20px; color: #64748b; background: #f8fafc; font-weight: 550; white-space: nowrap; }
td { padding: 16px 20px; border-top: 1px solid #f1f5f9; color: #475569; }
tbody tr:hover { background: #fcfdff; }
td:first-child { color: #111827; font-weight: 550; max-width: 250px; overflow-wrap: anywhere; }
.align-right { text-align: right; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 13px; grid-column: 1 / -1; line-height: 1.8; }
.notice { padding: 12px 16px; margin-bottom: 18px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 12px; line-height: 1.7; }
.error-message { color: #be123c; font-size: 12px; line-height: 1.7; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 20%, #eaf2ff, transparent 60%); }
.login-card { width: min(100%, 390px); padding: 32px; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 12px 40px #0f172a08; }
.login-card .brand-mark { margin-bottom: 16px; width: 40px; height: 40px; font-size: 20px; border-radius: 12px; }
.login-card h1 { font-size: 24px; margin-bottom: 5px; }
.login-card > .muted { margin-bottom: 24px; }
.login-card label { display: block; font-size: 12px; color: #475569; margin-top: 16px; }
.login-card input { margin-top: 7px; }
.login-card .error-message { min-height: 20px; margin-top: 12px; }
.login-card > button { width: 100%; min-height: 42px; margin-top: 12px; }
dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 16px; color: #111827; box-shadow: 0 24px 80px #0f172a33; }
dialog::backdrop { background: #0f172a66; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dialog-body { padding: 22px 20px; line-height: 1.8; overflow-wrap: anywhere; }
.dialog-body .error-message { margin-top: 8px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 1250px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding-inline: 16px; }
  .breadcrumb { margin-right: auto; }
  .sidebar-shade { position: fixed; inset: 0; z-index: 25; background: #0f172a55; border: 0; width: 100%; }
}
@media (max-width: 600px) {
  .content { padding: 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; padding: 18px 16px; gap: 12px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .heading-actions > .muted { margin-right: auto; font-size: 11px; }
  .summary-grid { gap: 10px; margin-bottom: 14px; }
  .summary-card { padding: 13px; border-radius: 13px; }
  .summary-label { margin-bottom: 18px; gap: 6px; font-size: 11px; }
  .summary-value { font-size: 23px; }
  .summary-icon { width: 26px; height: 26px; }
  .card-header, .card-body { padding: 16px; }
  .media-grid { grid-template-columns: 1fr; padding: 14px; }
  .media-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 12px; }
  .media-tile > svg { grid-row: span 2; margin: 0; }
  .media-tile h3 { margin: 0; }
  .topbar { gap: 8px; }
  .account { gap: 6px; }
  .account > span { max-width: 85px; }
  .breadcrumb > span { display: none; }
  .breadcrumb strong { font-size: 12px; }
  .button { font-size: 12px; }
  .heading-actions > .button { padding-inline: 10px; }
  .heading-actions > .muted { display: none; }
  #users-section table { min-width: 0; }
  #users-section thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #users-section tbody { display: grid; gap: 12px; padding: 14px; }
  #users-section tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
  #users-section td { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 0; border: 0; min-width: 0; }
  #users-section td::before { content: attr(data-label); font-size: 11px; color: var(--muted); font-weight: 400; }
  #users-section td:first-child { grid-column: 1 / -1; max-width: none; font-size: 14px; }
  #users-section td:first-child::before { display: none; }
  #users-section td.empty { display: block; grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Shared workspace components, matching the reference panel's density. */
.brand { height: 52px; }
.topbar { height: 52px; }
.page-heading { padding: 12px 24px; min-height: 66px; }
.page-heading h1 { font-size: 18px; margin-bottom: 2px; }
.content { max-width: none; }
.summary-card { color: #111827; }
a.summary-card:hover { border-color: #c8d9ef; box-shadow: 0 3px 12px #0f172a08; }
.quick-jump { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; width: 238px; height: 34px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 18px; background: #f8fafc; color: #64748b; font-size: 11px; }
.quick-jump svg { width: 14px; height: 14px; }
kbd { margin-left: auto; padding: 2px 5px; border-radius: 5px; font-size: 10px; background: #fff; box-shadow: 0 1px 2px #0f172a0a; }
.account-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg,#6ee7b7,#4f46e5); color: #fff; font-size: 12px; font-weight: 700; }
.inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.segmented { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: #f5f7fb; }
.segmented button { min-height: 25px; padding: 3px 9px; border: 1px solid transparent; background: transparent; color: #64748b; font-size: 11px; border-radius: 8px; white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: #fff; border-color: #e5e9ef; color: #1d4ed8; box-shadow: 0 1px 3px #0f172a0a; }
.dashboard-hero { padding: 24px; margin-bottom: 20px; border: 1px solid #d8e1ed; border-radius: 17px; background: radial-gradient(ellipse at 100% 0,#dce9fc88,transparent 46%),radial-gradient(ellipse at 0 0,#e2f5fd88,transparent 40%),repeating-linear-gradient(0deg,transparent,transparent 27px,#cbd5e11a 28px),repeating-linear-gradient(90deg,#fff8,#fff8 27px,#cbd5e11a 28px); box-shadow: 0 2px 4px #0f172a04; }
.hero-top, .hero-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-heading { margin: 20px 0 17px; }
.hero-heading h2 { font-size: 20px; letter-spacing: -.4px; margin-bottom: 3px; }
.health-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.health-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #bde8da; border-radius: 16px; padding: 5px 10px; background: #ecfdf5; color: #047857; font-size: 11px; }
.health-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px #10b98114; }
.health-chip.attention { background: #fff1f2; color: #be123c; border-color: #f6d2db; }
.health-chip.attention::before { background: #f43f5e; box-shadow: none; }
.dashboard-hero .summary-grid { margin: 0; }
.dashboard-hero .summary-card { background: #ffffffdc; }
.dashboard-hero .summary-card:last-child { background: #fff5f8c9; border-color: #f0d5e0; }
.dashboard-hero .summary-label { justify-content: space-between; flex-direction: row-reverse; margin-bottom: 14px; }
.dashboard-hero .summary-icon { width: 22px; height: 22px; background: transparent; }
.dashboard-hero .summary-value { font-size: 26px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(300px,1fr); gap: 18px; align-items: stretch; }
.dashboard-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dashboard-right > .card { flex: 1; }
.dashboard-grid > .library-health { grid-column: 1 / -1; }
.trend-panel { display: flex; flex-direction: column; }
.trend-panel .card-header { flex-wrap: wrap; }
.chart { height: 300px; padding: 14px 18px 5px 6px; min-width: 0; position: relative; }
.chart svg { width: 100%; height: 100%; stroke: none; overflow: visible; }
.chart-grid-line { stroke: #e5eaf1; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-axis { fill: #7c8ba2; font-size: 11px; font-family: inherit; }
.chart-area { fill: #2563eb12; stroke: none; }
.chart-line { fill: none; stroke: #3266d5; stroke-width: 2.5; stroke-linejoin: round; }
.chart-dot { fill: #3266d5; stroke: #fff; stroke-width: 1.5; }
.chart-current-line { stroke-dasharray: 6 5; }
.chart-current-dot { fill: #fff; stroke: #3266d5; stroke-width: 2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 20px 14px; color: #64748b; font-size: 10px; }
.current-period-key { color: #3266d5; }
.signal-icon { color: #10b981; }
.signal-bar { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center bottom; }
.signal-icon.is-active .signal-bar { animation: signal-level 1.1s ease-in-out infinite alternate; }
.signal-icon.is-active .signal-bar-1 { animation-delay: -.3s; }
.signal-icon.is-active .signal-bar-2 { animation-delay: -.7s; }
.signal-icon.is-active .signal-bar-3 { animation-delay: -.5s; }
.is-loading > svg { animation: icon-turn 1s linear infinite; }
.health-chip.heartbeat::before { animation: heartbeat-glow 2.4s ease-in-out infinite; }
.badge.is-loading { gap: 5px; }
.badge.is-loading svg { width: 12px; height: 12px; }
.summary-card:nth-child(3) .summary-icon { color: #7861d1; }
.summary-card:nth-child(4) .summary-icon { color: #d3597e; }
.page-hidden *, .page-hidden *::before { animation-play-state: paused !important; }
@keyframes signal-level { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes icon-turn { to { transform: rotate(360deg); } }
@keyframes heartbeat-glow { 50% { box-shadow: 0 0 0 5px #10b98108; } }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; font-size: 12px; pointer-events: none; }
.chart-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 12px 20px; border-top: 1px solid #f1f5f9; color: #64748b; font-size: 11px; }
.node-usage-row { padding: 12px; border: 1px solid #f1f5f9; border-radius: 11px; background: #fafcfe; margin-bottom: 10px; }
.node-usage-row:last-child { margin-bottom: 0; }
.node-history-link { display: block; padding-top: 6px; font-size: 11px; }
.node-usage-title, .node-usage-detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; font-size: 11px; }
.node-usage-title strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.node-usage-detail { color: #64748b; }
.usage-meter { display: block; width: 100%; height: 6px; appearance: none; margin: 12px 0 8px; border: 0; border-radius: 6px; overflow: hidden; background: #e9eef6; }
.usage-meter::-webkit-progress-bar { background: #e9eef6; border-radius: 6px; }
.usage-meter::-webkit-progress-value { background: linear-gradient(90deg,#3b82f6,#06b6d4); border-radius: 6px; }
.storage-overview > strong { display: block; font-size: 24px; letter-spacing: -.5px; margin-bottom: 5px; }
.connection-pending { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f1f5f9; }
.connection-pending p { margin-top: 7px; }
.rank-badge { display: inline-grid; place-items: center; flex-shrink: 0; width: 21px; height: 21px; border-radius: 7px; background: #eff6ff; color: #2563eb; font-size: 11px; }
.library-tile { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 5px 12px; max-width: 500px; padding: 17px; border: 1px solid var(--border); border-radius: 12px; color: #111827; background: #fcfdff; }
.library-tile > svg { grid-row: span 2; width: 30px; height: 30px; color: #6482bd; }
.library-tile > .badge { grid-column: 3; grid-row: 1 / span 2; }
.library-tile p { grid-column: 2; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px; border-top: 1px solid var(--border); }
.report-columns > div { min-width: 0; }
.node-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 20px; gap: 16px; }
.node-card { padding: 18px; border: 1px solid #d7e5f7; border-radius: 16px; box-shadow: 0 1px 3px #2563eb08; }
.node-card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.node-card-title > .badge { margin-left: auto; }
.node-card-title h2 { overflow-wrap: anywhere; }
.node-details { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--border); font-size: 12px; }
.node-details dt { color: #64748b; }
.node-details dd { text-align: right; margin: 0; overflow-wrap: anywhere; }
.live-card { margin-top: 18px; }
select { min-width: 0; min-height: 34px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #475569; font: inherit; font-size: 12px; }
.event-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-filter-bar { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.event-filters input { width: 170px; min-height: 34px; font-size: 12px; }
.event-filters #event-user { width: 110px; }
#user-list .align-right .button + .button { margin-left: 6px; }
.event-details { display: grid; grid-template-columns: 95px minmax(0,1fr); gap: 15px; margin: 0; font-size: 12px; }
.event-details dt { color: #64748b; }
.event-details dd { margin: 0; overflow-wrap: anywhere; }
.task-workspace { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 20px; align-items: start; }
.task-sidebar { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.task-sidebar .card-header { padding: 16px; }
.task-search { display: block; padding: 12px; border-bottom: 1px solid var(--border); }
.task-search input { min-height: 34px; font-size: 12px; }
#task-list { padding: 10px; }
.task-choice { display: block; text-align: left; width: 100%; padding: 13px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-left: 3px solid #cbd5e1; border-radius: 10px; background: #fff; color: #111827; }
.task-choice.selected { border-color: #93b9ff; border-left-color: #3b82f6; background: #f5f9ff; box-shadow: 0 0 0 1px #bfdbfe77; }
.task-choice-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.task-choice-title strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.task-choice-footer { display: block; font-size: 10px; color: #7b8ba1; margin-top: 10px; line-height: 1.6; }
.task-detail { display: flex; flex-direction: column; gap: 17px; min-width: 0; }
.task-heading-card { padding: 20px 20px 0; }
.task-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.task-title { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-title h2 { font-size: 20px; letter-spacing: -.5px; }
.task-title p { width: 100%; margin-top: 3px; }
.task-heading-row > .inline-actions { flex-shrink: 0; }
.task-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 20px; }
.task-metric { display: flex; flex-direction: column; gap: 7px; padding: 13px 14px; border: 1px solid #eef2f7; border-radius: 12px; background: #fafcfe; min-width: 0; }
.task-metric strong { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.task-metric .muted { font-size: 10px; }
.task-tabs { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; border-top: 1px solid #f1f5f9; }
.task-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 15px 1px 12px; font-size: 12px; color: #64748b; background: transparent; }
.task-tabs button.selected { color: #111827; border-bottom-color: #111827; }
.execution-marks { display: flex; gap: 7px; margin-bottom: 12px; }
.execution-mark { flex: 1; height: 25px; min-width: 0; border: 1px solid var(--border); border-radius: 7px; background: #fafcfe; display: grid; place-items: center; }
.execution-mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #93a1b8; }
.execution-mark.completed::after { background: #10b981; }
.execution-mark.failed::after { background: #f43f5e; }
.execution-mark.running::after { background: #3b82f6; }
.execution-row { display: flex; align-items: center; gap: 9px; padding: 13px 12px; border-bottom: 1px solid #edf1f6; background: #fcfdff; }
.execution-row:last-child { border-bottom: 0; }
.execution-row > .muted { white-space: nowrap; font-size: 10px; }
.policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 20px; margin: 0; }
.policy-cell { border: 1px solid #eef2f7; border-radius: 11px; background: #fafcfe; padding: 14px; }
.policy-cell dt { color: #64748b; font-size: 11px; margin-bottom: 6px; }
.policy-cell dd { color: #111827; font-size: 12px; font-weight: 550; margin: 0; overflow-wrap: anywhere; }
#task-config-dialog { width: min(620px,calc(100% - 32px)); }
#task-config-form { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
#task-config-form > :is(.dialog-header,.dialog-footer) { flex-shrink: 0; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; overflow-y: auto; min-height: 0; }
.config-grid label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: #475569; }
.config-grid .full-width, .config-grid .switch-field { grid-column: 1 / -1; }
.config-grid .switch-field { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.switch-field input { width: 18px; min-height: 18px; accent-color: #2563eb; }
.jump-result { display: block; padding: 13px 10px; border-radius: 8px; font-size: 13px; color: #334155; }
.jump-result:hover { background: #eff6ff; color: #2563eb; }
#jump-search { margin-bottom: 10px; }
@media (min-width: 1600px) { .chart { height: 350px; } }
@media (max-width: 1250px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-right { display: grid; grid-template-columns: 1fr 1fr; }
  .task-workspace { grid-template-columns: 230px minmax(0,1fr); gap: 14px; }
  .task-metrics { grid-template-columns: 1fr 1fr; }
  .task-heading-row { flex-direction: column; }
  .quick-jump { width: 180px; }
}
@media (max-width: 900px) {
  .task-workspace { grid-template-columns: 1fr; }
  #task-list { display: flex; gap: 10px; overflow-x: auto; }
  .task-choice { flex: 0 0 230px; margin: 0; }
  .quick-jump { width: auto; margin-left: 0; }
  .quick-jump :is(span,kbd) { display: none; }
}
@media (max-width: 600px) {
  .page-heading { padding: 16px; }
  .dashboard-hero { padding: 15px; }
  .hero-top, .hero-heading { align-items: flex-start; flex-direction: column; }
  .hero-heading h2 { font-size: 18px; }
  .hero-heading { margin: 16px 0; }
  .dashboard-hero .summary-value { font-size: 22px; }
  .dashboard-hero .summary-label { gap: 5px; }
  .dashboard-hero .summary-icon { width: 18px; height: 18px; flex-shrink: 0; }
  .dashboard-right, .report-columns, .node-grid { grid-template-columns: 1fr; }
  .chart { padding-inline: 0; height: 230px; }
  .card-header { flex-wrap: wrap; }
  .card-header .segmented { max-width: 100%; }
  .node-grid { padding: 14px; }
  .task-heading-card { padding: 16px 14px 0; }
  .task-title h2 { font-size: 18px; }
  .task-metric { padding: 12px; }
  .execution-row { flex-wrap: wrap; }
  .execution-row > .row-copy { flex-basis: 100%; order: 1; }
  .execution-row > .muted { margin-left: auto; }
  .policy-grid { gap: 9px; padding: 14px; }
  .config-grid { grid-template-columns: 1fr; }
  .account-avatar { display: none; }
  #event-list { display: grid; gap: 12px; padding: 14px; }
  #security-section table { min-width: 0; }
  #security-section thead { display: none; }
  #event-list tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
  #event-list td { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  #event-list td::before { content: attr(data-label); color: #64748b; font-size: 10px; font-weight: 400; }
  #event-list td:first-child { grid-column: 1 / -1; }
  #event-list td:first-child::before { display: none; }
}

.catalog-library-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,300px),1fr)); gap: 16px; }
.catalog-library { border: 1px solid var(--border); border-radius: 14px; padding: 16px; min-width: 0; }
.catalog-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-row-heading :is(h3,strong) { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.catalog-source { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; overflow-wrap: anywhere; }
.catalog-source p,.catalog-job p { margin: 8px 0; overflow-wrap: anywhere; }
.catalog-source .inline-actions,.media-tile .inline-actions { flex-wrap: wrap; margin-top: 12px; }
.catalog-job { padding: 16px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; }
#integration-checks p { margin:8px 0; }
#drive-search-form { display:flex;align-items:end;gap:12px;padding:14px; }
#drive-search-form label { flex:1;min-width:0; }
#drive-search-form input { width:100%; }
.catalog-poster { width:100%; max-height:260px; object-fit:contain; border-radius:10px; margin-bottom:12px; }
#catalog-fields { overflow-wrap: anywhere; }
#scraping-section .card-body.inline-actions,#media-section .card-body.inline-actions { flex-wrap: wrap; }
#strm-section .card-header p { max-width: 600px; }
@media (max-width:600px) {
    .catalog-row-heading { flex-wrap: wrap; }
    .catalog-library-grid { padding:14px; }
    #catalog-fields { grid-template-columns:1fr; }
    #scraping-section .card-body,#strm-list { padding:14px; }
    #strm-section .card-header,#scraping-section .card-header { align-items:flex-start; }
}

.access-layout { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
.access-form textarea {width:100%;min-height:88px;resize:vertical;border:1px solid var(--border);border-radius:9px;padding:10px;font:inherit;}
.access-form input[type=checkbox] {width:18px;height:18px;min-height:18px;padding:0;accent-color:#2563eb;}
.access-form label:has(input[type=checkbox]) {flex-direction:row;align-items:center;gap:10px;}
.module-filter {display:flex;gap:12px;padding:16px 20px;align-items:end;flex-wrap:wrap;}
.module-filter label {display:grid;gap:6px;flex:1;min-width:min(160px,100%);font-size:12px;color:var(--muted);}
.module-filter input,.module-filter select {width:100%;}
.module-message {grid-column:1/-1;overflow-wrap:anywhere;}
#access-section > .card:first-child { grid-column:1/-1; }
.access-paths { display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px 18px;margin:0;align-items:center; }
.access-paths dt { color:var(--muted);font-size:12px; }
.access-paths dd { margin:0;min-width:0;overflow-wrap:anywhere;font-size:12px;color:#334155; }
.access-form { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 20px; }
.access-form > label { display:flex;flex-direction:column;gap:7px;min-width:0;color:#475569;font-size:12px; }
.access-form .access-actions,.access-form > .muted { grid-column:1/-1; }
.access-actions { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:4px; }
.access-enabled { display:inline-flex;align-items:center;gap:8px;color:#475569;font-size:12px; }
.access-enabled input { width:17px;height:17px;min-height:17px;accent-color:#2563eb; }
.access-form > .muted { min-height:18px;overflow-wrap:anywhere; }
@media (max-width:600px) {
  .access-layout { grid-template-columns:1fr;gap:12px; }
  #access-section > .card:first-child { grid-column:auto; }
  .access-paths { grid-template-columns:110px minmax(0,1fr);gap:10px; }
  .access-form { grid-template-columns:1fr;padding:16px; }
  .access-form .access-actions,.access-form > .muted { grid-column:auto; }
  .access-actions { align-items:flex-start; }
}
