:root {
  --bg-base: #eef3fc;
  --bg-overlay: #e4ebf9;
  --surface: #ffffff;
  --surface-muted: #f6f9ff;
  --surface-elevated: #fbfdff;

  --line: #d5e0f2;
  --line-strong: #bed0ec;

  --text-main: #0b2a63;
  --text-soft: #415e89;
  --text-muted: #60779b;

  --primary: #1468e9;
  --primary-strong: #0b3f9f;
  --primary-soft: #eaf1ff;
  --brand-navy: #0b2a63;

  --danger: #bb3d3d;
  --danger-soft: #fff1f1;
  --success: #1d7a49;
  --success-soft: #ebfaf1;

  --shadow-sm: 0 8px 20px rgba(15, 46, 76, 0.08);
  --shadow-md: 0 18px 40px rgba(12, 39, 64, 0.12);

  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 11px;
  --radius-sm: 8px;

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 30px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 520px at -8% -12%, rgba(52, 124, 235, 0.26) 0%, rgba(52, 124, 235, 0) 63%),
    radial-gradient(840px 500px at 104% -8%, rgba(11, 42, 99, 0.16) 0%, rgba(11, 42, 99, 0) 62%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg-base) 100%);
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  padding: clamp(8px, 1.5vw, 16px);
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(10px, 1.2vw, 16px);
}

.app-sidebar {
  position: sticky;
  top: clamp(8px, 1.5vw, 16px);
  height: calc(100vh - clamp(16px, 3vw, 32px));
  min-height: 620px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(320px 240px at 92% 8%, rgba(20, 104, 233, 0.16) 0%, rgba(20, 104, 233, 0) 74%),
    linear-gradient(180deg, #fbfdff 0%, #edf3fe 100%);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sidebar-top {
  display: grid;
  gap: var(--space-2);
}

.brand-logo-wrap {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  display: block;
  width: min(150px, 100%);
  height: auto;
}

.brand-kicker {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #1f5fc7;
}

.brand-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.08;
  color: var(--brand-navy);
}

.brand-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.side-menu {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

.menu-item {
  width: 100%;
  border: 1px solid #cadeec;
  border-radius: 12px;
  background: var(--surface-elevated);
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  padding: 10px 11px;
  cursor: pointer;
  color: #223f57;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.menu-item:hover {
  border-color: #8fb2ea;
  background: #f6fbff;
  transform: translateY(-1px);
}

.menu-item.active {
  border-color: #7da3e7;
  background: linear-gradient(140deg, #eaf1ff 0%, #e2edff 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 104, 233, 0.1);
}

.menu-item:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
}

.menu-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #c1d3f0;
  background: #f2f8fd;
  font-size: 11px;
  font-weight: 800;
  color: #31536d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-item.active .menu-icon {
  border-color: #9ab7ec;
  background: #eef4ff;
  color: #0f4ab0;
}

.menu-text {
  display: grid;
  gap: 2px;
}

.menu-text strong {
  font-size: 13px;
  line-height: 1.2;
  color: #163449;
}

.menu-text small {
  font-size: 11px;
  line-height: 1.25;
  color: #5d7890;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #d6e6f2;
  padding-top: var(--space-3);
}

.sidebar-foot-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #607b91;
}

