/* ============================================
   COUZAP — Design System CSS
   /var/www/couzap/public/assets/css/couzap.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ── RESET & BASE ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #080C0A;
  --black-2:     #0E1410;
  --black-3:     #141A16;
  --surface:     rgba(255,255,255,0.04);
  --surface-2:   rgba(255,255,255,0.07);
  --border:      rgba(255,255,255,0.08);
  --border-2:    rgba(255,255,255,0.14);
  --green:       #22C55E;
  --green-dim:   rgba(34,197,94,0.12);
  --green-border:rgba(34,197,94,0.28);
  --white:       #F0F2F0;
  --muted:       #6B7F72;
  --muted-2:     #3D5045;
  --danger:      #F87171;
  --danger-dim:  rgba(239,68,68,0.12);
  --warning:     #FBB024;
  --warning-dim: rgba(251,176,36,0.12);
  --purple:      #A78BFA;
  --purple-dim:  rgba(167,139,250,0.12);

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;

  --sidebar-w:   240px;
  --topbar-h:    60px;

  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

body {
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* ── GLOW AMBIENTAL ─────────────────────────── */
.cz-glow-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.cz-glow-bg::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(34,197,94,0.08) 0%, transparent 70%);
  top: -150px; right: -100px;
}
.cz-glow-bg::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(34,197,94,0.05) 0%, transparent 70%);
  bottom: 50px; left: -80px;
}

/* ── LAYOUT ─────────────────────────────────── */
.cz-app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── SIDEBAR ────────────────────────────────── */
.cz-sidebar {
  width: var(--sidebar-w);
  background: var(--black-2);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  padding: 20px 12px;
}

.cz-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 24px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 16px;
}
.cz-logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; color: var(--black);
}
.cz-logo-text { font-size: 17px; font-weight: 600; letter-spacing: -0.4px; }

.cz-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cz-nav-label {
  font-size: 10px; font-weight: 500; color: var(--muted-2);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 8px 6px;
}
.cz-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-md);
  color: var(--muted); font-size: 13px; font-weight: 400;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.cz-nav-item:hover { background: var(--surface); color: var(--white); }
.cz-nav-item.active {
  background: var(--green-dim);
  color: var(--green);
  border: 0.5px solid var(--green-border);
}
.cz-nav-item i { font-size: 17px; flex-shrink: 0; }

.cz-sidebar-footer {
  border-top: 0.5px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
}
.cz-user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-md);
  cursor: pointer; transition: background 0.15s;
}
.cz-user-row:hover { background: var(--surface); }
.cz-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green-dim);
  border: 0.5px solid var(--green-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; color: var(--green);
  flex-shrink: 0;
}
.cz-user-name { font-size: 12px; font-weight: 500; color: var(--white); }
.cz-user-plan { font-size: 10px; color: var(--muted); }

/* ── CONTEÚDO PRINCIPAL ─────────────────────── */
.cz-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.cz-topbar {
  height: var(--topbar-h);
  background: rgba(8,12,10,0.8);
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 50;
}
.cz-topbar-title { font-size: 15px; font-weight: 500; flex: 1; }
.cz-topbar-actions { display: flex; gap: 8px; align-items: center; }

.cz-content { padding: 28px; flex: 1; }
.cz-page-header {
  margin-bottom: 28px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
}
.cz-page-title { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.cz-page-subtitle { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── CARDS / GLASS ──────────────────────────── */
.cz-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.cz-card-green {
  background: var(--green-dim);
  border: 0.5px solid var(--green-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ── GRID ───────────────────────────────────── */
.cz-grid-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 24px; }
.cz-grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cz-grid-3     { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }

/* ── STAT CARD ──────────────────────────────── */
.cz-stat-label { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.cz-stat-value { font-size: 28px; font-weight: 600; letter-spacing: -1px; line-height: 1; }
.cz-stat-value.green { color: var(--green); }
.cz-stat-sub   { font-size: 11px; color: var(--green); margin-top: 8px; }

/* ── BOTÕES ─────────────────────────────────── */
.cz-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  border: none; cursor: pointer;
  font-family: inherit; line-height: 1;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  text-decoration: none; white-space: nowrap;
}
.cz-btn:active { transform: scale(0.97); }
.cz-btn i { font-size: 15px; }

.cz-btn-primary { background: var(--green); color: var(--black); }
.cz-btn-primary:hover { opacity: 0.88; }

.cz-btn-ghost {
  background: var(--surface-2);
  color: var(--muted);
  border: 0.5px solid var(--border-2);
}
.cz-btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.cz-btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 0.5px solid rgba(239,68,68,0.25);
}
.cz-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.cz-btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── BADGES ─────────────────────────────────── */
.cz-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 500; line-height: 1.4;
}
.cz-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.cz-badge-green  { background: var(--green-dim); color: var(--green); border: 0.5px solid var(--green-border); }
.cz-badge-gray   { background: var(--surface-2); color: var(--muted); border: 0.5px solid var(--border-2); }
.cz-badge-danger { background: var(--danger-dim); color: var(--danger); border: 0.5px solid rgba(239,68,68,0.25); }
.cz-badge-warn   { background: var(--warning-dim); color: var(--warning); border: 0.5px solid rgba(251,176,36,0.25); }

/* ── INPUTS ─────────────────────────────────── */
.cz-input-group { margin-bottom: 16px; }
.cz-label { font-size: 11px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 7px; }
.cz-input, .cz-select, .cz-textarea {
  width: 100%;
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px; color: var(--white);
  font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
.cz-input::placeholder, .cz-textarea::placeholder { color: var(--muted-2); }
.cz-input:focus, .cz-select:focus, .cz-textarea:focus {
  border-color: rgba(34,197,94,0.5);
}
.cz-select { appearance: none; cursor: pointer; }
.cz-textarea { resize: vertical; min-height: 80px; }

/* ── TABLE ──────────────────────────────────── */
.cz-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 0.5px solid var(--border); }
.cz-table { width: 100%; border-collapse: collapse; }
.cz-table th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 0.5px solid var(--border);
  background: var(--surface);
}
.cz-table td {
  padding: 12px 16px; font-size: 13px;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
}
.cz-table tr:last-child td { border-bottom: none; }
.cz-table tr:hover td { background: var(--surface); }

/* ── DIVIDER ────────────────────────────────── */
.cz-divider { height: 0.5px; background: var(--border); margin: 20px 0; }

/* ── EMPTY STATE ────────────────────────────── */
.cz-empty {
  text-align: center; padding: 60px 20px;
  color: var(--muted);
}
.cz-empty i { font-size: 40px; margin-bottom: 16px; display: block; color: var(--muted-2); }
.cz-empty p { font-size: 13px; }

/* ── SPINNER ────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.cz-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--green);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── RESPONSIVO ─────────────────────────────── */
@media (max-width: 900px) {
  .cz-grid-stats { grid-template-columns: 1fr 1fr; }
  .cz-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .cz-sidebar { transform: translateX(-100%); }
  .cz-grid-stats { grid-template-columns: 1fr; }
  .cz-grid-2, .cz-grid-3 { grid-template-columns: 1fr; }
  .cz-content { padding: 16px; }
}
