:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  font-weight: 400;
  color: #0f172a;
  background: #f8fafc;
  --sidebar-width: 250px;
  --primary: #1e3a8a;
  --primary-bright: #2563eb;
  --primary-soft: #eaf2ff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #f59e0b;
  --warning-soft: #ffedd5;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --purple: #6336f1;
  --purple-soft: #ede9fe;
  --bg: #f8fafc;
  --surface: #ffffff;
  --line: #dbe4f0;
  --line-soft: #e8eef7;
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 5px 14px rgba(15, 23, 42, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.05), transparent 28%),
    var(--bg);
  min-height: 100vh;
  font-size: 14px;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.sidebar {
  background: linear-gradient(180deg, #05275a 0%, #021b3f 48%, #00142f 100%);
  bottom: 0;
  box-shadow: 10px 0 28px rgba(0, 20, 47, 0.18);
  color: #fff;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 24px 18px;
  position: fixed;
  top: 0;
  width: var(--sidebar-width);
  z-index: 10;
}

.mobile-menu-toggle,
.mobile-menu-overlay {
  display: none;
}

.sidebar-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 8px 4px 26px;
}

.brand-mark {
  align-items: center;
  background: #ef3340;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(239, 51, 64, 0.28);
  display: flex;
  font-size: 36px;
  font-weight: 800;
  height: 56px;
  justify-content: center;
  line-height: 1;
  width: 56px;
}

.sidebar-brand strong {
  color: #fff;
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 0.94;
}

.sidebar-brand strong span {
  font-size: 18px;
  font-weight: 700;
}

.sidebar-brand small {
  color: #e5eef8;
  display: block;
  font-size: 14px;
  margin-top: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 9px;
}

.sidebar-nav a {
  align-items: center;
  border-radius: var(--radius);
  color: #e9f2ff;
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 13px;
  min-height: 48px;
  padding: 0 14px;
  text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(135deg, #1f7aff 0%, #0f63f5 100%);
  box-shadow: 0 9px 18px rgba(37, 99, 235, 0.24);
  color: #fff;
}

.nav-icon {
  align-items: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  display: flex;
  font-size: 15px;
  height: 25px;
  justify-content: center;
  line-height: 1;
  width: 25px;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 20px;
  margin-top: auto;
  padding: 22px 4px 2px;
}

.sidebar-footer-item {
  align-items: flex-start;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
}

.sidebar-logout {
  align-items: flex-start;
  border-radius: var(--radius);
  color: #d7e7fb;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 2px 0;
  text-decoration: none;
}

.sidebar-logout:hover {
  color: #fff;
}

.sidebar-footer span {
  color: #d7e7fb;
  display: block;
  font-size: 13px;
}

.sidebar-footer strong {
  color: #fff;
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}

.status-dot {
  background: #16a34a;
  border-radius: 50%;
  height: 13px;
  margin-top: 4px;
  width: 13px;
}

.footer-icon {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 25px;
  height: 26px;
  justify-content: center;
  line-height: 1;
  width: 22px;
}

.login-page {
  background:
    radial-gradient(circle at 16% 12%, rgba(37, 99, 235, 0.14), transparent 32%),
    linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  max-width: 430px;
  padding: 30px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 26px;
}

.login-brand strong {
  color: var(--primary);
  display: block;
  font-size: 25px;
  font-weight: 900;
  line-height: 0.95;
}

.login-brand strong span {
  font-size: 18px;
}

.login-brand small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 10px;
}

.login-heading h1 {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
}

.login-heading p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  margin: 8px 0 0;
}

.login-form {
  margin-top: 22px;
}

.login-button {
  min-height: 46px;
  width: 100%;
}

.alert {
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
  margin-top: 18px;
  padding: 11px 12px;
}

.alert.error {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert.info {
  background: var(--primary-soft);
  border: 1px solid #bfd0e8;
  color: var(--primary);
}

.app-main {
  margin-left: var(--sidebar-width);
  min-width: 0;
  min-height: 100vh;
  padding: 28px clamp(24px, 3.4vw, 38px) 12px;
}

.app-main > * {
  margin-left: auto;
  margin-right: auto;
  max-width: 1180px;
  min-width: 0;
  width: 100%;
}

.session-timeout-modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.46);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.session-timeout-card {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
  display: grid;
  gap: 18px;
  grid-template-columns: 54px minmax(0, 1fr);
  max-width: 520px;
  padding: 26px;
  width: min(100%, 520px);
}

.session-timeout-icon {
  align-items: center;
  background: var(--warning-soft);
  border-radius: 999px;
  color: #c2410c;
  display: flex;
  font-size: 28px;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.session-timeout-content h2 {
  color: var(--text);
  font-size: 22px;
  margin: 0;
}

.session-timeout-content p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  margin: 8px 0 18px;
}

.session-countdown {
  color: var(--primary-bright);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
}

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

.page-title,
.page-header {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title h1,
.page-header h1 {
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}

.page-title p,
.page-header p {
  color: var(--muted);
  font-size: 16px;
  margin: 8px 0 0;
}

.datetime-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--primary);
  display: flex;
  gap: 0;
  min-height: 51px;
  padding: 0 12px;
}

.datetime-item {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 30px;
  padding: 0 14px;
}

.datetime-item + .datetime-item {
  border-left: 1px solid var(--line-soft);
}

.datetime-icon {
  color: var(--primary);
  font-size: 17px;
}

.datetime-card strong,
.datetime-card span {
  font-size: 14px;
  font-weight: 600;
}

.home-dashboard {
  display: grid;
  gap: 16px;
  width: 100%;
}

.home-dashboard > * {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  width: 100%;
}

.home-dashboard .page-title {
  margin-bottom: 8px;
}

