:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --ink: #052e16;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f7fbf8;
  --bg: #ffffff;
  --card: #ffffff;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --sky-soft: #e0f2fe;
  --sky: #0284c7;
  --ring: rgba(22, 163, 74, 0.28);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(5, 46, 22, 0.08);
  --shadow-lg: 0 24px 64px rgba(5, 46, 22, 0.14);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page { flex: 1 0 auto; width: 100%; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 22px; }

img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-800); }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 10px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
}
.brand__icon svg { width: 20px; height: 20px; }
.brand__name { font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 14px; }
.nav__link { font-weight: 600; font-size: 14px; color: var(--text); padding: 8px 4px; position: relative; }
.nav__link.is-active { color: var(--green-700); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  left: 4px; right: 4px; bottom: 2px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
}
.nav__user {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}
.btn--primary:hover { color: #fff; box-shadow: 0 12px 26px rgba(22, 163, 74, 0.38); transform: translateY(-1px); }
.btn--ghost {
  color: var(--green-700);
  background: #fff;
  border-color: var(--green-200);
}
.btn--ghost:hover { border-color: var(--green-500); background: var(--green-50); color: var(--green-800); }
.btn--danger { color: #fff; background: var(--danger); }
.btn--white { color: var(--green-800); background: #fff; }
.btn--white:hover { color: var(--green-900); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18); transform: translateY(-1px); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--block { width: 100%; }
.btn__plus { font-size: 18px; font-weight: 800; line-height: 1; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(34, 197, 94, 0.14), transparent 60%),
    radial-gradient(700px 420px at 0% 110%, rgba(34, 197, 94, 0.1), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--green-50));
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 72px 22px 84px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-800);
  background: var(--green-100);
  border: 1px solid var(--green-200);
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 20px;
}
.hero__badge svg { width: 15px; height: 15px; color: var(--green-600); }

