:root {
  color-scheme: light;
  --ink: #17233a;
  --muted: #687386;
  --line: #dde3ec;
  --panel: #ffffff;
  --page: #f5f7fb;
  --nav: #102a52;
  --nav-soft: #1f4f93;
  --blue: #2858a6;
  --gold: #b49b36;
  --green: #20795c;
  --amber: #b48a24;
  --red: #b33a3a;
  --teal: #26716d;
  --shadow: 0 16px 36px rgba(31, 55, 92, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 22px;
  color: #eef6ef;
  background: linear-gradient(180deg, #102a52 0%, #163b72 58%, #102a52 100%);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  width: 70px;
  min-width: 70px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.brand-logo img {
  width: 62px;
  height: auto;
  display: block;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #b9cbc4;
  font-size: 12px;
}

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

.nav-item {
  width: 100%;
  border: 0;
  color: #dce9e2;
  text-align: left;
  padding: 11px 12px;
  border-radius: 7px;
  background: transparent;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--gold);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer span {
  color: #bfd3ca;
  font-size: 12px;
  text-transform: uppercase;
}

.app-shell {
  margin-left: 280px;
  padding: 28px;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 31px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.backend-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.backend-status.is-online {
  color: var(--green);
}

.backend-status.is-offline {
  color: var(--red);
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.select-label {
  display: grid;
  gap: 5px;
  min-width: 160px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
}

select,
input {
  min-height: 38px;
  padding: 0 36px 0 10px;
}

select:disabled,
input:disabled {
  color: #51627c;
  background: #eef3fb;
  cursor: not-allowed;
}

.primary-action,
.secondary-action {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 13px;
  font-weight: 800;
}

.primary-action {
  background: var(--blue);
  color: #ffffff;
}

.primary-action:hover {
  background: #1f4f93;
}

.secondary-action {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.login-layout,
.daily-layout,
.board-grid,
.split-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
}

.access-panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.access-panel,
.panel,
.department-card,
.record-card,
.task-card,
.table-wrap,
.weekly-form,
.file-card {
  border-color: #e1e6ef;
}

.lead,
.section-note {
  color: var(--muted);
  line-height: 1.55;
}

.lead {
  max-width: 760px;
  margin-top: 10px;
}

.login-credential-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #dde5f1;
  border-radius: 8px;
  background: #f8fbff;
}

.login-credential-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.demo-eyebrow {
  margin-top: 22px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.role-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 8px;
}

.role-card:hover,
.role-card.selected {
  border-color: var(--blue);
  background: #f2f6fd;
  box-shadow: inset 0 0 0 1px rgba(40, 88, 166, 0.12);
}

.role-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.role-card strong {
  font-size: 17px;
}

.role-card small {
  color: var(--muted);
  line-height: 1.45;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.operating-panel {
  background: linear-gradient(145deg, #102a52, #1f4f93);
  color: #eef6ef;
  border-color: #163b72;
}

.office-story-panel {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 24px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background:
    radial-gradient(circle at 85% 10%, rgba(180, 155, 54, 0.2), transparent 28%),
    linear-gradient(145deg, #102a52 0%, #1f4f93 55%, #ffffff 55%, #ffffff 100%);
  box-shadow: var(--shadow);
}

.office-story-panel::after {
  content: "OBLIK";
  position: absolute;
  right: -14px;
  bottom: 10px;
  color: rgba(40, 88, 166, 0.06);
  font-size: 82px;
  font-weight: 900;
}

.office-story-header {
  max-width: 420px;
  color: #ffffff;
}

.office-story-header .eyebrow {
  color: #e4cf73;
}

.office-story-header h2 {
  font-size: 30px;
}

.office-story-header p {
  margin-top: 10px;
  color: #dce8f7;
  line-height: 1.55;
}

.flow-map {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.flow-node {
  position: relative;
  z-index: 1;
  padding: 15px;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.flow-node span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f8f0cf;
  color: #7c6318;
  font-size: 12px;
  font-weight: 900;
}

.flow-node strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
}

.flow-node p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.flow-line {
  width: 2px;
  height: 16px;
  margin-left: 14px;
  background: var(--gold);
}

.office-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.office-metrics div {
  padding: 12px;
  border-radius: 8px;
  background: #f8fbff;
  border: 1px solid #dfe6f1;
}

.office-metrics span,
.office-metrics strong {
  display: block;
}

.office-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.office-metrics strong {
  margin-top: 5px;
  color: var(--blue);
}

.operating-panel .eyebrow {
  color: #d7c36d;
}

.rhythm-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.rhythm-list div {
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.rhythm-list strong,
.rhythm-list span {
  display: block;
}

.rhythm-list span {
  margin-top: 6px;
  color: #cadbd3;
  line-height: 1.45;
}

.command-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.command-strip div {
  padding: 16px;
  border: 1px solid #dbe3f0;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.command-strip span,
.command-strip strong {
  display: block;
}

.command-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-strip strong {
  margin-top: 5px;
  font-size: 15px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

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

.panel {
  padding: 18px;
}

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

.health-list,
.compact-list,
.record-grid,
.task-board {
  display: grid;
  gap: 10px;
}

.health-row,
.list-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.health-row:first-child,
.list-row:first-child {
  border-top: 0;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.yellow {
  background: var(--amber);
}

.status-dot.red {
  background: var(--red);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf3fc;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.amber {
  color: #7c6318;
  background: #f8f0cf;
}

.tag.red {
  color: #8e2626;
  background: #f7dfdf;
}

.tag.blue {
  color: #205a7f;
  background: #deedf5;
}

.tag.green {
  color: #176447;
  background: #eaf6f0;
}

.section-heading {
  margin-bottom: 16px;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 16px;
}

.department-card,
.record-card,
.task-card {
  padding: 16px;
}

.department-card {
  display: grid;
  gap: 14px;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.card-stat {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf7;
}

.card-stat strong {
  display: block;
  font-size: 20px;
}

.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.flat-table {
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #eef3fb;
  color: #243a60;
  font-size: 12px;
  text-transform: uppercase;
}

.task-board {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
}

.compact-board {
  grid-template-columns: 1fr;
  max-height: 580px;
  overflow: auto;
}

.task-card {
  display: grid;
  gap: 11px;
}

.task-top,
.record-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ede9;
}

.progress-fill {
  height: 100%;
  width: var(--progress);
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.record-grid {
  grid-template-columns: repeat(2, minmax(270px, 1fr));
}

.single-column {
  grid-template-columns: 1fr;
}

.record-card {
  display: grid;
  gap: 10px;
}

.weekly-form {
  display: grid;
  gap: 14px;
  max-width: 880px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.weekly-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.daily-form {
  max-width: none;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.file-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.file-card span,
.file-card strong {
  display: block;
}

.file-card span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.file-card strong {
  margin-top: 8px;
  font-size: 16px;
}

.file-card p {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.45;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.visual-reports {
  margin: 18px 0;
}

.compact-heading {
  margin-bottom: 12px;
}

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

.visual-card {
  min-height: 330px;
}

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

.donut {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--donut));
  box-shadow: inset 0 0 0 1px rgba(16, 42, 82, 0.08);
}

.donut > div {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #ffffff;
}

.donut strong,
.donut span {
  display: block;
}

.donut strong {
  font-size: 30px;
  color: var(--blue);
}

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

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

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

.donut-legend span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.donut-legend strong {
  color: var(--ink);
}

.donut-legend em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.visual-caption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.heatmap-grid {
  display: grid;
  gap: 10px;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.heatmap-row.good {
  background: #eef8f3;
  border-color: #c9eadb;
}

.heatmap-row.watch {
  background: #fbf5dd;
  border-color: #eee0a6;
}

.heatmap-row.danger {
  background: #fae7e7;
  border-color: #edc6c6;
}

.heatmap-row strong,
.heatmap-row span {
  display: block;
}

.heatmap-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-chart {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.timeline-label strong,
.timeline-label span {
  display: block;
}

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

.timeline-track {
  position: relative;
  height: 26px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.timeline-bar {
  position: absolute;
  left: var(--left);
  width: var(--width);
  min-width: 34px;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: #ffffff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.timeline-bar.amber {
  color: #34270b;
  background: var(--gold);
}

.timeline-bar.red {
  background: var(--red);
}

.timeline-bar.blue {
  background: #8aa0bd;
}

.timeline-bar.green {
  background: var(--green);
}

.export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.export-bar strong,
.export-bar span {
  display: block;
}

.export-bar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-export {
  display: flex;
  gap: 6px;
  align-items: end;
}

.quick-export .secondary-action {
  min-height: 38px;
  padding: 0 10px;
}

.bar-chart {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.bar-label strong {
  color: var(--ink);
}

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

.bar-fill {
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.report-note {
  display: grid;
  gap: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.report-note strong {
  color: var(--ink);
}

.report-section {
  margin-top: 18px;
}

.document-uploader {
  margin-bottom: 14px;
}

.document-uploader input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-zone {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed #9fb2d0;
  border-radius: 8px;
  background: #f7faff;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--blue);
  background: #eef5ff;
}

.upload-zone strong {
  color: var(--blue);
}

.upload-zone span {
  color: var(--muted);
}

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

.document-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.meeting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
}

.meeting-form {
  max-width: none;
  box-shadow: none;
  border: 0;
  padding: 0;
}

.meeting-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.disabled-link {
  opacity: 0.55;
  pointer-events: none;
}

.document-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.library-card {
  align-items: start;
}

.document-card img,
.document-icon {
  width: 92px;
  height: 70px;
  border-radius: 7px;
  object-fit: cover;
  background: #eef3fb;
}

.document-icon {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.empty-documents {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcff;
}

.print-report {
  display: none;
}

@media (max-width: 1100px) {
  .document-library {
    grid-template-columns: 1fr;
  }

  .meeting-layout {
    grid-template-columns: 1fr;
  }

  .visual-grid,
  .donut-wrap {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .sidebar,
  .topbar,
  .export-bar,
  .nav-list,
  .form-actions,
  button {
    display: none !important;
  }

  .app-shell {
    margin-left: 0;
    padding: 0;
  }

  .view {
    display: none !important;
  }

  .print-report {
    display: block !important;
    color: #111827;
    font-family: "Segoe UI", Arial, sans-serif;
  }

  .report-page {
    page-break-after: always;
    padding: 28px 32px;
  }

  .report-page:last-child {
    page-break-after: auto;
  }

  .report-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 3px solid #2858a6;
  }

  .report-brand img {
    width: 130px;
    height: auto;
  }

  .report-brand p {
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
  }

  .report-brand h1 {
    margin-top: 6px;
    font-size: 28px;
    color: #102a52;
  }

  .report-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0;
  }

  .report-meta-grid.small-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-meta-grid div {
    padding: 12px;
    border: 1px solid #d7deea;
    border-radius: 6px;
    background: #f8fafc;
  }

  .report-meta-grid span,
  .report-meta-grid strong {
    display: block;
  }

  .report-meta-grid span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .report-meta-grid strong {
    margin-top: 4px;
    color: #102a52;
  }

  .written-section {
    margin-top: 20px;
  }

  .written-section h2,
  .report-page h2 {
    color: #102a52;
    font-size: 22px;
    margin: 0 0 12px;
  }

  .written-section h3 {
    margin: 16px 0 6px;
    color: #2858a6;
    font-size: 14px;
    text-transform: uppercase;
  }

  .written-section p,
  .report-lead {
    margin: 0 0 10px;
    line-height: 1.55;
    color: #1f2937;
  }

  .report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
  }

  .report-table th {
    background: #102a52 !important;
    color: #ffffff !important;
    padding: 8px;
  }

  .report-table td {
    padding: 8px;
    border: 1px solid #d7deea;
    vertical-align: top;
  }

  .report-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .report-image-grid figure {
    margin: 0;
    break-inside: avoid;
    border: 1px solid #d7deea;
    padding: 10px;
  }

  .report-image-grid img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
  }

  .report-image-grid figcaption {
    margin-top: 8px;
    color: #475569;
    font-size: 11px;
  }
}

.card-actions,
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-actions {
  margin-bottom: 14px;
}

.icon-action {
  min-height: 32px;
  border: 1px solid #cbd6e7;
  border-radius: 7px;
  background: #ffffff;
  color: var(--blue);
  padding: 0 10px;
  font-weight: 900;
}

.icon-action:hover {
  background: #f0f5ff;
}

.icon-action.danger {
  color: #a92d2d;
}

.icon-action.danger:hover {
  background: #fae7e7;
}

.scorecard-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.scorecard-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.scorecard-row:first-child {
  border-top: 0;
}

.login-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.detail-layout .panel:last-child {
  grid-column: 1 / -1;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf7;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid strong {
  margin-top: 5px;
}

.detail-text {
  margin-top: 6px;
  line-height: 1.55;
}

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

.wide {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

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

.form-message {
  min-height: 22px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f5f7fb;
  color: var(--muted);
  font-weight: 800;
}

.form-message:empty {
  display: none;
}

.form-message.success {
  background: #eaf6f0;
  color: #176447;
}

.form-message.error {
  background: #fae7e7;
  color: #982c2c;
}

tr[data-project-row],
[data-project-row] {
  cursor: pointer;
}

tr[data-project-row]:hover {
  background: #f7faf8;
}

@media (max-width: 1100px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .app-shell {
    margin-left: 0;
  }

  .kpi-grid,
  .department-grid,
  .task-board,
  .record-grid,
  .main-grid,
  .login-layout,
  .daily-layout,
  .board-grid,
  .split-panels,
  .file-grid,
  .report-grid,
  .command-strip,
  .detail-layout,
  .detail-grid,
  .login-choice-grid,
  .form-grid.two,
  .form-grid.four {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 18px;
  }

  h1 {
    font-size: 25px;
  }

  .toolbar,
  .form-actions,
  .login-form,
  .login-credential-form,
  .role-grid,
  .login-choice-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .select-label {
    min-width: 100%;
  }
}
