:root {
  --bg: #eef3f9;
  --workspace: #f7f9fc;
  --sidebar-bg: #fbfcfe;
  --panel: #ffffff;
  --panel-muted: #f7fbff;
  --panel-border: #d8e1ee;
  --panel-border-strong: #c6d3e4;
  --text: #182336;
  --muted: #5d6c82;
  --muted-strong: #405165;
  --topbar: #101722;
  --topbar-border: rgba(255, 255, 255, 0.08);
  --topbar-soft: rgba(255, 255, 255, 0.08);
  --input-bg: #ffffff;
  --input-border: #c6d2e1;
  --accent: #1663d3;
  --accent-strong: #0f52b6;
  --accent-soft: rgba(22, 99, 211, 0.1);
  --success-soft: rgba(31, 111, 67, 0.12);
  --warning-soft: rgba(187, 118, 17, 0.13);
  --danger: #c33434;
  --danger-soft: rgba(195, 52, 52, 0.11);
  --shadow: 0 6px 18px rgba(17, 30, 49, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.console-body {
  background: linear-gradient(180deg, #f8fbff 0, var(--bg) 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", Roboto, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #eef4fb;
}

.console-app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.console-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--topbar-border);
  background: linear-gradient(180deg, #151e2b 0, var(--topbar) 100%);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.topbar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0, #59a3ff 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.topbar-service {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #fff;
}

.topbar-service-kicker,
.eyebrow,
.card-kicker,
.sidebar-section-label,
.metric-label,
.detail-stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar-service-kicker {
  color: rgba(255, 255, 255, 0.62);
}

.topbar-service-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  white-space: nowrap;
}

.topbar-service-row strong {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.topbar-service-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.topbar-search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.68);
}

.topbar-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
}

.topbar-search-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.topbar-utility {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-width: 0;
}

