:root {
  --bg0: #e8f6f1;
  --bg1: #f3f7f5;
  --card: #ffffff;
  --text: #0b141a;
  --muted: #5b6b73;
  --primary: #00a884;
  --primary-dark: #008f72;
  --primary-soft: #d9f5ee;
  --border: #dce8e4;
  --danger: #b42318;
  --warn: #b54708;
  --shadow: 0 18px 50px rgba(11, 61, 46, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", Segoe UI, Helvetica, Arial, sans-serif;
  background: var(--bg1);
  color: var(--text);
  min-height: 100vh;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(0, 168, 132, 0.22), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(18, 140, 126, 0.16), transparent 55%),
    linear-gradient(180deg, #f7fbf9 0%, #eef4f2 100%);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 72px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 12px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(160deg, #00d4a4, #008f72);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(0, 168, 132, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong { font-size: 15px; }
.brand-text em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover,
.nav a.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.location-chip {
  margin-left: auto;
  flex: 1 1 280px;
  max-width: 100%;
  background: #ecfdf5;
  color: #0b141a;
  border: 1px solid #9fe1d0;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-chip span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #0f766e;
  opacity: 1;
}

.location-chip code {
  font-size: 14px;
  font-weight: 700;
  color: #0b141a;
  background: transparent;
  padding: 0;
  overflow: visible;
  white-space: normal;
  word-break: break-all;
  line-height: 1.4;
}

.page-head {
  margin: 28px 4px 22px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 34px;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 640px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.toolbar { margin: 8px 0 16px; }

.table-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.table th {
  background: #f6fbf9;
  color: #3b4a54;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tr:last-child td { border-bottom: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(180deg, #00c49a, var(--primary));
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 168, 132, 0.28);
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #eef3f1; color: var(--text); }
.btn-lg { padding: 14px 22px; font-size: 15px; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok { background: #e7f8f1; color: #0f766e; }
.badge-off { background: #fdecea; color: var(--danger); }

.alert {
  border-radius: 14px;
  padding: 13px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error { background: #fdecea; color: var(--danger); }
.alert-success { background: #e7f8f1; color: #0f766e; }
.alert-warn { background: #fffaeb; color: var(--warn); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 520px;
}

.card-wide { max-width: none; }

.card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.card > .muted { margin-top: 0; }

.hero-card,
.empty-card {
  background: var(--card);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero-card h2,
.empty-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.form label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #3b4a54;
}

.form input,
.form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d1d7db;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}

.form input:focus,
.form select:focus {
  outline: 2px solid rgba(0, 168, 132, 0.35);
  border-color: var(--primary);
}

.password-wrap {
  display: block;
  position: relative;
  margin-top: 8px;
}

.password-wrap input {
  margin-top: 0;
  padding-right: 48px;
}

.password-wrap input.is-invalid {
  border-color: var(--danger);
  background: #fff8f7;
}

.password-wrap input.is-valid {
  border-color: var(--primary);
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: #f1f5f4;
  color: #3b4a54;
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover,
.password-toggle.is-on {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-on .icon-eye { display: none; }
.password-toggle.is-on .icon-eye-off { display: block; }

.create-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.create-col {
  padding: 28px 32px 24px;
}

.create-col + .create-col {
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, #f7fbf9 0%, #ffffff 80px);
}

.create-col h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.create-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.create-card label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #3b4a54;
}

.create-card input {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #d1d7db;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}

.create-card input:focus {
  outline: 2px solid rgba(0, 168, 132, 0.28);
  border-color: var(--primary);
}

.strength {
  margin: 2px 0 14px;
}

.strength-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.strength-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8eef0;
  overflow: hidden;
}

.strength-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #d1d7db;
  transition: width 0.2s ease, background 0.2s ease;
}

.strength.weak .strength-bar i { background: #e11d48; }
.strength.fair .strength-bar i { background: #d97706; }
.strength.strong .strength-bar i { background: var(--primary); }
.strength.weak #strength-label { color: #e11d48; }
.strength.fair #strength-label { color: #d97706; }
.strength.strong #strength-label { color: #0f766e; }

.password-rules {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-rules li {
  font-size: 12px;
  font-weight: 700;
  color: #667781;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.password-rules li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #d1d7db;
  background: #fff;
  box-sizing: border-box;
}

.password-rules li.ok {
  color: #0f766e;
  background: #e7f8f1;
  border-color: #b6ead9;
}

.password-rules li.ok::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 2px #e7f8f1;
}

.password-match {
  margin: -6px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.password-match.ok { color: #0f766e; }
.password-match.bad { color: var(--danger); }

.create-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 32px 22px;
  border-top: 1px solid var(--border);
  background: #fbfdfc;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.inline-form { display: inline; }

.hub-intro {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 16px;
  max-width: 720px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.hub-card {
  background: var(--card);
  border-radius: 24px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(11, 61, 46, 0.12);
  border-color: #cdeadf;
}

.hub-card-accent {
  background: linear-gradient(180deg, #ffffff 0%, #eefaf6 100%);
}

.hub-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
}

.hub-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 14px 0 16px;
  color: #fff;
}

.hub-icon-dl { background: #0b141a; }
.hub-icon-users { background: linear-gradient(160deg, #00d4a4, #008f72); }
.hub-icon-guide { background: #128c7e; }

.hub-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.hub-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.hub-cta {
  margin-top: 18px;
  font-weight: 800;
  color: var(--primary-dark);
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.step-list {
  margin: 16px 0 22px;
  padding-left: 18px;
  color: #334155;
  line-height: 1.7;
}

.step-list li { margin-bottom: 8px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #f1f5f4;
  padding: 1px 6px;
  border-radius: 6px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.toc a {
  text-decoration: none;
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.toc a:hover { color: var(--primary-dark); }

.guide {
  background: var(--card);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.guide h2 {
  margin: 0;
  font-size: 24px;
}

.guide p {
  color: var(--muted);
  line-height: 1.65;
}

.guide-step {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.guide-end { margin-top: 8px; }

.shot {
  margin: 18px 0 8px;
}

.shot figcaption {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}

.shot-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.shot-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f6faf8;
}

.shot-chrome-bar,
.shot-wa-header,
.shot-panel-head,
.shot-info-title,
.shot-hub-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #111b21;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.shot-toggle {
  background: var(--primary);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
}

.shot-chrome-body,
.shot-form,
.shot-table,
.shot-panel,
.shot-info,
.shot-hub {
  padding: 14px;
}

.shot-chip,
.shot-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.shot-ext-card,
.shot-tr,
.shot-member {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shot-ext-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.shot-ext-card em,
.shot-wa-name em,
.shot-panel-sub {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.shot-form label,
.shot-panel label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.shot-form label span,
.shot-panel label span {
  display: block;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  font-size: 13px;
}

.shot-tr em {
  color: #0f766e;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.shot-hub-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 14px;
}

.shot-hub-cards div {
  background: #fff;
  border-radius: 12px;
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
}

.shot-wa { background: #efeae2; }
.shot-wa-thread { padding: 14px; min-height: 120px; }

.shot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00a884;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.shot-avatar.lg {
  width: 64px;
  height: 64px;
  margin: 8px auto 10px;
  font-size: 22px;
}

.shot-wa-header { gap: 10px; }
.shot-wa-name { flex: 1; }
.shot-wa-name strong,
.shot-wa-name em { display: block; }
.shot-wa-tools { display: flex; gap: 8px; align-items: center; }

.shot-g {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.shot-g.mini { width: 22px; height: 22px; font-size: 11px; }

.bubble {
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 8px;
}

.bubble.in { background: #fff; }
.bubble.out {
  background: #d9fdd3;
  margin-left: auto;
}

.shot-panel { background: #fff; }
.shot-match {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  margin: 10px 0;
}

.shot-tabs {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.shot-info {
  text-align: center;
  background: #fff;
}

.shot-phone {
  margin-top: 8px;
  font-weight: 700;
  color: var(--primary-dark);
}

@media (max-width: 900px) {
  .hub-grid,
  .split,
  .shot-row,
  .shot-hub-cards,
  .create-grid {
    grid-template-columns: 1fr;
  }

  .create-col + .create-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .create-col,
  .create-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .location-chip {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }

  .page-head h1 { font-size: 28px; }
}
