:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #68738a;
  --line: #e4e8ef;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --primary: #4657d8;
  --primary-dark: #3745b4;
  --orange: #f39a18;
  --blue: #4d78d4;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 1080px; }
html.is-space-pan-locked { overflow-y: hidden; scrollbar-gutter: stable; }
html.is-space-pan-locked body { overflow-y: hidden; }
body {
  margin: 0;
  min-width: 1080px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -8%, rgba(70, 87, 216, .12), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(59, 180, 146, .07), transparent 24%),
    var(--canvas);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { width: min(1700px, calc(100% - 44px)); margin: 0 auto; padding: 32px 0 60px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 7px; color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.admin-link { padding: 8px 4px; color: #737e92; font-size: 12px; text-decoration: none; }
.admin-link:hover { color: var(--primary); }

.mode-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.mode-badge::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.mode-badge-edit { color: #168461; background: #e8f7f1; }
.mode-badge-readonly { color: #747d8f; background: #edf0f4; }

.button { min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; transition: .18s ease; }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 7px 16px rgba(70,87,216,.18); }
.button-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button-secondary { color: #35415a; border-color: #dfe4ed; background: #fff; }
.button-secondary:hover { border-color: #bdc6d6; background: #fafbfc; }
.button-danger { color: #d34b4b; border-color: #f0d3d3; background: #fff5f5; }

.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.overview-grid article { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 17px 20px; border: 1px solid rgba(220,226,236,.82); border-radius: 15px; background: rgba(255,255,255,.92); box-shadow: 0 10px 30px rgba(30,45,78,.055); }
.overview-grid span { color: var(--muted); font-size: 12px; }
.overview-grid strong { font-size: 24px; }

.roadmap-panel { overflow: visible; border: 1px solid rgba(216,223,234,.92); border-radius: 20px; background: #fff; box-shadow: 0 24px 64px rgba(28,40,71,.1); }
.roadmap-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 64px; padding: 0 18px 0 22px; border-bottom: 1px solid var(--line); border-radius: 19px 19px 0 0; background: linear-gradient(180deg, #fff, #fbfcfe); }
.legend, .toolbar-actions { display: flex; align-items: center; gap: 16px; }
.legend { flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.legend-line { width: 22px; height: 2px; }
.legend-line-orange { background: var(--orange); }
.legend-line-blue { background: var(--blue); }
.legend-triangle { width: 14px; height: 13px; background: linear-gradient(145deg, #c27474, #f5dedd); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 2px 2px rgba(53,62,78,.2)); }
.legend-square { width: 14px; height: 14px; border: 0; border-radius: 4px; background: linear-gradient(145deg, #bb7373, #f5dfde); box-shadow: 0 2px 4px rgba(53,62,78,.18), inset 0 0 0 2px rgba(255,255,255,.6); }
.legend-today { width: 1px; height: 17px; border-left: 2px dotted #7164eb; }
.icon-button, .text-button { height: 35px; border: 1px solid #dfe4ed; border-radius: 9px; color: #34415a; background: #fff; box-shadow: 0 2px 8px rgba(31,44,72,.04); }
.icon-button { width: 33px; padding: 0; font-size: 18px; }
.text-button { padding: 0 12px; font-size: 11px; font-weight: 750; }
.icon-button:hover, .text-button:hover { border-color: #b9c2d2; background: #f7f8fb; }
.zoom-level { min-width: 45px; color: #63708a; font-size: 11px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }

.roadmap-sticky-head { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.985); box-shadow: 0 12px 24px -22px rgba(31,43,68,.8); }
.roadmap-axis-viewport { width: 100%; overflow: hidden; border-bottom: 1px solid #dfe5ed; background: #fff; }
.roadmap-axis-board { position: relative; background: #fff; }
.roadmap-axis-board .axis-row { position: relative; top: auto; z-index: 1; box-shadow: none; }
.roadmap-stage { position: relative; }
.roadmap-navigator { position: relative; z-index: 2; display: grid; grid-template-columns: var(--roadmap-left-column, 250px) minmax(0, 1fr); align-items: center; min-height: 48px; padding: 0 18px 0 0; border-bottom: 1px solid #cfd7e4; background: linear-gradient(180deg, rgba(251,252,254,.98), rgba(242,245,250,.98)); backdrop-filter: blur(10px); }
.navigator-range { align-self: stretch; display: flex; align-items: center; min-width: 0; padding: 0 14px 0 18px; overflow: hidden; border-right: 1px solid #e2e7ef; color: #5d6980; background: rgba(249,251,254,.9); box-shadow: 12px 0 22px -22px rgba(34,48,78,.7); font-size: 10px; font-weight: 800; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.navigator-track { position: relative; width: 100%; min-width: 0; height: 14px; border: 1px solid #d4dbe7; border-radius: 999px; background: #e9edf4; box-shadow: inset 0 1px 3px rgba(39,52,78,.08); cursor: pointer; touch-action: none; }
.navigator-track:focus-visible { outline: 3px solid rgba(70,87,216,.2); outline-offset: 3px; }
.navigator-thumb { position: absolute; top: 50%; left: 0; display: block; min-width: 96px; height: 20px; border: 2px solid #fff; border-radius: 999px; background: linear-gradient(135deg, #5968e8, #3f4fc8); box-shadow: 0 4px 12px rgba(52,65,180,.28), inset 0 1px 0 rgba(255,255,255,.3); transform: translateY(-50%); cursor: grab; will-change: transform, width; }
.roadmap-navigator.is-dragging .navigator-thumb { cursor: grabbing; box-shadow: 0 5px 15px rgba(52,65,180,.36), inset 0 1px 0 rgba(255,255,255,.34); }
.roadmap-navigator.is-dragging .navigator-range { color: var(--primary); }
.navigator-spacer { display: none; }
.roadmap-viewport { height: auto; min-height: 0; padding-bottom: 10px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; border-radius: 0 0 19px 19px; background: #fbfcfe; scrollbar-width: none; }
.roadmap-viewport::-webkit-scrollbar { display: none; }
.roadmap-viewport.is-pan-ready .roadmap-board { cursor: grab; }
.roadmap-viewport.is-panning .roadmap-board { cursor: grabbing; }
.roadmap-board { position: relative; min-height: 100%; background: #fff; isolation: isolate; }
.board-row { position: relative; display: grid; border-bottom: 1px solid #edf1f5; }
.axis-row { position: relative; min-height: 96px; border-bottom-color: #dfe5ed; background: rgba(255,255,255,.985); }
.axis-side, .project-side { position: sticky; left: 0; z-index: 10; border-right: 1px solid #e2e7ef; background: rgba(249,251,254,.97); box-shadow: 12px 0 22px -22px rgba(34,48,78,.7); backdrop-filter: blur(10px); }
.axis-side { display: flex; align-items: center; justify-content: center; }
.axis-side span { padding: 0; border-radius: 0; color: #215d45; background: transparent; font-size: 21px; font-weight: 900; letter-spacing: -.03em; box-shadow: none; }
.axis-track { position: relative; overflow: hidden; }
.axis-note { display: flex; align-items: center; min-width: 0; padding: 14px 22px; color: #4d586d; background: #fff; font-size: 12px; font-weight: 650; line-height: 1.55; }
.axis-note p { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.axis-note strong { color: #273247; font-weight: 900; }
.axis-base-line { position: absolute; top: 60px; right: 0; left: 0; height: 2px; border-radius: 999px; background: #273142; }
.axis-month { position: absolute; top: 14px; width: 0; height: 64px; text-align: center; }
.axis-month strong { position: absolute; top: 0; left: 0; display: block; width: max-content; color: #273247; transform: translateX(-50%); font-size: 14px; font-weight: 850; white-space: nowrap; }
.axis-month i { position: absolute; top: 35px; left: 0; z-index: 2; display: block; width: 21px; height: 21px; border: 2px solid #273142; border-radius: 50%; background: linear-gradient(145deg, #edf9ef, #d8f0de); transform: translateX(-50%); box-shadow: 0 2px 6px rgba(33,72,52,.12); }
.axis-today-pin { position: absolute; top: 6px; bottom: 0; z-index: 4; width: 0; border-left: 2px dotted rgba(94,80,236,.62); }
.axis-today-pin span { position: absolute; top: 0; left: 50%; padding: 4px 7px; border-radius: 5px; color: #185039; background: #b8e0c3; transform: translate(-50%, -1px); box-shadow: 0 3px 8px rgba(42,107,74,.12); font-size: 10px; font-weight: 850; white-space: nowrap; }
.project-row { background: #fff; }
.project-row:nth-child(odd) { background: #fcfdff; }
.project-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; padding: 14px 16px 14px 8px; }
.project-label { width: 220px; max-width: 220px; padding: 5px 2px; border: 0; border-radius: 0; color: #232a38; background: transparent; box-shadow: none; text-align: right; cursor: default; transition: .16s ease; }
.project-label.is-editable { cursor: pointer; }
.project-label.is-editable:hover { color: var(--row-color); transform: translateX(-3px); }
.project-label strong, .project-label span { display: block; padding: 0; background: transparent; }
.project-label strong { margin-bottom: 5px; font-size: 20px; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
.project-label span { color: #5c6880; font-size: 13px; font-weight: 650; line-height: 1.55; }
.project-row.is-draft .project-label strong { color: #e35d5d; }
.project-row.is-completed .project-label strong,
.project-row.is-completed .project-label span { color: #9299a5; }
.project-focus-note { display: block; margin-top: 8px; color: #d14848; font-size: 13px; font-style: normal; font-weight: 850; line-height: 1.45; }
.project-row.is-focus { background: linear-gradient(90deg, rgba(215,72,72,.09), rgba(215,72,72,.035)); box-shadow: inset 0 2px 0 rgba(210,73,73,.46), inset 0 -2px 0 rgba(210,73,73,.3); }
.project-row.is-focus .project-side { border-right-color: #edcaca; background: rgba(255,244,244,.97); }
.project-row.is-focus .project-label strong { color: #bd3f3f; }
.project-row.is-focus .project-track { height: 4px; box-shadow: 0 2px 9px color-mix(in srgb, var(--lane-color) 28%, transparent); }
.project-row.is-focus .project-target { color: #713e45; font-weight: 850; }
.draft-tag { padding: 4px 8px; border: 1px solid #ead865; border-radius: 6px; color: #5a4c00; background: #fff8a9; font-size: 9px; font-weight: 850; }

.project-lane { position: relative; overflow: visible; min-height: inherit; }
.project-track { position: absolute; top: 50%; right: 16px; left: 16px; z-index: 1; height: 3px; border-radius: 999px; background: linear-gradient(90deg, #b8bec9 0, #b8bec9 var(--past-track-width), color-mix(in srgb, var(--lane-color) 82%, #fff) var(--past-track-width), var(--lane-color) 100%); box-shadow: 0 2px 7px color-mix(in srgb, var(--lane-color) 18%, transparent); transform: translateY(-50%); }
.plan-window { position: absolute; top: 9px; bottom: 9px; z-index: 0; border: 1px solid #e5e1d6; border-radius: 10px; background: linear-gradient(180deg, rgba(250,248,242,.7), rgba(247,244,235,.46)); }
.project-target { display: flex; align-items: center; align-self: stretch; min-height: 58px; margin: 0; padding: 18px 20px; border: 0; border-radius: 0; color: #303b52; background: transparent; box-shadow: none; font-size: 14px; font-weight: 750; line-height: 1.6; }
.project-target.is-draft-target { color: #725b5b; font-weight: 800; text-decoration: underline; text-decoration-color: #efd7d7; text-decoration-thickness: 6px; text-underline-offset: -2px; }

.milestone { position: absolute; top: calc(50% - 64px); z-index: 3; width: 104px; height: 128px; padding: 0; border: 0; outline: 0; color: #282c32; background: transparent; transform: translateX(-50%); touch-action: none; user-select: none; }
.milestone:hover, .milestone:focus-visible { z-index: 8; }
.milestone:hover .milestone-name { color: var(--project-color); }
.milestone.has-overflow::after { content: attr(data-tooltip); position: absolute; top: 108px; left: 50%; z-index: 30; width: max-content; max-width: 290px; padding: 8px 10px; border: 1px solid rgba(53,65,90,.16); border-radius: 8px; color: #fff; background: rgba(35,43,60,.96); box-shadow: 0 10px 26px rgba(25,34,53,.22); opacity: 0; pointer-events: none; text-align: left; white-space: normal; transform: translate(calc(-50% + var(--tooltip-shift, 0px)), 5px); transition: opacity .14s ease, transform .14s ease; font-size: 11px; font-weight: 700; line-height: 1.5; }
.milestone.has-overflow:hover::after,
.milestone.has-overflow:focus-visible::after { opacity: 1; transform: translate(calc(-50% + var(--tooltip-shift, 0px)), 0); }
.milestone-date { position: absolute; top: 22px; right: auto; left: 50%; width: var(--date-width, 44px); overflow: hidden; color: #4a556c; font-size: 10px; font-weight: 800; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.milestone-marker { position: absolute; top: 43px; left: 50%; display: block; transform: translateX(-50%); }
.milestone-triangle .milestone-marker { top: 52.5px; width: 26px; height: 23px; overflow: hidden; border: 0; background: linear-gradient(145deg, color-mix(in srgb, var(--project-color) 84%, #334158), color-mix(in srgb, var(--project-color) 58%, #fff)); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 5px 5px rgba(38,49,75,.2)); }
.milestone-triangle .milestone-marker::after { content: ""; position: absolute; inset: 3px 3px 2px; z-index: 1; background: linear-gradient(145deg, rgba(255,255,255,.98), color-mix(in srgb, var(--project-color) 17%, #fff0ed)); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.milestone-square .milestone-marker { top: 52px; width: var(--range-width, 24px); height: 24px; overflow: hidden; border: 0; border-radius: 7px; background: linear-gradient(145deg, color-mix(in srgb, var(--project-color) 88%, #334158), color-mix(in srgb, var(--project-color) 56%, #fff)); box-shadow: 0 5px 10px rgba(38,49,75,.16), inset 0 1px 0 rgba(255,255,255,.55); transition: width .16s ease; }
.milestone-square .milestone-marker::after { content: ""; position: absolute; inset: 2px; z-index: 1; border-radius: 5px; background: linear-gradient(145deg, rgba(255,255,255,.98), color-mix(in srgb, var(--project-color) 14%, #fff0ed)); box-shadow: inset 0 1px 0 rgba(255,255,255,.92); }
.milestone-name { position: absolute; top: 83px; right: auto; left: 50%; width: var(--label-width, 104px); overflow: hidden; color: #374157; font-size: 10px; font-weight: 650; line-height: 1.38; text-align: center; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-50%); transition: .14s ease; }
.milestone-date.is-layout-hidden, .milestone-name.is-layout-hidden { display: none; }
.milestone-date.is-layout-ellipsis, .milestone-name.is-layout-ellipsis { font-weight: 900; }
.milestone.is-highlighted .milestone-name.is-layout-ellipsis { padding: 0; background: transparent; }
.milestone.is-edge-obscured .milestone-date,
.milestone.is-edge-obscured .milestone-name { visibility: hidden; }
.milestone.is-highlighted .milestone-name { padding: 2px 5px; border-radius: 4px; background: #f9e5e5; font-weight: 850; }
.milestone.is-past .milestone-date,
.milestone.is-past .milestone-name { color: #9aa1ad; }
.milestone.is-past .milestone-marker { background: linear-gradient(145deg, #9fa6b1, #d8dce2); filter: drop-shadow(0 3px 4px rgba(57,65,79,.12)); }
.milestone.is-past .milestone-marker::after { background: linear-gradient(145deg, #f8f9fa, #dfe2e7); }
.project-row.is-completed .project-track { background: #b8bec9; box-shadow: none; }
.project-row.is-completed .plan-window { border-color: #e1e3e7; background: #f4f5f6; }
.project-row.is-completed .project-target { color: #969daa; border: 0; background: transparent; box-shadow: none; }
.milestone.is-dragging { z-index: 20; cursor: grabbing; }
.milestone.is-dragging .milestone-marker { filter: drop-shadow(0 4px 6px rgba(35,45,75,.28)); }
.roadmap-board.is-compact .milestone-name { font-size: 9px; }
.roadmap-board.is-compact .milestone-date { font-size: 9px; }
.roadmap-board.is-compact .milestone.is-marker-tight .milestone-marker { transform: translateX(-50%) scale(.9); filter: drop-shadow(0 2px 3px rgba(38,49,75,.14)); }
.roadmap-board.is-compact .milestone.is-marker-tight .milestone-marker::after { background: linear-gradient(145deg, color-mix(in srgb, var(--project-color) 12%, #fff), color-mix(in srgb, var(--project-color) 34%, #fff)); }

.today-guide { position: absolute; top: 0; bottom: 0; z-index: 2; width: 0; border-left: 2px dotted rgba(94,80,236,.58); pointer-events: none; }
.comparison-layer { position: absolute; inset: 0; z-index: 5; overflow: visible; pointer-events: none; }
.comparison-link-path { fill: none; stroke: #8793a6; stroke-width: 1.55; stroke-dasharray: 6 5; opacity: .66; transition: opacity .15s ease, stroke .15s ease, stroke-width .15s ease, filter .15s ease; }
.comparison-link-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.comparison-link.is-active .comparison-link-path { marker-end: url(#comparison-arrow-active); stroke: var(--link-color); stroke-width: 3; stroke-dasharray: 8 4; opacity: 1; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--link-color) 52%, transparent)); }
.comparison-link.is-muted .comparison-link-path { opacity: .1; }
.milestone.is-comparison-active { z-index: 12; }
.milestone.is-comparison-active .milestone-date,
.milestone.is-comparison-active .milestone-name { color: var(--active-link-color); font-weight: 900; }
.milestone.is-comparison-active .milestone-marker { transform: translateX(-50%) scale(1.13); filter: drop-shadow(0 0 7px color-mix(in srgb, var(--active-link-color) 70%, transparent)); }
.history-section { margin-top: 22px; padding: 28px; border: 1px solid #dfe4ed; border-radius: 18px; background: #fff; box-shadow: 0 18px 48px rgba(28,40,71,.07); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.history-list { display: grid; gap: 12px; }
.history-card { position: relative; display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; padding: 19px; border: 1px solid #e2e7ef; border-radius: 14px; background: linear-gradient(135deg, #fff, #fafbfd); box-shadow: 0 6px 18px rgba(31,44,72,.04); }
.history-date { display: flex; flex-direction: column; justify-content: center; height: 62px; border-radius: 11px; color: #5b4d00; background: linear-gradient(145deg, #fff38b, #ffe25a); box-shadow: 0 6px 14px rgba(164,131,0,.12); text-align: center; }
.history-date span { font-size: 15px; font-weight: 900; }
.history-date b { margin-top: 3px; font-size: 10px; opacity: .72; }
.history-copy h3 { font-size: 15px; }
.history-copy p { margin: 7px 0 0; color: #465066; font-size: 12px; line-height: 1.75; }
.history-edit { align-self: start; padding: 6px 9px; border: 1px solid #e0e4ec; border-radius: 7px; color: #5d6880; background: #fff; font-size: 11px; }
.history-edit:hover { color: var(--primary); border-color: #c5ccdc; }
.empty-state { padding: 42px; border: 1px dashed #d9dee7; border-radius: 12px; color: #8a94a5; text-align: center; font-size: 12px; }

.modal { width: min(520px, calc(100% - 40px)); max-height: calc(100vh - 50px); padding: 0; overflow: auto; border: 0; border-radius: 16px; color: var(--ink); box-shadow: 0 30px 80px rgba(18,28,51,.24); }
.modal::backdrop { background: rgba(17,26,47,.44); backdrop-filter: blur(4px); }
.modal form { display: grid; gap: 16px; padding: 25px; }
.detail-content { display: grid; gap: 21px; padding: 25px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.close-button { width: 33px; height: 33px; padding: 0; border: 0; border-radius: 8px; color: #69748a; background: #f2f4f7; font-size: 21px; }
.modal label, .modal .project-color-field { display: grid; gap: 7px; color: #4b576d; font-size: 12px; font-weight: 750; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 10px 11px; border: 1px solid #dfe4ed; border-radius: 8px; outline: none; color: var(--ink); background: #fff; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(70,87,216,.1); }
.modal input[type="color"] { height: 40px; padding: 4px; }
.project-color-field { min-width: 0; }
.project-color-control { display: flex; align-items: center; gap: 9px; }
.modal .project-color-control input[type="color"] { flex: 1; min-width: 0; }
.project-color-code { flex: 0 0 65px; color: #68738a; font-size: 10px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.color-swatches { display: flex; align-items: center; gap: 7px; min-height: 27px; padding-top: 2px; }
.color-swatch { width: 23px; height: 23px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--swatch-color); box-shadow: 0 0 0 1px #d6dce7, 0 2px 5px rgba(31,43,68,.12); cursor: pointer; transition: transform .14s ease, box-shadow .14s ease; }
.color-swatch:hover { transform: translateY(-1px) scale(1.06); box-shadow: 0 0 0 2px color-mix(in srgb, var(--swatch-color) 55%, #fff), 0 4px 8px rgba(31,43,68,.15); }
.color-swatch.is-selected { transform: scale(1.08); box-shadow: 0 0 0 2px #273247, 0 4px 8px rgba(31,43,68,.17); }
.color-swatch:focus-visible { outline: 3px solid rgba(70,87,216,.2); outline-offset: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-row-checks { grid-template-columns: max-content max-content; gap: 24px; }
.modal .check-field { display: flex; align-items: center; gap: 8px; }
.modal .check-field input { width: 16px; height: 16px; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.modal-actions-split { justify-content: space-between; }
.modal-actions-split > div { display: flex; gap: 9px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.detail-field { padding: 14px; border: 1px solid #e5e9f0; border-radius: 10px; background: #fafbfc; }
.detail-field-wide { grid-column: 1 / -1; }
.detail-field > span { display: block; margin-bottom: 6px; color: #8a93a5; font-size: 10px; }
.detail-field strong { color: #28354e; font-size: 13px; }
.detail-field p { margin: 0; color: #4d596f; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.is-hidden { display: none !important; }

.admin-shell { width: min(780px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0; }
.admin-back { display: inline-flex; margin-bottom: 26px; color: var(--muted); font-size: 13px; text-decoration: none; }
.admin-card { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(28,40,71,.08); }
.admin-card + .admin-card { margin-top: 16px; }
.admin-card h1 { font-size: 28px; }
.admin-card h2 { font-size: 18px; }
.admin-card label { display: grid; gap: 8px; margin-top: 22px; color: #49556c; font-size: 12px; font-weight: 700; }
.admin-card input { width: 100%; padding: 12px; border: 1px solid #dfe4ed; border-radius: 9px; outline: none; }
.admin-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(70,87,216,.1); }
.admin-card .button { margin-top: 14px; }
.permission-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.permission-copy p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.switch { position: relative; flex: 0 0 auto; width: 58px; height: 32px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cfd5df; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(26px); }
.switch input:disabled + span { cursor: wait; opacity: .65; }
.admin-status { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.admin-session-actions { display: flex; align-items: center; gap: 9px; }
.admin-session-actions .button { display: inline-flex; align-items: center; justify-content: center; margin-top: 0; text-decoration: none; }
.admin-error { min-height: 20px; margin: 10px 0 0; color: #d34b4b; font-size: 12px; }
.security-note { margin: 16px 0 0; padding: 13px 15px; border-radius: 10px; color: #725b1e; background: #fff8df; font-size: 12px; line-height: 1.6; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 40; padding: 10px 16px; border-radius: 9px; color: #fff; background: #24304a; box-shadow: 0 10px 30px rgba(17,28,51,.2); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; font-size: 13px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1220px) {
  .app-shell { width: calc(100% - 28px); }
  .topbar { align-items: flex-start; }
  .roadmap-toolbar { align-items: flex-start; padding-block: 12px; }
}
