:root {
  --navy: #001b3d;
  --navy-soft: #0b1e3f;
  --bg: #f8f9fb;
  --sidebar: #eef2f7;
  --muted: #6b7280;
  --input-bg: #f3f4f6;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, #f4f4f5 0%, #fff 45%, #f4f4f5 100%);
  color: #111827;
  min-height: 100vh;
}

.shell { min-height: 100vh; }

body.page-crud {
  background: var(--bg);
}
.crud-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}
.crud-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.crud-title {
  margin: 0;
  color: var(--navy);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.crud-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.crud-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
@media (min-width: 640px) {
  .crud-toolbar {
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }
  .crud-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
.crud-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  box-shadow: 0 12px 34px rgba(2, 12, 27, 0.06);
  overflow: hidden;
}
.crud-card-pad { padding: 1.25rem; }
@media (min-width: 640px) { .crud-card-pad { padding: 1.75rem; } }
.crud-table-wrap { overflow-x: auto; }
.crud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.crud-table th,
.crud-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
}
.is-right { text-align: right; }
.text-center { text-align: center; }
.crud-table thead th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #eef2f7;
}
.crud-table tbody td {
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
}
.crud-table tbody tr:hover td {
  background: #fafafa;
}
.crud-strong { color: var(--navy); }
.crud-muted { color: #6b7280; }
.crud-actions-inline {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.crud-pager {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #6b7280;
  font-size: 0.92rem;
  flex-wrap: wrap;
}
.crud-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .crud-grid-2 { grid-template-columns: 1fr 1fr; } }
.crud-form { display: grid; gap: 1rem; }
.crud-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.form-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--navy);
}
.form-help { margin-top: 0.35rem; font-size: 0.78rem; color: #6b7280; }
.form-error { margin-top: 0.35rem; font-size: 0.78rem; color: #b91c1c; }

.crud-input,
.crud-select {
  height: 44px;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0 0.95rem;
  font-size: 0.95rem;
  color: #111827;
  box-shadow: 0 4px 14px rgba(2, 12, 27, 0.06);
  outline: none;
}
.crud-input:focus,
.crud-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.crud-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-danger,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  padding: 0 1rem;
  height: 44px;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { opacity: 0.92; }
.btn-secondary {
  background: #fff;
  color: var(--navy);
  border-color: #e5e7eb;
}
.btn-secondary:hover { background: #fafafa; }
.btn-tertiary {
  background: #fff;
  color: #374151;
  border-color: #e5e7eb;
}
.btn-tertiary:hover { background: #fafafa; }
.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover { opacity: 0.92; }
.btn-small {
  height: 36px;
  padding: 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  background: #fff;
  color: var(--navy);
  border-color: #e5e7eb;
}
.btn-small:hover { background: #fafafa; }
.btn-danger-outline {
  color: #b91c1c;
  border-color: #e5e7eb;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #e5e7eb;
  color: #374151;
}
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0ecff; color: var(--navy); }

.alert {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
}
.alert-warn { border-color: #fcd34d; background: #fffbeb; color: #78350f; }
.alert-danger { border-color: #fecaca; background: #fef2f2; color: #7f1d1d; }

body.page-login {
  color: #f8fafc;
}
body.page-login .shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem 1rem;
}
.page-login .login-wrap {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}
.login-brand { margin-bottom: 2rem; }
.login-logo {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-brand-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--navy);
}
.page-login .login-brand-title {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.login-brand-sub {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
}
.page-login .login-brand-sub {
  color: rgba(248, 250, 252, 0.78);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.login-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #f3f4f6;
  text-align: left;
}
.page-login .login-card {
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
  border-color: rgba(255, 255, 255, 0.12);
}

.login-flip {
  perspective: 1200px;
}
.login-flip-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 520ms cubic-bezier(.2,.8,.2,1);
}
.login-flip.is-flipped .login-flip-inner {
  transform: rotateY(180deg);
}
.login-flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.login-flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

.login-alt {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: #4b5563;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.login-card .login-alt { color: #4b5563; }
.page-login .login-alt { color: rgba(248, 250, 252, 0.88); }
.login-alt-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin-left: 0.35rem;
  font: inherit;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-card .login-alt-link { color: var(--navy); }
.page-login .login-alt-link { color: #fff; }
.page-login .login-card .login-alt-link { color: var(--navy); }
.login-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.field { margin-bottom: 1.25rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 520px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
  }
  .field-row .field { margin-bottom: 0; }
}
.field-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.field-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
}
.field-hint code {
  font-size: 0.72rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.field-link-muted {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0284c7;
}
.field-input-wrap {
  position: relative;
}
.field-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  display: flex;
}
.field-input {
  width: 100%;
  height: 3rem;
  padding-left: 2.5rem;
  padding-right: 1rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--input-bg);
  font-size: 0.9rem;
  color: var(--navy);
  outline: none;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}
.field-input:focus {
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.35);
}
.field-error { font-size: 0.8rem; color: #b91c1c; margin: 0.25rem 0 0; }
.trust-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 1.25rem;
  cursor: pointer;
}
.trust-check { width: 1rem; height: 1rem; accent-color: var(--navy); }
.btn-primary {
  width: 100%;
  height: 3rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 27, 61, 0.25);
}
.btn-primary:hover { opacity: 0.95; }
.login-form .btn-primary { margin-top: 0.5rem; }
.badge-danger {
  margin: 1.25rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--danger-text);
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  width: 100%;
  justify-content: center;
}
.login-footer {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: #4b5563;
}
.login-footer a {
  font-weight: 700;
  color: var(--navy);
}
.page-login .login-footer {
  color: rgba(248, 250, 252, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.page-login .login-footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-dashboard { background: var(--bg); }
.dash-layout {
  display: flex;
  min-height: 100vh;
}
.dash-sidebar {
  width: 268px;
  flex-shrink: 0;
  background: #f3f6fb;
  border-right: 1px solid #e8edf5;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.75rem;
}
.dash-brand {
  display: flex;
  gap: 0.75rem;
  padding: 0 0.75rem 1.25rem;
  align-items: center;
}
.dash-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #0b2a5a;
  color: #fff;
  display: grid;
  place-items: center;
}
.dash-brand-title { font-size: 0.875rem; font-weight: 800; color: var(--navy-soft); }
.dash-brand-sub {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
}
.dash-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.dash-nav-item {
  display: block;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
}
.dash-nav-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  color: #0b2a5a;
  display: grid;
  place-items: center;
  border: 1px solid #e6ebf3;
}
.dash-nav-item:hover { background: rgba(255, 255, 255, 0.7); color: #111; }
.dash-nav-item.is-active {
  background: #fff;
  color: var(--navy-soft);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}
.dash-nav-item.is-active .dash-nav-ico {
  background: #0b2a5a;
  color: #fff;
  border-color: rgba(11, 42, 90, 0.15);
}
.dash-btn-new {
  margin: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: #0b2a5a;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  gap: 0.45rem;
}
.dash-btn-new:hover { opacity: 0.95; }
.dash-btn-plus {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.16);
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}
.dash-sidebar-bottom {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 0.75rem 0;
  margin-top: auto;
}
.dash-user { display: flex; gap: 0.65rem; align-items: center; }
.dash-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--navy-soft);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.dash-user-name { font-size: 0.8rem; font-weight: 700; }
.dash-user-role { font-size: 0.7rem; color: #6b7280; }
.dash-logout-form { margin-top: 0.75rem; }
.dash-logout {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
}
.dash-logout:hover { color: #111; }

.dash-main { flex: 1; padding: 1.5rem 2rem 2rem; min-width: 0; }
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-page-title { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--navy-soft); }
.dash-page-sub { margin: 0.35rem 0 0; font-size: 0.875rem; color: var(--muted); max-width: 40rem; }
.pill-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
}
.pill-live .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #22c55e;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid #e6ebf3;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.kpi-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1rem;
  background: #f1f6ff;
  color: #0b2a5a;
  display: grid;
  place-items: center;
  border: 1px solid #e4ecff;
}
.kpi-delta {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
}
.kpi-delta.is-up { color: #166534; background: #ecfdf5; border-color: #bbf7d0; }
.kpi-chip {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}
.kpi-label { margin-top: 0.75rem; font-size: 0.75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.kpi-value { margin-top: 0.35rem; font-size: 1.75rem; font-weight: 900; color: #0b2a5a; }

.dash-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.dash-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #e6ebf3;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  padding: 1.1rem 1.25rem;
}
.dash-card-wide { padding: 1.1rem 1.25rem 0.6rem; }
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.dash-card-head h3 { margin: 0; font-size: 1rem; font-weight: 900; color: #0b2a5a; }
.dash-link { font-size: 0.8rem; font-weight: 700; color: #64748b; text-decoration: none; }
.dash-link:hover { color: #0b2a5a; }

.dash-table { border-radius: 1rem; border: 1px solid #eef2f7; overflow: hidden; }
.dash-tr {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr 0.8fr;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  align-items: center;
  background: #fff;
  border-top: 1px solid #eef2f7;
}
.dash-tr:first-child { border-top: 0; }
.dash-th { background: #f8fafc; color: #64748b; font-size: 0.7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.dash-player { display: flex; align-items: center; gap: 0.65rem; font-weight: 800; color: #0f172a; }
.dash-avatar-sm {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: #0b2a5a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
}
.is-right { text-align: right; font-weight: 800; }

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.6rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.tag-ok { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.tag-live { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.tag-warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }

.dash-side { display: grid; gap: 1rem; }
.chip {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.3rem 0.6rem;
  border-radius: 0.75rem;
  background: #0b2a5a;
  color: #fff;
}

.mini-chart {
  height: 160px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.55rem;
  align-items: end;
  padding: 0.75rem 0.2rem 0.3rem;
}
.mini-chart .bar {
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.mini-chart .bar.is-peak { background: #0b2a5a; }
.mini-chart-x {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
  padding: 0 0.1rem;
  margin-top: 0.25rem;
}
.dash-metrics { margin-top: 0.9rem; display: grid; gap: 0.5rem; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.85rem; }
.metric-k { color: #64748b; font-weight: 700; }
.metric-v { color: #0f172a; font-weight: 900; }

.dash-card-media { padding: 0; overflow: hidden; position: relative; min-height: 150px; }
.media-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.18)),
    radial-gradient(800px 220px at 30% 20%, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(700px 240px at 70% 80%, rgba(59, 130, 246, 0.25), transparent 60%),
    url("../img/admin_card.90d2609add7f.jpg");
  background-size: cover;
  background-position: center;
}
.media-content { position: relative; padding: 1.1rem 1.2rem; color: #fff; }
.media-kicker { font-size: 0.7rem; font-weight: 900; letter-spacing: .2em; opacity: .85; }
.media-title { margin-top: 0.5rem; font-size: 1.05rem; font-weight: 900; line-height: 1.25; max-width: 20rem; }

.dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0.25rem 0.5rem;
  color: #94a3b8;
}
.dash-footer-left { font-weight: 900; letter-spacing: .08em; }
.dash-footer-right { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }

.dash-kpi-mini { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.mini-kpi {
  background: #fff;
  border: 1px solid #e6ebf3;
  border-radius: 1rem;
  padding: 0.65rem 0.9rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  min-width: 170px;
}
.mini-k { font-size: 0.65rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.mini-v { margin-top: 0.15rem; font-size: 1.1rem; font-weight: 900; color: #0b2a5a; text-align: right; }

.res-toolbar {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem;
}
.res-search {
  flex: 1;
  min-width: min(560px, 100%);
  position: relative;
}
.res-ico {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.res-input {
  width: 100%;
  height: 3.2rem;
  border-radius: 1rem;
  border: 1px solid #e6ebf3;
  padding-left: 2.7rem;
  padding-right: 1rem;
  outline: none;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}
.res-input:focus { box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05), inset 0 0 0 2px rgba(59, 130, 246, 0.18); }

.res-filters { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.res-pill {
  height: 3.2rem;
  border-radius: 1rem;
  border: 1px solid #e6ebf3;
  background: #fff;
  padding: 0 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}
.res-pill strong { color: #0b2a5a; }
.res-pill-ico { color: #64748b; font-weight: 900; }
.res-btn-icon {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  border: 0;
  background: #0b2a5a;
  color: #fff;
  box-shadow: 0 12px 30px rgba(11, 42, 90, 0.22);
  cursor: pointer;
}
.res-btn-icon:hover { opacity: 0.95; }

.res-card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #e6ebf3;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.res-head, .res-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr 0.9fr 0.8fr;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.1rem;
}
.res-head {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.res-row { border-top: 1px solid #eef2f7; }
.res-when-title { font-weight: 900; color: #0f172a; }
.res-when-sub { font-size: 0.82rem; color: #94a3b8; margin-top: 0.15rem; }

.res-court { display: flex; gap: 0.75rem; align-items: center; }
.res-accent { width: 0.25rem; height: 2.4rem; border-radius: 999px; background: #cbd5e1; }
.res-accent-blue { background: #1d4ed8; }
.res-accent-amber { background: #b45309; }
.res-accent-violet { background: #7c3aed; }
.res-court-title { font-weight: 900; color: #0f172a; }
.res-court-sub { font-size: 0.68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; margin-top: 0.2rem; }

.res-client { display: flex; align-items: center; gap: 0.65rem; font-weight: 900; color: #0f172a; }
.res-client-badge {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0b2a5a;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}
.res-action {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  color: #0b2a5a;
}
.res-action:hover { background: #f8fafc; }

.tag-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.res-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-top: 1px solid #eef2f7;
  background: #fff;
}
.res-foot-left { color: #94a3b8; font-size: 0.85rem; font-weight: 700; }
.res-pager { display: flex; align-items: center; gap: 0.5rem; }
.page-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-weight: 900;
  color: #0b2a5a;
  cursor: pointer;
}
.page-btn.is-active { background: #0b2a5a; color: #fff; border-color: rgba(11, 42, 90, 0.15); }
.page-ellipsis { color: #94a3b8; font-weight: 900; padding: 0 0.25rem; }

@media (max-width: 980px) {
  .res-head { display: none; }
  .res-row { grid-template-columns: 1fr; gap: 0.6rem; }
  .res-row > * { padding: 0; }
}
