:root {
  color-scheme: dark;
  --bg: #050b0d;
  --surface: #0b1518;
  --surface-2: #101e21;
  --text: #edf8f5;
  --muted: #91a8a3;
  --green: #3ee7bd;
  --green-strong: #16b991;
  --green-soft: rgba(62, 231, 189, .12);
  --line: rgba(117, 231, 205, .18);
  --gold: #e7bd63;
  --danger: #ef6b72;
  --radius: 16px;
  --shadow: 0 20px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, rgba(25, 186, 150, .15), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(21, 110, 106, .08), transparent 28rem),
    var(--bg);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(62,231,189,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(62,231,189,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

header, main, footer { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}
main { position: relative; padding-block: 38px; }
footer { color: var(--muted); border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 42px; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 18px; }
nav a, nav .link { color: var(--muted); }
nav a:hover, nav .link:hover { color: var(--green); }
.brand { color: var(--text); font-size: 1.22rem; font-weight: 850; letter-spacing: -.03em; }
.brand small { display: block; color: var(--green); font-size: .66rem; font-weight: 650; letter-spacing: .08em; }

a { color: var(--green); text-decoration: none; transition: color .2s ease, border-color .2s ease, transform .2s ease; }
a:hover { color: #86ffe1; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { margin: .22em 0; font-size: clamp(2.5rem, 8vw, 5.4rem); }
h2 { margin-top: 2.4rem; font-size: clamp(1.45rem, 3vw, 2rem); }
p { max-width: 72ch; }
.lead { color: #c5d8d4; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero { max-width: 780px; padding: clamp(3rem, 9vw, 7rem) 0; }
.page-heading { max-width: 760px; margin-bottom: 36px; }
.eyebrow { color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.muted { color: var(--muted); }

.grid, .agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.card {
  position: relative;
  margin: 16px 0;
  padding: clamp(20px, 4vw, 28px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(16, 30, 33, .94), rgba(8, 17, 19, .96));
  box-shadow: var(--shadow);
}
.card::after { content: ""; position: absolute; inset: auto -20% -70% 20%; height: 160px; background: radial-gradient(circle, rgba(62,231,189,.09), transparent 68%); pointer-events: none; }
.alpha { border-left: 4px solid var(--green); }
.early { border-left: 4px solid var(--gold); }

label { display: block; margin: 12px 0; color: #d5e4e0; font-weight: 700; }
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  color: var(--text);
  background: #071013;
  border: 1px solid #23433f;
  border-radius: 9px;
  font: inherit;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
textarea { min-height: 140px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; }
.form-span { grid-column: 1 / -1; }
.actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
button, .button {
  display: inline-block;
  padding: 11px 18px;
  color: #02100d;
  background: linear-gradient(135deg, var(--green), var(--green-strong));
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(22,185,145,.16);
}
button:hover, .button:hover { color: #02100d; transform: translateY(-1px); }
.inline { display: inline; }
.link { padding: 0; color: var(--green); background: none; box-shadow: none; }
.danger { color: white; background: #a83f46; }

.notice { margin-bottom: 22px; padding: 13px 16px; color: #caffef; background: var(--green-soft); border: 1px solid var(--line); border-radius: 10px; }
.progress { height: 12px; overflow: hidden; background: #142326; border-radius: 99px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-strong), var(--green)); }
.badge, .status, .hours { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: .77rem; font-weight: 800; }
.badge { color: var(--muted); background: rgba(255,255,255,.03); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status--online { color: #55efb8; background: rgba(85,239,184,.08); }
.status--trabalhando { color: #55d9ef; background: rgba(85,217,239,.08); }
.status--ocioso { color: #e7bd63; background: rgba(231,189,99,.08); }
.status--ausente { color: #d18cee; background: rgba(209,140,238,.08); }
.status--offline { color: #7f9591; background: rgba(127,149,145,.08); box-shadow: none; }
.hours { float: right; color: var(--muted); }

.agent-grid { align-items: stretch; }
.agent-card { display: flex; flex-direction: column; min-height: 100%; }
.agent-card h2, .agent-card h3 { margin-bottom: 6px; }
.agent-card__body { display: flex; flex: 1; flex-direction: column; }
.agent-card__body .agent-meta { margin-top: auto; }
.agent-avatar {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: 18px;
  overflow: hidden;
  color: #061411;
  background: radial-gradient(circle at 35% 30%, #9cffe7, var(--green) 35%, #0e594c 72%);
  border: 1px solid rgba(114,255,220,.5);
  border-radius: 28px;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(62,231,189,.16);
}
.agent-avatar img { width: 100%; height: 100%; object-fit: cover; }
.agent-avatar--large { width: clamp(130px, 24vw, 220px); height: clamp(130px, 24vw, 220px); margin: 0; border-radius: 34px; font-size: 2.4rem; }
.role { color: var(--green); font-weight: 750; }
.agent-meta { display: flex; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 16px; color: var(--muted); border-top: 1px solid var(--line); }
.agent-meta strong { color: var(--text); }
.profile-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(24px, 6vw, 72px); padding: clamp(24px, 6vw, 56px); }
.profile-card h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
.back-link { display: inline-block; margin-bottom: 18px; }
.empty-state { padding: 52px 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.adminnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.adminnav a { padding: 7px 11px; background: var(--green-soft); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: rgba(11,21,24,.6); }
th, td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; }
code { padding: .12em .35em; color: #a7ffe9; background: #061113; border-radius: 5px; }

@media (max-width: 760px) {
  header { align-items: flex-start; padding-block: 18px; }
  nav { max-width: 70%; gap: 7px 12px; font-size: .88rem; }
  .form-grid, .profile-card { grid-template-columns: 1fr; }
  .agent-avatar--large { width: 130px; height: 130px; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  header { display: block; }
  nav { max-width: none; justify-content: flex-start; margin-top: 14px; }
  .hours { float: none; margin-left: 6px; }
  .agent-meta { display: block; }
  .agent-meta strong { display: block; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

