html, body {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(36, 102, 181, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(10, 120, 210, 0.1), transparent 24%),
    linear-gradient(180deg, #f3f7fc 0%, #eef4fb 45%, #f8fafc 100%);
  color: #163152;
}

a { color: var(--brand); }
a:hover { color: color-mix(in srgb, var(--brand) 85%, #000); }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 96%, #0d2c53) 0%, color-mix(in srgb, var(--brand) 82%, #0f4da1) 60%, #1c77d2 100%);
  box-shadow: 0 12px 28px rgba(20, 49, 86, 0.18);
}

.navbar {
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: rgba(255,255,255,.95);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

.brand-title {
  display: block;
  color: #fff;
  letter-spacing: .04em;
  font-size: 1.2rem;
  line-height: 1.05;
}

.brand-subtitle {
  display: block;
  color: rgba(255,255,255,.82);
  font-size: .88rem;
}

.navbar-toggler {
  border-color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
}

.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255,255,255,.2); }
.navbar-toggler-icon { filter: invert(1) brightness(200%); }

.app-nav-links .nav-link {
  color: rgba(255,255,255,.88);
  font-weight: 500;
  border-radius: 999px;
  padding: .5rem .9rem;
}

.app-nav-links .nav-link:hover,
.app-nav-links .nav-link:focus {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.user-menu,
.app-topbar .btn-light,
.app-topbar .btn-outline-light {
  border-radius: 999px;
}

.user-menu {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.12);
  color: #fff;
}

.user-menu:hover,
.user-menu:focus {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.user-menu-name { font-weight: 600; }
.app-main { padding-bottom: 4rem; }

.alerts-stack { max-width: 1100px; margin: 0 auto 1rem auto; }

.hero-panel,
.page-header {
  max-width: 1100px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(20, 88, 173, .08);
  color: var(--brand);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.hero-title,
.page-title {
  font-size: clamp(1.75rem, 1.3rem + 1.3vw, 2.35rem);
  font-weight: 800;
  color: #0f274a;
  margin-bottom: .35rem;
}

.hero-subtitle,
.page-subtitle {
  color: #58708f;
  max-width: 760px;
  font-size: 1rem;
}

.surface-card,
.card {
  border-radius: 1.15rem;
}

.surface-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(202,214,232,.65);
  box-shadow: 0 18px 32px rgba(31, 61, 106, .08);
}

.btn {
  border-radius: .85rem;
  min-height: 42px;
  font-weight: 600;
}

.btn-sm {
  min-height: 36px;
  border-radius: .75rem;
}

.btn-brand {
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 72%, #1f7be3) 100%);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 10px 18px rgba(49, 91, 125, .22);
}

.btn-brand:hover,
.btn-brand:focus {
  filter: brightness(.97);
  color: #fff;
}

.metric-card {
  display: block;
  height: 100%;
  padding: 1.15rem;
  border-radius: 1.1rem;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(201, 214, 231, .95);
  box-shadow: 0 16px 28px rgba(31, 61, 106, .08);
}

.metric-card-link {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.metric-card-link:hover,
.metric-card-link:focus {
  transform: translateY(-2px);
  border-color: rgba(23, 97, 182, .5);
  box-shadow: 0 24px 36px rgba(31, 61, 106, .13);
}

.metric-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6c7f99;
  margin-bottom: .35rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: #0f274a;
}

.metric-action {
  margin-top: .5rem;
  font-size: .82rem;
  color: #58708f;
}

.info-card {
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248,251,255,.98), #fff);
  border: 1px solid rgba(208,219,236,.75);
  padding: 1rem 1.1rem;
}

.info-label {
  color: #667b96;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.info-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f274a;
}

.pill-info {
  display: inline-flex;
  align-items: center;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(20, 88, 173, .09);
  color: var(--brand);
  font-weight: 700;
}

.assignment-card,
.slot-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(207, 219, 235, .9);
  border-radius: 1rem;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.assignment-card:hover,
.slot-card:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 98, 183, .45);
  box-shadow: 0 18px 28px rgba(31, 61, 106, .11);
}

