:root {
  --blue: #00436b;
  --blue-2: #0b5a86;
  --red: #e30613;
  --ink: #17212b;
  --muted: #6b7785;
  --line: #d9e0e7;
  --surface: #ffffff;
  --soft: #f3f6f8;
  --ok: #137a4a;
  --warn: #a65f00;
  --bad: #ad1d2b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fafc 0, #eef3f6 100%);
}

body[data-theme="dark"] {
  --ink: #edf4f7;
  --muted: #aebfca;
  --line: #29495d;
  --surface: #102b3b;
  --soft: #0a2230;
  background: linear-gradient(180deg, #071b28 0, #0d2635 100%);
}

body[data-theme="dark"] .login-page {
  background: var(--soft);
}

body[data-theme="dark"] .content,
body[data-theme="dark"] .page {
  background: transparent;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] th,
body[data-theme="dark"] .target-panel,
body[data-theme="dark"] .recipient-preview,
body[data-theme="dark"] .compact-checks,
body[data-theme="dark"] .marker-option,
body[data-theme="dark"] .tabs button,
body[data-theme="dark"] .btn.secondary,
body[data-theme="dark"] .notification-panel {
  background: #0b2230;
  color: var(--ink);
}

body[data-theme="dark"] .notice,
body[data-theme="dark"] .error,
body[data-theme="dark"] .success,
body[data-theme="dark"] .broadcast-history-card,
body[data-theme="dark"] .recipient-chip,
body[data-theme="dark"] .legal-texts details,
body[data-theme="dark"] .login-legal details {
  background: #112f40;
}

body[data-theme="dark"] .settings-preview img,
body[data-theme="dark"] .brand-row img,
body[data-theme="dark"] .sidebar-brand img,
body[data-theme="dark"] .mobile-header img {
  background: rgba(255,255,255,.9);
}

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

button {
  cursor: pointer;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 18px;
  align-content: center;
  color: var(--muted);
}

.boot img {
  width: 132px;
  border-radius: 8px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  background: var(--surface);
}

.login-panel {
  padding: 48px;
  display: grid;
  align-content: center;
  border-right: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 42px;
}

.brand-row img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,.86);
}

.brand-row h1 {
  font-size: 28px;
  line-height: 1.05;
  margin: 0;
}

.brand-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.login-art {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0, 67, 107, .98), rgba(0, 67, 107, .68)),
    url("/assets/idee.png") center / cover;
  overflow: hidden;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 74%, var(--red) 74% 79%, transparent 79%),
    radial-gradient(circle at 86% 14%, rgba(255,255,255,.18), transparent 28%);
}

.login-art-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 64px;
  display: grid;
  align-content: end;
  color: white;
}

.login-art-content h2 {
  max-width: 680px;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 1;
  margin: 0 0 20px;
}

.login-art-content p {
  max-width: 620px;
  font-size: 19px;
  line-height: 1.5;
  margin: 0;
}

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

.mobile-header,
.nav-backdrop {
  display: none;
}

.sidebar {
  background: var(--blue);
  color: white;
  min-height: 100vh;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.sidebar-brand img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,.94);
}

.sidebar-brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.05;
}

.sidebar-brand span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

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

