/* CELHOST internal design system */
.app-shell {
  --admin-bg: #f5f7fa;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f8f9fb;
  --admin-line: #e2e6eb;
  --admin-line-strong: #d5dae1;
  --admin-text: #172033;
  --admin-muted: #647084;
  --admin-subtle: #8b95a5;
  --admin-accent: #e86524;
  --admin-accent-soft: #fff2e9;
  --admin-blue: #2e6da4;
  --admin-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 28px rgba(17, 24, 39, .045);
  height: 100dvh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  overflow: hidden;
  background: var(--admin-bg);
  color: var(--admin-text);
}

[data-theme="dark"] .app-shell {
  --admin-bg: #15171b;
  --admin-surface: #1d2025;
  --admin-surface-muted: #23272d;
  --admin-line: #30353d;
  --admin-line-strong: #3a4049;
  --admin-text: #f2f4f7;
  --admin-muted: #b3bac6;
  --admin-subtle: #858e9d;
  --admin-accent-soft: rgba(232, 101, 36, .13);
  --admin-blue: #87b7e3;
  --admin-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 12px 30px rgba(0, 0, 0, .16);
}

.app-shell *,
.app-shell *::before,
.app-shell *::after { box-sizing: border-box; }

.app-shell button,
.app-shell input,
.app-shell select,
.app-shell textarea { font: inherit; }

.sidebar {
  position: relative;
  z-index: 30;
  width: 264px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--admin-line);
  background: var(--admin-surface);
  color: var(--admin-text);
}

.sidebar-brand {
  min-height: 46px;
  flex: 0 0 auto;
  margin: 0 5px 12px;
  padding: 0;
}

.sidebar-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  box-shadow: none;
}

.sidebar-brand strong { color: var(--admin-text); font-size: 14px; }
.sidebar-brand span { color: var(--admin-subtle); font-size: 10px; }

.sidebar-workspace {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 0 1px 17px;
  padding: 9px 10px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.sidebar-workspace > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--admin-accent-soft);
  color: var(--admin-accent);
}

.sidebar-workspace div { min-width: 0; display: grid; gap: 2px; }
.sidebar-workspace small { color: var(--admin-subtle); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sidebar-workspace strong { overflow: hidden; color: var(--admin-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 3px 10px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--admin-line-strong) transparent;
}

.nav-group { display: grid; gap: 2px; margin: 0 0 18px; }
.nav-group > span {
  padding: 0 10px 7px;
  color: var(--admin-subtle);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 12.5px;
  font-weight: 580;
  text-align: left;
  transition: 160ms ease;
}

.nav-item .ui-icon { flex: 0 0 auto; color: var(--admin-subtle); }
.nav-item:hover { background: var(--admin-surface-muted); color: var(--admin-text); }
.nav-item.active {
  position: relative;
  background: var(--admin-accent-soft);
  color: var(--admin-text);
  font-weight: 680;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--admin-accent);
}
.nav-item.active .ui-icon { color: var(--admin-accent); }

.sidebar-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid var(--admin-line);
}

.sidebar-user {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 7px;
  padding: 7px;
  background: transparent;
  color: var(--admin-text);
  text-align: left;
}
.sidebar-user:hover { background: var(--admin-surface-muted); }
.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #28364b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.user-copy { min-width: 0; display: grid; gap: 2px; }
.user-copy strong,
.user-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; }
.user-copy small { color: var(--admin-subtle); font-size: 9px; text-transform: uppercase; }
.sidebar-user > .ui-icon { color: var(--admin-subtle); }
.sidebar-utilities { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.sidebar-utilities > button { justify-content: center; }
.sidebar-utilities .icon-text { min-height: 38px; border: 0; border-radius: 7px; background: transparent; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.sidebar-utilities .icon-text:hover { background: var(--admin-surface-muted); color: var(--admin-text); }

.mobile-nav-toggle,
.sidebar-backdrop { display: none; }

.main {
  width: 100%;
  height: 100dvh;
  min-width: 0;
  overflow-y: auto;
  padding: 0 clamp(22px, 3vw, 44px) 52px;
  background: var(--admin-bg);
}
.main-fixed { padding: 0; overflow: hidden; }
.main > :not(.chat-page) { width: min(1460px, 100%); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
  padding: 18px 0 16px;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  background: color-mix(in srgb, var(--admin-bg) 93%, transparent);
  backdrop-filter: blur(14px);
}
.page-heading { min-width: 0; }
.page-breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--admin-subtle); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.page-breadcrumb .ui-icon { transform: rotate(45deg); }
.topbar h1 { margin: 0; color: var(--admin-text); font-size: clamp(25px, 2.2vw, 32px); line-height: 1.15; letter-spacing: -.02em; }
.topbar .page-heading > p { max-width: 720px; margin: 7px 0 0; color: var(--admin-muted); font-size: 13px; line-height: 1.5; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }

.panel,
.metric-card,
.plan-card,
.kanban-column,
.dialog-card,
.integration-summary,
.panel-compact {
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
  color: var(--admin-text);
}
.panel { padding: 22px; }
.panel h2 { margin: 0 0 16px; color: var(--admin-text); font-size: 16px; line-height: 1.3; }
.panel p { color: var(--admin-muted); }
.panel .eyebrow { color: var(--admin-accent); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p { margin: 5px 0 0; }

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.send-btn,
.text-btn {
  min-height: 40px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  transition: 160ms ease;
}
.primary-btn { border: 1px solid var(--admin-accent); background: var(--admin-accent); color: #fff; box-shadow: 0 2px 7px rgba(232, 101, 36, .18); }
.primary-btn:hover { border-color: #d85a1d; background: #d85a1d; transform: translateY(-1px); }
.secondary-btn { border: 1px solid var(--admin-line-strong); background: var(--admin-surface); color: var(--admin-text); box-shadow: none; }
.secondary-btn:hover { border-color: #bbc2cc; background: var(--admin-surface-muted); }
.icon-btn { border: 1px solid var(--admin-line); background: var(--admin-surface); color: var(--admin-muted); }
.text-btn { min-height: 30px; color: var(--admin-blue); }

.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { min-height: 132px; display: grid; align-content: space-between; gap: 10px; padding: 18px; }
.metric-heading { display: flex; align-items: center; gap: 9px; color: var(--admin-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.metric-heading .ui-icon { width: 30px; height: 30px; padding: 7px; border: 1px solid color-mix(in srgb, var(--admin-accent) 22%, var(--admin-line)); border-radius: 8px; background: var(--admin-accent-soft); color: var(--admin-accent); }
.metric-card > strong { color: var(--admin-text); font-size: 27px; line-height: 1; letter-spacing: -.02em; }
.metric-card > small { color: var(--admin-subtle); font-size: 11px; }

.chart-bars { display: grid; gap: 14px; }
.chart-bars > div { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(160px, 2fr) 44px; align-items: center; gap: 12px; }
.chart-bars span { color: var(--admin-muted); font-size: 11px; }
.chart-bars strong { position: relative; min-width: 5px; height: 8px; border-radius: 3px; background: linear-gradient(90deg, var(--admin-accent), #f28b52); box-shadow: none; }
.chart-bars em { color: var(--admin-text); font-size: 11px; font-style: normal; font-weight: 750; text-align: right; }

.dashboard-grid,
.settings-grid,
.admin-cms-grid,
.checkout-grid,
.invoice-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.limit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.limit-grid span,
.invoice-summary span { border-radius: 6px; background: var(--admin-surface-muted); color: var(--admin-muted); }

.form-grid { display: grid; gap: 16px; }
.form-grid.two,
.register-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.field > span { color: var(--admin-muted); font-size: 11px; font-weight: 750; }
.field input,
.field select,
.field textarea,
.search,
.kanban-filters select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 7px;
  outline: 0;
  background: var(--admin-surface);
  color: var(--admin-text);
  padding: 9px 11px;
  font-size: 13px;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .02);
  transition: 160ms ease;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #b9c1cc; }
.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus { border-color: var(--admin-accent); box-shadow: 0 0 0 3px rgba(232, 101, 36, .10); }
.field input::placeholder,
.field textarea::placeholder { color: var(--admin-subtle); }
.field-error { min-height: 14px; color: #c53d3d; font-size: 10px; }
.check { color: var(--admin-muted); font-size: 12px; }
.check input { accent-color: var(--admin-accent); }
.form-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.form-section-header { display: flex; align-items: flex-start; gap: 11px; margin: 9px 0 0; padding: 17px 0 8px; border-top: 1px solid var(--admin-line); }
.form-section-header:first-of-type { margin-top: -4px; padding-top: 0; border-top: 0; }
.form-section-header .ui-icon { flex: 0 0 auto; margin-top: 1px; color: var(--admin-accent); }
.form-section-header h3 { margin: 0; color: var(--admin-text); font-size: 13px; }
.form-section-header p { margin: 4px 0 0; color: var(--admin-subtle); font-size: 11px; line-height: 1.5; }
.operational-form { gap: 15px 17px; }
.operational-editor { padding: 0; overflow: hidden; }
.operational-editor .operational-form { padding: 22px; }
.editor-heading { padding: 19px 22px; border-bottom: 1px solid var(--admin-line); }
.sticky-form-actions { border-color: var(--admin-line); background: var(--admin-surface); box-shadow: 0 -8px 20px rgba(17, 24, 39, .04); }

.table-wrap { position: relative; overflow: auto; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); }
table { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--admin-text); font-size: 12px; }
table thead { position: sticky; top: 0; z-index: 4; }
table th { height: 42px; padding: 10px 13px; border-bottom: 1px solid var(--admin-line-strong); background: var(--admin-surface-muted); color: var(--admin-subtle); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
table td { padding: 12px 13px; border-bottom: 1px solid var(--admin-line); color: var(--admin-muted); vertical-align: middle; }
table tr:last-child td { border-bottom: 0; }
table tbody tr { transition: background 150ms ease; }
table tbody tr:hover { background: var(--admin-surface-muted); }
table td strong { color: var(--admin-text); }
.table-actions { display: flex; align-items: center; gap: 5px; }
.data-table-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border: 1px solid var(--admin-line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
  background: var(--admin-surface);
  color: var(--admin-subtle);
  font-size: 11px;
}
.data-table-footer > div { display: flex; align-items: center; gap: 8px; }
.data-table-footer button { min-height: 30px; border: 1px solid var(--admin-line); border-radius: 6px; background: var(--admin-surface); color: var(--admin-muted); padding: 0 9px; font-size: 10px; font-weight: 700; }
.data-table-footer button:hover:not(:disabled) { border-color: var(--admin-line-strong); background: var(--admin-surface-muted); color: var(--admin-text); }
.data-table-footer button:disabled { opacity: .45; cursor: default; }
.data-table-footer strong { color: var(--admin-text); font-size: 10px; }
.kanban-filters,
.billing-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px; }
.kanban-filters .search { flex: 1; min-width: 220px; }
.kanban-filters select { width: auto; min-width: 150px; }

.status,
.badge,
.integration-status { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; border: 1px solid var(--admin-line); border-radius: 999px; padding: 3px 8px; background: var(--admin-surface-muted); color: var(--admin-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.status-success { border-color: #bce1c6; background: #effaf2; color: #267a3f; }
.status-warning { border-color: #edd9a8; background: #fff9e8; color: #966a0d; }
.status-danger { border-color: #efc1c1; background: #fff1f1; color: #a73535; }
[data-theme="dark"] .status-success { border-color: #285b36; background: #1c3524; color: #7fd595; }
[data-theme="dark"] .status-warning { border-color: #5a4924; background: #362f1f; color: #e8c46f; }
[data-theme="dark"] .status-danger { border-color: #613131; background: #3a2424; color: #ed9696; }

.empty-state-component,
.panel > .empty,
.kanban-column > .empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  margin: 0;
  padding: 28px 18px;
  color: var(--admin-subtle);
  text-align: center;
}
.empty-state-icon {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid color-mix(in srgb, var(--admin-accent) 20%, var(--admin-line));
  border-radius: 10px;
  background: var(--admin-accent-soft);
  color: var(--admin-accent);
  transform: rotate(-3deg);
}
.empty-state-icon .ui-icon { transform: rotate(3deg); }
.empty-state-component h3 { margin: 0; color: var(--admin-text); font-size: 15px; }
.empty-state-component p { max-width: 390px; margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.55; }

.admin-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-hub-card { min-height: 138px; display: grid; align-content: start; gap: 9px; border: 1px solid var(--admin-line); border-radius: 8px; padding: 19px; background: var(--admin-surface); color: var(--admin-text); box-shadow: var(--admin-shadow); text-align: left; }
.admin-hub-card:hover { border-color: #c7cdd5; transform: translateY(-1px); }
.admin-hub-card > .ui-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--admin-accent) 24%, var(--admin-line)); border-radius: 8px; background: var(--admin-accent-soft); color: var(--admin-accent); padding: 10px; }
.admin-card-icon { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid color-mix(in srgb, var(--admin-accent) 24%, var(--admin-line)); border-radius: 8px; background: var(--admin-accent-soft); color: var(--admin-accent); }
.admin-card-icon .ui-icon { width: 22px; height: 22px; }
.admin-hub-card strong { font-size: 14px; }
.admin-hub-card span { color: var(--admin-muted); font-size: 12px; line-height: 1.5; }

.kanban-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 15px; align-items: start; }
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-column { width: 290px; min-width: 290px; padding: 10px; box-shadow: none; background: var(--admin-surface-muted); }
.kanban-column > h2 { display: flex; align-items: center; gap: 7px; margin: 2px 3px 10px; color: var(--admin-muted); font-size: 11px; text-transform: uppercase; }
.kanban-card { border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); box-shadow: 0 2px 8px rgba(17, 24, 39, .035); }
.kanban-card:hover { border-color: #c4cbd4; transform: translateY(-1px); }
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .42; transform: rotate(1deg) scale(.99); }
.kanban-card.is-moving { opacity: .55; pointer-events: none; }
.kanban-column.drag-over { border-color: var(--admin-accent); background: var(--admin-accent-soft); box-shadow: inset 0 0 0 1px var(--admin-accent); }
.kanban-column.drag-over::after { content: "Solte o atendimento aqui"; display: block; margin-top: 10px; padding: 12px; border: 1px dashed var(--admin-accent); border-radius: 7px; color: var(--admin-accent); font-size: 12px; font-weight: 700; text-align: center; }
.attendance-detail { position: sticky; top: 128px; max-height: calc(100dvh - 154px); overflow-y: auto; }
.attendance-detail .timeline { gap: 0; }
.attendance-detail .timeline-event { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; padding: 0 0 18px; border: 0; border-radius: 0; background: transparent; }
.attendance-detail .timeline-event::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: -2px; width: 1px; background: var(--admin-line); }
.attendance-detail .timeline-event:last-child::before { display: none; }
.attendance-detail .timeline-event > i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 2px solid var(--admin-surface); border-radius: 50%; background: var(--admin-accent); box-shadow: 0 0 0 1px var(--admin-accent); }
.attendance-detail .timeline-event section { min-width: 0; }
.attendance-detail .timeline-event strong { display: block; font-size: 12px; line-height: 1.4; }
.attendance-detail .timeline-event p { margin: 3px 0; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
.attendance-detail .timeline-event time { color: var(--admin-subtle); font-size: 10px; }

.setting-card { min-height: 150px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 14px; }
.setting-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface-muted); color: var(--admin-accent); }
.setting-card small { color: var(--admin-subtle); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.setting-card h2 { margin: 4px 0 8px; }
.setting-card p { margin: 3px 0; font-size: 12px; line-height: 1.5; }
.pix-qr-code { display: block; width: min(220px, 100%); aspect-ratio: 1; margin: 14px auto; border: 1px solid var(--admin-line); border-radius: 8px; background: #fff; object-fit: contain; }

.legal-workspace-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr); gap: 16px; align-items: start; }
.legal-library { min-width: 0; }
.legal-upload-panel { position: sticky; top: 128px; }
.legal-card-list, .jurisprudence-list { display: grid; gap: 10px; margin-top: 16px; }
.legal-resource-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) 32px; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.resource-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; background: var(--admin-accent-soft); color: var(--admin-accent); }
.legal-resource-card p, .legal-resource-card small { display: block; margin: 4px 0 0; color: var(--admin-muted); font-size: 12px; }
.legal-filter-bar { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, .55fr)) auto; gap: 8px; }
.legal-filter-bar input, .legal-filter-bar select { min-width: 0; }
.jurisprudence-card { padding: 16px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.jurisprudence-card > p { color: var(--admin-muted); font-size: 13px; line-height: 1.65; }
.resource-meta, .tag-row { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; color: var(--admin-subtle); font-size: 11px; }
.tag-row span { padding: 3px 7px; border-radius: 5px; background: var(--admin-surface-muted); color: var(--admin-muted); }
.ai-draft-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.ai-brief-panel { min-width: 0; }
.ai-editor-panel { position: sticky; top: 128px; }
.ai-editor-panel > textarea { width: 100%; min-height: 58vh; resize: vertical; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); color: var(--admin-text); padding: 18px; font: 14px/1.7 Inter, sans-serif; }
.reference-picker { max-height: 230px; overflow-y: auto; display: grid; align-content: start; gap: 8px; padding: 12px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface-muted); }
.reference-picker > strong { margin-bottom: 4px; font-size: 12px; }
.ai-review-notice { padding: 12px 14px; border-left: 3px solid #d97706; background: rgba(217, 119, 6, .08); color: var(--admin-muted); font-size: 12px; line-height: 1.5; }
.credit-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); font-size: 12px; font-weight: 750; }
.credit-history { margin-top: 16px; }
.credit-history > div { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--admin-line); font-size: 11px; }
.credit-history span, .credit-history time { color: var(--admin-muted); }

@media (max-width: 1080px) {
  .legal-workspace-grid, .ai-draft-layout { grid-template-columns: 1fr; }
  .legal-upload-panel, .ai-editor-panel { position: static; }
  .legal-filter-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .legal-filter-bar { grid-template-columns: 1fr; }
  .legal-resource-card { grid-template-columns: 34px minmax(0, 1fr); }
  .legal-resource-card > .icon-btn { grid-column: 2; justify-self: end; }
  .ai-editor-panel > textarea { min-height: 52vh; }
}

.integration-summary { padding: 20px 22px; }
.integration-panel { padding: 0; overflow: hidden; }
.integration-mode { border-bottom: 1px solid var(--admin-line); background: var(--admin-surface-muted); }
.integration-tabs { border-bottom: 1px solid var(--admin-line); background: var(--admin-surface); }
.integration-tabs button { border-radius: 0; color: var(--admin-muted); }
.integration-tabs button.active { border-bottom-color: var(--admin-accent); color: var(--admin-text); }
.integration-tab { padding: 24px; }

