:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #eef3ed;
  --ink: #17211c;
  --muted: #66736c;
  --line: #dbe3dc;
  --primary: #256f60;
  --primary-dark: #164b42;
  --accent: #d89b35;
  --danger: #b84a43;
  --warning: #b8752c;
  --good: #2c7a4b;
  --shadow: 0 18px 45px rgba(31, 44, 36, 0.1);
}

* {
  box-sizing: border-box;
}

body,
button,
label,
a,
table,
img,
.panel,
.modal,
.sidebar,
.topbar {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.65fr);
  min-height: 100vh;
}

.login-visual {
  background: #14231d;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
}

.brand.large .brand-mark {
  width: 54px;
  height: 54px;
}

.login-copy {
  max-width: 680px;
}

.login-hero-image {
  width: min(820px, 100%);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: lighten;
  filter: saturate(0.92) hue-rotate(-8deg);
  box-shadow: var(--shadow);
}

.login-copy h1 {
  font-size: 44px;
  line-height: 1.05;
  margin-bottom: 16px;
}

.login-copy p:not(.eyebrow) {
  color: #c8d8d0;
  font-size: 17px;
  line-height: 1.55;
  max-width: 580px;
}

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

.login-stats span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #c8d8d0;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
}

.login-stats strong {
  color: #ffffff;
  font-size: 28px;
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100% - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: 24px;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.login-panel h2 {
  font-size: 26px;
}

.login-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.login-panel small {
  color: var(--muted);
}

.forgot-password-button {
  align-self: center;
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0;
}

.forgot-password-button:hover {
  color: #ffffff;
}

.login-help {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.5;
  min-height: 20px;
  padding-top: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
  overflow: visible;
  transition: grid-template-columns 180ms ease;
}

.app-shell.locked {
  display: none;
}

.login-screen.hidden {
  display: none;
}

.hidden,
.role-blocked {
  display: none !important;
}

.admin-only {
  display: none;
}

.nav-item.admin-only {
  display: none;
}

.is-admin .nav-item.admin-only {
  display: flex;
}

.view.admin-only,
.is-admin section.admin-only {
  display: none;
}

.is-admin .view.admin-only.active,
.is-admin section.admin-only.active {
  display: block;
}

.sidebar {
  background: #14231d;
  color: #f7fbf8;
  display: flex;
  flex-direction: column;
  padding: 22px;
  gap: 28px;
  min-width: 0;
  overflow: visible;
  position: relative;
  transition: padding 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
  padding-left: 12px;
  padding-right: 12px;
  gap: 10px;
}

.sidebar-pin {
  position: absolute;
  top: 34px;
  right: 6px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(5, 15, 14, 0.92);
  color: #dbe7df;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.sidebar-pin:hover {
  color: #ffffff;
  border-color: rgba(37, 224, 177, 0.44);
  background: rgba(37, 224, 177, 0.15);
}

.app-shell.sidebar-collapsed .sidebar-pin {
  top: 14px;
  right: 12px;
}

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

.app-shell.sidebar-collapsed .brand {
  display: none;
}

.app-shell.sidebar-collapsed .nav-list {
  margin-top: 36px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  box-shadow: none;
  mix-blend-mode: lighten;
  filter: saturate(0.85) hue-rotate(-10deg);
}

.brand.large .brand-logo {
  width: 76px;
  height: 76px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent);
  color: #1b160d;
  font-weight: 800;
}

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

.brand span,
.sidebar-footer span {
  color: #b9c6be;
  font-size: 13px;
}

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

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dbe7df;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  text-align: left;
}

.app-shell.sidebar-collapsed .nav-list {
  justify-items: center;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  gap: 0;
  width: 44px;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  color: transparent;
  font-size: 0;
}

.app-shell.sidebar-collapsed .icon {
  color: #25e0b1;
  font-size: 12px;
  flex: 0 0 auto;
}

.nav-item:hover,
.nav-item.active {
  background: #21372f;
  color: #ffffff;
}

.icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 18px;
}

.app-shell.sidebar-collapsed .sidebar-footer {
  display: none;
}

.sidebar-footer strong {
  display: block;
  margin-top: 5px;
}

.sidebar-footer small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  overflow: visible;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 5px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 0;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 4px;
}

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

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 12px;
}

.search input {
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
}

