:root {
  --fdr-ink: #0d1b22;
  --fdr-navy: #16313a;
  --fdr-navy-2: #214650;
  --fdr-teal: #4f7778;
  --fdr-teal-dark: #365e61;
  --fdr-teal-soft: #e1ebe8;
  --fdr-ivory: #f6f6f2;
  --fdr-paper: #fbfbf8;
  --fdr-sand: #ebe7df;
  --fdr-line: #d8dedb;
  --fdr-muted: #667477;
  --fdr-success: #55776d;
  --fdr-success-soft: #e4ece8;
  --fdr-warning: #9a744b;
  --fdr-warning-soft: #f2eadf;
  --fdr-danger: #8a5757;
  --fdr-danger-soft: #f2e5e5;
  --fdr-shadow: 0 18px 50px rgba(13, 27, 34, .06);
  --fdr-shadow-soft: 0 8px 24px rgba(13, 27, 34, .045);
}

html { background: var(--fdr-ivory); }
body {
  background:
    radial-gradient(circle at 84% 0%, rgba(79, 119, 120, .07), transparent 24rem),
    var(--fdr-ivory) !important;
  color: var(--fdr-ink) !important;
  font-family: "Avenir Next", Avenir, "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -.006em;
}

::selection { background: rgba(79, 119, 120, .22); color: var(--fdr-ink); }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(79, 119, 120, .28);
  outline-offset: 2px;
}