.cms-list { display: flex; gap: 7px; overflow-x: auto; margin: 0 0 18px; padding: 0 0 10px; }
.cms-list button { min-width: 150px; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface-muted); color: var(--admin-text); padding: 10px 12px; text-align: left; }
.cms-list button:hover { border-color: var(--admin-accent); }
.cms-list span { color: var(--admin-muted); }
.media-library-panel { align-self: start; }
.media-upload-form { gap: 12px; }
.media-dropzone { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed var(--admin-line-strong); border-radius: 8px; background: var(--admin-surface-muted); color: var(--admin-muted); text-align: center; cursor: pointer; }
.media-dropzone:hover { border-color: var(--admin-accent); background: var(--admin-accent-soft); }
.media-dropzone .ui-icon { color: var(--admin-accent); }
.media-dropzone strong { color: var(--admin-text); font-size: 13px; }
.media-dropzone span { font-size: 11px; }
.media-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.media-grid { gap: 8px; margin-top: 16px; }
.media-grid button { border-radius: 7px; }

.billing-overview article { border-color: var(--admin-line); border-radius: 8px; background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.billing-layout.with-editor { grid-template-columns: minmax(600px, 1fr) minmax(350px, 430px); }
.billing-editor { top: 132px; border-color: var(--admin-line); }
.invoice-document { grid-template-columns: minmax(0, 1fr) 310px; }
.invoice-document-side { top: 132px; }
.info-row { border-color: var(--admin-line); color: var(--admin-muted); }
.info-row strong { color: var(--admin-text); }
.inline-alert { border-radius: 7px; }

.chat-page { height: 100dvh; background: var(--admin-bg); }
.chat-header { min-height: 78px; border-color: var(--admin-line); background: var(--admin-surface); }
.chat-workspace { grid-template-columns: minmax(230px, 280px) minmax(380px, 1fr) minmax(230px, 280px); }
.conversation-list,
.client-panel { border-color: var(--admin-line); background: var(--admin-surface); }
.conversation-list button { border-radius: 7px; }
.conversation-list button.active { background: var(--admin-accent-soft); }
.chat-column { background: var(--admin-bg); }
.chat-input-area { border-color: var(--admin-line); background: var(--admin-surface); }
.bubble { border: 1px solid var(--admin-line); border-radius: 9px; box-shadow: none; }
.bubble.out { border-color: color-mix(in srgb, var(--admin-accent) 20%, var(--admin-line)); background: var(--admin-accent-soft); }

.modal-backdrop { background: rgba(17, 24, 39, .52); }
.dialog-card { border-radius: 9px; background: var(--admin-surface); box-shadow: 0 26px 70px rgba(15, 23, 42, .22); }
.toast { border-color: var(--admin-line); border-radius: 8px; background: var(--admin-surface); color: var(--admin-text); }

@media (max-width: 1250px) {
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-layout.with-editor { grid-template-columns: 1fr; }
  .billing-editor { position: static; max-height: none; }
  .chat-workspace { grid-template-columns: 240px minmax(360px, 1fr); }
  .client-panel { display: none; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-102%); box-shadow: 20px 0 50px rgba(15, 23, 42, .16); transition: transform 220ms ease; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(15, 23, 42, .45); }
  .mobile-nav-toggle { position: fixed; top: 16px; left: 14px; z-index: 23; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); color: var(--admin-text); box-shadow: var(--admin-shadow); }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .app-shell.sidebar-open .sidebar-backdrop { display: block; }
  .main { padding-inline: 16px; }
  .main-fixed { padding-inline: 0; }
  .topbar { min-height: 102px; padding-left: 52px; }
  .dashboard-grid,
  .settings-grid,
  .admin-cms-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .kanban-layout { grid-template-columns: 1fr; }
  .attendance-detail { position: static; max-height: none; }
  .invoice-document,
  .finance-create-layout { grid-template-columns: 1fr; }
  .invoice-document-side,
  .form-help-panel { position: static; }
}

@media (max-width: 680px) {
  .topbar { min-height: 128px; align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 17px; }
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .topbar-actions > * { max-width: 100%; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 116px; }
  .admin-hub-grid { grid-template-columns: 1fr; }
  .form-grid.two,
  .register-grid { grid-template-columns: 1fr; }
  .form-grid.two .span-2,
  .register-grid .span-2 { grid-column: auto; }
  .kanban-filters,
  .billing-toolbar { align-items: stretch; flex-direction: column; }
  .kanban-filters .search,
  .kanban-filters select { width: 100%; min-width: 0; }
  .table-wrap { max-width: calc(100vw - 32px); }
  .chat-workspace { grid-template-columns: 82px minmax(0, 1fr); }
  .conversation-list span { display: none; }
  .chat-header h1 { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .invoice-parties { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .topbar-actions .secondary-btn,
  .topbar-actions .primary-btn { flex: 1; }
}

/* Premium refinement layer */
.app-shell {
  --admin-bg: #f3f5f8;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f7f9fc;
  --admin-line: #dde3ea;
  --admin-line-strong: #c9d2dc;
  --admin-text: #131a27;
  --admin-muted: #586474;
  --admin-subtle: #7c8796;
  --admin-accent: #e86524;
  --admin-blue: #2f6f9f;
  --admin-green: #16835c;
  --admin-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 14px 34px rgba(15, 23, 42, .055);
}

[data-theme="dark"] .app-shell {
  --admin-bg: #14171c;
  --admin-surface: #1b1f26;
  --admin-surface-muted: #222833;
  --admin-line: #2f3743;
  --admin-line-strong: #3c4654;
  --admin-text: #f3f6fa;
  --admin-muted: #b6bfcc;
  --admin-subtle: #8d98a8;
  --admin-blue: #91bde1;
  --admin-green: #77d0a6;
}

.sidebar {
  padding: 20px 14px 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-surface) 96%, var(--admin-accent)) 0%, var(--admin-surface) 42%),
    var(--admin-surface);
}

.sidebar-brand .brand-mark {
  background: linear-gradient(135deg, var(--admin-accent), #f08d54);
  color: #fff;
}

.nav-group > span {
  color: var(--admin-subtle);
  font-size: 10px;
  font-weight: 800;
}

.nav-item {
  min-height: 39px;
  border-radius: 8px;
}

.nav-item.active {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--admin-accent) 22%, transparent);
}

.main-content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .54), transparent 220px),
    var(--admin-bg);
}

[data-theme="dark"] .main-content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 220px),
    var(--admin-bg);
}

.topbar {
  min-height: 112px;
  border-bottom-color: color-mix(in srgb, var(--admin-line) 76%, transparent);
}

.topbar h1 {
  font-size: clamp(27px, 2.4vw, 35px);
  font-weight: 800;
}

.topbar .page-heading > p {
  font-size: 14px;
}

.panel,
.metric-card,
.plan-card,
.invoice-identity,
.payment-summary-card,
.calendar-panel,
.admin-document-detail {
  border-color: color-mix(in srgb, var(--admin-line) 86%, transparent);
  box-shadow: var(--admin-shadow);
}

.panel:hover,
.metric-card:hover,
.plan-card:hover {
  border-color: color-mix(in srgb, var(--admin-accent) 20%, var(--admin-line));
}

.metric-card {
  min-height: 128px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-surface) 92%, var(--admin-accent)) 0%, var(--admin-surface) 70%),
    var(--admin-surface);
}

.metric-card > strong {
  font-size: 30px;
}

.primary-btn,
.secondary-btn,
.icon-btn,
.text-btn,
.segmented button {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.primary-btn {
  box-shadow: 0 8px 18px rgba(232, 101, 36, .18);
}

.primary-btn:hover,
.secondary-btn:hover,
.icon-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.field input,
.field select,
.field textarea,
.search {
  border-radius: 8px;
  border-color: var(--admin-line);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus {
  border-color: color-mix(in srgb, var(--admin-accent) 58%, var(--admin-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-accent) 14%, transparent);
}

.table-wrap {
  border-color: var(--admin-line);
}

table th {
  background: color-mix(in srgb, var(--admin-surface-muted) 88%, var(--admin-surface));
}

table tbody tr:hover {
  background: color-mix(in srgb, var(--admin-accent) 5%, var(--admin-surface-muted));
}

.signature-layout {
  align-items: start;
}

.signature-form-panel {
  border-color: color-mix(in srgb, var(--admin-accent) 18%, var(--admin-line));
}

.signature-form-panel h2 {
  margin-bottom: 8px;
}

.signature-form-panel .operational-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signature-form-panel .field:first-child,
.signature-form-panel .field.span-2,
.signature-form-panel button[type="submit"],
.signature-link-box {
  grid-column: 1 / -1;
}

.signature-form-panel button[type="submit"] {
  justify-content: center;
  min-height: 44px;
}

.signature-link-box {
  border-color: color-mix(in srgb, var(--admin-green) 28%, var(--admin-line));
  background: color-mix(in srgb, var(--admin-green) 10%, var(--admin-surface));
}

.audit-panel .timeline > div {
  border-left-color: color-mix(in srgb, var(--admin-accent) 34%, var(--admin-line));
}

@media (max-width: 760px) {
  .signature-form-panel .operational-form {
    grid-template-columns: 1fr;
  }
}
.legal-process-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 24px;
  align-items: start;
}

.legal-process-layout:has(.legal-process-create[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.legal-process-create[hidden] { display: none; }

.legal-process-list,
.process-document-list {
  display: grid;
  gap: 8px;
}

.legal-process-row,
.process-document-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.5fr) minmax(140px, .8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: inherit;
  text-align: left;
}

.legal-process-row:hover { border-color: color-mix(in srgb, var(--primary) 38%, var(--border)); background: var(--surface-soft, #fafafa); }
.legal-process-row span,
.process-document-row span { display: grid; gap: 4px; min-width: 0; }
.legal-process-row small,
.process-document-row small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }

.process-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 24px;
  align-items: start;
}

.process-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 0;
}

.process-facts div { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.process-facts dt { color: var(--text-muted); font-size: 12px; margin-bottom: 5px; }
.process-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.process-notes { margin-top: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft, #fafafa); }
.process-notes p { margin: 8px 0 0; color: var(--text-muted); white-space: pre-wrap; }

.process-upload-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, .8fr);
  gap: 10px;
  margin-bottom: 16px;
}
.process-upload-form input[type="file"], .process-upload-form button { grid-column: 1 / -1; }

.process-ai-card { min-height: 580px; display: flex; flex-direction: column; }
.process-ai-messages { flex: 1; min-height: 260px; max-height: 520px; overflow-y: auto; display: grid; align-content: start; gap: 12px; padding: 12px 2px; }
.process-ai-messages article { max-width: 92%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft, #fafafa); }
.process-ai-messages article.user { justify-self: end; background: color-mix(in srgb, var(--primary) 9%, var(--surface, #fff)); }
.process-ai-messages article p { margin: 5px 0 0; line-height: 1.55; }
.process-ai-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.process-ai-sources span { padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); font-size: 11px; }
.process-generated-documents { grid-column: 1 / -1; }
.process-knowledge-card { grid-column: 1 / -1; }

.process-client-field,
.finance-client-field { position: relative; align-content: start; }
.process-client-field > span { font-weight: 600; font-size: 13px; }
.process-client-field > small { color: var(--text-muted); }
.client-combobox-results { position: absolute; z-index: 30; top: 68px; left: 0; right: 0; display: grid; max-height: 260px; overflow-y: auto; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 14px 35px rgba(17, 24, 39, .12); }
.client-combobox-results:empty { display: none; }
.client-combobox-results > button { display: grid; gap: 3px; padding: 11px 12px; text-align: left; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--border); }
.client-combobox-results > button:hover { background: var(--surface-soft, #f7f7f8); }
.client-combobox-results small { color: var(--text-muted); }
.combobox-empty { padding: 14px; color: var(--text-muted); }

.app-dialog { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface, #fff); color: var(--text); box-shadow: 0 24px 70px rgba(17, 24, 39, .22); }
.app-dialog::backdrop { background: rgba(15, 23, 42, .48); backdrop-filter: blur(2px); }
.dialog-card { padding: 24px; display: grid; gap: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.process-import-dialog { width: min(980px, calc(100vw - 32px)); }
.process-import-card { max-height: calc(100vh - 40px); overflow-y: auto; }
.process-import-upload { display: grid; gap: 18px; }
.import-dropzone { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 32px; text-align: center; border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--border)); border-radius: 8px; background: var(--surface-soft, #fafafa); }
.import-dropzone p { margin: 0; color: var(--text-muted); max-width: 540px; }
.import-dropzone input { width: min(520px, 100%); margin-top: 10px; }
.import-review-summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft, #fafafa); }
.import-review-summary span { color: var(--text-muted); }
.import-client-review { position: relative; }
.import-findings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.import-findings > div { padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
.import-findings p { color: var(--text-muted); line-height: 1.55; }

.process-knowledge-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.process-knowledge-columns h3 { margin: 0 0 12px; font-size: 14px; }
.process-timeline { display: grid; gap: 0; }
.process-timeline > div { position: relative; display: grid; gap: 4px; padding: 0 0 18px 20px; border-left: 1px solid var(--border); }
.process-timeline > div::before { content: ""; position: absolute; top: 3px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.process-timeline time, .knowledge-reference small { color: var(--text-muted); font-size: 11px; }
.process-timeline p, .knowledge-reference p { margin: 4px 0 0; color: var(--text-muted); line-height: 1.5; }
.knowledge-reference { padding: 12px 0; border-bottom: 1px solid var(--border); }
.knowledge-reference strong, .knowledge-reference small { display: block; }

@media (max-width: 1050px) {
  .legal-process-layout,
  .process-detail-grid { grid-template-columns: 1fr; }
  .process-generated-documents { grid-column: auto; }
  .process-knowledge-card { grid-column: auto; }
  .process-knowledge-columns { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .legal-process-row,
  .process-document-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .legal-process-row > :nth-child(n+3),
  .process-document-row > :nth-child(n+3) { grid-column: 2; }
  .process-facts { grid-template-columns: 1fr; }
  .process-upload-form { grid-template-columns: 1fr; }
  .process-upload-form > * { grid-column: auto !important; }
  .import-findings { grid-template-columns: 1fr; }
  .import-review-summary { flex-direction: column; }
}

/* SaaS product finish */
.app-shell {
  --component-radius: 8px;
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--admin-accent) 15%, transparent);
}

.main,
.main-content {
  min-width: 0;
}

.main > :not(.chat-page),
.content-area {
  width: min(1540px, 100%);
  margin: 0 auto;
}

.sidebar {
  box-shadow: 1px 0 0 var(--admin-line), 12px 0 30px rgba(15, 23, 42, .025);
}

.sidebar-workspace {
  border-radius: var(--component-radius);
}

.nav-item {
  position: relative;
  border: 1px solid transparent;
  font-weight: 700;
}

.nav-item:hover {
  border-color: var(--admin-line);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--admin-accent);
}

.topbar {
  margin: 0 0 20px;
  padding: 24px 28px;
  border: 1px solid var(--admin-line);
  border-radius: var(--component-radius);
  background: color-mix(in srgb, var(--admin-surface) 94%, transparent);
  box-shadow: var(--admin-shadow);
}

.page-heading h1 {
  color: var(--admin-text);
}

.dashboard-grid,
.metrics-grid,
.admin-cms-grid,
.admin-hub-grid,
.finance-create-layout,
.calendar-layout,
.admin-documents-layout,
.processing-layout,
.communication-layout,
.signature-layout {
  gap: 18px;
}

.panel,
.metric-card,
.admin-hub-card,
.legal-resource-card,
.jurisprudence-card,
.calendar-event,
.calendar-list-row,
.document-mini-row,
.process-document-row,
.legal-process-row,
.client-panel {
  border-radius: var(--component-radius) !important;
}

.panel,
.metric-card {
  overflow: hidden;
}

.section-heading {
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--admin-line) 78%, transparent);
}

.section-heading h2 {
  margin-bottom: 0;
  font-weight: 800;
}

.section-heading .eyebrow,
.eyebrow {
  color: var(--admin-accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}

.metric-card {
  position: relative;
}

.metric-card::after { display: none; }

.primary-btn,
.secondary-btn,
.danger-btn,
.icon-btn,
.text-btn {
  border-radius: var(--component-radius) !important;
  font-weight: 780;
}

.danger-btn {
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
}

.field > span {
  color: var(--admin-muted);
  font-weight: 800;
}

.field input,
.field select,
.field textarea,
.search,
.compact-field select {
  min-height: 42px;
  background: color-mix(in srgb, var(--admin-surface) 94%, var(--admin-surface-muted));
}

.field input[type="file"] {
  padding: 10px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search:focus,
.compact-field select:focus {
  outline: none;
  box-shadow: var(--focus-ring);
}

.table-wrap {
  border-radius: var(--component-radius);
}

table {
  font-size: 12.5px;
}

table th {
  height: 44px;
  font-size: 10px;
}

table td {
  height: 48px;
}

.status,
.badge {
  border-radius: 999px;
  font-weight: 850;
}

.empty-state,
.empty-state-component,
.panel > .empty {
  border: 1px dashed color-mix(in srgb, var(--admin-line-strong) 82%, transparent);
  border-radius: var(--component-radius);
  background: color-mix(in srgb, var(--admin-surface-muted) 70%, transparent);
}

.calendar-panel {
  padding: 0;
}

.calendar-toolbar {
  padding: 18px 20px;
  border-bottom: 1px solid var(--admin-line);
}

.calendar-day {
  border-color: var(--admin-line);
  border-radius: 8px;
}

.calendar-day.today {
  border-color: color-mix(in srgb, var(--admin-accent) 42%, var(--admin-line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--admin-accent) 18%, transparent);
}

.calendar-event {
  border-left: 3px solid var(--admin-accent);
  background: var(--admin-surface);
}

.calendar-list-row {
  border: 1px solid var(--admin-line);
  background: var(--admin-surface);
}

.import-dropzone {
  border-radius: var(--component-radius);
  background: color-mix(in srgb, var(--admin-accent) 5%, var(--admin-surface-muted));
}

.signature-file-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--admin-blue) 24%, var(--admin-line));
  border-radius: var(--component-radius);
  background: color-mix(in srgb, var(--admin-blue) 7%, var(--admin-surface));
  color: inherit;
  text-decoration: none;
}

.signature-file-card span,
.signature-file-card small {
  color: var(--admin-muted);
}

.signature-file-card:hover {
  border-color: color-mix(in srgb, var(--admin-blue) 44%, var(--admin-line));
}

.skeleton-line,
.skeleton-box {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--admin-line) 60%, transparent);
}

.skeleton-line {
  height: 14px;
}

.skeleton-line.short {
  width: 64%;
}

.skeleton-box {
  height: 120px;
}

.skeleton-line::after,
.skeleton-box::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-shimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 900px) {
  .topbar {
    margin: 0 0 14px;
    padding: 18px;
  }

  .content-area {
    padding-inline: 12px;
  }
}

/* Product shell rebuild */
.product-shell {
  --product-radius: 8px;
  --product-focus: 0 0 0 4px color-mix(in srgb, var(--admin-accent) 16%, transparent);
  --product-card-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 18px 44px rgba(17, 24, 39, .06);
  --product-card-shadow-hover: 0 2px 4px rgba(17, 24, 39, .06), 0 24px 58px rgba(17, 24, 39, .09);
}

.product-shell .sidebar {
  padding: 14px;
  gap: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-surface) 96%, var(--admin-accent) 4%), var(--admin-surface) 46%),
    var(--admin-surface);
}

