﻿:root {
  color-scheme: light;
  --theme-dark: #1e293b;
  --theme-dark-light: #334155;
  --theme-dark-lighter: #475569;
  --theme-contrast: #ffffff;
  --canvas-bg: #e8edf3;
  --panel-bg: rgba(255, 255, 255, 0.98);
  --panel-border: #d8e1ea;
  --text-color: #1f2933;
  --muted-text: #66788a;
  --grid-line: rgba(31, 41, 55, 0.10);
  --active-row-bg: #edf4fb;
  --confirmed-row-bg: #f0fdf4;
  --hero-rgb: 30, 41, 59;
  --safety-rgb: 51, 65, 85;
}

body.theme-ExactTake,
body.theme-Default {
  --theme-dark: #1e293b;
  --theme-dark-light: #334155;
  --theme-dark-lighter: #475569;
  --theme-contrast: #ffffff;
  --canvas-bg: #e8edf3;
  --panel-bg: rgba(255, 255, 255, 0.98);
  --panel-border: #d8e1ea;
  --text-color: #1f2933;
  --muted-text: #66788a;
  --grid-line: rgba(31, 41, 55, 0.10);
  --active-row-bg: #edf4fb;
  --hero-rgb: 30, 41, 59;
  --safety-rgb: 51, 65, 85;
}

body.theme-Sunrise {
  --theme-dark: #9a5a31;
  --theme-dark-light: #b97447;
  --theme-dark-lighter: #c9895a;
  --theme-contrast: #ffffff;
  --canvas-bg: #f7efe7;
  --panel-bg: rgba(255, 253, 251, 0.98);
  --panel-border: #e6d2c4;
  --text-color: #382516;
  --muted-text: #7a5e4a;
  --active-row-bg: #fbeee4;
  --hero-rgb: 154, 90, 49;
  --safety-rgb: 185, 116, 71;
}

body.theme-Sunset {
  --theme-dark: #5a3b72;
  --theme-dark-light: #6f4c8b;
  --theme-dark-lighter: #8363a0;
  --theme-contrast: #ffffff;
  --canvas-bg: #f3eef8;
  --panel-bg: rgba(255, 255, 255, 0.98);
  --panel-border: #ddcee9;
  --text-color: #2f2140;
  --muted-text: #6a5a7b;
  --active-row-bg: #efe7f7;
  --hero-rgb: 90, 59, 114;
  --safety-rgb: 111, 76, 139;
}

body.theme-Harbor {
  --theme-dark: #2f6170;
  --theme-dark-light: #3d7687;
  --theme-dark-lighter: #5290a3;
  --theme-contrast: #ffffff;
  --canvas-bg: #eaf3f5;
  --panel-bg: rgba(255, 255, 255, 0.98);
  --panel-border: #cfe0e4;
  --text-color: #1f3740;
  --muted-text: #5d7580;
  --active-row-bg: #e8f3f6;
  --hero-rgb: 47, 97, 112;
  --safety-rgb: 61, 118, 135;
}

body.theme-Sage {
  --theme-dark: #5a6f57;
  --theme-dark-light: #6e866b;
  --theme-dark-lighter: #849b80;
  --theme-contrast: #ffffff;
  --canvas-bg: #eef3ed;
  --panel-bg: rgba(255, 255, 255, 0.98);
  --panel-border: #d6dfd4;
  --text-color: #2e3b2c;
  --muted-text: #687566;
  --active-row-bg: #edf4eb;
  --hero-rgb: 90, 111, 87;
  --safety-rgb: 110, 134, 107;
}

body.theme-Appletini {
  --theme-dark: #9fc236;
  --theme-dark-light: #b7d529;
  --theme-dark-lighter: #c8df70;
  --theme-contrast: #ffffff;
  --canvas-bg: #edf7dc;
  --panel-bg: rgba(255, 255, 250, 0.98);
  --panel-border: #cadf9d;
  --text-color: #263719;
  --muted-text: #66734f;
  --active-row-bg: #e7f3cf;
  --hero-rgb: 159, 194, 54;
  --safety-rgb: 183, 213, 41;
}

