/* ═════════════════════════════════════════════
   CONTABILIDADE — Frost & Glass
   Sora (headings) + IBM Plex Mono (data)
   ═════════════════════════════════════════════ */

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

:root {
  --bg: #070b10;
  --bg-glass: rgba(12, 20, 30, 0.55);
  --bg-glass-solid: rgba(12, 20, 30, 0.85);
  --bg-input: rgba(8, 14, 22, 0.8);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(0, 229, 208, 0.15);
  --glass-shine: rgba(255, 255, 255, 0.03);
  --text: #e8f0ef;
  --text-2: #8faaa7;
  --text-3: #4b6b68;
  --cyan: #00e5d0;
  --cyan-soft: #00c4b4;
  --cyan-glow: rgba(0, 229, 208, 0.25);
  --blue: #0099ff;
  --green: #00d97e;
  --green-bg: rgba(0, 217, 126, 0.1);
  --amber: #f0b100;
  --amber-bg: rgba(240, 177, 0, 0.1);
  --red: #f04444;
  --red-bg: rgba(240, 68, 68, 0.1);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
}

.hidden { display: none !important; }
.mono { font-family: 'IBM Plex Mono', monospace; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ═══ FLOATING ORBS ═══ */
.orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  will-change: transform;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 208, 0.3), transparent 70%);
  top: -10%; left: -5%;
  animation: drift1 25s ease-in-out infinite alternate;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0, 153, 255, 0.25), transparent 70%);
  bottom: -10%; right: -5%;
  animation: drift2 30s ease-in-out infinite alternate;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0, 229, 208, 0.15), transparent 70%);
  top: 50%; left: 40%;
  animation: drift3 20s ease-in-out infinite alternate;
}

@keyframes drift1 { from { transform: translate(0, 0); } to { transform: translate(80px, 60px); } }
@keyframes drift2 { from { transform: translate(0, 0); } to { transform: translate(-60px, -80px); } }
@keyframes drift3 { from { transform: translate(0, 0); } to { transform: translate(50px, -50px); } }

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ═══ GLASS CARD BASE ═══ */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
  animation: cardIn 0.6s ease both;
}
.card[data-delay="0"] { animation-delay: 0s; }
.card[data-delay="1"] { animation-delay: 0.08s; }
.card[data-delay="2"] { animation-delay: 0.16s; }
.card[data-delay="3"] { animation-delay: 0.24s; }
.card[data-delay="4"] { animation-delay: 0.32s; }
.card[data-delay="5"] { animation-delay: 0.4s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top shine line */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), rgba(0, 229, 208, 0.08), var(--glass-shine), transparent);
}

.card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 229, 208, 0.04);
}

/* ═══ TOPBAR ═══ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass-solid);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--glass-border);
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.875rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1rem; }

.nav-brand { display: flex; align-items: center; gap: 0.625rem; }

.nav-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.nav-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: rgba(0, 229, 208, 0.06);
  border: 1px solid rgba(0, 229, 208, 0.1);
}

.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--cyan-glow); }
  50% { box-shadow: 0 0 0 5px transparent; }
}

.live-badge .mono {
  font-size: 0.65rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

.btn-ghost {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover {
  background: rgba(240, 68, 68, 0.08);
  border-color: rgba(240, 68, 68, 0.2);
  color: var(--red);
}

/* ═══ MAIN ═══ */
.dashboard-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

/* ═══ STATUS BANNER ═══ */
.status-banner {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(20px);
}
.status-banner.success {
  background: var(--green-bg);
  border: 1px solid rgba(0, 217, 126, 0.15);
  color: var(--green);
}
.status-banner.warning {
  background: var(--amber-bg);
  border: 1px solid rgba(240, 177, 0, 0.15);
  color: var(--amber);
}

/* ═══ BENTO GRID ═══ */
.bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}

.bento-top {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
}

.card-featured {
  grid-row: 1 / 3;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.bento-top .card-featured {
  grid-column: 1 / -1;
  grid-row: auto;
}

.card-stat {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.625rem;
}

.card-big-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cyan);
  line-height: 1;
}
.card-big-value.confirmed { color: var(--green); }

/* Revenue row — estimated vs confirmed side by side */
.revenue-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.revenue-block { flex: 1; }
.revenue-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.revenue-divider {
  width: 1px;
  height: 50px;
  background: var(--glass-border);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

/* Progress bar */
.progress-wrap { margin-bottom: 0.25rem; }
.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: 100px;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--cyan-glow);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-3);
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.card-caption {
  font-size: 0.7rem;
  color: var(--text-3);
}

/* Featured card GIF background */
.featured-bg {
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  overflow: hidden;
  border-radius: 0 var(--radius) var(--radius) 0;
  pointer-events: none;
}

.featured-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  filter: saturate(1.4) brightness(0.8);
  mask-image: linear-gradient(to left, rgba(0,0,0,0.6), transparent 90%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.6), transparent 90%);
}

.featured-content {
  position: relative;
  z-index: 2;
}

.card-chart-mini {
  flex: 1;
  min-height: 180px;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

/* Accent strip */
.card-accent {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.accent-cyan { background: linear-gradient(90deg, var(--cyan), transparent); }
.accent-green { background: linear-gradient(90deg, var(--green), transparent); }
.accent-amber { background: linear-gradient(90deg, var(--amber), transparent); }
.accent-red { background: linear-gradient(90deg, var(--red), transparent); }

/* Stat card colors by class */
.card-stat-alert {
  border-color: rgba(240, 68, 68, 0.12);
  background: linear-gradient(135deg, rgba(240, 68, 68, 0.04), var(--bg-glass));
}
.card-stat-alert .card-accent { height: 3px; }

.card-stat-warn {
  border-color: rgba(240, 177, 0, 0.08);
  background: linear-gradient(135deg, rgba(240, 177, 0, 0.03), var(--bg-glass));
}
.card-stat-warn .card-accent { height: 3px; }

/* All stat card values use same color */
.bento-top .card-stat .card-value { color: var(--text); }

/* Dynamic states */
.card-stat-alert.pulsing {
  animation: alertPulse 2s ease-in-out infinite;
}
@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 68, 68, 0); }
  50% { box-shadow: 0 0 20px 2px rgba(240, 68, 68, 0.15), inset 0 0 20px rgba(240, 68, 68, 0.03); }
}

