:root {
  --shadow-soft: 0 18px 45px rgba(21, 21, 21, .07);
  --shadow-card: 0 10px 30px rgba(21, 21, 21, .045);
  --radius-lg: 24px;
  --radius-md: 16px;
  --surface: rgba(255, 255, 255, .88);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(200, 242, 107, .22), transparent 34rem),
    linear-gradient(180deg, #fbfcf8 0%, #f1f3ee 100%);
  -webkit-font-smoothing: antialiased;
}

.sidebar {
  width: 256px;
  padding: 26px 18px;
  background:
    radial-gradient(circle at 30% 0%, rgba(200, 242, 107, .12), transparent 15rem),
    #11130f;
  box-shadow: 18px 0 50px rgba(21, 21, 21, .12);
  overflow-y: auto;
}

.brand {
  padding-bottom: 26px;
}

.brand-mark {
  box-shadow: 0 10px 24px rgba(200, 242, 107, .18);
}

.nav-section-label {
  margin: 14px 8px 7px;
  color: rgba(255, 255, 255, .38);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.nav-section-label:first-child {
  margin-top: 0;
}

.nav {
  min-height: 42px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, .62);
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.nav:hover {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .08);
  transform: translateX(2px);
}

.nav.active {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 3px 0 var(--lime), 0 10px 26px rgba(0, 0, 0, .18);
}

.nav span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
}

.nav.active span {
  background: var(--lime);
  color: var(--ink);
}

.sidebar-foot {
  position: sticky;
  bottom: 0;
  margin: 24px -4px 0;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(10px);
}

main {
  margin-left: 256px;
  padding: 0 clamp(22px, 3vw, 44px) 56px;
}

header {
  position: sticky;
  top: 0;
  z-index: 4;
  height: auto;
  min-height: 88px;
  margin: 0 -8px 28px;
  padding: 18px 8px;
  border-bottom: 1px solid rgba(229, 232, 225, .82);
  background: rgba(247, 248, 245, .86);
  backdrop-filter: blur(16px);
}

header h1 {
  font-size: clamp(24px, 2.2vw, 34px);
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.header-actions select,
.header-actions #sync-state,
.logout-button,
.avatar {
  box-shadow: var(--shadow-card);
}

.header-actions select {
  max-width: 260px;
  min-height: 38px;
  background: #fff;
}

#sync-state {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
  color: #596057;
  font-weight: 850;
}

.view.active {
  animation: karawiFadeIn .18s ease-out;
}

@keyframes karawiFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.hero-card,
.panel,
.metrics article,
.driver-card,
.restaurant-metric,
.verification-metric {
  box-shadow: var(--shadow-card);
}

.hero-card {
  min-height: 214px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-card h2 {
  font-size: clamp(36px, 5vw, 56px);
}

.hero-number span {
  font-size: clamp(58px, 7vw, 88px);
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.metrics article {
  min-height: 122px;
  border-radius: var(--radius-md);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.metrics article:hover,
.panel:hover {
  border-color: #d8ddd2;
}

.metrics article:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.grid-two {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 18px;
}

.panel {
  border-radius: var(--radius-md);
  background: var(--surface);
}

.panel-head {
  gap: 14px;
}

.panel-head h3 {
  font-size: 18px;
}

.section-heading {
  gap: 18px;
  align-items: center;
}

.section-heading h2 {
  font-size: clamp(31px, 4vw, 46px);
}

.section-heading p:not(.kicker) {
  max-width: 780px;
  line-height: 1.55;
}

.map-card {
  height: clamp(300px, 39vh, 520px);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.form-panel {
  padding: 24px;
}

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

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

label {
  line-height: 1.35;
}

label small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
}

input,
select,
textarea {
  min-height: 42px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(100, 138, 25, .12);
}

.primary,
.secondary,
.logout-button,
.text-button {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.primary:hover,
.secondary:hover,
.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.launch-controls {
  margin-top: 18px;
  border-color: rgba(100, 138, 25, .24);
  background:
    linear-gradient(180deg, rgba(237, 247, 216, .44), rgba(255, 255, 255, .9));
}

.launch-controls .form-grid {
  gap: 12px;
}

.launch-controls label {
  min-height: 112px;
  padding: 13px;
  border: 1px solid rgba(229, 232, 225, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}

.pricing-lower,
.driver-incentive-panel,
.payment-panel,
.payout-panel,
.driver-plan-panel,
.employee-directory,
.employee-invitations,
.employee-audit,
.plan-history-panel {
  margin-top: 18px;
}

.incentive-list {
  margin-top: 16px;
}

.incentive-item {
  align-items: flex-start;
}

.incentive-main {
  flex: 1;
  min-width: 0;
}

.incentive-main strong {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.incentive-edit-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(229, 232, 225, .92);
  border-radius: 14px;
  background: rgba(250, 251, 248, .86);
}

.incentive-edit-grid label {
  font-size: 9px;
}

.incentive-edit-grid label.wide {
  grid-column: 1 / -1;
}

.archived-row {
  opacity: .62;
}

.table-panel {
  border-radius: var(--radius-md);
}

table {
  min-width: 780px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  vertical-align: middle;
}

tbody tr {
  transition: background .15s ease;
}

tbody tr:hover {
  background: #fbfcf7;
}

td small {
  color: var(--muted);
  line-height: 1.45;
}

.status-chip {
  letter-spacing: .45px;
}

.support-results,
.driver-grid,
.verification-list,
#employee-list,
.support-case-list {
  gap: 16px;
}

.employee-summary {
  grid-template-columns: minmax(210px, 1.4fr) repeat(4, minmax(120px, .72fr));
}

.employee-card,
.support-case,
.driver-card {
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-card);
}

.restaurant-directory,
.verification-directory,
.payout-panel {
  box-shadow: var(--shadow-card);
}

.restaurant-toolbar,
.support-case-form,
.permission-editor,
.employee-controls {
  background: rgba(250, 251, 248, .86);
}

.save-message {
  z-index: 30;
  box-shadow: 0 20px 55px rgba(21, 21, 21, .22);
}

@media (max-width: 1180px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 950px) {
  .sidebar {
    width: 88px;
  }

  .nav-section-label {
    display: none;
  }

  main {
    margin-left: 88px;
  }
}

@media (max-width: 760px) {
  main {
    padding: 0 16px 40px;
  }

  header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .header-actions select,
  #sync-state {
    max-width: none;
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card {
    padding: 28px;
  }

  .employee-summary {
    grid-template-columns: 1fr;
  }
}
