/* Next-level premium experience layer: route-aware structure and workflow polish */

body {
  --premium-blue: #243f86;
  --premium-cyan: #0f7a8a;
  --premium-green: #14745f;
  --premium-amber: #a76414;
  --premium-red: #b71f3e;
  --premium-ink: #0b172d;
  --premium-muted: #62708a;
  --premium-line: #d5deec;
  --premium-soft: #f6f8fc;
}

.premium-page-header {
  position: relative;
  overflow: hidden;
}

.premium-page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--premium-blue), var(--premium-cyan), var(--premium-green));
}

body[data-experience-tone="risk"] .premium-page-header::before {
  background: linear-gradient(90deg, var(--premium-red), #e46a3a, var(--premium-amber));
}

body[data-experience-tone="governance"] .premium-page-header::before {
  background: linear-gradient(90deg, #243f86, #5a4fb3, #0f7a8a);
}

body[data-experience-tone="compliance"] .premium-page-header::before {
  background: linear-gradient(90deg, #0f7a8a, #2563a8, #7c4d9f);
}

.premium-page-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(36, 63, 134, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(246, 249, 253, 0.94)),
    radial-gradient(circle at 0 0, rgba(36, 63, 134, 0.08), transparent 32%);
}

.premium-page-brief span {
  display: block;
  color: var(--premium-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-page-brief p {
  margin: 4px 0 0;
  color: var(--premium-muted);
  font-size: 13px;
  line-height: 1.45;
}

.premium-brief-steps {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.premium-brief-steps b {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px 6px 7px;
  border: 1px solid #d7e1f0;
  border-radius: 999px;
  background: #ffffff;
  color: #243f86;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 8px 16px -14px rgba(9, 24, 53, 0.45);
}

.premium-brief-steps em {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #edf3ff;
  color: #243f86;
  font-style: normal;
  font-size: 11px;
}

.premium-filter-console {
  border-color: #c9d7ec;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.98));
}

.premium-filter-console select,
.premium-filter-console input {
  min-height: 42px;
}

.premium-data-console {
  box-shadow: 0 18px 36px -28px rgba(8, 21, 48, 0.52);
}

.premium-data-console table {
  border-collapse: separate;
  border-spacing: 0;
}

.premium-data-console thead th {
  border-bottom: 1px solid #cbd8eb;
  background: linear-gradient(180deg, #f8fbff, #edf3fb);
  color: #4c5f7e;
}

.premium-data-console tbody td {
  vertical-align: middle;
}

.premium-row-risk {
  background: linear-gradient(90deg, rgba(183, 31, 62, 0.06), transparent 58%) !important;
}

.premium-row-attention {
  background: linear-gradient(90deg, rgba(167, 100, 20, 0.07), transparent 58%) !important;
}

.premium-row-healthy {
  background: linear-gradient(90deg, rgba(20, 116, 95, 0.05), transparent 58%) !important;
}

.premium-primary-cta {
  background: linear-gradient(135deg, #18336f, #2f65c8) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 26px -18px rgba(28, 60, 136, 0.8);
}

.premium-quiet-cta {
  background: #ffffff !important;
  border: 1px solid #d3deef !important;
  color: #334967 !important;
}

.premium-workflow-console {
  border-color: #c9d9ef;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98)),
    radial-gradient(circle at 100% 0, rgba(47, 101, 200, 0.08), transparent 30%);
}

.premium-transfer-guide {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #d3deef;
  border-radius: 13px;
  background: #ffffff;
}

.premium-transfer-guide strong {
  color: #17243d;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.premium-transfer-guide span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f0f5ff;
  color: #243f86;
  font-size: 12px;
  font-weight: 750;
}

.premium-field-hint {
  margin-top: -2px;
  color: #6a7890;
  font-size: 11px;
  line-height: 1.35;
}

.premium-workload-matrix-panel {
  border-color: #c5d4ea;
}

.premium-workload-matrix-panel .table-wrap,
.premium-workload-matrix-panel table {
  max-width: 100%;
}

.premium-matrix-total-row th,
.premium-matrix-total-row td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  border-top: 1px solid #bdcbe0;
  border-bottom: 0;
  background: #f4f8ff !important;
  box-shadow: 0 -8px 18px -18px rgba(8, 20, 45, 0.5);
}

.premium-matrix-total-row th {
  color: #1f356a;
  font-size: 11px;
}

.premium-total-pill {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #203a7c, #0f7a8a);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

body[data-route="/"] .dashboard-kpi-grid .kpi-card,
body[data-route="/"] .kpi-card-btn {
  min-height: 112px;
  display: grid;
  align-content: center;
}

body[data-route="/"] .aging-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(170deg, #ffffff, #f5f8fc);
}

body[data-route="/"] .aging-card strong,
body[data-route="/"] .notice-aging-card strong {
  color: #132a54;
}

body[data-route="/"] .aging-card span,
body[data-route="/"] .notice-aging-card span {
  color: #52627c;
}

body[data-route="/"] .aging-card::after {
  content: "";
  position: absolute;
  inset: auto 10px 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-route="/"] .aging-bucket-30_plus {
  background: linear-gradient(170deg, #b71f3e, #8f1730);
}

body[data-route="/"] .aging-bucket-30_plus strong,
body[data-route="/"] .aging-bucket-30_plus span {
  color: #ffffff;
}

body[data-section="notices"] .notice-filter-grid,
body[data-route="/notices/all"] .compact-toolbar-panel {
  border-color: #c9deea;
  background:
    linear-gradient(180deg, #ffffff, #f7fbfd),
    radial-gradient(circle at 0 0, rgba(15, 122, 138, 0.09), transparent 34%);
}

body[data-route="/master/access"] .compact-actions button,
body[data-route="/master/access"] td button {
  min-height: 34px;
}

body[data-route="/master/access"] td select {
  min-width: 118px;
}

.premium-risk-console {
  border-color: rgba(183, 31, 62, 0.24);
}

@media (max-width: 1100px) {
  .premium-page-brief,
  .premium-transfer-guide {
    grid-template-columns: 1fr;
  }

  .premium-brief-steps {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .premium-page-brief {
    padding: 10px;
    gap: 10px;
  }

  .premium-brief-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .premium-brief-steps b {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .premium-transfer-guide {
    gap: 7px;
  }

  .premium-transfer-guide span {
    justify-content: flex-start;
    padding: 0 10px;
  }

  .premium-data-console tbody tr {
    border-left: 3px solid #d7e2f0;
  }

  .premium-row-risk {
    border-left-color: var(--premium-red) !important;
  }

  .premium-row-attention {
    border-left-color: var(--premium-amber) !important;
  }

  .premium-row-healthy {
    border-left-color: var(--premium-green) !important;
  }

  .premium-matrix-total-row {
    display: none;
  }
}