.card-stat.dimmed {
  opacity: 0.5;
}
.card-stat.dimmed .card-value { color: var(--text-3); }

/* ═══ CHARTS ═══ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}

.card-chart {
  padding: 1.5rem;
}

.card-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.chart-wrap {
  position: relative;
  height: 280px;
}

.card-forecast {
  margin-bottom: 0.875rem;
}
.card-forecast .chart-wrap {
  height: 250px;
}

/* ═══ TABLES ═══ */
.card-table {
  padding: 0;
  margin-bottom: 0.875rem;
}

.card-table .card-heading {
  padding: 1.25rem 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--glass-border);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 229, 208, 0.015);
}

tbody td {
  padding: 0.8rem 1.5rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
  color: var(--text);
}

tbody tr { transition: background 0.2s; }
tbody tr:hover { background: rgba(0, 229, 208, 0.025); }
tbody tr:last-child td { border-bottom: none; }

tbody td strong {
  color: var(--cyan);
  font-weight: 600;
}

/* Reseller with avatar */
.reseller-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.reseller-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--glass-border);
  flex-shrink: 0;
}
.reseller-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 229, 208, 0.08);
  border: 1.5px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-3);
  flex-shrink: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge.pago { background: var(--green-bg); color: var(--green); }
.badge.pendente { background: var(--amber-bg); color: var(--amber); }
.badge.atrasado { background: var(--red-bg); color: var(--red); }

.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
}
.badge.pago .badge-dot { background: var(--green); box-shadow: 0 0 4px rgba(0, 217, 126, 0.6); }
.badge.pendente .badge-dot { background: var(--amber); box-shadow: 0 0 4px rgba(240, 177, 0, 0.6); }
.badge.atrasado .badge-dot { background: var(--red); box-shadow: 0 0 4px rgba(240, 68, 68, 0.6); }

/* ═══ LOADING ═══ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  gap: 0.75rem;
  color: var(--text-3);
  font-size: 0.8rem;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--glass-border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-space { height: 2rem; }

/* ═══ LOGIN ═══ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: var(--bg);
}

.login-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 3rem 2.5rem 2.5rem;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  animation: cardIn 0.7s ease both;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.login-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(0, 229, 208, 0.12) 50%, transparent 90%);
}

.login-brand { text-align: center; margin-bottom: 2rem; }

.login-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 1.25rem;
  display: block;
  filter: drop-shadow(0 0 20px var(--cyan-glow)) drop-shadow(0 0 40px rgba(0, 229, 208, 0.1));
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, var(--text), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand p {
  font-size: 0.85rem;
  color: var(--text-3);
  font-weight: 400;
}

.login-form { display: flex; flex-direction: column; gap: 1rem; }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-field input {
  padding: 0.875rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-field input:focus {
  border-color: var(--cyan-soft);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.form-field input::placeholder { color: var(--text-3); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none;
  border-radius: var(--radius-xs);
  color: #050a0e;
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.5rem;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 229, 208, 0.25);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-icon { flex-shrink: 0; transition: transform 0.2s; }
.btn-primary:hover .btn-icon { transform: translateX(3px); }

.alert-error {
  background: var(--red-bg);
  border: 1px solid rgba(240, 68, 68, 0.15);
  border-radius: var(--radius-xs);
  color: var(--red);
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ═══ EXPORT BUTTONS ═══ */
.export-row {
  display: flex;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-export:hover {
  background: rgba(0, 229, 208, 0.06);
  border-color: rgba(0, 229, 208, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-export svg {
  flex-shrink: 0;
}

/* ═══ FILTER BAR ═══ */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  flex-wrap: wrap;
}

.filter-bar .form-field {
  flex: 1;
  min-width: 140px;
}

.filter-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.25s;
}

.filter-input:focus {
  border-color: var(--cyan-soft);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.btn-filter {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none;
  border-radius: var(--radius-xs);
  color: #050a0e;
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-filter:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 229, 208, 0.2);
}

/* ═══ PROFILE MODAL — Discord Style ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  padding: 1rem;
}
.modal-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.profile-modal {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: #111820;
  border-radius: 16px;
  overflow: hidden;
  animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-overlay.closing .profile-modal {
  animation: modalSlideOut 0.2s ease forwards;
}
@keyframes modalSlide { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes modalSlideOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95) translateY(10px); } }

/* Banner area */
.profile-banner {
  height: 210px;
  position: relative;
  overflow: hidden;
}
.profile-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-banner-img.profile-banner-fallback {
  filter: blur(20px) brightness(0.4) saturate(1.5);
  transform: scale(1.3);
}
.profile-banner-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 229, 208, 0.3), rgba(0, 153, 255, 0.3), rgba(130, 100, 255, 0.2));
}
.profile-banner-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top, #111820, transparent);
}

/* Avatar floating over banner */
.profile-header {
  padding: 0 1.5rem;
  margin-top: -44px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}
.profile-avatar-wrap {
  flex-shrink: 0;
  position: relative;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #111820;
  background: #1a2232;
}
.profile-avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 5px solid #111820;
  background: rgba(0, 229, 208, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-3);
}
.profile-status-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 4px solid #111820;
}
.profile-status-dot.ativo { background: var(--green); }
.profile-status-dot.pausado { background: var(--amber); }

.profile-name-area {
  padding-bottom: 0.5rem;
  flex: 1;
  min-width: 0;
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-discord-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-3);
  margin-top: 0.15rem;
}

.profile-close {
  position: absolute;
  top: -72px; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5;
}
.profile-close:hover { background: rgba(240, 68, 68, 0.5); }