.topbar-pill,
.sidebar-badge,
.page-title-badge,
.resource-pill,
.detail-tab,
.auth-feature-list span,
.secret-key-list span,
.status-pill {
  --badge-bg: var(--accent-soft);
  --badge-border: rgba(22, 99, 211, 0.14);
  --badge-color: var(--accent-strong);
  --badge-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  background: var(--badge-bg);
  box-shadow: var(--badge-shadow);
  color: var(--badge-color);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-pill {
  --badge-bg: var(--topbar-soft);
  --badge-border: rgba(255, 255, 255, 0.08);
  --badge-color: rgba(255, 255, 255, 0.82);
  --badge-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.account-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 4px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.account-copy {
  display: grid;
  gap: 1px;
}

.account-name,
.account-email,
.metric-value,
.metric-detail,
.pod-name,
.page-breadcrumbs,
.page-description,
.task-summary,
.task-meta,
.task-empty,
.detail-copy,
.detail-pod-id,
.sidebar-copy,
.sidebar-footer-copy,
.panel-meta,
.hero-text,
.auth-note {
  margin: 0;
}

.account-name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.account-email {
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0, #5da1ff 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.console-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.console-sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 14px 10px 16px;
  border-right: 1px solid var(--panel-border);
  background: var(--sidebar-bg);
}

.sidebar-controls-card,
.sidebar-intro,
.sidebar-footer,
.header-spotlight,
.metric-card,
.resource-card,
.detail-empty-state,
.detail-card,
.secret-inventory-card,
.auth-hero-card,
.login-card {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar-controls-card,
.sidebar-intro {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.sidebar-controls-header,
.sidebar-intro-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-controls-card h2,
.sidebar-intro h2,
.page-header h1,
.header-spotlight h2,
.detail-card h2,
.detail-empty-state h2,
.login-card h2,
.hero-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.sidebar-controls-card h2,
.sidebar-intro h2 {
  font-size: 16px;
}

.sidebar-copy,
.sidebar-footer-copy,
.panel-meta,
.page-description,
.hero-text,
.auth-note,
.detail-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sidebar-collapse-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eef4fb;
  color: #5d6d82;
  font-size: 16px;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 12px;
}

.sidebar-toggle-list {
  display: grid;
  gap: 8px;
}

.sidebar-toggle-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 9px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

.sidebar-toggle-form.is-pending {
  opacity: 0.78;
}

[data-async-form].is-pending,
[data-async-nav].is-pending {
  opacity: 0.72;
}

[data-async-nav].is-pending {
  pointer-events: none;
}

[data-async-form].is-pending button,
[data-async-form].is-pending input[type="submit"],
[data-async-form].is-pending input[type="button"] {
  cursor: wait;
}

.sidebar-toggle-copy {
  display: grid;
  gap: 0;
}

.sidebar-toggle-label {
  margin: 0;
}

.sidebar-toggle-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 2px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: #edf3fb;
  align-self: center;
}

.sidebar-switch-option {
  min-width: 46px;
  min-height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.sidebar-switch-option.is-selected {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 1px 2px rgba(17, 30, 49, 0.08);
}

.sidebar-switch-option:disabled {
  cursor: wait;
}

.sidebar-toggle-feedback {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.sidebar-toggle-feedback[data-state="success"] {
  color: #1f6f43;
}

.sidebar-toggle-feedback[data-state="error"] {
  color: var(--danger);
}

.sidebar-section {
  display: grid;
  gap: 6px;
}

.sidebar-section-label {
  margin: 0 8px;
}

.sidebar-link-list {
  display: grid;
  gap: 4px;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-left-width: 3px;
  border-radius: 10px;
  color: var(--muted-strong);
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.sidebar-link:hover {
  background: #fff;
  border-color: rgba(22, 99, 211, 0.14);
}

.sidebar-link.is-active {
  border-color: rgba(22, 99, 211, 0.18);
  border-left-color: var(--accent);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(22, 99, 211, 0.08);
}

.sidebar-link.is-disabled {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(198, 211, 228, 0.44);
  border-left-color: rgba(198, 211, 228, 0.58);
  color: #8f9cb0;
  cursor: default;
}

.sidebar-link.has-emphasis-badge:not(.is-active):not(.is-disabled) {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(22, 99, 211, 0.14);
  box-shadow: inset 0 0 0 1px rgba(22, 99, 211, 0.04);
}

.sidebar-link.has-live-badge:not(.is-active):not(.is-disabled) {
  border-left-color: rgba(23, 96, 57, 0.24);
}

.sidebar-link.has-warning-badge:not(.is-active):not(.is-disabled) {
  border-left-color: rgba(163, 90, 0, 0.28);
}

.sidebar-link.has-emphasis-badge:not(.is-active):not(.is-disabled):hover {
  background: #fff;
  border-color: rgba(22, 99, 211, 0.14);
  box-shadow: inset 0 0 0 1px rgba(22, 99, 211, 0.04);
}

.sidebar-link.is-disabled .sidebar-link-label {
  color: #97a5b8;
  font-weight: 600;
}

.sidebar-badge.is-live,
.page-title-badge.is-live,
.status-active,
.status-task-archived,
.status-task-completed {
  background: linear-gradient(180deg, rgba(26, 118, 69, 0.22) 0, rgba(26, 118, 69, 0.14) 100%);
  border-color: rgba(23, 96, 57, 0.18);
  color: #155b36;
}

.sidebar-badge.is-planned {
  background: rgba(237, 243, 251, 0.72);
  border-color: rgba(196, 208, 226, 0.46);
  color: #93a1b4;
}

.sidebar-link.is-disabled .sidebar-badge.is-planned {
  background: rgba(241, 245, 251, 0.78);
  border-color: rgba(204, 214, 229, 0.38);
  color: #a3b0c2;
}

.sidebar-badge.is-warning,
.status-task-started,
.status-task-in-progress,
.status-task-verifying {
  background: linear-gradient(180deg, rgba(191, 106, 0, 0.24) 0, rgba(191, 106, 0, 0.14) 100%);
  border-color: rgba(163, 90, 0, 0.22);
  color: #8e4b00;
  cursor: default;
}

.sidebar-link-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.sidebar-link-label {
  font-size: 13px;
  font-weight: 700;
}

.sidebar-link[data-sidebar-tooltip],
.sidebar-toggle-form[data-sidebar-tooltip] {
  position: relative;
}

.sidebar-link[data-sidebar-tooltip]::before,
.sidebar-link[data-sidebar-tooltip]::after,
.sidebar-toggle-form[data-sidebar-tooltip]::before,
.sidebar-toggle-form[data-sidebar-tooltip]::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0s linear 0.14s;
  z-index: 25;
}

.sidebar-link[data-sidebar-tooltip]::before,
.sidebar-toggle-form[data-sidebar-tooltip]::before {
  content: "";
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%) translateX(-4px);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid rgba(16, 23, 34, 0.96);
}

.sidebar-link[data-sidebar-tooltip]::after,
.sidebar-toggle-form[data-sidebar-tooltip]::after {
  content: attr(data-sidebar-tooltip);
  top: 50%;
  left: calc(100% + 14px);
  width: max-content;
  max-width: min(280px, 38vw);
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(16, 23, 34, 0.96);
  color: #f7fbff;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(17, 30, 49, 0.18);
  white-space: normal;
  transform: translateY(-50%) translateX(-4px);
}

@media (hover: hover) {
  .sidebar-link[data-sidebar-tooltip]:hover::before,
  .sidebar-link[data-sidebar-tooltip]:hover::after,
  .sidebar-toggle-form[data-sidebar-tooltip]:hover::before,
  .sidebar-toggle-form[data-sidebar-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    transition-delay: 1s;
  }
}

.sidebar-link[data-sidebar-tooltip]:focus-visible::before,
.sidebar-link[data-sidebar-tooltip]:focus-visible::after,
.sidebar-toggle-form[data-sidebar-tooltip]:focus-within::before,
.sidebar-toggle-form[data-sidebar-tooltip]:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  transition-delay: 0s;
}

.sidebar-footer {
  padding: 12px;
  border-style: dashed;
  border-color: var(--panel-border-strong);
  background: rgba(255, 255, 255, 0.72);
}

.sidebar-footer-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.console-main {
  min-width: 0;
  padding: 16px 18px 24px;
  background: var(--workspace);
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.page-header.has-aside {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.page-header-copy,
.page-header-aside {
  min-width: 0;
}

.page-breadcrumbs {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.page-title-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page-title-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.04;
}

.page-description {
  max-width: 70ch;
  font-size: 14px;
}

.header-spotlight {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0, #f6fbff 100%);
}

.header-spotlight h2,
.detail-card h2,
.detail-empty-state h2,
.login-card h2 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.08;
}

.spotlight-pills,
.resource-pill-list,
.auth-feature-list,
.detail-tabs,
.secret-key-list,
.task-actions,
.secret-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  font-weight: 700;
}

.page-banner-success {
  color: #1f6f43;
  background: rgba(232, 245, 237, 0.96);
}

.page-banner-error {
  color: #8c2727;
  background: rgba(255, 238, 238, 0.98);
}

.page-content-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.console-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #f4f7fb;
}

.console-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted-strong);
  font-weight: 700;
  text-decoration: none;
}