body.theme-Caribbean {
  --theme-dark: #4768bf;
  --theme-dark-light: #6f8ad0;
  --theme-dark-lighter: #9fd7f2;
  --theme-contrast: #ffffff;
  --canvas-bg: #e8f1fb;
  --panel-bg: rgba(250, 253, 255, 0.98);
  --panel-border: #bfd4ef;
  --text-color: #15233c;
  --muted-text: #5a6f8c;
  --active-row-bg: #e0edfb;
  --hero-rgb: 71, 104, 191;
  --safety-rgb: 111, 138, 208;
}

body.theme-Nautilus {
  --theme-dark: #456287;
  --theme-dark-light: #5f7ea2;
  --theme-dark-lighter: #f36f21;
  --theme-contrast: #ffffff;
  --canvas-bg: #e9f1f7;
  --panel-bg: rgba(250, 253, 255, 0.98);
  --panel-border: #c0d4e5;
  --text-color: #1c2d3e;
  --muted-text: #617688;
  --active-row-bg: #e2edf6;
  --hero-rgb: 69, 98, 135;
  --safety-rgb: 95, 126, 162;
}

body.theme-ElectricBlue {
  --theme-dark: #052684;
  --theme-dark-light: #1c3e74;
  --theme-dark-lighter: #2f69b3;
  --theme-contrast: #ffffff;
  --canvas-bg: #e9f6fd;
  --panel-bg: rgba(250, 253, 255, 0.98);
  --panel-border: #b7ddf2;
  --text-color: #152438;
  --muted-text: #5a7390;
  --active-row-bg: #e0f1fb;
  --hero-rgb: 5, 38, 132;
  --safety-rgb: 28, 62, 116;
}

body.theme-Harvest {
  --theme-dark: #bd6307;
  --theme-dark-light: #d58218;
  --theme-dark-lighter: #b18e65;
  --theme-contrast: #ffffff;
  --canvas-bg: #fff5e8;
  --panel-bg: rgba(255, 253, 249, 0.98);
  --panel-border: #e7cba9;
  --text-color: #352414;
  --muted-text: #7a5f43;
  --active-row-bg: #faead8;
  --hero-rgb: 189, 99, 7;
  --safety-rgb: 213, 130, 24;
}

body.theme-LucidDream {
  --theme-dark: #86bfe5;
  --theme-dark-light: #a9d3ef;
  --theme-dark-lighter: #c8e3f5;
  --theme-contrast: #ffffff;
  --canvas-bg: #eef8ff;
  --panel-bg: rgba(252, 254, 255, 0.98);
  --panel-border: #c8e2f2;
  --text-color: #1f3445;
  --muted-text: #5f7890;
  --active-row-bg: #e6f4fc;
  --hero-rgb: 134, 191, 229;
  --safety-rgb: 169, 211, 239;
}

body.theme-Pear {
  --theme-dark: #4f7600;
  --theme-dark-light: #636a4c;
  --theme-dark-lighter: #9bb740;
  --theme-contrast: #ffffff;
  --canvas-bg: #f0f5df;
  --panel-bg: rgba(255, 255, 250, 0.98);
  --panel-border: #d1df9e;
  --text-color: #283415;
  --muted-text: #687253;
  --active-row-bg: #eaf2d6;
  --hero-rgb: 79, 118, 0;
  --safety-rgb: 99, 106, 76;
}

body.theme-RedPlanet {
  --theme-dark: #9b141c;
  --theme-dark-light: #b01818;
  --theme-dark-lighter: #cf6760;
  --theme-contrast: #ffffff;
  --canvas-bg: #fbebe9;
  --panel-bg: rgba(255, 252, 252, 0.98);
  --panel-border: #e8c5c5;
  --text-color: #381516;
  --muted-text: #7d5d5d;
  --active-row-bg: #fae5e4;
  --hero-rgb: 155, 20, 28;
  --safety-rgb: 176, 24, 24;
}

