/* Cabine Fotos: estilos compartilhados do site, painel do dono e área do cliente. */
:root {
  --bg: #0c0b10;
  --bg-2: #13121a;
  --card: #18161f;
  --card-2: #201d29;
  --line: #2b2836;
  --text: #f4f1f7;
  --muted: #a39fb0;
  --faint: #6f6a7d;
  --accent: #ff1616;
  --accent-2: #b3000f;
  --accent-soft: rgba(255, 22, 22, 0.14);
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.14);
  --warn: #ffc24b;
  --warn-soft: rgba(255, 194, 75, 0.14);
  --bad: #ff5d6c;
  --bad-soft: rgba(255, 93, 108, 0.14);
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font: 600 14px var(--font);
  cursor: pointer; white-space: nowrap; transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { border-color: #3d394b; background: #26222f; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(100deg, var(--accent), var(--accent-2)); border: 0; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }

/* Formulários */
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 12px; font: 15px var(--font); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 80px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* Cartões, tabelas e selos */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; background: var(--card-2); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.pink { background: var(--accent-soft); color: var(--accent); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: rgba(255, 255, 255, .025); }
td .sub { display: block; font-size: 12px; color: var(--faint); }
.empty { text-align: center; color: var(--faint); padding: 36px 12px; }

/* Modal e avisos */
.modal-bg {
  position: fixed; inset: 0; background: rgba(5, 4, 8, .7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s;
}
.modal {
  width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; }
.modal .body { padding: 18px 22px; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; flex-wrap: wrap; }
.modal footer .left { margin-right: auto; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--card-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow); animation: fade .2s; max-width: calc(100vw - 32px);
}
.toast.bad { border-color: var(--bad); }
@keyframes fade { from { opacity: 0; } }

/* Tela de login dos painéis */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 20% 10%, rgba(255, 22, 22, .16), transparent 45%),
              radial-gradient(circle at 85% 90%, rgba(179, 0, 15, .12), transparent 40%), var(--bg);
}
.auth .card { width: min(400px, 100%); padding: 32px; display: grid; gap: 16px; }
.auth .err { color: var(--bad); font-size: 14px; min-height: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo i {
  width: 32px; height: 32px; border-radius: 9px; flex: none; font-size: 0;
  background: url(/assets/icon-512.png) center / cover;
}

/* Gráfico de barras simples */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; position: relative; }
.bars .bar span {
  width: 100%; border-radius: 6px 6px 3px 3px; min-height: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(255, 22, 22, .35));
}
.bars .bar:hover span { filter: brightness(1.25); }
.bars .bar:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 8px; font-size: 12px; white-space: nowrap; z-index: 2;
}
.bars-labels { display: flex; gap: 4px; margin-top: 8px; font-size: 11px; color: var(--faint); }
.bars-labels span { flex: 1; text-align: center; min-width: 0; overflow: hidden; }