/* Divider */
.profile-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.75rem 1.5rem;
}

/* Scrollable body */
.profile-body {
  padding: 0 1.5rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.profile-body::-webkit-scrollbar { width: 4px; }
.profile-body::-webkit-scrollbar-track { background: transparent; }
.profile-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Stats grid - Discord "About Me" style */
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.profile-stat-card {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.04);
}
.profile-stat-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.profile-stat-value.green { color: var(--green); }
.profile-stat-value.amber { color: var(--amber); }
.profile-stat-value.red { color: var(--red); }
.profile-stat-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Section titles */
.profile-section-title {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  margin-top: 0.75rem;
}

/* Product list */
.profile-product-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.profile-product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
  transition: background 0.2s;
}
.profile-product:hover {
  background: rgba(0, 229, 208, 0.03);
}
.profile-product-name {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-product-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
}

.currency-conv {
  color: var(--text-3);
  font-weight: 400;
  font-size: 0.65rem;
}

.badge-currency {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.badge-currency.usd {
  background: rgba(0, 200, 83, 0.1);
  color: #00c853;
  border: 1px solid rgba(0, 200, 83, 0.2);
}
.profile-product-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-3);
  white-space: nowrap;
}
.profile-product-badge {
  font-size: 0.55rem;
  padding: 0.15rem 0.5rem;
}

/* ═══ RENEWALS LIST ═══ */
.profile-renewals-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.profile-renewal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border-left: 3px solid rgba(0, 229, 208, 0.3);
  transition: all 0.2s;
}
.profile-renewal-item:hover { background: rgba(0, 229, 208, 0.03); }
.profile-renewal-item.soon { border-left-color: var(--amber); }
.profile-renewal-item.overdue { border-left-color: var(--red); background: rgba(240,68,68,0.03); }
.profile-renewal-item.upcoming { border-left-color: rgba(0, 229, 208, 0.5); }

.profile-renewal-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
  flex-shrink: 0;
}
.profile-renewal-day {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.profile-renewal-month {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.profile-renewal-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.profile-renewal-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-renewal-meta {
  font-size: 0.6rem;
  color: var(--text-3);
}
.profile-renewal-urgency {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.profile-renewal-countdown {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--cyan);
  white-space: nowrap;
}
.profile-renewal-item.soon .profile-renewal-countdown { color: var(--amber); }
.profile-renewal-item.overdue .profile-renewal-countdown { color: var(--red); }

/* Payment timeline */
.profile-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.profile-timeline-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
}
.profile-timeline-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(0, 217, 126, 0.4);
}
.profile-timeline-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-3);
  white-space: nowrap;
}
.profile-timeline-text {
  flex: 1;
  color: var(--text-2);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-timeline-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

/* Member since */
.profile-member-since {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.profile-member-since strong {
  color: var(--text-2);
}

/* Warning banner inside modal */
.profile-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--red-bg);
  border: 1px solid rgba(240, 68, 68, 0.12);
  border-radius: 8px;
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Empty state */
.profile-empty {
  color: var(--text-3);
  font-size: 0.75rem;
  padding: 0.75rem;
  text-align: center;
}

/* ═══ PROJECTION ═══ */
.projection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.projection-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.projection-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.projection-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  outline: none;
}
.projection-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--cyan-glow);
}
.projection-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  border: none;
}
.projection-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  min-width: 24px;
  text-align: center;
}
.projection-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* ═══ MODAL ACTION BUTTONS ═══ */
.profile-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.profile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  font-family: 'Sora', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.profile-action-btn:hover {
  background: rgba(0, 229, 208, 0.06);
  border-color: rgba(0, 229, 208, 0.15);
  color: var(--cyan);
}
.profile-action-btn.danger:hover {
  background: var(--red-bg);
  border-color: rgba(240, 68, 68, 0.2);
  color: var(--red);
}
.profile-action-btn.success {
  background: rgba(0, 217, 126, 0.08);
  border-color: rgba(0, 217, 126, 0.15);
  color: var(--green);
}
.profile-action-btn.success:hover {
  background: rgba(0, 217, 126, 0.15);
}

/* Product row actions */
.profile-product-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}
.profile-product-action {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.15s;
}
.profile-product-action:hover { background: rgba(0,229,208,0.1); color: var(--cyan); }
.profile-product-action.danger:hover { background: var(--red-bg); color: var(--red); }
.profile-product-action.confirm:hover { background: rgba(0,217,126,0.1); color: var(--green); }

/* Inline form in modal */
.profile-inline-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  animation: cardIn 0.2s ease;
}
.profile-inline-form .form-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.profile-inline-form .form-row > * {
  flex: 1;
  min-width: 100px;
}
.profile-inline-form input, .profile-inline-form select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  outline: none;
}
.profile-inline-form input:focus, .profile-inline-form select:focus {
  border-color: var(--cyan-soft);
}
.profile-inline-form label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
  display: block;
}
.profile-form-actions {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.success { background: rgba(0, 217, 126, 0.15); border: 1px solid rgba(0,217,126,0.2); color: var(--green); }
.toast.error { background: var(--red-bg); border: 1px solid rgba(240,68,68,0.2); color: var(--red); }
.toast.closing { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(10px); } }

/* Clickable reseller */
.reseller-cell { cursor: pointer; }
.reseller-cell:hover strong { text-decoration: underline; }

/* Modal loading */
.profile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
}

/* ═══ RESPONSIVE ═══ */

