:root {
  color-scheme: light;
  --ink: #142b42;
  --ink-soft: #5f748a;
  --navy: #102a43;
  --navy-light: #1e4f78;
  --page: #f4f7fb;
  --surface: #ffffff;
  --line: #d5e1eb;
  --blue: #356fd6;
  --green: #278b56;
  --amber: #d78a08;
  --red: #cd4149;
  --teal: #20a0a0;
  --focus: #ffbf47;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

/* Revision 16 surface: calm task-oriented workspace */
.sidebar {
  width: 16rem;
  padding: 2rem 1.2rem 1.5rem;
  background: linear-gradient(180deg, #132d46 0%, #0d2236 100%);
  box-shadow: 0.5rem 0 2rem rgb(15 35 55 / 8%);
}
.workspace { margin-left: 16rem; }
.brand { padding-left: 0.9rem; }
.brand-title { font-size: 1.5rem; letter-spacing: 0.08em; }
.brand-subtitle { color: #77c8bd; letter-spacing: 0.22em; }
.nav-section-label {
  margin: 0 0 0.55rem;
  padding: 0 0.9rem;
  color: #7890a5;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.nav-section-admin { margin-top: 2rem; }
.nav-item {
  grid-template-columns: 2rem 1fr;
  min-height: 3.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.8rem;
  color: #b9cada;
  font-weight: 650;
}
.nav-item:hover:not(:disabled) { background: rgb(255 255 255 / 7%); }
.nav-item.is-active {
  color: #fff;
  background: linear-gradient(135deg, #356fd6, #2b80a9);
  box-shadow: 0 0.6rem 1.2rem rgb(0 0 0 / 16%);
}
.nav-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.6rem;
  background: rgb(255 255 255 / 8%);
  font-size: 1rem;
}
.nav-item.is-active .nav-icon { background: rgb(255 255 255 / 16%); }
.topbar {
  min-height: 8rem;
  padding-inline: clamp(1.5rem, 3.2vw, 3.2rem);
  border-bottom: 0;
  box-shadow: 0 1px 0 var(--line);
}
.topbar h1 { color: #17304a; font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -0.035em; }
.content { padding: clamp(1.5rem, 3vw, 3rem); }
.welcome-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 20rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  color: #fff;
  background:
    radial-gradient(circle at 10% 0%, rgb(104 207 190 / 24%), transparent 26rem),
    linear-gradient(125deg, #163b59 0%, #245a78 62%, #2a7991 100%);
  border-radius: 1.35rem;
  box-shadow: 0 1.25rem 2.8rem rgb(22 59 89 / 20%);
  overflow: hidden;
}
.welcome-panel::after {
  position: absolute;
  width: 22rem;
  height: 22rem;
  right: -8rem;
  bottom: -13rem;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  box-shadow: 0 0 0 3.5rem rgb(255 255 255 / 3%), 0 0 0 7rem rgb(255 255 255 / 2%);
  content: "";
}
.welcome-copy, .workflow-progress { position: relative; z-index: 1; }
.welcome-kicker, .section-kicker, .progress-label {
  display: block;
  margin-bottom: 0.65rem;
  color: #8ee0d1;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.welcome-copy h2 { max-width: 42rem; margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.045em; }
.welcome-copy p { max-width: 43rem; margin: 1.2rem 0 1.7rem; color: #d8e9f1; font-size: 1.02rem; line-height: 1.65; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.workflow-button, .quiet-button {
  min-height: 3.25rem;
  padding: 0.8rem 1.2rem;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 800;
}
.workflow-button { display: flex; gap: 1rem; align-items: center; color: #14374e; background: #8ee0d1; border: 0; }
.workflow-button:hover { background: #a6ecdf; transform: translateY(-1px); }
.quiet-button { color: #fff; background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 28%); }
.quiet-button:hover { background: rgb(255 255 255 / 14%); }
.workflow-progress { padding: 1.4rem; background: rgb(7 35 54 / 34%); border: 1px solid rgb(255 255 255 / 13%); border-radius: 1rem; backdrop-filter: blur(8px); }
.workflow-progress ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.workflow-progress li { position: relative; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.8rem; min-height: 4.2rem; color: #b9ced9; }
.workflow-progress li:not(:last-child)::after { position: absolute; top: 2.15rem; bottom: 0; left: 1.05rem; width: 1px; background: rgb(255 255 255 / 20%); content: ""; }
.workflow-progress li > span { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border: 1px solid rgb(255 255 255 / 25%); border-radius: 50%; font-size: 0.78rem; font-weight: 850; }
.workflow-progress li.is-current > span { color: #15394f; background: #8ee0d1; border-color: #8ee0d1; }
.workflow-progress strong, .workflow-progress small { display: block; }
.workflow-progress strong { margin-top: 0.05rem; color: #fff; font-size: 0.88rem; }
.workflow-progress small { margin-top: 0.2rem; color: #9eb6c4; }
.section-intro { display: flex; align-items: end; justify-content: space-between; margin: 2.25rem 0 1rem; }
.section-intro .section-kicker { margin-bottom: 0.3rem; color: var(--blue); }
.section-intro h2 { margin: 0; color: #17304a; font-size: 1.35rem; }
.live-indicator { display: flex; gap: 0.5rem; align-items: center; color: var(--ink-soft); font-size: 0.76rem; font-weight: 700; }
.live-indicator i { width: 0.55rem; height: 0.55rem; background: #35a66e; border-radius: 50%; box-shadow: 0 0 0 0.25rem #e1f3e9; }
.kpi-card { border: 0; border-radius: 1rem; box-shadow: 0 0.5rem 1.6rem rgb(16 42 67 / 7%); }
.kpi-card::before { inset: auto 1.3rem 1.1rem; width: 2.4rem; height: 0.25rem; border-radius: 1rem; }

@media (max-width: 74rem) {
  .welcome-panel { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
}

button, input, select { font: inherit; }
button, a, input, select { outline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--focus);
  border-radius: 0.4rem;
}
.skip-link:focus { transform: translateY(0); }

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 15% 15%, rgba(35, 101, 209, 0.18), transparent 34rem),
    linear-gradient(145deg, #0b2033, #173b5b);
}

.auth-card {
  width: min(100%, 34rem);
  padding: clamp(2rem, 6vw, 3.5rem);
  background: var(--surface);
  border-radius: 1rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.25);
}
.auth-card h1 { margin: 0.5rem 0 1rem; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.auth-copy { margin: 0 0 1.5rem; color: var(--ink-soft); line-height: 1.65; }
.auth-note { margin: 1.5rem 0 0; color: var(--ink-soft); font-size: 0.875rem; line-height: 1.5; }
.notice { padding: 0.8rem 1rem; color: #6f4800; background: #fff4d7; border-radius: 0.5rem; }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1.4rem;
  color: #fff;
  text-decoration: none;
  background: var(--blue);
  border: 0;
  border-radius: 0.5rem;
  font-weight: 700;
}
.primary-button:hover { background: #174ea8; }

.role-home { display: grid; gap: 1.35rem; }
.role-home-heading {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0 0.35rem;
}
.role-home-heading h2 { margin: 0.15rem 0 0.25rem; color: var(--navy); font-size: clamp(1.8rem, 3vw, 2.45rem); }
.role-home-heading p:not(.eyebrow) { margin: 0; color: var(--ink-soft); }
.role-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.role-kpi-grid article {
  min-height: 8rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.6rem rgb(16 42 67 / 6%);
}
.role-kpi-grid span, .role-kpi-grid small { display: block; color: var(--ink-soft); }
.role-kpi-grid strong { display: block; margin-top: 0.65rem; color: #145cc6; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.role-kpi-grid small { margin-top: 0.45rem; font-size: 0.75rem; }
.role-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.role-action-panel { padding: 1.3rem; }
.role-action-panel h3 { margin: 0 0 1rem; }
.role-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.role-action-grid button, .role-action-row button {
  min-height: 4.25rem;
  padding: 0.9rem 1rem;
  color: #174f9b;
  background: #fff;
  border: 1px solid #b9cce4;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 800;
}
.role-action-grid button:hover, .role-action-row button:hover { background: #eef5ff; border-color: var(--blue); }
.role-action-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.role-action-row button { min-height: 3.2rem; }
.role-record-list, .role-status-list { display: grid; gap: 0.15rem; }
.role-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 3.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #e6edf4;
}
.role-record:last-child { border-bottom: 0; }
.role-record strong, .role-record small { display: block; }
.role-record small { margin-top: 0.2rem; color: var(--ink-soft); }
.role-record button { color: var(--blue); background: transparent; border: 0; cursor: pointer; font-weight: 800; }
.readonly-badge { padding: 0.65rem 0.9rem; color: #145cc6; background: #eaf2ff; border-radius: 999px; font-weight: 800; }
.external-start-card { display: grid; min-height: 12rem; place-items: center; align-content: center; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem; }
.external-start-card > span { display: grid; width: 4.5rem; height: 4.5rem; place-items: center; color: var(--blue); background: #eaf2ff; border-radius: 50%; font-size: 2rem; }
.external-start-card .primary-button { min-width: 15rem; font-size: 1.1rem; }
.external-steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem; list-style-position: inside; }
.external-steps li { color: var(--ink-soft); text-align: center; font-weight: 750; }
.external-steps li.is-current { color: var(--blue); }
.external-machine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.external-machine-card { padding: 1rem; border: 1px solid var(--line); border-radius: 0.8rem; }
.external-machine-card strong, .external-machine-card small { display: block; }
.external-machine-card small { margin: 0.25rem 0 0.8rem; color: var(--ink-soft); }
.external-service-record { border-bottom: 1px solid #e6edf4; }
.external-service-record:last-child { border-bottom: 0; }
.external-service-record .role-record { border-bottom: 0; }
.external-service-actions { display: grid; justify-items: end; gap: 0.35rem; }
.external-service-actions .secondary-button { padding: 0.35rem 0; color: var(--blue); background: transparent; border: 0; }
.external-correction-form { margin: 0 0 1rem; padding: 0.95rem; background: #f8fbff; border: 1px solid #d8e5f3; border-radius: 0.8rem; }
.external-correction-form .primary-button, .external-correction-form .secondary-button { min-height: 2.75rem; padding: 0.65rem 1rem; border-radius: 0.65rem; }
.external-correction-form .primary-button { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.external-correction-form .secondary-button { color: var(--blue); background: #fff; border: 1px solid #b9cce4; }

@media (max-width: 75rem) {
  .role-kpi-grid, .role-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .external-machine-grid { grid-template-columns: 1fr; }
}

@media (max-width: 52rem) {
  .role-home-heading { align-items: stretch; flex-direction: column; }
  .role-two-column, .role-kpi-grid, .role-action-grid { grid-template-columns: 1fr; }
  .external-steps { grid-template-columns: 1fr; gap: 0.55rem; }
}

.application { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 14rem;
  flex-direction: column;
  padding: 2rem 1.25rem 1.5rem;
  color: #d8e4ef;
  background: var(--navy);
}

.brand { display: flex; flex-direction: column; padding: 0 0.75rem 2.25rem; color: #fff; }
.brand-dark { padding: 0 0 1.75rem; color: var(--navy); }
.brand-title { font-size: 1.7rem; font-weight: 850; letter-spacing: 0.03em; }
.brand-subtitle { color: #a9bed1; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; }
.brand-dark .brand-subtitle { color: var(--ink-soft); }

.navigation { display: grid; gap: 0.35rem; }
.nav-item {
  display: grid;
  grid-template-columns: 0.75rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  color: #c0d0df;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0.65rem;
  cursor: pointer;
}
.nav-item:hover:not(:disabled), .nav-item.is-active { color: #fff; background: var(--navy-light); }
.nav-item:disabled { cursor: default; opacity: 0.62; }
.nav-marker { width: 0.6rem; height: 0.6rem; background: #85a5c0; border-radius: 0.2rem; transform: rotate(45deg); }
.nav-item.is-active .nav-marker { background: #2ab6b4; }
.nav-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; }
.sidebar-footer { margin-top: auto; padding: 0.75rem; color: #8fa8bc; font-size: 0.76rem; }
.sidebar-footer strong { display: block; margin-top: 0.3rem; color: #fff; font-size: 0.85rem; }

.workspace { min-height: 100vh; margin-left: 14rem; }
.topbar {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  min-height: 7.2rem;
  padding: 1.4rem clamp(1.25rem, 3vw, 2.5rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0.15rem 0; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.eyebrow { margin: 0; color: var(--blue); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.subtitle { margin: 0.2rem 0 0; color: var(--ink-soft); }
.topbar-actions { display: flex; gap: 0.8rem; align-items: end; }
.field { display: grid; gap: 0.3rem; color: var(--ink-soft); font-size: 0.75rem; font-weight: 700; }
.field input, .field select {
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b8cad9;
  border-radius: 0.45rem;
}
.user-menu { display: grid; min-width: 8rem; align-self: stretch; align-content: center; padding-left: 0.8rem; border-left: 1px solid var(--line); }
.user-name { overflow: hidden; max-width: 13rem; font-size: 0.85rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.text-button { padding: 0.2rem 0; color: var(--blue); text-align: left; background: transparent; border: 0; cursor: pointer; font-size: 0.75rem; }

.content { width: min(100%, 100rem); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem); }
.status-message { min-height: 1.3rem; margin-bottom: 0.8rem; color: var(--ink-soft); font-size: 0.85rem; }
.status-message.is-error { padding: 0.8rem 1rem; color: #861a22; background: #ffe8e9; border-radius: 0.5rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi-card {
  position: relative;
  display: grid;
  gap: 0.55rem;
  min-height: 9rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: 0 0.25rem 0.8rem rgba(16, 42, 67, 0.04);
  overflow: hidden;
}
.kpi-card::before { position: absolute; inset: 0 auto 0 0; width: 0.38rem; content: ""; }
.accent-green::before { background: var(--green); }
.accent-blue::before { background: var(--blue); }
.accent-amber::before { background: var(--amber); }
.accent-red::before { background: var(--red); }
.kpi-label { color: var(--ink-soft); font-size: 0.82rem; font-weight: 750; }
.kpi-value { align-self: end; font-size: clamp(1.6rem, 2.5vw, 2rem); }
.accent-green .kpi-value { color: var(--green); }
.accent-blue .kpi-value { color: var(--blue); }
.accent-amber .kpi-value { color: var(--amber); }
.accent-red .kpi-value { color: var(--red); }
.kpi-note { color: var(--ink-soft); font-size: 0.78rem; }

.dashboard-grid { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 1.25rem; margin-top: 1.25rem; }
.panel { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.8rem; }
.panel-heading { margin-bottom: 1.25rem; }
.panel-heading h2 { margin: 0; font-size: 1.2rem; }
.panel-heading p { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.82rem; }
.split-heading { display: flex; align-items: start; justify-content: space-between; }
.count-badge { display: inline-flex; min-width: 2.2rem; min-height: 2.2rem; align-items: center; justify-content: center; color: var(--blue); background: #e8f0fd; border-radius: 999px; font-weight: 800; }

.bar-list { display: grid; gap: 1rem; min-height: 10rem; align-content: start; }
.bar-row { display: grid; gap: 0.35rem; }
.bar-meta { display: flex; gap: 1rem; align-items: center; justify-content: space-between; font-size: 0.82rem; }
.bar-meta span { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
progress { width: 100%; height: 0.75rem; overflow: hidden; border: 0; border-radius: 999px; background: #e6edf3; }
progress::-webkit-progress-bar { background: #e6edf3; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.bar-row.is-warning progress::-webkit-progress-value { background: var(--amber); }
.bar-row.is-warning progress::-moz-progress-bar { background: var(--amber); }
.bar-row.is-critical progress::-webkit-progress-value { background: var(--red); }
.bar-row.is-critical progress::-moz-progress-bar { background: var(--red); }

.table-panel { margin-top: 1.25rem; padding: 0; overflow: hidden; }
.list-panel { margin-top: 0; }
.table-panel .panel-heading { padding: 1.4rem 1.5rem 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.9rem 1.2rem; text-align: left; border-top: 1px solid var(--line); }
th { color: var(--ink-soft); background: #f8fafc; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
td { font-size: 0.86rem; }
.table-primary { display: block; font-weight: 750; }
.table-secondary { color: var(--ink-soft); font-size: 0.76rem; }
.empty-table-cell { padding: 2rem 1.2rem; color: var(--ink-soft); text-align: center; }
.row-button { min-width: 2.2rem; min-height: 2.2rem; color: var(--blue); background: #edf3fc; border: 0; border-radius: 50%; cursor: pointer; font-weight: 900; }

.status-pill { display: inline-flex; width: max-content; min-height: 1.8rem; align-items: center; padding: 0.25rem 0.65rem; color: #185d3a; background: #e3f4e9; border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.status-pill.is-incomplete { color: #795000; background: #fff0ca; }
.status-pill.is-critical { color: #861a22; background: #ffe2e4; }
.back-button { margin-bottom: 1rem; padding: 0.5rem 0; color: var(--blue); background: transparent; border: 0; cursor: pointer; font-weight: 750; }
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.8rem; }
.detail-header h2 { margin: 0.2rem 0; font-size: 1.65rem; }
.machine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.machine-card { display: flex; min-width: 0; flex-direction: column; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 0.8rem; }
.machine-heading { display: flex; gap: 1rem; align-items: start; justify-content: space-between; }
.machine-heading h3 { margin: 0.2rem 0 0; font-size: 1rem; }
.machine-code { color: var(--blue); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; }
.machine-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin: 1.2rem 0; }
.machine-metrics div { padding-top: 0.75rem; border-top: 1px solid var(--line); }
.machine-metrics dt { color: var(--ink-soft); font-size: 0.7rem; }
.machine-metrics dd { margin: 0.25rem 0 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.machine-airport, .machine-serial { margin: 0 0 0.3rem; color: var(--ink-soft); font-size: 0.72rem; }
.machine-open-button { align-self: start; min-height: 2.45rem; margin-top: auto; padding: 0.55rem 0.9rem; color: #fff; background: var(--blue); border: 0; border-radius: 0.45rem; cursor: pointer; font-size: 0.78rem; font-weight: 750; }
.machine-open-button:hover { background: #174ea8; }
.machine-detail-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1rem; }
.machine-detail-panel h3 { margin: 0; font-size: 1.2rem; }
.machine-causes-panel { grid-column: 1 / -1; }
.machine-trend-panel, .machine-days-panel, .machine-review-panel { grid-column: 1 / -1; }
.machine-detail-loading { margin: 0; padding: 1rem; color: var(--ink-soft); background: #f8fafc; border: 1px solid var(--line); border-radius: 0.65rem; }
.machine-detail-loading.is-error { color: #861a22; background: #ffe8e9; border-color: #efb9bd; }
.machine-trend-chart { min-height: 15rem; }
.machine-trend-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.7rem; color: var(--ink-soft); font-size: 0.75rem; font-weight: 750; }
.trend-legend-item { display: inline-flex; gap: 0.4rem; align-items: center; }
.trend-legend-item i { display: inline-block; width: 1.4rem; height: 0.25rem; border-radius: 999px; }
.trend-legend-item.is-uptime i { background: var(--blue); }
.trend-legend-item.is-target i { height: 0; border-top: 2px dashed var(--amber); border-radius: 0; }
.trend-legend-item.is-downtime i { height: 0.7rem; background: var(--red); border-radius: 0.15rem 0.15rem 0 0; }
.machine-trend-svg { display: block; width: 100%; height: auto; min-height: 16rem; overflow: visible; }
.trend-grid-line { stroke: #dfe7ef; stroke-width: 1; }
.trend-axis-label { fill: var(--ink-soft); font-size: 12px; }
.trend-section-label { fill: var(--ink); font-size: 12px; font-weight: 750; }
.trend-uptime-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.trend-target-line { fill: none; stroke: var(--amber); stroke-width: 2; stroke-dasharray: 8 6; }
.trend-downtime-bar { fill: var(--red); opacity: 0.78; }
.trend-uptime-point { fill: #fff; stroke: var(--blue); stroke-width: 2.5; }
.machine-day-list { display: grid; gap: 0.75rem; }
.machine-day-detail { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 0.7rem; }
.machine-day-detail.is-below-target { border-left: 0.3rem solid var(--red); }
.machine-day-detail > summary { display: grid; grid-template-columns: minmax(9rem, 0.7fr) minmax(22rem, 1.6fr) auto; gap: 1rem; align-items: center; min-height: 5.3rem; padding: 0.9rem 1rem; cursor: pointer; list-style: none; }
.machine-day-detail > summary::-webkit-details-marker, .machine-day-event > summary::-webkit-details-marker { display: none; }
.machine-day-detail > summary::after, .machine-day-event > summary::after { color: var(--blue); content: "+"; font-size: 1.25rem; font-weight: 800; }
.machine-day-detail[open] > summary::after, .machine-day-event[open] > summary::after { content: "−"; }
.machine-day-detail[open] > summary { border-bottom: 1px solid var(--line); }
.machine-day-identity strong, .machine-day-identity small, .machine-day-summary-metrics small, .machine-day-summary-metrics strong { display: block; }
.machine-day-identity small, .machine-day-summary-metrics small { margin-top: 0.2rem; color: var(--ink-soft); font-size: 0.7rem; }
.machine-day-summary-metrics { display: grid; grid-template-columns: repeat(3, minmax(7rem, 1fr)); gap: 0.65rem; }
.machine-day-summary-metrics > span { padding: 0.55rem 0.7rem; background: #f8fafc; border-radius: 0.5rem; }
.machine-day-summary-metrics strong { margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.machine-day-body { display: grid; gap: 1rem; padding: 1rem; background: #fbfcfe; }
.machine-day-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 0; }
.machine-day-facts > div { padding: 0.75rem; background: #fff; border: 1px solid var(--line); border-radius: 0.55rem; }
.machine-day-facts dt { color: var(--ink-soft); font-size: 0.7rem; font-weight: 750; }
.machine-day-facts dd { margin: 0.3rem 0 0; font-weight: 800; }
.machine-day-categories { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.machine-day-categories span { padding: 0.35rem 0.6rem; color: #795000; background: #fff0ca; border-radius: 999px; font-size: 0.72rem; font-weight: 750; }
.machine-day-events { display: grid; gap: 0.6rem; }
.machine-day-event { background: #fff; border: 1px solid var(--line); border-radius: 0.55rem; }
.machine-day-event > summary { display: grid; grid-template-columns: minmax(9rem, 0.75fr) minmax(16rem, 1.5fr) minmax(9rem, 0.8fr) auto; gap: 0.75rem; align-items: center; padding: 0.8rem; cursor: pointer; list-style: none; }
.machine-day-event > summary span, .machine-day-event > summary small { color: var(--ink-soft); font-size: 0.75rem; }
.machine-day-event-content { padding: 0.9rem; border-top: 1px solid var(--line); }
.machine-day-event-content p { margin: 0.4rem 0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.detail-metrics div { min-height: 5rem; padding: 1rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 0.65rem; }
.detail-metrics dt { color: var(--ink-soft); font-size: 0.76rem; font-weight: 700; }
.detail-metrics dd { margin: 0.5rem 0 0; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.comparison-notice { margin: 1rem 0 0; padding: 0.85rem 1rem; color: #795000; background: #fff0ca; border: 1px solid #e5c36c; border-radius: 0.65rem; font-weight: 700; }
.is-hidden { display: none !important; }
.comparison-metrics dd { font-size: 1rem; }
.empty-state { grid-column: 1 / -1; padding: 2rem; text-align: center; }

.service-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.machine-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.measurement-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.measurement-summary-card { display: grid; gap: 0.35rem; min-width: 0; padding: 0.9rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 0.6rem; }
.measurement-summary-value { color: var(--green); font-size: 1.25rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.report-layout { display: grid; grid-template-columns: minmax(20rem, 0.72fr) minmax(32rem, 1.28fr); gap: 1.25rem; align-items: start; }
.report-control-panel { position: sticky; top: 1.25rem; }
.report-preview { padding: 0; overflow: hidden; }
.report-preview .panel-heading { padding: 1.35rem 1.5rem 0; }
.report-preview .panel-heading h2 { margin-top: 0.2rem; }
.report-draft-banner { padding: 0.75rem 1.5rem; color: #704800; background: #fff0ca; border-bottom: 1px solid #e5c36c; font-size: 0.76rem; font-weight: 850; letter-spacing: 0.06em; }
.report-metrics { padding: 0 1.5rem; }
.report-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.5rem; margin: 1.25rem 1.5rem; padding: 1rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 0.65rem; }
.report-facts p { display: grid; gap: 0.25rem; margin: 0; min-width: 0; }
.report-facts strong { color: var(--ink-soft); font-size: 0.72rem; }
.report-facts span { overflow-wrap: anywhere; font-size: 0.84rem; font-weight: 750; }
.report-table { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-table tr.is-below-target td { background: #fff1f2; }
.report-table tr.is-below-target td:first-child { box-shadow: inset 4px 0 0 #b4232f; }
.report-table .is-below-target-value .table-primary { color: #861a22; }
.report-table .is-below-target-value .table-secondary { color: #861a22; font-weight: 800; }
.report-preview > .comparison-notice { margin: 1.25rem 1.5rem 1.5rem; }
.report-preview > .comparison-notice.is-ready { color: #185d3a; background: #e3f4e9; border-color: #a9d7b8; }
.report-release-panel { display: grid; gap: 0.85rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.report-release-panel h3, .report-release-panel p { margin: 0; }
.report-release-panel p, .report-release-panel small { color: var(--ink-soft); }
.period-close-panel { display: grid; gap: .85rem; padding: 1rem; background: #f7f9fc; border: 1px solid var(--line); border-radius: .8rem; }
.period-close-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.period-close-heading small,.period-close-heading strong { display: block; }.period-close-heading strong { margin-top: .2rem; font-size: 1.1rem; }
.confirmation-field { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.86rem; font-weight: 700; }
.confirmation-field input { margin-top: 0.18rem; }
.report-history-panel { grid-column: 1 / -1; }
.report-history-panel .panel-heading { padding-bottom: 0; }
.report-history-panel .row-button { min-width: auto; margin-right: 0.4rem; }
.machine-preview-panel { max-height: 38rem; }
.machine-preview-panel .table-scroll { max-height: 31rem; }
.machine-preview-panel td { vertical-align: top; }
.machine-preview-panel td:last-child { min-width: 17rem; white-space: normal; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-span-2 { grid-column: 1 / -1; }
.field-heading { display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; }
.category-field { position: relative; align-content: start; }
.info-button {
  display: inline-grid;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  color: var(--blue);
  place-items: center;
  background: #edf3fc;
  border: 1px solid #b9cceb;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 850;
}
.info-button:hover,.info-button:focus-visible { background: #dfeaf9; outline: 3px solid rgb(23 105 237 / 18%); outline-offset: 2px; }
.category-help {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.35rem);
  left: 0;
  display: none;
  width: min(26rem, 92vw);
  margin: 0;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9cceb;
  border-radius: 0.55rem;
  box-shadow: 0 0.65rem 1.5rem rgb(16 42 67 / 14%);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}
.category-field:hover .category-help,.category-field:focus-within .category-help,.category-help.is-open { display: block; }
.field textarea {
  width: 100%;
  padding: 0.65rem;
  color: var(--ink);
  resize: vertical;
  background: #fff;
  border: 1px solid #b8cad9;
  border-radius: 0.45rem;
  line-height: 1.45;
}
.field-note { color: var(--ink-soft); font-size: 0.72rem; font-weight: 500; }
.service-validation { display: grid; gap: 0.8rem; padding: 0.9rem 1rem; background: #f7f9fc; border: 1px solid var(--line); border-radius: 0.65rem; }
.service-validation-heading { display: flex; gap: 0.75rem; align-items: flex-start; }
.service-validation-heading strong { display: block; color: var(--ink); font-size: 0.9rem; }
.service-validation-heading p,.service-category-suggestion p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.78rem; font-weight: 550; line-height: 1.45; }
.service-validation-symbol { display: inline-grid; flex: 0 0 1.75rem; width: 1.75rem; height: 1.75rem; color: #52627a; place-items: center; background: #e8edf4; border-radius: 50%; font-size: 1rem; font-weight: 850; }
.service-validation.is-plausible { background: #edf8f1; border-color: #a9d7b8; }
.service-validation.is-plausible .service-validation-symbol { color: #fff; background: #168653; }
.service-validation.is-reviewrequired { background: #fff8e8; border-color: #e8c978; }
.service-validation.is-reviewrequired .service-validation-symbol { color: #5f4300; background: #ffd66e; }
.service-validation.is-incomplete { background: #fff0f1; border-color: #e7aab0; }
.service-validation.is-incomplete .service-validation-symbol { color: #fff; background: #b4232f; }
.service-category-suggestion,.service-review-confirmation { display: grid; gap: 0.7rem; padding-top: 0.7rem; border-top: 1px solid rgb(82 98 122 / 18%); }
.service-category-suggestion[hidden],.service-review-confirmation[hidden] { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.secondary-button {
  min-height: 2.8rem;
  padding: 0.7rem 1.1rem;
  color: var(--blue);
  background: #edf3fc;
  border: 1px solid #b9cceb;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 750;
}
.secondary-button:hover { background: #dfeaf9; }
button:disabled { cursor: default; opacity: 0.6; }
.import-controls { display: grid; gap: 1rem; }
.import-summary { min-height: 2.5rem; margin-top: 1.2rem; padding: 0.8rem 1rem; color: var(--ink-soft); background: #f8fafc; border-radius: 0.55rem; font-size: 0.82rem; line-height: 1.5; }
.preview-table { max-height: 30rem; margin-top: 1rem; border: 1px solid var(--line); border-radius: 0.55rem; }
.preview-table th, .preview-table td { padding: 0.7rem; vertical-align: top; }
.service-list-panel { margin-top: 1.25rem; }
.service-list-panel td:nth-child(4) { min-width: 18rem; max-width: 32rem; white-space: normal; }

.page-section-heading { display: flex; gap: 1rem; align-items: start; justify-content: space-between; }
.case-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: end; margin-bottom: 1.25rem; }
.case-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.case-dialog { width: min(34rem, calc(100% - 2rem)); padding: 0; border: 0; border-radius: 0.75rem; box-shadow: 0 1.5rem 4rem rgb(15 35 55 / 28%); }
.case-dialog::backdrop { background: rgb(15 35 55 / 55%); }
.case-dialog form { display: grid; gap: 1.25rem; padding: 1.5rem; }
.case-dialog h2 { margin: 0; }
.page-section-heading h2 { margin-top: 0.2rem; }
.administration-kpis { margin-bottom: 1.25rem; }
.administration-kpis .kpi-card { min-height: 6.5rem; }
.administration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.administration-grid .panel { min-width: 0; }
.administration-grid h3, .administration-audit-panel h3 { margin: 0; font-size: 1.1rem; }
.administration-audit-panel { margin-top: 1.25rem; padding: 0; overflow: hidden; }
.administration-audit-panel .panel-heading { padding: 1.4rem 1.5rem 0; }
.table-wrap { overflow-x: auto; }
.audit-json { min-width: 12rem; max-width: 28rem; }
.audit-json summary { color: var(--blue); cursor: pointer; font-weight: 700; }
.audit-json pre { max-height: 18rem; margin: 0.65rem 0 0; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 0.75rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.check-field { display: flex; gap: 0.55rem; align-items: center; min-height: 2.5rem; align-self: end; color: var(--ink-soft); font-size: 0.82rem; font-weight: 750; }
.check-field input { width: 1.1rem; height: 1.1rem; }
.schedule-fieldset { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 0.65rem; }
.schedule-fieldset legend { padding: 0 0.35rem; color: var(--ink-soft); font-size: 0.78rem; font-weight: 800; }
.weekly-schedule { display: grid; gap: 0.55rem; }
.schedule-row { display: grid; grid-template-columns: minmax(7rem, 1fr) 6.5rem 6.5rem minmax(7rem, 0.8fr); gap: 0.55rem; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.78rem; }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row label { display: flex; gap: 0.4rem; align-items: center; font-weight: 700; }
.schedule-row input[type="time"] { min-width: 0; min-height: 2.25rem; padding: 0.35rem 0.45rem; border: 1px solid #b8cad9; border-radius: 0.4rem; }
.schedule-row:has(.schedule-enabled:not(:checked)) { opacity: 0.55; }
.access-forms { margin-bottom: 1.25rem; }
.revoke-control { display: flex; min-width: 21rem; gap: 0.5rem; align-items: center; }
.revoke-control input { min-width: 12rem; min-height: 2.35rem; padding: 0.4rem 0.55rem; border: 1px solid #b8cad9; border-radius: 0.45rem; }
.danger-button { min-height: 2.35rem; padding: 0.45rem 0.75rem; color: #861a22; background: #ffe8e9; border: 1px solid #efb9bd; border-radius: 0.45rem; cursor: pointer; font-weight: 750; }
.danger-button:hover { background: #ffdadd; }

/* Keep the new shell authoritative over the legacy component defaults above. */
.sidebar { width: 16rem; padding: 2rem 1.2rem 1.5rem; background: linear-gradient(180deg, #132d46 0%, #0d2236 100%); }
.workspace { margin-left: 16rem; }
.nav-item { grid-template-columns: 2rem 1fr; min-height: 3.35rem; padding: 0.6rem 0.75rem; border-radius: 0.8rem; }
.nav-item:hover:not(:disabled) { background: rgb(255 255 255 / 7%); }
.nav-item.is-active { background: linear-gradient(135deg, #356fd6, #2b80a9); }
.topbar { min-height: 8rem; padding-inline: clamp(1.5rem, 3.2vw, 3.2rem); border-bottom: 0; }
.content { padding: clamp(1.5rem, 3vw, 3rem); }
.kpi-card { border: 0; border-radius: 1rem; box-shadow: 0 0.5rem 1.6rem rgb(16 42 67 / 7%); }

@media (max-width: 82rem) {
  .administration-grid { grid-template-columns: 1fr; }
}

@media (max-width: 74rem) {
  .case-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { align-items: start; }
  .topbar-actions { flex-wrap: wrap; justify-content: end; }
  .machine-detail-grid { grid-template-columns: 1fr; }
  .machine-day-detail > summary { grid-template-columns: 1fr auto; }
  .machine-day-summary-metrics { grid-column: 1 / -1; }
  .service-action-grid { grid-template-columns: 1fr; }
  .machine-data-grid { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 1fr; }
  .schedule-row { grid-template-columns: minmax(7rem, 1fr) 6.5rem 6.5rem minmax(7rem, 0.8fr); }
  .report-control-panel { position: static; }
}

@media (max-width: 58rem) {
  .sidebar { position: static; width: 100%; min-height: auto; padding: 1rem; }
  .sidebar .brand, .sidebar-footer { display: none; }
  .navigation { display: flex; overflow-x: auto; }
  .nav-item { min-width: max-content; }
  .workspace { margin-left: 0; }
  .nav-section-label { display: none; }
  .topbar { flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: start; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 42rem) {
  .case-filter { grid-template-columns: 1fr; }
  .auth-shell { padding: 1rem; }
  .topbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .compact-field input, .compact-field select { width: 100%; }
  .user-menu { grid-column: 1 / -1; padding: 0.6rem 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .kpi-grid, .machine-grid, .detail-metrics, .form-grid, .measurement-summary-grid, .report-facts { grid-template-columns: 1fr; }
  .machine-day-summary-metrics, .machine-day-facts, .machine-day-event > summary { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: auto; }
  .content { padding: 1rem; }
  .detail-header { align-items: start; flex-direction: column; gap: 1rem; }
  .page-section-heading { flex-direction: column; }
  .schedule-row { grid-template-columns: 1fr 1fr; }
  .welcome-panel { padding: 1.5rem; }
  .welcome-copy h2 { font-size: 2rem; }
  .workflow-progress { padding: 1rem; }
  .section-intro { align-items: start; flex-direction: column; gap: 0.8rem; }
}

/* Revision 16: verbindliche Startseite nach freigegebener Designvorlage */
:root { --design-blue: #1769ed; --design-navy: #001f49; --design-green: #08a861; }
body { color: #061942; background: #f8faff; }
.sidebar { width: 16.5rem; padding: 2.15rem 1rem 1.4rem; background: linear-gradient(180deg, #001f49, #002753); }
.workspace { margin-left: 16.5rem; }
.app-brand { display: flex; flex-direction: row; gap: .8rem; align-items: center; padding: 0 .7rem 3rem; }
.brand-ring { position: relative; width: 2.2rem; height: 2.2rem; flex: none; border: .42rem solid #fff; border-right-color: transparent; border-radius: 50%; transform: rotate(-35deg); }
.brand-ring::after { position: absolute; top: -.45rem; right: -.34rem; width: .55rem; height: .55rem; background: #12c98a; border-radius: 50%; content: ""; }
.brand-name { color: #fff; font-size: 1.25rem; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.navigation { gap: .75rem; }
.nav-item { grid-template-columns: 2.2rem 1fr; min-height: 3.55rem; padding: .55rem .8rem; color: #fff; border-radius: .6rem; font-size: 1rem; font-weight: 500; }
.nav-item.is-active { background: linear-gradient(135deg, #1471ff, #1761df); box-shadow: 0 .45rem 1.2rem rgb(0 73 190 / 30%); }
.nav-icon { color: #fff; background: transparent !important; font-size: 1.55rem; }
.nav-divider { height: 1px; margin: 1.25rem .25rem 1.05rem; background: rgb(255 255 255 / 27%); }
.visually-concealed { display: none !important; }
.profile-footer { display: grid; grid-template-columns: 2.9rem 1fr 1rem; gap: .75rem; align-items: center; margin-top: auto; padding: 1.2rem .25rem 0; border-top: 1px solid rgb(255 255 255 / 25%); }
.profile-footer strong { margin: 0; color: #fff; font-size: .86rem; }.profile-footer small { display: block; margin-top: .2rem; color: #c0cee0; font-size: .78rem; }
.profile-avatar { display: grid; width: 2.9rem; height: 2.9rem; place-items: center; color: #fff; border: 2px solid #6480a2; border-radius: 50%; }
.topbar { min-height: 8.8rem; padding: 1.7rem clamp(1.6rem, 2.4vw, 2.7rem) 1.25rem; border: 0; box-shadow: none; }
.topbar h1 { margin: 0; color: #071a43; font-size: clamp(2rem, 2.7vw, 2.65rem); font-weight: 760; letter-spacing: -.045em; }
.topbar .subtitle { margin-top: .55rem; color: #68728d; font-size: 1rem; }
.topbar-actions { align-items: center; }
.airport-picker { display: flex; flex-direction: row; gap: .6rem; align-items: center; min-width: 14rem; height: 3.4rem; padding: 0 .9rem; background: #fff; border: 1px solid #d6dce7; border-radius: 1rem; }
.airport-picker select { width: 100%; padding: 0; color: #071a43; background: #fff; border: 0; font-weight: 550; }
.concealed-control { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.round-tool, .round-user .text-button { display: grid; width: 3.4rem; height: 3.4rem; padding: 0; place-items: center; color: #071a43; background: #fff; border: 1px solid #e1e5ed; border-radius: 50%; box-shadow: 0 .2rem .8rem rgb(21 36 68 / 5%); font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.notification-tool { position: relative; }.notification-tool span { position: absolute; top: .2rem; right: .4rem; width: .58rem; height: .58rem; background: #1769ed; border: 2px solid #fff; border-radius: 50%; }
.round-user .user-name { display: none; }.round-user { display: block; }
.content { padding: 0 clamp(1.6rem, 2.4vw, 2.7rem) 2.5rem; }.status-message:empty { display: none; }
.status-overview-card,.month-workflow-card,.today-card,.summary-card-grid article { background: #fff; border: 1px solid #e0e5ee; box-shadow: 0 .45rem 1.25rem rgb(21 38 76 / 7%); }
.status-overview-card { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; min-height: 12.6rem; padding: 1.55rem 1.75rem; border-radius: .95rem; }
.current-data-badge { display: inline-flex; padding: .52rem .75rem; color: #069e5a; background: #edfbf4; border: 1px solid #bfead5; border-radius: .6rem; font-size: .78rem; font-weight: 800; }
.status-overview-card h2 { margin: 1.5rem 0 .45rem; font-size: 1.95rem; letter-spacing: -.04em; }.status-overview-card>div:first-child p { margin: 0; color: #6d7690; }
.availability-block { display: flex; gap: 1.55rem; align-items: center; padding-right: 2.1rem; }
.availability-ring { display: grid; width: 9.6rem; height: 9.6rem; place-items: center; border: .52rem solid #0aa861; border-top-color: #e5e9ed; border-radius: 50%; transform: rotate(8deg); }
.availability-ring strong { color: #071a43; font-size: 1.75rem; transform: rotate(-8deg); }.availability-block h3 { margin: 0 0 .8rem; font-size: 1.45rem; }.availability-block .target-ok { margin: 0; color: #05a55d; font-size: 1.05rem; }
.primary-dashboard-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.5rem; margin-top: 1.55rem; }
.month-workflow-card,.today-card { min-height: 20.5rem; padding: 1.5rem 1.7rem; border-radius: .95rem; }.month-workflow-card h2,.today-card h2 { margin: 0 0 1.45rem; font-size: 1.35rem; }
.horizontal-progress { position: relative; display: grid; grid-template-columns: repeat(3,1fr); margin: 1.6rem .8rem 1.65rem; }.horizontal-progress::before { position: absolute; top: 1.25rem; right: 14%; left: 14%; height: 3px; background: linear-gradient(90deg,#09ae67 0 50%,#1769ed 50% 74%,#bec6d3 74%); content: ""; }
.horizontal-progress .step { position: relative; z-index: 1; display: grid; justify-items: center; gap: .65rem; }.horizontal-progress .step span { display: grid; width: 2.65rem; height: 2.65rem; place-items: center; color: #7a849b; background: #fff; border: 2px solid #c8cfda; border-radius: 50%; font-weight: 700; }
.horizontal-progress .step.done span { color: #fff; background: #0aae67; border-color: #0aae67; }.horizontal-progress .step.active span { color: #fff; background: #1769ed; border-color: #1769ed; }.horizontal-progress .step strong { font-size: .82rem; font-weight: 650; }
.month-workflow-card>p { max-width: 39rem; margin: 0 0 1.4rem; color: #65708a; line-height: 1.45; }.workflow-actions { display: flex; gap: 1.4rem; align-items: center; }
.workflow-button { min-width: 18rem; justify-content: center; color: #fff; background: linear-gradient(135deg,#1671ff,#1764e8); border-radius: .55rem; box-shadow: 0 .4rem 1rem rgb(23 105 237 / 22%); }.workflow-button:hover { color: #fff; background: #0d5ede; }.details-button { padding: .8rem; color: #1769ed; background: transparent; border: 0; cursor: pointer; font-weight: 600; }
.today-card h2 { padding-bottom: 1.25rem; border-bottom: 1px solid #e0e5ec; }.today-card h2 span { margin-right: .65rem; color: #1769ed; }.today-card>div { display: grid; grid-template-columns: 2.7rem 5.4rem 1fr; align-items: center; min-height: 4.55rem; border-bottom: 1px solid #e0e5ec; }.today-card>div:last-child { border-bottom: 0; }.today-card strong { font-size: 1.6rem; }.today-card p { margin: 0; color: #6c7690; font-size: .9rem; }.metric-icon { color: #1769ed; font-size: 1.6rem; }.metric-icon.muted { color: #667089; }
.summary-card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.45rem; margin-top: 1.55rem; }.summary-card-grid article { display: grid; grid-template-columns: 5.4rem 1fr 1.5rem; gap: 1rem; align-items: center; min-height: 9.8rem; padding: 1.1rem 1.25rem; border-radius: .9rem; }.summary-icon { display: grid; width: 5rem; height: 5rem; place-items: center; color: #1769ed; background: #f8faff; border: 1px solid #dfe5ee; border-radius: .85rem; font-size: 2rem; }.summary-icon.online { color: #08a861; background: #effbf5; }.summary-card-grid small { color: #273552; }.summary-card-grid strong { display: block; margin: .5rem 0; color: #1769ed; font-size: 1.45rem; }.summary-card-grid p { margin: 0; color: #778098; font-size: .88rem; }.summary-card-grid article>b { color: #516079; font-size: 2.4rem; font-weight: 300; }.summary-card-grid .online-text { color: #08a861; }.dashboard-data-hooks { display: none !important; }
@media (max-width:75rem) { .primary-dashboard-grid { grid-template-columns:1fr; }.summary-card-grid { grid-template-columns:1fr; } }
@media (max-width:58rem) { .status-overview-card { grid-template-columns:1fr; }.availability-block { justify-content:flex-start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.company-branding {
  display: grid;
  gap: 0.35rem;
  margin: -1.7rem 0.65rem 1.8rem;
  padding: 0.85rem;
  color: #fff;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 0.75rem;
}
.company-branding[hidden] { display: none; }
.company-branding img { width: 100%; max-height: 3.25rem; object-fit: contain; object-position: left center; background: #fff; border-radius: 0.35rem; }
.company-branding strong, .company-branding small { display: block; overflow-wrap: anywhere; }
.company-branding strong { font-size: 0.8rem; }
.company-branding small { color: #b9cce4; font-size: 0.67rem; line-height: 1.35; }

.report-sender { display: flex; gap: 1rem; align-items: center; margin: 0 1.5rem 1rem; padding: 0.9rem 1rem; background: #f4f8fd; border: 1px solid var(--line); border-radius: 0.75rem; }
.report-sender[hidden] { display: none; }
.report-sender img { width: 5.5rem; max-height: 3.5rem; object-fit: contain; }
.report-sender strong, .report-sender small { display: block; }
.report-sender small { margin-top: 0.25rem; color: var(--ink-soft); }

.company-logo-state { display: flex; gap: 1rem; align-items: center; padding: 0.8rem; background: #f5f8fc; border: 1px solid var(--line); border-radius: 0.65rem; }
.company-logo-state[hidden] { display: none; }
.company-logo-state img { width: 7rem; max-height: 4rem; object-fit: contain; }
.company-logo-state span { color: var(--ink-soft); font-size: 0.72rem; overflow-wrap: anywhere; }

@media (max-width: 58rem) {
  .company-branding { display: none; }
}

/* UP2: geführter Arbeitslauf */
.guided-workflow { max-width: 74rem; margin: 0 auto; }
.workflow-page-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: start; margin-bottom: 1.5rem; }
.workflow-page-heading h2 { margin: 1rem 0 .5rem; font-size: 2rem; letter-spacing: -.035em; }
.workflow-page-heading p { margin: 0; color: #68728d; }
.workflow-stepper { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.workflow-stepper li { display: flex; gap: .85rem; align-items: center; min-height: 5rem; padding: 1rem; color: #778098; background: #fff; border: 1px solid #e0e5ee; border-radius: .85rem; }
.workflow-stepper li>span { display: grid; width: 2.4rem; height: 2.4rem; flex: none; place-items: center; background: #eef1f6; border-radius: 50%; font-weight: 800; }
.workflow-stepper small,.workflow-stepper strong { display: block; }.workflow-stepper small { margin-bottom: .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.workflow-stepper .is-complete { color: #07884e; border-color: #bfe8d3; }.workflow-stepper .is-complete>span { color: #fff; background: #08a861; }
.workflow-stepper .is-active { color: #0b56c7; border-color: #9dc0f8; box-shadow: 0 .35rem 1.1rem rgb(23 105 237 / 10%); }.workflow-stepper .is-active>span { color: #fff; background: #1769ed; }
.workflow-focus-card { min-height: 25rem; padding: clamp(1.6rem,3vw,2.6rem); background: #fff; border: 1px solid #dfe5ee; border-radius: 1rem; box-shadow: 0 .55rem 1.6rem rgb(21 38 76 / 8%); }
.workflow-focus-card h3 { max-width: 48rem; margin: .75rem 0 1rem; font-size: clamp(1.55rem,2.5vw,2.15rem); letter-spacing: -.035em; }
.workflow-loader { width: 3.2rem; height: 3.2rem; margin-bottom: 1.3rem; border: .35rem solid #dce8fb; border-top-color: #1769ed; border-radius: 50%; animation: workflow-spin .85s linear infinite; }
@keyframes workflow-spin { to { transform: rotate(360deg); } }
.workflow-case-topline { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 2rem; }
.workflow-counter { color: #1769ed; font-weight: 750; }.severity-critical { color: #9b1c27; background: #ffe9eb; }.severity-warning { color: #8a5600; background: #fff3d7; }.severity-information { color: #1554a1; background: #e9f2ff; }
.workflow-case-detail { max-width: 55rem; color: #56627c; font-size: 1.05rem; line-height: 1.65; }
.workflow-case-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: .8rem; margin: 1.6rem 0; }
.workflow-case-facts div { padding: 1rem; background: #f7f9fc; border: 1px solid #e3e8f0; border-radius: .7rem; }.workflow-case-facts dt { color: #778098; font-size: .75rem; font-weight: 750; text-transform: uppercase; }.workflow-case-facts dd { margin: .4rem 0 0; font-weight: 700; }
.workflow-decision-box { display: grid; gap: .55rem; padding: 1.2rem; background: #f3f7ff; border: 1px solid #cadcf8; border-radius: .8rem; }.workflow-decision-box textarea { resize: vertical; padding: .8rem; border: 1px solid #aebed6; border-radius: .55rem; font: inherit; }.workflow-decision-box small { color: #66738c; }
.workflow-case-actions { display: flex; gap: 1rem; align-items: center; margin-top: 1.3rem; }
.workflow-complete-card { text-align: center; }.workflow-success-icon { display: grid; width: 5rem; height: 5rem; margin: 0 auto 1.5rem; place-items: center; color: #fff; background: #08a861; border-radius: 50%; font-size: 2.4rem; font-weight: 800; }.workflow-complete-card h3,.workflow-complete-card p { margin-inline: auto; }.workflow-complete-card .workflow-button { margin-top: 1.5rem; }
@media (max-width:58rem) { .workflow-stepper,.workflow-case-facts { grid-template-columns:1fr; }.workflow-page-heading,.workflow-case-actions { flex-direction:column; align-items:stretch; } }
.review-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.review-item {
  border-left: 0.25rem solid var(--warning, #b56a00);
  border-radius: 0.35rem;
  background: var(--surface-soft, #f7f5f1);
  padding: 0.8rem 1rem;
}

.review-item p {
  margin: 0.35rem 0;
}

.review-item small {
  overflow-wrap: anywhere;
}

.review-events { display: grid; gap: .75rem; margin-top: .8rem; }
.review-event { padding: .85rem; border: 1px solid #d8dee9; border-radius: .45rem; background: #fff; }
.review-event-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.review-event p { margin: .45rem 0; }
.review-event > button { margin-top: .45rem; }
.review-event-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #d8dee9; }
.review-event-form .field-note,.review-event-form label:nth-of-type(n+4),.review-event-form .form-actions { grid-column: 1 / -1; }
@media (max-width: 48rem) { .review-event-form { grid-template-columns: 1fr; }.review-event-form > * { grid-column: 1 !important; } }