.app-main {
  min-width: 0;
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.app-topbar {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.app-topbar h2 {
  margin: 0;
  font-size: clamp(21px, 2.1vw, 27px);
  line-height: 1.12;
  color: #0f2537;
}

.topbar-subtitle {
  margin: var(--space-1) 0 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
}

.header-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.inline-actions.between {
  justify-content: space-between;
}

.tab-panel {
  display: none;
  gap: var(--space-3);
}

.tab-panel.active {
  display: grid;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.compact-card {
  padding: var(--space-3);
}

.card-head {
  margin-bottom: var(--space-3);
}

.card-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  color: #11273b;
}

.card-help {
  margin: var(--space-1) 0 0;
  font-size: 13px;
  line-height: 1.38;
  color: var(--text-soft);
}

h4 {
  margin: 0 0 var(--space-2);
  font-size: 15px;
  color: #1a3447;
}

.subsection {
  margin-top: var(--space-4);
}

.no-top-gap {
  margin-top: var(--space-2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

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

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

.form-grid.compact-grid {
  margin-top: var(--space-3);
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-title {
  color: #2b455c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.field-help {
  margin: 0;
  font-size: 12px;
  line-height: 1.38;
  color: #4f697f;
}

label {
  color: #2f4a60;
}

input,
select,
button {
  font: inherit;
}

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

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-main);
  padding: 10px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input::placeholder {
  color: #89a0b5;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #56748e 50%),
    linear-gradient(135deg, #56748e 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input:hover,
select:hover {
  border-color: #aac4d9;
}

input:focus,
select:focus {
  outline: none;
  border-color: #3698c2;
  box-shadow: 0 0 0 3px rgba(64, 161, 204, 0.2);
}

input:disabled,
select:disabled {
  background: #f5f8fc;
  color: #7e93a7;
  cursor: not-allowed;
}

.custom-select {
  position: relative;
}

.custom-select-trigger {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-main);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.custom-select-trigger:hover {
  border-color: #aac4d9;
}

.custom-select-trigger:focus-visible,
.custom-select.open .custom-select-trigger {
  outline: none;
  border-color: #3698c2;
  box-shadow: 0 0 0 3px rgba(64, 161, 204, 0.2);
}

.custom-select-trigger.disabled {
  background: #f5f8fc;
  color: #7e93a7;
  cursor: not-allowed;
}

.custom-select-value {
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-caret {
  color: #5c7893;
  font-size: 12px;
  line-height: 1;
}

.custom-select-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid #d0dfec;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 8px;
  display: none;
}

.custom-select.open .custom-select-panel {
  display: grid;
  gap: 8px;
}

.custom-select-search {
  min-height: 36px;
  border-radius: 9px;
  padding: 8px 10px;
}

.custom-select-options {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 4px;
}

.custom-select-option {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #29445c;
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
}

.custom-select-option:hover {
  background: #f5faff;
  border-color: #d5e5f4;
}

.custom-select-option.selected {
  background: #eef5ff;
  border-color: #bad0ef;
  color: #1c4f95;
}

.custom-select-empty {
  color: #607b95;
  font-size: 12px;
  padding: 6px 4px;
}

.field.has-error input,
.field.has-error select,
.field.has-error .custom-select-trigger,
.custom-multi.has-error,
.day-fieldset.has-error,
.time-list.has-error {
  border-color: #d46a6a;
}

.field-error {
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
}

.day-fieldset {
  margin: 0;
  border: 1px solid #d5e5f2;
  border-radius: var(--radius-md);
  background: #fbfdff;
  padding: var(--space-3);
}

.day-fieldset legend {
  padding: 0 4px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  border: 1px solid #c9dceb;
  border-radius: 999px;
  background: #fff;
  color: #2b4a61;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.chip:hover {
  border-color: #8eb0e8;
  transform: translateY(-1px);
}

.chip.active {
  background: var(--primary-soft);
  border-color: #8aaeee;
  color: #0f4ab0;
}

.chip:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
}

.settings-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.settings-split > section {
  border: 1px solid #dbe8f3;
  border-radius: var(--radius-md);
  background: #fafdff;
  padding: var(--space-3);
}

.checks {
  display: grid;
  gap: var(--space-2);
}

.checks-grouped {
  display: grid;
  gap: 12px;
}

.checks-group {
  border: 1px solid #dce8f5;
  border-radius: 12px;
  padding: 10px;
  background: #fbfdff;
}

.checks-group h5 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4f6a83;
}

.checks-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.field-toggle {
  border: 1px solid #d6e5f1;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-2);
}

.field-toggle.is-disabled {
  opacity: 0.58;
  background: #f8fbff;
}

.toggle-control {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dce8f2;
  transition: background-color 0.18s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(10, 30, 46, 0.24);
  transition: transform 0.18s ease;
}

.toggle-control input:checked + .toggle-track {
  background: linear-gradient(150deg, #1f78f2 0%, #1468e9 100%);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-control input:focus-visible + .toggle-track {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
}

.toggle-meta {
  display: grid;
  gap: 2px;
}

.toggle-meta strong {
  font-size: 13px;
  line-height: 1.3;
  color: #223f56;
}

.toggle-meta small {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #527089;
}

.custom-multi {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  background: #fff;
  display: grid;
  gap: var(--space-2);
}

.multi-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid #caddea;
  border-radius: 10px;
  background: #f7fbff;
  color: #27475f;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.multi-trigger:hover {
  border-color: #a8c5da;
  background: #f3f9ff;
}

.multi-trigger:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
}

.multi-caret {
  font-size: 12px;
  opacity: 0.8;
}

.multi-panel {
  border: 1px solid #deebf4;
  border-radius: 10px;
  background: #fff;
  padding: var(--space-2);
  display: grid;
  gap: var(--space-2);
}

.custom-multi input[type="text"] {
  min-height: 38px;
}

.custom-multi-selected {
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-multi-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #bfd6e7;
  border-radius: 999px;
  background: #f2f8fd;
  color: #21445d;
  padding: 5px 10px;
  font-size: 12px;
}

.custom-multi-tag button {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
  color: #365a73;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.custom-multi-tag button:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 1px;
  border-radius: 3px;
}

.custom-multi-options {
  border: 1px solid #deebf4;
  border-radius: 9px;
  max-height: 230px;
  overflow: auto;
}

.custom-multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
}

.custom-multi-option + .custom-multi-option {
  border-top: 1px solid #edf4f8;
}

.custom-multi-option:hover {
  background: #f7fbff;
}

.custom-multi-option input {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: #1468e9;
}

.custom-multi-empty {
  padding: 8px;
  color: #577289;
  font-size: 12px;
}

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

.time-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.time-row input[type="time"] {
  max-width: 190px;
}

.inline-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #4f6b81;
}

.panel-actions {
  margin-top: var(--space-4);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
}

.btn.primary {
  border-color: #1468e9;
  color: #fff;
  background: linear-gradient(150deg, #1f78f2 0%, #1468e9 100%);
  box-shadow: 0 9px 18px rgba(20, 104, 233, 0.26);
}

.btn.primary:hover {
  background: linear-gradient(150deg, #1a67e2 0%, #0b4fbe 100%);
}

.btn.secondary {
  border-color: #c8dceb;
  color: #27495f;
  background: #edf5fb;
}

.btn.secondary:hover {
  background: #e4eff9;
}

.btn.ghost {
  border-color: #ccddec;
  color: #36566d;
  background: #f9fcff;
}

.btn.ghost:hover {
  background: #f1f7fd;
}

.btn[disabled] {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

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

.kpi-card {
  border: 1px solid #d7e5f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfeff 0%, #f6fbff 100%);
  padding: 10px 11px;
  min-height: 82px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.kpi-label {
  margin: 0;
  color: #547087;
  font-size: 12px;
  line-height: 1.3;
}

.kpi-value {
  margin: 0;
  color: #102a3c;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.kpi-value.small {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.meta-line {
  margin: var(--space-2) 0 0;
  color: #59758c;
  font-size: 12px;
  line-height: 1.4;
}

.table-head {
  margin-bottom: var(--space-2);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

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

th,
td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e4eef6;
  white-space: nowrap;
}

td:last-child,
th:last-child {
  min-width: 120px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f8fc;
  color: #35556d;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.status-row td:first-child {
  min-width: 220px;
}

.status-expand-btn {
  border: 1px solid #c5d6ef;
  background: #f2f7ff;
  color: #2959a0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  margin-right: 8px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.status-expand-btn:hover {
  border-color: #9db9e8;
  background: #eaf2ff;
}

.status-expand-btn:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
}

.status-details-row td {
  white-space: normal;
  background: #f8fbff;
}

.status-details {
  border: 1px solid #dce7f7;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}

.status-details-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  color: #355a83;
}

.status-details-content {
  min-height: 18px;
}

.status-details-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.status-details-list li {
  white-space: normal;
  color: #294867;
  line-height: 1.35;
}

.status-details-time {
  color: #4b698a;
  font-size: 12px;
  margin-right: 8px;
}

.status-details-type {
  font-weight: 700;
}

.status-details-link {
  color: #2b5fa8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-details-link:hover {
  color: #1d4d92;
}

.status-details-link:focus-visible {
  outline: 2px solid #2f7cf0;
  outline-offset: 2px;
  border-radius: 3px;
}

.status-details-note {
  color: #4d6f90;
  font-size: 12px;
}

.status-details-pager {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-page-btn {
  padding: 5px 10px;
  font-size: 12px;
}

.status-details-page-meta {
  color: #4f6d8d;
  font-size: 12px;
  font-weight: 600;
}

.status-details-source {
  color: #6380a1;
  font-size: 12px;
}

.status-details-empty,
.status-details-error {
  margin: 0;
  font-size: 12px;
  color: #5f7c9b;
}

.status-details-error {
  color: #9a3941;
}

.banner {
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #b8dfc7;
  background: var(--success-soft);
  color: var(--success);
}

.banner.danger {
  border-color: #efc7c7;
  background: var(--danger-soft);
  color: var(--danger);
}

.billing-placeholder {
  border: 1px dashed #c7d9e5;
  border-radius: 12px;
  background: #f9fcff;
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.billing-placeholder p {
  margin: 0;
  color: #4a657d;
  font-size: 14px;
  line-height: 1.4;
}

.onboarding-root {
  position: fixed;
  inset: 0;
  z-index: 160;
}

.onboarding-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 23, 35, 0.62);
}

.onboarding-highlight {
  position: fixed;
  border-radius: 14px;
  border: 2px solid rgba(173, 231, 255, 0.95);
  box-shadow:
    0 0 0 9999px rgba(8, 21, 33, 0.58),
    0 14px 34px rgba(11, 30, 46, 0.5);
  pointer-events: none;
  transition: all 180ms ease;
  z-index: 1;
}

.onboarding-card {
  position: fixed;
  width: min(430px, calc(100vw - 26px));
  border-radius: 15px;
  border: 1px solid #9fc4d8;
  background: linear-gradient(160deg, #ffffff 0%, #f4faff 100%);
  box-shadow: 0 22px 52px rgba(6, 23, 37, 0.45);
  padding: 14px 14px 12px;
  color: #143246;
  z-index: 2;
}

.onboarding-meta {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: #4d6d80;
  font-weight: 800;
}

.onboarding-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #dce9f3;
  overflow: hidden;
  margin-bottom: 9px;
}

.onboarding-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f78f2, #1468e9);
  transition: width 180ms ease;
}

.onboarding-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  color: #0f2c41;
}

.onboarding-text {
  margin: 7px 0 0;
  color: #23465c;
  font-size: 14px;
  line-height: 1.38;
}

.onboarding-actions {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.onboarding-nav {
  display: inline-flex;
  gap: 7px;
}

.onboarding-skip {
  min-height: 36px;
  padding: 7px 12px;
}

.hidden {
  display: none;
}

@media (max-width: 1500px) {
  .form-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .checks-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .app-sidebar {
    position: static;
    height: auto;
    min-height: 0;
    gap: var(--space-3);
  }

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

  .menu-item {
    grid-template-columns: 26px 1fr;
  }

  .sidebar-foot {
    margin-top: 0;
  }

  .settings-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .app-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .header-actions .btn {
    flex: 1 1 170px;
  }

  .form-grid,
  .form-grid.cols-2,
  .form-grid.cols-3 {
    grid-template-columns: 1fr;
  }

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

  .panel-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .panel-actions .btn {
    flex: 1 1 180px;
  }

  .side-menu {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .kpi-grid,
  .journal-kpis {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 22px;
  }

  .app-topbar h2 {
    font-size: 22px;
  }
}