body.theme-RubberBlack {
  --theme-dark: #000000;
  --theme-dark-light: #7d7d7d;
  --theme-dark-lighter: #a0a0a0;
  --theme-contrast: #ffffff;
  --canvas-bg: #e5e7eb;
  --panel-bg: rgba(252, 252, 252, 0.98);
  --panel-border: #c7c7c7;
  --text-color: #191919;
  --muted-text: #646464;
  --active-row-bg: #e8edf4;
  --hero-rgb: 0, 0, 0;
  --safety-rgb: 125, 125, 125;
}

body.theme-Trendy {
  --theme-dark: #2f9547;
  --theme-dark-light: #43a456;
  --theme-dark-lighter: #65b7f0;
  --theme-contrast: #ffffff;
  --canvas-bg: #eaf7f1;
  --panel-bg: rgba(250, 255, 252, 0.98);
  --panel-border: #bedfc9;
  --text-color: #1c3325;
  --muted-text: #5c7868;
  --active-row-bg: #dff3e7;
  --hero-rgb: 47, 149, 71;
  --safety-rgb: 67, 164, 86;
}

body.theme-Claymation {
  --theme-dark: #6a6a6a;
  --theme-dark-light: #8a8a8a;
  --theme-dark-lighter: #a4a4a4;
  --theme-contrast: #ffffff;
  --canvas-bg: #eeeeee;
  --panel-bg: rgba(255, 255, 255, 0.98);
  --panel-border: #d3d3d3;
  --text-color: #252525;
  --muted-text: #686868;
  --active-row-bg: #e9edf1;
  --hero-rgb: 106, 106, 106;
  --safety-rgb: 138, 138, 138;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(var(--hero-rgb), 0.28);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  background: #f5f7fa;
  color: #1f2937;
  margin-bottom: 64px;
}

.app-nav {
  background: #ffffff;
}

.app-nav .container-fluid {
  position: relative;
}

