:root {
  --brand: #D7005B;
  --brand-dark: #a90046;
  --ink: #20242a;
  --muted: #6a7280;
  --line: #dde2ea;
  --panel: #ffffff;
  --page: #f5f7fa;
  --good: #0e8f62;
  --warn: #c77800;
  --bad: #c92a2a;
  --blue: #1e63b6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--page);
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
}

.login-visual {
  padding: 48px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(215, 0, 91, 0.94), rgba(22, 25, 31, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 88px);
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-visual h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.04;
}

.login-visual p {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.7;
}

.login-title-lockup {
  margin-top: auto;
}

.login-logo {
  font-size: clamp(48px, 8vw, 110px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.login-card {
  background: #fff;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: #424a55;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.12);
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.check-result {
  min-height: 18px;
  margin: 0;
}

.check-result.ok {
  color: var(--good);
}

.check-result.bad {
  color: var(--danger);
}

.primary,
.secondary,
.ghost,
.danger {
  border-radius: 8px;
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.primary:hover {
  background: var(--brand-dark);
}

.secondary {
  background: #20242a;
  color: #fff;
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger {
  background: #fff1f1;
  color: var(--bad);
  border: 1px solid #f2c2c2;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.error {
  border: 1px solid #f2c2c2;
  background: #fff1f1;
  color: var(--bad);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: #16191f;
  color: #dce2ea;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
}

.account-box {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.account-box strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  text-align: left;
  color: #dce2ea;
  background: transparent;
  border-radius: 8px;
  padding: 11px 12px;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  background: rgba(215, 0, 91, 0.18);
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h2 {
  margin: 0;
  font-size: 26px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.date-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.date-filter label,
.date-filter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.date-filter input {
  width: 142px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.grid {
  display: grid;
  gap: 16px;
}

.cards {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card {
  padding: 16px;
}

.metric-card {
  text-align: left;
}

.metric-card:hover {
  border-color: rgba(215, 0, 91, 0.38);
}

.card.accent {
  border-color: rgba(215, 0, 91, 0.42);
  box-shadow: inset 4px 0 0 var(--brand);
}

.card.accent-soft {
  box-shadow: inset 4px 0 0 rgba(215, 0, 91, 0.42);
}

.card.good-card {
  box-shadow: inset 4px 0 0 var(--good);
}

.card.warn-card {
  box-shadow: inset 4px 0 0 var(--warn);
}

.card.danger-card {
  border-color: rgba(201, 42, 42, 0.32);
  box-shadow: inset 4px 0 0 var(--bad);
}

.card .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card .value {
  font-size: 30px;
  font-weight: 900;
  margin-top: 8px;
}

.kpi-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.panel {
  padding: 18px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-weight: 900;
  text-align: left;
}

.link-button:hover {
  color: var(--brand);
}

.request-title-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filter-banner {
  border: 1px solid rgba(215, 0, 91, 0.2);
  border-radius: 8px;
  background: #fff7fb;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.request-filter-form {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.request-filter-form .field {
  margin-bottom: 0;
}

.request-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.detail-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  border-bottom: 1px solid #edf0f4;
  padding-bottom: 10px;
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-copy {
  margin-top: 18px;
}

.detail-copy h4 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.detail-copy p {
  margin: 0;
  color: #424a55;
  line-height: 1.6;
  white-space: pre-wrap;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
}

.attachment-link:hover {
  border-color: rgba(215, 0, 91, 0.45);
}

.attachment-link span {
  color: var(--muted);
  font-size: 12px;
}

.status-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.status-actions h4 {
  margin: 0 0 4px;
}

.request-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.request-action-row.compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(62px, 1fr));
}

.compact-action {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  border: 1px solid rgba(14, 143, 98, 0.22);
  border-radius: 8px;
  background: #f0fff7;
  color: #075f42;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(20, 26, 34, 0.16);
  cursor: pointer;
}

.toast.bad {
  border-color: rgba(201, 42, 42, 0.24);
  background: #fff5f5;
  color: var(--danger);
}

.comment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.comment-head div {
  display: grid;
  gap: 3px;
}

.comment-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.comment-item p {
  margin: 6px 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.comment-item .attachment-list {
  margin: 8px 0;
}

.comment-item span {
  color: var(--muted);
  font-size: 12px;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-form textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  resize: vertical;
}

.answer-list,
.template-answer-list,
.template-field-list {
  display: grid;
  gap: 10px;
}

.answer-item,
.template-answer-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.answer-item p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  color: #424a55;
}

.template-answer-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.template-answer-head span {
  color: var(--muted);
  font-size: 12px;
}

.template-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.check-inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.check-inline input {
  width: auto;
}

.reply-target {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(215, 0, 91, 0.22);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--brand);
  padding: 8px 10px;
  font-weight: 800;
}

.reply-target[hidden] {
  display: none;
}

.backup-panel {
  margin-top: 16px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dashboard-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.dashboard-wide {
  grid-template-columns: 1.15fr 1fr;
  margin-top: 16px;
}

.dashboard-recent {
  margin-top: 16px;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 10px 12px 12px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-tab.active {
  border-color: var(--brand);
  color: var(--brand);
}

.chart-panel {
  min-height: 270px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 142px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: #fff;
}

.donut span {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
  font-weight: 900;
  font-size: 26px;
}

.donut small {
  color: var(--muted);
  font-size: 12px;
}

.donut-legend {
  display: grid;
  gap: 8px;
}

.donut-legend div {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.donut-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.line-chart svg {
  width: 100%;
  height: 138px;
}

.line-chart line {
  stroke: #d9dee7;
  stroke-width: 1;
}

.line-chart polyline {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart .created {
  stroke: var(--brand);
}

.line-chart .completed {
  stroke: var(--good);
}

.line-labels,
.chart-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend {
  justify-content: flex-start;
  margin-top: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.created-dot,
.completed-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.created-dot {
  background: var(--brand);
}

.completed-dot {
  background: var(--good);
}

.mini-bars,
.drill-list,
.risk-list,
.flow-list {
  display: grid;
  gap: 10px;
}

.target-picker {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.target-picker input {
  margin: 0;
}

.selected-targets,
.target-picker-list,
.collab-list {
  display: grid;
  gap: 8px;
}

.selected-target-chip,
.target-option,
.collab-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: grid;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.selected-target-chip {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
  text-align: left;
}

.selected-target-chip strong,
.target-option b {
  color: var(--brand);
  font-size: 12px;
}

.target-picker-list {
  max-height: 300px;
  overflow: auto;
}

.target-option {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
  text-align: left;
}

.target-option span,
.collab-row span {
  display: grid;
  gap: 3px;
}

.target-option em,
.collab-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.section-work-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.section-work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.section-work-card strong {
  color: var(--brand);
  font-size: 24px;
}

.section-work-card span {
  color: var(--ink);
  font-weight: 900;
}

.section-work-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.section-board {
  display: grid;
  gap: 6px;
}

.section-board-head,
.section-board-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.5fr) repeat(3, minmax(48px, 0.5fr));
  gap: 8px;
  align-items: center;
}

.section-board-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.section-board-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}

.section-board-row strong {
  text-align: right;
}

.communication-list {
  display: grid;
  gap: 10px;
}

.communication-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 7px;
}

.communication-item p {
  margin: 0;
  color: #424a55;
  line-height: 1.45;
  white-space: pre-wrap;
}

.communication-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 1.6fr 48px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.ranking-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  grid-template-columns: minmax(120px, 1fr) 1.4fr 56px;
}

.ranking-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.mini-track {
  height: 10px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.drill-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.drill-row summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.drill-row summary::-webkit-details-marker {
  display: none;
}

.drill-row strong,
.drill-row em {
  display: block;
}

.drill-row em,
.drill-summary {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.drill-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.drill-metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
}

.compact-filter {
  min-height: 32px;
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 12px;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.heat-cell {
  min-height: 96px;
  border: 1px solid rgba(215, 0, 91, 0.18);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
}

.heat-cell strong,
.heat-cell span,
.heat-cell em {
  display: block;
}

.heat-cell span,
.heat-cell em {
  margin-top: 8px;
  color: #3f4650;
  font-size: 12px;
  font-style: normal;
}

.risk-item {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.risk-item.warn {
  border-left-color: var(--warn);
}

.risk-item.bad {
  border-left-color: var(--bad);
}

.risk-item span,
.risk-item em {
  display: block;
}

.risk-item strong {
  margin-left: 8px;
}

.risk-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 7px;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 1fr 112px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.flow-row span {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.flow-row em {
  font-style: normal;
  color: var(--muted);
}

.collab-row {
  grid-template-columns: minmax(150px, 1.2fr) 1fr auto;
  padding: 10px;
  text-align: left;
  font-size: 13px;
}

.collab-row small {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-graph-panel {
  margin-bottom: 16px;
}

.echart {
  width: 100%;
  min-height: 280px;
}

.echart-graph {
  min-height: 520px;
}

.echart-wide {
  min-height: 340px;
}

.chart-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chart-action-row span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.scope-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(980px, 72vw);
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}

.scope-tab {
  min-height: 56px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  min-width: 116px;
}

.scope-tab.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(215, 0, 91, 0.2);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analysis-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.analysis-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.analysis-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 1fr 48px;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  background: transparent;
  padding: 7px 0;
  color: var(--ink);
  text-align: left;
  font-size: 12px;
}

.analysis-row i {
  height: 8px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.analysis-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.analysis-row strong {
  text-align: right;
}

.setup-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.setup-steps div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.setup-steps strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.setup-steps span {
  color: var(--ink);
  line-height: 1.5;
  font-size: 13px;
}

.setup-steps b {
  font-weight: 900;
}

.org-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.org-tree-panel {
  position: sticky;
  top: 20px;
}

.org-tree-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 2px;
}

.org-tree-item,
.org-child-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.org-tree-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 6px;
  padding: 10px 12px;
}

.org-tree-item .tree-branch {
  color: var(--brand);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.org-tree-item.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(215, 0, 91, 0.1);
}

.org-tree-item strong,
.org-child-item strong {
  font-size: 14px;
}

.org-tree-item span,
.org-child-item span {
  color: #6b7280;
  font-size: 12px;
}

.org-tree-item > span:last-child {
  grid-column: 2;
}

.org-detail-stack {
  display: grid;
  gap: 16px;
}

.org-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.org-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  padding: 12px;
}

.org-summary span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.org-summary strong {
  font-size: 18px;
}

.org-child-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.org-child-item {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.org-child-item:hover,
.org-tree-item:hover {
  border-color: rgba(215, 0, 91, 0.45);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.columns-2 {
  grid-template-columns: 1.3fr 1fr;
}

.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 56px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #eef1f5;
  overflow: hidden;
}

.bar-track.tall {
  height: 14px;
  margin-top: 12px;
}

.bar {
  height: 100%;
  background: var(--brand);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid #edf0f4;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #596273;
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #eef1f5;
  color: #4d5663;
}

.badge.good {
  background: #e8f7f0;
  color: var(--good);
}

.badge.warn {
  background: #fff3df;
  color: var(--warn);
}

.badge.bad {
  background: #fff1f1;
  color: var(--bad);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.span-2 {
  grid-column: span 2;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  text-align: center;
  background: #fff;
}

.slot.busy {
  color: #8a1d1d;
  background: #fff1f1;
}

.slot.open {
  color: #155f42;
  background: #ecfbf4;
}

.reservation-list {
  display: grid;
  gap: 10px;
}

.reservation-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.space-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.compact-item {
  padding: 10px 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.inline-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.space-calendar-panel {
  margin-top: 16px;
}

.calendar-wrap {
  overflow-x: auto;
}

.space-calendar {
  min-width: 980px;
  display: grid;
  grid-template-columns: 180px repeat(7, minmax(110px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.calendar-corner,
.calendar-day,
.calendar-space,
.calendar-cell {
  border-right: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
}

.calendar-corner,
.calendar-day {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.calendar-space {
  min-height: 94px;
  padding: 12px;
  background: #fbfcfe;
}

.calendar-space strong,
.calendar-space span {
  display: block;
}

.calendar-space span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-cell {
  min-height: 94px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.calendar-chip {
  width: 100%;
  border: 1px solid rgba(215, 0, 91, 0.18);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--ink);
  padding: 8px;
  text-align: left;
}

.calendar-chip strong,
.calendar-chip span {
  display: block;
}

.calendar-chip strong {
  font-size: 12px;
}

.calendar-chip span {
  margin-top: 3px;
  font-size: 12px;
}

.empty-slot {
  color: #a1a9b5;
  font-size: 12px;
}

.footer-note {
  margin-top: auto;
  color: #9da7b6;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-main,
  .dashboard-wide,
  .request-filter-form,
  .org-admin-layout,
  .columns-2,
  .columns-3 {
    grid-template-columns: 1fr;
  }

  .org-tree-panel {
    position: static;
  }

  .org-tree-list {
    max-height: 360px;
  }

  .heat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 260px;
    padding: 28px;
  }

  .login-card {
    padding: 28px;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar .toolbar {
    width: 100%;
  }

  .date-filter,
  .date-filter input {
    width: 100%;
  }

  .input-action,
  .collab-row,
  .template-field-row,
  .section-board-head,
  .section-board-row {
    grid-template-columns: 1fr;
  }

  .section-work-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-tabs {
    width: 100%;
    max-width: 100%;
  }

  .cards,
    .form-grid,
    .inline-form,
    .slot-grid,
  .heat-grid,
  .analysis-grid,
  .donut-wrap,
  .mini-bar-row,
  .flow-row {
    grid-template-columns: 1fr;
  }

  .org-summary,
  .org-child-list {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .echart {
    min-height: 260px;
  }

  .echart-graph {
    min-height: 430px;
  }
}