.slot-card {
  padding: 1rem 1.1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-size: .82rem;
  font-weight: 700;
}

.status-complete { background: #dcfce7; color: #166534; }
.status-incomplete { background: #fff7ed; color: #9a3412; }
.status-excess { background: #fee2e2; color: #991b1b; }
.status-conflict { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }

.table-modern thead th,
.table thead th {
  background: #f3f7fd;
  color: #355271;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom-width: 1px;
}

.table-modern tbody td,
.table tbody td,
.table tbody th {
  vertical-align: middle;
}

.table-modern tbody tr:hover { background: rgba(244, 248, 253, .78); }

.empty-state {
  padding: 2rem;
  border: 1px dashed rgba(149, 171, 200, .8);
  border-radius: 1rem;
  color: #667085;
  text-align: center;
  background: rgba(255,255,255,.65);
}

.back-link {
  display: inline-block;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.form-control,
.form-select {
  border-radius: .85rem;
  border-color: #d4deeb;
  min-height: 44px;
}

textarea.form-control { min-height: 120px; }

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
  box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--brand) 22%, transparent);
  border-color: color-mix(in srgb, var(--brand) 60%, white);
}

.lookup-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 12%, white);
  color: var(--brand);
  font-size: 2.2rem;
  font-weight: 700;
}

.public-lookup-shell { max-width: 1120px; }
.public-lookup-shell .card { border: 0; box-shadow: 0 18px 30px rgba(31, 61, 106, .08); }
.public-lookup-shell .list-group-item form,
.public-lookup-shell form.list-group-item { margin: 0; }

.schedule-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.excel-sheet-header,
.print-sheet {
  background: #fff;
  border: 1px solid #c6d4e5;
  border-radius: .4rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.sheet-eyebrow {
  color: #496785;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 700;
}

.sheet-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .85rem;
}

.sheet-title-row h3 {
  margin: 0;
  font-size: 1.1rem;
}

.sheet-meta {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: #47627f;
}

.print-grid {
  border-collapse: collapse;
}

.print-grid th,
.print-grid td {
  border: 1px solid #cbd7e6 !important;
  padding: .55rem .6rem !important;
  font-size: .92rem;
}

.print-grid thead th {
  background: #eaf1fa !important;
}

code { word-break: break-all; }

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(10, 31, 60, .24);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: .75rem;
  }
  .app-nav-links .nav-link { padding-left: .8rem; }
}

@media (max-width: 575.98px) {
  .metric-value { font-size: 1.5rem; }
  .table-responsive { font-size: .92rem; }
  .sheet-title-row,
  .schedule-line { flex-direction: column; }
  .brand-title { font-size: 1rem; }
  .brand-subtitle { font-size: .78rem; }
}

@media print {
  html, body { background: #fff !important; }
  .no-print, .navbar, .app-topbar { display: none !important; }
  .app-main { padding: 0 !important; max-width: none !important; }
  .excel-sheet-header, .print-sheet {
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-inside: avoid;
  }
  .print-sheet { break-inside: avoid; }
  .sheet-title-row { align-items: flex-start; }
  a { color: inherit; text-decoration: none; }
}

.current-event-picker .form-select {
  min-width: min(340px, 42vw);
  min-height: 36px;
  background-color: rgba(255,255,255,.96);
}

.table-current-event > * {
  background: color-mix(in srgb, var(--brand) 7%, white) !important;
}

.event-status {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.event-status-planning { background: #fef3c7; color: #92400e; }
.event-status-active { background: #dcfce7; color: #166534; }
.event-status-closed { background: #e5e7eb; color: #374151; }
.event-status-archived { background: #e2e8f0; color: #475569; }

.wizard-steps {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}

.wizard-step {
  border-radius: 999px;
  padding: .5rem .85rem;
  background: #e9eff7;
  color: #61758f;
  font-weight: 700;
  font-size: .85rem;
}

.wizard-step.active { background: var(--brand); color: #fff; }
.wizard-step.complete { background: #dcfce7; color: #166534; }

@media (max-width: 1199.98px) {
  .current-event-picker { width: 100%; }
  .current-event-picker .form-select { min-width: 0; width: 100%; }
}
