/* Shell dimensions and interactions follow Askora's web shell. Only the accent is monochrome. */
:root {
  --rail: 50px;
  --panel: 214px;
  --sidebar-open: 264px;
  --ease: 180ms cubic-bezier(0.2, 0.72, 0.2, 1);
}
.ui-icon,
button > svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}
.sidebar {
  width: var(--rail);
  transition:
    width var(--ease),
    box-shadow var(--ease);
}
.sidebar:focus-within {
  width: var(--rail);
}
.sidebar:hover,
.sidebar:has(:focus-visible) {
  width: var(--sidebar-open);
}
.rail {
  --accent: #000;
  --on-accent: #fff;
  background: #000;
  position: relative;
  z-index: 2;
  padding: 20px 0;
  flex: 0 0 var(--rail);
  width: var(--rail);
}
.logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.logo img {
  display: block;
  grid-area: 1 / 1;
}
.logo img,
html[data-theme="dark"] .logo img {
  width: 32px;
  height: 32px;
  filter: none;
  object-fit: contain;
}
.rail-nav {
  margin-top: 15px;
  gap: 7px;
}
.rail .rail-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: color-mix(in srgb, var(--on-accent) 65%, transparent);
}
.rail .rail-btn:hover,
.rail .rail-btn.active {
  background: color-mix(in srgb, var(--on-accent) 16%, transparent);
  color: var(--on-accent);
}
.rail-bottom {
  margin-top: auto;
}
.rail .profile-avatar {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--on-accent);
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-accent) 35%, transparent);
}
.sidebar-panel {
  padding: 0;
  width: var(--panel);
  flex: 0 0 var(--panel);
  opacity: 0;
  transform: translateX(-6px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform var(--ease);
  background: var(--surface);
}
.sidebar:focus-within .sidebar-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.sidebar:hover .sidebar-panel,
.sidebar:has(:focus-visible) .sidebar-panel {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.sidebar-panel > .sidebar-top,
#mobile-menu-panel > .sidebar-top {
  height: auto;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 28px;
  padding: 4px 10px 18px 14px;
}
.sidebar-panel > .sidebar-top::after,
#mobile-menu-panel > .sidebar-top::after {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
}
.sidebar-panel > .sidebar-top > .top-actions,
#mobile-menu-panel > .sidebar-top > .top-actions {
  grid-area: 1 / 2;
  display: flex;
  justify-content: flex-end;
  padding-bottom: 4px;
}
.top-actions .icon-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.sidebar-panel > .sidebar-top > .wordmark,
#mobile-menu-panel > .sidebar-top > .wordmark {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  align-self: center;
  height: 36px;
  margin-bottom: 4px;
  transform: translateY(14.5px);
  white-space: nowrap;
  font-size: 34.56px;
  font-weight: 640;
  line-height: 1;
  letter-spacing: -0.065em;
  padding: 0;
}
#navigation {
  padding: 2px 8px;
}
.nav-title {
  padding: 0 9px 8px;
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.11em;
}
.nav-link {
  width: 100%;
  height: 33px;
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  text-align: left;
}
.nav-link[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 10px 8px 12px;
  border-top: 1px solid var(--line);
}
main {
  margin-left: 70px;
  min-width: 0;
}
.topbar {
  height: auto;
  min-height: 66px;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--bg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  column-gap: 18px;
  row-gap: 0;
  border-bottom: 1px solid var(--line);
}
#breadcrumb {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  text-transform: lowercase;
  white-space: nowrap;
  overflow: hidden;
}
#breadcrumb a {
  text-decoration: none;
  flex-shrink: 0;
}
#breadcrumb a:hover {
  color: var(--text);
}
#breadcrumb [aria-current] {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
#page-actions {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 7px;
}
.topbar .button {
  min-height: 28px;
  height: 28px;
  padding: 0 11px;
  font-size: 11px;
}
.topbar .export-button {
  width: 30px;
  padding: 0;
}
.topbar .filter-active {
  background: var(--surface-2);
  border-color: var(--text);
}
#content {
  padding: 28px 30px;
  max-width: none;
  margin: 0;
  width: 100%;
}
h2 {
  font-size: 13px;
  font-weight: 720;
  letter-spacing: -0.01em;
}
.card-heading {
  padding: 14px 16px;
  min-height: 47px;
}
.card {
  box-shadow: 0 1px 0 #00000005;
}
.columns {
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  margin-bottom: 18px;
}
.metrics {
  gap: 14px;
  margin-bottom: 18px;
}
.metric {
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
}
.metric strong {
  font-size: 25px;
  margin: 12px 0 8px;
  line-height: 1.2;
}
.metric small {
  margin-top: auto;
  line-height: 1.5;
}
.metric-label {
  font-size: 10px;
  font-weight: 600;
  min-height: 15px;
}
.table-scroll {
  width: 100%;
  max-height: min(560px, 65vh);
  overflow: auto;
  scrollbar-width: thin;
}
.columns .table-scroll,
.timeline {
  max-height: min(380px, 55vh);
  overflow: auto;
  scrollbar-width: thin;
}
.audience-visitors { display: flex; flex-direction: column; }
.audience-visitors .card-heading { flex-wrap: wrap; }
.audience-tabs { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-left: auto; }
.audience-tabs button { border: 0; background: transparent; padding: 3px 0; font-size: 11px; line-height: 1.5; font-weight: 400; color: var(--muted); cursor: pointer; white-space: nowrap; }
.audience-tabs button[aria-selected="true"] { color: var(--text); font-weight: 650; }
.audience-tabs button:hover { color: var(--text); }
.audience-visitors [role="tabpanel"] { min-width: 0; }
.audience-visitors th:not(:first-child), .audience-number { text-align: right; }
.audience-number { white-space: nowrap; }
.audience-caption { margin: 0; padding: 12px 16px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.audience-coverage { margin-top: auto; border-top: 1px solid var(--line); }
@media (pointer: coarse) { .audience-tabs button { min-height: 40px; } }
@media (max-width: 480px) { .audience-tabs { gap: 12px; } .audience-tabs button { font-size: 10px; } }
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.table-scroll:focus-visible,
.timeline:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
table {
  font-size: 11px;
}
th {
  height: 36px;
  padding: 10px 14px;
  font-size: 9px;
  background: var(--surface-2);
  letter-spacing: 0.03em;
}
td {
  padding: 12px 14px;
  height: 52px;
  font-size: 11px;
}
td strong {
  font-weight: 600;
}
td small {
  font-size: 10px;
  line-height: 1.5;
}
td.wrap {
  min-width: 180px;
  max-width: 430px;
}
tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 50%, transparent);
}
.row-action {
  font-size: 10px;
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 6px;
}
.row-action:hover {
  background: var(--surface-2);
}
.pagination {
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 14px;
  font-size: 10px;
  min-height: 42px;
}
.pagination .button {
  min-height: 26px;
  padding: 4px 9px;
}
.note {
  font-size: 10px;
  margin: 12px 0;
  color: var(--muted);
}
.empty {
  padding: 30px 18px;
  min-height: 150px;
}
.empty strong {
  font-size: 12px;
}
.empty p {
  font-size: 11px;
  max-width: 380px;
  margin: 7px auto 0;
}
.empty-icon {
  display: none;
}
.filter-popover {
  position: absolute;
  top: 56px;
  right: 30px;
  width: min(420px, calc(100vw - 100px));
  max-height: calc(100dvh - 90px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 30;
}
.filter-head {
  padding: 16px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.filter-description {
  margin: 4px 16px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.filter-head .icon-button { width: 26px; height: 26px; font-size: 18px; }
.filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  margin: 0;
}
.filter-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.filter-search, .filter-wide, .filter-fields > label:only-of-type { grid-column: 1 / -1; }
.filter-fields input,
.filter-fields select {
  width: 100%;
  height: 36px;
  font-size: 12px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  margin: 0;
}
.filter-fields > .actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 12px;
  gap: 6px;
}
.filter-fields > .actions > :first-child:not(:only-child) { margin-right: auto; }
.filter-fields > button[type="submit"] { grid-column: 1 / -1; justify-self: end; }
.filter-popover :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter-fields .button {
  height: 32px;
}
.account-menu {
  position: fixed;
  z-index: 50;
  bottom: 16px;
  left: 70px;
  width: 260px;
  padding: 16px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.account-menu > strong,
.account-menu > small {
  display: block;
  overflow-wrap: anywhere;
  padding: 0 8px;
  font-size: 12px;
}
.account-menu > small {
  font-size: 10px;
  color: var(--muted);
  padding-top: 5px;
  padding-bottom: 14px;
}
.account-menu .nav-link {
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.record-page {
  width: 100%;
  max-width: 1480px;
}
.record-page > .detail-grid {
  padding: 0;
  background: transparent;
  margin: 0 0 28px;
}
.form-section {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0 0 28px;
}
.form-section > h2 {
  margin-bottom: 18px;
}
.form-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field {
  align-content: start;
  min-width: 0;
  gap: 6px;
}
.field label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 650;
}
.field input,
.field select {
  height: 36px;
  font-size: 12px;
  padding: 0 11px;
}
.field textarea {
  font-size: 12px;
  line-height: 1.65;
  padding: 10px 11px;
}
.field small {
  font-size: 10px;
  line-height: 1.5;
}
.field input:read-only {
  background: var(--surface-2);
  color: var(--muted);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--text);
}
.preview {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-top: 18px;
  max-width: 100%;
  overflow: auto;
}
.preview-body {
  white-space: normal;
}
.form-error {
  padding: 10px 0;
  margin: 0;
}
.record-page .stack > .card {
  margin-bottom: 0;
}
.detail-grid {
  gap: 18px;
}
.chart {
  height: 180px;
}
.chart-note {
  padding: 0 16px 14px;
}
.account-body {
  padding: 20px;
}
.account-avatar {
  width: 48px;
  height: 48px;
  font-size: 16px;
  margin-bottom: 18px;
}
.account-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 22px;
  padding: 0;
  height: 38px;
  border: 0;
  background: transparent;
  position: static;
  overflow-x: auto;
}
.account-tabs a,
.account-tabs button {
  font-size: 11px;
  text-decoration: none;
  display: flex;
  align-items: center;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.account-tabs .active {
  color: var(--text);
  border-color: var(--accent);
}
.account-page {
  max-width: 850px;
}
.account-page .card-heading {
  display: none;
}
.account-page .account-body {
  padding: 0;
}
.account-page #password-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.account-page #password-form .note,
.account-page #password-form .form-error {
  grid-column: 1/-1;
}
.app-footer {
  font-size: 10px;
}
.menu-backdrop,
.mobile-menu-panel {
  display: none;
}
@media (min-width: 761px) and (pointer: fine) {
  #mobile-menu {
    display: none;
  }
}
@media (max-width: 1100px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px), (pointer: coarse) {
  .sidebar,
  .sidebar:focus-within,
  .sidebar:hover,
  .sidebar:has(:focus-visible) {
    left: 8px;
    right: 8px;
    top: 8px;
    bottom: auto;
    width: auto;
    height: 50px;
    overflow: visible;
  }
  .rail {
    flex: 1;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 12px;
    border-radius: 13px;
  }
  .rail-nav,
  .rail-bottom,
  .sidebar-panel,
  .sidebar:hover .sidebar-panel,
  .sidebar:has(:focus-visible) .sidebar-panel {
    display: none;
  }
  .rail #mobile-menu {
    display: grid;
    place-items: center;
    margin: 0;
    width: 30px;
    height: 30px;
    background: color-mix(in srgb, var(--on-accent) 16%, transparent);
  }
  main {
    margin-left: 0;
    padding-top: 66px;
  }
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 62px;
    top: 66px;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  #breadcrumb {
    width: 100%;
    font-size: 10px;
  }
  #breadcrumb > span:first-child,
  #breadcrumb > span:nth-child(2) {
    display: none;
  }
  #page-actions {
    margin-left: auto;
    max-width: 100%;
    gap: 6px;
  }
  .topbar .button {
    height: 32px;
    min-height: 32px;
    font-size: 10px;
    padding: 0 10px;
  }
  #content {
    padding: 14px;
  }
  .filter-popover {
    right: 14px;
    top: 100%;
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 170px);
  }
  .filter-fields input,
  .filter-fields select {
    font-size: 16px;
    height: 40px;
  }
  .menu-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: #0a101842;
    backdrop-filter: blur(2px);
  }
  .mobile-menu-panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 80;
    top: 66px;
    left: 8px;
    right: 8px;
    max-height: calc(100dvh - 74px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .mobile-menu-panel .sidebar-bottom {
    margin-top: 8px;
  }
  .mobile-section-button {
    width: 100%;
    height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    border-radius: 8px;
  }
  .mobile-section-button[aria-expanded="true"] {
    background: var(--surface-2);
  }
  .mobile-page-list {
    padding: 3px 0 5px 12px;
  }
  .mobile-page-list .nav-link {
    height: 36px;
  }
  #mobile-menu-panel > .sidebar-top {
    padding: 0 6px 17px;
  }
  #mobile-menu-panel > .sidebar-top > .wordmark {
    transform: translateY(11.5px);
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 14px;
  }
  .metric strong {
    font-size: 22px;
  }
  .metric-label {
    min-height: 28px;
    line-height: 1.4;
  }
  .metric small {
    font-size: 9px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .form-section {
    padding: 0;
    margin-bottom: 24px;
  }
  .field.full {
    grid-column: 1/-1;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
    min-height: 42px;
  }
  .columns {
    gap: 14px;
  }
  .row-action {
    min-height: 36px;
  }
  .card-heading {
    padding: 14px;
  }
  .account-tabs {
    padding: 0;
  }
  .account-page #password-form {
    grid-template-columns: 1fr;
  }
  .account-page .account-body {
    padding: 0;
  }
  .account-menu {
    bottom: auto;
    top: 66px;
    left: 8px;
    right: 8px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.home-articles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.home-article {
  display: flex;
  flex-direction: column;
}
.home-article > img,
.article-cover-empty {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--surface-2);
}
.article-cover-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.home-article-copy {
  padding: 16px;
  flex: 1;
}
.home-article-copy h2 {
  margin: 12px 0 8px;
  line-height: 1.5;
}
.home-article-copy p {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
  line-height: 1.6;
}
.home-article footer {
  padding: 10px;
  border-top: 1px solid var(--line);
}
.home-row-actions {
  flex-wrap: nowrap;
  gap: 3px;
}
.selected-article {
  display: flex;
  gap: 22px;
  margin-bottom: 18px;
  padding: 20px;
}
.selected-article > img {
  width: 220px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 7px;
}
.selected-article p {
  font-size: 12px;
  color: var(--muted);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
}
.section-head h2 span {
  font-weight: 400;
  font-size: 11px;
}
.news-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
  display: grid;
  gap: 16px;
}
.news-section .section-head {
  margin: 0;
  font-size: 11px;
}
.news-section .button,
.section-head .button {
  min-height: 28px;
  font-size: 10px;
  padding: 6px 10px;
}
.home-articles > .empty {
  grid-column: 1/-1;
}
@media (max-width: 1150px) {
  .home-articles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .home-articles {
    grid-template-columns: 1fr;
  }
  .selected-article {
    flex-direction: column;
    padding: 16px;
  }
  .selected-article > img {
    width: 100%;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head .button {
    flex-shrink: 0;
  }
  .home-row-actions .row-action {
    padding: 4px 8px;
  }
}
.empty .empty-icon {
  display: none;
}
.record-page > .stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 760px) {
  .record-page > .stack {
    grid-template-columns: 1fr;
  }
}
.invoice-error {
  padding: 22px;
  font-size: 12px;
}
.invoice-error p {
  color: var(--muted);
}
html {
  scroll-padding-top: 80px;
}
@media (max-width: 760px) {
  html {
    scroll-padding-top: 160px;
  }
}