.home-filter {
  margin: 0;
}

.home-section-heading {
  margin: 2px 0 -4px;
}

.home-section-heading h2 {
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

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

.filter-form {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(120px, max-content) minmax(210px, 250px);
  margin: 0;
}

.filter-form label {
  align-items: center;
  display: contents;
}

label,
.radio-group legend {
  color: var(--text);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

[hidden] {
  display: none !important;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  min-height: 42px;
  outline: 0;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input[readonly] {
  background: #f1f5f9;
  color: var(--muted);
}

textarea {
  resize: vertical;
}

.button {
  align-items: center;
  background: var(--primary-bright);
  border: 1px solid var(--primary-bright);
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  text-decoration: none;
}

.button:hover {
  background: #1d4ed8;
}

.button.secondary {
  background: #fff;
  border-color: #bfd0e8;
  color: var(--primary-bright);
}

.button.success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.button.success:hover {
  background: #15803d;
  border-color: #15803d;
}

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

.button.save-button {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.button.save-button:hover {
  background: #15803d;
  border-color: #15803d;
}

.actions,
.actions.compact,
.form-actions-bottom,
.case-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

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

.stat-card,
.quick-card,
.card,
.hero,
.case-summary div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card,
.hero {
  padding: 20px;
}

.stat-card {
  display: grid;
  gap: 16px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 155px;
  min-width: 0;
  padding: 22px 20px;
  cursor: default;
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  transform: none;
}

.stat-icon {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary-bright);
  display: flex;
  font-size: 20px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.stat-blue {
  background: #dbeafe;
  color: #0f63f5;
}

.stat-green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.stat-orange {
  background: var(--warning-soft);
  color: #f97316;
}

.stats span:not(.stat-icon),
.detail-grid span,
.case-summary > div > span:not(.section-icon),
.time-indicator span {
  color: var(--primary);
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.stats strong {
  color: var(--primary-bright);
  display: block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  margin-top: 18px;
}

.stats strong.muted-value {
  color: var(--purple);
}

.stats small {
  color: var(--primary);
  display: block;
  font-size: 13px;
  margin-top: 16px;
}

.quick-actions {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.quick-card {
  align-items: center;
  border-color: #b8cdf0;
  border-left: 4px solid var(--primary-bright);
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 13px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 83px;
  min-width: 0;
  padding: 16px;
  text-decoration: none;
}

.quick-card:hover {
  background: #f8fbff;
  border-color: var(--primary-bright);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
  transform: translateY(-2px);
}

.quick-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

.quick-icon {
  align-items: center;
  background: #eff6ff;
  border: 3px solid var(--primary-bright);
  border-radius: 999px;
  color: var(--primary-bright);
  display: flex;
  font-size: 26px;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  line-height: 1;
  width: 48px;
}

.quick-card:not(.primary) .quick-icon {
  background: var(--primary-bright);
  border-color: var(--primary-bright);
  border-radius: var(--radius);
  color: #fff;
}

.quick-icon.quick-green {
  background: var(--success);
  border-color: var(--success);
}

.quick-text span {
  color: var(--primary);
  display: block;
  font-weight: 800;
}

.quick-text strong {
  color: var(--primary);
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
}

.quick-arrow {
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
  transition: transform 0.16s ease, color 0.16s ease;
}

.quick-card:hover .quick-arrow {
  color: var(--primary-bright);
  transform: translateX(3px);
}

.home-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2.1fr) minmax(255px, 0.85fr);
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.home-grid > .card,
.recent-cases-card,
.home-status-card {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.card-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  max-width: 100%;
  min-width: 0;
}

.card h1,
.hero h1 {
  color: var(--text);
  margin-top: 0;
}

.card h2,
.form-section h2 {
  align-items: center;
  color: var(--primary);
  display: flex;
  font-size: 16px;
  font-weight: 800;
  gap: 9px;
  line-height: 1.2;
  margin: 0 0 16px;
}

.card-header h2 {
  margin: 0;
  min-width: 0;
}

.section-icon,
.status-icon {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: var(--primary-bright);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.section-icon.info {
  border: 2px solid var(--primary-bright);
  background: #fff;
}

.status-list {
  display: grid;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
}

.status-list div {
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 36px minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
}

.status-list .status-icon {
  grid-row: span 2;
  height: 32px;
  width: 32px;
}

.status-icon.blue {
  background: #dbeafe;
}

.status-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.status-icon.purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.status-icon.navy {
  background: #eef2f7;
  color: var(--primary);
}

.status-list span:not(.status-icon) {
  color: var(--muted);
  display: block;
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-list strong {
  color: var(--primary-bright);
  display: block;
  font-size: 17px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-list div:nth-child(2) strong {
  color: var(--success);
}

.status-list div:nth-child(3) strong {
  color: var(--purple);
}

.status-list div:nth-child(4) strong {
  color: var(--primary);
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

.table-responsive {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  width: 100%;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1040px;
  width: 100%;
}

.compact-table {
  min-width: 760px;
}

.registry-table {
  min-width: 1120px;
}

.registry-title {
  margin-bottom: 8px;
}

.registry-title h1 {
  font-size: 26px;
}

.registry-title p {
  font-size: 13px;
  margin-top: 3px;
}

.registry-card {
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  width: 100%;
}

.registry-toolbar {
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.registry-search-row {
  align-items: end;
  display: flex;
  gap: 12px;
  max-width: min(100%, calc(100vw - var(--sidebar-width) - 80px));
  min-width: 0;
  width: min(100%, calc(100vw - var(--sidebar-width) - 80px));
}

.registry-search-row .search-field {
  flex: 0 1 calc(100% - 144px);
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.registry-search-row .search-field input {
  max-width: 100%;
  min-height: 36px;
  min-width: 0;
  padding-bottom: 7px;
  padding-top: 7px;
  width: 100%;
}

.registry-new-case {
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  min-width: 132px;
  padding-bottom: 7px;
  padding-top: 7px;
  white-space: nowrap;
}

.registry-table-topline {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 0;
}

.registry-result-count {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.registry-table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.registry-export-menu {
  position: relative;
}

.import-button,
.registry-backup-button,
.export-button {
  font-size: 12px;
  min-height: 30px;
  padding: 5px 10px;
}

.export-menu-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 116px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
}

.export-menu-panel a {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--primary);
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 9px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

.export-menu-panel a:hover {
  background: #eef5ff;
  color: var(--accent);
}

.import-card,
.import-preview-card {
  margin-top: 18px;
}

.import-form {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.import-form label {
  color: var(--primary);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.import-form input[type="file"] {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  padding: 10px;
}

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

.import-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
}

.import-summary div {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.import-summary span,
.import-columns h3 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-summary strong {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.import-columns {
  margin-top: 18px;
}

.import-columns h3 {
  margin: 0 0 10px;
}

.import-columns div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-columns span {
  background: #eef5ff;
  border: 1px solid #d7e6ff;
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.import-preview-wrap {
  margin-top: 18px;
  max-height: 520px;
}

.import-preview-table {
  min-width: 860px;
}

.import-analysis-card,
.import-final-card {
  margin-top: 18px;
}

.import-duplicates-card,
.import-errors-card {
  margin-top: 18px;
}

.import-analysis-summary .import-result-new {
  color: var(--success);
}

.import-analysis-summary .import-result-duplicate {
  color: #c2410c;
}

.import-analysis-summary .import-result-error {
  color: var(--danger);
}

.import-analysis-table {
  min-width: 720px;
}

.import-duplicates-table,
.import-errors-table {
  min-width: 760px;
}

.import-confirm-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.import-confirm-box {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  margin-top: 18px;
  padding: 16px;
}

.import-confirm-box h3 {
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 8px;
}

.import-confirm-box p {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 6px;
}

.registry-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  max-height: calc(100vh - 260px);
  max-width: 100%;
  min-height: 430px;
  min-width: 0;
  overflow: auto;
}

.personnel-table {
  min-width: 620px;
}

.personnel-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

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

th {
  background: #f4f7fb;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.registry-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.registry-table th,
.registry-table td {
  padding: 7px 9px;
  vertical-align: middle;
}

.registry-table tbody tr {
  height: 34px;
}

.registry-table tbody tr:nth-child(even) {
  background: #f8fbff;
}

td {
  font-weight: 600;
}

td a {
  color: var(--primary-bright);
  text-decoration: none;
}

.registry-row {
  cursor: pointer;
}

.registry-row:hover {
  background: #f8fbff;
}

.trash-card {
  margin-top: 16px;
}

.trash-search-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.trash-search-form .search-field {
  flex: 1 1 320px;
}

.trash-summary {
  grid-template-columns: minmax(180px, 260px);
}

.trash-table {
  min-width: 1120px;
}

.trash-table-wrap {
  margin-top: 18px;
}

.trash-actions {
  align-items: center;
  gap: 8px;
}

.badge {
  border-radius: 5px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.warning {
  background: #fff7ed;
  color: #c2410c;
}

.badge.info {
  background: #dbeafe;
  color: var(--primary-bright);
}

.badge.neutral,
.badge.access {
  background: #eef2f7;
  color: var(--primary);
}

.badge.danger.muted {
  background: #f1f5f9;
  color: #ef4444;
}

.time-badge {
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  min-width: 64px;
  justify-content: center;
  padding: 6px 8px;
  white-space: nowrap;
}

.time-badge.neutral {
  background: #eef2ff;
  color: var(--primary);
}

.time-badge.good {
  background: var(--success-soft);
  color: var(--success);
}

.time-badge.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.time-badge.unavailable {
  background: #f1f5f9;
  color: var(--muted);
  min-width: 126px;
}

.small-link,
.danger-link {
  background: transparent;
  border: 0;
  color: var(--primary-bright);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
  text-decoration: none;
}

.danger-link {
  color: var(--danger);
}

.row-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.icon-action {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  color: var(--primary-bright);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-decoration: none;
  width: 26px;
}

.icon-action:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.danger-icon {
  color: var(--danger);
}

.danger-icon:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.delete-form {
  display: inline;
}

.registry-card,
.registry-toolbar,
.case-form,
.new-case-form,
.form-section {
  display: grid;
  gap: 16px;
}

.registry-filters {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(92px, 0.55fr) minmax(155px, 1fr) minmax(150px, 0.95fr) minmax(118px, 0.65fr) auto;
}

.search-field input,
.reset-button {
  min-height: 34px;
}

.registry-search-row > .search-field {
  flex-basis: calc(100% - 144px) !important;
  flex-grow: 0 !important;
  flex-shrink: 1 !important;
}

.registry-search-row > .search-field > #registry-search {
  min-width: 0 !important;
  width: 100% !important;
}

.registry-filters label {
  gap: 3px;
}

.registry-filters select {
  min-height: 34px;
  padding-bottom: 6px;
  padding-top: 6px;
}

.reset-button {
  font-size: 12px;
  height: 34px;
  min-width: 92px;
  padding-left: 10px;
  padding-right: 10px;
}

.registry-pagination-bar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 2px;
}

.registry-pagination-bar p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}

.registry-pagination {
  align-items: center;
  display: flex;
  gap: 6px;
}

.pagination-pages {
  display: flex;
  gap: 5px;
}

.pagination-button {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 7px;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 8px;
}

.pagination-button:hover:not(:disabled),
.pagination-button.active {
  background: var(--primary-bright);
  border-color: var(--primary-bright);
  color: #fff;
}

.pagination-button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-section-card {
  margin-top: 18px;
}

.section-title-note {
  color: var(--muted);
  display: inline;
  font-size: 0.84em;
  font-weight: 700;
  white-space: nowrap;
}

.label-note,
.table-label-note {
  color: var(--muted);
  display: inline;
  font-size: 0.82em;
  font-weight: 700;
  white-space: nowrap;
}

.settings-add-form {
  margin-top: 16px;
}

.coordinate-help-box {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px 16px;
}

.coordinate-help-box h3 {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 6px;
}

.coordinate-help-box p,
.coordinate-help-box li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.coordinate-help-box p {
  margin: 0 0 8px;
}

.coordinate-help-box ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.coordinate-help-box strong {
  color: var(--primary);
}

.coordinate-help-action {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
}

.coordinate-copy-feedback {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.settings-provenienze-grid {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

.settings-provenienze-grid > form {
  display: none;
}

.settings-provenienze-header,
.settings-provenienza-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns:
    minmax(170px, 1.25fr)
    105px
    minmax(120px, 0.9fr)
    minmax(120px, 0.9fr)
    78px
    112px
    112px
    74px
    minmax(180px, 1.15fr)
    78px
    96px;
  min-width: 1310px;
}

.settings-provenienze-header {
  background: #f4f7fb;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  padding: 10px;
}

.settings-provenienza-row {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 10px;
}

.settings-provenienza-row input,
.settings-provenienza-row select {
  min-height: 36px;
}

.settings-provenienza-row input[type="color"] {
  cursor: pointer;
  padding: 4px;
}

.settings-position-cell,
.settings-actions-cell {
  align-items: center;
  display: flex;
  gap: 8px;
}

.settings-position-cell {
  justify-content: space-between;
}

.settings-actions-cell {
  justify-content: flex-end;
}

.settings-actions-cell form,
.settings-position-cell form {
  margin: 0;
}

.compact-button {
  min-height: 36px;
  padding: 8px 11px;
}

.datetime-pair {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 118px;
}

.new-case-form,
.case-form {
  gap: 18px;
}

.new-case-card {
  border-left: 4px solid var(--primary-bright);
  padding: 22px;
}

.form-section h2 {
  border-bottom: 1px solid var(--line-soft);
  color: var(--primary);
  font-size: 14px;
  letter-spacing: 0;
  padding-bottom: 12px;
}

.radio-group {
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.radio-group label {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: row;
  font-weight: 600;
  gap: 8px;
  min-height: 40px;
  padding: 9px 11px;
}

.radio-group input {
  margin: 0;
}

.radio-inline {
  align-content: start;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.radio-inline legend {
  flex-basis: 100%;
}

.radio-inline label {
  min-width: 122px;
}

.new-case-card .radio-inline label {
  min-width: 150px;
}

.checkbox-control {
  align-items: center;
  align-self: end;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: row;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
}

.checkbox-control input {
  accent-color: var(--success);
  height: 18px;
  min-height: 18px;
  width: 18px;
}

.checkbox-control span {
  color: var(--text);
  font-weight: 800;
}

.city-verification-feedback {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-height: 16px;
}

.city-verification-feedback.checking {
  color: var(--primary);
}

.city-verification-feedback.success {
  color: var(--success);
}

.city-verification-feedback.error {
  color: var(--danger);
}

.new-case-title {
  margin-bottom: 14px;
}

.new-case-title h1 {
  font-size: 28px;
}

.new-case-title p {
  font-size: 14px;
  margin-top: 5px;
}

.new-case-form {
  gap: 14px;
}

.new-case-card {
  padding: 18px;
}

.new-case-identity-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.new-case-identity-grid label:nth-child(n + 5) {
  grid-column: span 1;
}

.timing-section {
  border-left-color: var(--purple);
}

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

.timing-grid label {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  gap: 7px;
  padding: 10px;
}

.timing-grid .datetime-pair {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.timing-grid input {
  min-height: 34px;
  padding-bottom: 6px;
  padding-top: 6px;
}

.calculated-new-case-card {
  border-left-color: var(--success);
}

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

.new-case-calculated-grid .time-indicator {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
}

.new-case-calculated-grid .time-indicator strong {
  border-radius: 6px;
  padding: 7px 10px;
}

.new-case-calculated-grid .time-indicator.neutral strong {
  background: #eef2ff;
  color: var(--primary);
}

.new-case-calculated-grid .time-indicator.good strong {
  background: var(--success-soft);
}

.new-case-calculated-grid .time-indicator.bad strong {
  background: var(--danger-soft);
}

.new-case-calculated-grid .time-indicator.unavailable strong {
  background: #f1f5f9;
}

.notes-card textarea {
  min-height: 170px;
}

.new-case-action-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  justify-content: flex-end;
  margin-top: 2px;
  padding: 12px;
  position: sticky;
  bottom: 12px;
  z-index: 3;
}

.required,
.error {
  color: #b91c1c;
}

.field-label {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.error,
.success {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  margin-top: 0;
  padding: 12px 14px;
}

.success {
  color: #15803d;
}

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

.case-summary div {
  padding: 16px;
}

.case-summary .section-icon {
  margin-bottom: 10px;
}

.case-summary strong,
.detail-grid strong,
.time-indicator strong {
  color: var(--primary);
  display: block;
  font-weight: 800;
  margin-top: 6px;
}

.detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.detail-grid div,
.time-indicator,
.notes {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px;
}

.notes {
  white-space: pre-wrap;
}

.calculated-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.time-indicator.good {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.time-indicator.good strong {
  color: var(--success);
}

.time-indicator.bad {
  background: #fef2f2;
  border-color: #fecaca;
}

.time-indicator.bad strong {
  color: #b91c1c;
}

.time-indicator.unavailable strong {
  color: var(--muted);
}

.case-delete-form {
  margin-top: 12px;
}

.settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
}

.empty-filter-state,
.empty-state {
  color: var(--muted);
  font-weight: 700;
}

.statistics-dashboard {
  display: grid;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.statistics-dashboard > * {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  min-width: 0;
  width: 100%;
}

.statistics-title {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0;
  padding: 22px 24px;
}

.statistics-title h1 {
  line-height: 1.05;
}

.statistics-title p {
  margin-bottom: 0;
}

.statistics-dashboard-header .filter-form {
  margin: 0;
  min-width: 0;
}

.statistics-dashboard-header .statistics-year-filter-form {
  align-items: end;
  display: grid;
  flex: 0 1 auto;
  gap: 12px;
  grid-template-columns: minmax(220px, 260px) max-content;
  justify-content: end;
  max-width: 100%;
}

.statistics-report-export-form {
  display: block;
  margin: 0;
  max-width: 100%;
  min-width: 0;
}

.statistics-header-actions {
  align-items: end;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  min-width: 0;
}

.statistics-year-apply-button,
.statistics-report-button {
  align-items: center;
  display: inline-flex;
  flex: 0 1 auto;
  gap: 8px;
  height: 44px;
  justify-content: center;
  max-width: 100%;
  text-decoration: none;
  white-space: nowrap;
}

.print-report-header {
  display: none;
}

.statistics-dashboard-header .filter-form label {
  align-items: stretch;
  display: grid;
  gap: 8px;
  min-width: min(260px, 100%);
}

.statistics-dashboard-header select {
  height: 44px;
  min-width: 0;
  width: 100%;
}

.statistics-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
  min-width: 0;
}

.statistics-cards .stat-card {
  align-items: start;
  gap: 15px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 172px;
  min-width: 0;
  padding: 22px;
}

.statistics-cards .stat-card > div {
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto;
  min-height: 120px;
  min-width: 0;
}

.statistics-cards .stat-card .stat-icon {
  margin-top: 2px;
}

.statistics-cards .stat-card span:not(.stat-icon) {
  line-height: 1.25;
  min-height: 32px;
}

.statistics-cards .stat-card strong {
  align-self: center;
  font-size: clamp(28px, 2.7vw, 38px);
  line-height: 1.05;
  margin-top: 0;
  white-space: nowrap;
}

.statistics-cards .stat-card small {
  align-self: start;
  line-height: 1.25;
  margin-top: 0;
}

.statistics-quality-card,
.statistics-table-card {
  margin-bottom: 0;
}

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

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

.access-distribution-card,
.door-distribution-card {
  display: flex;
  flex-direction: column;
}

.access-distribution-card .donut-panel,
.door-distribution-card .donut-panel {
  flex: 1;
}

.statistics-table {
  min-width: 960px;
}

.statistics-table th,
.statistics-table td {
  padding: 11px 12px;
  vertical-align: middle;
}

.statistics-table th {
  background: #f5f7fb;
  border-bottom: 1px solid var(--line);
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
  white-space: nowrap;
}

.statistics-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
}

.statistics-table tbody tr:hover {
  background: #f8fbff;
}

.statistics-provenance-row {
  cursor: pointer;
}

.statistics-table td {
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.statistics-table td small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
}

.progress-list {
  display: grid;
  gap: 12px;
}

.progress-metric {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  display: grid;
  grid-template-rows: minmax(36px, auto) 9px 18px;
  padding: 12px;
}

.progress-metric.compact {
  padding: 11px 12px;
}

.progress-metric-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 0;
}

.progress-metric-head strong {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.progress-metric-head span {
  color: var(--primary-bright);
  font-size: 14px;
  font-weight: 900;
}

.progress-track {
  align-self: center;
  background: #e8eef7;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
  width: 100%;
}

.progress-bar {
  background: var(--primary-bright);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 2px;
}

.progress-bar.success {
  background: var(--success);
}

.progress-bar.danger {
  background: var(--danger);
}

.progress-metric small,
.statistics-note {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 8px 0 0;
}

.donut-panel {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(190px, 0.9fr) minmax(230px, 1.1fr);
  min-height: 275px;
  padding: 2px 0 4px;
}

.donut-chart {
  align-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  display: grid;
  height: 196px;
  justify-self: center;
  place-items: center;
  position: relative;
  width: 196px;
}

.donut-chart::after {
  background: #ffffff;
  border-radius: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  content: "";
  height: 116px;
  position: absolute;
  width: 116px;
}

.donut-center {
  color: var(--primary);
  display: grid;
  gap: 2px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.donut-center strong {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

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

.donut-legend {
  display: grid;
  gap: 10px;
  align-content: center;
}

.donut-legend-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 12px minmax(0, 1fr);
  min-height: 55px;
  padding: 10px 12px;
}

.door-distribution-card .statistics-note {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-top: 2px;
  padding: 10px 12px;
}

.legend-dot {
  border-radius: 999px;
  display: block;
  height: 10px;
  width: 10px;
}

.donut-legend-item strong {
  color: var(--primary);
  display: block;
  font-size: 13px;
  font-weight: 850;
}

.donut-legend-item small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-top: 3px;
}

.monthly-trend-card {
  overflow: hidden;
}

.trend-card-header {
  align-items: flex-start;
}

.trend-card-header p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 7px 0 0;
}

.monthly-chart-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.monthly-trend-chart {
  display: block;
  min-height: 300px;
  width: 100%;
}

.trend-chart-bg {
  fill: #f8fafc;
}

.trend-grid-line {
  stroke: #e3ebf7;
  stroke-width: 1;
}

.trend-axis {
  stroke: #bfd0e8;
  stroke-width: 1.25;
}

.trend-line {
  fill: none;
  stroke: var(--primary-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.trend-point {
  fill: #fff;
  stroke: var(--primary-bright);
  stroke-width: 3;
}

.trend-value {
  fill: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
}

.trend-x-label,
.trend-y-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.trend-x-label {
  text-anchor: middle;
}

.trend-y-label {
  text-anchor: end;
}

.monthly-chart-empty {
  background: #eff6ff;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  margin: 12px 0 0;
  padding: 11px 12px;
}

.provenance-map-card {
  overflow: hidden;
}

.provenance-map-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(230px, 0.32fr) minmax(0, 1fr);
}

.provenance-map-legend {
  align-content: start;
  display: grid;
  gap: 10px;
}

.provenance-map-legend-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 12px minmax(0, 1fr);
  min-height: 58px;
  padding: 10px 12px;
}

.provenance-map-legend-item.unmapped {
  opacity: 0.72;
}

.provenance-map-legend-item strong {
  color: var(--primary);
  display: block;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.provenance-map-legend-item small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-top: 4px;
}

.provenance-map-note,
.provenance-map-empty {
  background: #eff6ff;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  margin: 0;
  padding: 11px 12px;
}

.provenance-map-shell {
  background: #eef4fb;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  min-height: 390px;
  overflow: hidden;
  position: relative;
}

.provenance-map {
  height: 100%;
  min-height: 390px;
  width: 100%;
}

.provenance-map .leaflet-popup-content {
  color: var(--primary);
  font: 13px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.provenance-count-label {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 15px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.38);
}

.provenance-count-label span {
  transform: translateY(1px);
}

.provenance-map-control-message {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.provenance-map-empty {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: inherit;
  text-align: center;
}

.provenance-map-fallback {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(22, 163, 74, 0.08)),
    radial-gradient(circle at 62% 42%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.35) 42%, transparent 43%),
    #eaf2ff;
  position: relative;
}

.info-minimal-page {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 4vh, 42px) 0;
}

.info-minimal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  max-width: 690px;
  padding: clamp(30px, 5vw, 54px);
  width: 100%;
}

.info-minimal-header {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 30px;
  text-align: center;
}

.info-minimal-mark {
  align-items: center;
  background: #fee2e2;
  border-radius: 999px;
  color: #ef4444;
  display: inline-flex;
  font-size: 28px;
  font-weight: 900;
  height: 64px;
  justify-content: center;
  margin-bottom: 18px;
  width: 64px;
}

.info-minimal-header h1 {
  color: var(--text);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
}

.info-minimal-header strong {
  color: var(--primary-bright);
  display: block;
  font-size: 16px;
  font-weight: 850;
  margin-top: 8px;
}

.info-minimal-header p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.65;
  margin: 22px auto 0;
  max-width: 540px;
}

.info-software-section {
  border-bottom: 1px solid var(--line-soft);
  padding: 28px 0;
}

.info-software-section h2 {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 12px;
}

.info-minimal-table {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.info-minimal-table div {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  padding: 14px 0;
}

.info-minimal-table dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.info-minimal-table dd {
  color: var(--primary);
  display: grid;
  font-size: 14px;
  font-weight: 850;
  gap: 4px;
  margin: 0;
}

.info-manual-section {
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  padding: 30px 0;
}

.info-manual-body h3 {
  color: var(--primary);
  font-weight: 900;
  margin: 0;
}

.info-manual-shell {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
}

.info-manual-shell[open] {
  background: #fff;
  border-color: #cfe0f7;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.info-manual-heading {
  align-items: center;
  color: var(--primary);
  cursor: pointer;
  display: grid;
  gap: 6px 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  list-style: none;
  padding: 18px 18px;
}

.info-manual-heading::-webkit-details-marker {
  display: none;
}

.info-manual-heading::after {
  align-self: center;
  color: var(--accent);
  content: "▸";
  font-size: 16px;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.info-manual-shell[open] > .info-manual-heading::after {
  content: "▾";
}

.info-manual-heading span {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.info-manual-heading small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.6;
}

.info-manual-list {
  animation: manualReveal 180ms ease-out;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  padding: 14px;
}

@keyframes manualReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-manual-item {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}

.info-manual-item[open] {
  background: #fff;
  border-color: #cfe0f7;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.info-manual-item summary {
  align-items: center;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
  padding: 15px 16px;
}

.info-manual-item summary::-webkit-details-marker {
  display: none;
}

.info-manual-item summary::after {
  color: var(--accent);
  content: "▸";
  font-size: 14px;
  font-weight: 900;
}

.info-manual-item[open] summary::after {
  content: "▾";
}

.info-manual-item summary span {
  font-size: 14px;
  font-weight: 900;
}

.info-manual-item summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.info-manual-body {
  border-top: 1px solid var(--line-soft);
  padding: 16px;
}

.info-manual-body h3 {
  font-size: 14px;
  margin-top: 24px;
}

.info-manual-body p {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.65;
  margin: 0;
}

.info-manual-body p + p {
  margin-top: 12px;
}

.info-manual-body strong {
  color: var(--primary);
  font-weight: 850;
}

.info-manual-body ul,
.info-manual-body ol {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
}

.info-manual-body li {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.info-manual-download {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-top: 18px;
  padding: 16px;
}

.info-manual-download .button {
  margin-top: 14px;
}

.info-minimal-footer {
  color: var(--muted);
  max-width: 690px;
  padding-top: 22px;
  text-align: center;
  width: 100%;
}

.info-minimal-footer span {
  color: #94a3b8;
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 3px;
}

.info-minimal-footer strong {
  color: var(--primary);
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.info-minimal-footer p {
  font-size: 12px;
  font-weight: 750;
  margin: 0 0 4px;
}

.fallback-map-marker {
  align-items: center;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
  color: #fff;
  cursor: default;
  display: flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  position: absolute;
  transform: translate(-50%, -50%);
}

.app-footer {
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
  padding: 8px 0 0;
  text-align: center;
}

@media (max-width: 1180px) {
  .quick-actions,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statistics-cards {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

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

  .donut-panel {
    grid-template-columns: 1fr;
  }

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

  .case-summary {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 980px) {
  .home-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .settings-grid > .card,
  .settings-section-card {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .settings-grid .form-grid,
  .settings-grid .actions,
  .personnel-table-wrap,
  .settings-provenienze-grid {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .registry-table-topline,
  .registry-pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .registry-export-menu {
    align-self: flex-end;
  }

  .import-form,
  .import-summary {
    grid-template-columns: 1fr;
  }

  .import-actions {
    justify-content: flex-start;
  }

  .statistics-grid,
  .statistics-bottom-grid {
    grid-template-columns: 1fr;
  }

  .statistics-title {
    display: grid;
  }

  .statistics-header-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .statistics-dashboard-header .statistics-year-filter-form,
  .statistics-report-export-form {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    width: 100%;
  }

  .statistics-dashboard-header .filter-form label,
  .statistics-dashboard-header select {
    min-width: 0;
    width: 100%;
  }

  .statistics-year-apply-button,
  .statistics-report-button {
    width: 100%;
  }

  .statistics-cards {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .new-case-identity-grid,
  .timing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .statistics-cards {
    grid-template-columns: 1fr;
  }

  .statistics-cards .stat-card {
    min-height: 158px;
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar-width: 0px;
    --mobile-header-height: 58px;
  }

  body {
    font-size: 13px;
    padding-top: 0;
  }

  body::before {
    background: rgba(248, 250, 252, 0.96);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    content: "";
    height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
    left: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 999;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .mobile-menu-toggle {
    align-items: center;
    background: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    height: 44px;
    justify-content: center;
    left: max(14px, env(safe-area-inset-left));
    padding: 0;
    position: fixed;
    top: calc(7px + env(safe-area-inset-top));
    width: 44px;
    z-index: 1003;
  }

  .mobile-menu-toggle span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    transition: transform 0.18s ease, opacity 0.18s ease;
    width: 20px;
  }

  body.mobile-menu-open .mobile-menu-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  body.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .mobile-menu-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu-overlay {
    background: rgba(15, 23, 42, 0.46);
    bottom: 0;
    display: block;
    left: 0;
    pointer-events: auto;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1001;
  }

  .mobile-menu-overlay[hidden] {
    display: none;
  }

  .sidebar {
    bottom: auto;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 340px;
    overflow-y: auto;
    padding: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 8px) 16px calc(18px + env(safe-area-inset-bottom));
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    width: min(86vw, 340px);
    z-index: 1002;
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-brand {
    padding: 0 4px 18px;
  }

  .brand-mark {
    height: 46px;
    width: 46px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-footer {
    margin-top: 14px;
  }

  .app-main {
    margin-left: 0;
    max-width: 100%;
    min-width: 0;
    padding: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 12px) 14px 12px;
    width: 100%;
  }

  .page-title,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
    width: 100%;
  }

  .datetime-card {
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .datetime-item {
    min-width: 0;
  }

  .filter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .filter-form label {
    display: flex;
    min-width: 0;
    width: 100%;
  }

  .filter-form select,
  .filter-form input {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .quick-actions,
  .stats,
  .case-summary,
  .registry-filters,
  .form-grid,
  .quality-grid,
  .settings-grid,
  .statistics-grid,
  .statistics-bottom-grid,
  .provenance-map-layout {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .settings-grid > .card {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .settings-grid .form-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .settings-grid label,
  .settings-grid input,
  .settings-grid select,
  .settings-grid .actions,
  .settings-grid .button,
  .personnel-table-wrap {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

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

  .settings-grid h2 {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .settings-section-card {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .settings-section-card h2 {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .settings-section-card .section-title-note {
    white-space: normal;
  }

  .settings-provenienze-grid {
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    width: 100%;
  }

  .registry-search-row {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
    width: 100%;
  }

  .registry-search-row .search-field,
  .registry-new-case {
    flex: none;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .registry-card,
  .registry-toolbar,
  .registry-table-topline,
  .registry-table-actions,
  .registry-export-menu,
  .home-dashboard,
  .home-filter,
  .stats,
  .quick-actions,
  .home-grid,
  .home-grid > .card,
  .recent-cases-card,
  .home-status-card,
  .status-list,
  .status-list div {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

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

  .recent-cases-card,
  .home-status-card {
    overflow: hidden;
  }

  .recent-cases-card .table-responsive {
    overflow-x: auto;
  }

  .home-status-card .card-header,
  .recent-cases-card .card-header {
    flex-wrap: wrap;
  }

  .status-list {
    gap: 14px;
  }

  .status-list div {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .status-list .status-icon {
    height: 30px;
    width: 30px;
  }

  .status-list strong,
  .status-list span:not(.status-icon) {
    white-space: normal;
  }

  .registry-table-topline,
  .registry-table-actions {
    align-items: stretch;
  }

  .registry-table-actions {
    justify-content: flex-start;
  }

  .registry-table-actions .button,
  .registry-export-menu .export-button {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .export-menu-panel {
    left: 0;
    max-width: 100%;
    min-width: 0;
    right: 0;
    width: 100%;
  }

  .registry-table-wrap {
    max-height: none;
    max-width: 100%;
    min-height: 260px;
    min-width: 0;
    width: 100%;
  }

  .registry-pagination {
    justify-content: space-between;
    width: 100%;
  }

  .datetime-pair {
    grid-template-columns: 1fr;
  }

  .new-case-identity-grid,
  .timing-grid,
  .new-case-calculated-grid {
    grid-template-columns: 1fr;
  }

  .new-case-action-bar {
    position: static;
  }

  .button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .actions,
  .case-actions,
  .form-actions-bottom,
  .new-case-action-bar,
  .import-actions,
  .statistics-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .actions .button,
  .case-actions .button,
  .form-actions-bottom .button,
  .new-case-action-bar .button,
  .import-actions .button {
    width: 100%;
  }

  .info-minimal-table div {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .session-timeout-modal {
    padding: 14px;
  }

  .session-timeout-card {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    padding: 20px;
  }

  .provenance-map-shell,
  .provenance-map {
    min-height: 320px;
  }

  .donut-layout,
  .monthly-trend-wrap {
    overflow-x: auto;
  }

  .settings-provenienze-grid,
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 576px) {
  .app-main {
    padding: calc(var(--mobile-header-height) + env(safe-area-inset-top) + 10px) 10px 10px;
  }

  .app-main > * {
    max-width: 100%;
  }

  .card,
  .info-minimal-card {
    border-radius: 12px;
    padding: 16px;
  }

  .page-title h1,
  .page-header h1,
  .statistics-title h1 {
    font-size: clamp(26px, 9vw, 34px);
    line-height: 1.05;
  }

  .stat-card,
  .quick-card {
    min-height: auto;
    padding: 16px;
  }

  .stat-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .quick-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .stat-icon,
  .quick-icon {
    height: 44px;
    width: 44px;
  }

  .registry-card,
  .statistics-dashboard-header {
    padding: 14px;
  }

  .home-grid,
  .home-grid > .card,
  .recent-cases-card,
  .home-status-card {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .recent-cases-card .card-header,
  .home-status-card .card-header {
    gap: 8px;
  }

  .recent-cases-card .small-link {
    white-space: normal;
  }

  .status-list strong {
    font-size: clamp(14px, 4.6vw, 17px);
  }

  .registry-filters {
    gap: 8px;
  }

  .pagination-pages {
    flex-wrap: wrap;
  }

  .info-manual-heading,
  .info-manual-item summary {
    align-items: flex-start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .info-manual-item summary {
    display: grid;
  }

  .info-manual-item summary small {
    text-align: left;
  }

  .login-shell {
    padding: 18px 12px;
  }

  .login-card {
    padding: 22px;
  }
}

@media print {
  @page {
    margin: 12mm;
    size: A4;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    background: #fff;
    color: #0f172a;
    font-size: 10.5pt;
  }

  .sidebar,
  .app-footer,
  .statistics-dashboard-header,
  .statistics-report-button,
  .leaflet-control-container {
    display: none !important;
  }

  .app-main {
    margin-left: 0;
    min-height: auto;
    padding: 0;
  }

  .app-main > * {
    max-width: none;
    width: 100%;
  }

  .statistics-dashboard {
    gap: 10mm;
    width: 100%;
  }

  .print-report-header {
    border-bottom: 1px solid #d8e0ec;
    display: block;
    margin-bottom: 4mm;
    padding-bottom: 5mm;
  }

  .print-report-header strong {
    color: #153a8a;
    display: block;
    font-size: 13pt;
    margin-bottom: 2mm;
  }

  .print-report-header h1 {
    color: #0f172a;
    font-size: 20pt;
    line-height: 1.1;
    margin: 0 0 3mm;
  }

  .print-report-header p {
    color: #475569;
    font-size: 10pt;
    margin: 1mm 0;
  }

  .card,
  .stat-card,
  .statistics-quality-card,
  .statistics-table-card,
  .monthly-trend-card,
  .provenance-map-card {
    break-inside: avoid;
    box-shadow: none;
    page-break-inside: avoid;
  }

  .statistics-cards {
    gap: 4mm;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .statistics-cards .stat-card {
    min-height: 34mm;
    padding: 5mm;
  }

  .statistics-cards .stat-card strong {
    font-size: 20pt;
    white-space: normal;
  }

  .quality-grid {
    gap: 4mm;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .statistics-bottom-grid,
  .provenance-map-layout {
    grid-template-columns: 1fr 1fr;
  }

  .table-wrap {
    overflow: visible;
  }

  .statistics-table {
    font-size: 9pt;
  }

  .statistics-table th,
  .statistics-table td {
    padding: 3mm;
  }

  .monthly-chart-wrap {
    overflow: visible;
  }

  .monthly-trend-chart {
    height: auto;
    max-width: 100%;
  }

  .provenance-map {
    min-height: 85mm;
  }
}

.security-card {
  margin: 0 auto;
  max-width: 680px;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.muted-text {
  color: var(--text-secondary);
  margin: 0;
}

.security-onetime-card {
  border-left: 4px solid var(--success);
  margin-bottom: 24px;
}

.temporary-password-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--primary);
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 10px;
  padding: 12px 16px;
}

.login-security-note {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 16px;
  padding: 12px;
}

.forgot-password-link {
  color: var(--primary);
  display: inline-block;
  font-weight: 700;
  margin-top: 14px;
  text-decoration: none;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.nav-badge {
  align-items: center;
  background: var(--danger);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
}

@media (max-width: 720px) {
  .coordinate-help-box {
    flex-direction: column;
  }

  .coordinate-help-action {
    align-items: flex-start;
    min-width: 0;
    width: 100%;
  }

  .coordinate-copy-feedback {
    text-align: left;
  }
}
