/* ValiBench sage and mint theme */
:root {
  --deep: #2F5E4F;
  --ink: #17241F;
  --sage: #3E7563;
  --pastel: #BFDCCB;
  --mint: #E6F4EC;
  --accent: #5B3FD1;
  --ground: #F2F7F3;
  --muted: #56635C;
  --line: #DCE5DF;
  --pass: #178A3A;
  --pass-bg: #DDF6DF;
  --warn: #8A4B00;
  --warn-bg: #FFF0D1;
  --fail: #A3261B;
  --fail-bg: #FDF1F0;
  --radius: 14px;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--sage); }
button, input, select, textarea { font: inherit; color: inherit; }

.shell { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: none; background: var(--deep); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; padding: 0 8px 16px; }
.brand img { width: 34px; height: 34px; }
.nav a { display: block; padding: 10px 12px; border-radius: 10px; color: #E6F4EC; text-decoration: none; font-weight: 600; }
.nav a:hover { background: rgba(255,255,255,0.08); }
.nav a.on { background: var(--pastel); color: var(--ink); }
.sidebar .who { margin-top: auto; font-size: 13px; color: #C9DDD1; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,0.14); }
.main { flex: 1; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.top .sub { color: var(--muted); font-size: 14px; }
.page { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 16px; max-width: 1280px; }

.card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(23,36,31,0.06), 0 10px 24px -14px rgba(23,36,31,0.25); display: flex; flex-direction: column; gap: 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); align-items: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); font-size: 14px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--ground); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 26px; }

.btn { min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid #92A097; background: #fff; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.danger { color: var(--fail); border-color: #EBBDB8; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { font-weight: 400; min-height: 44px; padding: 8px 12px; border: 1px solid #92A097; border-radius: 12px; background: #F6FAF7; }
.field textarea { min-height: 90px; resize: vertical; }
.error { color: var(--fail); font-size: 14px; }
.ok { color: var(--pass); font-size: 14px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--mint); color: var(--deep); }
.badge.passed, .badge.green, .badge.meets { background: var(--pass-bg); color: #116B2B; }
.badge.concern, .badge.amber { background: var(--warn-bg); color: var(--warn); }
.badge.failed, .badge.red, .badge.gap, .badge.critical { background: var(--fail-bg); color: var(--fail); }
.badge.na { background: #E6EBE7; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { text-align: left; border: 2px solid transparent; background: #fff; border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 2px rgba(23,36,31,0.06); }
.item.on { border-color: var(--sage); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid #92A097; background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.tab.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.choice { border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; text-align: left; cursor: pointer; font-weight: 600; }
.choice.on { border-color: var(--sage); background: var(--mint); }
.bar { height: 8px; border-radius: 4px; background: #E3EBE5; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--sage); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.notice { border-radius: 12px; padding: 12px 14px; background: var(--warn-bg); color: #3D2600; }
.notice.red { background: var(--fail-bg); color: #5C130E; }
.notice.green { background: var(--pass-bg); color: #0F4D24; }

.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--deep); }
.center .card { width: min(420px, 100%); }
.redact { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; }
.redact canvas { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
}

/* Search */
.search { position: relative; flex: 1 1 360px; min-width: 200px; }
.search input { width: 100%; min-height: 42px; padding: 0 14px; border: 1px solid #92A097; border-radius: 12px; background: var(--ground); }
.search input:focus { outline: 2px solid var(--sage); outline-offset: 1px; background: #fff; }
.search-results { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: min(520px, 90vw); max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(23,36,31,0.45); padding: 6px; }
.search-group { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 10px 4px; }
.search-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.search-item.on { background: var(--mint); }
.search-item:disabled { cursor: default; opacity: 0.7; }
.flash { outline: 3px solid var(--sage); outline-offset: 3px; transition: outline-color 0.3s; }
@media (max-width: 820px) { .top { flex-wrap: wrap; } .search { flex-basis: 100%; } }

/* Gear menu at the top right: your profile, Settings (administrators), Sign out */
.top-right { display: flex; align-items: center; gap: 12px; flex: 0 1 520px; justify-content: flex-end; min-width: 0; }
.gear-menu { position: relative; flex: none; }
.gear-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--mint); color: var(--deep); display: grid; place-items: center; cursor: pointer; }
.gear-btn:hover { background: var(--pastel); }
.gear-btn.on { background: var(--deep); color: #fff; }
.gear-btn:focus-visible, .menu-item:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 280px; max-width: 86vw; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(23,36,31,0.45); padding: 6px; display: flex; flex-direction: column; }
.menu-who { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; line-height: 1.35; }
.menu .avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--pastel); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.menu-label { padding: 10px 10px 4px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.menu-item { display: block; width: 100%; text-align: left; min-height: 40px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-decoration: none; font-size: 15px; cursor: pointer; }
.menu-item:hover { background: var(--ground); }
.menu-item.on { background: var(--mint); font-weight: 700; }
.menu-item.danger { color: var(--fail); font-weight: 600; }
a.tab { color: var(--ink); }
a.tab.on { color: #fff; }
@media (max-width: 820px) { .top-right { flex-basis: 100%; } }

/* Suite, calendar, cycle path and documents */
.group-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted, #56635C); margin: 18px 0 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { text-align: left; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #DCE5DF; border-top: 6px solid; border-radius: 14px; padding: 12px 14px; font: inherit; cursor: pointer; }
.tile.on { outline: 2px solid var(--deep, #2F5E4F); }
.swatches { display: flex; gap: 4px; margin-top: 6px; } .swatches i { flex: 1; height: 8px; border-radius: 4px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .dow { font-size: 12px; font-weight: 600; color: #56635C; padding: 2px 4px; }
.month .cell { min-height: 72px; border: 1px solid #E3EBE5; border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.pill { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.agenda { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; } .agenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.path { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.path li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 16px; border: 2px solid #E3EBE5; font-size: 13px; font-weight: 600; color: #56635C; }
.path li span { width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: #E3EBE5; font-size: 12px; }
.path li.done { background: #E6F4EC; color: #1F3B33; border-color: #E6F4EC; } .path li.done span { background: #3E7563; color: #fff; }
.path li.current { border-color: #2F5E4F; color: #17241F; } .path li.current span { background: #2F5E4F; color: #fff; }
.log { font-size: 13px; padding-left: 18px; margin: 0; }
.docs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.docs li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #F6FAF7; border: 1px solid #DCE5DF; border-radius: 10px; padding: 6px 10px; }
.ok-notice { background: #DDF6DF; color: #0F4D24; }
.cycle-pick { display: flex; flex-direction: column; font-size: 12px; } .cycle-pick select { min-height: 40px; }
label.btn { position: relative; }

/* Cycle status: green, orange, red. Always shown with its word, never color alone. */
.health { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.health i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.health.green { background: var(--pass-bg); color: var(--pass); }
.health.orange { background: #FFE8CC; color: #8A4100; }
.health.red { background: var(--fail-bg); color: var(--fail); }
.health-note { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.health-note.green { background: var(--pass-bg); }
.health-note.orange { background: #FFE8CC; }
.health-note.red { background: var(--fail-bg); }