/* Forms share the page surface; field labels and controls align independently of help text. */
.topbar > #breadcrumb,
.topbar > #page-actions { min-height: 65px; }
.topbar > #page-actions { align-content: center; }
.topbar > #breadcrumb { align-content: center; }
.account-tabs button { padding: 0; white-space: nowrap; }
.account-page > .card { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.account-page #password-form { align-items: start; }
.form-tab-panel[hidden] { display: none; }
.field-help { font-size: 11px; color: var(--muted); margin: 12px 0 0; }
.section-title { margin: 26px 0 14px; }
.detail-grid dd small { display: block; color: var(--muted); margin-top: 5px; }
@media (max-width: 760px) {
  .topbar > #breadcrumb, .topbar > #page-actions { min-height: 0; }
  .topbar > #page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .account-tabs { gap: 20px; }
}
.account-summary { max-width: 760px; }
.account-identity { display: flex; align-items: center; gap: 18px; padding: 24px; }
.account-identity .account-avatar { margin: 0; flex: 0 0 48px; }
.account-identity > div { min-width: 0; flex: 1; }
.account-identity h2 { font-size: 15px; margin: 0 0 6px; }
.account-identity p { color: var(--muted); font-size: 12px; margin: 0; overflow-wrap: anywhere; }
.account-information { margin: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px; }
.account-information dt { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.account-information dd { margin: 0; font-size: 12px; }
.account-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.account-dialog[open] { display: flex; flex-direction: column; }
.account-dialog::backdrop { background: #080c1470; backdrop-filter: blur(4px); }
.account-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 24px 12px; gap: 16px; }
.account-dialog-header h2 { font-size: 17px; margin: 0 0 6px; }
.account-dialog-header p { font-size: 12px; margin: 0; color: var(--muted); }
.account-dialog-header .icon-button { font-size: 24px; width: 28px; height: 28px; }
.dialog-tabs { display: flex; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.dialog-tabs button { border-bottom: 2px solid transparent; padding: 14px 0; font-size: 12px; color: var(--muted); }
.dialog-tabs [aria-selected="true"] { color: var(--text); border-color: var(--text); }
.account-dialog-body { padding: 24px; overflow: auto; }
.account-dialog form[hidden] { display: none; }
.account-dialog .full { grid-column: 1 / -1; }
.account-dialog .form-error:empty { display: none; }
.account-dialog-actions { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) {
  .account-identity { padding: 18px; gap: 12px; flex-wrap: wrap; }
  .account-identity > div { flex-basis: calc(100% - 60px); }
  .account-identity > button { margin-left: auto; }
  .account-information { padding: 18px; grid-template-columns: 1fr; }
  .account-dialog-header, .account-dialog-body { padding: 20px; }
  .dialog-tabs { padding: 0 20px; }
  .account-dialog-actions { padding: 16px 20px; }
}
/* Same compact actions and status pills as the Askora tables. */
.row-actions-column { width: 90px; }
.compact-row-actions { display: flex; align-items: center; gap: 4px; }
.row-icon-action { position: relative; width: 26px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 6px; display: grid; place-items: center; color: var(--muted); background: transparent; cursor: pointer; flex-shrink: 0; }
.row-icon-action:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.row-icon-action.danger:hover { color: #d64f5a; background: #d64f5a14; border-color: #d64f5a2e; }
.row-icon-action svg { width: 13px; height: 13px; fill: currentColor; }
.status-pill { height: 21px; padding: 0 8px; border-radius: 11px; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.active { color: #28a779; background: #28a77917; }
.status-pill.inactive { color: #9aa2a6; }
@media (max-width: 760px) { .row-icon-action { width: 40px; height: 40px; } }
/* Compact forms: short fields occupy one quarter; long text has its own row. */
.form-grid, .news-section { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.news-section > .section-head { grid-column: 1 / -1; }
.account-dialog .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lead-information { margin-bottom: 28px; }
.lead-information .card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.lead-information .card-heading h2 { margin: 0; }
.lead-information .detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 20px; }
.lead-information dd { overflow-wrap: anywhere; }
.lead-message { padding: 0 20px 20px; font-size: 12px; }
.lead-message p { white-space: pre-wrap; line-height: 1.6; }
#lead-journey[hidden], #lead-main[hidden] { display: none; }
.sidebar-bottom { gap: 0; padding: 9px 8px 12px; }
.sidebar-bottom .nav-link, #account-menu .nav-link { height: 33px; gap: 9px; padding: 0 10px; }
.sidebar-bottom .nav-link span { color: inherit; font-weight: 500; }
@media (max-width: 1100px) {
  .form-grid, .news-section, .lead-information .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .form-grid, .news-section, .account-dialog .form-grid, .lead-information .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-information .card-heading { padding: 16px; }
  .lead-information .card-heading .button { padding: 8px; font-size: 10px; flex-shrink: 0; }
  .lead-information .detail-grid { padding: 16px; }
}
.home-curation{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:24px;align-items:start}.home-curation>section{min-width:0}.home-curation .section-head{margin:0 0 14px;gap:12px}.home-curation .section-head h2{font-size:15px;margin:0}.curation-catalog td:last-child{width:112px}.curation-catalog td .button{width:100%;font-size:12px}.curation-catalog td .button[aria-pressed=true]{background:var(--accent);color:var(--on-accent)}.selection-count{font-size:12px;white-space:nowrap}.selected-home-articles{display:grid;gap:14px}.curated-article{display:grid;grid-template-columns:100px minmax(0,1fr);gap:14px;padding:16px;overflow:hidden}.curated-article>img{width:100px;height:90px;object-fit:cover;border-radius:6px;background:var(--surface-2)}.curated-copy h3{margin:0 0 8px;font-size:14px;line-height:1.5}.curated-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.curated-controls{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:10px}.curated-controls>span{font-size:12px;color:var(--muted)}
@media(max-width:1000px){.home-curation{grid-template-columns:1fr}.curation-selection{order:-1}.selected-home-articles{grid-template-columns:repeat(2,minmax(0,1fr))}.curated-article{grid-template-columns:1fr}.curated-article>img{width:100%;height:130px}.curation-catalog td:last-child{width:105px}}@media(max-width:520px){.selected-home-articles{grid-template-columns:1fr}.curated-article{grid-template-columns:80px minmax(0,1fr);gap:10px}.curated-article>img{width:80px;height:80px}.home-curation .section-head{flex-wrap:wrap}.curation-catalog .pagination{flex-wrap:wrap}}

.commercial-summary{padding:16px 18px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:12px;line-height:1.8;color:var(--muted)}.client-billing-detail{margin-bottom:20px}.client-billing-detail .detail-grid{padding:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.payment-copy-label{display:grid;gap:8px;margin:20px 0;font-size:12px}.payment-copy{width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text)}@media(max-width:600px){.client-billing-detail .detail-grid{grid-template-columns:1fr}}
