html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

:root {
  --robo-navy-950: #071629;
  --robo-navy-900: #0b1f3a;
  --robo-navy-800: #123257;
  --robo-red: #d7193f;
  --robo-red-dark: #b20f31;
  --robo-blue: #2d63d7;
  --robo-surface: #ffffff;
  --robo-canvas: #f4f6f9;
  --robo-border: #dfe4ec;
  --robo-text: #152033;
  --robo-muted: #667085;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html { position: relative; min-height: 100%; }
body { margin-bottom: 60px; background: var(--robo-canvas); color: var(--robo-text); }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color); text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }

.workspace-page { max-width: var(--app-content-max,1440px); margin: 0 auto; padding: 2rem 1rem 4rem; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.workspace-header h1 { margin: .25rem 0 .4rem; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 750; letter-spacing: -.035em; }
.workspace-header p { margin: 0; max-width: 760px; color: #667085; }
.workspace-eyebrow { display: block; color: #667085; font-size: .74rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.workspace-card { display: block; padding: 1.35rem; background: #fff; border: 1px solid #e5e9f2; border-radius: 16px; box-shadow: 0 6px 22px rgba(26, 38, 60, .055); color: inherit; text-decoration: none; }
a.workspace-card:hover { border-color: #cfd7e6; color: inherit; transform: translateY(-1px); transition: .16s ease; }
.table-card { padding: 0; overflow: hidden; }
.form-card { padding: 1.5rem; }
.form-section + .form-section { border-top: 1px solid #edf0f5; padding-top: 1.5rem; }
.form-control, .form-select { min-height: 44px; border-color: #d7dde8; border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: #5d7cf5; box-shadow: 0 0 0 .2rem rgba(72, 102, 224, .12); }
.form-label { font-weight: 650; color: #344054; }
.form-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-section-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.2rem 1.35rem; }
.workspace-card > .card-section-header { padding: 0 0 1.1rem; }
.table-card > .card-section-header { padding: 1.2rem 1.35rem; border-bottom: 1px solid #edf0f5; }
.card-section-header h2 { margin: 0 0 .2rem; font-size: 1.08rem; font-weight: 750; }
.card-section-header p { margin: 0; color: #667085; font-size: .9rem; }
.workspace-table th { padding: .8rem 1rem; border-bottom-color: #e9edf4; color: #667085; font-size: .73rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.workspace-table td { padding: .95rem 1rem; border-bottom-color: #edf0f5; }
.workspace-table tbody tr:last-child td { border-bottom: 0; }
.empty-state { padding: 3.5rem 1.5rem; text-align: center; }
.empty-state.compact { padding: 2.2rem 1rem; }
.empty-state h2, .empty-state h3 { margin-bottom: .4rem; font-size: 1.15rem; font-weight: 750; }
.empty-state p { max-width: 560px; margin: 0 auto 1rem; color: #667085; }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: .2rem .55rem; border: 1px solid #dfe4ec; border-radius: 999px; background: #f8fafc; color: #475467; font-size: .75rem; font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.metric-card strong, .metric-value { display: block; margin-top: .45rem; font-size: 1.65rem; font-weight: 780; letter-spacing: -.035em; }
.metric-card small { display: block; margin-top: .35rem; color: #667085; }
.detail-value { margin-top: .45rem; font-size: 1rem; font-weight: 700; word-break: break-word; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.detail-grid.single-column { grid-template-columns: 1fr; }
.detail-grid > div { padding: .8rem 0; border-bottom: 1px solid #edf0f5; }
.detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.detail-grid.single-column > div:last-child { border-bottom: 0; }
.detail-grid dt { color: #667085; font-size: .78rem; font-weight: 650; }
.detail-grid dd { margin: .25rem 0 0; color: #1d2939; font-weight: 700; }
.action-list { display: flex; flex-direction: column; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid #edf0f5; color: #344054; text-decoration: none; }
.action-row:last-child { border-bottom: 0; }
.action-row:hover { color: #3154d7; }
.action-row span { display: flex; flex-direction: column; }
.action-row small { color: #667085; font-weight: 400; }
.allocation-list { display: flex; flex-direction: column; }
.allocation-row { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #edf0f5; }
.allocation-row:last-child { border-bottom: 0; }
.total-row { font-weight: 750; }

/* Command center: airline-inspired operational visual language */
.command-page { max-width: var(--app-content-max,1500px); margin: 0 auto; padding: 0 0 4rem; }
.command-hero { position: relative; display: flex; justify-content: space-between; gap: 2rem; padding: 2.7rem 2.4rem; margin: 0 0 1rem; overflow: hidden; background: linear-gradient(120deg, var(--robo-navy-950), var(--robo-navy-800)); color: #fff; border-radius: 0 0 20px 20px; box-shadow: 0 14px 36px rgba(6, 23, 43, .18); }
.command-hero::after { content: ""; position: absolute; right: -100px; top: -155px; width: 390px; height: 390px; border: 80px solid rgba(255,255,255,.045); transform: rotate(31deg); }
.command-hero__copy { position: relative; z-index: 1; max-width: 820px; }
.command-hero h1 { margin: .35rem 0 .65rem; max-width: 780px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.02; font-weight: 780; letter-spacing: -.045em; }
.command-hero p { margin: 0; max-width: 720px; color: #c8d4e6; font-size: 1.02rem; }
.command-kicker { color: #8da5c6; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.command-hero .command-kicker { color: #a8bad2; }
.command-hero__actions { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: .65rem; flex-wrap: wrap; }
.command-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1rem; border: 1px solid transparent; color: #fff; font-weight: 750; text-decoration: none; transition: .16s ease; }
.command-btn:hover { transform: translateY(-1px); color: #fff; }
.command-btn--accent { background: var(--robo-red); }
.command-btn--accent:hover { background: var(--robo-red-dark); }
.command-btn--ghost { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.06); }
.command-btn--ghost:hover { background: rgba(255,255,255,.12); }
.command-shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 1rem; background: #fff; border: 1px solid var(--robo-border); box-shadow: 0 5px 18px rgba(20, 35, 58, .05); }
.command-shortcuts a { position: relative; padding: 1rem 1.15rem; border-right: 1px solid #e7ebf1; color: var(--robo-navy-900); text-decoration: none; }
.command-shortcuts a:last-child { border-right: 0; }
.command-shortcuts a::before { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: transparent; }
.command-shortcuts a:hover::before { background: var(--robo-red); }
.command-shortcuts span { display: block; font-weight: 780; }
.command-shortcuts small { display: block; margin-top: .15rem; color: var(--robo-muted); }
.command-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.command-metric { min-height: 142px; padding: 1.2rem; background: #fff; border: 1px solid var(--robo-border); border-top: 4px solid #cad2df; box-shadow: 0 5px 18px rgba(19, 36, 60, .045); }
.command-metric--primary { border-top-color: var(--robo-navy-800); }
.command-metric--warning { border-top-color: var(--robo-red); }
.command-metric span { display: block; color: var(--robo-muted); font-size: .74rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.command-metric strong { display: block; margin: .5rem 0 .35rem; color: var(--robo-navy-900); font-size: clamp(1.35rem, 2.2vw, 2rem); letter-spacing: -.04em; }
.command-metric small { color: var(--robo-muted); }
.command-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 1rem; margin-bottom: 1rem; }
.command-grid--analytics { grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); }
.command-grid--bottom { grid-template-columns: minmax(280px, .7fr) minmax(0, 1.6fr); }
.command-panel { min-width: 0; background: #fff; border: 1px solid var(--robo-border); box-shadow: 0 5px 18px rgba(19, 36, 60, .045); }
.command-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid #e8ecf2; }
.command-panel__header h2 { margin: .18rem 0 0; color: var(--robo-navy-900); font-size: 1.08rem; font-weight: 800; }
.command-link { color: var(--robo-blue); font-size: .84rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.command-empty { padding: 2.6rem 1.3rem; color: var(--robo-muted); text-align: center; }
.command-bar-chart { display: grid; grid-template-columns: repeat(12, minmax(34px, 1fr)); gap: .65rem; align-items: end; min-height: 310px; padding: 1.4rem 1.2rem 1rem; overflow-x: auto; }
.command-bar-chart__column { display: grid; grid-template-rows: 30px 205px 22px; min-width: 38px; align-items: end; text-align: center; }
.command-bar-chart__value { color: #667085; font-size: .68rem; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
.command-bar-chart__track { position: relative; height: 205px; background: linear-gradient(to top, #f5f7fa 1px, transparent 1px); background-size: 100% 25%; border-bottom: 1px solid #d5dce7; }
.command-bar-chart__track span { position: absolute; left: 18%; right: 18%; bottom: 0; min-height: 0; background: linear-gradient(180deg, #244f92, var(--robo-navy-900)); border-radius: 2px 2px 0 0; }
.command-bar-chart__column:nth-child(12) .command-bar-chart__track span { background: var(--robo-red); }
.command-bar-chart__column small { align-self: center; color: var(--robo-muted); font-size: .72rem; }
.status-distribution { padding: .5rem 1.2rem 1.1rem; }
.status-distribution__row { display: block; padding: .85rem 0; border-bottom: 1px solid #edf0f4; color: inherit; text-decoration: none; }
.status-distribution__row:last-child { border-bottom: 0; }
.status-distribution__label { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .38rem; }
.status-distribution__label span { color: #344054; font-weight: 700; }
.status-distribution__label strong { color: var(--robo-navy-900); }
.status-distribution__track { height: 7px; background: #edf1f5; overflow: hidden; }
.status-distribution__track span { display: block; height: 100%; background: var(--robo-navy-800); }
.status-distribution__row:nth-child(3n+2) .status-distribution__track span { background: #5f7ea7; }
.status-distribution__row:nth-child(3n+3) .status-distribution__track span { background: var(--robo-red); }
.status-distribution__row small { display: block; margin-top: .3rem; color: var(--robo-muted); }
.command-table th { padding: .78rem 1rem; background: #f8fafc; color: #667085; border-color: #e7ebf1; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.command-table td { padding: .9rem 1rem; border-color: #edf0f4; }
.command-table td a { color: var(--robo-navy-900); font-weight: 750; text-decoration: none; }
.command-table td small { display: block; color: var(--robo-muted); }
.command-list { padding: .25rem 1.2rem; }
.command-list__row { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid #edf0f4; color: inherit; text-decoration: none; }
.command-list__row:last-child { border-bottom: 0; }
.command-list__row span { display: flex; min-width: 0; flex-direction: column; }
.command-list__row span strong { color: var(--robo-navy-900); }
.command-list__row small { color: var(--robo-muted); }
.command-detail-list { margin: 0; padding: .45rem 1.2rem 1rem; }
.command-detail-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #edf0f4; }
.command-detail-list > div:last-child { border-bottom: 0; }
.command-detail-list dt { color: var(--robo-muted); font-weight: 600; }
.command-detail-list dd { margin: 0; color: var(--robo-navy-900); font-weight: 800; }
.command-timeline { padding: .45rem 1.25rem 1rem; }
.command-timeline__item { display: grid; grid-template-columns: 12px 1fr; gap: .75rem; padding: .7rem 0; }
.command-timeline__item > span { width: 9px; height: 9px; margin-top: .35rem; background: var(--robo-red); border-radius: 50%; box-shadow: 0 0 0 4px #fdecef; }
.command-timeline__item div { display: flex; flex-direction: column; }
.command-timeline__item strong { color: var(--robo-navy-900); }
.command-timeline__item small { margin-top: .15rem; color: var(--robo-muted); }

@media (max-width: 1199.98px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .command-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .command-shortcuts a:nth-child(3) { border-right: 0; }
  .command-shortcuts a:nth-child(n+4) { border-top: 1px solid #e7ebf1; }
}
@media (max-width: 900px) {
  .command-hero { flex-direction: column; padding: 2.1rem 1.4rem; }
  .command-grid, .command-grid--analytics, .command-grid--bottom { grid-template-columns: 1fr; }
  .command-bar-chart { grid-template-columns: repeat(12, 52px); }
}
@media (max-width: 767.98px) {
  .workspace-page { padding: 1.25rem .25rem 3rem; }
  .workspace-header { flex-direction: column; }
  .workspace-header > div:last-child { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div { border-bottom: 1px solid #edf0f5 !important; }
  .detail-grid > div:last-child { border-bottom: 0 !important; }
  .workspace-card { border-radius: 13px; }
  .command-page { margin-left: -.75rem; margin-right: -.75rem; }
  .command-hero { border-radius: 0; }
  .command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding: 0 .65rem; }
  .command-metric { min-height: 128px; }
  .command-shortcuts { grid-template-columns: 1fr 1fr; margin-left: .65rem; margin-right: .65rem; }
  .command-shortcuts a { border-top: 1px solid #e7ebf1; border-right: 1px solid #e7ebf1; }
  .command-shortcuts a:nth-child(-n+2) { border-top: 0; }
  .command-shortcuts a:nth-child(even) { border-right: 0; }
  .command-grid { padding: 0 .65rem; }
}