.nav button,
.logout-btn {
  border: 0;
  color: white;
  background: transparent;
  border-radius: 7px;
  padding: 12px 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav button:hover,
.nav button.active,
.logout-btn:hover {
  background: rgba(255,255,255,.13);
}

.user-strip {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.user-strip small {
  color: rgba(255,255,255,.74);
}

.content {
  min-width: 0;
}

.topbar {
  min-height: 92px;
  background: linear-gradient(90deg, var(--blue), #083553);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 34px;
  border-bottom: 6px solid var(--red);
}

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

.topbar p {
  margin: 6px 0 0;
  color: rgba(255,255,255,.78);
}

.topbar img {
  max-width: 280px;
  width: 32vw;
  min-width: 180px;
  max-height: 62px;
  object-fit: contain;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notification-btn {
  width: 42px;
  height: 42px;
  position: relative;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 7px;
  background: rgba(255,255,255,.09);
  color: white;
  display: grid;
  place-items: center;
}

.notification-btn:hover,
.notification-btn.has-unread {
  background: rgba(255,255,255,.18);
}

.bell-symbol {
  font-size: 18px;
  line-height: 1;
}

.notification-count {
  min-width: 20px;
  height: 20px;
  position: absolute;
  top: -7px;
  right: -7px;
  border: 2px solid var(--blue);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.notification-panel {
  width: min(420px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 96px));
  position: fixed;
  top: 76px;
  right: 22px;
  z-index: 40;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 52px rgba(0, 35, 58, .22);
}

.notification-head {
  min-height: 56px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

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

.danger-text {
  color: var(--bad) !important;
}

.notification-list {
  max-height: calc(min(620px, calc(100vh - 96px)) - 56px);
  overflow-y: auto;
  padding: 8px;
}

.notification-item {
  width: 100%;
  border: 0;
  border-left: 4px solid #c8d2dc;
  border-radius: 7px;
  display: grid;
  gap: 5px;
  padding: 10px 10px 10px 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.notification-item:hover,
.notification-item.unread {
  background: #f3f7fa;
}

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

.notification-item.open,
.notification-item.approved {
  border-left-color: var(--ok);
}

.notification-item.rejected,
.notification-item.withdrawn,
.notification-item.cancelled {
  border-left-color: var(--bad);
}

.notification-item.pending.unread {
  background: #fff9ec;
}

.notification-item.open.unread,
.notification-item.approved.unread {
  background: #eef9f2;
}

.notification-item.rejected.unread,
.notification-item.withdrawn.unread,
.notification-item.cancelled.unread {
  background: #fff1f2;
}

.notification-item strong,
.notification-item span,
.notification-item small {
  min-width: 0;
}

.notification-item small {
  color: var(--muted);
}

.message-text {
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.page {
  padding: 28px 34px 48px;
}

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

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

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

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 35, 58, .06);
}

.panel {
  padding: 20px;
}

.card {
  padding: 18px;
}

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

.stat span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stat strong {
  font-size: 34px;
}

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

.section-head h3 {
  margin: 0;
  font-size: 20px;
}

.section-head h4 {
  margin: 0;
  font-size: 16px;
}

.section-head.compact {
  margin-bottom: 8px;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.inline-control {
  min-width: 220px;
  max-width: 320px;
  margin: 0;
}

.inline-control select {
  margin-top: 5px;
}

.request-history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.appointment-distribution {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  background: var(--soft);
}

.distribution-list {
  display: grid;
  gap: 6px;
}

.distribution-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: space-between;
}

.distribution-row small {
  color: var(--muted);
}

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

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

.inline-check {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.ff-limit-panel {
  display: none;
  gap: 8px;
}

form:has(input[name="limitToFfs"]:checked) .ff-limit-panel {
  display: grid;
}

.broadcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.recipient-preview {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.recipient-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.recipient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipient-chip {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 220px;
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 800;
}

.recipient-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-chip {
  color: var(--muted);
  justify-content: center;
}

.recipient-more {
  cursor: pointer;
  justify-content: center;
  color: var(--muted);
  min-height: 46px;
  text-align: left;
}

.recipient-more:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.broadcast-history {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.broadcast-history-card {
  border: 1px solid var(--line);
  border-left: 5px solid #9aa8b4;
  border-radius: 7px;
  background: #f8fafb;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.broadcast-history-card.info {
  border-color: #d6e0e8;
  border-left-color: #8295a6;
  background: #f6f9fb;
}

.broadcast-history-card.pending {
  border-color: #f2d7a8;
  border-left-color: var(--warn);
  background: #fff8eb;
}

.broadcast-history-card.approved,
.broadcast-history-card.open {
  border-color: #b9dfcc;
  border-left-color: var(--ok);
  background: #f0fbf5;
}

.broadcast-history-card.rejected,
.broadcast-history-card.withdrawn {
  border-color: #f0bdc3;
  border-left-color: var(--bad);
  background: #fff4f5;
}

.broadcast-history-card strong {
  display: block;
}

.broadcast-history-card p {
  margin: 6px 0;
  color: var(--ink);
}

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

.information-panel {
  max-width: 980px;
}

.information-tabs {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.marker-option {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafb;
  color: var(--ink);
  font-size: 14px;
}

.marker-option input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #c8d2dc;
}

.marker-option.pending .marker-dot {
  background: var(--warn);
}

.marker-option.approved .marker-dot,
.marker-option.open .marker-dot {
  background: var(--ok);
}

.marker-option.rejected .marker-dot,
.marker-option.withdrawn .marker-dot,
.marker-option.cancelled .marker-dot {
  background: var(--bad);
}

.admin-user-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.user-list-panel {
  min-width: 0;
}

.user-admin-table table {
  min-width: 980px;
}

.user-admin-table th,
.user-admin-table td {
  padding: 8px 9px;
}

.user-admin-table input,
.user-admin-table select {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 13px;
}

.user-admin-table td:first-child {
  min-width: 220px;
}

.user-admin-table td:first-child input + input {
  margin-top: 6px;
}

.ff-details summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.35;
}

.compact-checks {
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
}

.compact-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.compact-actions .btn {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.user-actions-form {
  display: block;
}

.nowrap {
  white-space: nowrap;
}

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f8fafb;
}

.location-group-row th {
  background: color-mix(in srgb, var(--brand) 10%, #f8fafb);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.location-group-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}

form {
  display: grid;
  gap: 12px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  line-height: 1.25;
}

.check-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.check-option span {
  min-width: 0;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 9px 14px;
  align-items: start;
}

.check-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.check-stack strong {
  margin-bottom: 2px;
}

input,
select,
textarea {
  border: 1px solid #c7d1db;
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  min-width: 0;
}

input[type="color"] {
  min-height: 42px;
  padding: 4px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

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

.btn {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  border-radius: 7px;
  padding: 10px 13px;
  min-height: 40px;
}

.btn.secondary {
  background: white;
  color: var(--blue);
}

.btn.danger {
  border-color: var(--bad);
  background: var(--bad);
}

.btn.ghost {
  border-color: transparent;
  color: var(--blue);
  background: transparent;
}

.btn:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #e9eef3;
  color: #405061;
  font-size: 12px;
  white-space: nowrap;
}

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

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

.badge.approved,
.badge.open {
  color: var(--ok);
  background: #e8f6ee;
}

.badge.rejected,
.badge.cancelled,
.badge.withdrawn {
  color: var(--bad);
  background: #ffe9ec;
}

.badge.closed {
  color: #555;
  background: #eceff2;
}

.badge.completed {
  color: #315064;
  background: #e5edf3;
}

.notice {
  border-left: 4px solid var(--red);
  background: white;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(0, 35, 58, .05);
}

.notice.neutral {
  border-left-color: var(--blue);
}

.notice.danger {
  border-left-color: var(--red);
  background: #fff4f5;
  color: var(--bad);
}

.backup-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.backup-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbfd;
}

.backup-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.backup-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 22px;
}

.backup-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px;
  margin: 12px 0;
}

.backup-preview-table {
  overflow-x: auto;
}

.backup-preview-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

.backup-preview-table th,
.backup-preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  white-space: nowrap;
}

.backup-preview-table th {
  color: var(--muted);
  font-size: 12px;
}

.backup-preview-table tr:last-child td {
  border-bottom: 0;
}

.backup-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
}

.backup-delta.positive {
  background: #eaf8f1;
  color: var(--good);
}

.backup-delta.negative {
  background: #fff4f5;
  color: var(--bad);
}

.backup-delta.neutral {
  background: #e9eff4;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tabs button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 9px 13px;
}

.tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.footer-logo {
  max-width: 430px;
  width: 100%;
  max-height: 96px;
  margin-top: 26px;
  object-fit: contain;
  object-position: left center;
  opacity: .8;
}

.legal-texts,
.login-legal {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.legal-texts details,
.login-legal details {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,.58);
  padding: 10px 12px;
}

.legal-texts summary,
.login-legal summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.legal-texts p,
.login-legal p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.settings-panel {
  max-width: 920px;
}

.settings-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--soft);
}

.settings-section h4 {
  margin: 0;
  font-size: 16px;
}

.settings-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
}

.settings-preview img {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--line);
}

