* { box-sizing: border-box; }
:root {
  --primary: #1bbf70;
  --primary-hover: #10dc7a;
  --primary-dark: #00b967;
  --primary-deep: #060b2deb;
  --primary-deep-solid: #060b2d;
  --primary-soft: #edfff6;
  --ink: #101418;
  --muted: #647084;
  --line: #e2e8f0;
  --panel: #ffffff;
  --surface: #f5f7f6;
}
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--surface); }
label {
  display: grid;
  gap: 7px;
  color: #26312d;
  font-size: 13px;
  font-weight: 800;
}
input, textarea, select, button {
  width: 100%;
  font: inherit;
  border-radius: 12px;
  border: 1px solid #d7e0dc;
  padding: 13px 18px;
  background: #fbfdfc;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
input, textarea, select {
  min-height: 47px;
  color: #111817;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(15,23,42,.03);
}
input::placeholder, textarea::placeholder {
  color: #8b9893;
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #111817 50%),
    linear-gradient(135deg, #111817 50%, transparent 50%),
    linear-gradient(to right, #e6eee9, #e6eee9);
  background-position:
    calc(100% - 21px) 20px,
    calc(100% - 16px) 20px,
    calc(100% - 48px) 50%;
  background-size: 5px 5px, 5px 5px, 1px 24px;
  background-repeat: no-repeat;
  padding-right: 58px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 255, 136, .16);
}
textarea { min-height: 108px; resize: vertical; line-height: 1.45; }
button {
  cursor: pointer;
  border: 0;
  padding: 16px 22px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(0, 255, 136, .22);
}
button:hover { transform: translateY(-1px); background: var(--primary-hover); }
code { white-space: normal; font-size: 12px; color: var(--primary-dark); }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 16% 10%, rgba(26, 197, 115, .12), transparent 26%),
    radial-gradient(circle at 82% 78%, rgba(26, 197, 115, .08), transparent 30%),
    var(--primary-deep-solid);
}
.login-box {
  width: min(460px, calc(100vw - 32px));
  background: #fff;
  padding: 34px;
  border: 1px solid rgba(0,255,136,.18);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(6, 11, 45, .42);
}
.login-logo {
  display: block;
  width: min(330px, 82vw);
  height: auto;
  margin: 0 auto 22px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-box h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.02em; }
