:root {
  --ink: #17242d;
  --muted: #66757e;
  --canvas: #f2f3ee;
  --paper: #fffefa;
  --line: #daddd5;
  --night: #14252d;
  --night-soft: #213740;
  --coral: #ff6846;
  --coral-dark: #d9482d;
  --lime: #d7ff62;
  --aqua: #79e2d1;
  --yellow: #ffd262;
  --red: #df3c3c;
  --shadow: 0 18px 60px rgba(20, 37, 45, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.loading-shell, .login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.loading-shell { align-content: center; gap: 14px; color: var(--muted); }
.brand-mark {
  width: 54px; height: 54px; display: grid; place-items: center;
  background: var(--coral); color: white; font-weight: 900; letter-spacing: -1px;
  border-radius: 16px 16px 4px 16px;
}

.login-page {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  background: var(--night);
  color: white;
  text-align: left;
}
.login-story { padding: clamp(38px, 7vw, 100px); max-width: 840px; }
.login-story .brand-mark { margin-bottom: 60px; }
.eyebrow { color: var(--coral); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.login-story h1 { font-size: clamp(52px, 7vw, 96px); line-height: .93; letter-spacing: -.065em; margin: 16px 0 30px; max-width: 760px; }
.login-story p { color: #b8c5c9; font-size: 18px; line-height: 1.65; max-width: 600px; }
.login-card { background: var(--paper); color: var(--ink); align-self: stretch; display: grid; align-content: center; padding: clamp(36px, 6vw, 90px); }
.login-card h2 { font-size: 34px; letter-spacing: -.04em; margin: 0 0 8px; }
.login-card > p { color: var(--muted); margin: 0 0 34px; }

.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: white; color: var(--ink);
  border-radius: 10px; padding: 12px 13px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--night); box-shadow: 0 0 0 3px rgba(20,37,45,.08); }
.field textarea { min-height: 90px; resize: vertical; }
.field > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }

.primary-button, .secondary-button, .ghost-button, .icon-button {
  border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 750;
}
.primary-button { color: white; background: var(--coral); box-shadow: 0 8px 24px rgba(255,104,70,.25); }
.primary-button:hover { background: var(--coral-dark); }
.secondary-button { color: var(--night); background: var(--lime); }
.ghost-button { color: var(--ink); background: #edf0e9; }
.ghost-button.active-toggle { color: white; background: var(--night); }
.icon-button { padding: 8px 11px; background: transparent; color: inherit; }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.compact-button { padding: 7px 11px; font-size: 12px; }
.error-copy { color: var(--red); min-height: 20px; font-size: 14px; }
.form-error { margin: 0 0 18px; padding: 11px 13px; border: 1px solid #efb8ae; border-left: 4px solid var(--red); border-radius: 5px 9px 9px 5px; background: #fff0ed; color: #922b22; font-size: 13px; line-height: 1.45; }
.form-error[hidden] { display: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { background: var(--night); color: #dbe6e8; padding: 24px 18px; display: flex; flex-direction: column; position: sticky; height: 100vh; top: 0; }
.sidebar-head { display: flex; gap: 12px; align-items: center; padding: 0 7px 30px; }
.sidebar-head strong { color: white; display: block; }
.sidebar-head small { color: #8fa4ab; }
.nav { display: grid; gap: 6px; }
.nav button { border: 0; background: transparent; color: #9eb0b5; text-align: left; padding: 11px 13px; border-radius: 9px; font-weight: 650; }
.nav button:hover, .nav button.active { background: var(--night-soft); color: white; }
.nav button.active::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); margin-right: 9px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #2b434c; padding: 18px 8px 0; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot small { color: #8fa4ab; margin: 3px 0 12px; }
.account-actions { display: grid; gap: 7px; }
.sidebar-foot .account-actions button { width: 100%; }

.main { padding: 30px clamp(22px, 4vw, 58px) 70px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 30px; }
.topbar h1 { font-size: clamp(34px, 4vw, 54px); letter-spacing: -.055em; margin: 5px 0 7px; line-height: 1; }
.topbar p { margin: 0; color: var(--muted); }
.date-chip { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; white-space: nowrap; font-weight: 700; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 19px; box-shadow: var(--shadow); }
.metric small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 800; }
.metric strong { display: block; font-size: 36px; letter-spacing: -.045em; margin-top: 10px; }
.metric.coral { background: var(--coral); color: white; border-color: var(--coral); }
.metric.coral small { color: #ffe1d9; }

.layout-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.panel-head p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.panel-body { padding: 20px; }

.capacity-list { display: grid; }
.capacity-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 60px; gap: 16px; align-items: center; padding: 13px 20px; border-bottom: 1px solid #eceee9; }
.capacity-row:last-child { border-bottom: 0; }
.person-name { font-weight: 750; }
.person-role { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.bar { height: 10px; border-radius: 10px; background: #e6e9e2; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--aqua); }
.bar span.hot { background: var(--yellow); }
.bar span.over { background: var(--coral); }
.hours { font-variant-numeric: tabular-nums; text-align: right; font-weight: 750; }

.warning-list { display: grid; gap: 10px; }
.warning { border-left: 4px solid var(--red); padding: 11px 12px; background: #fff2ee; border-radius: 5px 9px 9px 5px; }
.warning.yellow { border-color: #d89e18; background: #fff8df; }
.warning strong, .warning span { display: block; }
.warning span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.empty-state { color: var(--muted); text-align: center; padding: 35px 15px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid #e8ebe5; white-space: nowrap; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td { font-size: 14px; }
tr[data-id] { cursor: pointer; }
tr[data-id]:hover td { background: #f5f6f1; }
.jira-issue-link { color: #176a57; font-weight: 800; text-decoration: none; }
.jira-issue-link:hover { color: var(--coral-dark); text-decoration: underline; }
.jira-issue-link span { font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-weight: 750; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: #e9ece7; }
.status.committed { background: #dff6ef; color: #176a57; }
.status.soft { background: #fff0c9; color: #825c00; }
.status.pipeline { background: #e5eaf7; color: #3e568e; }
.warning-count { display: inline-grid; place-items: center; min-width: 23px; height: 23px; border-radius: 50%; background: #ffe2da; color: var(--red); font-weight: 800; }

.view { display: none; }
.view.active { display: block; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.toolbar h2 { margin: 0; }
.my-allocation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.my-allocation-tabs, .my-allocation-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-allocation-actions label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.my-allocation-actions select { border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--ink); background: var(--paper); }
.my-allocation-metrics { margin-bottom: 15px; }
.my-allocation-principle { display: flex; align-items: baseline; gap: 9px; margin-bottom: 15px; padding: 12px 14px; border-left: 4px solid var(--aqua); border-radius: 5px 10px 10px 5px; background: #edf5ef; }
.my-allocation-principle strong { white-space: nowrap; }
.my-allocation-principle span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.my-allocation-list { display: grid; gap: 12px; }
.my-allocation-card { overflow: visible; }
.my-allocation-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 18px 20px 13px; }
.my-allocation-card-head h2 { margin: 5px 0; font-size: 18px; letter-spacing: -.02em; line-height: 1.25; }
.my-allocation-card-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.my-allocation-hours { min-width: 90px; text-align: right; }
.my-allocation-hours strong, .my-allocation-hours small { display: block; }
.my-allocation-hours strong { font-size: 25px; letter-spacing: -.04em; }
.my-allocation-hours small { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.my-allocation-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 20px 14px; color: var(--muted); font-size: 11px; }
.my-allocation-warning { border-radius: 999px; padding: 5px 8px; background: #fff0c9; color: #825c00; font-weight: 800; }
.my-allocation-guidance { margin: 0 20px 18px; padding: 13px 14px; border: 1px solid #d8e6dc; border-radius: 10px; background: #f2f7f3; }
.my-allocation-guidance small { color: #49645c; font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.my-allocation-guidance p { margin: 6px 0 8px; font-size: 13px; line-height: 1.5; }
.my-allocation-guidance .jira-issue-link { font-size: 12px; }
.planner-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.planner-nav, .planner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.planner-nav strong { margin-left: 6px; font-size: 14px; }
.planner-actions label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.planner-actions select { border: 1px solid var(--line); border-radius: 9px; padding: 10px; color: var(--ink); background: var(--paper); }
.planner-icon-button { width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 0; font-size: 20px; line-height: 1; }
.planner-legend { display: flex; gap: 15px; flex-wrap: wrap; margin: 0 0 13px; color: var(--muted); font-size: 11px; font-weight: 700; }
.planner-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; background: #e7ece7; border: 1px solid #d4dbd4; }
.legend-dot.hot { background: #fff2bd; border-color: #e2ba3b; }
.legend-dot.over { background: var(--yellow); border-color: #d89e18; }
.legend-dot.soft { background: #e7eefc; border: 1px dashed #6483bc; }
.legend-dot.ooo { background: var(--aqua); border-color: #3da18f; }
.utilization-panel { margin: 0 0 14px; }
.utilization-panel.hidden { display: none; }
.utilization-target { border-radius: 999px; padding: 7px 10px; background: var(--night); color: white; font-size: 11px; font-weight: 850; }
.utilization-summary { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); border-bottom: 1px solid var(--line); }
.utilization-summary > div { padding: 15px 18px; border-right: 1px solid var(--line); }
.utilization-summary > div:last-child { border-right: 0; }
.utilization-summary small, .utilization-summary strong { display: block; }
.utilization-summary small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.utilization-summary strong { margin-top: 6px; font-size: 22px; letter-spacing: -.03em; }
.utilization-table td small { color: var(--muted); }
.utilization-table td:nth-child(n+2) { font-variant-numeric: tabular-nums; }
.utilization-value { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.utilization-bar { flex: 1; height: 8px; overflow: hidden; border-radius: 99px; background: #e6e9e2; }
.utilization-bar i { display: block; height: 100%; border-radius: inherit; background: var(--aqua); }
.utilization-bar i.covered { background: #54b9a6; }
.utilization-bar i.over { background: var(--coral); }
.utilization-value strong { min-width: 38px; text-align: right; font-size: 12px; }
.planner-panel { border-radius: 12px; }
.planner-scroll { width: 100%; max-height: calc(100vh - 270px); min-height: 340px; overflow: auto; }
.planner-grid { --planner-days: 28; display: grid; grid-template-columns: 220px repeat(var(--planner-days), 104px); width: max-content; min-width: 100%; background: white; }
.planner-resource, .planner-date, .planner-cell { border-right: 1px solid #e2e6e1; border-bottom: 1px solid #e2e6e1; }
.planner-resource { position: sticky; left: 0; z-index: 3; min-width: 220px; padding: 14px; background: var(--paper); display: flex; gap: 11px; align-items: flex-start; }
.planner-resource strong, .planner-resource small { display: block; }
.planner-resource small { color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.35; }
.planner-resource .avatar { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--night); color: white; font-size: 11px; font-weight: 850; }
.planner-resource.inactive { background: #f0f1ed; color: var(--muted); }
.planner-resource.inactive .avatar { background: #89949a; }
.planner-corner { top: 0; z-index: 5; min-height: 66px; display: grid; align-content: center; }
.planner-date { position: sticky; top: 0; z-index: 4; min-height: 66px; padding: 11px 8px; background: #f9faf6; text-align: center; }
.planner-date span, .planner-date small { display: block; }
.planner-date span { font-size: 12px; font-weight: 800; }
.planner-date small { color: var(--muted); font-size: 10px; margin-top: 5px; text-transform: uppercase; }
.planner-date.weekend, .planner-cell.weekend { background: #f0f2f4; }
.planner-date.today, .planner-cell.today { box-shadow: inset 3px 0 0 var(--coral), inset -3px 0 0 rgba(255,104,70,.2); }
.planner-date.week-start, .planner-cell.week-start { border-left: 2px solid #b9c2bd; }
.planner-cell { appearance: none; border-top: 0; border-left: 0; border-radius: 0; min-height: 132px; padding: 8px 7px; background: white; color: var(--ink); text-align: left; vertical-align: top; overflow: hidden; }
.planner-cell:hover:not(:disabled) { background: #f1f7f3; box-shadow: inset 0 0 0 2px var(--aqua); }
.planner-cell:disabled { cursor: default; }
.planner-cell.hot { background: #fff9df; }
.planner-cell.over { background: #fff1bd; box-shadow: inset 0 -4px 0 #d89e18; }
.cell-total { display: block; color: var(--muted); font-size: 10px; font-weight: 800; margin-bottom: 7px; white-space: nowrap; }
.cell-total.over { color: #7a5100; }
.booking-stack { display: grid; gap: 5px; }
.booking-chip { display: block; min-width: 0; padding: 6px 7px; border-left: 3px solid var(--coral); border-radius: 4px 7px 7px 4px; background: #fff0eb; overflow: hidden; }
.booking-chip strong, .booking-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-chip strong { font-size: 10px; }
.booking-chip small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.booking-chip.published { border-color: #287967; background: #e5f6f0; }
.booking-chip.self { border-color: #6d66ae; background: #efedfa; }
.booking-chip.recommendation { border: 1px dashed #6483bc; border-left-width: 3px; background: #edf3ff; }
.booking-chip.recommendation.soft { opacity: .78; }
.booking-chip.warning-chip { box-shadow: inset 0 0 0 2px #d89e18; }
.booking-chip.ooo { border-color: #3da18f; background: #dff8f2; }
.booking-chip.editable { cursor: pointer; }
.booking-chip.editable:hover { box-shadow: inset 0 0 0 2px var(--night); }
.planner-loading { min-height: 340px; display: grid; place-items: center; }
.modal { position: fixed; inset: 0; display: none; place-items: center; background: rgba(11,25,31,.64); padding: 20px; z-index: 20; }
.modal.open { display: grid; }
.modal-card { width: min(780px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); border-radius: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 22px; }
.account-modal { width: min(520px, 100%); }
.account-modal .modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.account-modal-actions { margin: 10px -22px -22px; padding: 18px 22px; }
.modal.drawer { padding: 0; place-items: stretch end; }
.planner-drawer { width: min(570px, 100vw); max-height: 100vh; height: 100vh; border-radius: 20px 0 0 20px; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.planner-drawer.model-drawer { width: min(720px, 100vw); }
.planner-drawer .modal-head { padding: 24px 26px 20px; }
.planner-drawer .modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.planner-drawer .modal-body { overflow-y: auto; padding: 24px 26px 0; }
.check-row { display: flex; align-items: center; gap: 10px; margin: -2px 0 20px; color: var(--ink); font-size: 13px; font-weight: 650; }
.check-row input { width: 18px; height: 18px; accent-color: var(--coral); }
.role-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.role-check-grid label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: white; color: var(--ink); font-size: 12px; letter-spacing: 0; text-transform: none; cursor: pointer; }
.role-check-grid input { width: 17px; height: 17px; accent-color: var(--coral); }
.account-state { display: flex; align-items: flex-start; gap: 11px; margin: 1px 0 18px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9f4; cursor: pointer; }
.account-state input { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px; accent-color: var(--coral); }
.account-state strong, .account-state small { display: block; }
.account-state small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.allocation-preview { display: grid; gap: 4px; padding: 12px 14px; margin: 1px 0 18px; border-radius: 10px; background: #edf5ef; border: 1px solid #d8e6dc; font-size: 12px; }
.allocation-preview strong { font-size: 14px; }
.allocation-preview span { color: var(--muted); }
.allocation-preview.invalid { color: var(--red); background: #fff0ed; border-color: #f0c7bd; }
.date-boundary { margin: -7px 0 18px; padding: 9px 11px; border-left: 3px solid var(--aqua); background: #f0f7f5; color: var(--muted); border-radius: 4px 8px 8px 4px; font-size: 11px; line-height: 1.45; }
.date-boundary.invalid { border-color: var(--red); background: #fff0ed; color: #9b2b21; }
.drawer-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 10px -26px 0; padding: 18px 26px; border-top: 1px solid var(--line); background: var(--paper); }
.drawer-spacer { flex: 1; }
.destructive-button { border: 1px solid #e7b5ad; border-radius: 10px; padding: 10px 13px; background: #fff0ed; color: #a72f24; font-weight: 800; }
.destructive-button:hover, .destructive-button.confirm { background: var(--red); border-color: var(--red); color: white; }
.edit-source-note { margin: -2px 0 18px; padding: 11px 13px; border-left: 4px solid var(--yellow); border-radius: 4px 9px 9px 4px; background: #fff8df; color: #6f5310; font-size: 12px; line-height: 1.45; }
.model-preview { margin-bottom: 18px; }
.model-basis { display: grid; gap: 5px; padding: 14px; border: 1px solid #cfe1da; border-radius: 11px; background: #edf5ef; }
.model-basis strong, .model-basis span, .model-basis em { display: block; }
.model-basis span { color: var(--muted); font-size: 12px; }
.model-basis em { margin-top: 5px; color: #49645c; font-size: 11px; line-height: 1.45; }
.model-total { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 17px 0 10px; }
.model-total span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.model-total strong { font-size: 28px; letter-spacing: -.04em; }
.model-role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.model-role-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.model-role-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.model-role-head strong { font-size: 14px; }
.model-math { display: grid; gap: 3px; margin-bottom: 12px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.model-role-card .field { margin-bottom: 9px; }
.model-phase-lines { display: grid; gap: 3px; color: #49645c; font-size: 10px; }
.model-covered { padding: 10px; border-radius: 8px; background: #edf5ef; color: #49645c; font-size: 11px; }
.engagement-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field label span { color: #9aa4a9; font-weight: 600; letter-spacing: 0; text-transform: none; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.detail-stat { background: #f0f2ec; border-radius: 10px; padding: 12px; }
.detail-stat small { color: var(--muted); display: block; }
.detail-stat strong { display: block; margin-top: 5px; }
.role-map-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) 120px auto; gap: 9px; align-items: center; padding: 11px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff8df; }
.role-map-row strong, .role-map-row small { display: block; }
.role-map-row small { color: var(--muted); margin-top: 3px; }
.role-map-row select { width: 100%; border: 1px solid var(--line); background: white; border-radius: 9px; padding: 10px; }
.team-subhead { margin: 14px 0 7px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.allocation-team-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9f4; }
.allocation-team-row strong, .allocation-team-row small { display: block; }
.allocation-team-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.allocation-team-row.unresolved { border-color: #e4c770; background: #fff8df; }
.role-pill { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; background: #e5f6f0; color: #176a57; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.secret-value { font-family: ui-monospace, monospace; word-break: break-all; background: var(--night); color: var(--lime); padding: 14px; border-radius: 10px; }
.toast { position: fixed; right: 22px; bottom: 22px; transform: translateY(120px); opacity: 0; transition: .25s ease; background: var(--night); color: white; padding: 13px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 50; max-width: 380px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--red); }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .layout-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-story { display: none; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px; }
  .sidebar-head { padding-bottom: 12px; }
  .nav { display: flex; overflow-x: auto; }
  .nav button { flex: 1 0 108px; text-align: center; white-space: nowrap; font-size: 12px; }
  .sidebar-foot { display: grid; margin-top: 12px; padding: 12px 8px 0; }
  .sidebar-foot small { margin-bottom: 8px; }
  .sidebar-foot .account-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 24px 15px 50px; }
  .topbar { display: block; }
  .date-chip { display: inline-block; margin-top: 14px; }
  .capacity-row { grid-template-columns: 1fr 1.5fr 50px; padding: 12px; gap: 9px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .role-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-role-grid { grid-template-columns: 1fr; }
  .role-map-row { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .planner-toolbar { align-items: flex-start; flex-direction: column; }
  .my-allocation-toolbar, .my-allocation-principle { align-items: flex-start; flex-direction: column; }
  .my-allocation-actions { width: 100%; justify-content: space-between; }
  .my-allocation-card-head { grid-template-columns: 1fr; gap: 10px; }
  .my-allocation-hours { text-align: left; }
  .planner-actions { width: 100%; justify-content: space-between; }
  .utilization-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utilization-summary > div { border-bottom: 1px solid var(--line); }
  .planner-scroll { max-height: calc(100vh - 320px); }
  .planner-drawer { border-radius: 0; }
  .drawer-actions .destructive-button { width: 100%; }
  .drawer-actions .drawer-spacer { display: none; }
}