/* Tablet landscape */
@media (max-width: 1100px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-top { grid-template-columns: repeat(4, 1fr); }
  .bento-top .card-featured { grid-column: 1 / -1; }
  .card-featured { grid-row: auto; grid-column: 1 / -1; }
  .card-chart-mini { min-height: 140px; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .dashboard-main { padding: 1rem 0.75rem; }
  .topbar-inner { padding: 0.65rem 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
  .topbar-left { flex-wrap: wrap; width: 100%; }
  .topbar-right { width: 100%; justify-content: flex-end; }
  .nav-title { font-size: 0.85rem; }

  .bento { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .bento-top { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .bento-top .card-featured { grid-column: 1 / -1; }
  .charts-row { grid-template-columns: 1fr; gap: 0.5rem; }

  .card-big-value { font-size: 1.6rem; }
  .card-value { font-size: 1.15rem; }
  .card-stat { padding: 0.875rem 1rem; }
  .card-chart { padding: 1rem; }
  .chart-wrap { height: 220px; }
  .card-forecast .chart-wrap { height: 200px; }
  .card-eyebrow { font-size: 0.6rem; margin-bottom: 0.4rem; }

  .revenue-row { gap: 1rem; }
  .revenue-label { font-size: 0.6rem; }

  /* Tables */
  thead th { padding: 0.5rem 0.75rem; font-size: 0.6rem; }
  tbody td { padding: 0.55rem 0.75rem; font-size: 0.7rem; }

  /* Export row */
  .export-row { flex-direction: column; }
  .btn-export { justify-content: center; }

  /* Filter bar */
  .filter-bar { flex-direction: column; align-items: stretch; gap: 0.6rem; padding: 0.75rem 1rem; }
  .filter-bar .form-field { min-width: unset; }
  .btn-filter { width: 100%; text-align: center; }

  /* Modal */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .profile-modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .modal-overlay.closing .profile-modal {
    animation: modalSlideDown 0.25s ease forwards;
  }
  .profile-banner { height: 160px; }
  .profile-header { padding: 0 1rem; gap: 0.75rem; }
  .profile-avatar, .profile-avatar-placeholder { width: 72px; height: 72px; }
  .profile-avatar-placeholder { font-size: 1.5rem; }
  .profile-name { font-size: 1.1rem; }
  .profile-close { top: -56px; right: 0.75rem; }
  .profile-body { padding: 0 1rem 1rem; }
  .profile-divider { margin: 0.5rem 1rem; }
  .profile-stats { gap: 0.35rem; }
  .profile-stat-value { font-size: 0.9rem; }
  .profile-stat-label { font-size: 0.55rem; }

  .profile-product { gap: 0.5rem; padding: 0.5rem 0.6rem; flex-wrap: wrap; }
  .profile-product-name { flex: 1 1 100%; }
  .profile-product-price { font-size: 0.7rem; }
  .profile-product-date { font-size: 0.6rem; }

  .profile-timeline-item { gap: 0.4rem; flex-wrap: wrap; }
  .profile-timeline-date { font-size: 0.6rem; }
  .profile-timeline-text { font-size: 0.7rem; }
  .profile-timeline-amount { font-size: 0.65rem; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalSlideDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(100%); }
}

/* Mobile */
@media (max-width: 480px) {
  .topbar-inner { padding: 0.5rem 0.625rem; flex-wrap: wrap; gap: 0.5rem; }
  .topbar-left { flex-wrap: wrap; width: 100%; gap: 0.5rem; }
  .topbar-right { width: 100%; justify-content: flex-end; gap: 0.5rem; }
  .nav-logo { width: 26px; height: 26px; }
  .nav-title { font-size: 0.8rem; }
  .live-badge { padding: 0.2rem 0.5rem; }
  .live-badge .mono { font-size: 0.55rem; }
  .btn-ghost { padding: 0.3rem 0.6rem; font-size: 0.65rem; }

  .dashboard-main { padding: 0.625rem 0.5rem; }

  .bento { grid-template-columns: 1fr; gap: 0.5rem; }
  .bento-top { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .bento-top .card-featured { grid-column: 1 / -1; }
  .card-featured { padding: 1.25rem; }
  .card-big-value { font-size: 1.35rem; }
  .card-value { font-size: 1rem; }
  .card-stat { padding: 0.75rem; }
  .card-chart-mini { min-height: 120px; }

  .revenue-row { flex-direction: column; gap: 0.5rem; }
  .revenue-divider { width: 100%; height: 1px; margin: 0; }

  .progress-info { font-size: 0.6rem; }

  .card-table .card-heading { padding: 0.75rem 0.875rem; font-size: 0.7rem; }

  /* Make tables horizontally scrollable */
  .table-scroll { -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }
  thead th { padding: 0.4rem 0.6rem; font-size: 0.55rem; letter-spacing: 0.05em; }
  tbody td { padding: 0.45rem 0.6rem; font-size: 0.65rem; }
  .reseller-avatar { width: 22px; height: 22px; }
  .reseller-avatar-placeholder { width: 22px; height: 22px; font-size: 0.5rem; }
  .reseller-cell { gap: 0.4rem; }
  .badge { font-size: 0.5rem; padding: 0.15rem 0.45rem; gap: 0.25rem; }
  .badge-dot { width: 4px; height: 4px; }

  /* Chart */
  .chart-wrap { height: 180px; }
  .card-forecast .chart-wrap { height: 160px; }
  .card-heading { font-size: 0.7rem; }

  /* Export */
  .export-row { gap: 0.5rem; }
  .btn-export { font-size: 0.65rem; padding: 0.6rem 1rem; }

  /* Status banner */
  .status-banner { font-size: 0.75rem; padding: 0.625rem 0.875rem; border-radius: var(--radius-xs); }

  /* Login */
  .login-glass { margin: 0.75rem; padding: 1.75rem 1.25rem; border-radius: 20px; }
  .login-logo-img { width: 64px; height: 64px; }
  .login-brand h1 { font-size: 1.2rem; }
  .login-brand p { font-size: 0.75rem; }
  .form-field input { padding: 0.75rem 0.875rem; font-size: 0.8rem; }
  .form-field label { font-size: 0.6rem; }
  .btn-primary { padding: 0.75rem; font-size: 0.8rem; }

  /* Modal fullscreen on mobile */
  .profile-modal {
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }
  .modal-overlay { padding: 0; align-items: stretch; }
  .profile-banner { height: 140px; }
  .profile-header { margin-top: -36px; padding: 0 0.875rem; gap: 0.6rem; }
  .profile-avatar, .profile-avatar-placeholder { width: 64px; height: 64px; border-width: 4px; }
  .profile-avatar-placeholder { font-size: 1.25rem; }
  .profile-status-dot { width: 14px; height: 14px; border-width: 3px; bottom: 2px; right: 2px; }
  .profile-name { font-size: 1rem; }
  .profile-discord-id { font-size: 0.6rem; }
  .profile-close { top: -48px; right: 0.625rem; width: 28px; height: 28px; font-size: 0.9rem; }
  .profile-body { padding: 0 0.875rem 1rem; }
  .profile-divider { margin: 0.5rem 0.875rem; }

  .profile-stats { grid-template-columns: 1fr 1fr 1fr; gap: 0.3rem; }
  .profile-stat-card { padding: 0.5rem 0.25rem; }
  .profile-stat-value { font-size: 0.8rem; }
  .profile-stat-label { font-size: 0.5rem; letter-spacing: 0.04em; }

  .profile-product { padding: 0.45rem 0.5rem; gap: 0.4rem; }
  .profile-product-name { font-size: 0.7rem; }
  .profile-product-price { font-size: 0.65rem; }
  .profile-product-date { font-size: 0.55rem; }
  .profile-product-badge { font-size: 0.5rem; padding: 0.1rem 0.35rem; }

  .profile-timeline-item { padding: 0.3rem 0.25rem; gap: 0.35rem; }
  .profile-timeline-dot { width: 5px; height: 5px; }
  .profile-timeline-date { font-size: 0.55rem; }
  .profile-timeline-text { font-size: 0.65rem; }
  .profile-timeline-amount { font-size: 0.6rem; }

  .profile-section-title { font-size: 0.6rem; }
  .profile-member-since { font-size: 0.6rem; }
  .profile-warning { font-size: 0.6rem; padding: 0.4rem 0.6rem; }
}

/* Very small screens */
@media (max-width: 360px) {
  .dashboard-main { padding: 0.5rem 0.375rem; }
  .card-featured { padding: 1rem; }
  .card-big-value { font-size: 1.15rem; }
  .revenue-row { gap: 0.375rem; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════
   NAV TABS — Sliding pill indicator
   ═══════════════════════════════════════ */

.nav-tabs {
  position: relative;
  display: flex;
  margin-left: 2rem;
  border-radius: 9px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-tab-indicator {
  position: absolute;
  top: 3px;
  height: calc(100% - 6px);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(0, 229, 208, 0.12), rgba(0, 229, 208, 0.04));
  border: 1px solid rgba(0, 229, 208, 0.12);
  box-shadow: 0 0 20px rgba(0, 229, 208, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.nav-tab {
  position: relative;
  z-index: 1;
  padding: 0.4rem 1.1rem;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-family: 'Sora', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: none;
}

.nav-tab:hover { color: var(--text-2); }

.nav-tab.active { color: var(--cyan); }

/* ═══════════════════════════════════════
   BOTS PAGE — Discloud Management
   ═══════════════════════════════════════ */

/* ── Overview bar ── */
.dc-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}

.dc-overview-left {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.dc-plan-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.3rem 0.6rem;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(0, 229, 208, 0.1), rgba(0, 153, 255, 0.06));
  border: 1px solid rgba(0, 229, 208, 0.12);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.dc-plan-badge svg { stroke: var(--cyan); opacity: 0.7; }

.dc-stat-pills {
  display: flex;
  gap: 1rem;
}

.dc-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  position: relative;
}

.dc-pill-label {
  color: var(--text-3);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dc-pill-value { color: var(--text-2); font-size: 0.72rem; }
.dc-pill-sep { color: var(--text-3); margin: 0 1px; }

.dc-pill-bar {
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.dc-pill-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dc-refresh-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.25s;
}

.dc-refresh-btn:hover {
  color: var(--cyan);
  border-color: rgba(0, 229, 208, 0.15);
  background: rgba(0, 229, 208, 0.04);
}

.dc-refresh-btn:active svg {
  animation: spin-once 0.6s ease;
}

@keyframes spin-once { to { transform: rotate(360deg); } }

/* ── Bot Grid ── */
.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}

/* ── Bot Card ── */
.card-bot {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}

.card-bot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  border-radius: 3px 0 0 3px;
  transition: background 0.3s;
}

.card-bot.is-online::before {
  background: linear-gradient(180deg, var(--green), rgba(0, 217, 126, 0.2));
  box-shadow: 0 0 10px rgba(0, 217, 126, 0.15);
}

.card-bot.is-offline::before {
  background: linear-gradient(180deg, var(--text-3), rgba(75, 107, 104, 0.2));
}

.card-bot:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.bot-inner {
  padding: 1.1rem 1.25rem;
}

/* ── Bot Header ── */
.bot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.bot-name-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--glass-border);
  object-fit: cover;
  flex-shrink: 0;
}

.bot-name {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.bot-id {
  font-size: 0.58rem;
  color: var(--text-3);
  margin-top: 2px;
}

.bot-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.bot-status-dot.online {
  background: var(--green);
  box-shadow: 0 0 6px rgba(0, 217, 126, 0.4);
  animation: pulse 2.5s ease-in-out infinite;
}

.bot-status-dot.offline {
  background: var(--text-3);
}

/* ── Bot Stats ── */
.bot-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 0.9rem;
  border-radius: 8px;
  overflow: hidden;
}

.bot-stat {
  text-align: center;
  padding: 0.5rem 0.25rem;
  background: rgba(255, 255, 255, 0.02);
}

.bot-stat:first-child { border-radius: 8px 0 0 8px; }
.bot-stat:last-child { border-radius: 0 8px 8px 0; }

.bot-stat-label {
  display: block;
  font-size: 0.55rem;
  color: var(--text-3);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.bot-stat-value {
  font-size: 0.72rem;
  color: var(--text);
}

/* ── Bot Actions ── */
.bot-actions {
  display: flex;
  gap: 4px;
}

.bot-action-btn {
  flex: 1;
  padding: 0.4rem 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  color: var(--text-3);
  font-family: 'Sora', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.bot-action-btn svg { width: 11px; height: 11px; flex-shrink: 0; }

.bot-action-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-border);
  color: var(--text-2);
}

.bot-action-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.bot-action-btn.start:hover  { color: var(--green); border-color: rgba(0, 217, 126, 0.15); background: rgba(0, 217, 126, 0.04); }
.bot-action-btn.restart:hover { color: var(--cyan);  border-color: rgba(0, 229, 208, 0.15); background: rgba(0, 229, 208, 0.04); }
.bot-action-btn.stop:hover    { color: var(--red);   border-color: rgba(240, 68, 68, 0.15); background: rgba(240, 68, 68, 0.04); }

/* ── Reseller Link Badge ── */
.bot-reseller-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 229, 208, 0.03);
  border: 1px solid rgba(0, 229, 208, 0.08);
}

.bot-reseller-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.bot-reseller-avatar-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-reseller-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-reseller-initials {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.bot-reseller-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.bot-reseller-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-reseller-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  color: var(--text-3);
}

.bot-reseller-id {
  font-family: 'IBM Plex Mono', monospace;
}

.bot-reseller-product {
  padding: 0 0.3rem;
  border-radius: 3px;
  background: rgba(0, 229, 208, 0.08);
  color: var(--cyan);
  font-size: 0.58rem;
  font-weight: 500;
}

.bot-reseller-status {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.bot-reseller-status.active {
  color: var(--green);
  background: rgba(0, 217, 126, 0.08);
  border: 1px solid rgba(0, 217, 126, 0.15);
}

.bot-reseller-status.paused {
  color: var(--amber);
  background: rgba(240, 177, 0, 0.08);
  border: 1px solid rgba(240, 177, 0, 0.15);
}

/* ── Logs Modal ── */
.bot-logs-pre {
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  padding: 1rem;
  max-height: 450px;
  overflow: auto;
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-all;
}

.bot-logs-pre::-webkit-scrollbar { width: 5px; }
.bot-logs-pre::-webkit-scrollbar-track { background: transparent; }
.bot-logs-pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

/* ═══════════════════════════════════════
   CREATE BOT PAGE
   ═══════════════════════════════════════ */

.cb-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Form Side ── */
.cb-form-card {
  padding: 2rem;
}

.cb-form-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.cb-form-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 208, 0.12), rgba(0, 153, 255, 0.08));
  border: 1px solid rgba(0, 229, 208, 0.15);
  color: var(--cyan);
  flex-shrink: 0;
}