.primary-button,
.ghost-button {
  border-radius: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
}

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

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(430px, 1.32fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 24px;
}

.hero-copy h2 {
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.hero-panel img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  mix-blend-mode: lighten;
  filter: saturate(0.92) hue-rotate(-8deg);
}

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

.metric,
.panel,
.report-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  border-left-width: 5px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 30px;
  margin: 8px 0 4px;
}

.metric.danger {
  border-left-color: var(--danger);
}

.metric.warning {
  border-left-color: var(--warning);
}

.metric.good {
  border-left-color: var(--good);
}

.metric.neutral {
  border-left-color: var(--primary);
}

.metric.health {
  border-left-color: #2fd0c6;
}

.dashboard-grid,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  padding: 18px;
  margin-bottom: 14px;
}

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

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header p {
  color: var(--muted);
  margin-bottom: 0;
}

.compact {
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge.warning {
  background: #fff3df;
  color: #8a520d;
}

.badge.danger {
  background: #fde9e7;
  color: #92352f;
}

.badge.good {
  background: #e4f5e9;
  color: #1d6539;
}

.risk-bars {
  display: grid;
  gap: 14px;
}

.risk-row {
  display: grid;
  grid-template-columns: 140px minmax(120px, 1fr) 60px;
  align-items: center;
  gap: 12px;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--good), var(--accent), var(--danger));
}

.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.alert-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

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

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

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.status.open,
.status.overdue {
  background: #fde9e7;
  color: #92352f;
}

.status.progress {
  background: #fff3df;
  color: #8a520d;
}

.status.closed {
  background: #e4f5e9;
  color: #1d6539;
}

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

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

.db-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  line-height: 1.5;
  min-height: 86px;
  padding: 14px;
  white-space: pre-wrap;
}

.db-result.success {
  color: #9effc7;
  border-color: rgba(73, 226, 143, 0.38);
}

.db-result.error {
  color: #ffa1a1;
  border-color: rgba(255, 100, 100, 0.38);
}

.stacked-form,
.checklist,
.action-list {
  display: grid;
  gap: 12px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  min-height: 42px;
  padding: 9px 11px;
}

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

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.check-item,
.action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

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

.check-item label {
  display: flex;
  align-items: center;
  flex-direction: row;
  color: var(--ink);
  font-size: 15px;
}