.login-box p { margin: 0 0 22px; color: var(--muted); }
.login-box form, .panel { display: grid; gap: 14px; }
.login-box button {
  background: var(--primary);
  color: #fff;
  padding-top: 10px;
  padding-bottom: 10px;
}
.panel form, form.panel { align-content: start; }
.panel input, .panel textarea, .panel select, .login-box input {
  border-color: #dce5e1;
}
.alert, .notice { padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: #075734; border: 1px solid rgba(0, 185, 103, .26); }
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.mobile-menu-button,
.mobile-menu-backdrop {
  display: none;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  color: #fff;
  font-weight: 300;
  background: var(--primary-deep);
  box-shadow: none;
}
.brand { color: #fff; text-decoration: none; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.16); }
.brand-logo { display: block; width: min(220px, 100%); height: auto; margin-bottom: 0; }
.brand strong { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.brand span { display: block; color: var(--primary); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a, .logout {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: #dce5e1;
  text-decoration: none;
  font-weight: 300;
}
.sidebar nav a.active, .sidebar nav a:hover, .logout:hover { background: rgba(0,255,136,.12); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.session-box {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}
.session-box span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.session-box strong {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.logout { margin-top: 0; }
.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 42px 48px 56px;
  display: grid;
  gap: 24px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding-bottom: 4px;
}
.page-head span { color: var(--primary-dark); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.page-head h1 { margin: 5px 0 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.05; letter-spacing: -.035em; }
.page-head small { color: var(--muted); font-weight: 700; }
.head-actions { display: flex; align-items: center; gap: 14px; }
.compact-button {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 255, 136, .22);
  white-space: nowrap;
}
.metrics { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; }
.metrics div, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}
.metrics span { display: block; font-size: 36px; font-weight: 900; letter-spacing: -.04em; }
.metrics small { color: var(--muted); font-weight: 700; }
.metric-primary {
  background:
    radial-gradient(circle at 85% 18%, rgba(0,255,136,.36), transparent 34%),
    linear-gradient(135deg, var(--primary-deep), var(--primary-deep-solid)) !important;
  color: #fff;
  border-color: rgba(0, 255, 136, .18) !important;
  box-shadow: 0 18px 44px rgba(6, 11, 45, .16) !important;
}
.metric-primary span { font-size: 56px; }
.metric-primary small { color: #b9ffdc; }
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.admin-layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.full-panel { display: grid; gap: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.list-filter {
  display: grid;
  grid-template-columns: minmax(240px, 360px) auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
}
.list-filter button {
  width: auto;
  min-height: 47px;
  padding: 10px 18px;
  border-radius: 12px;
}
.list-filter .secondary-action {
  align-self: center;
  white-space: nowrap;
}
.dashboard-filter {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(520px, 1.4fr);
  align-items: end;
  gap: 18px;
}
.dashboard-filter span {
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.dashboard-filter h2 {
  margin-top: 4px;
}
.dashboard-filter form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px auto auto;
  align-items: center;
  gap: 10px;
}
.dashboard-filter button {
  width: auto;
  min-height: 47px;
  padding: 10px 18px;
  border-radius: 12px;
}
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  scroll-margin-top: 32px;
}
.analysis-grid:target .panel {
  border-color: rgba(0, 255, 136, .36);
  box-shadow: 0 18px 44px rgba(0, 255, 136, .12);
}
.insight strong { display: block; margin-top: 8px; font-size: 28px; line-height: 1.12; letter-spacing: -.03em; }
.insight p { margin: 6px 0 0; color: var(--muted); }
.client-dashboard-grid { display: grid; grid-template-columns: .95fr 1.35fr; gap: 18px; align-items: stretch; }
.domain-list { display: grid; gap: 12px; margin-top: 4px; }
.domain-card {
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  border: 1px solid #dce5e1;
  border-radius: 14px;
  background: #fbfdfc;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.domain-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 185, 103, .42);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}
.domain-card span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.domain-card strong { font-size: 17px; letter-spacing: -.02em; }
.domain-card small { color: var(--muted); font-weight: 700; }
.bar-chart { display: grid; gap: 14px; margin-top: 6px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(160px, 1fr) 44px;
  align-items: center;
  gap: 14px;
}
.bar-label { min-width: 0; }
.bar-label strong,
.bar-label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-label strong { color: var(--ink); font-size: 14px; }
.bar-label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.bar-track {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f0ed;
}
.bar-track span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  box-shadow: 0 0 18px rgba(0, 255, 136, .28);
}
.bar-row b {
  color: #07120d;
  font-size: 18px;
  text-align: right;
}
.analysis-web-row {
  grid-template-columns: minmax(180px, 300px) minmax(160px, 1fr) 44px minmax(150px, auto);
}
.analysis-web-row small {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.empty-state { margin: 4px 0 0; color: var(--muted); }
h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 860px; background: #fff; }
th, td { padding: 13px 14px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f8fafc; }
.secondary-action, .table-action { color: #07864d; font-weight: 800; text-decoration: none; }
.secondary-action:hover, .table-action:hover { text-decoration: underline; }
.domain-link { color: #0f8f56; font-weight: 800; text-decoration: none; }
.domain-link:hover { text-decoration: underline; }
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.status-badge.is-active {
  background: rgba(0, 255, 136, .16);
  color: #057844;
}
.status-badge.is-suspended {
  background: #fff1f2;
  color: #be123c;
}
.lead-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px 4px 0;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.lead-status.is-pending { background: #f1f5f9; color: #475569; }
.lead-status.is-attended { background: rgba(0, 255, 136, .16); color: #057844; }
.lead-status.is-dismissed { background: #fff1f2; color: #be123c; }
.lead-status.is-quoted { background: #eff6ff; color: #1d4ed8; }
.lead-status.is-sold { background: var(--primary-deep-solid); color: #b9ffdc; }
.table-button {
  width: auto;
  padding: 8px 11px;
  border: 1px solid rgba(27, 191, 112, .28);
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  box-shadow: none;
  font-size: 13px;
}
.webs-table { min-width: 860px; }
.webs-table td strong { display: block; margin-bottom: 4px; }
.webs-table td small { display: block; max-width: 260px; color: var(--muted); line-height: 1.35; }
.script-box {
  display: grid;
  gap: 8px;
  padding: 13px 15px;
  border: 1px solid #dce5e1;
  border-radius: 12px;
  background: #f8faf9;
}
.script-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 11, 45, .62);
  backdrop-filter: blur(8px);
}
.modal-backdrop.is-open { display: flex; }
.modal-card {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}
.modal-head span {
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.modal-close {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.modal-close:hover { color: var(--ink); }
.modal-close-button {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}
.modal-close-button:hover {
  color: var(--ink);
  background: transparent;
  transform: none;
}
.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
}
.followup-modal > button[type="submit"] {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(0, 255, 136, .22);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #dce5e1;
  border-radius: 12px;
  background: #fbfdfc;
}
.check-row input {
  width: 18px;
  min-height: 18px;
  box-shadow: none;
  accent-color: var(--primary-dark);
}
.check-row span {
  color: #26312d;
  font-weight: 800;
}
.danger-button { width: auto; padding: 8px 11px; background: #dc2626; color: #fff; box-shadow: none; font-size: 13px; border-radius: 9px; }
.danger-button:hover { background: #b91c1c; }
.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.icon-button svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}
td form { margin: 0; }
.actions-cell { display: flex; align-items: center; gap: 10px; }
.login-box input:not([type="hidden"]),
.panel input:not([type="hidden"]),
.panel textarea,
.panel select {
  padding-left: 22px !important;
  padding-right: 22px !important;
}
.panel select {
  padding-right: 62px !important;
}
.login-box input::placeholder,
.panel input::placeholder,
.panel textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}
@media (max-width: 900px) {
  .app-layout { display: block; }
  .mobile-menu-button {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 80;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 11px;
    border-radius: 14px;
    background: var(--primary-deep);
    color: #fff;
    box-shadow: 0 16px 36px rgba(6,11,45,.24);
  }
  .mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
  }
  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(6,11,45,.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(310px, 86vw);
    height: 100vh;
    gap: 18px;
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 24px 0 70px rgba(6,11,45,.32);
  }
  .menu-open .sidebar { transform: translateX(0); }
  .sidebar nav { grid-template-columns: 1fr; }
  .logout { margin-top: 0; }
  .shell { padding: 74px 18px 40px; }
  .metrics, .admin-grid, .admin-layout, .analysis-grid, .client-dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-filter { grid-template-columns: 1fr; }
  .dashboard-filter form { grid-template-columns: 1fr; }
  .dashboard-filter button { width: 100%; }
  .list-filter { grid-template-columns: 1fr; }
  .list-filter button { width: 100%; }
  .list-filter .secondary-action { justify-self: center; }
  .bar-row { grid-template-columns: 1fr; gap: 8px; }
  .bar-row b { text-align: left; }
  .form-grid { grid-template-columns: 1fr; }
  .head-actions, .section-head { align-items: stretch; flex-direction: column; }
  .compact-button { width: 100%; }
  .page-head { align-items: start; flex-direction: column; }
}