.cb-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cb-form-subtitle {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 2px;
}

.cb-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cb-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.cb-section-label svg {
  color: var(--cyan);
  opacity: 0.6;
}

.cb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cb-token-wrap {
  position: relative;
  display: flex;
}

.cb-token-wrap input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.cb-token-wrap input:focus {
  border-color: var(--cyan-soft);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.cb-token-wrap input::placeholder { color: var(--text-3); }

.cb-token-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 42px;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-left: 1px solid var(--glass-border);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.cb-token-toggle:hover {
  color: var(--cyan);
  background: rgba(0, 229, 208, 0.04);
}

.cb-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0.25rem 0;
}

.cb-form-actions {
  margin-top: 0.5rem;
}

.cb-submit-btn {
  width: 100%;
}

.cb-submit-btn svg {
  stroke: currentColor;
}

/* ── Preview Side ── */
.cb-preview-card {
  padding: 1.25rem;
  position: sticky;
  top: 80px;
}

.cb-preview-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

/* ── Discord Embed ── */
.dc-embed {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  background: #2f3136;
}

.dc-embed-bar {
  width: 4px;
  flex-shrink: 0;
  background: var(--cyan);
}

.dc-embed-body {
  flex: 1;
  padding: 1rem 1rem 0.75rem;
  min-width: 0;
}

