:root {
  color-scheme: dark;
  --bg: #101820;
  --panel: #17232d;
  --panel-raised: #1d2a35;
  --line: #31414d;
  --text: #f4f6f7;
  --muted: #b0bdc5;
  --gold: #f2c14e;
  --red: #c93c43;
  --green: #58c28b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 20% 0%, #24313a 0, transparent 48%), var(--bg); color: var(--text); min-height: 100vh; }
button, input { font: inherit; }
.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 92px; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand strong, .brand small { display: block; letter-spacing: .09em; }
.brand strong { font-size: .91rem; }
.brand small { margin-top: 5px; color: var(--gold); font-size: .7rem; font-weight: 800; }
.signed-in-controls { display: flex; align-items: center; gap: 14px; }
.user-badge, .role-badge, .access-pill { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--muted); font-size: .83rem; }
main { flex: 1; }
.login-layout { min-height: 650px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(40px, 8vw, 110px); padding: 72px 0; }
.welcome-panel { max-width: 550px; }
.eyebrow { color: var(--gold); font-size: .74rem; letter-spacing: .16em; font-weight: 800; margin: 0 0 14px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); letter-spacing: -.045em; line-height: 1.04; margin-bottom: 20px; }
.welcome-panel h1 span { color: var(--gold); }
.intro { color: var(--muted); font-size: 1.08rem; line-height: 1.65; max-width: 560px; }
.security-note { display: flex; gap: 13px; align-items: center; color: #d1d9de; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-width: 480px; margin-top: 32px; line-height: 1.5; }
.lock-icon { color: var(--gold); font-size: 1.2rem; }
.login-card { background: linear-gradient(160deg, #1e2a34, #151f28); border: 1px solid #3a4b57; box-shadow: 0 24px 60px rgba(0,0,0,.25); border-radius: 18px; padding: 34px; width: 100%; max-width: 430px; justify-self: end; }
.card-mark { width: 52px; height: 52px; margin-bottom: 18px; }
.card-mark img { width: 100%; height: 100%; object-fit: contain; }
.login-card h2 { font-size: 1.55rem; margin-bottom: 8px; }
.muted { color: var(--muted); margin-bottom: 26px; }
label { display: block; font-size: .93rem; font-weight: 700; margin: 18px 0 8px; }
input { display: block; width: 100%; border: 1px solid #445562; background: #0f171e; color: var(--text); border-radius: 9px; padding: 13px 14px; min-height: 48px; outline: none; }
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242,193,78,.15); }
.button { border: 0; cursor: pointer; border-radius: 9px; padding: 12px 16px; font-weight: 800; min-height: 44px; }
.button:disabled { opacity: .62; cursor: wait; }
.button-primary { width: 100%; color: #161b20; background: var(--gold); margin-top: 22px; }
.button-primary:hover { background: #ffd466; }
.button-quiet { color: var(--text); background: transparent; border: 1px solid var(--line); }
.button-quiet:hover { border-color: var(--gold); }
.text-button { display: block; color: var(--gold); border: 0; background: transparent; padding: 13px 0 0; cursor: pointer; font-size: .92rem; }
.text-button:hover { text-decoration: underline; }
.form-message { min-height: 24px; color: #ffcf8b; font-size: .9rem; line-height: 1.5; margin: 16px 0 0; }
.portal-view { padding: 58px 0 54px; }
.portal-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.portal-heading h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.portal-heading .intro { margin-bottom: 0; }
.role-badge { color: var(--gold); border-color: rgba(242,193,78,.42); font-weight: 800; }
.resource-section { margin-top: 34px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2 { font-size: 1.32rem; margin-bottom: 0; }
.access-pill { font-size: .76rem; padding: 6px 10px; }
.access-pill-gold { border-color: rgba(242,193,78,.45); color: var(--gold); }
.access-pill-red { border-color: rgba(201,60,67,.5); color: #ff9da1; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.resource-card { display: flex; gap: 17px; min-height: 150px; padding: 23px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.resource-card-wide { max-width: 760px; }
.resource-link { transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.resource-link:hover { border-color: var(--gold); background: var(--panel-raised); transform: translateY(-2px); }
.resource-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; display: grid; place-items: center; color: var(--gold); background: rgba(242,193,78,.1); font-size: 1.3rem; }
.resource-copy h3 { font-size: 1.05rem; margin: 2px 0 8px; }
.resource-copy p { font-size: .94rem; line-height: 1.55; color: var(--muted); margin-bottom: 10px; }
.resource-status { display: flex; gap: 8px; align-items: center; font-size: .82rem !important; margin: 12px 0 0 !important; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.card-action { color: var(--gold); font-size: .9rem; font-weight: 800; }
.portal-footer { color: var(--muted); margin: 38px 0 0; font-size: .88rem; }
footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0 28px; color: #8fa0ab; font-size: .83rem; }
.hidden { display: none !important; }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 28px, 560px); }
  .site-header { min-height: 76px; }
  .brand img { width: 43px; height: 43px; }
  .brand strong { font-size: .75rem; }
  .brand small { font-size: .65rem; }
  .user-badge { display: none; }
  .login-layout { grid-template-columns: 1fr; gap: 30px; padding: 42px 0; min-height: unset; }
  .welcome-panel h1 { font-size: 2.65rem; }
  .welcome-panel .intro { font-size: 1rem; }
  .login-card { justify-self: stretch; max-width: none; padding: 25px; }
  .portal-view { padding: 38px 0; }
  .portal-heading { align-items: flex-start; flex-direction: column; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { padding: 18px; }
  .section-heading { align-items: flex-start; }
  footer { flex-direction: column; font-size: .78rem; }
}

.rental-panel { margin-bottom: 18px; padding: clamp(14px, 3vw, 24px); border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.rental-panel select, .rental-panel textarea { width: 100%; border: 1px solid #445562; background: #0f171e; color: var(--text); border-radius: 9px; padding: 12px; font: inherit; }
.rental-panel .button-primary { width: auto; }
.rental-panel .form-message { margin-bottom: 16px; }
.rental-list { list-style: none; padding: 0; margin: 0; }
.rental-list li { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rental-list p { margin: 4px 0 0; color: var(--muted); }
.rental-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.calendar-nav h4 { margin: 0; text-align: center; }
.availability-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: .85rem; }
.availability-days div { padding: 8px 0; border: 1px solid var(--line); border-radius: 6px; }
.availability-days small { display: block; font-size: clamp(.58rem, 2.5vw, .78rem); }
.availability-open { color: #a3e5bd; background: #173529; }
.availability-taken { color: #ffd6aa; background: #473125; }

.calendar-nav h2 { margin: 0; text-align: center; font-size: clamp(1rem, 4vw, 1.5rem); }
.availability-days a { display: block; padding: 8px 0; border: 1px solid #438563; border-radius: 6px; text-decoration: none; font-weight: 700; }
.availability-days a:hover, .availability-days a:focus-visible { background: #256344; outline: 2px solid #a3e5bd; outline-offset: 1px; }
.availability-taken { color: #ffb9bd; background: #54252e; }