.app-brand {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.app-brand img {
  max-height: 32px;
  max-width: 160px;
  object-fit: contain;
}

.jobordo-link span {
  color: #F79646;
}

.app-shell a:not(.btn),
.footer a,
.login-card a {
  color: var(--theme-dark);
}

.app-shell a:not(.btn):hover,
.app-shell a:not(.btn):focus,
.footer a:hover,
.footer a:focus,
.login-card a:hover,
.login-card a:focus {
  color: #F79646;
}

.app-shell {
  padding-top: 28px;
}

.app-header-version {
  color: var(--muted-text);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.footer-content {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.footer-version {
  color: var(--muted-text);
  font-size: 0.9rem;
  font-weight: 700;
  margin-left: auto;
  white-space: nowrap;
}

.page-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-heading h1 {
  color: #111827;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.eyebrow {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.heading-meta {
  color: #64748b;
  font-weight: 600;
  padding-bottom: 4px;
}

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

.folder-grid {
  margin-bottom: 18px;
}

.folder-card {
  background: #f8fbfc;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.breadcrumbs a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.breadcrumbs a::after {
  color: #94a3b8;
  content: "/";
  margin-left: 8px;
}

.breadcrumbs a:last-child::after {
  content: "";
  margin-left: 0;
}

.report-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px;
}

.clickable-card {
  color: inherit;
  justify-content: flex-start;
  min-height: 96px;
  text-decoration: none;
}

.clickable-card:hover,
.clickable-card:focus {
  border-color: #0f766e;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.12);
  color: inherit;
}

.report-card-with-actions {
  align-items: center;
}

.report-card-link {
  align-items: center;
  color: inherit;
  display: flex;
  flex: 1 1 auto;
  gap: 18px;
  min-width: 0;
  text-decoration: none;
}

.report-card-link:hover,
.report-card-link:focus {
  color: inherit;
}

.hidden-report {
  background: #f1f5f9;
  border-style: dashed;
  opacity: 0.62;
}

.hidden-report-row {
  color: #64748b;
}

.hidden-badge {
  border: 1px solid #94a3b8;
  border-radius: 4px;
  color: #64748b;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 8px;
  padding: 2px 6px;
  text-transform: uppercase;
  vertical-align: middle;
}

.report-icon {
  background: #e8f3f1;
  border: 1px solid #bfd7d2;
  border-radius: 6px;
  display: inline-block;
  flex: 0 0 42px;
  height: 42px;
  position: relative;
  width: 42px;
}

.uploaded-icon {
  background: transparent;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  padding: 0;
}

.folder-icon::before {
  background: #0f766e;
  border-radius: 4px 4px 2px 2px;
  content: "";
  height: 10px;
  left: 8px;
  position: absolute;
  top: 12px;
  width: 18px;
}

.folder-icon::after {
  background: #0f766e;
  border-radius: 4px;
  content: "";
  height: 18px;
  left: 8px;
  position: absolute;
  top: 17px;
  width: 26px;
}

.rdl-icon::before {
  background: #ffffff;
  border: 2px solid #0f766e;
  border-radius: 3px;
  content: "";
  height: 28px;
  left: 12px;
  position: absolute;
  top: 7px;
  width: 19px;
}

.rdl-icon::after {
  background: #0f766e;
  box-shadow: 0 6px 0 #0f766e, 0 12px 0 #0f766e;
  content: "";
  height: 2px;
  left: 16px;
  position: absolute;
  top: 15px;
  width: 11px;
}

.report-card h2 {
  color: #111827;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 6px;
}

.report-card p {
  color: #64748b;
  margin: 0;
}

.report-form {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 22px;
}

.parameter-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.field label {
  color: #334155;
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.field-hint {
  color: #64748b;
  display: block;
  font-size: 0.86rem;
  margin-top: 6px;
}

.filter-bulk-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.filter-bulk-action {
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 4px 8px;
}

.filter-bulk-action:hover,
.filter-bulk-action:focus {
  background: #f1f5f9;
  border-color: #94a3b8;
  outline: none;
}

.multi-select-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  max-height: 238px;
  overflow-y: auto;
  padding: 8px;
}

.multi-select-option {
  align-items: center;
  border-radius: 4px;
  color: #1f2937;
  display: flex;
  gap: 8px;
  margin: 0;
  min-height: 28px;
  padding: 4px 6px;
}

.multi-select-option:hover {
  background: #f1f5f9;
}

.multi-select-option span {
  overflow-wrap: anywhere;
}

.action-bar {
  border-top: 1px solid #e5e9f0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
}

.report-command-bar {
  align-items: center;
  justify-content: space-between;
}

.report-action-group,
.report-export-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-export-group {
  border-left: 1px solid var(--panel-border, #d8dee8);
  margin-left: auto;
  padding-left: 16px;
}

.report-export-group .btn {
  min-width: 58px;
}

.empty-state {
  background: #ffffff;
  border: 1px dashed #bdc7d5;
  border-radius: 8px;
  color: #64748b;
  padding: 22px;
}

.empty-state.compact {
  margin-bottom: 8px;
}

.table-panel,
.settings-panel {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 18px;
}

.table-panel .table {
  margin-bottom: 0;
}

.user-admin-panel {
  overflow-x: auto;
}

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

.user-admin-table td:last-child,
.user-admin-table th:last-child {
  padding-right: 10px;
  width: 116px;
}

.panel-note,
.muted {
  color: #64748b;
}

.access-matrix {
  overflow-x: auto;
}

.matrix-heading,
.log-panel h2 {
  font-size: 1.05rem;
  margin: 12px 0;
}

.log-panel {
  margin-bottom: 18px;
  overflow-x: auto;
}

.access-matrix th,
.access-matrix td {
  min-width: 130px;
}

.access-matrix th:first-child {
  min-width: 260px;
}

.top-actions {
  border-top: 0;
  margin-bottom: 14px;
  margin-top: 0;
  padding-top: 0;
}

.schedule-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 156px;
  white-space: nowrap;
}

.schedule-actions form,
.inline-save {
  margin: 0;
}

.inline-save {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 260px;
}

.inline-save .form-control {
  min-width: 150px;
}

.unlock-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-pill {
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  text-transform: uppercase;
}

.status-pill.warning {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.small-text {
  font-size: 0.82rem;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.row-actions form {
  margin: 0;
}

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

.file-actions form {
  margin: 0;
}

.setup-form {
  max-width: 680px;
}

.setup-form .field + .field {
  margin-top: 16px;
}

.error-text {
  color: #b42318;
  font-size: 0.86rem;
  max-width: 360px;
}

.full-field {
  margin-top: 18px;
}

.code-input {
  font-family: Consolas, Monaco, monospace;
}

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

.settings-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.asset-preview {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
  padding: 0;
}

.settings-panel p,
.settings-panel dd {
  overflow-wrap: anywhere;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
}

.btn-primary {
  background: #0f766e;
  border-color: #0f766e;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #115e59;
  border-color: #115e59;
}

.btn-outline-primary {
  border-color: #0f766e;
  color: #0f766e;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

@media (max-width: 576px) {
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .report-card .btn {
    width: 100%;
  }
}

body {
  background: var(--canvas-bg);
  color: var(--text-color);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.app-nav {
  background: var(--panel-bg) !important;
  border-color: var(--panel-border) !important;
}

.app-brand span,
.page-heading h1,
.report-card h2,
.table,
.modal-title,
.field label {
  color: var(--text-color);
}

.eyebrow,
.heading-meta,
.panel-note,
.muted,
.report-card p,
.field-hint {
  color: var(--muted-text);
}

.breadcrumbs a,
.jobordo-link,
.btn-link.account-settings-button {
  color: var(--theme-dark) !important;
}

.jobordo-link span {
  color: #F79646;
}

.report-canvas {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.report-card,
.report-form,
.table-panel,
.settings-panel,
.modal-content,
.empty-state,
.multi-select-panel {
  background: var(--panel-bg);
  border-color: var(--panel-border);
  color: var(--text-color);
}

.filter-bulk-action {
  border-color: var(--panel-border);
  color: var(--text-color);
}

.filter-bulk-action:hover,
.filter-bulk-action:focus {
  background: var(--active-row-bg);
  border-color: var(--theme-dark-light);
  color: var(--theme-dark);
}

.desktop-item {
  position: relative;
}

.desktop-item.dragging {
  opacity: 0.45;
}

.desktop-item:focus-within,
.desktop-item:focus {
  border-color: var(--theme-dark-light);
  box-shadow: 0 8px 24px rgba(var(--safety-rgb), 0.16);
  outline: none;
}

.clickable-card:hover,
.clickable-card:focus {
  border-color: var(--theme-dark-light);
  box-shadow: 0 8px 24px rgba(var(--safety-rgb), 0.14);
}

.report-card-link {
  padding-right: 52px;
}

.card-menu-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted-text);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 7px;
  position: absolute;
  right: 10px;
  top: 10px;
}

.card-menu-button:hover,
.card-menu-button:focus {
  background: var(--active-row-bg);
  border-color: var(--panel-border);
  color: var(--theme-dark);
  outline: none;
}

.hidden-report {
  background: var(--active-row-bg);
  border-style: dashed;
  opacity: 0.62;
}

.hidden-badge {
  border-color: var(--muted-text);
  color: var(--muted-text);
}

.report-icon {
  background: var(--active-row-bg);
  border-color: var(--panel-border);
}

.folder-icon::before,
.folder-icon::after {
  background: var(--theme-dark);
}

.rdl-icon::before {
  border-color: var(--theme-dark);
}

.rdl-icon::after {
  background: var(--theme-dark);
  box-shadow: 0 6px 0 var(--theme-dark), 0 12px 0 var(--theme-dark);
}

body.desktop-icons .report-icon.uploaded-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  height: 48px;
  padding: 0 !important;
  width: 48px;
}

body.icon-badges .report-icon.uploaded-icon {
  background: var(--active-row-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  height: 48px;
  padding: 6px;
  width: 48px;
}

.form-control,
.form-select {
  background-color: var(--panel-bg);
  border-color: var(--panel-border);
  color: var(--text-color);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
  border-color: var(--theme-dark-light);
  box-shadow: 0 0 0 0.1rem var(--panel-bg), 0 0 0 0.25rem rgba(var(--safety-rgb), 0.28);
}

.form-check-input:checked {
  background-color: var(--theme-dark-light);
  border-color: var(--theme-dark-light);
}

.multi-select-option:hover {
  background: var(--active-row-bg);
}

.btn-primary {
  background: var(--theme-dark);
  border-color: var(--theme-dark);
  color: var(--theme-contrast);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--theme-dark-light);
  border-color: var(--theme-dark-light);
  color: var(--theme-contrast);
}

.btn-outline-primary {
  border-color: var(--theme-dark);
  color: var(--theme-dark);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--theme-dark);
  border-color: var(--theme-dark);
  color: var(--theme-contrast);
}

.context-menu {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  display: grid;
  min-width: 190px;
  padding: 6px;
  position: fixed;
  z-index: 2000;
}

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

.context-menu button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-color);
  font: inherit;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
}

.context-menu button:hover,
.context-menu button:focus {
  background: var(--active-row-bg);
  color: var(--theme-dark);
  outline: none;
}

.settings-stack + .settings-stack {
  border-top: 1px solid var(--panel-border);
  margin-top: 20px;
  padding-top: 20px;
}

.support-request-form h3 {
  color: var(--text-color);
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.app-main-nav {
  align-items: center;
  gap: 4px;
}

.nav-with-icon {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  font-weight: 600;
}

.nav-cog-link {
  align-items: center;
  display: inline-flex;
  min-height: 38px;
}

.nav-inline-icon {
  color: var(--theme-dark-light);
  display: inline-block;
  fill: currentColor;
  flex: 0 0 20px;
  height: 20px;
  object-fit: contain;
  width: 20px;
}

.nav-star-svg {
  height: 17px;
  width: 17px;
}

.nav-cog-svg {
  color: var(--text-color);
  fill: none;
  height: 28px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 28px;
}

.report-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: -8px 0 18px;
}

.report-toolbar .form-control {
  max-width: 320px;
}

.report-toolbar-check {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.view-switch {
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  display: inline-flex;
  overflow: hidden;
}

.view-switch a {
  color: var(--text-color);
  font-weight: 700;
  padding: 7px 10px;
  text-decoration: none;
}

.view-switch a.active,
.view-switch a:hover,
.view-switch a:focus {
  background: var(--theme-dark);
  color: var(--theme-contrast);
}

.report-canvas[data-view-mode="list"] {
  display: grid;
  grid-template-columns: 1fr;
}

.report-canvas[data-view-mode="list"] .desktop-item {
  min-height: 64px;
  padding: 12px 16px;
}

.report-canvas[data-view-mode="list"] .report-icon {
  flex-basis: 34px;
  height: 34px;
  width: 34px;
}

.card-menu-button {
  display: none !important;
}

body.desktop-icons .report-icon.uploaded-icon,
.report-icon.uploaded-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: 48px;
  padding: 0 !important;
  width: 48px;
}

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

.admin-side-menu {
  background: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)), var(--theme-dark);
  border-radius: 8px;
  color: #ffffff;
  min-height: 420px;
  padding: 12px;
  position: sticky;
  top: 78px;
}