.dc-embed-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.dc-embed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #202225;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: #72767d;
}

.dc-embed-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.dc-embed-botname {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-embed-botname.dc-embed-placeholder {
  color: #72767d;
}

.dc-embed-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 3px;
  background: #5865f2;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  line-height: 1.4;
}

.dc-embed-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  color: #72767d;
  flex-shrink: 0;
  margin-left: auto;
}

.dc-embed-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #747f8d;
  border: 2px solid #2f3136;
}

.dc-embed-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.dc-embed-field {
  padding: 0.4rem 0;
}

.dc-embed-field-full {
  grid-column: 1 / -1;
}

.dc-embed-field-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: #dcddde;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dc-embed-field-value {
  font-size: 0.72rem;
  color: #b9bbbe;
  word-break: break-all;
}

.dc-embed-token {
  color: #72767d;
  letter-spacing: 0.05em;
}

.dc-embed-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.6rem;
  color: #72767d;
}

.dc-embed-footer-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: contain;
}

.dc-embed-footer-sep {
  margin: 0 2px;
}

/* 3-column field row */
.cb-field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Hint box */
.cb-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(0, 229, 208, 0.04);
  border: 1px solid rgba(0, 229, 208, 0.08);
  font-size: 0.68rem;
  color: var(--text-2);
  line-height: 1.5;
}

.cb-hint svg {
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Toggle switch */
.cb-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 100%;
  padding-top: 0.2rem;
}

.cb-toggle-wrap input[type="checkbox"] {
  display: none;
}

.cb-toggle {
  position: relative;
  width: 38px;
  height: 20px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.3s;
}

.cb-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform 0.3s, background 0.3s;
}

.cb-toggle-wrap input:checked + .cb-toggle {
  background: rgba(0, 229, 208, 0.2);
}

.cb-toggle-wrap input:checked + .cb-toggle::after {
  transform: translateX(18px);
  background: var(--cyan);
}

.cb-toggle-label {
  font-size: 0.7rem;
  color: var(--text-2);
}

