/* ===== Staff Dashboard — matches site design system (Cabinet Grotesk + Source Serif 4 + navy/burnt-orange) ===== */

.dash-body {
  background: var(--soft);
  font-family: 'Cabinet Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.dash-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.dash-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.dash-brand-logo { height: 40px; width: auto; }
.dash-brand strong {
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  display: block;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.dash-brand-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.dash-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex: 1;
  margin-left: 16px;
}
.dash-nav-link {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 6px 2px;
  transition: color .2s var(--ease);
}
.dash-nav-link:hover { color: var(--accent-ink); }
.dash-user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.dash-user-name { color: var(--muted); }
.dash-logout-form { margin: 0; }
.dash-link-btn {
  background: none;
  border: none;
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
.dash-link-btn:hover { text-decoration: underline; }

/* ===== MAIN ===== */
.dash-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* ===== MESSAGES ===== */
.dash-messages { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.dash-msg {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
}
.dash-msg-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.dash-msg-error,
.dash-msg-warning { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.dash-msg-info { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* ===== HERO / PAGE HEADER ===== */
.dash-hero {
  margin-bottom: 32px;
}
.dash-hero h1 {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(28px, 3.5vw, 40px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dash-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.dash-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dash-page-header h1 {
  font-family: 'Source Serif 4', serif;
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}
.dash-page-header p { margin: 0; color: var(--muted); font-size: 14px; }

/* ===== DASHBOARD GRID ===== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.dash-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-tint);
  border-color: var(--line-strong);
  text-decoration: none;
}
.dash-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.dash-card h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.dash-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.dash-card-meta {
  margin-top: auto;
  padding-top: 12px;
  font-size: 12.5px;
  color: var(--accent-ink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dash-card-pad {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

/* ===== TABLE ===== */
.dash-table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.dash-table th,
.dash-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.dash-table th {
  background: var(--soft);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.dash-table tbody tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: #fafafb; }
.dash-actions { white-space: nowrap; text-align: right; }
.dash-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  font-size: 13.5px;
  margin-left: 12px;
}
.dash-link:hover { color: var(--accent-ink); text-decoration: underline; }
.dash-link-danger { color: #b91c1c; }
.dash-link-danger:hover { color: #7f1d1d; }
.dash-empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.dash-empty a { color: var(--accent-ink); font-weight: 600; }

.dash-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.dash-pill-on { background: #ecfdf5; color: #065f46; }
.dash-pill-off { background: #f3f4f6; color: #4b5563; }
.dash-muted { color: var(--muted); }

/* ===== FORMS ===== */
.dash-form { max-width: 880px; }
.dash-field {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.dash-field-checkbox {
  display: flex;
  align-items: center;
}
.dash-field-rich { padding-top: 18px; }
.dash-label-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.dash-field-checkbox .dash-label-inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.dash-label-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-label .dash-input { margin-top: 8px; }
.dash-req { color: #dc2626; }
.dash-input,
.dash-textarea,
input.dash-input,
textarea.dash-input,
select.dash-input,
input[type="text"].dash-input,
input[type="email"].dash-input,
input[type="password"].dash-input,
input[type="number"].dash-input,
input[type="datetime-local"].dash-input,
input[type="file"].dash-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  box-sizing: border-box;
}
.dash-input:focus,
.dash-textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(35,43,105,.12);
}
.dash-textarea { font-family: inherit; line-height: 1.55; resize: vertical; }
.dash-help { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.dash-error { margin: 8px 0 0; font-size: 13px; color: #b91c1c; font-weight: 500; }

/* Style any text/select/textarea that Django renders without our class hint */
.dash-form input[type="text"],
.dash-form input[type="email"],
.dash-form input[type="password"],
.dash-form input[type="number"],
.dash-form input[type="url"],
.dash-form input[type="datetime-local"],
.dash-form select,
.dash-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  box-sizing: border-box;
}
.dash-form input[type="file"] {
  font-size: 14px;
  padding: 8px 0;
}
.dash-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }

/* ===== BUTTONS ===== */
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.dash-btn:active { transform: translateY(1px); }
.dash-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(154,52,18,.4) inset, 0 6px 16px -6px rgba(194,65,12,.45);
}
.dash-btn-primary:hover { background: var(--accent-ink); color: #fff; text-decoration: none; transform: translateY(-1px); }
.dash-btn-ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
}
.dash-btn-ghost:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.dash-btn-danger {
  background: #dc2626;
  color: #fff;
}
.dash-btn-danger:hover { background: #991b1b; color: #fff; text-decoration: none; transform: translateY(-1px); }

.dash-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  align-items: center;
}

/* ===== LOGIN PAGE ===== */
.dash-login-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.dash-login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 44px 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-tint-lg);
}
.dash-login-card h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.dash-login-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14.5px;
}
.dash-login-form { display: flex; flex-direction: column; gap: 18px; }
.dash-login-form .dash-btn { margin-top: 6px; justify-content: center; }
.dash-login-back {
  margin: 28px 0 0;
  text-align: center;
  font-size: 13.5px;
}
.dash-login-back a { color: var(--muted); text-decoration: none; }
.dash-login-back a:hover { color: var(--accent-ink); }

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
  .dash-header-inner { gap: 14px; padding: 12px 16px; }
  .dash-nav { gap: 14px; margin-left: 0; width: 100%; order: 3; overflow-x: auto; }
  .dash-user { width: 100%; justify-content: space-between; order: 2; }
  .dash-page-header { flex-direction: column; align-items: stretch; }
  .dash-table th, .dash-table td { padding: 10px 12px; font-size: 13px; }
  .dash-actions { text-align: left; }
}

/* ===== CONSULT HOT SHEETS (staff-only reference pages) ===== */
.hs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hs-head h1 { font-family: 'Cormorant Garamond', Georgia, serif; margin: 0 0 4px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.01em; }
.hs-sub { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.hs-head-actions { display: flex; gap: 10px; align-items: center; }

.hs-switch { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 13.5px; font-weight: 600; }
.hs-switch-link { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.hs-switch-link:hover { color: var(--accent-ink); border-color: var(--line-strong); }
.hs-switch-link.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.hs-switch-sep { color: var(--line-strong); }

.hs-grid { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
@media (min-width: 1040px) { .hs-grid { grid-template-columns: 1fr 320px; } .hs-side { position: sticky; top: 22px; } }
.hs-main, .hs-side { display: grid; gap: 18px; }
.hs-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.hs-panel--accent { border-left: 4px solid var(--accent); }
.hs-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hs-step-head h2 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; letter-spacing: -0.01em; }
.hs-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/30px 'Inter', sans-serif; text-align: center; }
.hs-lead { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.hs-legend { margin: -6px 0 14px; font-size: 13px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

.hs-q { display: flex; gap: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.hs-q + .hs-q { margin-top: 10px; }
.hs-qn { color: var(--accent-bright); font-weight: 700; font-size: 13px; flex: 0 0 auto; padding-top: 2px; }
.hs-qt { margin: 0; font-weight: 600; font-size: 15px; }
.hs-note { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.hs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.hs-card { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.hs-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.hs-card-badges { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.hs-card ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: #3C424B; line-height: 1.55; }
.hs-card li + li { margin-top: 3px; }
.hs-warn { margin: 8px 0 0; font-size: 13px; line-height: 1.55; background: #FEF6E7; border: 1px solid #E9D8AE; color: #7A5B0F; border-radius: 8px; padding: 8px 10px; }

.hs-pill { display: inline-block; font: 700 10.5px/1 'Inter', sans-serif; letter-spacing: .07em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.hs-pill--serious { background: #FBEAEA; color: #8E1B15; }
.hs-pill--major { background: #FDF0DF; color: #8A5A11; }
.hs-pill--minor { background: #E7F0E9; color: #24603A; }
.hs-pill--varies { background: #E8EEF6; color: #274468; }
.hs-pill--scope-ok { background: #E3F1E7; color: #1F5A34; }
.hs-pill--scope-no { background: #F8DEDC; color: #8E1B15; }
.hs-pill--notset { background: #FDF0DF; color: #8A5A11; }

.hs-block { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.6; }
.hs-block + .hs-block { margin-top: 10px; }
.hs-block p { margin: 0; }
.hs-block p + p { margin-top: 8px; }
.hs-block--key { background: var(--ivory-3); border-color: var(--line-strong); }
.hs-kicker { font: 700 11px/1.4 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 6px !important; }
.hs-ladder { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.65; }
.hs-ladder li + li { margin-top: 2px; }

.hs-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; font-size: 13.5px; line-height: 1.55; }
.hs-tri { border-radius: 12px; padding: 12px 14px; border: 1px solid; }
.hs-tri p { margin: 0; }
.hs-tri-h { font-weight: 700; margin-bottom: 4px !important; }
.hs-tri--do { background: #E7F0E9; border-color: #B9D6C2; color: #24603A; }
.hs-tri--dont { background: #FBEAEA; border-color: #E2B4B0; color: #7A1C16; }
.hs-tri--why { background: #E8EEF6; border-color: #C1D0E4; color: #274468; }

.hs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.hs-table th, .hs-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hs-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft); }
.hs-table tr:last-child td { border-bottom: none; }
.hs-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.hs-acc { border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.hs-acc + .hs-acc { margin-top: 8px; }
.hs-acc summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hs-acc summary::-webkit-details-marker { display: none; }
.hs-acc summary::after { content: "+"; color: var(--accent-bright); font-weight: 700; }
.hs-acc[open] summary::after { content: "\2212"; }
.hs-acc p { margin: 0; padding: 12px 16px 14px; font-size: 14px; line-height: 1.65; border-top: 1px solid var(--line); color: #3C424B; }
.hs-acc p + p { padding-top: 0; border-top: none; }

.hs-side-h { font: 700 11.5px/1 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.hs-fee-banner { background: #FEF6E7; border: 1px solid #E9D8AE; color: #7A5B0F; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.55; font-weight: 600; margin-bottom: 14px; }
.hs-fees { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hs-fees td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.hs-fees tr:last-child td { border-bottom: none; }
.hs-fees td:last-child { text-align: right; white-space: nowrap; }
.hs-remind { margin: 0; padding-left: 18px; font-size: 13.5px; color: #3C424B; line-height: 1.55; }
.hs-remind li + li { margin-top: 7px; }

@media print {
  .no-print, .dash-header { display: none !important; }
  .dash-body { background: #fff; }
  .dash-main { padding: 0; max-width: none; }
  .hs-grid { grid-template-columns: 1fr 260px; }
  .hs-panel { border-radius: 0; break-inside: avoid; }
  .hs-acc { break-inside: avoid; }
  .hs-acc:not([open]) p { display: block; }
}