.console-tab.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 26, 53, 0.08);
  color: var(--accent-strong);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.metric-value {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.04;
}

.metric-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.resource-layout.secrets-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
}

.resource-card,
.secret-inventory-card,
.detail-rail {
  min-width: 0;
}

.resource-card,
.secret-inventory-card,
.detail-empty-state,
.detail-card {
  padding: 16px;
}

.resource-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.resource-toolbar h2,
.secret-inventory-card h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.resource-toolbar-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.toolbar-search,
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.toolbar-search span,
.field span {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.toolbar-search input,
.field input,
.field-select,
.secret-textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.toolbar-search input,
.field input,
.field-select {
  min-height: 36px;
  padding: 0 12px;
}

.secret-textarea {
  min-height: 220px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.toolbar-search input:focus,
.field input:focus,
.field-select:focus,
.secret-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 99, 211, 0.14);
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #fff;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.table-pagination-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.table-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2eaf4;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  color: #5f6f84;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.pod-summary-row,
.secret-summary-row,
.task-log-summary-row,
.chat-summary-row {
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.pod-summary-row:hover,
.secret-summary-row:hover,
.task-log-summary-row:hover,
.chat-summary-row:hover {
  background: rgba(22, 99, 211, 0.04);
}

.pod-summary-row.is-open,
.secret-summary-row.is-selected,
.task-log-summary-row.is-selected,
.chat-summary-row.is-selected {
  background: rgba(22, 99, 211, 0.06);
}

.pod-summary-row:focus-visible {
  outline: 3px solid rgba(22, 99, 211, 0.24);
  outline-offset: -3px;
}

.pod-summary-row.is-open td:first-child,
.secret-summary-row.is-selected td:first-child,
.task-log-summary-row.is-selected td:first-child,
.chat-summary-row.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.table-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  font-weight: 700;
}

.table-link-title {
  font-size: 13px;
}

.pod-name-cell {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-width: 180px;
}

.accordion-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(22, 99, 211, 0.08);
  color: var(--accent-strong);
}