/* Brand shell */
.fdr-shell { min-height: 100vh; }
.fdr-sidebar {
  background: rgba(251, 251, 248, .96) !important;
  border-color: var(--fdr-line) !important;
  box-shadow: 12px 0 40px rgba(13, 27, 34, .025);
}
.fdr-brand-lockup { display:flex; align-items:center; gap:.8rem; min-width:0; }
.fdr-brandmark {
  display:grid; place-items:center; width:2.75rem; height:2.75rem; flex:0 0 auto;
  border-radius: 1rem; color:#fff; font-size:.7rem; font-weight:900; letter-spacing:.08em;
  background: linear-gradient(145deg, var(--fdr-navy), var(--fdr-teal-dark));
  box-shadow: 0 10px 24px rgba(22,49,58,.18), inset 0 1px 0 rgba(255,255,255,.16);
}
.fdr-wordmark { font-size:1rem; font-weight:900; letter-spacing:.08em; color:var(--fdr-ink); }
.fdr-descriptor { margin-top:.1rem; font-size:.68rem; color:var(--fdr-muted); letter-spacing:.02em; }
.fdr-nav-section {
  color:#889295 !important; font-size:.62rem !important; font-weight:800 !important;
  letter-spacing:.19em !important; text-transform:uppercase;
}
.fdr-nav-item {
  position:relative; border-radius:.85rem !important; color:#536164 !important;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.fdr-nav-item:hover { background:#eef1ee !important; color:var(--fdr-ink) !important; transform:translateX(1px); }
.fdr-nav-item.is-active { background:var(--fdr-teal-soft) !important; color:var(--fdr-navy) !important; font-weight:850 !important; }
.fdr-nav-item.is-active::before {
  content:""; position:absolute; left:.45rem; top:50%; width:.25rem; height:1.1rem;
  border-radius:99px; background:var(--fdr-teal-dark); transform:translateY(-50%);
}
.fdr-topbar {
  background: rgba(246,246,242,.86) !important; border-color:var(--fdr-line) !important;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.fdr-topbar-title { color:var(--fdr-ink); letter-spacing:-.025em; }
.fdr-org-label { color:var(--fdr-muted) !important; letter-spacing:.02em; }
.fdr-content { max-width: 1520px; margin-inline:auto; }

/* Typography */
.fdr-eyebrow {
  color:var(--fdr-teal-dark); font-size:.68rem; font-weight:900; letter-spacing:.18em; text-transform:uppercase;
}
.fdr-display { color:var(--fdr-ink); letter-spacing:-.045em; line-height:1.02; }
.fdr-lead { color:var(--fdr-muted); line-height:1.65; }
.fdr-section-title { color:var(--fdr-ink); letter-spacing:-.03em; }

/* Surfaces */
.fdr-card {
  background:rgba(251,251,248,.94); border:1px solid var(--fdr-line); border-radius:1.4rem;
  box-shadow:var(--fdr-shadow-soft);
}
.fdr-card-interactive { transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.fdr-card-interactive:hover { border-color:#bccbc7; transform:translateY(-1px); box-shadow:var(--fdr-shadow); }
.fdr-panel-dark {
  background:linear-gradient(145deg, #10262f, #1d4149); color:white; border-radius:1.65rem;
  box-shadow:0 22px 54px rgba(13,27,34,.15);
}
.fdr-hero {
  position:relative; overflow:hidden; border-radius:1.8rem; color:#fff;
  background:linear-gradient(125deg, #102730 0%, #1b4249 60%, #557879 135%);
  box-shadow:0 26px 60px rgba(13,27,34,.16);
}
.fdr-hero::after {
  content:""; position:absolute; width:22rem; height:22rem; right:-9rem; top:-12rem; border-radius:50%;
  border:1px solid rgba(255,255,255,.11); box-shadow:0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.018);
  pointer-events:none;
}
.fdr-metric-value { color:var(--fdr-navy); letter-spacing:-.05em; }
.fdr-muted { color:var(--fdr-muted); }

/* Buttons */
.fdr-btn-primary {
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem;
  border-radius:.9rem; background:var(--fdr-navy); color:#fff !important; font-weight:850;
  box-shadow:0 8px 18px rgba(22,49,58,.13); transition:.18s ease;
}
.fdr-btn-primary:hover { background:#0e2831; transform:translateY(-1px); }
.fdr-btn-secondary {
  display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--fdr-line);
  border-radius:.9rem; background:rgba(251,251,248,.9); color:var(--fdr-navy) !important; font-weight:850; transition:.18s ease;
}
.fdr-btn-secondary:hover { border-color:#bcc9c5; background:#fff; }

/* Form controls */
.field input,.field select,.field textarea,
.fdr-input, input[type="date"], input[type="time"] {
  border-color:#cfd6d3 !important; background:#fff !important; color:var(--fdr-ink) !important;
  box-shadow: inset 0 1px 1px rgba(13,27,34,.02);
}
.field input:focus,.field select:focus,.field textarea:focus,
.fdr-input:focus, input[type="date"]:focus, input[type="time"]:focus {
  border-color:var(--fdr-teal) !important; box-shadow:0 0 0 3px rgba(79,119,120,.11) !important; outline:none;
}

/* Quiet remap of legacy Tailwind accents: makes old screens feel like the same product. */
.bg-blue-600 { background-color:var(--fdr-navy) !important; }
.bg-blue-500 { background-color:var(--fdr-navy-2) !important; }
.bg-blue-100 { background-color:var(--fdr-teal-soft) !important; }
.bg-blue-50 { background-color:#eef3f1 !important; }
.text-blue-700,.text-blue-600 { color:var(--fdr-teal-dark) !important; }
.border-blue-100,.border-blue-200 { border-color:#cddbd7 !important; }
.hover\:bg-blue-50:hover { background-color:#edf3f1 !important; }
.hover\:bg-blue-700:hover { background-color:#102a33 !important; }
.hover\:border-blue-200:hover { border-color:#b9cbc6 !important; }

.bg-cyan-50 { background-color:#edf3f1 !important; }
.bg-cyan-100 { background-color:#e1ebe8 !important; }
.text-cyan-700 { color:var(--fdr-teal-dark) !important; }
.border-cyan-200 { border-color:#c9dad5 !important; }

.bg-emerald-50,.bg-emerald-100 { background-color:var(--fdr-success-soft) !important; }
.text-emerald-600,.text-emerald-700,.text-emerald-800 { color:var(--fdr-success) !important; }
.border-emerald-200 { border-color:#cad8d3 !important; }
.bg-emerald-600 { background-color:var(--fdr-success) !important; }

.bg-amber-50,.bg-amber-100 { background-color:var(--fdr-warning-soft) !important; }
.text-amber-600,.text-amber-700,.text-amber-800 { color:var(--fdr-warning) !important; }
.border-amber-200 { border-color:#e4d7c6 !important; }

.bg-rose-50,.bg-rose-100 { background-color:var(--fdr-danger-soft) !important; }
.text-rose-700 { color:var(--fdr-danger) !important; }
.border-rose-200 { border-color:#e2caca !important; }

.bg-slate-50 { background-color:var(--fdr-ivory) !important; }
.bg-slate-100 { background-color:#eef0ed !important; }
.bg-slate-900,.bg-slate-950 { background-color:var(--fdr-ink) !important; }
.text-slate-950 { color:var(--fdr-ink) !important; }
.text-slate-500,.text-slate-600 { color:var(--fdr-muted) !important; }
.border-slate-200,.border-slate-300 { border-color:var(--fdr-line) !important; }

/* Replace loud old gradients with the clinical mineral gradient. */
.bg-gradient-to-br.from-blue-600.to-cyan-500,
.from-blue-600.to-cyan-500 {
  background-image:linear-gradient(125deg, #102730 0%, #1b4249 60%, #557879 135%) !important;
}

/* Tables and status surfaces */
table { border-collapse:separate; border-spacing:0; }
thead { color:#788487; }
tbody tr { transition:background .15s ease; }
tbody tr:hover { background:rgba(225,235,232,.38); }

@media (max-width: 1023px) {
  .fdr-sidebar { box-shadow:none; }
  .fdr-content { max-width:none; }
}

@media print {
  body { background:#fff !important; }
  .fdr-card,.fdr-hero,.fdr-panel-dark { box-shadow:none !important; }
}


/* FDR BOX calendar */
.fdr-calendar-nav-button {
  display:inline-flex; min-width:2.55rem; height:2.55rem; align-items:center; justify-content:center;
  border:1px solid var(--fdr-line); border-radius:.8rem; background:#fff; color:var(--fdr-navy);
  font-size:.78rem; font-weight:900; transition:.16s ease;
}
.fdr-calendar-nav-button:hover { border-color:#b8c9c5; background:var(--fdr-teal-soft); }
.fdr-view-tab {
  min-height:2.15rem; padding:0 .8rem; border-radius:.65rem; color:var(--fdr-muted);
  font-size:.72rem; font-weight:900; transition:.16s ease;
}
.fdr-view-tab:hover { color:var(--fdr-navy); background:#f0f2ef; }
.fdr-view-tab.is-active { background:var(--fdr-navy); color:#fff; }
.fdr-calendar-legend { display:inline-flex; align-items:center; gap:.42rem; }
.fdr-calendar-legend i { width:.62rem; height:.62rem; border-radius:999px; display:inline-block; border:1px solid rgba(13,27,34,.08); }
.fdr-calendar-legend .is-free { background:#e7f1ec; }
.fdr-calendar-legend .is-reserved { background:#dce8ef; }
.fdr-calendar-legend .is-paid { background:#dcece7; }
.fdr-calendar-legend .is-pending { background:#f2eadf; }
.fdr-calendar-legend .is-blocked { background:#f2e5e5; }

.fdr-box-board { display:grid; min-width:max-content; background:#fff; }
.fdr-box-board-corner,
.fdr-box-board-header {
  position:sticky; top:0; z-index:4; min-height:4.65rem; padding:1rem;
  border-bottom:1px solid var(--fdr-line); background:rgba(251,251,248,.98);
}
.fdr-box-board-corner {
  left:0; z-index:5; display:flex; align-items:flex-end; justify-content:center;
  color:var(--fdr-muted); font-size:.65rem; font-weight:900; text-transform:uppercase; letter-spacing:.12em;
  border-right:1px solid var(--fdr-line);
}
.fdr-box-board-header { border-right:1px solid var(--fdr-line); }
.fdr-time-rail {
  position:relative; height:720px; border-right:1px solid var(--fdr-line);
  background:linear-gradient(to bottom, rgba(246,246,242,.9), rgba(251,251,248,.9));
}
.fdr-time-rail span {
  position:absolute; left:0; width:100%; transform:translateY(-50%);
  padding-right:.65rem; text-align:right; color:#899396; font-size:.62rem; font-weight:800;
}
.fdr-space-lane {
  position:relative; height:720px; min-width:210px; border-right:1px solid var(--fdr-line);
  background-color:#fbfbf8;
  background-image:repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(8.333333% - 1px),
    rgba(216,222,219,.72) calc(8.333333% - 1px),
    rgba(216,222,219,.72) 8.333333%
  );
}
.fdr-space-lane::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image:repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(4.166666% - 1px),
    rgba(216,222,219,.26) calc(4.166666% - 1px),
    rgba(216,222,219,.26) 4.166666%
  );
}
.fdr-lane-free-state {
  position:absolute; inset:.7rem; display:flex; align-items:flex-start; justify-content:flex-end;
  pointer-events:none;
}
.fdr-lane-free-state span {
  border-radius:999px; padding:.28rem .55rem; background:#e7f1ec; color:var(--fdr-success);
  font-size:.58rem; font-weight:900; text-transform:uppercase; letter-spacing:.08em;
}
.fdr-calendar-event {
  position:absolute; z-index:2; left:.45rem; right:.45rem; overflow:hidden;
  min-height:2.2rem; border:1px solid transparent; border-radius:.78rem; padding:.45rem .55rem;
  box-shadow:0 5px 14px rgba(13,27,34,.07); color:var(--fdr-ink);
  transition:transform .14s ease, box-shadow .14s ease;
}
a.fdr-calendar-event:hover { z-index:3; transform:translateY(-1px); box-shadow:0 9px 22px rgba(13,27,34,.11); }
.fdr-calendar-event strong,
.fdr-calendar-event small,
.fdr-calendar-event-time { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fdr-calendar-event strong { margin-top:.1rem; font-size:.74rem; line-height:1.15; }
.fdr-calendar-event small { margin-top:.18rem; font-size:.59rem; line-height:1.2; opacity:.72; }
.fdr-calendar-event-time { font-size:.57rem; font-weight:900; letter-spacing:.02em; opacity:.76; }
.fdr-calendar-event.is-reserved { background:#dce8ef; border-color:#bed1dc; }
.fdr-calendar-event.is-paid { background:#dcece7; border-color:#bdd7cf; }
.fdr-calendar-event.is-pending { background:var(--fdr-warning-soft); border-color:#e1cfb7; }
.fdr-calendar-event.is-blocked { background:var(--fdr-danger-soft); border-color:#dfc5c5; color:#714747; }

@media (max-width: 767px) {
  .fdr-box-board-corner,.fdr-box-board-header { min-height:4.25rem; }
  .fdr-time-rail,.fdr-space-lane { height:660px; }
}
