:root {
  --brand-red: #c62828;
  --brand-red-dark: #8e1f1f;
  --brand-navy: #0f172a;
  --brand-slate: #475569;
  --brand-bg: #f4f6fb;
  --card-radius: 22px;
  --soft-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --soft-border: 1px solid rgba(15, 23, 42, 0.06);
}

html, body { min-height: 100%; }
body {
  background: linear-gradient(180deg, #f8fafc 0%, #f4f6fb 100%);
  color: var(--brand-navy);
  font-size: 0.95rem;
}

a { text-decoration: none; }

.main-shell {
  max-width: 1560px;
  margin: 0 auto;
}

.topbar {
  background: linear-gradient(90deg, var(--brand-red-dark) 0%, var(--brand-red) 45%, #ef4444 100%);
  box-shadow: 0 10px 30px rgba(198, 40, 40, 0.22);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
}

.brand-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: .76rem;
  opacity: .82;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,.86);
  font-weight: 600;
  border-radius: 12px;
  padding: .72rem .9rem;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.14);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: .5rem .7rem .5rem .5rem;
}

.avatar-chip {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.16);
  font-weight: 800;
  color: #fff;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0;
}

.page-subtitle {
  color: #64748b;
  margin: .3rem 0 0;
}

.section-card,
.card-soft,
.stat-card,
.filter-box,
.hero-panel,
.login-card,
.surface-card {
  border: var(--soft-border);
  border-radius: var(--card-radius);
  box-shadow: var(--soft-shadow);
  background: #fff;
}

.card-soft .card-header,
.surface-card .card-header {
  background: transparent;
  border: 0;
  padding: 1.35rem 1.4rem 0;
}

.card-soft .card-body,
.surface-card .card-body {
  padding: 1.35rem 1.4rem 1.45rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 56%, #fff 100%);
}

.hero-panel:before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(239,68,68,.18) 0%, rgba(239,68,68,0) 70%);
}

.hero-panel:after {
  content: "";
  position: absolute;
  left: -70px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(15,23,42,.08) 0%, rgba(15,23,42,0) 70%);
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card .kpi-label {
  color: #64748b;
  font-size: .86rem;
  font-weight: 600;
}

.kpi-card .kpi-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  margin-top: .45rem;
}

.kpi-card .kpi-foot {
  margin-top: .7rem;
  color: #64748b;
  font-size: .84rem;
}

.kpi-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 800;
}

.kpi-red { background: rgba(198, 40, 40, 0.1); color: var(--brand-red); }
.kpi-blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.kpi-amber { background: rgba(245, 158, 11, 0.13); color: #d97706; }
.kpi-green { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.kpi-slate { background: rgba(71, 85, 105, 0.12); color: #334155; }

.filter-box {
  padding: 1rem 1.1rem;
}

.filter-title {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: .75rem;
}

.table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 18px;
  overflow: hidden;
}

.table { margin-bottom: 0; }
.table thead th {
  white-space: nowrap;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.table td, .table th { padding: .92rem .92rem; vertical-align: middle; }
.table tbody tr:hover { background: #fff7f7; }

.form-control, .form-select, .form-control:focus, .form-select:focus {
  border-radius: 14px;
}
.form-control, .form-select {
  border-color: rgba(15, 23, 42, 0.12);
  padding: .78rem .92rem;
  box-shadow: none;
}
.form-control:focus, .form-select:focus {
  border-color: rgba(198, 40, 40, .35);
  box-shadow: 0 0 0 .2rem rgba(198, 40, 40, .08);
}

.btn {
  border-radius: 14px;
  font-weight: 700;
  padding: .72rem 1rem;
}
.btn-primary {
  background: linear-gradient(90deg, var(--brand-red-dark) 0%, var(--brand-red) 100%);
  border-color: transparent;
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(90deg, #7f1d1d 0%, #b91c1c 100%);
  border-color: transparent;
}
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-warning,
.btn-success,
.btn-light {
  font-weight: 700;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .42rem .7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
}
.badge-red { background: rgba(198, 40, 40, .12); color: var(--brand-red); }
.badge-green { background: rgba(22, 163, 74, .12); color: #15803d; }
.badge-blue { background: rgba(37, 99, 235, .12); color: #2563eb; }
.badge-amber { background: rgba(245, 158, 11, .15); color: #b45309; }
.badge-slate { background: rgba(71, 85, 105, .12); color: #475569; }

.section-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}
.section-note {
  color: #64748b;
  font-size: .9rem;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1.15rem;
}
.info-item {
  background: #f8fafc;
  border-radius: 16px;
  padding: .9rem 1rem;
}
.info-label {
  color: #64748b;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .28rem;
}
.info-value {
  font-weight: 700;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background:
    linear-gradient(120deg, rgba(15,23,42,.82), rgba(15,23,42,.65)),
    linear-gradient(135deg, #7f1d1d 0%, #b91c1c 45%, #111827 100%);
}

.login-showcase {
  color: #fff;
  padding: 3rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-showcase:before,
.login-showcase:after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.login-showcase:before { width: 260px; height: 260px; right: -40px; top: -30px; }
.login-showcase:after { width: 220px; height: 220px; left: -40px; bottom: -60px; }

.login-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.login-showcase h1 {
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 1rem;
  max-width: 680px;
}

.login-showcase p {
  color: rgba(255,255,255,.84);
  max-width: 640px;
  font-size: 1rem;
}

.login-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
  max-width: 700px;
}

.login-point {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}
.login-point strong { display:block; margin-bottom:.35rem; }

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 470px;
  overflow: hidden;
}

.login-card .card-body { padding: 2.2rem 2rem; }

.login-brand {
  display:flex; align-items:center; gap:.85rem; margin-bottom:1.2rem;
}
.login-brand-badge {
  width: 52px; height: 52px; border-radius: 16px; display:grid; place-items:center;
  background: linear-gradient(135deg, var(--brand-red-dark), var(--brand-red)); color:#fff; font-weight:800; font-size:1.1rem;
}
.login-note {
  padding: .9rem 1rem;
  border-radius: 16px;
  background: #f8fafc;
  color: #475569;
  font-size: .88rem;
}

.list-clean { list-style: none; padding-left: 0; margin-bottom: 0; }
.list-clean li + li { margin-top: .35rem; }

@media (max-width: 991.98px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-showcase { padding: 2rem 1.5rem; }
  .login-panel { padding: 1rem 1rem 2rem; }
  .login-points { grid-template-columns: 1fr; }
  .info-list { grid-template-columns: 1fr; }
}

@media print {
  .no-print, .navbar, .btn, form, .alert, .user-chip { display:none !important; }
  body { background:#fff; }
  .container-fluid { padding:0 !important; }
  .card-soft, .stat-card, .filter-box, .hero-panel, .surface-card {
    box-shadow:none !important;
    border:1px solid #ddd !important;
  }
  .table-wrap { border:1px solid #ddd !important; }
}