/* Image preview fields */
.cb-image-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cb-image-field input {
  flex: 1;
}
.cb-image-preview {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.cb-image-preview-round {
  border-radius: 50%;
}

/* ── Dynamic Products List ── */
.cb-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cb-product-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cb-product-row .form-field {
  flex: 1;
  margin-bottom: 0;
}

.cb-product-row .cb-product-num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.cb-remove-product {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.cb-remove-product:hover {
  color: var(--red);
  border-color: rgba(240, 68, 68, 0.2);
  background: rgba(240, 68, 68, 0.05);
}

.cb-remove-product:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.cb-add-product-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.55rem;
  margin-top: 0.25rem;
  border-radius: 8px;
  border: 1px dashed rgba(0, 229, 208, 0.15);
  background: rgba(0, 229, 208, 0.02);
  color: var(--cyan);
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.cb-add-product-btn:hover {
  background: rgba(0, 229, 208, 0.06);
  border-color: rgba(0, 229, 208, 0.25);
}

/* Success embed bar */
.dc-embed-bar-green { background: #43b581; }
.dc-embed-bar-red { background: #f04747; }

/* Embed title row */
.dc-embed-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.dc-embed-title-icon {
  font-size: 1rem;
}

.dc-embed-title-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.dc-embed-desc {
  font-size: 0.75rem;
  color: #dcddde;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.dc-embed-desc-muted {
  color: #b9bbbe;
}

/* ── Language Selector ── */
.cb-lang-selector {
  display: flex;
  gap: 0.5rem;
}

.cb-lang-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg-input);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.25s;
  font-size: 0.78rem;
  font-weight: 500;
}

.cb-lang-btn:hover {
  border-color: rgba(0, 229, 208, 0.2);
  background: rgba(0, 229, 208, 0.04);
}

.cb-lang-btn.active {
  border-color: rgba(0, 229, 208, 0.4);
  background: rgba(0, 229, 208, 0.08);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 208, 0.08);
}

.cb-lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.cb-lang-name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Feature Toggles ── */
.cb-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.cb-feature-item {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg-input);
  transition: border-color 0.25s, opacity 0.3s;
  gap: 0.5rem;
}

.cb-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cb-feature-item:has(.cb-feature-top > .cb-toggle-wrap input:not(:checked)) {
  opacity: 0.5;
}

.cb-feature-item:has(.cb-feature-top > .cb-toggle-wrap input:not(:checked)) .cb-feature-name {
  text-decoration: line-through;
  color: var(--text-3);
}

.cb-feature-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cb-feature-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.25s, text-decoration 0.25s;
}

.cb-feature-desc {
  font-size: 0.62rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb-feature-item .cb-toggle-wrap {
  padding-top: 0;
  height: auto;
}

/* ── Feature Limits ── */
.cb-feature-limits {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.4rem;
}

.cb-limit-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--text-3);
  user-select: none;
}

.cb-limit-toggle:hover {
  color: var(--text-2);
}

.cb-limit-toggle .cb-limit-check {
  width: 13px;
  height: 13px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.cb-limit-fields {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.cb-limit-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cb-limit-field label {
  font-size: 0.65rem;
  color: var(--text-3);
  font-weight: 500;
}

.cb-limit-field input {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--text-1);
  width: 100%;
}

.cb-limit-field input:focus {
  border-color: var(--cyan-soft);
  outline: none;
}

/* ── Custom Texts Panel ── */
.cb-texts-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.cb-texts-header:hover {
  color: var(--text-2);
}

.cb-texts-chevron {
  margin-left: auto;
  transition: transform 0.3s;
  color: var(--text-3);
}

.cb-texts-header.open .cb-texts-chevron {
  transform: rotate(180deg);
}

.cb-texts-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: cbSlideDown 0.3s ease;
}

.cb-texts-panel.hidden {
  display: none;
}

@keyframes cbSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cb-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  outline: none;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.cb-textarea:focus {
  border-color: var(--cyan-soft);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.dc-embed-code-block {
  background: #202225;
  border-radius: 4px;
  padding: 0.5rem 0.65rem;
  font-size: 0.68rem;
  color: #43b581;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ── Custom Select (Reseller Combo) ── */
.cb-select {
  position: relative;
}

.cb-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
  text-align: left;
}

.cb-select-trigger:hover {
  border-color: var(--glass-border-hover);
}

.cb-select-trigger:focus,
.cb-select.open .cb-select-trigger {
  border-color: var(--cyan-soft);
  box-shadow: 0 0 0 3px var(--cyan-glow);
  outline: none;
}

.cb-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-select-value.placeholder {
  color: var(--text-3);
}

.cb-select-arrow {
  flex-shrink: 0;
  color: var(--text-3);
  transition: transform 0.25s;
}

.cb-select.open .cb-select-arrow {
  transform: rotate(180deg);
  color: var(--cyan);
}

.cb-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(12, 20, 30, 0.96);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-xs);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 208, 0.04);
  overflow: hidden;
  animation: cbDropIn 0.2s ease;
}

@keyframes cbDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cb-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-3);
}

.cb-select-search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
}

.cb-select-search::placeholder { color: var(--text-3); }

.cb-select-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.cb-select-list::-webkit-scrollbar { width: 4px; }
.cb-select-list::-webkit-scrollbar-track { background: transparent; }
.cb-select-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

.cb-select-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.cb-select-option:hover {
  background: rgba(0, 229, 208, 0.06);
}

.cb-select-option.selected {
  background: rgba(0, 229, 208, 0.1);
}

.cb-select-option-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0, 229, 208, 0.08);
  border: 1px solid rgba(0, 229, 208, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  overflow: hidden;
}

.cb-select-option-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-select-option-info {
  flex: 1;
  min-width: 0;
}

.cb-select-option-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb-select-option-meta {
  font-size: 0.6rem;
  color: var(--text-3);
  display: flex;
  gap: 0.6rem;
  margin-top: 1px;
}

.cb-select-option-id {
  font-family: 'IBM Plex Mono', monospace;
}

