/* DashPro (WhaTicket) — estilos das paginas.
   O shell (sidebar/layout/variaveis) vem de _shell.css, espelhado do DashPro+. */

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg-body); color: var(--text-primary); }
.hide { display: none !important; }
.muted { color: var(--text-muted); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.2);
  padding: 2rem; width: 100%; max-width: 390px; text-align: left; }
.login-logo { max-width: 170px; display: block; }
.login-card .sub { margin: 1rem 0 1.5rem; color: var(--text-muted); font-size: .9rem; }

/* ---------- paginas ---------- */
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0 0 .25rem; font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.page-head p { margin: 0; color: var(--text-muted); font-size: .9rem; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.card h2 { margin: 0 0 .25rem; font-size: 1.05rem; font-weight: 600; }
.card p.hint { margin: 0 0 1rem; color: var(--text-muted); font-size: .85rem; }
.actions { margin-top: 1rem; display: flex; align-items: center; gap: .75rem; }

/* ---------- forms ---------- */
label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin: .85rem 0 .3rem; }
label .opt { font-weight: 400; color: var(--text-muted); }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid #cbd5e1; border-radius: var(--radius-sm);
  font: inherit; font-size: .9rem; background: #fff; }
textarea { resize: vertical; min-height: 70px; }
button { background: var(--primary); color: #fff; border: 0; border-radius: var(--radius-sm);
  padding: .6rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; transition: filter .15s; }
button:hover { filter: brightness(1.15); }
button.ghost { background: #fff; color: var(--primary); border: 1px solid var(--border); }
button:disabled { opacity: .55; cursor: not-allowed; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }

/* ---------- toggles ---------- */
.toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .6rem; margin-top: .5rem; }
.tg { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .7rem; cursor: pointer; }
.tg.tg-main { border-color: var(--primary); background: rgba(0,52,110,.04); }
.tg input { margin-top: .2rem; accent-color: var(--primary); }
.tg b { display: block; font-size: .85rem; }
.tg small { color: var(--text-muted); font-size: .75rem; }

/* ---------- atendentes ---------- */
.att-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.att { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--border); border-radius: 999px;
  padding: .35rem .75rem; font-size: .85rem; background: #fff; cursor: pointer; user-select: none; }
.att input { accent-color: var(--primary); }
.att.on { border-color: var(--primary); background: rgba(0,52,110,.08); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.dot.on { background: var(--positive); }

/* ---------- tabela / status ---------- */
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; }
.scroll { overflow-x: auto; }
.rules-box { margin-top: 1.25rem; }

.tag { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
  background: #e2e8f0; color: var(--text-secondary); }
.tag.round_robin { background: #dbeafe; color: #1e40af; }
.tag.wallet, .tag.wallet_history { background: #dcfce7; color: #166534; }
.tag.random { background: #fef3c7; color: #92400e; }
.tag.error { background: #fee2e2; color: #991b1b; }

.status { padding: .6rem .8rem; border-radius: var(--radius-sm); font-size: .85rem; margin-bottom: 1.25rem; }
.status.on { background: #dcfce7; color: #166534; }
.status.off { background: #fef3c7; color: #92400e; }
.msg { font-size: .85rem; }
.msg.ok { color: var(--positive); }
.msg.err { color: var(--negative); }

/* ---------- stat cards (padrao DashPro+) ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.stat .l { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

@media (max-width: 900px) {
  .main-content { padding: 1.25rem !important; }
}
