/* ============================================================
   ZACKPRO.CV — ESTILOS COMPLETOS
   Identidade ZACK LIVE: verde #2ecc71, vermelho #cc0000
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --brand: #2ecc71;
  --brand-dark: #1e8449;
  --brand-red: #cc0000;
  --brand-gold: #c9a227;
  --bg: #f8fafc;
  --card: #fff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-light: #64748b;
  --success: #2ecc71;
  --danger: #cc0000;
  --warning: #f59e0b;
  --info: #3b82f6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ===== LOGOS SVG ===== */
.logo-big { width: 70px; height: 70px; flex-shrink: 0; }
.logo-small { width: 44px; height: 44px; flex-shrink: 0; }
.logo-tiny { width: 32px; height: 32px; flex-shrink: 0; }

/* ===== AUTH ===== */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f0fdf4 0%, #fef3c7 100%);
}

.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(46, 204, 113, 0.15);
}

.logo { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
}

.tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
}

.btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn:hover { background: var(--bg); }

.btn.primary {
  background: linear-gradient(135deg, #2ecc71, #1e8449);
  color: white;
  border-color: #2ecc71;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #1e8449, #145a32);
}

.btn.full { width: 100%; }
.btn.mini { padding: 4px 10px; font-size: 12px; }

.btn.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: none;
}

/* ===== APP LAYOUT ===== */
#app { display: flex; min-height: 100vh; }

.side {
  width: 260px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-header { margin-bottom: 24px; }

#nav { flex: 1; overflow-y: auto; }

.group {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  margin: 16px 0 8px;
  letter-spacing: 0.5px;
}

.navitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
  transition: background 0.2s;
}

.navitem:hover { background: var(--bg); }

.navitem.active {
  background: linear-gradient(135deg, #2ecc71, #1e8449);
  color: white;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 { font-size: 20px; font-weight: 700; }
.topbar p { font-size: 13px; color: var(--text-light); }

.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

#content { padding: 24px; flex: 1; overflow-x: hidden; }

/* ===== GRIDS ===== */
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.modules { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid.store-products { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.card.kpi small {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.card.kpi strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

.card.kpi span {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.card.module {
  cursor: pointer;
  transition: all 0.2s;
}

.card.module:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 204, 113, 0.1);
}

.card.module .emoji { font-size: 32px; margin-bottom: 8px; }
.card.module h4 { font-size: 16px; margin-bottom: 4px; }
.card.module p { font-size: 13px; color: var(--text-light); }

/* ===== SECTIONS ===== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-head h3 { font-size: 18px; font-weight: 700; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  background: #fafafa;
}

.table tr:hover { background: var(--bg); }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--success);
  color: white;
}

.badge.red { background: var(--danger); }
.badge.yellow { background: var(--warning); }
.badge.gray { background: #94a3b8; }

/* ===== POS ===== */
.product {
  cursor: pointer;
  transition: all 0.2s;
  padding: 12px;
}

.product:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.product b { display: block; font-size: 14px; margin-bottom: 4px; }
.product small { display: block; font-size: 12px; color: var(--text-light); margin-bottom: 8px; }

.price-line {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
}

.cart-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cart-total {
  font-size: 20px;
  font-weight: 700;
  text-align: right;
  margin: 16px 0;
}

/* ===== MODAL ===== */
dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 500px;
  width: 92%;
}

dialog::backdrop { background: rgba(0, 0, 0, 0.5); }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-content { padding: 20px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid .span2 { grid-column: 1 / -1; }

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1000;
}

#toast.show { opacity: 1; }

/* ===== NOTICE ===== */
.notice {
  background: linear-gradient(135deg, #2ecc71, #1e8449);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.notice b { display: block; font-size: 16px; margin-bottom: 4px; }
.notice span { font-size: 13px; opacity: 0.95; }

/* ===== STORE HERO ===== */
.store-hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #2ecc71, #1e8449);
  color: white;
  border-radius: 16px;
  margin-bottom: 24px;
  position: relative;
}

.store-hero h2 { font-size: 28px; margin: 12px 0 8px; }

.store-product { text-align: center; }
.store-product .img { font-size: 48px; margin-bottom: 12px; }

/* ===== SPECIAL HERO ===== */
.special-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, #2ecc71, #1e8449);
  color: white;
  border-radius: 12px;
  margin-bottom: 16px;
}

.special-hero .emoji.big { font-size: 64px; }

/* ===== PLAN FEATURED ===== */
.card.plan { position: relative; }

.card.plan.featured {
  border: 2px solid var(--brand);
}

.card.plan .price {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  margin: 12px 0;
}

.card.plan.featured > .badge {
  position: absolute;
  top: -12px;
  right: 12px;
  background: var(--brand);
}

/* ===== CHECK LIST ===== */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.check-list span {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* ===== BIG NUMBER ===== */
.big-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  margin: 12px 0;
}

/* ===== HINT ===== */
.hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
}

/* ===== RECEIPT ===== */
.receipt {
  font-family: 'Courier New', monospace;
  padding: 20px;
}

.receipt h2 { text-align: center; margin: 10px 0; }
.receipt hr { margin: 10px 0; }

/* ===== SEARCH ===== */
.search {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .side {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: left 0.3s;
  }
  .side.open { left: 0; }
  .btn-icon { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .grid.kpis { grid-template-columns: repeat(2, 1fr); }
  .topbar-right { margin-left: 0; width: 100%; justify-content: flex-end; }
}

@media print {
  .side, .topbar, .btn, .btn-icon { display: none !important; }
  #content { padding: 0; }
  .card { border: 1px solid #ccc; page-break-inside: avoid; }
}