.sidebar-header-card,
.account-card,
.action-card,
.action-container,
.topbar-control-card,
.product-card,
.client-card {
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

.sidebar-header-card {
  display: grid;
  gap: 12px;
  padding: 10px;
}

.product-shell .sidebar-brand {
  margin: 0;
}

.product-shell .sidebar-workspace {
  margin: 0;
}

.account-card {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.action-card {
  padding: 6px;
  box-shadow: none;
}

.workspace-page {
  width: min(1480px, 100%);
  min-height: calc(100dvh - 48px);
  display: grid;
  align-content: start;
  gap: 18px;
  margin-inline: auto;
}

.workspace-page-full {
  width: 100%;
  min-height: 100dvh;
}

.product-shell .main > :not(.chat-page) {
  width: 100%;
}

.button-row,
.action-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
}

.support-mode-banner.action-container {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0;
  border-color: color-mix(in srgb, #b7791f 42%, var(--admin-line));
  background: color-mix(in srgb, #f59e0b 10%, var(--admin-surface));
}

.support-mode-banner.action-container > div:first-child {
  display: grid;
  gap: 2px;
}

.support-mode-banner.action-container strong {
  color: var(--admin-text);
}

.support-mode-banner.action-container span {
  color: var(--admin-muted);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: stretch;
  gap: 18px;
  margin-top: 4px;
  padding: 28px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--admin-blue) 9%, transparent), transparent 46%),
    linear-gradient(180deg, var(--admin-surface), color-mix(in srgb, var(--admin-surface-muted) 86%, var(--admin-surface)));
  box-shadow: var(--product-card-shadow);
}

.dashboard-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--admin-text);
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.dashboard-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--admin-muted);
  font-size: 15px;
  line-height: 1.65;
}

.quick-actions-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: color-mix(in srgb, var(--admin-surface) 88%, var(--admin-blue) 12%);
}

.quick-actions-card > span,
.card-header .eyebrow {
  color: var(--admin-subtle);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.product-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-metrics .metric-card {
  min-height: 142px;
  border-left: 3px solid color-mix(in srgb, var(--admin-accent) 68%, var(--admin-line));
}

.product-dashboard-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: start;
}

.product-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  box-shadow: var(--product-card-shadow);
}

.product-card:hover,
.client-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--admin-blue) 26%, var(--admin-line));
  box-shadow: var(--product-card-shadow-hover);
}

.card-header,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.card-footer {
  padding-top: 6px;
  border-top: 1px solid var(--admin-line);
}

.product-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-summary span,
.limit-grid span,
.client-card-body > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface-muted);
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-list .empty-state-component {
  min-height: 180px;
}

.client-mini-row {
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface-muted);
}

.dashboard-empty,
.client-empty {
  min-height: 230px;
  border-style: solid;
  box-shadow: var(--product-card-shadow);
}

.topbar-control-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  box-shadow: none;
}

.topbar-control-card .search {
  min-width: min(420px, 42vw);
  border-color: transparent;
  background: var(--admin-surface-muted);
}

.client-page-shell {
  display: grid;
  gap: 16px;
}

.client-page-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.client-page-summary .metric-card {
  min-height: 118px;
}

.client-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.client-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.client-card header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--admin-blue) 13%, var(--admin-surface-muted));
  color: var(--admin-blue);
  font-size: 14px;
  font-weight: 900;
}

.client-card h2 {
  overflow: hidden;
  margin: 0;
  color: var(--admin-text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card p {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-body {
  display: grid;
  gap: 8px;
}

.client-card-body span {
  color: var(--admin-subtle);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-card-body strong {
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-size: 13px;
}

.client-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--admin-line);
}

.action-cluster {
  justify-content: flex-end;
  min-width: 260px;
  padding: 8px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface-muted);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.text-btn:focus-visible,
.nav-item:focus-visible,
.sidebar-user:focus-visible,
.search:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  box-shadow: var(--product-focus);
}

@media (max-width: 1180px) {
  .product-metrics,
  .client-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero,
  .product-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .workspace-page {
    min-height: calc(100dvh - 32px);
    gap: 14px;
  }

  .dashboard-hero {
    padding: 20px;
  }

  .quick-actions-card .button-row,
  .client-card-actions,
  .action-container,
  .topbar-control-card {
    align-items: stretch;
    flex-direction: column;
  }

  .product-metrics,
  .client-page-summary,
  .client-card-grid,
  .product-summary {
    grid-template-columns: 1fr;
  }

  .topbar-control-card .search {
    min-width: 0;
  }

  .client-card header {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .client-card header .status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .action-cluster {
    justify-content: flex-start;
    min-width: 0;
  }
}

/* Full SaaS workspace rebuild */
.product-section-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: stretch;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--admin-accent) 7%, transparent), transparent 44%),
    linear-gradient(180deg, var(--admin-surface), color-mix(in srgb, var(--admin-surface-muted) 84%, var(--admin-surface)));
  box-shadow: var(--product-card-shadow);
}

.product-section-hero h2 {
  max-width: 780px;
  margin: 3px 0 0;
  color: var(--admin-text);
  font-size: clamp(25px, 2.5vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.product-section-hero p:not(.eyebrow) {
  max-width: 690px;
  margin: 10px 0 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-stat-stack {
  display: grid;
  gap: 10px;
  align-content: center;
}

.hero-stat-stack span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: color-mix(in srgb, var(--admin-surface) 78%, var(--admin-surface-muted));
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 750;
}

.hero-stat-stack strong {
  color: var(--admin-text);
  font-size: 22px;
}

.document-workspace,
.signature-workspace {
  display: grid;
  gap: 16px;
}

.document-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: start;
}

.document-library-panel,
.document-upload-card,
.signature-envelope-panel,
.signature-form-panel,
.audit-panel {
  box-shadow: var(--product-card-shadow);
}

.document-card-list {
  display: grid;
  gap: 10px;
}

.document-card-list .legal-resource-card,
.document-resource-card,
.signature-envelope-card {
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface-muted);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.document-card-list .legal-resource-card:hover,
.signature-envelope-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--admin-blue) 30%, var(--admin-line));
  box-shadow: var(--product-card-shadow);
}

.document-upload-card {
  position: sticky;
  top: 24px;
}

.premium-form-grid {
  gap: 14px;
}

.upload-dropzone {
  min-height: 118px;
  align-content: center;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--admin-blue) 46%, var(--admin-line));
  border-radius: var(--product-radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--admin-blue) 7%, transparent), transparent),
    var(--admin-surface-muted);
  color: var(--admin-text);
}

.upload-dropzone > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-text);
  font-weight: 850;
}

.upload-dropzone input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface);
  color: var(--admin-muted);
}

.compact-upload {
  min-height: 98px;
}

.signature-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.signature-layout {
  align-items: start;
}

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

.signature-envelope-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 14px;
}

.signature-envelope-card strong,
.signature-envelope-card p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-envelope-card small {
  color: var(--admin-muted);
}

.signature-envelope-card > small {
  grid-column: 1 / -1;
}

.signature-form-panel .operational-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signature-form-panel button[type="submit"] {
  grid-column: 1 / -1;
}

.calendar-hero {
  border-left: 3px solid color-mix(in srgb, var(--admin-blue) 72%, var(--admin-line));
}

.calendar-layout {
  align-items: start;
}

.calendar-panel,
.calendar-detail,
.previdenciary-queue,
.previdenciary-dashboard {
  box-shadow: var(--product-card-shadow);
}

.calendar-toolbar {
  background: linear-gradient(180deg, var(--admin-surface), var(--admin-surface-muted));
}

.calendar-day,
.calendar-list-row,
.document-mini-row {
  border-radius: var(--product-radius);
}

.calendar-upload-zone {
  min-height: 132px;
}

.process-upload-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 220px;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: var(--product-radius);
  background: var(--admin-surface-muted);
}

.upload-form-header {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
}

.upload-form-header strong {
  color: var(--admin-text);
}

.upload-form-header span {
  color: var(--admin-muted);
  font-size: 12px;
}

.process-file-drop,
.process-upload-card button[type="submit"] {
  grid-column: 1 / -1;
}

.process-file-drop {
  min-height: 106px;
}

.client-create-shell {
  width: min(760px, calc(100vw - 28px));
}

@media (max-width: 1180px) {
  .product-section-hero,
  .document-layout {
    grid-template-columns: 1fr;
  }

  .document-upload-card {
    position: static;
  }

  .signature-envelope-list,
  .signature-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product-section-hero,
  .hero-stat-stack span,
  .signature-envelope-card,
  .process-upload-card,
  .signature-form-panel .operational-form {
    grid-template-columns: 1fr;
  }

  .product-section-hero {
    padding: 18px;
  }

  .signature-metrics,
  .signature-envelope-list {
    grid-template-columns: 1fr;
  }

  .hero-stat-stack span {
    align-items: start;
  }
}

/* Studio redesign: visible SaaS identity reset */
.studio-shell {
  --admin-bg: #f2f4f7;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f7f8fa;
  --admin-line: #d9dee7;
  --admin-line-strong: #c7ceda;
  --admin-text: #151922;
  --admin-muted: #606b7d;
  --admin-subtle: #8791a1;
  --admin-accent: #b94f2a;
  --admin-accent-soft: #fff0e8;
  --admin-blue: #0f766e;
  --studio-ink: #17191d;
  --studio-panel: #ffffff;
  --studio-panel-soft: #f8fafb;
  --studio-green: #0f766e;
  --studio-copper: #b94f2a;
  --studio-violet: #6d5bd0;
  --studio-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 26px 70px rgba(15, 23, 42, .08);
  grid-template-columns: 292px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255,255,255,.62), rgba(242,244,247,.94)),
    radial-gradient(circle at 92% 8%, rgba(15, 118, 110, .12), transparent 28%),
    var(--admin-bg);
}

.studio-shell .sidebar {
  width: 292px;
  padding: 16px;
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 36%),
    var(--studio-ink);
  color: #f7f8fb;
}

.studio-shell .sidebar-header-card,
.studio-shell .account-card,
.studio-shell .action-card {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.055);
  box-shadow: none;
}

.studio-shell .sidebar-brand strong,
.studio-shell .sidebar-workspace strong,
.studio-shell .sidebar-user strong {
  color: #fff;
}

.studio-shell .sidebar-brand span,
.studio-shell .sidebar-workspace small,
.studio-shell .sidebar-user small {
  color: rgba(255,255,255,.58);
}

.studio-shell .sidebar-brand .brand-mark {
  background: var(--studio-copper);
}

.studio-shell .sidebar-workspace {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
}

.studio-shell .sidebar-workspace > span {
  background: rgba(185, 79, 42, .18);
  color: #ffd5c3;
}

.studio-shell .nav-group > span {
  color: rgba(255,255,255,.38);
}

.studio-shell .nav-item {
  color: rgba(255,255,255,.72);
}

.studio-shell .nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.studio-shell .nav-item.active {
  background: #fff;
  color: var(--studio-ink);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}

.studio-shell .nav-item.active .ui-icon {
  color: var(--studio-copper);
}

.studio-shell .sidebar-user,
.studio-shell .sidebar-utilities .icon-text,
.studio-shell .sidebar-utilities .logout {
  color: rgba(255,255,255,.74);
}

.studio-shell .sidebar-user:hover,
.studio-shell .sidebar-utilities .icon-text:hover,
.studio-shell .sidebar-utilities .logout:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.studio-shell .user-avatar {
  background: #fff;
  color: var(--studio-ink);
}

.studio-shell .main {
  padding: 22px;
}

.studio-shell .workspace-page {
  gap: 22px;
}

.studio-shell .topbar {
  min-height: 96px;
  padding: 18px 20px;
  border: 1px solid rgba(217, 222, 231, .82);
  background: rgba(255,255,255,.86);
  box-shadow: var(--studio-shadow);
  backdrop-filter: blur(14px);
}

.studio-shell .page-breadcrumb {
  color: var(--studio-copper);
}

.studio-shell .topbar h1 {
  font-size: clamp(28px, 2.4vw, 40px);
  letter-spacing: 0;
}

.studio-shell .topbar .page-heading > p {
  color: var(--admin-muted);
}

.studio-shell .topbar-control-card {
  min-width: min(560px, 46vw);
  padding: 6px;
  border: 1px solid var(--admin-line);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.studio-shell .topbar-control-card .search {
  min-height: 42px;
  background: #f4f6f8;
}

.studio-shell .primary-btn {
  border-color: var(--studio-copper);
  background: var(--studio-copper);
  color: #fff;
  box-shadow: 0 10px 22px rgba(185, 79, 42, .2);
}

.studio-shell .secondary-btn {
  border-color: var(--admin-line);
  background: #fff;
  color: var(--admin-text);
}

.studio-shell .text-btn {
  color: var(--studio-green);
}

.studio-shell .panel,
.studio-shell .metric-card,
.studio-shell .dialog-card {
  border-color: rgba(217, 222, 231, .88);
  background: var(--studio-panel);
  box-shadow: var(--studio-shadow);
}

.studio-shell .client-page-shell {
  gap: 20px;
}

.studio-shell .client-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  padding: 28px;
  border: 0;
  background:
    linear-gradient(135deg, rgba(185,79,42,.24), transparent 34%),
    linear-gradient(180deg, #20232a, #17191d);
  color: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
}

.studio-shell .client-hero .eyebrow {
  color: #ffd5c3;
}

.studio-shell .client-hero h2 {
  color: #fff;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
}

.studio-shell .client-hero p:not(.eyebrow) {
  color: rgba(255,255,255,.72);
}

.studio-shell .client-hero .hero-stat-stack span {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.72);
}

.studio-shell .client-hero .hero-stat-stack strong {
  color: #fff;
}

.studio-shell .client-page-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.studio-shell .client-page-summary .metric-card {
  min-height: 104px;
  border-left: 0;
  border-top: 3px solid var(--studio-green);
  background:
    linear-gradient(180deg, rgba(15,118,110,.055), transparent),
    #fff;
}

.studio-shell .client-card-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--studio-shadow);
}

.studio-shell .client-card {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(360px, 1fr) minmax(240px, auto);
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.studio-shell .client-card:last-child {
  border-bottom: 0;
}

.studio-shell .client-card:hover {
  transform: none;
  background: #f8fafb;
  box-shadow: none;
}

.studio-shell .client-card header {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
}

.studio-shell .client-card header .status {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
}

.studio-shell .client-avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #17191d;
  color: #fff;
}

.studio-shell .client-card h2 {
  font-size: 15px;
}

.studio-shell .client-card-body {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.studio-shell .client-card-body > div {
  min-height: 62px;
  padding: 10px;
  background: #f7f8fa;
}

.studio-shell .client-card-actions {
  justify-content: flex-end;
  padding: 0;
  border: 0;
}

.studio-shell .client-empty {
  border: 1px solid var(--admin-line);
  background: #fff;
}

@media (max-width: 1180px) {
  .studio-shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }

  .studio-shell .sidebar {
    width: 252px;
  }

  .studio-shell .client-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .studio-shell .client-card-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .studio-shell {
    grid-template-columns: 1fr;
  }

  .studio-shell .sidebar {
    width: 280px;
  }

  .studio-shell .main {
    padding: 14px;
  }

  .studio-shell .client-hero,
  .studio-shell .client-page-summary,
  .studio-shell .client-card-body {
    grid-template-columns: 1fr;
  }
}

/* Authenticated home layout: keep it isolated from the wider studio shell. */
.app-shell.home-shell {
  --home-sidebar-width: 76px;
  grid-template-columns: var(--home-sidebar-width) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  background: #eef2f8;
}

[data-theme="dark"] .app-shell.home-shell {
  background: var(--admin-bg);
}

.app-shell.home-shell .mobile-nav-toggle {
  display: none;
}

.app-shell.home-shell .sidebar {
  position: relative;
  inset: auto;
  width: var(--home-sidebar-width);
  min-width: var(--home-sidebar-width);
  height: 100dvh;
  align-items: center;
  gap: 18px;
  padding: 24px 10px;
  overflow: hidden;
  transform: none;
}

.app-shell.home-shell .sidebar-header-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.app-shell.home-shell .sidebar-workspace,
.app-shell.home-shell .sidebar-brand strong,
.app-shell.home-shell .sidebar-brand span,
.app-shell.home-shell .nav-group > span,
.app-shell.home-shell .nav-item span,
.app-shell.home-shell .sidebar-user .user-copy,
.app-shell.home-shell .sidebar-user > .ui-icon {
  display: none;
}

.app-shell.home-shell .sidebar-brand,
.app-shell.home-shell .sidebar-user,
.app-shell.home-shell .nav-item,
.app-shell.home-shell .sidebar-utilities .nav-item {
  justify-content: center;
}

.app-shell.home-shell .brand-mark,
.app-shell.home-shell .user-avatar {
  width: 42px;
  height: 42px;
}

.app-shell.home-shell .nav {
  width: 100%;
  display: grid;
  gap: 8px;
}

.app-shell.home-shell .nav-group {
  gap: 8px;
  margin-bottom: 0;
}

.app-shell.home-shell .nav-item {
  min-height: 42px;
  padding: 0;
}

.app-shell.home-shell .sidebar-footer {
  width: 100%;
  border: 0;
  padding-top: 0;
}

.app-shell.home-shell .main {
  width: 100%;
  min-width: 0;
  height: 100dvh;
  overflow-y: auto;
  padding: 0;
  background: transparent;
}

.app-shell.home-shell .main > .workspace-page {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  gap: 0;
}

.app-shell.home-shell .home-dashboard {
  width: min(1432px, calc(100% - 48px));
  max-width: calc(100% - 48px);
  margin-inline: auto;
  padding: clamp(28px, 6vh, 82px) 0 72px;
}

