:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef3f9;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --border: #dbe4ee;
  --border-strong: #c8d4e3;
  --primary: #0f172a;
  --primary-2: #1e293b;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --sidebar-width: 280px;
  --topbar-height: 78px;
  --container: 1440px;
  --font-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.05), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, #0f172a 0%, #162033 100%);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.brand__subtitle {
  margin-top: 2px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.68);
}

.nav-section {
  margin-top: 26px;
}

.nav-section__label {
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(244, 247, 251, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200, 212, 227, 0.7);
}

.topbar__title h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.topbar__title p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.45;
}

.hero::before {
  width: 240px;
  height: 240px;
  right: -40px;
  top: -40px;
  background: rgba(37, 99, 235, 0.4);
}

.hero::after {
  width: 180px;
  height: 180px;
  left: 35%;
  bottom: -50px;
  background: rgba(255, 255, 255, 0.08);
}

.hero__content,
.hero__stats {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h2 {
  margin: 18px 0 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero__stats {
  display: grid;
  gap: 14px;
  align-content: center;
}

.glass-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.glass-card__label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.glass-card__value {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
}

.glass-card__meta {
  margin-top: 4px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.grid {
  display: grid;
  gap: 22px;
}

.grid--stats {
  margin-top: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--main {
  margin-top: 24px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(219, 228, 238, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card--soft {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}

.card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card__desc {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.card__body {
  padding: 24px;
}

.stat-card {
  padding: 22px;
}

.stat-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stat-card__label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.stat-card__value {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-card__note {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--primary);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 700;
  transition: 0.2s ease;
}

.button--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.button--primary:hover {
  background: var(--primary-2);
}

.button--accent {
  background: var(--accent);
  color: #fff;
}

.button--accent:hover {
  background: var(--accent-2);
}

.button--outline {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.button--outline:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.button--ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: transparent;
}

.button--full {
  width: 100%;
}

.button--sm {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge--neutral {
  background: #eef3f9;
  color: #334155;
}

.badge--success {
  background: #eaf7ee;
  color: #166534;
}

.badge--warning {
  background: #fff4e8;
  color: #b45309;
}

.badge--danger {
  background: #feeeee;
  color: #b91c1c;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-action {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.quick-action__icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
}

.quick-action__title {
  margin-top: 14px;
  font-weight: 800;
}

.quick-action__meta {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.list {
  display: grid;
  gap: 14px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.list-item__title {
  font-weight: 800;
}

.list-item__meta,
.list-item__sub {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.stack {
  display: grid;
  gap: 16px;
}

.schedule-item {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.schedule-item__time {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.schedule-item__title {
  margin-top: 8px;
  font-weight: 800;
}

.schedule-item__desc {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.65;
}

.progress-list {
  display: grid;
  gap: 18px;
}

.progress-row__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.93rem;
}

.progress-row__label {
  font-weight: 700;
  color: var(--text-soft);
}

.progress-row__value {
  color: var(--text-muted);
}

.progress {
  position: relative;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e8eef6;
}

.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.snapshot {
  display: grid;
  gap: 12px;
}

.snapshot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.snapshot-item__label {
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 600;
}

.snapshot-item__value {
  font-weight: 800;
  font-size: 1.1rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}

.table th,
.table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table td {
  color: var(--text);
  font-size: 0.95rem;
}

.table .text-right {
  text-align: right;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-soft);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.searchbar {
  position: relative;
}

.searchbar .input {
  padding-left: 44px;
}

.searchbar__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.empty-state {
  padding: 42px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.empty-state__title {
  margin-top: 12px;
  font-size: 1.08rem;
  font-weight: 800;
}

.empty-state__text {
  margin: 8px auto 0;
  max-width: 560px;
  color: var(--text-muted);
  line-height: 1.7;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.kpi__label {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.kpi__value {
  margin-top: 8px;
  font-size: 1.45rem;
  font-weight: 800;
}

.footer-note {
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.hide-desktop {
  display: none;
}

@media (max-width: 1280px) {
  .grid--stats,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--main,
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .hide-desktop {
    display: inline-flex;
  }

  .page-wrap,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .grid--stats,
  .quick-actions,
  .kpi-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-wrap {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .hero,
  .card__body,
  .card__header,
  .stat-card,
  .list-item,
  .schedule-item {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .section-header,
  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero__buttons,
  .topbar__actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .glass-card__value,
  .stat-card__value {
    font-size: 1.7rem;
  }
}