 :root {
  color-scheme: light;
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-2: #eef6ff;
  --text: #102033;
  --muted: #64748b;
  --line: #dbe8f6;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #dbeafe;
  --teal: #0f9f6e;
  --amber: #d97706;
  --rose: #dc2626;
  --violet: #7c3aed;
  --shadow: 0 18px 45px rgba(30, 64, 175, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  --sidebar: 280px;
  --topbar: 72px;
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 28rem),
    linear-gradient(180deg, var(--bg), #ffffff 48%, var(--bg));
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 30;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
}

.brand img,
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.brand h1,
.brand strong {
  display: block;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-group {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.nav-label {
  margin: 18px 10px 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: var(--radius);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.nav-link:hover {
  transform: translateX(2px);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.content-area {
  min-width: 0;
  display: grid;
  grid-template-rows: var(--topbar) minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar);
  padding: 0 28px;
  background: rgba(247, 251, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.topbar-left,
.topbar-actions,
.toolbar,
.cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-menu {
  display: none;
}

.page {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow,
.breadcrumb {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.18;
}

.page-subtitle {
  max-width: 66ch;
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.auto {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.stat-card,
.panel,
.table-wrap,
.empty-state {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(219, 232, 246, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.card,
.panel,
.empty-state {
  padding: 18px;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.glass {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
}

.stat-card .icon {
  width: 38px;
  height: 38px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius);
}

.stat-card strong {
  font-size: 1.85rem;
  line-height: 1;
}

.stat-card span,
.muted {
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-title h2,
.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card p,
.panel p {
  margin: 8px 0 0;
}

.btn,
.icon-btn,
.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  user-select: none;
}

.btn {
  padding: 0 14px;
}

.icon-btn {
  width: 40px;
  padding: 0;
  border-color: var(--line);
}

.btn.primary,
.fab {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

.btn.secondary {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.btn.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
}

.btn:hover,
.icon-btn:hover,
.fab:hover {
  transform: translateY(-1px);
}

.btn:active,
.icon-btn:active,
.fab:active {
  transform: translateY(0);
}

.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  z-index: 18;
}

.field,
.search-field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.input,
input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

textarea {
  min-height: 116px;
  resize: vertical;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, 220px));
  gap: 12px;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.green {
  background: #dcfce7;
  color: #166534;
}

.badge.amber {
  background: #fef3c7;
  color: #92400e;
}

.badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.badge.violet {
  background: #ede9fe;
  color: #5b21b6;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: #fff;
  font-weight: 850;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-row strong,
.person-row span {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
  z-index: 80;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(680px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-body {
  padding: 18px;
}

.modal h2 {
  margin: 0;
  font-size: 1.16rem;
}

  .search-results {
    display: grid;
    gap: 12px;
    margin-top: 18px;
  }

  .search-section h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--primary-strong);
  }

  .search-result {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: transform 160ms ease, border-color 160ms ease;
  }

  .search-result:hover {
    transform: translateY(-2px);
    border-color: var(--primary-soft);
  }

  .search-result strong {
    display: block;
    color: var(--text);
  }

  .search-result span,
  .search-result small {
    display: block;
    color: var(--muted);
  }

  .reveal-item {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 520ms ease, transform 520ms ease;
  }

  .reveal-item.is-revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .toast-stack {
    position: fixed;
    right: 18px;
    top: 88px;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
    z-index: 95;
  }

  .toast {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow);
  }

  .toast-content {
    display: block;
  }

  .toast-action {
    border: none;
    background: transparent;
    color: var(--primary-strong);
    font-weight: 700;
    cursor: pointer;
  }
.mini-calendar span {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.86rem;
}

.mini-calendar .is-today {
  background: var(--primary);
  color: #fff;
  font-weight: 850;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-cell {
  min-height: 108px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-cell.is-muted {
  opacity: 0.46;
}

.calendar-cell strong {
  display: block;
  margin-bottom: 8px;
}

.event-chip {
  display: block;
  margin: 4px 0;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 750;
}

.progress {
  height: 9px;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #38bdf8);
  border-radius: inherit;
}

.landing {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #0f172a;
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.16), transparent 22rem),
    radial-gradient(circle at 82% 25%, rgba(15, 159, 110, 0.12), transparent 18rem),
    linear-gradient(135deg, #f8fbff 0%, #e9f4ff 48%, #ffffff 100%);
}

.landing-bg-shape {
  position: absolute;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.shape-a {
  width: 120px;
  height: 120px;
  left: 8%;
  top: 18%;
  animation: float 6s ease-in-out infinite;
}

.shape-b {
  width: 84px;
  height: 84px;
  right: 12%;
  top: 16%;
  animation: float 7s ease-in-out infinite reverse;
}

.shape-c {
  width: 150px;
  height: 70px;
  right: 16%;
  bottom: 24%;
  animation: float 8s ease-in-out infinite;
}

.landing-nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 20px 0;
}

.landing-hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 28px;
  width: min(1180px, calc(100% - 44px));
  min-height: calc(100vh - 96px);
  margin: 0 auto;
  padding: 32px 0 126px;
}

.hero-copy {
  max-width: 680px;
}

.hello {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-strong);
  font-weight: 850;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-title span {
  color: var(--primary);
}

.hero-description {
  max-width: 56ch;
  margin: 20px 0 26px;
  color: #475569;
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.stats-preview .stat-card {
  min-height: 112px;
}

.portal-preview {
  position: relative;
  padding: 18px;
}

.preview-screen {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.preview-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.preview-line {
  height: 10px;
  border-radius: 999px;
  background: #c7d2fe;
}

.preview-line.wide {
  width: 68%;
}

.preview-line.short {
  width: 32%;
}

.preview-chart {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.8fr;
  align-items: end;
  gap: 12px;
  height: 190px;
}

.preview-chart span {
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, var(--primary), #38bdf8);
}

.preview-chart span:nth-child(1) {
  height: 56%;
}

.preview-chart span:nth-child(2) {
  height: 86%;
  background: linear-gradient(180deg, var(--teal), #67e8f9);
}

.preview-chart span:nth-child(3) {
  height: 42%;
  background: linear-gradient(180deg, var(--amber), #fde68a);
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 118px;
  background: var(--surface);
  clip-path: polygon(0 42%, 12% 50%, 24% 43%, 38% 56%, 52% 45%, 67% 53%, 82% 40%, 100% 52%, 100% 100%, 0 100%);
  z-index: 2;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 24px;
}

.login-card .brand {
  padding-left: 0;
}

.footer-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}