.cb-select-option-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.cb-select-option-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.cb-select-option-status-dot.ativo { background: var(--green); }
.cb-select-option-status-dot.pausado { background: var(--amber); }

.cb-select-option-check {
  color: var(--cyan);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.cb-select-option.selected .cb-select-option-check {
  opacity: 1;
}

.cb-select-empty {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-3);
}

/* Trigger with selected reseller */
.cb-select-trigger .cb-trigger-reseller {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.cb-trigger-reseller-avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 229, 208, 0.08);
  border: 1px solid rgba(0, 229, 208, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
  overflow: hidden;
}

.cb-trigger-reseller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-trigger-reseller-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb-trigger-reseller-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ── Deploy Progress ── */
.cb-progress {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-xs);
  background: rgba(0, 229, 208, 0.03);
  border: 1px solid rgba(0, 229, 208, 0.08);
  animation: cardIn 0.3s ease;
}

.cb-progress-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cb-progress-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 229, 208, 0.15);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin-once 0.8s linear infinite;
}

.cb-progress-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.cb-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cb-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
}

.cb-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(0, 229, 208, 0.3);
}

.cb-progress-percent {
  font-size: 0.72rem;
  color: var(--cyan);
  min-width: 32px;
  text-align: right;
}

.cb-progress-step {
  font-size: 0.65rem;
  color: var(--text-3);
}

/* ── Deploy Result ── */
.cb-result {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-xs);
  background: rgba(0, 217, 126, 0.04);
  border: 1px solid rgba(0, 217, 126, 0.12);
  text-align: center;
  animation: cardIn 0.4s ease;
}

.cb-result-icon {
  color: var(--green);
  margin-bottom: 0.75rem;
}

.cb-result-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cb-result-subtitle {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 1.25rem;
}

.cb-invite-box {
  text-align: left;
  margin-bottom: 1.25rem;
}

.cb-invite-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.cb-invite-row {
  display: flex;
  gap: 0;
}

.cb-invite-input {
  flex: 1;
  padding: 0.7rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-right: none;
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
  color: var(--cyan);
  font-size: 0.7rem;
  outline: none;
  cursor: text;
  min-width: 0;
}

.cb-invite-copy {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 208, 0.08);
  border: 1px solid rgba(0, 229, 208, 0.12);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--cyan);
  cursor: pointer;
  transition: all 0.2s;
}

.cb-invite-copy:hover {
  background: rgba(0, 229, 208, 0.15);
}

.cb-invite-copy.copied {
  background: rgba(0, 217, 126, 0.12);
  border-color: rgba(0, 217, 126, 0.2);
  color: var(--green);
}

.cb-new-bot-btn {
  border-color: rgba(0, 229, 208, 0.12);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cb-new-bot-btn:hover {
  background: rgba(0, 229, 208, 0.06);
  border-color: rgba(0, 229, 208, 0.2);
  color: var(--cyan);
}

/* Preview side: no sticky for multiple cards */
.cb-preview-side .cb-preview-card {
  position: static;
  margin-bottom: 1rem;
}

.cb-preview-side .cb-preview-card:first-child {
  position: sticky;
  top: 80px;
}

/* ── Create Bot Responsive ── */
@media (max-width: 900px) {
  .cb-layout {
    grid-template-columns: 1fr;
  }
  .cb-preview-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .cb-field-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .cb-form-card { padding: 1.25rem; }
  .cb-field-row { grid-template-columns: 1fr; }
  .cb-field-row-3 { grid-template-columns: 1fr; }
  .cb-form-header { gap: 0.75rem; }
  .cb-form-title { font-size: 1rem; }
  .dc-embed-fields { grid-template-columns: 1fr; }
}

/* ═══ BOTS RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav-tabs { margin-left: 1rem; }
  .nav-tab { padding: 0.35rem 0.8rem; font-size: 0.65rem; }
  .bots-grid { grid-template-columns: 1fr; }
  .dc-overview { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .dc-overview-left { flex-direction: column; gap: 0.75rem; }
  .dc-stat-pills { gap: 0.75rem; }
  .dc-refresh-btn { align-self: flex-end; margin-top: -2rem; }
}

@media (max-width: 480px) {
  .nav-tabs { margin-left: 0.6rem; }
  .nav-tab { padding: 0.3rem 0.6rem; font-size: 0.6rem; }
  .bots-grid { grid-template-columns: 1fr; }
  .bot-stats { grid-template-columns: repeat(2, 1fr); }
  .bot-actions { flex-wrap: wrap; }
  .bot-action-btn { flex: 0 0 calc(33.33% - 3px); }
}

/* ═══════════════════════════════════════
   MEME MODE — DVD Bouncing Monke
   ═══════════════════════════════════════ */

.meme-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  overflow: hidden;
}

.meme-monke {
  position: absolute;
  width: 120px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 12px rgba(255, 0, 100, 0.4));
  animation: meme-dvd-x 4.7s linear infinite alternate, meme-dvd-y 3.3s linear infinite alternate;
}

@keyframes meme-dvd-x {
  0% { left: 0; }
  100% { left: calc(100% - 120px); }
}

@keyframes meme-dvd-y {
  0% { top: 0; }
  100% { top: calc(100% - 120px); }
}

/* Flash on click */
.meme-flash {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  animation: meme-flash-in 0.6s ease forwards;
}

.meme-flash.hidden {
  display: none;
}

.meme-flash-img {
  width: 220px;
  height: auto;
  animation: meme-flash-shake 0.4s ease;
}

@keyframes meme-flash-in {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes meme-flash-shake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.15); }
  50% { transform: rotate(8deg) scale(1.2); }
  75% { transform: rotate(-4deg) scale(1.1); }
}

/* Meme toggle on login */
.meme-disable-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.65rem;
  color: var(--text-3);
  user-select: none;
}

.meme-disable-wrap label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meme-disable-wrap input {
  accent-color: var(--cyan);
  cursor: pointer;
}