.admin-side-menu-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.admin-side-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.admin-side-toggle::before {
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  height: 9px;
  transform: rotate(45deg);
  width: 9px;
}

.admin-side-toggle:hover,
.admin-side-toggle:focus {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.admin-side-menu nav {
  display: grid;
  gap: 4px;
}

.admin-side-menu a {
  border-left: 3px solid transparent;
  color: #ffffff !important;
  font-weight: 700;
  padding: 9px 10px;
  text-decoration: none;
}

.admin-side-menu a.active,
.admin-side-menu a:hover,
.admin-side-menu a:focus {
  background: rgba(255, 255, 255, 0.18);
  border-left-color: rgba(255, 255, 255, 0.9);
  color: #ffffff !important;
}

.admin-content {
  min-width: 0;
}

.admin-layout.admin-menu-collapsed {
  grid-template-columns: 50px minmax(0, 1fr);
}

.admin-layout.admin-menu-collapsed .admin-side-menu nav {
  display: none;
}

.admin-layout.admin-menu-collapsed .admin-side-menu {
  min-height: auto;
  padding: 8px;
}

.admin-layout.admin-menu-collapsed .admin-side-menu-tools {
  margin-bottom: 0;
}

.admin-layout.admin-menu-collapsed .admin-side-toggle::before {
  transform: rotate(-135deg);
}

.inline-form {
  margin: 0;
}

.user-admin-table td,
.user-admin-table th {
  vertical-align: middle;
}

.user-role-select {
  min-width: 132px;
}

.access-editor {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 310px) minmax(640px, 1fr);
}

