:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #121212;
  --surface-2: #191919;
  --line: rgba(255,255,255,.14);
  --line-strong: rgba(240,162,2,.45);
  --text: #f7f7f7;
  --muted: #b9b9b9;
  --accent: #f0a202;
  --accent-2: #ffcf5a;
  --success: #25d366;
  --danger: #e3342f;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 22% 0%, rgba(240,162,2,.16), transparent 30%),
    linear-gradient(90deg, rgba(98,199,232,.05), transparent 45%),
    var(--bg);
}

a,
button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 900;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  max-width: 1260px;
  margin: 0 auto;
  padding: 20px 18px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand img {
  width: 118px;
  height: auto;
  filter: drop-shadow(0 0 28px rgba(255,160,0,.3));
}

.kicker {
  margin: 0 0 5px;
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: .95;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

nav a,
nav button {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  padding: 10px 13px;
}

nav a:first-child,
.primary {
  color: #101010;
  background: var(--accent);
  border-color: var(--accent);
}

.shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 12px 18px 36px;
}

.summary,
.tools,
.client {
  border: 1px solid var(--line);
  background: rgba(18,18,18,.9);
  box-shadow: var(--shadow);
}

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

.summary div {
  min-height: 92px;
  padding: 15px;
  border-left: 1px solid var(--line);
}

.summary div:first-child {
  border-left: 0;
}

.summary span,
label span,
.metric span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.summary strong {
  font-size: clamp(1.25rem, 3vw, 2.2rem);
}

.accent {
  color: var(--accent-2);
}

.success {
  color: var(--success);
}

.danger {
  color: var(--danger);
}

.tools {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
}

.admin-auth {
  grid-template-columns: 1fr 1fr auto auto;
  align-items: end;
}

.admin-auth p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface-2);
  outline: none;
}

.clients {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.client {
  display: grid;
  gap: 14px;
  padding: 15px;
}

.client-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.client-head h2 {
  margin-bottom: 5px;
}

.status {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(240,162,2,.45);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--accent-2);
  background: rgba(240,162,2,.1);
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status.approved {
  color: var(--success);
  border-color: rgba(37,211,102,.4);
  background: rgba(37,211,102,.1);
}

.status.rejected {
  color: #ff8b86;
  border-color: rgba(227,52,47,.45);
  background: rgba(227,52,47,.12);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.metric {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
}

.metric strong {
  display: block;
  font-size: 1.04rem;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.client-actions button {
  padding: 9px 12px;
}

.reject {
  color: #fff;
  background: rgba(227,52,47,.18);
  border-color: rgba(227,52,47,.5);
}

.whatsapp {
  color: #06140a;
  background: var(--success);
  border-color: var(--success);
}

.empty {
  padding: 20px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0,0,0,.18);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #101010;
  background: var(--accent);
  box-shadow: var(--shadow);
  font-weight: 900;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 960px) {
  .top {
    display: block;
  }

  nav {
    justify-content: flex-start;
    margin-top: 16px;
  }

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

@media (max-width: 720px) {
  .summary,
  .tools,
  .admin-auth,
  .metrics {
    grid-template-columns: 1fr;
  }

  .summary div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .summary div:first-child {
    border-top: 0;
  }

  .client-head {
    display: grid;
  }
}