.settings-preview.footer-preview img {
  width: min(340px, 48vw);
  height: 82px;
}

.settings-preview strong {
  display: block;
  font-size: 22px;
}

.settings-preview span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.error {
  color: var(--bad);
  background: #fff1f2;
  border: 1px solid #ffd6dc;
  padding: 10px 12px;
  border-radius: 7px;
}

.success {
  color: var(--ok);
  background: #eef9f2;
  border: 1px solid #cdebd9;
  padding: 10px 12px;
  border-radius: 7px;
  overflow-wrap: anywhere;
}

.login-notice {
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.login-notice.subtle {
  border-left-color: var(--red);
  color: var(--muted);
}

.compact {
  font-size: 13px;
}

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

  .login-art {
    display: none;
  }

  .mobile-header {
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 40px 1fr 42px 40px;
    gap: 10px;
    align-items: center;
    padding: 8px 14px;
    color: white;
    background: linear-gradient(90deg, var(--blue), #083553);
    border-bottom: 4px solid var(--red);
    box-shadow: 0 8px 22px rgba(0, 35, 58, .16);
  }

  .mobile-header strong,
  .mobile-header small {
    display: block;
    line-height: 1.15;
  }

  .mobile-header small {
    margin-top: 3px;
    color: rgba(255,255,255,.74);
    font-size: 12px;
  }

  .mobile-header img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: rgba(255,255,255,.94);
    border-radius: 6px;
  }

  .menu-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 7px;
    background: rgba(255,255,255,.08);
    display: grid;
    place-content: center;
    gap: 5px;
  }

  .menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: white;
  }

  .sidebar {
    width: min(86vw, 320px);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 18px 0 34px rgba(0, 23, 38, .26);
    overflow-y: auto;
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    border: 0;
    background: rgba(8, 24, 38, .44);
  }

  .app-shell.nav-open .nav-backdrop {
    display: block;
  }

  .nav button,
  .logout-btn {
    min-height: 46px;
  }

  .topbar {
    min-height: auto;
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .topbar img {
    display: none;
  }

  .topbar-actions {
    display: none;
  }

  .notification-panel {
    top: 68px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .topbar h2 {
    font-size: 24px;
  }

  .topbar p {
    font-size: 14px;
  }

  .grid.two,
  .grid.three,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

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

  .broadcast-history-card {
    grid-template-columns: 1fr;
  }

  .broadcast-history-card .btn {
    width: 100%;
  }

  .page,
  .topbar,
  .login-panel {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 720px) {
  body {
    background: #eef3f6;
  }

  body,
  button,
  input,
  select,
  textarea {
    font-size: 15px;
  }

  .login-panel {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .brand-row {
    margin-bottom: 28px;
  }

  .brand-row h1 {
    font-size: 24px;
  }

  .page {
    padding: 14px 10px 28px;
  }

  .panel,
  .card {
    padding: 12px;
    box-shadow: 0 8px 18px rgba(0, 35, 58, .05);
  }

  .topbar {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 10px;
  }

  .inline-control {
    width: 100%;
    max-width: none;
  }

  .section-head h3 {
    font-size: 17px;
  }

  .section-head p {
    font-size: 13px;
  }

  .target-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .inline-check {
    min-height: 36px;
  }

  .stat {
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 58px;
  }

  .stat span {
    font-size: 11px;
  }

  .stat strong {
    font-size: 25px;
  }

  input,
  select,
  textarea,
  .btn,
  .tabs button {
    min-height: 42px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions .btn,
  form > .btn {
    width: 100%;
  }

  .compact-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .compact-actions .btn {
    width: auto;
    flex: 1 1 86px;
  }

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

  .tabs button {
    border-radius: 7px;
  }

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

  .check-list {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  .user-admin-table table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 8px 18px rgba(0, 35, 58, .05);
    overflow: hidden;
  }

  td {
    min-height: 36px;
    display: grid;
    grid-template-columns: minmax(94px, 34%) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 9px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    align-self: start;
  }

  td.actions {
    display: flex;
    gap: 8px;
    min-height: 48px;
  }

  td.actions::before {
    width: 100%;
  }

  td.actions .btn {
    min-height: 38px;
  }

  .user-admin-table td:first-child {
    min-width: 0;
  }

  .user-admin-table input,
  .user-admin-table select {
    min-height: 40px;
  }

  .ff-details summary {
    font-size: 14px;
  }

  .compact-checks {
    max-height: 190px;
  }

  .ff-overview tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 8px;
  }

  .ff-overview .location-group-row {
    display: block;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin: 16px 0 8px;
  }

  .ff-overview .location-group-row th {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
  }

  .ff-overview td {
    width: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 6px 5px;
    border-bottom: 0;
  }

  .ff-overview td:first-child,
  .ff-overview td[data-label="Notiz"],
  .ff-overview td[data-label="Aktion"] {
    grid-column: 1 / -1;
  }

  .ff-overview td:first-child {
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
  }

  .ff-overview td:first-child::before,
  .ff-overview td[data-label="Aktion"]::before {
    display: none;
  }

  .ff-overview td[data-label="Notiz"]:empty {
    display: none;
  }

  .ff-overview td[data-label="Aktion"] {
    min-height: 0;
    padding-top: 7px;
  }

  .ff-overview td[data-label="Aktion"] .btn {
    width: auto;
    min-height: 34px;
    justify-self: start;
    padding: 7px 11px;
  }

  .footer-logo {
    max-width: 260px;
  }
}

@media (max-width: 420px) {
  .mobile-header {
    grid-template-columns: 40px 1fr 40px 36px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }
}
