:root {
  --brand: #01ae81;
  --brand-solid: #017a5c;
  --brand-muted: #0d7a5f;
  --brand-tint: rgba(1, 174, 129, 0.12);
  --bg: #f3f5f4;
  --panel: #ffffff;
  --muted: #e8ecea;
  --subtle: #dfe5e2;
  --fg: #1f2a26;
  --fg-muted: #4b5853;
  --fg-subtle: #5c6862;
  --fg-faint: #94a19b;
  --border: #cfd8d3;
  --border-soft: #e3e9e6;
  --danger: #b4321f;
  --danger-soft: #fdecea;
  --amber: #b45309;
  --amber-soft: #fff4e2;
  --shadow-sm: 0 1px 2px rgba(31, 42, 38, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 42, 38, 0.08);
  --shadow-lg: 0 20px 50px rgba(31, 42, 38, 0.18);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.4;
  background:
    radial-gradient(1200px 500px at 0% -10%, rgba(1, 174, 129, 0.10), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(98, 98, 98, 0.06), transparent 50%),
    var(--bg);
  min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* Concept ribbon */
.ribbon {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 20px; background: #12201b; color: #d6e6df; font-size: 12.5px;
}
.ribbon strong { color: #fff; font-weight: 600; }
.ribbon .sep { opacity: .35; }
.ribbon nav { margin-left: auto; display: flex; gap: 4px; }
.ribbon nav a { text-decoration: none; padding: 3px 10px; border-radius: 999px; color: #b9cfc6; white-space: nowrap; }
.ribbon nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.ribbon nav a.on { background: var(--brand); color: #04221a; font-weight: 600; }

/* App header (mirrors the live PMS chrome) */
.app { max-width: 1320px; margin: 0 auto; padding: 18px 24px 80px; }
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.brand { display: flex; flex-direction: column; gap: 6px; }
.logo { display: flex; align-items: center; gap: 6px; color: var(--brand-muted); font-size: 10px; letter-spacing: .02em; }
.page-title { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.page-desc { margin: 4px 0 0; color: var(--fg-subtle); font-size: 13.5px; max-width: 640px; }
.nav-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-pills span {
  border: 1px solid var(--border); background: var(--panel); border-radius: 10px;
  padding: 7px 13px; font-size: 13px; color: var(--fg-muted); box-shadow: var(--shadow-sm);
}
.nav-pills span.on { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }

/* Avatars */
.av {
  width: 24px; height: 24px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 600; color: #fff; flex: none;
}
.av.xs { width: 18px; height: 18px; font-size: 8.5px; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -5px; box-shadow: 0 0 0 2px var(--panel); }

/* Client tag */
.cdot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: none; }
.ctag { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); padding: 7px 12px; font-size: 13px; font-weight: 500; color: var(--fg-muted); white-space: nowrap; }
.btn:hover { background: #f7f9f8; color: var(--fg); }
.btn.primary { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
.btn.primary:hover { background: var(--brand-muted); }
.btn.soft { background: var(--brand-tint); border-color: transparent; color: var(--brand-muted); }
.btn.soft:hover { background: rgba(1,174,129,.2); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--muted); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0; background: none; color: var(--fg-subtle); }
.icon-btn:hover { background: var(--muted); color: var(--fg); }

/* Inputs */
.search { border: 1px solid var(--border); background: var(--panel); border-radius: 10px; padding: 7px 11px; font-size: 13px; outline: none; width: 100%; }
.search:focus { border-color: var(--brand-muted); box-shadow: 0 0 0 3px var(--brand-tint); }

/* Segmented control */
.seg { display: inline-flex; background: var(--muted); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 5px 12px; font-size: 12.5px; color: var(--fg-subtle); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--panel); color: var(--fg); box-shadow: var(--shadow-sm); }
.seg .n { font-size: 11px; color: var(--fg-faint); font-weight: 600; }
.seg button.on .n { color: var(--brand-muted); }

/* Period chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 0; background: var(--muted); border-radius: 999px; padding: 4px 11px; font-size: 12px; color: var(--fg-muted); font-weight: 500; }
.chip.on { background: var(--brand-solid); color: #fff; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 500; white-space: nowrap; line-height: 18px; }
.s-ns { background: var(--muted); color: var(--fg-subtle); }
.s-wk { background: #fff1d6; color: #9a5b00; }
.s-st { background: var(--danger-soft); color: var(--danger); }
.s-dn { background: #dcf5ec; color: #0b6b51; }
.s-ar { background: #eceff1; color: #5f6b72; }

.due { font-size: 12.5px; color: var(--fg-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.late { color: var(--danger); font-weight: 600; }
.due.today { color: var(--amber); font-weight: 600; }

/* Menu */
.menu { position: absolute; z-index: 40; background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-md); padding: 5px; min-width: 200px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; background: none; border-radius: 8px; padding: 8px 10px; font-size: 13px; text-align: left; color: var(--fg); }
.menu button:hover { background: var(--muted); }
.menu button.red { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--border-soft); margin: 4px 2px; }
.menu .hint { font-size: 11.5px; color: var(--fg-faint); margin-left: auto; }

/* Dialog */
.scrim { position: fixed; inset: 0; background: rgba(18, 32, 27, .38); z-index: 80; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(460px, 100%); padding: 20px; }
.dialog h3 { margin: 0 0 6px; font-size: 17px; }
.dialog p { margin: 0 0 12px; color: var(--fg-muted); font-size: 13.5px; }
.dialog ul { margin: 0 0 14px; padding-left: 18px; color: var(--fg-muted); font-size: 13px; }
.dialog ul li { margin: 3px 0; }
.dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); border: 1px solid #f3dfbd; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #6b3d06; }
.check-row input { margin-top: 2px; accent-color: var(--brand-solid); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: #12201b; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13px;
  display: flex; gap: 14px; align-items: center; transition: .2s; box-shadow: var(--shadow-md); z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast button { background: none; border: 0; color: #34c4a0; font-weight: 600; padding: 0; }

.callouts { margin: 30px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.callouts div { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; font-size: 13px; color: var(--fg-muted); }
.callouts .n + b { display: block; color: var(--fg); margin-bottom: 4px; font-size: 13.5px; }
.callouts .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-muted); font-size: 11px; font-weight: 700; margin-right: 6px; }

@media (max-width: 760px) {
  .ribbon { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .ribbon .hide-sm { display: none; }
  .ribbon nav { margin-left: 0; }
  .app { padding: 14px 14px 60px; }
  .nav-pills { display: none; }
  .page-title { font-size: 23px; }
  .page-desc { display: none; }
}