.check-item input {
  width: 18px;
  min-height: 18px;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.segmented button {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  min-height: 36px;
  padding: 0 12px;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented .selected {
  background: var(--primary);
  color: #ffffff;
}

.action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.action-card p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.collaborator-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(160px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.collaborator-filters label {
  min-width: 0;
}

.collaborator-clear-filters {
  min-height: 42px;
  white-space: nowrap;
}

.collaborator-list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.collaborator-list-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.collaborator-table {
  min-width: 1180px;
}

.collaborator-table th:last-child,
.collaborator-table td:last-child {
  width: 310px;
}

.collaborator-row:hover {
  background: rgba(37, 211, 168, 0.035);
}

.collaborator-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
}

.collaborator-identity strong,
.collaborator-identity span,
.collaborator-secondary {
  display: block;
}

.collaborator-identity span,
.collaborator-secondary {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.collaborator-table .collaborator-photo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.collaborator-docs-cell a {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: var(--primary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collaborator-detail-row td {
  padding: 0 10px 12px;
  border-bottom: 1px solid var(--line);
}

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

.collaborator-emergency p span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.collaborator-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.collaborator-photo {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.collaborator-placeholder {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 900;
}

.collaborator-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.collaborator-card p,
.collaborator-meta {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.privacy-note {
  color: var(--warning);
  font-size: 12px;
}

.collaborator-emergency {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 199, 95, 0.45);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 199, 95, 0.08);
}

.collaborator-emergency strong {
  color: var(--warning);
  font-size: 13px;
  text-transform: uppercase;
}

.emergency-action {
  border-color: rgba(255, 199, 95, 0.5);
  color: var(--warning);
}

.collaborator-docs {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.collaborator-docs a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
}

.collaborator-card .row-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.import-progress {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.import-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.import-progress strong {
  color: var(--ink);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 220% 100%;
  animation: progress-flow 1.1s linear infinite;
  transition: width 180ms ease;
}

@keyframes progress-flow {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 220% 50%;
  }
}

.row-actions,
.action-card-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-card-controls {
  justify-content: flex-end;
}

.table-action {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.table-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.table-action.danger:hover {
  border-color: var(--danger);
  color: #ffa1a1;
}

.catalog-grid {
  display: block;
}

.catalog-list-card,
.catalog-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.catalog-list-card .panel-header {
  margin-bottom: 12px;
}

.catalog-option-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-option-list li {
  align-items: center;
  background: rgba(0, 246, 195, 0.04);
  border: 1px solid rgba(0, 246, 195, 0.14);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
}

.catalog-option-list strong {
  color: var(--ink);
  font-size: 14px;
}

.catalog-option-list em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.catalog-option-list li div {
  display: flex;
  gap: 8px;
}

.catalog-option-list button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  min-height: 32px;
  padding: 6px 10px;
}

.catalog-option-list button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.catalog-option-list button[data-catalog-action="delete"]:hover {
  border-color: var(--danger);
  color: #ffa1a1;
}

.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-tags span,
.catalog-tags em {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  padding: 7px 10px;
}

.catalog-tag {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.catalog-tag button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.catalog-tag button:hover {
  color: var(--accent);
}

.catalog-tags em {
  color: var(--muted);
  font-weight: 700;
}

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

.report-actions,
.report-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.report-controls {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr auto;
}

.hidden-control {
  display: none;
}

select[multiple] {
  min-height: 104px;
}

fieldset.period-multiple {
  border: 0;
  margin: 0;
  padding: 0;
}

fieldset.period-multiple legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}

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

.month-grid label {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  gap: 6px;
  justify-content: center;
  min-height: 42px;
  padding: 0 8px;
}

.month-grid input {
  min-height: 16px;
  width: 16px;
}

.report-preview {
  margin-bottom: 14px;
}

.report-document {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-cover {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(37, 224, 177, 0.12), rgba(72, 167, 255, 0.08));
}

.report-cover img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  mix-blend-mode: lighten;
  filter: saturate(0.85) hue-rotate(-10deg);
}

.report-cover h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.report-cover p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.summary-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.summary-card strong {
  display: block;
  font-size: 26px;
  margin-top: 6px;
}

.report-section {
  padding: 18px;
}

.report-tile {
  border-color: var(--line);
  color: var(--ink);
  display: grid;
  gap: 7px;
  min-height: 130px;
  padding: 18px;
  text-align: left;
}

.report-tile:hover {
  border-color: var(--primary);
}

.report-tile span {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  border-radius: 8px;
  background: #14231d;
  color: #ffffff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.system-info-center {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
}

.system-info-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(37, 224, 177, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(37, 224, 177, 0.10), rgba(72, 167, 255, 0.06)),
    rgba(5, 15, 14, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.system-info-card strong,
.system-info-card span,
.system-info-card a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.system-info-card strong {
  color: var(--primary);
  font-size: 24px;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.system-info-card span {
  color: #cfe7df;
}

.system-info-card a {
  width: min(320px, 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(37, 224, 177, 0.24);
  border-radius: 8px;
  color: #04100d;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(37, 224, 177, 0.14);
}

.system-info-card a:hover {
  filter: brightness(1.08);
}

.system-info-card span:nth-child(2) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(37, 224, 177, 0.24);
  border-radius: 999px;
  color: #9effc7;
  background: rgba(37, 224, 177, 0.08);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(20, 35, 29, 0.56);
  padding: 20px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  width: 36px;
  height: 36px;
  font-weight: 700;
}

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

.modal-fields .wide-field {
  grid-column: span 2;
}

.modal-actions {
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    gap: 34px;
    padding: 28px;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-hero-image {
    min-height: 0;
    max-height: 360px;
    object-fit: cover;
  }

  .login-stats {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .app-shell.sidebar-collapsed .sidebar {
    display: flex;
    padding: 10px 14px;
  }

  .app-shell.sidebar-collapsed .brand,
  .app-shell.sidebar-collapsed .sidebar-footer {
    display: none;
  }

  .app-shell.sidebar-collapsed .sidebar-pin {
    top: 10px;
    right: 14px;
  }

  .nav-list {
    display: flex;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .sidebar-footer {
    display: none;
  }

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

  .workspace {
    height: auto;
    overflow-y: visible;
  }

  .search {
    min-width: 0;
  }

  .metrics-grid,
  .dashboard-grid,
  .split-layout,
  .report-grid,
  .report-controls,
  .report-summary,
  .catalog-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .report-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .hero-panel img {
    height: auto;
  }

  .catalog-option-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-option-list li div {
    width: 100%;
  }

  .catalog-option-list button {
    flex: 1;
  }

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

  .collaborator-search-field,
  .collaborator-clear-filters {
    grid-column: 1 / -1;
  }

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

}

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

  .login-screen,
  .sidebar,
  .topbar,
  .panel:has(.report-controls),
  .toast,
  .modal-backdrop {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .view,
  #reports {
    display: block !important;
    min-height: auto;
    padding: 0;
  }

  .view:not(#reports) {
    display: none !important;
  }

  .report-document {
    background: #ffffff;
    color: #111111;
    border: 0;
    box-shadow: none;
  }

  .report-cover,
  .summary-card {
    background: #ffffff;
    border-color: #cccccc;
  }

  th,
  td {
    color: #111111;
    border-bottom-color: #dddddd;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 16px;
  }

  .collaborator-filters,
  .collaborator-emergency-grid {
    grid-template-columns: 1fr;
  }

  .collaborator-list-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

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

  .db-form {
    grid-template-columns: 1fr;
  }

  .modal-fields {
    grid-template-columns: 1fr;
  }

  .modal-fields .wide-field {
    grid-column: auto;
  }

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

  .span-2 {
    grid-column: auto;
  }

  .panel-header,
  .action-card {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .risk-row {
    grid-template-columns: 1fr;
  }
}

/* Tema tecnologico */
:root {
  --bg: #07100e;
  --surface: rgba(13, 28, 26, 0.94);
  --surface-soft: rgba(42, 65, 60, 0.75);
  --ink: #eefaf5;
  --muted: #90aaa1;
  --line: rgba(106, 255, 210, 0.17);
  --primary: #25e0b1;
  --primary-dark: #13b78e;
  --accent: #48a7ff;
  --danger: #ff6464;
  --warning: #f4bb55;
  --good: #49e28f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

body {
  background:
    radial-gradient(circle at 16% 10%, rgba(37, 224, 177, 0.14), transparent 32%),
    radial-gradient(circle at 86% 4%, rgba(72, 167, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #07100e 0%, #0a1718 52%, #10151b 100%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.45;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

.login-visual,
.sidebar {
  background:
    linear-gradient(135deg, rgba(37, 224, 177, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(6, 18, 16, 0.96), rgba(9, 22, 25, 0.96));
}

.sidebar {
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-mark {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #04100d;
  box-shadow: 0 0 28px rgba(37, 224, 177, 0.34);
}

.brand span,
.sidebar-footer span,
.metric span,
.metric small,
.panel-header p,
.alert-list span,
.report-tile span,
.login-panel p,
.login-panel small {
  color: var(--muted);
}

.nav-item {
  color: #bdd4cc;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 224, 177, 0.17), rgba(72, 167, 255, 0.08));
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.icon {
  background: rgba(37, 224, 177, 0.12);
  color: var(--primary);
}

.login-panel,
.metric,
.panel,
.report-tile,
.modal {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow), 0 0 0 1px rgba(37, 224, 177, 0.05);
  backdrop-filter: blur(18px);
}

.metric {
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.45;
}

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

.metric.warning {
  color: var(--warning);
}

.metric.good {
  color: var(--good);
}

.metric.neutral {
  color: var(--primary);
}

.metric.health {
  color: #5ee7dc;
}

.search,
.ghost-button,
input,
select,
textarea,
.segmented,
.icon-button {
  background: rgba(5, 15, 14, 0.78);
  border-color: var(--line);
  color: var(--ink);
}

.search input {
  background: transparent;
}

input::placeholder,
textarea::placeholder {
  color: #6f8981;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #04100d;
  box-shadow: 0 12px 28px rgba(37, 224, 177, 0.18);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.ghost-button {
  color: #cce9df;
}

.badge.warning,
.status.progress {
  background: rgba(244, 187, 85, 0.14);
  color: #ffd98d;
}

.badge.danger,
.status.open,
.status.overdue {
  background: rgba(255, 100, 100, 0.14);
  color: #ffa1a1;
}

.badge.good,
.status.closed {
  background: rgba(73, 226, 143, 0.14);
  color: #9effc7;
}

.alert-list li,
.check-item,
.action-card {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
}

.bar {
  background: rgba(255, 255, 255, 0.08);
}

.bar i {
  background: linear-gradient(90deg, var(--good), var(--warning), var(--danger));
  box-shadow: 0 0 18px rgba(37, 224, 177, 0.24);
}

th,
td {
  border-bottom-color: var(--line);
}

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

.segmented button {
  color: var(--ink);
}

.segmented .selected {
  background: rgba(37, 224, 177, 0.17);
  color: var(--primary);
}

.report-tile:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow), 0 0 34px rgba(37, 224, 177, 0.14);
}

.toast {
  background: #07100e;
  border: 1px solid var(--line);
}

.modal-backdrop {
  background: rgba(0, 8, 7, 0.72);
}

/* Interfaz corporativa azul 2026 */
:root {
  --bg: #07111f;
  --surface: #0d1b2e;
  --surface-raised: #12243b;
  --surface-soft: #172a42;
  --ink: #f4f8ff;
  --muted: #91a7c2;
  --line: rgba(111, 168, 226, 0.22);
  --line-strong: rgba(66, 195, 239, 0.48);
  --primary: #2f7df6;
  --primary-dark: #1f63d4;
  --accent: #2bd2ed;
  --accent-soft: #8cecff;
  --danger: #ff6b78;
  --warning: #f6bd4b;
  --good: #48d597;
  --shadow: 0 18px 44px rgba(0, 7, 20, 0.28);
}

html {
  color-scheme: dark;
  scrollbar-color: #2e73b8 #091523;
}

body {
  background: linear-gradient(135deg, #06101d 0%, #09192b 48%, #0b2033 100%);
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

body::before {
  background-image:
    linear-gradient(rgba(78, 159, 229, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 159, 229, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  opacity: 0.7;
}

::selection {
  background: rgba(43, 210, 237, 0.3);
  color: #ffffff;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(43, 210, 237, 0.3);
  outline-offset: 2px;
}

.login-screen {
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, 0.65fr);
  background: #07111f;
}

.login-visual {
  position: relative;
  isolation: isolate;
  padding: 34px 42px;
  background: #071629;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.login-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, rgba(5, 20, 39, 0.18), rgba(8, 25, 45, 0.78));
  pointer-events: none;
}

.login-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin-top: 26px;
}

.login-copy h1 {
  color: #ffffff;
  font-size: clamp(38px, 4.2vw, 66px);
  line-height: 1.02;
  max-width: 760px;
}

.login-copy p:not(.eyebrow) {
  color: #b7cce3;
  max-width: 650px;
}

.login-hero-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  object-position: center 20%;
  mix-blend-mode: normal;
  filter: saturate(0.94) contrast(1.05) brightness(0.72) hue-rotate(6deg);
  box-shadow: none;
}

.login-panel {
  position: relative;
  width: min(440px, calc(100% - 36px));
  padding: 32px;
  gap: 18px;
  background: rgba(12, 28, 47, 0.94);
  border: 1px solid rgba(93, 177, 239, 0.28);
  box-shadow: 0 30px 80px rgba(0, 5, 15, 0.5);
  backdrop-filter: blur(22px);
}

.login-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.login-panel h2 {
  color: #ffffff;
  font-size: 30px;
}

.login-panel p,
.login-panel small {
  color: var(--muted);
}

.login-actions {
  grid-template-columns: 1fr;
}

.forgot-password-button {
  color: var(--accent-soft);
}

.forgot-password-button:hover {
  color: #ffffff;
}

.eyebrow {
  color: var(--accent);
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  gap: 20px;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, #071425 0%, #091a2c 58%, #07131f 100%);
  border-right: 1px solid rgba(71, 157, 224, 0.24);
  box-shadow: 12px 0 36px rgba(0, 8, 22, 0.2);
  backdrop-filter: none;
}

.brand {
  min-height: 62px;
  padding: 0 8px;
}

.brand-logo {
  filter: saturate(0.95) hue-rotate(8deg) drop-shadow(0 8px 16px rgba(0, 11, 31, 0.35));
  mix-blend-mode: normal;
  filter: drop-shadow(0 8px 16px rgba(0, 8, 24, 0.38));
}

.report-cover img {
  mix-blend-mode: normal;
  filter: drop-shadow(0 8px 18px rgba(0, 8, 24, 0.3));
}

.brand strong {
  color: #ffffff;
  font-size: 15px;
}

.brand span,
.sidebar-footer span {
  color: #83a3c2;
}

.nav-list {
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 4px 12px 0;
  scrollbar-width: thin;
}

.nav-item {
  position: relative;
  min-height: 42px;
  padding: 0 11px;
  color: #adc2d8;
  border: 1px solid transparent;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.nav-item:hover {
  background: rgba(57, 127, 206, 0.12);
  border-color: rgba(74, 167, 231, 0.16);
  color: #eaf6ff;
  box-shadow: none;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(47, 125, 246, 0.24), rgba(43, 210, 237, 0.08));
  border-color: rgba(80, 168, 238, 0.26);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.icon {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #63b9f4;
  stroke-width: 1.8;
}

.nav-item.active .icon {
  color: var(--accent-soft);
  filter: drop-shadow(0 0 7px rgba(43, 210, 237, 0.45));
}

.sidebar-pin {
  top: 24px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: #0b1b2d;
  border-color: rgba(87, 169, 231, 0.3);
  color: #91cfff;
}

.sidebar-pin svg {
  width: 17px;
  height: 17px;
}

.sidebar-pin:hover {
  background: rgba(47, 125, 246, 0.18);
  border-color: var(--line-strong);
  color: #ffffff;
}

.sidebar-footer {
  border-top-color: rgba(111, 168, 226, 0.18);
  padding: 14px 8px 0;
}

.sidebar-footer small {
  color: #6fa8d2;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
  padding-left: 12px;
  padding-right: 12px;
}

.app-shell.sidebar-collapsed .nav-item {
  width: 46px;
  min-height: 44px;
}

.app-shell.sidebar-collapsed .icon {
  width: 20px;
  height: 20px;
  color: #63b9f4;
}

.workspace {
  padding: 22px 26px 30px;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  min-height: 74px;
  margin: -22px -26px 22px;
  padding: 14px 26px;
  background: rgba(7, 17, 31, 0.88);
  border-bottom: 1px solid rgba(98, 161, 222, 0.16);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  color: #f8fbff;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search,
.ghost-button,
input,
select,
textarea,
.segmented,
.icon-button {
  background: #091725;
  border-color: rgba(103, 169, 226, 0.24);
  color: var(--ink);
}

.search {
  min-width: min(330px, 34vw);
}

.search > svg {
  flex: 0 0 auto;
  width: 18px;
  color: #68b9ef;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(87, 181, 238, 0.46);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 210, 237, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #627d99;
}

.primary-button,
.ghost-button,
.table-action,
.catalog-option-list button {
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease, background 140ms ease;
}

.primary-button {
  background: linear-gradient(120deg, #2d78ef, #2bc9e6);
  color: #03111e;
  box-shadow: 0 10px 24px rgba(26, 134, 220, 0.22);
}

.primary-button:hover {
  background: linear-gradient(120deg, #3b89ff, #46dbf2);
  filter: none;
  transform: translateY(-1px);
}

.ghost-button:hover,
.table-action:hover,
.catalog-option-list button:hover {
  background: rgba(47, 125, 246, 0.12);
  border-color: rgba(69, 192, 239, 0.55);
  color: #ffffff;
}

.button-with-icon,
.icon-only-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-with-icon svg,
.icon-only-button svg {
  width: 17px;
  height: 17px;
}

.icon-only-button {
  width: 42px;
  padding: 0;
}

.hero-panel {
  min-height: 320px;
  background: #0b1b2c;
  border-color: rgba(91, 170, 231, 0.24);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 30px;
}

.hero-copy h2 {
  color: #ffffff;
  font-size: 32px;
}

.hero-copy p:not(.eyebrow) {
  color: #9db6ce;
}

.hero-panel img {
  height: 350px;
  object-position: center 18%;
  mix-blend-mode: normal;
  filter: saturate(0.94) contrast(1.03) hue-rotate(7deg);
  mask-image: linear-gradient(to right, transparent 0%, #000 16%);
}

.metric,
.panel,
.report-tile,
.modal,
.report-document {
  background: rgba(13, 27, 46, 0.96);
  border-color: rgba(100, 167, 226, 0.22);
  box-shadow: 0 14px 34px rgba(0, 7, 20, 0.2);
  backdrop-filter: none;
}

.metric {
  border-left-width: 3px;
}

.metric::after {
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.metric.neutral,
.metric.health {
  color: var(--accent);
}

.panel-header h2,
.metric strong,
.report-tile strong {
  color: #f7fbff;
}

.panel-header p,
.metric span,
.metric small,
.alert-list span,
.report-tile span,
.collaborator-secondary,
.collaborator-identity span {
  color: var(--muted);
}

.alert-list li,
.check-item,
.action-card,
.catalog-list-card,
.catalog-card,
.summary-card,
.collaborator-filters,
.collaborator-card,
.import-progress {
  background: rgba(18, 36, 59, 0.74);
  border-color: rgba(101, 168, 226, 0.2);
}

.table-wrap {
  border: 1px solid rgba(100, 167, 226, 0.15);
  border-radius: 8px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #10243a;
  color: #8eb4d4;
}

th,
td {
  border-bottom-color: rgba(100, 167, 226, 0.15);
}

tbody tr:nth-child(even) {
  background: rgba(58, 112, 169, 0.045);
}

tbody tr:hover {
  background: rgba(47, 125, 246, 0.08);
}

.badge.warning,
.status.progress {
  background: rgba(246, 189, 75, 0.15);
  color: #ffd77f;
}

.badge.danger,
.status.open,
.status.overdue {
  background: rgba(255, 107, 120, 0.15);
  color: #ff9aa4;
}

.badge.good,
.status.closed {
  background: rgba(72, 213, 151, 0.15);
  color: #8af0bd;
}

.segmented .selected {
  background: rgba(47, 125, 246, 0.24);
  color: #99dcff;
}

.bar {
  background: rgba(113, 157, 197, 0.13);
}

.bar i {
  background: linear-gradient(90deg, #40d594, #f5c451, #ff6b78);
  box-shadow: none;
}

.progress-track span {
  background: linear-gradient(90deg, var(--primary), var(--accent), #6a82ff);
}

.catalog-option-list li {
  background: rgba(47, 125, 246, 0.055);
  border-color: rgba(79, 172, 232, 0.18);
}

.report-cover {
  background: linear-gradient(120deg, rgba(47, 125, 246, 0.18), rgba(43, 210, 237, 0.06));
}

.system-info-card {
  background: linear-gradient(145deg, rgba(18, 43, 72, 0.96), rgba(9, 25, 43, 0.98));
  border-color: rgba(81, 181, 235, 0.3);
  box-shadow: 0 24px 70px rgba(0, 6, 18, 0.38);
}

.system-info-card strong {
  color: var(--accent-soft);
}

.system-info-card span:nth-child(2) {
  background: rgba(47, 125, 246, 0.13);
  border-color: rgba(75, 172, 236, 0.3);
  color: #9cdeff;
}

.system-info-card a {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #03111e;
}

.modal-backdrop {
  background: rgba(2, 9, 20, 0.8);
  backdrop-filter: blur(7px);
}

.modal {
  border-color: rgba(88, 177, 235, 0.32);
  box-shadow: 0 28px 90px rgba(0, 4, 14, 0.56);
}

.toast {
  background: #10243a;
  border-color: rgba(87, 181, 238, 0.4);
  color: #f4f9ff;
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    align-items: flex-start;
  }

  .search {
    min-width: 260px;
  }
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 48vh;
    padding: 28px;
  }

  .login-copy h1 {
    font-size: 42px;
  }

  .login-panel {
    margin: 32px auto;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .topbar {
    position: relative;
    margin: -22px -20px 22px;
    padding: 16px 20px;
  }

  .hero-panel img {
    mask-image: none;
  }
}

@media (max-width: 640px) {
  .login-visual {
    min-height: 420px;
    padding: 22px;
  }

  .login-copy h1 {
    font-size: 34px;
  }

  .login-panel {
    padding: 24px 20px;
  }

  .workspace {
    padding: 18px 14px 24px;
  }

  .topbar {
    margin: -18px -14px 18px;
    padding: 14px;
  }

  .topbar-actions,
  .search {
    width: 100%;
    min-width: 0;
  }

  .button-with-icon {
    flex: 1 1 auto;
  }

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

  .hero-copy h2 {
    font-size: 26px;
  }
}