@media (max-width: 1180px) {
  .app-shell.home-shell .home-hero {
    grid-template-columns: 1fr;
  }

  .app-shell.home-shell .ai-action-grid,
  .app-shell.home-shell .home-insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell.home-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: auto;
  }

  .app-shell.home-shell .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 14px;
    overflow-x: auto;
  }

  .app-shell.home-shell .sidebar-header-card,
  .app-shell.home-shell .nav,
  .app-shell.home-shell .sidebar-footer,
  .app-shell.home-shell .sidebar-utilities {
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  .app-shell.home-shell .nav-group {
    display: flex;
    flex-direction: row;
  }

  .app-shell.home-shell .main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .app-shell.home-shell .main > .workspace-page {
    min-height: 0;
  }

  .app-shell.home-shell .home-dashboard {
    width: min(100% - 28px, 640px);
    max-width: calc(100% - 28px);
    padding: 18px 0 52px;
  }

  .app-shell.home-shell .home-hero,
  .app-shell.home-shell .ai-workspace-card {
    padding: 18px;
  }

  .app-shell.home-shell .quick-task-row {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .app-shell.home-shell .ai-action-grid,
  .app-shell.home-shell .home-insights-grid {
    grid-template-columns: 1fr;
  }
}

/* Final unified clean UI layer */
.app-shell {
  --admin-bg: #f7f8fa;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f3f5f7;
  --admin-line: #e7e9ee;
  --admin-line-strong: #d9dde5;
  --admin-text: #151923;
  --admin-muted: #5f6876;
  --admin-subtle: #8a93a3;
  --admin-accent: #e86524;
  --admin-accent-soft: #fff4ed;
  --admin-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 12px 34px rgba(15, 23, 42, .045);
  grid-template-columns: 272px minmax(0, 1fr);
  background: var(--admin-bg);
}

.sidebar { width: 272px; padding: 16px 12px 14px; background: #fff; border-right: 1px solid var(--admin-line); }
.sidebar-header-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.sidebar-workspace { border-color: var(--admin-line); background: #f8f9fb; box-shadow: none; }
.nav { display: block; padding-right: 2px; }
.nav-group { display: grid; gap: 3px; margin: 0 0 10px; }
.nav-group > summary { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; border-radius: 6px; color: var(--admin-subtle); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--admin-surface-muted); color: var(--admin-muted); }
.nav-group > summary .ui-icon { transition: transform 160ms ease; }
.nav-group[open] > summary .ui-icon { transform: rotate(45deg); }
.nav-group > span { display: none; }
.nav-item { min-height: 36px; border-radius: 7px; color: var(--admin-muted); font-size: 12.5px; font-weight: 600; }
.nav-item:hover { background: var(--admin-surface-muted); color: var(--admin-text); }
.nav-item.active { background: #f8efe9; color: var(--admin-text); box-shadow: inset 0 0 0 1px rgba(232, 101, 36, .08); }
.nav-item.active::before { top: 9px; bottom: 9px; background: var(--admin-accent); }

.main { padding: 0 clamp(22px, 3vw, 42px) 48px; background: var(--admin-bg); }
.topbar { min-height: 96px; margin-bottom: 20px; border-bottom-color: var(--admin-line); background: color-mix(in srgb, var(--admin-bg) 94%, transparent); }
.topbar h1 { font-size: clamp(24px, 2vw, 30px); letter-spacing: 0; }
.panel, .metric-card, .plan-card, .kanban-column, .dialog-card, .integration-summary, .panel-compact, .admin-hub-card, .quick-task-card, .ai-workspace-card { border-color: var(--admin-line); border-radius: 8px; background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.primary-btn { border-color: var(--admin-accent); background: var(--admin-accent); box-shadow: 0 7px 18px rgba(232, 101, 36, .16); }
.secondary-btn, .ghost-btn, .icon-btn { border-color: var(--admin-line-strong); background: #fff; box-shadow: none; }
.metric-heading .ui-icon, .sidebar-workspace > span { border-color: rgba(232, 101, 36, .12); background: var(--admin-accent-soft); color: var(--admin-accent); }
.metric-card { min-height: 116px; padding: 17px; }

.home-dashboard { width: min(1320px, 100%); padding: 22px 0 54px; }
.ai-command-center { display: grid; gap: 18px; margin-bottom: 18px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--admin-line); border-radius: 8px; background: #fff; box-shadow: var(--admin-shadow); }
.ai-command-copy { max-width: 850px; }
.home-kicker { color: var(--admin-accent); font-size: 11px; letter-spacing: .06em; }
.ai-command-center h1 { max-width: 900px; margin: 8px 0; color: var(--admin-text); font-size: clamp(30px, 4vw, 52px); line-height: 1.04; letter-spacing: 0; }
.ai-command-center p, .home-hero p { margin: 0; color: var(--admin-muted); font-size: 14px; line-height: 1.55; }
.ai-prompt-box { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: end; gap: 12px; border: 1px solid var(--admin-line-strong); border-radius: 8px; background: #fbfcfd; padding: 12px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03); }
.ai-prompt-large { min-height: 118px; }
.ai-prompt-box textarea { width: 100%; min-height: 72px; border: 0; outline: 0; resize: vertical; background: transparent; color: var(--admin-text); font-size: 15px; line-height: 1.5; }
.ai-prompt-box button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--admin-accent); border-radius: 7px; background: var(--admin-accent); color: #fff; }
.ai-suggestion-row, .quick-task-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; overflow: visible; padding: 0; }
.quick-task-card { min-height: 92px; align-content: start; gap: 7px; padding: 14px 34px 14px 14px; border-color: var(--admin-line); background: #fff; }
.quick-task-card:hover { border-color: var(--admin-line-strong); background: #fbfcfd; transform: translateY(-1px); }
.quick-task-card strong { color: var(--admin-text); font-size: 13px; }
.quick-task-card small { color: var(--admin-muted); font-size: 11px; }
.quick-task-icon, .quick-task-card i, .ai-action-button i { color: var(--admin-accent); }
.home-hero { min-height: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 18px 20px; border-color: var(--admin-line); border-radius: 8px; background: #fff; box-shadow: var(--admin-shadow); }
.home-hero h2 { max-width: 760px; margin: 5px 0 6px; color: var(--admin-text); font-size: clamp(20px, 2vw, 28px); line-height: 1.16; letter-spacing: 0; }
.home-hero-actions { flex: 0 0 auto; margin: 0; }
.home-insights-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 1180px) {
  .ai-suggestion-row, .quick-task-row, .home-insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: 272px; }
  .main { padding-inline: 16px; }
}

@media (max-width: 680px) {
  .ai-suggestion-row, .quick-task-row, .home-insights-grid { grid-template-columns: 1fr; }
  .ai-command-center { padding: 18px; }
  .ai-command-center h1 { font-size: 30px; }
  .ai-prompt-box { grid-template-columns: 1fr; }
  .ai-prompt-box button { width: 100%; }
}

/* Keep the internal dashboard clean even when the sidebar theme is dark. */
[data-theme="dark"] .app-shell.command-home,
[data-theme="dark"] .app-shell.command-home .main {
  background: #f7f8fa;
  color: #151923;
}

[data-theme="dark"] .app-shell.command-home .ai-command-center,
[data-theme="dark"] .app-shell.command-home .home-hero,
[data-theme="dark"] .app-shell.command-home .metric-card,
[data-theme="dark"] .app-shell.command-home .quick-task-card {
  border-color: #e7e9ee;
  background: #ffffff;
  color: #151923;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 12px 34px rgba(15, 23, 42, .045);
}

[data-theme="dark"] .app-shell.command-home .home-hero h2,
[data-theme="dark"] .app-shell.command-home .metric-card > strong,
[data-theme="dark"] .app-shell.command-home .quick-task-card strong {
  color: #151923;
}

[data-theme="dark"] .app-shell.command-home .ai-command-center p,
[data-theme="dark"] .app-shell.command-home .home-hero p,
[data-theme="dark"] .app-shell.command-home .metric-card > small,
[data-theme="dark"] .app-shell.command-home .quick-task-card small {
  color: #5f6876;
}

[data-theme="dark"] .app-shell.command-home .ai-prompt-box {
  border-color: #d9dde5;
  background: #fbfcfd;
}

[data-theme="dark"] .app-shell.command-home .ai-prompt-box textarea {
  color: #151923;
}

/* Force the internal product toward a light Linear/Notion-style surface. */
[data-theme="dark"] .app-shell {
  --admin-bg: #f7f8fa;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f3f5f7;
  --admin-line: #e7e9ee;
  --admin-line-strong: #d9dde5;
  --admin-text: #151923;
  --admin-muted: #5f6876;
  --admin-subtle: #8a93a3;
  --admin-accent: #e86524;
  --admin-accent-soft: #fff4ed;
  --admin-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 12px 34px rgba(15, 23, 42, .045);
  background: #f7f8fa;
  color: #151923;
}

[data-theme="dark"] .app-shell .sidebar,
.app-shell .sidebar {
  background: #ffffff;
  color: #151923;
}

[data-theme="dark"] .app-shell .sidebar-brand strong,
[data-theme="dark"] .app-shell .sidebar-workspace strong,
[data-theme="dark"] .app-shell .sidebar-user strong,
[data-theme="dark"] .app-shell .nav-item.active,
.app-shell .sidebar-brand strong,
.app-shell .sidebar-workspace strong,
.app-shell .sidebar-user strong {
  color: #151923;
}

[data-theme="dark"] .app-shell .sidebar-brand span,
[data-theme="dark"] .app-shell .sidebar-workspace small,
[data-theme="dark"] .app-shell .sidebar-user small,
[data-theme="dark"] .app-shell .nav-item,
[data-theme="dark"] .app-shell .nav-group > summary,
.app-shell .nav-item,
.app-shell .nav-group > summary {
  color: #667085;
}

[data-theme="dark"] .app-shell .sidebar-workspace,
.app-shell .sidebar-workspace {
  border-color: #e7e9ee;
  background: #f8f9fb;
}

[data-theme="dark"] .app-shell .nav-item:hover,
.app-shell .nav-item:hover {
  background: #f3f5f7;
  color: #151923;
}

[data-theme="dark"] .app-shell .nav-item.active,
.app-shell .nav-item.active {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #e7e9ee, 0 1px 2px rgba(15, 23, 42, .04);
}

[data-theme="dark"] .app-shell .sidebar-footer,
.app-shell .sidebar-footer {
  border-top-color: #e7e9ee;
}

.app-shell .ai-command-center {
  margin-top: 8px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 14px 36px rgba(15, 23, 42, .045);
}

.app-shell .home-insights-grid {
  margin-top: 16px;
}

.app-shell .metric-card {
  min-height: 104px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
}

/* Justfy-like dashboard direction */
.app-shell {
  grid-template-columns: 154px minmax(0, 1fr);
  background: #edf0f6;
}

.app-shell .sidebar {
  width: 154px;
  align-items: stretch;
  padding: 22px 12px 16px;
  border-right: 1px solid #d6dbe4;
  background: #f8fbfa;
}

.app-shell .sidebar-header-card {
  width: 100%;
}

.app-shell .sidebar-brand {
  min-height: 38px;
  justify-content: flex-start;
  margin: 0 0 18px;
}

.app-shell .sidebar-workspace,
.app-shell .sidebar-user .user-copy,
.app-shell .sidebar-user > .ui-icon,
.app-shell .nav-group > summary span,
.app-shell .nav-group > summary .ui-icon {
  display: none;
}

.app-shell .nav {
  width: 100%;
  display: grid;
  justify-items: stretch;
  gap: 8px;
  overflow: visible;
  padding: 0;
}

.app-shell .nav-group {
  width: 100%;
  display: grid;
  justify-items: stretch;
  gap: 6px;
  margin: 0;
}

.app-shell .nav-group > summary {
  display: none;
}

.app-shell .nav-item,
[data-theme="dark"] .app-shell .nav-item {
  width: 100%;
  height: 42px;
  min-height: 42px;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: #20242c;
  font-size: 12px;
  font-weight: 500;
}

.app-shell .nav-item span {
  display: inline;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .nav-item:hover,
[data-theme="dark"] .app-shell .nav-item:hover {
  background: #eceff4;
}

.app-shell .nav-item.active,
[data-theme="dark"] .app-shell .nav-item.active {
  background: #e4e6eb;
  color: #151923;
  box-shadow: none;
}

.app-shell .nav-item.active::before {
  display: none;
}

.app-shell .sidebar-footer {
  width: 100%;
  align-items: stretch;
  border-top: 0;
  gap: 10px;
}

.app-shell .sidebar-user {
  width: 100%;
  height: 42px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  justify-items: stretch;
  gap: 9px;
  padding: 4px 8px;
  background: transparent;
}

.app-shell .sidebar-user .user-copy {
  display: grid;
}

.app-shell .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ffffff;
  color: #151923;
  box-shadow: inset 0 0 0 1px #d9dde5;
}

.app-shell .sidebar-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.app-shell .sidebar-brand strong {
  max-width: 92px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.12;
}

.app-shell .sidebar-brand span {
  display: none;
}

.app-shell .chat-workspace {
  grid-template-columns: minmax(190px, 280px) minmax(300px, 1fr) minmax(210px, 280px);
}

@media (max-width: 1250px) {
  .app-shell .chat-workspace {
    grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  }
}

/* Sidebar accordion refinement */
.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.app-shell .sidebar {
  width: 232px;
  padding: 20px 14px 16px;
  border-right: 1px solid #e6e9ef;
  border-radius: 0;
}

.app-shell .sidebar-brand {
  margin-bottom: 18px;
}

.app-shell .sidebar-brand strong {
  max-width: 150px;
  font-size: 13px;
}

.app-shell .nav {
  gap: 4px;
  overflow-y: auto;
}

.app-shell .nav-group {
  gap: 2px;
  border-bottom: 1px solid #edf0f4;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.app-shell .nav-group:last-child {
  border-bottom: 0;
}

.app-shell .nav-group > summary {
  min-height: 34px;
  display: flex;
  border-radius: 0;
  padding: 0 2px;
  color: #8a93a3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.app-shell .nav-group > summary span,
.app-shell .nav-group > summary .ui-icon {
  display: inline-flex;
}

.app-shell .nav-group > summary:hover {
  background: transparent;
  color: #667085;
}

.app-shell .nav-group[open] > summary {
  color: #667085;
}

.app-shell .nav-item,
[data-theme="dark"] .app-shell .nav-item {
  height: 34px;
  min-height: 34px;
  border-radius: 0;
  padding: 0 10px 0 14px;
  color: #313844;
  font-size: 13px;
}

.app-shell .nav-item .ui-icon {
  display: none;
}

.app-shell .nav-item:hover,
[data-theme="dark"] .app-shell .nav-item:hover {
  background: #f4f6f9;
}

.app-shell .nav-item.active,
[data-theme="dark"] .app-shell .nav-item.active {
  background: #f4f6f9;
  box-shadow: inset 2px 0 0 #e86524;
}

.app-shell .sidebar-user {
  border-radius: 0;
}

.app-shell .sidebar-utilities .nav-item {
  border-radius: 0;
}

.app-shell .sidebar-utilities {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: stretch;
}

.app-shell .main {
  padding: 0 clamp(28px, 6vw, 198px) 48px;
  background: #edf0f6;
}

.app-shell .main.main-fixed {
  height: 100dvh;
  overflow: hidden;
  padding: 0;
}

.app-shell .workspace-page {
  max-width: 1432px;
  margin-inline: auto;
}

.app-shell .workspace-page.workspace-page-full {
  width: 100%;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.app-shell .workspace-page-full .chat-page {
  height: 100%;
  min-height: 0;
}

.justify-home.home-dashboard {
  width: 100%;
  padding: 80px 0 52px;
}

.home-promo-banner {
  min-height: 176px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
  align-items: center;
  gap: 28px;
  padding: 24px 32px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}

.home-promo-banner h1 {
  margin: 0 0 8px;
  color: #1f1f24;
  font-size: 20px;
  line-height: 1.25;
}

.home-promo-banner p {
  margin: 0 0 56px;
  color: #666b73;
  font-size: 14px;
}

.home-promo-banner .primary-btn {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 5px;
  box-shadow: none;
}

.promo-illustration {
  height: 160px;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: #ffe2d8;
}

.promo-illustration span {
  position: absolute;
  left: 58px;
  top: 36px;
  width: 170px;
  height: 104px;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 28px 14px 0 #ff6b55;
  transform: rotate(-7deg);
}

.promo-illustration strong {
  position: absolute;
  right: 84px;
  top: 28px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff6b55;
  color: #fff;
  font-size: 15px;
}

.promo-illustration i {
  position: absolute;
  inset: -30px -20px auto auto;
  width: 150px;
  height: 92px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
}

.home-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 58px;
}

.home-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d3d5db;
}

.home-dots span:first-child {
  background: #00a884;
}

.home-dots.small {
  margin: 18px 0 60px;
}

.home-task-section {
  display: grid;
  gap: 18px;
}

.home-section-title,
.ai-workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.home-section-title h2,
.ai-workspace-heading h2 {
  margin: 0;
  color: #05070d;
  font-size: 22px;
}

.home-section-controls {
  display: flex;
  gap: 8px;
}

.home-section-controls button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d7dbe4;
  border-radius: 5px;
  background: transparent;
  color: #8b93a2;
}

.app-shell .ai-suggestion-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(244px, 1fr);
  grid-template-columns: none;
  gap: 16px;
  overflow: hidden;
}

.app-shell .quick-task-card {
  min-height: 116px;
  padding: 24px 42px 20px 24px;
  border: 1px solid #ffb8a8;
  border-radius: 6px;
  background: #f6e8e4;
  box-shadow: none;
}

.app-shell .quick-task-card strong {
  font-size: 14px;
  font-weight: 600;
}

.app-shell .quick-task-card small {
  color: #444853;
  font-size: 13px;
}

.compact-ai.ai-command-center {
  gap: 22px;
  margin: 0;
  padding: 24px;
  border: 1px solid #cbd2dc;
  border-radius: 6px;
  background: rgba(255, 255, 255, .82);
  box-shadow: none;
}

.compact-ai .ai-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.compact-ai .ai-action-button {
  min-height: 44px;
  border: 1px solid #dfe4ec;
  border-radius: 6px;
  background: #fbfbfd;
  box-shadow: none;
}

.compact-ai .ai-prompt-box {
  min-height: 56px;
  border-radius: 6px;
  background: #fbfbfd;
}

.compact-ai .ai-prompt-box textarea {
  min-height: 32px;
}

.home-insights-grid {
  margin-top: 28px;
}

@media (max-width: 1180px) {
  .home-promo-banner {
    grid-template-columns: 1fr;
  }

  .app-shell .ai-suggestion-row {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .compact-ai .ai-action-grid {
    grid-template-columns: 1fr;
  }
}

.presentation-page .primary-btn,
.presentation-page .plan-card .primary-btn,
.presentation-page .public-nav nav .primary-btn {
  border: 1px solid #f26a21 !important;
  border-radius: 8px !important;
  background: #f26a21 !important;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(242, 106, 33, .24) !important;
}

.presentation-page .primary-btn:hover,
.presentation-page .plan-card .primary-btn:hover,
.presentation-page .public-nav nav .primary-btn:hover {
  border-color: #e85f18 !important;
  background: #e85f18 !important;
}

.presentation-page .secondary-btn,
.presentation-page .plan-card .secondary-btn {
  border: 1px solid #dde2ea !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #12141a !important;
  box-shadow: 0 8px 20px rgba(24, 35, 62, .06) !important;
}

.presentation-page .public-nav nav button:not(.primary-btn) {
  background: transparent !important;
  color: #5f6368 !important;
  box-shadow: none !important;
}

.presentation-page .presentation-module-grid article,
.presentation-page .presentation-screen-card,
.presentation-page .presentation-billing-cards article,
.presentation-page .presentation-flow article,
.presentation-page .plan-card {
  border-color: #dde2ea !important;
  background: #fff !important;
  color: #12141a !important;
}

.presentation-page .plan-card {
  border-width: 1px !important;
  border-style: solid !important;
  box-shadow: 0 22px 70px rgba(24, 35, 62, .08) !important;
}

.presentation-page .plan-card.recommended {
  border-color: #f26a21 !important;
}

/* TippOs clean blue refresh for admin and client areas */
:root {
  --admin-accent: #2563eb;
  --admin-accent-soft: #eaf3ff;
}

.app-shell,
.app-shell.home-shell,
.studio-shell,
.product-shell,
.sst-client-portal-shell {
  --admin-bg: #f5f8fc;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f8fbff;
  --admin-line: #dce6f4;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-accent: #2563eb;
  --admin-accent-soft: #eaf3ff;
  --tippos-blue-strong: #1d4ed8;
  --tippos-blue-soft: #dbeafe;
  --tippos-cyan: #38bdf8;
  background:
    radial-gradient(circle at 86% 0%, rgba(56, 189, 248, .16), transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, #eef5ff 48%, #f9fbff 100%);
  color: var(--admin-text);
}

[data-theme="dark"] .app-shell,
[data-theme="dark"] .studio-shell,
[data-theme="dark"] .product-shell {
  --admin-bg: #0b1220;
  --admin-surface: #111827;
  --admin-surface-muted: #0f172a;
  --admin-line: rgba(148, 163, 184, .24);
  --admin-text: #e5eefc;
  --admin-muted: #a8b5c8;
  --admin-accent: #60a5fa;
  --admin-accent-soft: rgba(96, 165, 250, .14);
  background:
    radial-gradient(circle at 86% 0%, rgba(56, 189, 248, .14), transparent 34%),
    linear-gradient(135deg, #08111f 0%, #0e1728 54%, #0a1323 100%);
}

.app-shell .sidebar {
  border-right-color: rgba(148, 163, 184, .2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(246, 250, 255, .9)),
    #ffffff;
  box-shadow: 16px 0 40px rgba(15, 23, 42, .04);
}

[data-theme="dark"] .app-shell .sidebar {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, .96), rgba(15, 23, 42, .92)),
    #111827;
}

.app-shell .content,
.app-shell .main,
.sst-client-portal-shell .content {
  position: relative;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, .09), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(245, 248, 252, .88));
}

.app-shell .workspace-page,
.sst-client-portal-shell .content {
  position: relative;
  isolation: isolate;
}

.app-shell .workspace-page::before,
.sst-client-portal-shell .content::before {
  content: "";
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: -1;
  width: min(430px, 42vw);
  height: 220px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(248, 251, 255, .78), rgba(248, 251, 255, .38)),
    url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=900&q=80") center / cover;
  box-shadow: 0 24px 70px rgba(37, 99, 235, .13);
  opacity: .18;
  pointer-events: none;
  animation: tippos-image-float 12s ease-in-out infinite;
}

.sst-client-portal-shell .content::before {
  background:
    linear-gradient(135deg, rgba(248, 251, 255, .76), rgba(248, 251, 255, .34)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=900&q=80") center / cover;
}

.topbar,
.panel,
.metric-card,
.admin-hub-card,
.quick-task-card,
.ai-command-center,
.home-promo-banner,
.compact-ai.ai-command-center,
.product-card {
  border-color: rgba(148, 163, 184, .22) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .94)) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .07) !important;
  animation: tippos-panel-rise .52s cubic-bezier(.2, .8, .2, 1) both;
}