.accordion-indicator::before {
  content: "▾";
  font-size: 13px;
  transition: transform 0.16s ease;
}

.pod-summary-row.is-open .accordion-indicator::before {
  transform: rotate(180deg);
}

.secret-summary-row.is-selected .accordion-indicator::before {
  transform: rotate(180deg);
}

.task-log-summary-row.is-selected .accordion-indicator::before {
  transform: rotate(180deg);
}

.chat-summary-row.is-selected .accordion-indicator::before {
  transform: rotate(180deg);
}

.pod-name {
  font-size: 13px;
  font-weight: 700;
}

.pod-id,
.task-meta,
.detail-pod-id {
  color: #6a7a90;
  font-size: 11px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.pod-purpose {
  min-width: 220px;
  color: var(--muted-strong);
}

.status-pill {
  font-weight: 800;
}

.status-task-failed,
.status-task-blocked,
.status-task-rejected,
.status-task-terminated {
  background: var(--danger-soft);
  border-color: rgba(195, 52, 52, 0.18);
  color: #8c2727;
}

.detail-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 72px;
  align-self: start;
}

.detail-empty-state,
.detail-card {
  display: grid;
  gap: 12px;
}

.detail-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.detail-tab {
  --badge-bg: #eef3fb;
  --badge-border: rgba(198, 211, 228, 0.72);
  --badge-color: #5d6d82;
}

.detail-tab.is-active {
  --badge-bg: rgba(22, 99, 211, 0.12);
  --badge-border: rgba(22, 99, 211, 0.16);
  --badge-color: var(--accent-strong);
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-stat-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel-muted);
}

.detail-stat-card strong {
  font-size: 18px;
  line-height: 1.08;
}

.detail-section {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf2f8;
}

.detail-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.detail-section-heading h3 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.detail-table-shell {
  background: #fff;
}

.task-table th,
.task-table td {
  padding: 12px 14px;
}

.pod-detail-row td {
  padding: 0;
  background: #f5f9ff;
}

.pod-detail-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.pod-task-section {
  display: grid;
  gap: 12px;
}

.pod-task-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.pod-task-heading h3 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.task-log-link {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-strong);
  font-weight: 700;
}

.task-log-primary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.secret-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-strong);
  font-weight: 700;
}

.chat-row-link {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent-strong);
  font-weight: 700;
}

.secret-detail-row td {
  padding: 0;
  background: #f5f9ff;
}

.secret-detail-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.task-log-detail-row td {
  padding: 0;
  background: #f5f9ff;
}

.task-log-detail-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.chat-detail-row td {
  padding: 0;
  background: #f5f9ff;
}

