/* ANS Heritage 0.10.2. Shared presentation for administration, staff and portal. */
:root {
  --heritage-content: 1520px;
  --heritage-sidebar: 272px;
  --soft: #f7f7f4;
  --line: #e2e4df;
}
body { font-size: 16px; line-height: 1.6; }
.admin-shell { grid-template-columns: var(--heritage-sidebar) minmax(0, 1fr); width: 100%; }
.admin-main { width: 100%; max-width: none; padding: 0; min-width: 0; }
.workspace-content { width: min(var(--heritage-content), calc(100% - 64px)); margin: 0 auto; padding: 34px 0 56px; min-width: 0; }
.workspace-content > * { min-width: 0; }
.workspace-skip { position: fixed; left: 18px; top: 12px; z-index: 100; padding: 12px 18px; background: #fff; color: var(--red); border: 2px solid var(--red); border-radius: 6px; transform: translateY(-160%); }
.workspace-skip:focus { transform: none; }
h1 { font-size: clamp(29px, 2.45vw, 38px); font-weight: 500; line-height: 1.16; letter-spacing: -.035em; }
h2 { font-size: 23px; font-weight: 500; }
h3 { font-size: 18px; }
button, .button { font-size: 15px; font-weight: 600; border-radius: 6px; }
.button.small, button.small { font-size: 13px; min-height: 38px; }
input, select, textarea { font-size: 16px; background: #fff; }
label { font-size: 15px; }
small, .meta, .muted { font-size: 14px; }
.sidebar { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 22px 16px 16px; overflow: hidden; }
.sidebar .brand-box { flex: 0 0 auto; min-height: 64px; padding: 0 8px 20px; margin: 0 0 12px; gap: 12px; border-bottom: 1px solid var(--line); }
.sidebar .brand-box:hover { background: transparent; }
.admin-logo { width: 112px; height: 56px; padding: 0; flex-shrink: 0; }
.brand-box span { font-size: 12px; }
.brand-box small { font-size: 11px; }
.sidebar nav { flex: 1 1 auto; min-height: 0; display: block; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 8px 0; scrollbar-width: thin; scrollbar-color: #c9cdc8 transparent; }
.sidebar nav a { min-height: 43px; padding: 10px 11px; margin: 2px 0; gap: 11px; font-size: 15px; font-weight: 500; line-height: 1.4; border-radius: 6px; border: 1px solid transparent; }
.sidebar nav a:hover { background: #f6f6f2; }
.sidebar nav a.active, .sidebar nav a[aria-current=page] { background: #fbf0ed; color: var(--red); border-color: #f0d9d2; box-shadow: inset 3px 0 var(--red); }
.nav-icon { width: 20px; height: 20px; }
.nav-icon img { width: 20px; height: 20px; }
.nav-section { margin: 20px 12px 7px; font-size: 10px; line-height: 1.5; letter-spacing: .13em; color: #737b7c; }
.sidebar-version { flex: 0 0 auto; margin: 12px 8px 0; border-top: 1px solid var(--line); padding-top: 13px; font-size: 12px; color: #697274; }
.topbar { height: 80px; min-height: 80px; margin: 0; padding: 12px max(32px, calc((100% - var(--heritage-content)) / 2)); gap: 20px; border-bottom: 1px solid #ffffff10; }
.workspace-breadcrumb { min-width: 0; }
.topbar .workspace-breadcrumb span { font-size: 10px; letter-spacing: .13em; line-height: 1.5; }
.topbar .workspace-breadcrumb strong { display: block; margin-top: 3px; font-size: 18px; line-height: 1.35; }
.topbar-actions { min-width: 0; flex-shrink: 1; gap: 18px; }
.topbar-actions form { margin: 0; }
.workspace-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.workspace-user-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #ffffff2b; border-radius: 50%; flex-shrink: 0; background: #ffffff0a; }
.workspace-user-icon img { width: 19px; height: 19px; filter: brightness(0) invert(1); }
.topbar .workspace-identity strong { display: block; font-size: 14px; line-height: 1.35; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .workspace-identity small { display: block; color: #bbc3c1; font-size: 12px; }
.topbar .workspace-site-link { font-size: 13px; color: #e6e9e7; white-space: nowrap; }
.topbar .button, .topbar button { min-height: 38px; border-radius: 5px; font-size: 13px; }
.topbar .pill { font-size: 12px; }
.dashboard-heading { align-items: center; margin: 0 0 27px; gap: 24px; }
.dashboard-heading h1 { margin-bottom: 10px; }
.dashboard-heading p { font-size: 15px; line-height: 1.6; }
.dashboard-heading .eyebrow { font-size: 10px; letter-spacing: .14em; margin-bottom: 9px; }
.panel { padding: 24px; margin-bottom: 22px; border-radius: 9px; box-shadow: 0 2px 8px #20242603; }
.panel > h2:first-child { margin-top: 0; }
.panel-title-row { gap: 16px; margin-bottom: 22px; }
.panel-title-row h2 { font-size: 23px; }
.cards { gap: 18px; margin: 0 0 20px; }
.card { min-width: 0; padding: 24px; border-radius: 9px; transition: border-color .16s, box-shadow .16s; }
a.card:hover { border-color: #cba9a2; box-shadow: 0 5px 18px #20242606; }
.card strong { font-size: 36px; font-weight: 500; margin: 16px 0 6px; }
.card span { font-size: 15px; }
.card small { font-size: 13px; }
.card > img { width: 25px; height: 25px; }
.quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.quick-links a { display: flex; align-items: center; min-width: 0; min-height: 50px; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; font-weight: 600; }
.quick-links a:hover { background: #fcf8f5; border-color: #d7b8b0; }
.quick-links img { margin-right: 10px; width: 19px; height: 19px; flex-shrink: 0; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.dashboard-layout > * { min-width: 0; }
.dashboard-layout .panel { margin-bottom: 0; }
.dashboard-aside { display: grid; gap: 20px; }
.dashboard-bookings .panel-title-row .button { font-size: 12px; padding-inline: 12px; }
.table-responsive { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { font-size: 15px; width: 100%; min-width: 620px; border-collapse: collapse; }
th, td { padding: 15px 13px; line-height: 1.5; text-align: left; }
th { font-size: 12px; letter-spacing: .05em; font-weight: 650; background: #f7f8f5; color: #697274; }
td { border-bottom: 1px solid #e8eae5; }
tbody tr:last-child td { border-bottom: 0; }
td strong { font-size: 15px; font-weight: 600; }
.booking-service { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.booking-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.booking-date small { display: block; font-size: 12px; margin-top: 3px; }
.table-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; margin: 0 0 18px; }
.table-tools input { flex: 1 1 180px; max-width: 300px; min-height: 39px; padding: 8px 11px; font-size: 14px; }
.status, .pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; line-height: 1.5; padding: 5px 10px; border-radius: 20px; white-space: nowrap; }
.status.cancelled { background: #fceeee; color: #9a3333; }
.dashboard-agenda .eyebrow { margin: 18px 0 6px; font-size: 11px; }
.dashboard-agenda h3 { margin: 0 0 5px; font-size: 18px; }
.dashboard-agenda p { font-size: 14px; }
.dashboard-agenda .button { width: 100%; margin-top: 12px; }
.dashboard-panel-heading { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; font-size: 21px; }
.dashboard-panel-heading img { width: 21px; height: 21px; }
.dashboard-agenda .empty-state { padding: 25px 14px; gap: 12px; }
.dashboard-agenda .empty-state strong { font-family: inherit; font-size: 15px; font-weight: 600; }
.dashboard-agenda .empty-state p { font-size: 13px; }
.dashboard-followups { background: #f1f0eb; border-color: #e7e4db; }
.followup-links { display: grid; gap: 14px; }
.followup-links a { display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 14px; }
.followup-links a:hover { color: var(--red); }
.followup-links strong { font-size: 13px; border: 1px solid #deded6; border-radius: 5px; background: #fff; padding: 3px 9px; min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.dashboard-info { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.dashboard-info h2 { margin: 0 0 7px; font-size: 22px; }
.dashboard-info p { max-width: 680px; margin: 0; font-size: 14px; color: var(--muted); }
.dashboard-info .table-actions { flex-shrink: 0; }
.alert { margin-bottom: 22px; padding: 15px 18px; font-size: 14px; border: 1px solid transparent; }
.alert.success { border-color: #d8eddf; }
.alert.error { border-color: #f3d8d8; }
.heritage-calendar-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
.heritage-agenda { border-radius: 9px; padding: 24px; }
.heritage-agenda h2 { font-size: 23px; }
.staff-workspace .staff-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workspace-tabs { gap: 26px; margin-bottom: 25px; }
.workspace-tabs a { font-size: 15px; padding: 14px 0; }
.portal-welcome { padding: 40px; border-radius: 9px; margin-bottom: 24px; background-position: right 38%; }
.portal-welcome h1 { font-size: clamp(29px, 2.7vw, 40px); margin-bottom: 14px; }
.portal-welcome p { font-size: 16px; }
.portal-welcome .eyebrow { font-size: 10px; }
.publication-row { border-radius: 8px; padding: 26px; }
.publication-row h3 { font-size: 21px; }
.document-prose { font-size: 16px; line-height: 1.8; }
.settings-list { margin: 0; }
.portal-policy-note { line-height: 1.6; align-items: flex-start; }
.portal-policy-note img { flex-shrink: 0; margin-top: 3px; }
.heritage-menu-toggle, .mobile-admin-toggle { display: none; }
[hidden] { display: none !important; }
@media (min-width: 1600px) { .dashboard-bookings th, .dashboard-bookings td { padding: 16px 14px; } }
@media (max-width: 1250px) {
  :root { --heritage-sidebar: 246px; }
  .workspace-content { width: calc(100% - 48px); }
  .topbar { padding-inline: 24px; }
  .dashboard-layout, .heritage-calendar-layout { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: 1fr 1fr; }
  .dashboard-info { align-items: flex-start; flex-direction: column; gap: 20px; }
  .publication-grid { grid-template-columns: 1fr; }
  .cards { gap: 12px; }
  .card { padding: 20px; }
  .workspace-site-link { display: none; }
}
@media (min-width: 821px) and (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .admin-shell { display: block; }
  .sidebar { height: auto; padding: 12px 18px; overflow: visible; border-bottom: 1px solid var(--line); }
  .sidebar .brand-box { margin: 0; padding: 0; min-height: 48px; border: 0; }
  .admin-logo { width: 94px; height: 46px; }
  .sidebar nav { padding-top: 16px; max-height: min(65vh, 600px); margin: 0; }
  .sidebar-version { display: none; }
  .has-heritage-js .sidebar nav { display: none; }
  .has-heritage-js.heritage-menu-open .sidebar nav { display: block; }
  .admin-main { padding: 0; }
  .workspace-content { width: calc(100% - 32px); padding-top: 24px; }
  .topbar { height: auto; min-height: 72px; padding: 12px 16px; margin: 0; gap: 12px; flex-wrap: wrap; }
  .topbar .workspace-breadcrumb { flex: 1; min-width: 100px; }
  .topbar .workspace-breadcrumb strong { font-size: 15px; max-width: 200px; }
  .topbar .workspace-breadcrumb span { font-size: 9px; }
  .topbar-actions { gap: 10px; }
  .workspace-identity { display: none; }
  .has-heritage-js .heritage-menu-toggle { display: inline-flex; min-height: 38px; padding: 8px 11px; font-size: 12px; }
  .dashboard-heading { flex-wrap: wrap; align-items: flex-start; margin-bottom: 24px; }
  .dashboard-heading h1 { font-size: 30px; }
  .cards, .staff-workspace .staff-metrics, .portal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-metrics .card:last-child { grid-column: 1 / -1; }
  .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .quick-links a { padding: 12px; font-size: 13px; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .panel { padding: 19px; }
  .panel-title-row { align-items: flex-start; flex-wrap: wrap; }
  .panel-title-row h2 { font-size: 22px; }
  .dashboard-info { margin-top: 20px; }
  .heritage-agenda { display: block; padding: 20px; }
  .portal-welcome { padding: 27px 23px; }
  .portal-welcome h1 { font-size: 30px; }
  .publication-row { padding: 20px; }
  .document-prose { font-size: 15px; }
}
@media (max-width: 480px) {
  .topbar .workspace-breadcrumb { order: 3; flex-basis: 100%; padding-top: 5px; border-top: 1px solid #ffffff1b; }
  .topbar-actions { margin-left: auto; }
  .cards { gap: 10px; }
  .card { padding: 18px; }
  .card strong { font-size: 31px; }
  .card span { font-size: 14px; }
  .form-columns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
@media print {
  .sidebar, .topbar, .workspace-skip, .quick-links { display: none !important; }
  .admin-shell, .dashboard-layout, .dashboard-aside { display: block; }
  .workspace-content { width: 100%; padding: 0; }
  .dashboard-layout .panel { margin-bottom: 20px; }
}