.topbar {
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 20px -42px auto;
  width: 220px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(56, 189, 248, .12));
  filter: blur(2px);
  pointer-events: none;
  animation: tippos-soft-sheen 9s ease-in-out infinite;
}

.primary-btn,
.sst-primary,
.ai-prompt-box button,
.home-promo-banner .primary-btn,
.login-v2-card .primary-btn {
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .22) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease !important;
}

.primary-btn:hover,
.sst-primary:hover,
.ai-prompt-box button:hover,
.home-promo-banner .primary-btn:hover,
.login-v2-card .primary-btn:hover {
  border-color: #1d4ed8 !important;
  background: linear-gradient(135deg, #1d4ed8, #0284c7) !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .30) !important;
  transform: translateY(-1px);
}

.secondary-btn:hover,
.text-btn:hover,
.icon-btn:hover,
.home-section-controls button:hover {
  border-color: rgba(37, 99, 235, .28) !important;
  background: rgba(37, 99, 235, .07) !important;
  color: #1d4ed8 !important;
}

.nav-item.active,
[data-theme="dark"] .app-shell .nav-item.active,
.studio-shell .nav-item.active {
  border-color: rgba(37, 99, 235, .16) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, .11), rgba(56, 189, 248, .08)) !important;
  color: #1d4ed8 !important;
  box-shadow: inset 2px 0 0 #2563eb, 0 8px 22px rgba(37, 99, 235, .08) !important;
}

.nav-item.active::before,
.studio-shell .nav-item.active::before {
  background: linear-gradient(180deg, #2563eb, #38bdf8) !important;
}

.nav-item:hover {
  border-color: rgba(37, 99, 235, .12) !important;
  background: rgba(37, 99, 235, .06) !important;
  transform: translateX(2px);
}

.metric-heading .ui-icon,
.sidebar-workspace > span,
.admin-hub-card > .ui-icon,
.admin-card-icon,
.resource-icon,
.setting-icon,
.quick-task-icon,
.quick-task-card i,
.ai-action-button i,
.sst-client-portal-shell .sidebar-workspace span {
  border-color: rgba(37, 99, 235, .18) !important;
  background: linear-gradient(135deg, #eaf3ff, #f0f9ff) !important;
  color: #2563eb !important;
}

.chart-bars strong {
  background: linear-gradient(90deg, #2563eb, #38bdf8) !important;
}

.search:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12) !important;
}

.check input {
  accent-color: #2563eb;
}

.home-promo-banner {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(239, 246, 255, .94)),
    url("https://images.unsplash.com/photo-1497366811353-6870744d04b2?auto=format&fit=crop&w=1000&q=80") right center / 44% auto no-repeat !important;
}

.promo-illustration {
  border: 1px solid rgba(37, 99, 235, .13);
  background: linear-gradient(135deg, #dbeafe, #eff6ff) !important;
}

.promo-illustration span {
  box-shadow: 28px 14px 0 #38bdf8 !important;
}

.promo-illustration strong,
.home-dots span:first-child {
  background: #2563eb !important;
}

.app-shell .quick-task-card {
  border-color: rgba(37, 99, 235, .14) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .88)),
    radial-gradient(circle at 92% 12%, rgba(56, 189, 248, .20), transparent 26%) !important;
}

.admin-hub-card:hover,
.metric-card:hover,
.quick-task-card:hover,
.ai-action-button:hover,
.panel:hover {
  border-color: rgba(37, 99, 235, .24) !important;
  box-shadow: 0 22px 62px rgba(37, 99, 235, .12) !important;
  transform: translateY(-2px);
}

.sst-product-pill {
  border-color: rgba(37, 99, 235, .22) !important;
  background: linear-gradient(135deg, rgba(219, 234, 254, .9), rgba(240, 249, 255, .9)) !important;
  color: #1d4ed8 !important;
}

.sst-hero,
.sst-ai-welcome {
  border-color: rgba(37, 99, 235, .18) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(239, 246, 255, .82)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1200&q=80") right center / 42% auto no-repeat !important;
  box-shadow: 0 22px 60px rgba(37, 99, 235, .12) !important;
}

.sst-hero-mark {
  border-color: rgba(37, 99, 235, .18) !important;
  background: rgba(255, 255, 255, .82) !important;
  color: #2563eb !important;
  backdrop-filter: blur(12px);
}

.sst-hero-mark strong {
  color: #0f172a !important;
}

.sst-metrics .metric-heading .ui-icon,
.sst-stack-list span {
  border-color: rgba(37, 99, 235, .16) !important;
  background: linear-gradient(135deg, rgba(239, 246, 255, .92), rgba(255, 255, 255, .92)) !important;
  color: #2563eb !important;
}

.sst-portal-page {
  background:
    radial-gradient(circle at 16% 12%, rgba(56, 189, 248, .18), transparent 28%),
    linear-gradient(135deg, #f8fbff, #eaf3ff) !important;
}

.sst-portal-hero {
  border-radius: 10px !important;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .72), rgba(37, 99, 235, .72)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1200&q=80") center / cover !important;
  box-shadow: 0 30px 80px rgba(37, 99, 235, .20);
}

.sst-client-portal-shell .content {
  background:
    radial-gradient(circle at 92% 4%, rgba(56, 189, 248, .18), transparent 30%),
    linear-gradient(135deg, #f8fbff, #eef5ff) !important;
}

@keyframes tippos-panel-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tippos-soft-sheen {
  0%, 100% {
    opacity: .55;
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    opacity: .85;
    transform: translate3d(-18px, -8px, 0) scale(1.08);
  }
}

@keyframes tippos-image-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(.001deg);
  }
  50% {
    transform: translate3d(-10px, 8px, 0) rotate(.001deg);
  }
}

@media (max-width: 900px) {
  .app-shell .workspace-page::before,
  .sst-client-portal-shell .content::before {
    display: none;
  }

  .sst-hero,
  .home-promo-banner {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .92)) !important;
  }
}

/* Mobile responsiveness hardening */
.app-shell,
.app-shell *,
.app-shell *::before,
.app-shell *::after {
  max-width: 100%;
}

.app-shell,
.main,
.workspace-page,
.content,
.panel,
.metric-card,
.admin-hub-card,
.quick-task-card,
.product-card,
.client-card,
.action-container,
.topbar,
.table-wrap {
  min-width: 0;
}

.app-shell {
  width: 100%;
  max-width: 100vw;
}

.app-shell button,
.app-shell .primary-btn,
.app-shell .secondary-btn,
.app-shell .ghost-btn,
.app-shell .icon-btn,
.app-shell .send-btn,
.app-shell .text-btn,
.app-shell .nav-item,
.app-shell .segmented button,
.app-shell [role="button"] {
  min-height: 44px;
}

.app-shell .icon-btn.compact {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
}

.app-shell img,
.app-shell svg,
.app-shell canvas,
.app-shell video {
  max-width: 100%;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow-x: hidden;
  }

  .app-shell .sidebar {
    width: 90vw !important;
    min-width: 0 !important;
    max-width: 90vw !important;
  }

  .app-shell .main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding-inline: 12px;
  }

  .app-shell .workspace-page,
  .app-shell .workspace-page-full,
  .app-shell .main > :not(.chat-page),
  .app-shell .content,
  .app-shell .content-area {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }

  .dashboard-grid,
  .settings-grid,
  .admin-cms-grid,
  .checkout-grid,
  .invoice-detail,
  .metrics-grid,
  .admin-hub-grid,
  .kanban-layout,
  .legal-workspace-grid,
  .ai-draft-layout,
  .billing-layout,
  .billing-layout.with-editor,
  .invoice-document,
  .finance-create-layout,
  .form-grid.two,
  .register-grid,
  .limit-grid,
  .legal-filter-bar,
  .media-grid,
  .signature-form-grid,
  .process-editor-layout,
  .process-detail-grid,
  .process-facts,
  .process-upload-form,
  .import-findings,
  .process-knowledge-columns,
  .master-command,
  .master-kpi-ribbon,
  .master-grid-v2,
  .dashboard-hero,
  .home-hero,
  .quick-task-row,
  .ai-action-grid,
  .home-insights-grid,
  .sst-hero,
  .sst-layout,
  .admin-documents-layout,
  .client-hero,
  .client-page-summary,
  .client-card-body,
  .chat-workspace,
  .ai-command-center,
  .whatsapp-simple-grid,
  .whatsapp-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .span-2,
  .form-grid.two .span-2,
  .register-grid .span-2,
  .panel.span-2 {
    grid-column: auto !important;
  }

  .panel,
  .metric-card,
  .admin-hub-card,
  .quick-task-card,
  .product-card,
  .client-card,
  .dialog-card,
  .integration-summary,
  .panel-compact,
  .action-container {
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0 14px 52px;
    overflow: hidden;
  }

  .topbar-actions,
  .button-row,
  .action-cluster {
    width: 100%;
  }

  .topbar-actions > *,
  .button-row > *,
  .action-cluster > * {
    max-width: 100%;
  }

  .support-mode-banner.action-container {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .support-mode-banner .button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .support-mode-banner [data-action="leave-support"] {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.15;
  }

  .kanban-column {
    width: 100%;
    min-width: 0;
  }

  .kanban-filters .search,
  .kanban-filters select,
  .cms-list button {
    min-width: 0;
    width: 100%;
  }

  .chart-bars > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 430px) {
  .app-shell .main {
    padding-inline: 10px;
  }

  .topbar {
    padding-left: 50px;
  }

  .panel,
  .metric-card,
  .admin-hub-card,
  .quick-task-card,
  .product-card,
  .client-card {
    padding-inline: 14px;
  }
}

/* Office clients area */
.office-client-page,
.client-form-page,
.client-detail-layout {
  width: 100%;
  min-width: 0;
}

.office-client-hero p {
  max-width: 760px;
}

.office-client-card {
  width: 100%;
}

.client-form-page {
  display: grid;
  justify-items: stretch;
}

.client-create-page {
  width: min(980px, 100%);
  margin-inline: auto;
}

.client-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.client-profile-panel,
.client-process-panel {
  min-width: 0;
}

.process-task-form {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr) 160px;
  gap: 10px;
  align-items: start;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface-muted);
}

.process-task-form > div {
  display: grid;
  gap: 4px;
}

.process-task-form > div span {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.45;
}

.process-task-form input,
.process-task-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--admin-line-strong);
  border-radius: 7px;
  background: var(--admin-surface);
  color: var(--admin-text);
  padding: 10px 12px;
}

.process-task-form textarea,
.process-task-form button {
  grid-column: 2 / -1;
}

@media (max-width: 900px) {
  .client-detail-layout,
  .process-task-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .process-task-form textarea,
  .process-task-form button {
    grid-column: auto;
  }
}

/* TippOS final internal skin: admin.css loads after styles.css */
.product-shell.studio-shell {
  --tippos-admin-ink: #122033;
  --tippos-admin-muted: #66758a;
  --tippos-admin-line: #dfe8f2;
  --tippos-admin-blue: #2563eb;
  background:
    radial-gradient(circle at 28% -12%, rgba(37, 99, 235, .12), transparent 28%),
    radial-gradient(circle at 96% 12%, rgba(5, 43, 35, .08), transparent 26%),
    linear-gradient(180deg, #f8fbfe 0, #eef4f8 100%) !important;
  color: var(--tippos-admin-ink);
}

.product-shell.studio-shell .sidebar {
  width: 276px;
  gap: 12px;
  padding: 14px 12px;
  border-right: 1px solid rgba(195, 209, 225, .35);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, .16), transparent 34%),
    radial-gradient(circle at 90% 76%, rgba(6, 95, 70, .18), transparent 36%),
    linear-gradient(180deg, #102942 0, #0d2237 58%, #0b2f2a 100%) !important;
  color: #fff;
  box-shadow: 14px 0 44px rgba(18, 32, 51, .14);
}

.product-shell.studio-shell .sidebar-header-card {
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .075);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.product-shell.studio-shell .sidebar-brand {
  min-height: 42px;
  gap: 10px;
}

.product-shell.studio-shell .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff, #dbeafe);
  color: #0b2b4c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.product-shell.studio-shell .sidebar-brand strong,
.product-shell.studio-shell .sidebar-workspace strong,
.product-shell.studio-shell .sidebar-user strong,
.product-shell.studio-shell .nav-group > span,
.product-shell.studio-shell .nav-group summary span {
  color: #f8fbff;
}

.product-shell.studio-shell .sidebar-brand span,
.product-shell.studio-shell .sidebar-workspace small,
.product-shell.studio-shell .sidebar-user small {
  color: rgba(232, 241, 250, .68);
}

.product-shell.studio-shell .sidebar-workspace {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  padding: 10px 11px;
}

.product-shell.studio-shell .sidebar-workspace > span,
.product-shell.studio-shell .sidebar-workspace .ui-icon {
  color: #7dd3fc;
}

.product-shell.studio-shell .nav {
  gap: 7px;
  padding: 2px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}

.product-shell.studio-shell .nav-group {
  gap: 5px;
}

.product-shell.studio-shell .nav-group summary {
  min-height: 25px;
  color: rgba(232, 241, 250, .52);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  padding: 0 8px;
  text-transform: uppercase;
}

.product-shell.studio-shell .nav-group summary .ui-icon {
  width: 10px;
  height: 10px;
  color: rgba(232, 241, 250, .38);
}

.product-shell.studio-shell .nav-item {
  min-height: 40px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(248, 251, 255, .72);
  padding: 0 9px;
  font-size: 12.5px;
  font-weight: 800;
  transition: transform 170ms ease, background 170ms ease, border-color 170ms ease, color 170ms ease;
}

.product-shell.studio-shell .nav-item .ui-icon {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  color: rgba(248, 251, 255, .72);
  padding: 6px;
  box-sizing: border-box;
}

.product-shell.studio-shell .nav-item:hover {
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.product-shell.studio-shell .nav-item.active {
  transform: none;
  border-color: rgba(255, 255, 255, .22);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
  color: #fff;
  box-shadow: inset 3px 0 0 #7dd3fc, 0 14px 28px rgba(0, 0, 0, .12);
}

.product-shell.studio-shell .nav-item.active .ui-icon {
  background: #fff;
  color: var(--tippos-admin-blue);
}

.product-shell.studio-shell .sidebar-footer.account-card {
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  padding: 9px;
}

.product-shell.studio-shell .sidebar-user {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  padding: 4px;
}

.product-shell.studio-shell .sidebar-user:hover {
  background: rgba(255, 255, 255, .08);
}

.product-shell.studio-shell .user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #fff, #dbeafe);
  color: #0b2b4c;
  font-size: 12px;
}

.product-shell.studio-shell .sidebar-utilities.action-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
}

.product-shell.studio-shell .sidebar-utilities .icon-text,
.product-shell.studio-shell .sidebar-utilities .logout {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: rgba(248, 251, 255, .72);
}

.product-shell.studio-shell .sidebar-utilities .logout {
  width: 42px;
  padding: 0;
}

.product-shell.studio-shell .sidebar-utilities .logout span {
  display: none;
}

