:root {
  --ink: #122033;
  --muted: #6b7c8f;
  --line: #e4ebf2;
  --bg: #f3f6f9;
  --card: #ffffff;
  --brand: #0f6e56;
  --brand-2: #12805f;
  --brand-soft: #e7f5f0;
  --accent: #b6f56e;
  --rail: #14181f;
  --rail-2: #1c222c;
  --danger: #b42318;
  --shadow: 0 18px 40px rgba(18, 32, 51, 0.08);
  --radius: 18px;
  --rail-w: 92px;
  --font: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-body {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #171c24 0%, #10141a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  z-index: 40;
  overflow: hidden;
  transition: width .25s ease;
}

.side-brand {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent);
  color: #102016;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 10px 24px rgba(182, 245, 110, .25);
  margin-bottom: 28px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
  flex: 1;
}

.side-link {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: rgba(255,255,255,.78);
  display: grid;
  place-items: center;
  position: relative;
  transition: .18s ease;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.side-link i { font-size: 1.25rem; line-height: 1; }
.side-link span,
.side-soon { display: none; }
.side-link:hover,
.side-link.is-active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.side-link.is-active {
  background: rgba(182, 245, 110, .16);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(182, 245, 110, .25);
}
.side-link.is-soon { opacity: .55; }
.side-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.side-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.side-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2a3340;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .85rem;
  border: 2px solid rgba(255,255,255,.08);
  text-decoration: none;
}
.side-avatar:hover {
  color: #fff;
  border-color: rgba(182, 245, 110, .55);
}
.side-fab {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #122016;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 10px 20px rgba(182, 245, 110, .28);
}
.side-logout { margin: 0; width: auto; }

.app-main { min-width: 0; }
.top-strip {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px 28px 8px;
}
.top-kicker {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.top-title {
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -.03em;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.company-chip, .user-chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.company-chip { font-weight: 600; }
.user-chip {
  flex-direction: column;
  align-items: flex-start;
  border-radius: 16px;
  gap: 0;
  line-height: 1.2;
}
.user-chip small { color: var(--muted); }

.content-wrap {
  padding: 12px 28px 36px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card, .panel-card, .pricing-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-card { padding: 18px 18px 16px; }
.stat-card .label { color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat-card .value {
  margin-top: 8px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.stat-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.panel-card { padding: 20px; }
.panel-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 4px;
}
.muted { color: var(--muted); }

.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-modern th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.table-modern td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table-modern tr:last-child td { border-bottom: 0; }
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .78rem;
  font-weight: 700;
}
.badge-soft.is-off {
  background: #f4f4f5;
  color: #71717a;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.search-box {
  position: relative;
  min-width: min(360px, 100%);
}
.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 12px 40px;
  background: #fff;
}
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  padding: .7rem 1rem;
}
.btn-brand:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
}

/* Pricing */
.pricing-shell {
  padding: 28px 24px 32px;
  background:
    radial-gradient(circle at top right, rgba(15,110,86,.08), transparent 30%),
    #fff;
}
.pricing-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 28px;
}
.pricing-head h2 {
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  margin-bottom: 8px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.promo-card {
  background: linear-gradient(160deg, #0f6e56 0%, #0a4d3c 100%);
  color: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.promo-card h3 {
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.promo-card p { color: rgba(255,255,255,.86); max-width: 16rem; }
.promo-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  display: grid;
  place-items: center;
  margin-top: 18px;
  color: #fff;
}
.promo-art {
  margin-top: auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(182,245,110,.45), transparent 45%),
    rgba(255,255,255,.12);
  border: 4px solid rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.plan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(18,32,51,.04);
  position: relative;
}
.plan-card.is-featured {
  border-color: rgba(15,110,86,.35);
  box-shadow: 0 18px 40px rgba(15,110,86,.12);
}
.plan-card .featured-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: #16301f;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #f4f7fa;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 14px;
}
.plan-card h3 {
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -.02em;
}
.plan-card .what {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 14px;
}
.plan-feats {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
  flex: 1;
}
.plan-feats li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .92rem;
}
.plan-feats i { color: var(--ink); margin-top: 2px; }
.plan-price-row {
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.plan-price {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.plan-price small {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 600;
}
.btn-choose {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  padding: 12px 14px;
}
.btn-choose:hover { background: var(--brand-2); color: #fff; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(15,110,86,.14), transparent 35%),
    linear-gradient(180deg, #eef3f1, var(--bg));
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-weight: 800; letter-spacing: -.03em; }
.alert-soft {
  background: #fef3f2;
  color: var(--danger);
  border: 1px solid #fecdca;
  border-radius: 12px;
  padding: 12px 14px;
}

.pagination .page-link {
  border-radius: 10px !important;
  margin: 0 3px;
  color: var(--ink);
  border-color: var(--line);
}
.pagination .page-item.active .page-link {
  background: var(--brand);
  border-color: var(--brand);
}

@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .promo-card { grid-column: 1 / -1; min-height: 240px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .app-body { grid-template-columns: 1fr; }
  .side-rail {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 72px;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px 8px;
  }
  .side-brand, .side-bottom .side-avatar, .side-logout, .side-fab { display: none; }
  .side-nav {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
  }
  .app-main { padding-bottom: 84px; }
  .top-strip, .content-wrap { padding-left: 16px; padding-right: 16px; }
  .pricing-grid, .stat-grid { grid-template-columns: 1fr; }
  .user-chip { display: none; }
}
