/* Stallingstool — uitzonderingsgericht dashboard R3 */

.st-page-dashboard-r3 .r3-main {
  display: grid;
  gap: 20px;
}

.r3-hero {
  margin-bottom: 0;
}

.r3-hero-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.r3-hero-heading h1 {
  margin: 2px 0 5px;
}

.r3-eyebrow {
  margin: 0;
  color: #00539b;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.r3-command {
  min-width: 0;
}

.r3-main .st-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid #b9cad8;
  border-radius: 11px;
  font: inherit;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.r3-main .st-button-primary {
  color: #fff;
  background: #00539b;
  border-color: #00539b;
}

.r3-main .st-button-primary:hover,
.r3-main .st-button-primary:focus-visible {
  background: #003f78;
  border-color: #003f78;
}

.r3-main .st-button-secondary {
  color: #06487e;
  background: #f7fbff;
}

.r3-main .st-button-secondary:hover,
.r3-main .st-button-secondary:focus-visible {
  background: #e8f4fc;
  border-color: #8db5da;
}

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

.r3-metric {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 116px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid #dbe5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(22, 44, 72, 0.07);
  color: #172333;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.r3-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #8b98a8;
  content: "";
}

.r3-metric:hover,
.r3-metric:focus-visible {
  border-color: #8db5da;
  box-shadow: 0 8px 24px rgba(22, 44, 72, 0.12);
  transform: translateY(-1px);
}

.r3-metric-success::before { background: #16834c; }
.r3-metric-info::before { background: #146eb4; }
.r3-metric-attention::before { background: #c87408; }
.r3-metric-danger::before { background: #c9362b; }
.r3-metric-neutral::before { background: #7a8795; }

.r3-metric-label {
  color: #4d5d6e;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
}

.r3-metric-value {
  overflow-wrap: anywhere;
  color: #102033;
  font-size: clamp(1.55rem, 2.25vw, 2.15rem);
  line-height: 1;
}

.r3-metric-detail {
  color: #667585;
  font-size: 0.78rem;
  line-height: 1.35;
}

.r3-attention {
  scroll-margin-top: 92px;
}

.r3-attention-header {
  align-items: center;
}

.r3-attention-header h2 {
  margin: 3px 0 5px;
}

.r3-attention-header p:last-child {
  margin-bottom: 0;
}

.r3-attention-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.r3-attention-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid #e5ebf1;
}

.r3-attention-item:first-child {
  border-top: 0;
}

.r3-attention-indicator {
  width: 8px;
  height: 38px;
  border-radius: 99px;
  background: #7a8795;
}

.r3-attention-danger .r3-attention-indicator { background: #c9362b; }
.r3-attention-attention .r3-attention-indicator { background: #c87408; }
.r3-attention-neutral .r3-attention-indicator { background: #7a8795; }

.r3-attention-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.r3-attention-copy strong {
  color: #172333;
}

.r3-attention-copy span,
.r3-attention-more {
  color: #667585;
  font-size: 0.88rem;
}

.r3-attention-more {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e5ebf1;
}

.r3-attention-clear {
  border-color: #bcdcc9;
  background: #f8fdf9;
}

.r3-dashboard-grid {
  align-items: start;
}

.r3-dashboard-grid .st-card {
  margin: 0;
}

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

@media (max-width: 760px) {
  .r3-hero-heading,
  .r3-attention-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .r3-attention-item {
    grid-template-columns: 6px minmax(0, 1fr);
  }

  .r3-attention-action {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .r3-metrics {
    grid-template-columns: 1fr;
  }

  .r3-metric {
    min-height: 112px;
  }
}

@media print {
  .r3-hero-heading .st-button,
  .r3-attention-action {
    display: none !important;
  }

  .r3-metric {
    box-shadow: none;
    break-inside: avoid;
  }
}