.product-shell.studio-shell .main {
  padding: 22px;
  background: transparent;
}

.product-shell.studio-shell .topbar {
  min-height: 76px;
  border: 1px solid rgba(227, 234, 242, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  padding: 14px 18px;
  box-shadow: 0 18px 48px rgba(18, 32, 51, .065);
  backdrop-filter: blur(18px);
}

.product-shell.studio-shell .panel,
.product-shell.studio-shell .metric-card,
.product-shell.studio-shell .admin-hub-card,
.product-shell.studio-shell .product-card,
.product-shell.studio-shell .client-card,
.product-shell.studio-shell .quick-task-card,
.product-shell.studio-shell .billing-card,
.product-shell.studio-shell .calendar-panel,
.product-shell.studio-shell .calendar-day,
.product-shell.studio-shell .calendar-detail,
.product-shell.studio-shell .utility-card,
.product-shell.studio-shell .table-wrap,
.product-shell.studio-shell .dialog-card {
  border: 1px solid var(--tippos-admin-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 46px rgba(18, 32, 51, .06);
}

.product-shell.studio-shell .primary-btn {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b2b4c, #2563eb 72%, #0ea5e9);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .2);
}

.product-shell.studio-shell .secondary-btn,
.product-shell.studio-shell .icon-text,
.product-shell.studio-shell .field input,
.product-shell.studio-shell .field textarea,
.product-shell.studio-shell .field select,
.product-shell.studio-shell .search,
.product-shell.studio-shell .compact-field select,
.product-shell.studio-shell .chat-input-area textarea {
  border-radius: 12px;
}

.product-shell.studio-shell .home-dashboard {
  width: min(1340px, 100%);
  padding: 10px 0 46px;
}

.product-shell.studio-shell .home-promo-banner {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 18px;
  border-radius: 18px;
  padding: 22px 24px;
}

.product-shell.studio-shell .home-promo-banner h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: clamp(26px, 3.1vw, 46px);
  line-height: 1.02;
}

.product-shell.studio-shell .home-promo-banner p {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: 15px;
}

.product-shell.studio-shell .home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-shell.studio-shell .promo-illustration {
  min-height: 182px;
  border-radius: 18px;
}

.product-shell.studio-shell .quick-task-card {
  min-height: 128px;
  border-radius: 16px;
  padding: 16px;
}

.product-shell.studio-shell .ai-command-center {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(37, 99, 235, .16), transparent 28%),
    linear-gradient(135deg, #081827, #0b2b4c 72%, #052b23) !important;
  color: #fff;
  padding: 24px;
}

.product-shell.studio-shell .ai-command-center h2,
.product-shell.studio-shell .ai-command-center .text-link,
.product-shell.studio-shell .ai-command-center strong,
.product-shell.studio-shell .ai-command-center span {
  color: #fff !important;
}

.product-shell.studio-shell .ai-action-grid button,
.product-shell.studio-shell .ai-prompt-box {
  border-color: rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .09) !important;
  color: #fff !important;
}

.product-shell.studio-shell .metric-card {
  min-height: 132px;
  padding: 18px;
}

.product-shell.studio-shell .master-command {
  border: 1px solid rgba(227, 234, 242, .92);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, .18), transparent 28%),
    linear-gradient(135deg, #ffffff, #f5f9fc 62%, #edf7f3) !important;
  color: var(--tippos-admin-ink);
  padding: 28px;
  box-shadow: 0 24px 76px rgba(18, 32, 51, .09);
}

.product-shell.studio-shell .master-command h2,
.product-shell.studio-shell .master-command-copy h2 {
  max-width: 780px;
  color: var(--tippos-admin-ink);
  font-size: clamp(32px, 4.6vw, 58px);
}

.product-shell.studio-shell .master-command p,
.product-shell.studio-shell .master-command-copy p {
  max-width: 720px;
  color: var(--tippos-admin-muted);
  font-size: 16px;
}

.product-shell.studio-shell .master-live-card {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 43, 76, .94), rgba(8, 24, 39, .96));
  box-shadow: 0 22px 58px rgba(11, 43, 76, .2);
}

.product-shell.studio-shell .master-kpi-ribbon article {
  border: 1px solid rgba(227, 234, 242, .92);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 42px rgba(18, 32, 51, .06);
}

.product-shell.studio-shell .master-kpi-ribbon article .ui-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f2f7ff;
  color: #2563eb;
  padding: 8px;
}

.product-shell.studio-shell .executive-chart {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, .06), transparent),
    repeating-linear-gradient(0deg, rgba(18, 32, 51, .06), rgba(18, 32, 51, .06) 1px, transparent 1px, transparent 46px);
}

.product-shell.studio-shell .executive-chart i {
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 28px rgba(37, 99, 235, .18);
}