.access-user-list {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  max-height: 72vh;
  overflow-y: auto;
  padding: 12px;
  position: sticky;
  top: 78px;
}

.access-user-list h2 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.access-user-list a {
  border-radius: 6px;
  color: var(--text-color);
  display: block;
  font-weight: 700;
  overflow: hidden;
  padding: 8px 10px;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.access-user-list a.active,
.access-user-list a:hover,
.access-user-list a:focus {
  background: var(--active-row-bg);
  color: var(--theme-dark);
}

.access-permission-panel {
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.access-save-bar {
  align-items: center;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
  padding: 0 0 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.log-filter-bar {
  align-items: end;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.log-filter-bar .field {
  min-width: 180px;
}

.login-page {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 28px 16px;
  position: relative;
}

.compact-login-page {
  min-height: 460px;
}

.login-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  max-width: 480px;
  padding: 18px 22px 20px;
  position: relative;
  width: min(480px, 100%);
  z-index: 1;
}

.login-card-logo {
  display: block;
  margin: 0 auto 14px;
  max-height: 96px;
  max-width: min(360px, 94%);
  object-fit: contain;
}

.login-card .field + .field {
  margin-top: 12px;
}

.login-card-tag {
  margin-bottom: 10px;
  text-transform: none;
}

.login-card .action-bar {
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding-top: 16px;
}

.login-card .action-bar .btn {
  width: 80%;
}

.login-reset-link {
  display: block;
  margin-top: 12px;
  text-align: center;
  width: min(480px, 100%);
}

@media (max-width: 768px) {
  .report-toolbar,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .report-toolbar .form-control {
    max-width: none;
  }

  .admin-layout,
  .access-editor {
    grid-template-columns: 1fr;
  }

  .admin-side-menu {
    min-height: auto;
  }

  .login-page {
    padding: 24px 14px;
  }
}

.report-preview-panel {
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--panel-border, #d8dee8);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.report-preview-heading {
  align-items: center;
  border-bottom: 1px solid var(--panel-border, #e5e9f0);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.report-preview-heading h2 {
  font-size: 1.2rem;
  margin: 0;
}

.report-preview-heading p {
  color: var(--muted-text, #64748b);
  margin: 4px 0 0;
}

.report-preview-frame {
  background: #ffffff;
  border: 1px solid var(--panel-border, #d8dee8);
  border-radius: 6px;
  display: block;
  height: min(78vh, 900px);
  min-height: 560px;
  width: 100%;
}

@media (max-width: 760px) {
  .report-command-bar {
    align-items: stretch;
  }

  .report-action-group,
  .report-export-group {
    width: 100%;
  }

  .report-export-group {
    border-left: 0;
    border-top: 1px solid var(--panel-border, #d8dee8);
    margin-left: 0;
    padding-left: 0;
    padding-top: 12px;
  }
}