.chat-detail-shell {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.log-date-cell {
  width: 176px;
  white-space: nowrap;
  color: #5f6f84;
  font-size: 12px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.log-entry-summary {
  font-size: 13px;
  line-height: 1.55;
}

.log-entry-row-sensitive td {
  background: #FFEEEE;
}

.log-entry-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.log-entry-details {
  margin-top: 8px;
}

.log-entry-details summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.log-entry-payload {
  margin: 8px 0 0;
  padding: 10px 12px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d8e3f0;
  border-radius: 10px;
  background: #fff;
  color: #223246;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.task-summary {
  font-size: 13px;
  line-height: 1.5;
}

.task-assigned-at {
  color: var(--muted);
  font-size: 11px;
}

.task-empty {
  padding: 18px 14px;
}

.secret-key-list span {
  --badge-bg: rgba(22, 99, 211, 0.08);
  --badge-border: rgba(22, 99, 211, 0.14);
  --badge-color: #365177;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.secret-form {
  display: grid;
  gap: 12px;
}

.chat-textarea {
  min-height: 120px;
  font-family: "Avenir Next", "Segoe UI", Roboto, Arial, sans-serif;
}

.chat-message-list {
  display: grid;
  gap: 12px;
}

.chat-live-card .detail-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.chat-message {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: #fff;
}

.chat-message[data-role="user"] {
  border-color: rgba(22, 99, 211, 0.16);
  background: linear-gradient(180deg, #f6fbff 0, #eef6ff 100%);
}

.chat-message[data-role="assistant"] {
  background: linear-gradient(180deg, #ffffff 0, #f8fbff 100%);
}

.chat-message-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.chat-message-role {
  font-size: 13px;
  font-weight: 800;
}

.chat-message-time,
.chat-message-meta {
  color: var(--muted);
  font-size: 11px;
}

.chat-message-meta {
  min-height: 16px;
}

.chat-message-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.secret-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr);
  gap: 12px;
}

.login-button,
.secondary-button,
.danger-button,
.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.login-button {
  background: linear-gradient(135deg, var(--accent) 0, #2b7cf1 100%);
  color: #fff;
}

.secondary-button {
  border-color: var(--input-border);
  background: #fff;
  color: var(--muted-strong);
}

.secondary-button.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.danger-button {
  background: linear-gradient(135deg, var(--danger) 0, #df5454 100%);
  color: #fff;
}

.logout-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.login-button:hover,
.secondary-button:hover,
.danger-button:hover,
.logout-button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.console-shell,
.console-auth-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.console-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 46px rgba(23, 42, 69, 0.14);
  backdrop-filter: blur(16px);
}

.auth-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.78fr);
  gap: 18px;
  padding: 20px;
}

.hero-copy,
.login-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.hero-copy {
  padding: 4px 2px;
}

.console-hero .hero-copy {
  align-content: center;
  gap: 14px;
}

.console-hero .hero-copy h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.95;
}

.hero-copy h1 {
  font-size: clamp(36px, 5vw, 48px);
  line-height: 0.96;
}

.console-hero .login-card {
  padding: 24px;
}

.auth-feature-list span {
  --badge-bg: #eef3fb;
  --badge-border: rgba(198, 211, 228, 0.72);
  --badge-color: #355177;
}

.login-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0, rgba(245, 249, 255, 0.98) 100%);
}

.password-login {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel-muted);
}

.auth-error {
  margin: 0;
  color: #8c2727;
  font-weight: 700;
}

.auth-footnote {
  font-size: 12px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1320px) {
  .resource-layout,
  .resource-layout.secrets-layout {
    grid-template-columns: 1fr;
  }

  .detail-rail {
    position: static;
  }
}

@media (max-width: 1180px) {
  .console-topbar {
    grid-template-columns: 1fr;
  }

  .topbar-search-shell {
    order: 3;
  }

  .topbar-utility {
    justify-content: space-between;
  }

  .console-workspace {
    grid-template-columns: 1fr;
  }

  .console-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  .page-header.has-aside,
  .auth-hero-card,
  .console-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-toggle-form {
    grid-template-columns: 1fr;
  }

  .resource-toolbar,
  .resource-toolbar-actions,
  .detail-card-header,
  .detail-section-heading,
  .pod-task-heading,
  .chat-message-header,
  .page-title-row,
  .page-title-actions,
  .table-pagination {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .secret-field-row,
  .detail-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .console-main,
  .console-sidebar,
  .console-topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .console-main {
    padding-bottom: 20px;
  }

  .console-shell,
  .console-auth-shell {
    width: min(100vw - 20px, 1180px);
    padding: 18px 0 28px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .account-panel {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  th,
  td {
    min-width: 120px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }
}
