/* ZazzSeller — painel do gestor */

:root {
  --primary: #2168a8;
  --primary-dark: #17548c;
  --brand: #3a86d4;
  --lime: #8cc63f;
  --bg: #111b21;
  --panel: #202c33;
  --panel-2: #182229;
  --border: #2a3942;
  --text: #e9edef;
  --muted: #8696a0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.hidden { display: none !important; }

/* ---------- logo ---------- */
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-style: italic;
}
.logo-zazz {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--brand);
}
.logo-seller {
  font-size: 13px;
  font-weight: 600;
  color: var(--lime);
  margin-left: 18px;
}

/* ---------- login ---------- */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-box h1 { font-size: 17px; margin: 0; font-weight: 600; }
.error { color: #f87171; font-size: 13px; min-height: 18px; }

/* ---------- header / nav ---------- */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-right { display: flex; align-items: center; gap: 10px; }
.badge {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px;
}
.badge.dirty { color: #fbbf24; border-color: #fbbf24; }

#tabs {
  display: flex;
  justify-content: center;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  padding: 12px 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab-active { color: var(--brand); border-bottom-color: var(--brand); }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ---------- controles ---------- */
.btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: var(--border); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.45; cursor: default; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 4px 9px; font-size: 13px; }
.btn-danger:hover { background: #7f1d1d; border-color: #7f1d1d; }

.input, textarea.input, select.input {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.input:focus { outline: none; border-color: var(--primary); }
textarea.input { min-height: 80px; resize: vertical; }
input[type="color"].input { padding: 2px; height: 36px; width: 46px; }

.section-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 18px; line-height: 1.6; }

/* ---------- listas / linhas ---------- */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: border-color 0.12s ease;
}
.row:hover { border-color: #3b4a54; }
.row .grow { flex: 1; }
.row-title { font-weight: 600; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.card-title { font-weight: 700; margin-bottom: 10px; }

.form-grid { display: flex; flex-direction: column; gap: 10px; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline label { font-size: 13px; color: var(--muted); }
.w-100 { width: 100px; }

.empty {
  color: var(--muted);
  font-size: 13.5px;
  padding: 18px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.token {
  font-family: Consolas, monospace;
  font-size: 12.5px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  user-select: all;
}
.pill {
  font-size: 11.5px;
  border-radius: 999px;
  padding: 2px 10px;
}
.pill-on { background: rgba(140, 198, 63, 0.15); color: var(--lime); }
.pill-off { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.pill-warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

/* fluxos */
.step-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.step-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 12px;
  margin-bottom: 8px;
}
.opt-row { display: flex; gap: 6px; margin: 6px 0; align-items: center; }
.opt-row .input { padding: 6px 8px; font-size: 13px; }
.opt-kw { max-width: 110px; }
.opt-goto { max-width: 150px; }

/* toast */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
