:root {
  --vip-ink: #162728;
  --vip-accent: #176050;
  --vip-deep: #102627;
  --vip-border: #cddbd6;
  --vip-surface: #f8faf8;
}
body .workspace { background: #edf2ee; }
body .workspace > main { max-width: 1580px; margin-inline: auto; }
html body header.sidebar {
  position: sticky; inset: 0 auto auto; z-index: 40;
  display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center; gap: 12px !important; background: #373a45;
  min-height: 0 !important; padding: calc(8px + env(safe-area-inset-top)) 14px 8px !important;
  box-shadow: 0 1px 0 #ffffff22, 0 3px 12px #19232a26;
}
header.sidebar .vip-brand {
  color: #fff; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.1;
  font-weight: 800; letter-spacing: -.025em;
}
header.sidebar .brand-tools { display: none !important; }
header.sidebar #spv-top-controls {
  grid-column: 2; grid-row: 1; width: auto !important; min-width: 0;
  grid-template-columns: repeat(3, minmax(100px, auto)); gap: 7px !important;
}
header.sidebar #spv-top-controls :is(.spv-top-button, .spv-save-indicator) {
  min-height: 44px !important; padding: 6px !important; font-size: 13px !important;
  border-radius: 9px !important;
}
header.sidebar #spv-save-indicator.spv-explainable-save::after { content: none; }
header.sidebar #spv-save-indicator[data-state="Ready · not synced"] {
  background: #cde5d8; border-color: #a1c4af; color: #204438;
}
header.sidebar #spv-db-menu { left: auto; right: 0; }
@media (max-width: 620px) {
  html body header.sidebar {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px 8px !important; padding-inline: 12px !important;
  }
    header.sidebar #spv-top-controls {
    grid-column: 1 / -1; grid-row: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  header.sidebar #spv-db-menu {
    left: 50%; right: auto; transform: translateX(-50%);
  }
  header.sidebar .spv-drop { width: min(260px, calc(100vw - 24px)); min-width: 0; }
}
body .workspace > main .metric, body .workspace > main .planner-panel {
  border-color: var(--vip-border);
}
body .workspace > main .metric { background: var(--vip-surface); }
body .workspace > main .metric.featured { background: #e0f0e6; }
body .workspace > main .metric.featured strong { color: #195842; }
body .workspace > main .planner-panel { border-radius: 16px; }
html body #spv-demo-login {
  background: radial-gradient(ellipse at 50% 20%, #25504a, #102627 68%) !important;
}
html body #spv-demo-login .spv-login-card {
  background: #183332 !important; border-color: #65877d !important; border-radius: 22px;
}
html body #spv-demo-login .spv-role-card {
  background: #21443e !important; border-color: #708f84 !important;
}
html body #spv-demo-login .spv-role-emblem { background: #102827 !important; }
html body #voice-plan, html body #vip-check-plan, #modal .voice-plan-controls .voice-plan-send {
  background: #176050; border-color: #176050; color: white;
}
#modal .voice-plan-composer { border-color: #9bb9ae; }
.vip-dock { display: none; }
.vip-panel > input {
  width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #92aba2;
  border-radius: 10px; margin: 8px 0 12px; font-size: 16px;
}
.vip-tools, .vip-overview-days {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 164px),1fr)); gap: 8px;
}
.vip-tool {
  text-align: left; padding: 10px 12px; min-height: 48px; border-radius: 10px;
  border: 1px solid #a6bfb4; background: #eef7f1; color: #183b31;
  cursor: pointer; font: inherit; font-weight: 650;
}
.vip-overview-days { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.vip-overview-days > button { padding-inline: 8px; }
.vip-overview-days strong { font-size: .875rem; }
@media (min-width: 750px) {
  .vip-overview-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.vip-tool.vip-approved-leave { background: #e6f2f7; border-color: #9cbcc9; color: #224754; }
.vip-approved-leave strong { white-space: nowrap; }
.vip-approved-leave:hover { background: #d4e9f2; }
.vip-tool.vip-approved-leave small { color: inherit; }
.vip-leave-panel { font-size: 1rem; }
.vip-leave-panel table { width: 100%; border-collapse: collapse; text-align: left; }
.vip-leave-panel :is(th,td) { padding: 12px 8px; border-bottom: 1px solid #cddbd6; overflow-wrap: anywhere; }
.vip-leave-panel th { background: #e6f2f7; color: #224754; }
.vip-leave-panel > button { margin-top: 16px; min-height: 44px; }
.vip-tool:not(.vip-approved-leave):hover, .vip-tool[aria-current=true] { background: #d8eee2; border-color: #498272; }
.vip-tool small { display: block; margin-top: 5px; color: #426157; font-weight: 500; }
.vip-coverage { max-width: 100%; overflow: auto; margin-top: 18px; }
.vip-coverage table { width: 100%; min-width: 430px; border-collapse: collapse; }
.vip-coverage caption { caption-side: top; text-align: left; font-weight: 750; padding-bottom: 8px; }
.vip-coverage :is(th, td) { padding: 9px; border-bottom: 1px solid #cddbd6; text-align: center; }
.vip-coverage th:first-child { text-align: left; }
.vip-tool:focus-visible, .voice-planner-actions button:focus-visible, .vip-dock button:focus-visible {
  outline: 3px solid #ccab67; outline-offset: 2px;
}
@media (max-width: 700px) and (orientation: portrait) {
  html body:has(#spv-top-controls) .voice-planner-actions {
    position: static; padding: 0; background: none; border: 0;
  }
  html body:has(#spv-top-controls) .workspace > main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  body:has(#spv-top-controls):not(.spv-login-open):not(:has(dialog[open])) .vip-dock {
    position: fixed; z-index: 27; inset: auto 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #102627; border-top: 1px solid #70968a;
  }
  .vip-dock button {
    min-height: 46px; padding: 5px; font: inherit; font-size: .86rem; font-weight: 650;
    color: white; background: #214841; border: 1px solid #83af9e; border-radius: 10px;
  }
  #vip-dock-assign { background: #b8dcc7; color: #102627; }
  .vip-dock #vip-overview { background: #075f7b; color: #fff; border-color: #65a8be; }
}

body .workspace > main .page-heading { display: none !important; }

#modal:has(.vip-day-panel) > .spv-navigation-footer,
#modal:has(.vip-day-panel) #modal-close { display: none !important; }
.vip-day-actions {
  position: sticky; bottom: 0; z-index: 3; display: flex;
  justify-content: space-between; gap: 12px; margin-top: 16px;
  padding: 10px 0 max(8px, env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #d6e0e8;
  box-shadow: 0 -7px 12px #ffffffed;
}
.vip-day-actions button { min-height: 44px; }

html body dialog.spv-help-dialog:not(.spv-release-dialog),
html body #modal:has(.vip-planner-guide, .spv-summary-details) {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) 0 auto;
  margin: 0 auto;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
}
.spv-demo-auth-panel .spv-auth-actions { flex-wrap: wrap; }
.vip-planner-guide .guide-section { margin-block: 10px; }
.vip-planner-guide summary { cursor: pointer; }