.hero__title { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; line-height: 1.12; color: var(--ink); letter-spacing: -0.02em; }
.hero__accent { background: linear-gradient(120deg, var(--green-600), var(--green-800)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__text { margin: 20px 0 28px; font-size: 17px; color: var(--muted); max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__points { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; color: var(--text); font-size: 14px; font-weight: 600; }

/* phone art */
.hero__art { position: relative; display: flex; justify-content: center; }
.phone {
  width: 290px;
  background: var(--ink);
  border-radius: 34px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 2;
}
.phone__bar { height: 18px; }
.phone__screen { background: #0b2417; border-radius: 26px; padding: 16px; }
.phone__status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #86efac; font-weight: 600; margin-bottom: 14px; }
.phone__status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25); }
.phone__shield { width: 58px; height: 58px; margin: 0 auto 16px; color: var(--green-500); }
.phone__shield svg { width: 100%; height: 100%; }
.phone__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #122e20;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #d9e9de;
}
.phone__row b { color: #86efac; font-weight: 700; font-size: 12px; }
.phone__row b.bad { color: #fca5a5; }
.phone__row--bad { opacity: 0.75; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.5; z-index: 1; }
.hero__blob--one { width: 180px; height: 180px; background: rgba(34, 197, 94, 0.5); top: -30px; right: 10%; }
.hero__blob--two { width: 130px; height: 130px; background: rgba(134, 239, 172, 0.6); bottom: -20px; left: 0; }

/* ---------- Sections ---------- */
.features { padding: 78px 0 64px; }
.how { padding: 64px 0 80px; background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.sec-head__title { font-size: clamp(24px, 3vw, 36px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.sec-head__sub { margin-top: 12px; color: var(--muted); font-size: 16px; }

.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.feature { padding: 26px 24px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--green-700);
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  border: 1px solid var(--green-200);
  margin-bottom: 16px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; }
.step { padding: 28px 26px; text-align: center; position: relative; }
.step__num {
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800; color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.32);
}
.step h3 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); }

.cta {
  padding: 74px 0;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
}
.cta__inner { text-align: center; }
.cta__title { font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.cta__text { margin: 12px 0 26px; color: #d1fae5; font-size: 16px; }

/* ---------- Auth ---------- */
.page--auth { background: radial-gradient(700px 420px at 100% 0%, rgba(34, 197, 94, 0.12), transparent 60%), var(--green-50); }
.auth { display: flex; justify-content: center; align-items: flex-start; padding: 56px 22px 72px; }
.auth__card { width: 100%; max-width: 460px; padding: 34px 34px 30px; }
.auth__head { text-align: center; margin-bottom: 26px; }
.auth__icon {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.32);
}
.auth__icon svg { width: 26px; height: 26px; }
.auth__head h1 { font-size: 24px; font-weight: 800; color: var(--ink); }
.auth__head p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.auth__alt { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.field input[type='text'],
.field input[type='email'],
.field input[type='password'],
.field input[type='url'] {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px var(--ring);
}
.field input::placeholder { color: #94a3b8; }
.field__error { color: var(--danger); font-size: 12.5px; margin-top: 6px; font-weight: 500; }

.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); margin: 4px 0 20px; cursor: pointer; }
.check input { accent-color: var(--green-600); width: 17px; height: 17px; }

.alert { border-radius: var(--radius-sm); padding: 13px 15px; font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.alert--error { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }

/* ---------- Dashboard ---------- */
.page--dash { background: radial-gradient(900px 400px at 100% 0%, rgba(34, 197, 94, 0.1), transparent 55%), #fff; }

.dash-head { padding: 40px 0 10px; }
.dash-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dash-head__title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.dash-head__sub { color: var(--muted); font-size: 15px; margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; }
.stat { display: flex; align-items: center; gap: 16px; padding: 22px; }
.stat__icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0; }
.stat__icon svg { width: 24px; height: 24px; }
.stat__icon--green { color: var(--green-700); background: var(--green-100); }
.stat__icon--sky { color: var(--sky); background: var(--sky-soft); }
.stat__icon--red { color: var(--danger); background: var(--danger-soft); }
.stat__label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stat__value { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.stat__hint { font-size: 12px; color: var(--muted); }

.panel { padding: 26px; margin-bottom: 26px; scroll-margin-top: 90px; }
.panel__head { margin-bottom: 18px; }
.panel__title { font-size: 19px; font-weight: 800; color: var(--ink); }
.panel__sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.panel__form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.field--grow { flex: 1 1 380px; margin-bottom: 0; }
.panel--fresh { border-color: var(--green-300); background: linear-gradient(180deg, var(--green-50), #fff); }

.freshlink { display: flex; gap: 12px; flex-wrap: wrap; }
.freshlink__input {
  flex: 1 1 320px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--green-800);
  background: #fff;
  border: 1.5px solid var(--green-300);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  outline: none;
}

.empty { text-align: center; padding: 40px 20px; }
.empty__icon { font-size: 42px; }
.empty__title { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 10px; }
.empty__text { font-size: 14px; color: var(--muted); margin-top: 6px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.table tbody td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--green-50); }
.table tbody tr.is-new { background: var(--green-100); border-left: 4px solid var(--green-500); }
.table__dest-text {
  display: inline-block;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: var(--text);
  font-weight: 500;
}
.table__code {
  font-family: 'Consolas', 'SFMono-Regular', Menlo, monospace;
  font-size: 12.5px;
  color: var(--green-800);
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: 7px;
  padding: 3px 8px;
}
.table__actions { width: 150px; }

.row-actions { display: flex; align-items: center; gap: 6px; }
.inline-form { display: inline; margin: 0; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.icon-btn:hover { color: var(--green-700); border-color: var(--green-400); background: var(--green-50); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn--danger:hover { color: var(--danger); border-color: #fca5a5; background: var(--danger-soft); }
.icon-btn--copy.is-copied { color: #fff; background: var(--green-600); border-color: var(--green-600); }

.chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chip--clicks { color: var(--green-800); background: var(--green-100); }
.chip--blocks { color: #9f1239; background: #ffe4e6; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.badge--active { color: #166534; background: var(--green-100); border: 1px solid var(--green-200); }
.badge--muted { color: var(--muted); background: #f1f5f9; border: 1px solid var(--line); }

/* ---------- Toasts & alerts ---------- */
.toast {
  position: fixed;
  top: 78px;
  right: 22px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
}
.toast--success { background: linear-gradient(135deg, var(--green-500), var(--green-700)); }
.toast--error { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.toast__dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.toast__close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; line-height: 1; margin-left: 4px; }
.toast.is-leaving { animation: toast-out 0.25s ease forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); } }

/* ---------- 404 ---------- */
.nf { display: flex; justify-content: center; align-items: center; padding: 70px 22px; }
.nf__card { max-width: 440px; width: 100%; text-align: center; padding: 42px 30px; }
.nf__icon { font-size: 44px; }
.nf__title { font-size: 22px; font-weight: 800; color: var(--ink); margin: 12px 0 8px; }
.nf__text { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #d1fae5; padding: 34px 0; margin-top: 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer .brand__name { color: #fff; }
.footer__note { font-size: 13px; color: #86efac; margin-top: 6px; }
.footer__copy { font-size: 12.5px; color: #6ee7a0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; padding: 52px 22px 64px; text-align: center; }
  .hero__cta, .hero__points { justify-content: center; }
  .features__grid, .steps { grid-template-columns: 1fr; }
  .features { padding: 56px 0 48px; }
  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { gap: 8px; }
  .nav__user { display: none; }
  .topbar__inner { padding: 12px 16px; }
  .panel { padding: 20px; }
  .panel__form { flex-direction: column; align-items: stretch; }
  .field--grow { flex: 1 1 auto; }
  .dash-head__row { align-items: flex-start; flex-direction: column; }
  .toast { left: 16px; right: 16px; max-width: none; }
}