@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600&display=swap");

:root {
  --black: #050403;
  --panel: #11100d;
  --cream: #f1eadf;
  --gold: #a98237;
  --gold-bright: #d9b66a;
  --muted: #cfc2ae;
  --error: #ef9d91;
  --success: #b5cfaa;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: var(--sans);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
[hidden] { display: none !important; }

.portal-header {
  position: relative;
  z-index: 2;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(169,130,55,.35);
}
.portal-brand { display: inline-flex; align-items: center; gap: .9rem; }
.portal-brand img { width: 58px; height: 50px; object-fit: contain; }
.portal-brand span, .portal-kicker {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  padding: .6rem;
  cursor: pointer;
}
.text-button:hover { color: var(--cream); }

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  min-height: calc(100vh - 82px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding: 4rem 0;
}
.login-intro h1, .portal-title h1 {
  margin: .6rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .98;
  letter-spacing: 0;
  font-weight: 500;
}
.login-intro p { max-width: 36rem; color: var(--muted); line-height: 1.8; }
.login-panel { border-left: 1px solid var(--gold); padding: 1rem 0 1rem clamp(1.5rem, 5vw, 4rem); }
.login-panel h2 { margin: 0 0 2rem; font-family: var(--serif); font-size: 2rem; font-weight: 500; }

.field { display: grid; gap: .55rem; margin-bottom: 1.2rem; }
.field label, .field legend { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(217,182,106,.36);
  border-radius: 2px;
  background: rgba(255,255,255,.035);
  color: var(--cream);
  padding: .8rem .9rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select option {
  background: var(--cream);
  color: #17110c;
}
.field select option:disabled {
  color: #6b5d4b;
}
.field small { color: var(--muted); line-height: 1.5; }
.primary-button {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: rgba(169,130,55,.12);
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}
.primary-button:hover { background: rgba(169,130,55,.2); }
.primary-button:disabled { opacity: .5; cursor: wait; }
.form-actions { display: grid; gap: .65rem; margin-top: 1.5rem; }
.status { margin: 0 0 1rem; padding: .8rem 1rem; border-left: 2px solid var(--gold); color: var(--muted); line-height: 1.5; }
.status[data-type="error"] { border-color: var(--error); color: var(--error); }
.status[data-type="success"] { border-color: var(--success); color: var(--success); }

.portal-main {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}
.portal-title { display: flex; align-items: end; justify-content: space-between; gap: 2rem; border-bottom: 1px solid rgba(169,130,55,.35); padding-bottom: 2.5rem; }
.identity { color: var(--muted); text-align: right; line-height: 1.7; }
.identity strong { display: block; color: var(--cream); }
.resource-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; border-top: 1px solid rgba(169,130,55,.25); border-left: 1px solid rgba(169,130,55,.25); }
.resource {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-right: 1px solid rgba(169,130,55,.25);
  border-bottom: 1px solid rgba(169,130,55,.25);
}
.resource[href]:hover { background: rgba(169,130,55,.08); }
.resource-number { color: var(--gold); font-size: .7rem; letter-spacing: .14em; }
.resource h2 { margin: 0; font-family: var(--serif); font-size: 1.75rem; font-weight: 500; }
.resource p { margin: .75rem 0 0; color: var(--muted); line-height: 1.6; }
.resource-arrow { color: var(--gold-bright); font-size: 1.4rem; }
.resource.is-coming { opacity: .55; }

.referral-layout { display: grid; grid-template-columns: 280px minmax(0, 680px); gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.referral-context { position: sticky; top: 2rem; }
.referral-context h1 { font-family: var(--serif); font-size: 2.65rem; font-weight: 500; margin: .6rem 0 1.2rem; }
.referral-context p { color: var(--muted); line-height: 1.7; }
.profile-stamp { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(169,130,55,.35); line-height: 1.65; }
.profile-stamp strong { display: block; }
.form-section { margin: 0 0 2.75rem; padding: 0; border: 0; }
.form-section legend { width: 100%; margin-bottom: 1.5rem; padding-bottom: .8rem; border-bottom: 1px solid rgba(169,130,55,.25); font-family: var(--serif); font-size: 1.55rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check-field { display: grid; grid-template-columns: 20px 1fr; gap: .8rem; color: var(--muted); line-height: 1.6; margin: 1.3rem 0; }
.check-field input { width: 18px; height: 18px; accent-color: var(--gold); margin-top: .2rem; }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--gold-bright); font-size: .75rem; text-transform: uppercase; letter-spacing: .13em; }

.admin-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: clamp(2rem, 6vw, 6rem); padding-top: 3rem; }
.admin-resource-grid { grid-template-columns: repeat(4, 1fr); }
.admin-resource { background: rgba(169,130,55,.08); }
.admin-layout h2 { margin: 0 0 1.5rem; font-family: var(--serif); font-size: 1.7rem; font-weight: 500; }
.artist-directory { border-left: 1px solid rgba(169,130,55,.3); padding-left: clamp(1.5rem, 4vw, 3rem); }
.artist-directory ul { list-style: none; padding: 0; margin: 0; }
.artist-directory li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(169,130,55,.2); }
.artist-directory strong, .artist-directory span { display: block; }
.artist-directory span { margin-top: .3rem; color: var(--muted); font-size: .82rem; }
.artist-directory code { color: var(--gold-bright); font-size: .75rem; }
.artist-actions { display: grid; justify-items: end; gap: .55rem; }
.edit-artist, .remove-artist { min-height: 36px; border: 0; background: transparent; padding: .35rem 0; cursor: pointer; }
.edit-artist { color: var(--gold-bright); }
.edit-artist:hover { color: var(--cream); }
.remove-artist { min-height: 36px; border: 0; background: transparent; color: var(--error); padding: .35rem 0; cursor: pointer; }
.remove-artist:hover { color: #ffd0c9; }
.remove-artist:disabled { opacity: .5; cursor: wait; }
.artist-dialog { width: min(520px, calc(100% - 2rem)); border: 1px solid rgba(169,130,55,.55); border-radius: 0; padding: 0; background: #090908; color: var(--cream); }
.artist-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.artist-dialog form { padding: 1.75rem; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; border-bottom: 1px solid rgba(169,130,55,.3); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.dialog-heading h2 { margin: .35rem 0 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 500; }
.dialog-close { border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.dialog-identity { display: grid; gap: .25rem; margin: 0 0 1.5rem; }
.dialog-identity span { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin-top: 1.5rem; }

@media (max-width: 780px) {
  .login-shell, .referral-layout, .admin-layout { grid-template-columns: 1fr; }
  .login-shell { align-content: center; gap: 2.5rem; }
  .login-panel { border-left: 0; border-top: 1px solid var(--gold); padding: 2rem 0 0; }
  .portal-title { align-items: start; flex-direction: column; }
  .identity { text-align: left; }
  .resource-grid { grid-template-columns: 1fr; }
  .referral-context { position: static; }
  .artist-directory { border-left: 0; border-top: 1px solid rgba(169,130,55,.3); padding: 2rem 0 0; }
  .admin-resource-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .portal-brand span { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .portal-main { width: min(100% - 1.5rem, 1120px); }
  .admin-resource-grid { grid-template-columns: 1fr; }
}

/* Partner workspace */
.workspace-body, .workspace-body html { overflow-x: hidden; }
.workspace *, .workspace *::before, .workspace *::after { min-width: 0; }
.workspace p, .workspace strong, .workspace span { overflow-wrap: anywhere; }
.workspace-body::before { z-index: 0; }
.workspace { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.workspace-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid rgba(169,130,55,.28); background: rgba(5,4,3,.96); }
.workspace-logo { min-height: 116px; display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: .75rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(169,130,55,.28); }
.workspace-logo img { grid-row: 1 / 3; width: 54px; height: 62px; object-fit: contain; }
.workspace-logo span { align-self: end; font-family: var(--serif); font-size: 1.45rem; text-transform: uppercase; }
.workspace-logo small { color: var(--gold-bright); text-transform: uppercase; font-size: .58rem; letter-spacing: .14em; }
.workspace-nav { display: grid; gap: .3rem; padding: 1.5rem .7rem; }
.workspace-nav a, .workspace-nav button, .sidebar-signout { width: 100%; min-height: 48px; display: flex; align-items: center; gap: .8rem; border: 1px solid transparent; border-radius: 2px; padding: .65rem .8rem; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.workspace-nav svg, .sidebar-signout svg { width: 19px; height: 19px; stroke-width: 1.6; flex: 0 0 auto; }
.workspace-nav a:hover, .workspace-nav button:hover, .workspace-nav .is-active { color: var(--cream); background: rgba(169,130,55,.1); border-color: rgba(169,130,55,.25); }
.workspace-nav .is-active { color: var(--gold-bright); }
.sidebar-signout { margin: auto .7rem 1rem; width: calc(100% - 1.4rem); }
.workspace-stage { min-width: 0; }
.workspace-topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1rem,3vw,2.5rem); border-bottom: 1px solid rgba(169,130,55,.28); background: rgba(5,4,3,.88); backdrop-filter: blur(14px); }
.workspace-topbar > strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.account-chip { display: flex; align-items: center; gap: .7rem; }
.account-chip > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(217,182,106,.5); border-radius: 50%; color: var(--gold-bright); font-size: .72rem; }
.account-chip div { display: grid; gap: .15rem; }
.account-chip strong { font-size: .8rem; }
.account-chip small { color: var(--muted); font-size: .68rem; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--cream); padding: .5rem; }
.workspace-main { width: min(1320px, calc(100% - 3rem)); margin: auto; padding: clamp(2rem,4vw,4rem) 0 5rem; }
.workspace-view { animation: workspace-in .35s ease both; }
@keyframes workspace-in { from { opacity: 0; transform: translateY(8px); } }
.view-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-bottom: 1.8rem; border-bottom: 1px solid rgba(169,130,55,.3); }
.view-heading h1 { margin: .45rem 0 .35rem; font-family: var(--serif); font-size: clamp(2.2rem,4vw,4.2rem); line-height: 1; font-weight: 500; }
.view-heading p:last-child { margin: 0; color: var(--muted); }
.outline-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 1px solid var(--gold); border-radius: 2px; padding: .65rem 1rem; background: rgba(169,130,55,.08); color: var(--gold-bright); cursor: pointer; white-space: nowrap; }
.outline-action svg { width: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 2rem 0 2.5rem; background: rgba(169,130,55,.3); border: 1px solid rgba(169,130,55,.3); }
.metric-grid button { min-height: 132px; display: grid; align-content: center; justify-items: start; gap: .4rem; border: 0; padding: 1.25rem 1.5rem; background: #090806; color: var(--cream); cursor: pointer; text-align: left; }
.metric-grid button:hover { background: rgba(169,130,55,.1); }
.metric-grid span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.metric-grid strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 500; }
.metric-grid small { color: var(--gold-bright); }
.section-title, .section-heading h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.quick-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 1rem 0 2.5rem; }
.quick-grid > * { min-height: 104px; display: grid; grid-template-columns: 42px 1fr 20px; align-items: center; gap: .85rem; border: 1px solid rgba(169,130,55,.28); border-radius: 4px; padding: 1rem; background: rgba(255,255,255,.018); color: var(--cream); text-align: left; cursor: pointer; }
.quick-grid > *:hover { border-color: var(--gold); background: rgba(169,130,55,.08); }
.quick-grid svg { width: 25px; color: var(--gold-bright); stroke-width: 1.5; }
.quick-grid > * > svg:last-child { width: 17px; }
.quick-grid div { display: grid; gap: .35rem; }
.quick-grid span { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.dashboard-split { display: grid; grid-template-columns: minmax(0,2fr) minmax(240px,.7fr); gap: 1.25rem; }
.admin-dashboard-split { grid-template-columns: 1fr 1fr; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; }
.section-heading h2 { margin: 0; }
.section-heading button { border: 0; background: transparent; color: var(--gold-bright); cursor: pointer; }
.attention-panel { display: flex; gap: 1rem; border: 1px solid rgba(169,130,55,.4); padding: 1.25rem; background: rgba(169,130,55,.07); }
.attention-panel svg { width: 28px; color: var(--gold-bright); flex: 0 0 auto; }
.attention-panel p { color: var(--muted); line-height: 1.6; }
.calendar-shell { margin-top: 2rem; border: 1px solid rgba(169,130,55,.3); }
.calendar-toolbar { min-height: 62px; display: flex; align-items: center; gap: .4rem; padding: .6rem .8rem; border-bottom: 1px solid rgba(169,130,55,.25); }
.calendar-toolbar h2 { min-width: 190px; margin: 0 .5rem; font-family: var(--serif); font-weight: 500; }
.calendar-toolbar button { min-width: 38px; min-height: 38px; display: grid; place-items: center; border: 1px solid rgba(169,130,55,.3); background: transparent; color: var(--muted); cursor: pointer; }
.calendar-toolbar button:last-child { display: block; margin-left: auto; padding: 0 .8rem; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.calendar-weekdays span { padding: .7rem; border-right: 1px solid rgba(169,130,55,.18); color: var(--muted); font-size: .65rem; text-align: center; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 96px; border-top: 1px solid rgba(169,130,55,.18); border-right: 1px solid rgba(169,130,55,.18); padding: .55rem; }
.calendar-day.is-muted { opacity: .35; }
.calendar-day.is-today > span { color: var(--gold-bright); }
.calendar-day > span { font-size: .72rem; }
.calendar-event { display: block; width: 100%; margin-top: .35rem; overflow: hidden; border: 0; border-left: 2px solid var(--gold); padding: .3rem .35rem; background: rgba(169,130,55,.13); color: var(--cream); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; text-align: left; cursor: pointer; }
.calendar-event[data-status*="cancel"] { opacity: .55; border-color: var(--error); text-decoration: line-through; }
.appointment-heading { margin-top: 2rem; }
.appointment-heading select { min-height: 38px; border: 1px solid rgba(169,130,55,.3); background: #090806; color: var(--cream); padding: 0 .7rem; }
.appointment-list { display: grid; border-top: 1px solid rgba(169,130,55,.25); }
.appointment-row { display: grid; grid-template-columns: 115px minmax(140px,1fr) minmax(160px,1fr) 150px auto; align-items: center; gap: 1rem; min-height: 74px; border-bottom: 1px solid rgba(169,130,55,.2); padding: .75rem .25rem; }
.appointment-row[role="button"] { cursor: pointer; transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease; }
.appointment-row[role="button"]:hover, .appointment-row[role="button"]:focus-visible { border-color: rgba(217,182,106,.65); background: rgba(217,182,106,.09); box-shadow: inset 3px 0 0 rgba(217,182,106,.8), 0 0 24px rgba(217,182,106,.08); outline: none; }
.appointment-row time, .appointment-row span { color: var(--muted); font-size: .78rem; }
.appointment-row strong, .appointment-row span { overflow-wrap: anywhere; }
.appointment-status { width: fit-content; border: 1px solid rgba(169,130,55,.35); padding: .3rem .5rem; color: var(--gold-bright) !important; font-size: .62rem !important; text-transform: uppercase; }
.appointment-row button { border: 0; background: transparent; color: var(--gold-bright); cursor: pointer; }
.appointment-list.compact .appointment-row { grid-template-columns: 105px 1fr 130px; }
.appointment-list.compact .appointment-row > :nth-child(3) { display: none; }
.empty-state { padding: 2rem 0; color: var(--muted); }
.activity-list { display: grid; border-top: 1px solid rgba(169,130,55,.25); }
.activity-item { display: grid; gap: .25rem; padding: .85rem 0; border-bottom: 1px solid rgba(169,130,55,.2); }
.activity-item span { color: var(--muted); font-size: .72rem; }
.document-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 2rem; }
.document-grid article { min-height: 260px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid rgba(169,130,55,.28); padding: 1.25rem; }
.document-grid article > span { color: var(--gold-bright); font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; }
.document-grid svg { width: 34px; height: 34px; margin: 1.2rem 0; color: var(--gold-bright); stroke-width: 1.4; }
.document-grid h2 { margin: 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.document-grid p { color: var(--muted); line-height: 1.6; }
.document-grid button, .document-grid a { margin-top: auto; border: 0; background: transparent; color: var(--gold-bright); padding: .4rem 0; cursor: pointer; text-decoration: none; }
.partner-packet-download { display: flex; align-items: center; gap: 1rem; width: fit-content; margin-top: 1rem; border: 1px solid rgba(169,130,55,.5); padding: .9rem 1.1rem; color: var(--gold-bright); text-decoration: none; }
.partner-packet-download svg { width: 24px; height: 24px; }
.partner-packet-download span { display: grid; gap: .15rem; font-weight: 700; }
.partner-packet-download small { color: var(--muted); font-size: .6rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.document-library { display: grid; margin-top: 2rem; border: 1px solid rgba(169,130,55,.25); }
.document-library > div { min-height: 58px; display: grid; grid-template-columns: 145px 1fr auto; align-items: center; gap: 1rem; border-bottom: 1px solid rgba(169,130,55,.2); padding: .6rem .8rem; }
.document-library > div:last-child { border: 0; }
.document-library button, .document-library a { border: 0; background: transparent; color: var(--gold-bright); cursor: pointer; text-decoration: none; }
.document-library button:disabled { color: var(--muted); cursor: not-allowed; }
.document-tag { width: fit-content; padding: .25rem .45rem; border-radius: 2px; font-size: .58rem; text-transform: uppercase; }
.document-tag.keep { background: rgba(181,207,170,.12); color: var(--success); }
.document-tag.handled { background: rgba(217,182,106,.13); color: var(--gold-bright); }
.document-tag.reference { background: rgba(151,179,214,.12); color: #a9c8ee; }
.contact-layout { display: grid; grid-template-columns: repeat(2,minmax(0,420px)); gap: 1rem; margin-top: 2rem; }
.contact-layout > * { min-height: 170px; display: grid; align-content: center; gap: .65rem; border: 1px solid rgba(169,130,55,.3); padding: 1.25rem; }
.contact-layout svg { color: var(--gold-bright); }
.contact-layout span { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.appointment-dialog { width: min(560px,calc(100% - 2rem)); border: 1px solid rgba(169,130,55,.55); border-radius: 2px; padding: 0; background: #090806; color: var(--cream); }
.appointment-dialog::backdrop { background: rgba(0,0,0,.8); backdrop-filter: blur(5px); }
.appointment-dialog form { padding: 1.5rem; }
.appointment-record { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; border: 0; padding: 0; background: #070604; color: var(--cream); }
.appointment-record::backdrop { background: #070604; }
.appointment-record-page { min-height: 100%; display: flex; flex-direction: column; background: linear-gradient(90deg,rgba(169,130,55,.035),transparent 36%),#070604; }
.appointment-record-header { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(169,130,55,.3); padding: 0 clamp(1rem,4vw,4rem); }
.record-back, .record-close { border: 0; background: transparent; color: var(--cream); cursor: pointer; }
.record-back { width: fit-content; display: inline-flex; align-items: center; gap: .65rem; padding: .6rem 0; color: var(--muted); }
.record-back svg, .record-close svg { width: 18px; }
.record-brand { color: var(--gold-bright); font-size: .65rem; text-transform: uppercase; letter-spacing: .14em; }
.record-close { justify-self: end; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(169,130,55,.3); border-radius: 50%; }
.appointment-record-content { width: min(1180px,calc(100% - 3rem)); margin: 0 auto; padding: clamp(2.5rem,6vw,6rem) 0 3rem; }
.record-intro { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-bottom: clamp(2rem,4vw,3.5rem); }
.record-intro h2 { margin: .45rem 0 .8rem; font-family: var(--serif); font-size: clamp(3.4rem,8vw,7.5rem); line-height: .85; font-weight: 400; }
.record-reference { margin: 0; color: var(--gold-bright); font-family: monospace; font-size: .72rem; }
.record-date { max-width: 270px; display: grid; gap: .45rem; border-left: 1px solid rgba(169,130,55,.4); padding-left: 1.5rem; }
.record-date span { color: var(--muted); line-height: 1.5; }
.record-date strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 400; }
.record-status { display: flex; border-top: 1px solid rgba(169,130,55,.3); border-bottom: 1px solid rgba(169,130,55,.3); }
.record-status > div { flex: 1; min-height: 110px; display: grid; grid-template-columns: 34px 1fr; align-content: center; gap: .25rem .85rem; padding: 1.25rem; }
.record-status > div + div { border-left: 1px solid rgba(169,130,55,.25); }
.record-status svg { grid-row: 1 / 3; width: 24px; color: var(--gold-bright); stroke-width: 1.4; }
.record-status span { color: var(--muted); font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; }
.record-status strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; text-transform: capitalize; }
.record-section { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(0,1.6fr); gap: clamp(2rem,6vw,6rem); border-bottom: 1px solid rgba(169,130,55,.25); padding: clamp(2rem,5vw,4rem) 0; }
.record-section-title { display: flex; gap: 1rem; }
.record-section-title > span { color: var(--gold-bright); font-family: monospace; font-size: .65rem; }
.record-section-title h3 { margin: .3rem 0 0; font-family: var(--serif); font-size: 1.75rem; font-weight: 500; }
.record-list { margin: 0; }
.record-list > div { display: flex; justify-content: space-between; gap: 2rem; border-bottom: 1px solid rgba(169,130,55,.16); padding: .9rem 0; }
.record-list > div:first-child { padding-top: 0; }
.record-list dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.record-list dd { max-width: 65%; margin: 0; text-align: right; line-height: 1.5; overflow-wrap: anywhere; }
.record-list a { color: var(--cream); text-decoration-color: rgba(217,182,106,.55); text-underline-offset: 4px; }
.appointment-record-actions { position: sticky; bottom: 0; min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid rgba(169,130,55,.35); padding: 1rem clamp(1rem,4vw,4rem); background: rgba(7,6,4,.96); backdrop-filter: blur(16px); }
.appointment-record-actions p { margin: 0; color: var(--muted); }
.appointment-record-actions > div { display: flex; gap: .75rem; }
.danger-action { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid var(--error); border-radius: 2px; padding: .65rem 1rem; background: rgba(239,157,145,.06); color: var(--error); cursor: pointer; }
.danger-action svg { width: 18px; }
.workspace-status { position: sticky; top: 82px; z-index: 5; background: #090806; }
.cursor-ring { position: fixed; z-index: 100; width: 34px; height: 34px; border: 1px solid rgba(217,182,106,.75); border-radius: 50%; pointer-events: none; transform: translate(-50%,-50%); opacity: 0; transition: width .18s ease,height .18s ease,opacity .2s ease; }
.cursor-ring.is-visible { opacity: 1; }
.cursor-ring.is-active { width: 52px; height: 52px; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .workspace-sidebar { position: fixed; z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.45); }
  .workspace.is-menu-open .workspace-sidebar { transform: translateX(0); }
  .mobile-menu { display: grid; place-items: center; }
  .metric-grid, .quick-grid, .document-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-split, .admin-dashboard-split { grid-template-columns: 1fr; }
  .workspace-topbar > strong { display: none; }
}
@media (max-width: 680px) {
  .workspace-main { width: min(100% - 1.25rem,1320px); padding-top: 1.5rem; }
  .view-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .outline-action { width: 100%; }
  .metric-grid, .quick-grid, .document-grid, .contact-layout { grid-template-columns: 1fr; }
  .calendar-day { min-height: 66px; padding: .3rem; }
  .calendar-event { height: 8px; padding: 0; color: transparent; }
  .calendar-toolbar h2 { min-width: 0; flex: 1; font-size: 1.05rem; }
  .appointment-row, .appointment-list.compact .appointment-row { grid-template-columns: 88px 1fr auto; gap: .6rem; }
  .appointment-row > :nth-child(3), .appointment-row > :nth-child(4), .appointment-list.compact .appointment-row > :nth-child(4) { display: none; }
  .document-library > div { grid-template-columns: 1fr auto; }
  .document-library .document-tag { grid-column: 1 / -1; }
  .admin-layout { padding-top: 1.5rem; }
  .account-chip div { display: none; }
  .appointment-record-header { grid-template-columns: 1fr auto; }
  .record-brand { display: none; }
  .appointment-record-content { width: min(100% - 1.5rem,1180px); padding-top: 2.5rem; }
  .record-intro { align-items: start; flex-direction: column; }
  .record-date { max-width: none; }
  .record-status { flex-direction: column; }
  .record-status > div + div { border-left: 0; border-top: 1px solid rgba(169,130,55,.25); }
  .record-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .record-list > div { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .record-list dd { max-width: none; text-align: left; }
  .appointment-record-actions { align-items: stretch; flex-direction: column; gap: .75rem; }
  .appointment-record-actions > div { display: grid; grid-template-columns: 1fr; }
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor-ring { display: none; } }