@media (max-width: 760px) {
  .product-shell.studio-shell .sidebar {
    width: 288px;
  }

  .product-shell.studio-shell .main {
    padding: 12px;
  }

  .product-shell.studio-shell .home-promo-banner,
  .product-shell.studio-shell .master-command {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .product-shell.studio-shell .promo-illustration {
    min-height: 130px;
  }
}

/* Navigation v3: Linear/Notion-style sidebar */
.product-shell.studio-shell.nav-v3-shell {
  --nav-v3-width: 240px;
  --nav-v3-collapsed: 68px;
  --nav-v3-bg: rgba(10, 26, 43, .86);
  --nav-v3-bg-strong: rgba(7, 18, 31, .96);
  --nav-v3-text: rgba(244, 248, 252, .84);
  --nav-v3-muted: rgba(218, 229, 240, .48);
  --nav-v3-soft: rgba(255, 255, 255, .065);
  --nav-v3-soft-hover: rgba(255, 255, 255, .095);
  --nav-v3-active: rgba(37, 99, 235, .16);
  --nav-v3-blue: #60a5fa;
  grid-template-columns: var(--nav-v3-width) minmax(0, 1fr);
  transition: grid-template-columns 220ms ease;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed {
  grid-template-columns: var(--nav-v3-collapsed) minmax(0, 1fr);
}

.product-shell.studio-shell.nav-v3-shell .app-sidebar-v3 {
  width: var(--nav-v3-width);
  min-width: var(--nav-v3-width);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: visible;
  border-right: 1px solid rgba(203, 213, 225, .14);
  background:
    radial-gradient(circle at 12% -8%, rgba(96, 165, 250, .18), transparent 30%),
    radial-gradient(circle at 110% 72%, rgba(45, 212, 191, .12), transparent 34%),
    linear-gradient(180deg, var(--nav-v3-bg), var(--nav-v3-bg-strong)) !important;
  padding: 12px 10px;
  box-shadow: 12px 0 38px rgba(15, 23, 42, .13);
  backdrop-filter: blur(22px);
  transition: width 220ms ease, min-width 220ms ease, padding 220ms ease;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .app-sidebar-v3 {
  width: var(--nav-v3-collapsed);
  min-width: var(--nav-v3-collapsed);
  padding-inline: 8px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-brand {
  min-width: 0;
  flex: 1;
  justify-content: flex-start;
  gap: 9px;
  border-radius: 12px;
  padding: 4px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-brand:hover,
.product-shell.studio-shell.nav-v3-shell .sidebar-collapse-btn:hover,
.product-shell.studio-shell.nav-v3-shell .sidebar-user:hover,
.product-shell.studio-shell.nav-v3-shell .sidebar-utilities .icon-text:hover,
.product-shell.studio-shell.nav-v3-shell .sidebar-utilities .logout:hover {
  background: var(--nav-v3-soft-hover);
}

.product-shell.studio-shell.nav-v3-shell .brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff, #dbeafe);
  color: #0b2b4c;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.product-shell.studio-shell.nav-v3-shell .sidebar-brand strong {
  color: #f8fbff;
  font-size: 13px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-brand span {
  color: var(--nav-v3-muted);
  font-size: 10px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-collapse-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(244, 248, 252, .58);
  cursor: pointer;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-workspace {
  min-height: 38px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 4px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-workspace > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: #93c5fd;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-workspace small {
  color: var(--nav-v3-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-workspace strong {
  color: var(--nav-v3-text);
  font-size: 12px;
}

.product-shell.studio-shell.nav-v3-shell .nav {
  display: block;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .16) transparent;
}

.product-shell.studio-shell.nav-v3-shell .nav-group {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
}

.product-shell.studio-shell.nav-v3-shell .nav-group:first-child {
  margin-top: 4px;
}

.product-shell.studio-shell.nav-v3-shell .nav-group-label {
  padding: 0 8px 4px;
  color: var(--nav-v3-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .085em;
  line-height: 1;
  text-transform: uppercase;
}

.product-shell.studio-shell.nav-v3-shell .nav-group-items {
  display: grid;
  gap: 2px;
}

.product-shell.studio-shell.nav-v3-shell .nav-item {
  position: relative;
  min-height: 34px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--nav-v3-text);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.product-shell.studio-shell.nav-v3-shell .nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background 170ms ease;
}

.product-shell.studio-shell.nav-v3-shell .nav-item .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(218, 229, 240, .68);
  padding: 0;
  stroke-width: 1.8;
}

.product-shell.studio-shell.nav-v3-shell .nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-shell.studio-shell.nav-v3-shell .nav-item:hover {
  transform: none;
  background: var(--nav-v3-soft);
  color: #fff;
}

.product-shell.studio-shell.nav-v3-shell .nav-item:hover .ui-icon {
  color: #fff;
}

.product-shell.studio-shell.nav-v3-shell .nav-item.active {
  border: 0;
  background: var(--nav-v3-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .08);
}

.product-shell.studio-shell.nav-v3-shell .nav-item.active::before {
  background: var(--nav-v3-blue);
}

.product-shell.studio-shell.nav-v3-shell .nav-item.active .ui-icon {
  background: transparent;
  color: #bfdbfe;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-footer.account-card {
  display: grid;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0 0;
  box-shadow: none;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-user {
  min-height: 40px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 26px;
  gap: 8px;
  align-items: center;
  border-radius: 11px;
  padding: 4px;
}

.product-shell.studio-shell.nav-v3-shell .user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #eff6ff, #c7d2fe);
  color: #0b2b4c;
  font-size: 11px;
  font-weight: 900;
}

.product-shell.studio-shell.nav-v3-shell .user-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.product-shell.studio-shell.nav-v3-shell .user-copy strong {
  overflow: hidden;
  color: #f8fbff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-shell.studio-shell.nav-v3-shell .user-copy small {
  overflow: hidden;
  color: var(--nav-v3-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.product-shell.studio-shell.nav-v3-shell .user-more {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(244, 248, 252, .42);
}

.product-shell.studio-shell.nav-v3-shell .sidebar-utilities.action-card {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0 4px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-utilities .icon-text,
.product-shell.studio-shell.nav-v3-shell .sidebar-utilities .logout {
  min-height: 32px;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(244, 248, 252, .58);
  padding: 0 8px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-utilities .logout {
  width: 34px;
}

.product-shell.studio-shell.nav-v3-shell .sidebar-utilities .logout span {
  display: none;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-brand strong,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-brand span,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-workspace div,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-group-label,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-item span,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .user-copy,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .user-more,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-utilities .icon-text span {
  display: none;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-topbar,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-brand,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-workspace,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-item,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-user {
  justify-content: center;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-topbar {
  display: grid;
  justify-items: center;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-collapse-btn {
  order: -1;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-workspace,
.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-user {
  grid-template-columns: 32px;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-group {
  margin-top: 12px;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-item {
  min-height: 38px;
  padding: 0;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-item::after {
  content: attr(data-nav-label);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 60;
  width: max-content;
  max-width: 220px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 9px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .26);
  transition: opacity 140ms ease, transform 140ms ease;
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .nav-item:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.product-shell.studio-shell.nav-v3-shell.sidebar-collapsed .sidebar-utilities.action-card {
  grid-template-columns: 1fr;
  padding: 0;
}

@media (max-width: 1024px) {
  .product-shell.studio-shell.nav-v3-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-shell.studio-shell.nav-v3-shell .app-sidebar-v3 {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 260px;
    min-width: 260px;
    transform: translateX(-104%);
    transition: transform 220ms ease;
  }

  .product-shell.studio-shell.nav-v3-shell.sidebar-open .app-sidebar-v3 {
    transform: translateX(0);
  }

  .product-shell.studio-shell.nav-v3-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

@media (max-width: 760px) {
  .product-shell.studio-shell.nav-v3-shell .app-sidebar-v3 {
    width: min(284px, calc(100vw - 38px));
    min-width: min(284px, calc(100vw - 38px));
  }
}

/* Publication monitor */
.publication-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid rgba(31, 78, 121, .10);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 16%, rgba(37, 99, 235, .14), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 248, 246, .90));
  box-shadow: 0 22px 55px rgba(15, 34, 58, .08);
  padding: 24px;
}

.publication-hero h2 {
  max-width: 720px;
  margin: 12px 0 10px;
  color: #102033;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.03;
}

.publication-hero p {
  max-width: 720px;
  margin: 0;
  color: #526174;
  font-size: 15px;
  line-height: 1.65;
}

.publication-hero-metrics,
.publication-grid,
.publication-list-layout {
  display: grid;
  gap: 16px;
}

.publication-hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
}

.publication-hero-metrics .metric-card {
  min-height: 116px;
  border-color: rgba(31, 78, 121, .10);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 40px rgba(15, 34, 58, .07);
}

.publication-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr);
  margin-bottom: 16px;
}

.publication-oab-panel,
.publication-log-panel,
.publication-filter-panel,
.publication-list-panel,
.publication-detail {
  border-color: rgba(31, 78, 121, .10);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 48px rgba(15, 34, 58, .065);
}

.publication-oab-form {
  margin: 16px 0;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248, 251, 255, .95), rgba(240, 253, 250, .82));
  padding: 16px;
}

.publication-oab-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
}

.publication-billing-note {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(20, 184, 166, .18);
  border-radius: 14px;
  background: rgba(236, 253, 245, .76);
  color: #0f4b3e;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 800;
}

.publication-oab-list,
.publication-mini-list,
.publication-list {
  display: grid;
  gap: 10px;
}

.publication-oab-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(31, 78, 121, .10);
  border-radius: 16px;
  background: #fff;
  padding: 13px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.publication-oab-card:hover,
.publication-row:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .22);
  box-shadow: 0 18px 42px rgba(15, 34, 58, .09);
}

.publication-oab-card.is-paused {
  opacity: .72;
}

.publication-oab-main {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.publication-oab-main strong,
.publication-copy strong {
  color: #122033;
}

.publication-oab-main small,
.publication-oab-foot small,
.publication-copy small,
.publication-mini-list span {
  color: #64748b;
  font-size: 12px;
}

.publication-oab-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(37, 99, 235, .09);
  color: #2563eb;
}

.publication-oab-meta,
.publication-oab-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.publication-oab-foot {
  grid-column: 1 / -1;
  justify-content: space-between;
}

.publication-run-state {
  display: grid;
  gap: 5px;
  border-radius: 16px;
  background: #0f2236;
  color: #fff;
  padding: 16px;
}

.publication-run-state strong {
  font-size: 22px;
}

.publication-run-state span {
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
}

.publication-mini-list button {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(31, 78, 121, .10);
  border-radius: 13px;
  background: #fff;
  padding: 11px;
  text-align: left;
}

.publication-filter-panel {
  margin-bottom: 16px;
}

.publication-filter-panel .filter-grid {
  align-items: end;
}

.publication-list-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr);
}

.publication-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(31, 78, 121, .10);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.publication-row.selected {
  border-color: rgba(37, 99, 235, .36);
  box-shadow: inset 3px 0 0 #2563eb, 0 16px 40px rgba(37, 99, 235, .10);
}

.publication-row-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.publication-date {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 15px;
  background: linear-gradient(180deg, #eff6ff, #ecfdf5);
  color: #102033;
}

.publication-date strong {
  font-size: 22px;
  line-height: 1;
}

.publication-date span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.publication-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.publication-copy > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.publication-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.publication-copy em {
  color: #0f766e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.publication-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.publication-detail {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.publication-detail-grid {
  display: grid;
  gap: 8px;
}

.publication-detail section {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(31, 78, 121, .09);
  padding-top: 13px;
}

.publication-detail h3 {
  margin: 0;
  color: #132235;
  font-size: 13px;
}

.publication-detail p {
  margin: 0;
  color: #536274;
  font-size: 13px;
  line-height: 1.6;
}

.status.status-new {
  background: rgba(37, 99, 235, .09);
  color: #1d4ed8;
}

.status.status-read {
  background: rgba(15, 118, 110, .10);
  color: #0f766e;
}

.status.status-deadline-created,
.status.status-active {
  background: rgba(16, 185, 129, .12);
  color: #047857;
}

.status.status-archived {
  background: rgba(100, 116, 139, .12);
  color: #475569;
}

@media (max-width: 1180px) {
  .publication-hero,
  .publication-grid,
  .publication-list-layout {
    grid-template-columns: 1fr;
  }

  .publication-detail {
    position: static;
  }
}

@media (max-width: 760px) {
  .publication-hero {
    padding: 18px;
  }

  .publication-hero-metrics,
  .publication-oab-card,
  .publication-row {
    grid-template-columns: 1fr;
  }

  .publication-row-main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .publication-actions,
  .publication-oab-meta,
  .publication-oab-foot {
    justify-content: flex-start;
  }
}

/* Clean TippOS admin menu */
.app-shell.product-shell.studio-shell,
.app-shell.nav-v3-shell {
  --admin-bg: #f6f8fb;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f4f7fa;
  --admin-line: #e2e8f0;
  --admin-line-strong: #cbd5e1;
  --admin-text: #111827;
  --admin-muted: #5f6b7a;
  --admin-subtle: #8a96a7;
  --admin-accent: #2563eb;
  --admin-accent-soft: #eff6ff;
  --admin-blue: #0b2b4c;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #f6f8fb;
}

.app-shell.product-shell.studio-shell .sidebar,
.app-shell.nav-v3-shell .sidebar {
  width: 248px;
  padding: 14px 12px;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
  color: #111827;
  box-shadow: none;
}

.app-shell.product-shell.studio-shell .sidebar-topbar,
.app-shell.nav-v3-shell .sidebar-topbar {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.app-shell.product-shell.studio-shell .sidebar-brand,
.app-shell.nav-v3-shell .sidebar-brand {
  min-height: 38px;
  flex: 1;
  margin: 0;
  gap: 9px;
  border: 0;
  background: transparent;
  color: #111827;
}

.app-shell.product-shell.studio-shell .brand-mark,
.app-shell.nav-v3-shell .brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2b4c;
  box-shadow: none;
}

.app-shell.product-shell.studio-shell .sidebar-brand strong,
.app-shell.nav-v3-shell .sidebar-brand strong {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.app-shell.product-shell.studio-shell .sidebar-brand span,
.app-shell.nav-v3-shell .sidebar-brand span {
  color: #8a96a7;
  font-size: 10px;
}

.app-shell.product-shell.studio-shell .sidebar-collapse-btn,
.app-shell.nav-v3-shell .sidebar-collapse-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  box-shadow: none;
}

.app-shell.product-shell.studio-shell .sidebar-workspace,
.app-shell.nav-v3-shell .sidebar-workspace {
  min-height: 44px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.app-shell.product-shell.studio-shell .sidebar-workspace > span,
.app-shell.nav-v3-shell .sidebar-workspace > span {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #ffffff;
  color: #2563eb;
}

.app-shell.product-shell.studio-shell .sidebar-workspace small,
.app-shell.nav-v3-shell .sidebar-workspace small {
  color: #8a96a7;
  font-size: 9px;
  letter-spacing: .05em;
}

.app-shell.product-shell.studio-shell .sidebar-workspace strong,
.app-shell.nav-v3-shell .sidebar-workspace strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.app-shell.product-shell.studio-shell .nav,
.app-shell.nav-v3-shell .nav {
  padding: 0 2px 10px 0;
  scrollbar-color: #cbd5e1 transparent;
}

.app-shell.product-shell.studio-shell .nav-group,
.app-shell.nav-v3-shell .nav-group {
  gap: 2px;
  margin: 0 0 14px;
}

.app-shell.product-shell.studio-shell .nav-group-label,
.app-shell.product-shell.studio-shell .nav-group > span,
.app-shell.nav-v3-shell .nav-group-label,
.app-shell.nav-v3-shell .nav-group > span {
  padding: 0 8px 6px;
  color: #8a96a7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.app-shell.product-shell.studio-shell .nav-item,
.app-shell.nav-v3-shell .nav-item {
  min-height: 34px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: #4b5563;
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.app-shell.product-shell.studio-shell .nav-item .ui-icon,
.app-shell.nav-v3-shell .nav-item .ui-icon {
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
}

.app-shell.product-shell.studio-shell .nav-item:hover,
.app-shell.nav-v3-shell .nav-item:hover {
  transform: none;
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #111827;
}

.app-shell.product-shell.studio-shell .nav-item.active,
.app-shell.nav-v3-shell .nav-item.active {
  position: relative;
  transform: none;
  border-color: #dbeafe;
  background: #eff6ff;
  color: #0b2b4c;
  font-weight: 750;
  box-shadow: inset 3px 0 0 #2563eb;
}

.app-shell.product-shell.studio-shell .nav-item.active::before,
.app-shell.nav-v3-shell .nav-item.active::before {
  display: none;
}

.app-shell.product-shell.studio-shell .nav-item:hover .ui-icon,
.app-shell.product-shell.studio-shell .nav-item.active .ui-icon,
.app-shell.nav-v3-shell .nav-item:hover .ui-icon,
.app-shell.nav-v3-shell .nav-item.active .ui-icon {
  background: transparent;
  color: #2563eb;
}

.app-shell.product-shell.studio-shell .sidebar-footer,
.app-shell.nav-v3-shell .sidebar-footer {
  gap: 8px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.app-shell.product-shell.studio-shell .sidebar-footer.account-card,
.app-shell.nav-v3-shell .sidebar-footer.account-card,
.app-shell.product-shell.studio-shell .sidebar-utilities.action-card,
.app-shell.nav-v3-shell .sidebar-utilities.action-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.app-shell.product-shell.studio-shell .sidebar-user,
.app-shell.nav-v3-shell .sidebar-user {
  min-height: 38px;
  border-radius: 8px;
  padding: 4px;
  color: #111827;
}

.app-shell.product-shell.studio-shell .sidebar-user:hover,
.app-shell.nav-v3-shell .sidebar-user:hover {
  background: #f8fafc;
}

.app-shell.product-shell.studio-shell .user-avatar,
.app-shell.nav-v3-shell .user-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2b4c;
  box-shadow: none;
}

.app-shell.product-shell.studio-shell .user-copy strong,
.app-shell.nav-v3-shell .user-copy strong {
  color: #111827;
  font-size: 12px;
}

.app-shell.product-shell.studio-shell .user-copy small,
.app-shell.nav-v3-shell .user-copy small {
  color: #8a96a7;
}

.app-shell.product-shell.studio-shell .sidebar-utilities,
.app-shell.nav-v3-shell .sidebar-utilities {
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.app-shell.product-shell.studio-shell .sidebar-utilities .icon-text,
.app-shell.product-shell.studio-shell .sidebar-utilities .logout,
.app-shell.nav-v3-shell .sidebar-utilities .icon-text,
.app-shell.nav-v3-shell .sidebar-utilities .logout {
  min-height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  box-shadow: none;
}

.app-shell.product-shell.studio-shell .sidebar-utilities .icon-text:hover,
.app-shell.product-shell.studio-shell .sidebar-utilities .logout:hover,
.app-shell.nav-v3-shell .sidebar-utilities .icon-text:hover,
.app-shell.nav-v3-shell .sidebar-utilities .logout:hover {
  background: #f8fafc;
  color: #111827;
}

.app-shell.product-shell.studio-shell .main,
.app-shell.nav-v3-shell .main {
  background: #f6f8fb;
}

.app-shell.product-shell.studio-shell .topbar,
.app-shell.nav-v3-shell .topbar {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

/* Rebuilt clean admin shell */
.clean-admin-shell {
  --admin-bg: #f7f9fb;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f4f7fa;
  --admin-line: #e4eaf1;
  --admin-line-strong: #cfd8e3;
  --admin-text: #111827;
  --admin-muted: #647084;
  --admin-subtle: #8a96a7;
  --admin-accent: #2563eb;
  --admin-accent-soft: #eff6ff;
  --admin-blue: #0b2b4c;
  --admin-shadow: none;
  grid-template-columns: 246px minmax(0, 1fr);
  background: #f7f9fb;
  color: #111827;
}

.clean-admin-shell .clean-sidebar {
  width: 246px;
  height: 100dvh;
  padding: 16px 12px;
  border-right: 1px solid #e4eaf1;
  background: #ffffff;
  color: #111827;
  box-shadow: none;
}

.clean-admin-shell .clean-sidebar-brand {
  min-height: 38px;
  margin: 0 0 14px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.clean-admin-shell .brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2b4c;
  box-shadow: none;
}

.clean-admin-shell .sidebar-brand strong {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.clean-admin-shell .sidebar-brand span {
  color: #8a96a7;
  font-size: 10px;
}

.clean-admin-shell .sidebar-workspace {
  min-height: 42px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.clean-admin-shell .sidebar-workspace > span {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #ffffff;
  color: #2563eb;
}

.clean-admin-shell .sidebar-workspace small {
  color: #8a96a7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
}

.clean-admin-shell .sidebar-workspace strong {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}

.clean-admin-shell .clean-nav {
  padding: 0 2px 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #cfd8e3 transparent;
}

.clean-admin-shell .nav-group {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
}

.clean-admin-shell .nav-group-label {
  padding: 0 8px 6px;
  color: #8a96a7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.clean-admin-shell .nav-item {
  min-height: 34px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 8px;
  background: transparent;
  color: #4b5563;
  font-size: 12.5px;
  font-weight: 650;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.clean-admin-shell .nav-item::before {
  display: none;
}

.clean-admin-shell .nav-item .ui-icon {
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
}

.clean-admin-shell .nav-item:hover {
  border-color: #e4eaf1;
  background: #f8fafc;
  color: #111827;
  transform: none;
}

.clean-admin-shell .nav-item.active {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #0b2b4c;
  font-weight: 750;
  box-shadow: inset 3px 0 0 #2563eb;
}

.clean-admin-shell .nav-item:hover .ui-icon,
.clean-admin-shell .nav-item.active .ui-icon {
  color: #2563eb;
}

.clean-admin-shell .clean-sidebar-footer {
  gap: 8px;
  border-top: 1px solid #e4eaf1;
  padding: 10px 0 0;
}

.clean-admin-shell .sidebar-user {
  min-height: 38px;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  border: 0;
  border-radius: 8px;
  padding: 4px;
  background: transparent;
  color: #111827;
}

.clean-admin-shell .sidebar-user:hover {
  background: #f8fafc;
}

.clean-admin-shell .user-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2b4c;
  box-shadow: none;
}

.clean-admin-shell .user-copy strong {
  color: #111827;
  font-size: 12px;
}

.clean-admin-shell .user-copy small {
  color: #8a96a7;
}

.clean-admin-shell .sidebar-utilities {
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.clean-admin-shell .sidebar-utilities .icon-text,
.clean-admin-shell .sidebar-utilities .logout {
  min-height: 32px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #ffffff;
  color: #647084;
  box-shadow: none;
}

.clean-admin-shell .sidebar-utilities .logout {
  width: 38px;
  padding: 0;
}

.clean-admin-shell .sidebar-utilities .logout span {
  display: none;
}

.clean-admin-shell .main {
  padding: 18px 22px 44px;
  background: #f7f9fb;
}

.clean-admin-shell .workspace-page {
  width: min(1360px, 100%);
  margin-inline: auto;
}

.clean-admin-shell .topbar,
.clean-admin-shell .panel,
.clean-admin-shell .metric-card,
.clean-admin-shell .admin-hub-card,
.clean-admin-shell .table-wrap,
.clean-admin-shell .dialog-card,
.clean-admin-shell .calendar-panel,
.clean-admin-shell .calendar-day,
.clean-admin-shell .calendar-detail,
.clean-admin-shell .utility-card,
.clean-admin-shell .publication-oab-panel,
.clean-admin-shell .publication-log-panel,
.clean-admin-shell .publication-filter-panel,
.clean-admin-shell .publication-list-panel,
.clean-admin-shell .publication-detail {
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.clean-admin-shell .topbar {
  position: static;
  min-height: auto;
  margin-bottom: 16px;
  padding: 14px 16px;
  backdrop-filter: none;
}

.clean-admin-shell .topbar h1 {
  color: #111827;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: 0;
}

.clean-admin-shell .topbar .page-heading > p {
  color: #647084;
  font-size: 13px;
}

.clean-admin-shell .primary-btn {
  border: 1px solid #0b2b4c;
  border-radius: 8px;
  background: #0b2b4c;
  box-shadow: none;
}

.clean-admin-shell .secondary-btn,
.clean-admin-shell .icon-btn,
.clean-admin-shell .field input,
.clean-admin-shell .field textarea,
.clean-admin-shell .field select,
.clean-admin-shell .search {
  border-radius: 8px;
  box-shadow: none;
}

@media (max-width: 760px) {
  .clean-admin-shell {
    grid-template-columns: 1fr;
  }

  .clean-admin-shell .clean-sidebar {
    width: 288px;
  }
}

/* Clean menu rebuild v2: public-home inspired */
.clean-admin-shell {
  grid-template-columns: 232px minmax(0, 1fr);
  background: #f8fafc;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.clean-admin-shell .clean-sidebar {
  width: 232px;
  padding: 22px 18px;
  border-right: 1px solid #eef2f6;
  background: #ffffff;
}

.clean-admin-shell .clean-wordmark {
  width: 100%;
  display: grid;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.clean-admin-shell .clean-wordmark strong {
  color: #0b2b4c;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
}

.clean-admin-shell .clean-wordmark span {
  color: #8b96a6;
  font-size: 12px;
  font-weight: 400;
}

.clean-admin-shell .clean-context {
  display: grid;
  gap: 2px;
  margin: 22px 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eef2f6;
}

.clean-admin-shell .clean-context strong {
  overflow: hidden;
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clean-admin-shell .clean-context span {
  color: #9aa4b2;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.clean-admin-shell .clean-nav {
  padding: 0;
}

.clean-admin-shell .nav-group {
  gap: 1px;
  margin: 0 0 20px;
}

.clean-admin-shell .nav-group-label {
  padding: 0 0 8px;
  color: #a0a9b7;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.clean-admin-shell .nav-item {
  min-height: 31px;
  gap: 0;
  border: 0;
  border-radius: 6px;
  padding: 0 8px;
  background: transparent;
  color: #4b5563;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.clean-admin-shell .nav-item .ui-icon {
  display: none;
}

.clean-admin-shell .nav-item:hover {
  border: 0;
  background: #f8fafc;
  color: #0f172a;
}

.clean-admin-shell .nav-item.active {
  border: 0;
  background: #f3f7ff;
  color: #174ea6;
  font-weight: 500;
  box-shadow: none;
}

.clean-admin-shell .nav-item.active::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: auto;
  border-radius: 999px;
  background: #2563eb;
}

.clean-admin-shell .clean-sidebar-footer {
  border-top: 1px solid #eef2f6;
  padding-top: 14px;
}

.clean-admin-shell .sidebar-user {
  min-height: 34px;
  grid-template-columns: 28px minmax(0, 1fr) 16px;
  gap: 8px;
  border-radius: 6px;
  padding: 2px 0;
}

.clean-admin-shell .sidebar-user:hover {
  background: transparent;
}

.clean-admin-shell .user-avatar {
  width: 28px;
  height: 28px;
  border: 1px solid #eef2f6;
  border-radius: 999px;
  color: #0b2b4c;
  font-size: 10px;
  font-weight: 500;
}

.clean-admin-shell .user-copy strong {
  color: #374151;
  font-size: 12px;
  font-weight: 500;
}

.clean-admin-shell .user-copy small {
  color: #9aa4b2;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.clean-admin-shell .user-more {
  color: #a0a9b7;
}

.clean-admin-shell .sidebar-utilities {
  grid-template-columns: 1fr auto;
  margin-top: 8px;
}

.clean-admin-shell .sidebar-utilities .icon-text,
.clean-admin-shell .sidebar-utilities .logout {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b96a6;
  font-size: 12px;
  font-weight: 400;
}

.clean-admin-shell .sidebar-utilities .icon-text:hover,
.clean-admin-shell .sidebar-utilities .logout:hover {
  background: #f8fafc;
  color: #374151;
}

.clean-admin-shell .main {
  padding: 22px 28px 48px;
  background: #f8fafc;
}

.clean-admin-shell .topbar {
  border: 0;
  border-bottom: 1px solid #eef2f6;
  border-radius: 0;
  background: transparent;
  padding: 4px 0 18px;
}

.clean-admin-shell .topbar h1 {
  color: #0f172a;
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 500;
}

.clean-admin-shell .topbar .page-heading > p {
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
}

.clean-admin-shell .topbar-actions {
  align-self: center;
}

@media (max-width: 760px) {
  .clean-admin-shell .clean-sidebar {
    width: 280px;
    padding: 20px 18px;
  }
}

.clean-admin-shell .clean-master-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.clean-admin-shell .clean-master-summary article {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.clean-admin-shell .clean-master-summary span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 400;
}

.clean-admin-shell .clean-master-summary strong {
  color: #111827;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.clean-admin-shell .clean-master-summary small {
  color: #9aa4b2;
  font-size: 12px;
}

.clean-admin-shell .clean-master-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, .9fr);
  gap: 14px;
  align-items: start;
}

.clean-admin-shell .clean-master-grid .span-2 {
  grid-row: span 2;
}

.clean-admin-shell .clean-master-panel {
  padding: 18px;
}

.clean-admin-shell .clean-master-panel h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 16px;
  font-weight: 500;
}

.clean-admin-shell .clean-status-list,
.clean-admin-shell .clean-task-list {
  display: grid;
  gap: 8px;
}

.clean-admin-shell .clean-status-list > div,
.clean-admin-shell .clean-task-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  padding: 11px 12px;
}

.clean-admin-shell .clean-status-list strong,
.clean-admin-shell .clean-task-list strong {
  color: #111827;
  font-size: 14px;
  font-weight: 500;
}

.clean-admin-shell .clean-status-list small,
.clean-admin-shell .clean-task-list span {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
}

.clean-admin-shell .clean-task-list strong {
  min-width: 34px;
  font-size: 22px;
}

@media (max-width: 1180px) {
  .clean-admin-shell .clean-master-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .clean-admin-shell .clean-master-grid {
    grid-template-columns: 1fr;
  }

  .clean-admin-shell .clean-master-grid .span-2 {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .clean-admin-shell .clean-master-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ForPoint Design System 1.0 admin seal */
.app-shell,
.app-shell.home-shell,
[data-theme="dark"] .app-shell {
  --admin-bg: #fafafb;
  --admin-surface: #ffffff;
  --admin-surface-muted: #f4f4f5;
  --admin-line: #e4e4e7;
  --admin-line-strong: #d4d4d8;
  --admin-text: #09090b;
  --admin-muted: #71717a;
  --admin-subtle: #a1a1aa;
  --admin-accent: #6366f1;
  --admin-accent-soft: #f4f4f5;
  --admin-shadow: none;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--admin-bg);
  color: var(--admin-text);
  font-family: Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] .app-shell {
  --admin-bg: #09090b;
  --admin-surface: #0f0f12;
  --admin-surface-muted: #18181b;
  --admin-line: #27272a;
  --admin-line-strong: #3f3f46;
  --admin-text: #fafafa;
  --admin-muted: #a1a1aa;
  --admin-subtle: #71717a;
  --admin-accent-soft: #18181b;
}

.app-shell .sidebar,
[data-theme="dark"] .app-shell .sidebar {
  width: 240px;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--admin-line);
  background: var(--admin-surface);
  color: var(--admin-text);
}

.app-shell .main,
[data-theme="dark"] .app-shell .main {
  padding: 0 clamp(24px, 3vw, 48px) 56px;
  background: var(--admin-bg);
}

.app-shell .workspace-page {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-top: 32px;
}

.clean-wordmark,
.app-shell .sidebar-brand {
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.clean-wordmark-copy strong,
.app-shell .sidebar-brand strong {
  color: var(--admin-text);
  font-size: 15px;
}

.clean-wordmark-copy small,
.app-shell .sidebar-brand span {
  color: var(--admin-subtle);
  font-size: 11px;
}

.clean-context,
.app-shell .sidebar-workspace {
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: var(--admin-surface-muted);
  box-shadow: none;
}

.app-shell .nav-group-label,
.app-shell .nav-group > span,
.app-shell .nav-group > summary {
  color: var(--admin-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-shell .nav-item,
[data-theme="dark"] .app-shell .nav-item,
.app-shell .sidebar-utilities .icon-text {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}

.app-shell .nav-item:hover,
[data-theme="dark"] .app-shell .nav-item:hover,
.app-shell .sidebar-utilities .icon-text:hover {
  background: var(--admin-surface-muted);
  color: var(--admin-text);
}

.app-shell .nav-item.active,
[data-theme="dark"] .app-shell .nav-item.active {
  position: relative;
  border: 0;
  background: var(--admin-surface-muted);
  color: var(--admin-text);
  box-shadow: none;
}

.app-shell .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00aeef, #6366f1 52%, #8b5cf6);
}

.app-shell .nav-item.active .ui-icon {
  color: #6366f1;
}

.app-shell .primary-btn,
.app-shell .send-btn {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #00aeef, #6366f1 52%, #8b5cf6);
  color: #fff;
  box-shadow: none;
}

.app-shell .secondary-btn,
.app-shell .ghost-btn,
.app-shell .icon-btn {
  border-color: var(--admin-line);
  border-radius: 10px;
  background: transparent;
  color: var(--admin-text);
  box-shadow: none;
}

.home-promo-banner,
.metric-card,
.quick-task-card,
.ai-command-center,
.panel,
.action-card,
.table-wrap,
.app-shell .card {
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: var(--admin-surface);
  box-shadow: none;
}

.home-promo-banner h1 {
  max-width: 760px;
  color: var(--admin-text);
  font-family: "Plus Jakarta Sans", Geist, sans-serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.home-insights-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1023px) {
  .app-shell,
  .app-shell.home-shell {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell.home-shell {
    grid-template-columns: 1fr;
  }

  .app-shell .main {
    padding: 0 20px 40px;
  }

  .home-insights-grid {
    grid-template-columns: 1fr;
  }
}

/* Public landing safety: admin.css is loaded last, so keep public sections visible here too. */
.tippos-landing .tippos-reveal,
.tippos-landing .reveal-on-scroll,
.tippos-landing .tippos-reveal.is-visible,
.tippos-landing .reveal-on-scroll.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

.tippos-landing .tippos-hero,
.tippos-landing .tippos-dark,
.tippos-landing .tippos-connected,
.tippos-landing .tippos-section {
  min-height: 0 !important;
}

/* Emergency public landing compact mode. admin.css loads last. */
.tippos-landing .tippos-hero {
  width: min(1180px, calc(100% - 40px)) !important;
  min-height: 0 !important;
  height: auto !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr) !important;
  align-items: center !important;
  gap: clamp(24px, 4vw, 48px) !important;
  padding: clamp(28px, 5vw, 56px) 0 !important;
}

.tippos-landing .tippos-hero-copy {
  align-content: center !important;
  min-height: 0 !important;
}

.tippos-landing .tippos-hero-copy h1 {
  font-size: clamp(40px, 6vw, 64px) !important;
  line-height: 1.02 !important;
}

.tippos-landing .tippos-main-mockup,
.tippos-landing .tippos-product-shell {
  max-height: 460px !important;
  overflow: hidden !important;
}

.tippos-landing .tippos-credibility {
  min-height: 0 !important;
  padding: 22px 0 !important;
}

.tippos-landing .tippos-section,
.tippos-landing .tippos-dark,
.tippos-landing .tippos-connected {
  min-height: 0 !important;
  height: auto !important;
  padding-top: clamp(40px, 6vw, 72px) !important;
  padding-bottom: clamp(40px, 6vw, 72px) !important;
}

.tippos-landing .tippos-card-grid article,
.tippos-landing .tippos-dark-grid article {
  min-height: 0 !important;
}

.tippos-landing .tippos-field {
  display: none !important;
}

@media (max-width: 760px) {
  .tippos-landing .tippos-hero {
    display: block !important;
    width: min(100% - 32px, 560px) !important;
  }

  .tippos-landing .tippos-main-mockup {
    display: none !important;
  }

  .tippos-landing .tippos-hero-copy h1 {
    font-size: 38px !important;
  }
}

/* ForPoint Design System v2.0 final application layer */
:root {
  --fp-brand-500: #00aeef;
  --fp-brand-600: #6366f1;
  --fp-brand-900: #8b5cf6;
  --fp-gradient-brand: linear-gradient(135deg, #00aeef 0%, #6366f1 52%, #8b5cf6 100%);
  --fp-gradient-brand-soft: linear-gradient(135deg, rgba(0, 174, 239, .12), rgba(99, 102, 241, .12) 52%, rgba(139, 92, 246, .12));
  --fp-bg-base: #ffffff;
  --fp-bg-subtle: #fafafb;
  --fp-bg-muted: #f4f4f5;
  --fp-bg-elevated: #ffffff;
  --fp-text-primary: #09090b;
  --fp-text-secondary: #71717a;
  --fp-text-tertiary: #a1a1aa;
  --fp-border-default: #e4e4e7;
  --fp-border-strong: #d4d4d8;
  --fp-success: #10b981;
  --fp-success-bg: rgba(16, 185, 129, .08);
  --fp-success-border: rgba(16, 185, 129, .24);
  --fp-warning: #f59e0b;
  --fp-warning-bg: rgba(245, 158, 11, .08);
  --fp-warning-border: rgba(245, 158, 11, .24);
  --fp-danger: #ef4444;
  --fp-danger-bg: rgba(239, 68, 68, .08);
  --fp-danger-border: rgba(239, 68, 68, .24);
  --fp-radius-sm: 6px;
  --fp-radius-md: 10px;
  --fp-radius-lg: 14px;
  --fp-radius-xl: 20px;
  --fp-shadow-xs: 0 1px 2px rgba(9, 9, 11, .04);
  --fp-shadow-md: 0 4px 16px rgba(9, 9, 11, .06);
  --fp-shadow-brand: 0 8px 24px rgba(99, 102, 241, .18);
  --fp-font-ui: Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fp-font-display: "Plus Jakarta Sans", Geist, Inter, sans-serif;
}

[data-theme="dark"] {
  --fp-bg-base: #09090b;
  --fp-bg-subtle: #0f0f12;
  --fp-bg-muted: #18181b;
  --fp-bg-elevated: #141416;
  --fp-text-primary: #fafafa;
  --fp-text-secondary: #a1a1aa;
  --fp-text-tertiary: #71717a;
  --fp-border-default: #27272a;
  --fp-border-strong: #3f3f46;
}

html,
body {
  background: var(--fp-bg-subtle);
  color: var(--fp-text-primary);
  font-family: var(--fp-font-ui);
  font-size: 14px;
  letter-spacing: 0;
}

.app-shell,
.app-shell.home-shell,
.app-shell.command-home,
.app-shell.fp-shell-v2 {
  --admin-bg: var(--fp-bg-subtle);
  --admin-surface: var(--fp-bg-base);
  --admin-surface-muted: var(--fp-bg-muted);
  --admin-line: var(--fp-border-default);
  --admin-line-strong: var(--fp-border-strong);
  --admin-text: var(--fp-text-primary);
  --admin-muted: var(--fp-text-secondary);
  --admin-subtle: var(--fp-text-tertiary);
  --admin-accent: var(--fp-brand-600);
  --admin-accent-soft: rgba(99, 102, 241, .10);
  --admin-blue: var(--fp-brand-600);
  --admin-shadow: none;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--fp-bg-subtle);
  color: var(--fp-text-primary);
  font-family: var(--fp-font-ui);
}

[data-theme="dark"] .app-shell,
[data-theme="dark"] .app-shell.home-shell,
[data-theme="dark"] .app-shell.command-home,
[data-theme="dark"] .app-shell.fp-shell-v2 {
  --admin-bg: var(--fp-bg-subtle);
  --admin-surface: var(--fp-bg-elevated);
  --admin-surface-muted: var(--fp-bg-muted);
  --admin-line: var(--fp-border-default);
  --admin-line-strong: var(--fp-border-strong);
  --admin-text: var(--fp-text-primary);
  --admin-muted: var(--fp-text-secondary);
  --admin-subtle: var(--fp-text-tertiary);
  --admin-accent-soft: rgba(129, 140, 248, .13);
}

.app-shell .sidebar,
.app-shell .clean-sidebar,
[data-theme="dark"] .app-shell .sidebar,
[data-theme="dark"] .app-shell .clean-sidebar {
  width: 240px;
  padding: 16px 12px;
  border-right: 1px solid var(--fp-border-default);
  background: var(--fp-bg-base);
  color: var(--fp-text-primary);
  box-shadow: none;
}

.clean-wordmark {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
}

.clean-wordmark .brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-md);
  background: var(--fp-bg-base);
}

.clean-wordmark-copy strong,
.app-shell .sidebar-brand strong {
  color: var(--fp-text-primary);
  font-size: 14px;
  font-weight: 600;
}

.clean-wordmark-copy small,
.app-shell .sidebar-brand span {
  color: var(--fp-text-tertiary);
  font-size: 11px;
}

.clean-context,
.app-shell .sidebar-workspace {
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-md);
  background: var(--fp-bg-muted);
  box-shadow: none;
}

.app-shell .nav-group-label,
.app-shell .nav-group > span,
.app-shell .nav-group > summary {
  padding: 0 10px 8px;
  color: var(--fp-text-tertiary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-shell .nav-item,
[data-theme="dark"] .app-shell .nav-item,
.app-shell .sidebar-utilities .icon-text,
.app-shell .sidebar-utilities .logout {
  min-height: 36px;
  border: 0;
  border-radius: var(--fp-radius-md);
  background: transparent;
  color: var(--fp-text-secondary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.app-shell .nav-item .ui-icon {
  display: inline-block;
  color: var(--fp-text-tertiary);
}

.app-shell .nav-item:hover,
[data-theme="dark"] .app-shell .nav-item:hover,
.app-shell .sidebar-utilities .icon-text:hover,
.app-shell .sidebar-utilities .logout:hover {
  background: var(--fp-bg-muted);
  color: var(--fp-text-primary);
  transform: none;
}

.app-shell .nav-item.active,
[data-theme="dark"] .app-shell .nav-item.active {
  position: relative;
  border: 0;
  background: rgba(99, 102, 241, .10);
  color: var(--fp-text-primary);
  font-weight: 600;
  box-shadow: none;
}

.app-shell .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: var(--fp-gradient-brand);
}

.app-shell .nav-item.active::after {
  display: none;
}

.app-shell .nav-item.active .ui-icon {
  color: var(--fp-brand-600);
}

.app-shell .main,
[data-theme="dark"] .app-shell .main {
  padding: 0 clamp(24px, 3vw, 48px) 56px;
  background: var(--fp-bg-subtle);
}

.app-shell .workspace-page {
  width: min(1200px, 100%);
  padding-top: 32px;
}

.topbar {
  position: sticky;
  top: 0;
  min-height: 64px;
  margin: 0 0 32px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--fp-border-default);
  border-radius: 0;
  background: color-mix(in srgb, var(--fp-bg-subtle) 92%, transparent);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.topbar h1 {
  color: var(--fp-text-primary);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.topbar .page-heading > p {
  color: var(--fp-text-secondary);
}

.primary-btn,
.app-shell .primary-btn,
.login-v2-card .primary-btn,
.tippos-landing .primary-btn,
.send-btn,
.floating-chat-button {
  border: 0;
  border-radius: var(--fp-radius-md);
  background: var(--fp-gradient-brand);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--fp-shadow-xs);
}

.primary-btn:hover,
.app-shell .primary-btn:hover,
.login-v2-card .primary-btn:hover,
.tippos-landing .primary-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: var(--fp-shadow-brand);
}

.secondary-btn,
.ghost-btn,
.icon-btn,
.app-shell .secondary-btn,
.app-shell .ghost-btn,
.app-shell .icon-btn,
.tippos-landing .secondary-btn {
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-md);
  background: var(--fp-bg-base);
  color: var(--fp-text-primary);
  box-shadow: none;
}

.field input,
.field textarea,
.field select,
.search,
.chat-input-area textarea,
.app-shell input,
.app-shell select,
.app-shell textarea {
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-md);
  background: var(--fp-bg-muted);
  color: var(--fp-text-primary);
  box-shadow: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search:focus,
.chat-input-area textarea:focus,
.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
  border-color: var(--fp-brand-600);
  background: var(--fp-bg-base);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.panel,
.metric-card,
.quick-task-card,
.ai-command-center,
.action-card,
.table-wrap,
.admin-hub-card,
.dialog-card,
.calendar-panel,
.publication-list-panel,
.publication-detail {
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-lg);
  background: var(--fp-bg-elevated);
  box-shadow: var(--fp-shadow-xs);
}

.login-v2 {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 50vw);
  background: var(--fp-bg-subtle);
}

.login-v2-visual {
  background:
    radial-gradient(circle at 8% 86%, rgba(0, 174, 239, .22), transparent 28%),
    radial-gradient(circle at 74% 18%, rgba(139, 92, 246, .18), transparent 32%),
    #09090b;
}

.login-v2-copy h1 {
  font-family: var(--fp-font-display);
  letter-spacing: 0;
}

.login-v2-panel {
  background: var(--fp-bg-subtle);
}

.login-v2-card {
  width: min(420px, 100%);
  padding: 40px;
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-xl);
  background: var(--fp-bg-base);
  box-shadow: var(--fp-shadow-md);
}

.login-card-heading h2 {
  color: var(--fp-text-primary);
  font-size: 24px;
  font-weight: 600;
}

.login-security-note {
  border: 1px solid rgba(14, 165, 233, .24);
  border-radius: var(--fp-radius-lg);
  background: rgba(14, 165, 233, .08);
  color: var(--fp-text-secondary);
}

.tippos-landing {
  background: var(--fp-bg-base);
  color: var(--fp-text-primary);
  font-family: var(--fp-font-ui);
}

.tippos-nav {
  min-height: 64px;
  border-bottom: 1px solid var(--fp-border-default);
  background: color-mix(in srgb, var(--fp-bg-base) 88%, transparent);
  box-shadow: none;
}

.tippos-hero-copy h1,
.tippos-heading h2,
.tippos-human-copy h2,
.tippos-time-copy h2,
.tippos-pricing h2,
.tippos-faq h2 {
  font-family: var(--fp-font-display);
  letter-spacing: 0;
}

.tippos-main-mockup,
.tippos-product-shell,
.tippos-card-grid article,
.tippos-segment-grid article,
.tippos-plan-card,
.tippos-faq-list article {
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-lg);
  background: var(--fp-bg-base);
  box-shadow: var(--fp-shadow-xs);
}

.tippos-dark,
.tippos-connected {
  background: #09090b !important;
}

.fp-dashboard-v2 {
  display: grid;
  gap: 40px;
}

.fp-dash-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.fp-dash-greeting h1 {
  margin: 0 0 6px;
  color: var(--fp-text-primary);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}

.fp-dash-greeting p {
  margin: 0;
  color: var(--fp-text-secondary);
  font-size: 14px;
}

.fp-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-lg);
  background: var(--fp-bg-elevated);
  box-shadow: var(--fp-shadow-xs);
}

.fp-metric-cell {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--fp-border-default);
  padding: 24px;
  background: transparent;
  color: var(--fp-text-primary);
  text-align: left;
}

.fp-metric-cell:last-child {
  border-right: 0;
}

.fp-metric-cell:hover {
  background: var(--fp-bg-muted);
}

.fp-metric-cell span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fp-text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.fp-metric-cell span .ui-icon {
  color: var(--fp-brand-600);
}

.fp-metric-cell strong {
  color: var(--fp-text-primary);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.fp-metric-cell small {
  color: var(--fp-success);
  font-size: 12px;
  font-weight: 500;
}

.fp-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.fp-dash-main,
.fp-dash-side {
  display: grid;
  gap: 24px;
}

.fp-panel-flat {
  display: grid;
  gap: 16px;
}

.fp-panel-flat h2 {
  margin: 0;
  color: var(--fp-text-primary);
  font-size: 20px;
  font-weight: 600;
}

.fp-panel-flat .section-heading {
  margin: 0;
}

.fp-panel-flat .section-heading p {
  margin: 4px 0 0;
  color: var(--fp-text-secondary);
}

.fp-action-list {
  display: grid;
  gap: 8px;
}

.fp-action-item {
  min-height: 64px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-lg);
  padding: 14px 16px;
  background: var(--fp-bg-elevated);
  color: var(--fp-text-primary);
  text-align: left;
  box-shadow: var(--fp-shadow-xs);
}

.fp-action-item:hover {
  border-color: rgba(99, 102, 241, .28);
  background: var(--fp-bg-muted);
}

.fp-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--fp-radius-md);
  background: var(--fp-gradient-brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.fp-action-item strong {
  display: block;
  color: var(--fp-text-primary);
  font-size: 14px;
  font-weight: 600;
}

.fp-action-item small {
  display: block;
  margin-top: 3px;
  color: var(--fp-text-secondary);
  font-size: 13px;
}

.fp-action-item em {
  color: var(--fp-brand-600);
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}

.fp-mini-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.fp-mini-pipeline button {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--fp-border-default);
  border-radius: var(--fp-radius-lg);
  padding: 16px;
  background: var(--fp-bg-elevated);
  color: var(--fp-text-primary);
  text-align: left;
  box-shadow: var(--fp-shadow-xs);
}

.fp-mini-pipeline button:hover {
  border-color: rgba(99, 102, 241, .28);
}

.fp-mini-pipeline strong {
  color: var(--fp-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.fp-mini-pipeline span {
  color: var(--fp-text-primary);
  font-size: 28px;
  font-weight: 600;
}

.fp-mini-pipeline small {
  color: var(--fp-text-tertiary);
}

.fp-timeline,
.fp-activity-feed {
  display: grid;
  gap: 8px;
}

.fp-timeline button,
.fp-activity-feed span {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: var(--fp-radius-md);
  padding: 8px 10px;
  background: transparent;
  color: var(--fp-text-secondary);
  text-align: left;
}

.fp-timeline button:hover {
  background: var(--fp-bg-muted);
}

.fp-timeline time {
  color: var(--fp-text-tertiary);
  font-size: 12px;
  white-space: nowrap;
}

.fp-activity-feed small {
  margin-left: auto;
  color: var(--fp-text-tertiary);
}

.fp-ia-insight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--fp-border-default);
  border-left: 3px solid var(--fp-brand-600);
  border-radius: var(--fp-radius-lg);
  background: var(--fp-bg-muted);
}

.fp-ia-insight p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--fp-text-secondary);
}

.fp-ia-insight strong {
  color: var(--fp-text-brand, var(--fp-brand-600));
}

.fp-ia-insight div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-success {
  border-color: var(--fp-success-border);
  background: var(--fp-success-bg);
  color: #047857;
}

.status-warning {
  border-color: var(--fp-warning-border);
  background: var(--fp-warning-bg);
  color: #b45309;
}

@media (max-width: 1023px) {
  .app-shell,
  .app-shell.home-shell,
  .app-shell.command-home,
  .app-shell.fp-shell-v2 {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .fp-dash-grid {
    grid-template-columns: 1fr;
  }

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

  .fp-metric-cell {
    border-right: 0;
    border-bottom: 1px solid var(--fp-border-default);
  }

  .fp-metric-cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell.home-shell,
  .app-shell.command-home,
  .app-shell.fp-shell-v2 {
    grid-template-columns: 1fr;
  }

  .app-shell .main {
    padding: 0 20px 40px;
  }

  .fp-dash-greeting,
  .fp-ia-insight {
    display: grid;
  }

  .fp-action-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .fp-action-item em {
    grid-column: 2;
  }

  .login-v2 {
    display: block;
  }

  .login-v2-card {
    padding: 24px;
  }
}
