/* CidiaBoost — Main CSS */
/* Complements Tailwind CDN */

:root {
  --bg-900:    #0b0b1a;
  --bg-800:    #111128;
  --bg-700:    #16162e;
  --bg-card:   #1a1a35;
  --bg-card2:  #1f1f3a;
  --border:    rgba(255,255,255,.07);
  --border2:   rgba(255,255,255,.12);
  --text-1:    #f0f0fa;
  --text-2:    #a0a0c0;
  --text-3:    #606080;
  --purple:    #7c3aed;
  --purple-l:  #8b5cf6;
  --purple-ll: #a78bfa;
  --indigo:    #4f46e5;
  --cyan:      #06b6d4;
  --green:     #22c55e;
  --red:       #ef4444;
  --yellow:    #f59e0b;
  --orange:    #f97316;
}

* { box-sizing: border-box; }

body {
  background: var(--bg-900);
  color: var(--text-1);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.4); border-radius: 99px; }

/* ── Selection ─────────────────────────────────────────────── */
::selection { background: rgba(124,58,237,.4); color: #fff; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.card-sm { padding: 14px; }
.card-hover:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
  transition: .2s;
}

/* ── Sidebar ─────────────────────────────────────────────────  */
.sidebar {
  background: var(--bg-800);
  border-right: 1px solid var(--border);
  width: 240px;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  display: flex; flex-direction: column;
  transition: transform .25s ease;
  z-index: 50;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin: 1px 6px;
  transition: .15s;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(124,58,237,.15);
  color: var(--purple-ll);
}
.sidebar-link.active { background: rgba(124,58,237,.2); color: #fff; }
.sidebar-link .icon { width: 18px; text-align: center; opacity: .8; }

/* ── Topbar ──────────────────────────────────────────────────  */
.topbar {
  background: var(--bg-800);
  border-bottom: 1px solid var(--border);
  height: 58px;
  position: sticky; top: 0;
  z-index: 40;
  padding: 0 20px;
  display: flex; align-items: center;
}

/* ── Buttons ─────────────────────────────────────────────────  */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  text-decoration: none;
  transition: .15s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--indigo));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-secondary {
  background: var(--bg-card2);
  color: var(--text-1);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: rgba(255,255,255,.05); }
.btn-success  { background: rgba(34,197,94,.15);  color: var(--green);  border: 1px solid rgba(34,197,94,.3); }
.btn-danger   { background: rgba(239,68,68,.15);  color: var(--red);    border: 1px solid rgba(239,68,68,.3);  }
.btn-warning  { background: rgba(245,158,11,.15); color: var(--yellow); border: 1px solid rgba(245,158,11,.3); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ────────────────────────────────────────────────── */
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-700);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text-1);
  padding: 10px 14px;
  font-size: 14px;
  transition: border .15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--purple-l);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.form-input::placeholder { color: var(--text-3); }
.form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.form-group { margin-bottom: 16px; }
.form-error { color: var(--red); font-size: 12px; margin-top: 4px; }

/* ── Tables ──────────────────────────────────────────────────  */
.table-wrap { overflow-x: auto; }
.cb-table { width: 100%; border-collapse: collapse; }
.cb-table th {
  background: var(--bg-card2);
  color: var(--text-2);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}
.cb-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  font-size: 13px;
  vertical-align: middle;
}
.cb-table tr:last-child td { border-bottom: none; }
.cb-table tbody tr:hover { background: rgba(255,255,255,.02); }

/* ── Badges / Status ─────────────────────────────────────────  */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  border: 1px solid transparent;
  text-transform: capitalize;
}
.badge-green  { background: rgba(34,197,94,.12);  color: #4ade80; border-color: rgba(34,197,94,.25);  }
.badge-red    { background: rgba(239,68,68,.12);  color: #f87171; border-color: rgba(239,68,68,.25);  }
.badge-yellow { background: rgba(245,158,11,.12); color: #fbbf24; border-color: rgba(245,158,11,.25); }
.badge-blue   { background: rgba(59,130,246,.12); color: #60a5fa; border-color: rgba(59,130,246,.25); }
.badge-purple { background: rgba(139,92,246,.12); color: #a78bfa; border-color: rgba(139,92,246,.25); }
.badge-orange { background: rgba(249,115,22,.12); color: #fb923c; border-color: rgba(249,115,22,.25); }
.badge-gray   { background: rgba(107,114,128,.12);color: #9ca3af; border-color: rgba(107,114,128,.25);}

/* ── Stats cards ─────────────────────────────────────────────  */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), var(--indigo)); }
.stat-card.green::before  { background: linear-gradient(90deg, #16a34a, #22c55e); }
.stat-card.blue::before   { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.stat-card.orange::before { background: linear-gradient(90deg, #c2410c, #f97316); }

/* ── Wallet card ─────────────────────────────────────────────  */
.wallet-card {
  background: linear-gradient(135deg, #1e0545 0%, #2d1065 50%, #1e0545 100%);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 16px;
  padding: 24px;
  position: relative; overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(139,92,246,.3), transparent 70%);
  border-radius: 50%;
}

/* ── Alerts ──────────────────────────────────────────────────  */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid transparent;
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px;
}
.alert-success { background: rgba(34,197,94,.1);  border-color: rgba(34,197,94,.2);  color: #4ade80; }
.alert-error   { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.2);  color: #f87171; }
.alert-info    { background: rgba(59,130,246,.1);  border-color: rgba(59,130,246,.2); color: #60a5fa; }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.2); color: #fbbf24; }

/* ── Platform icons ──────────────────────────────────────────  */
.platform-ig     { color: #e1306c; }
.platform-tiktok { color: #69c9d0; }
.platform-yt     { color: #ff0000; }
.platform-fb     { color: #1877f2; }
.platform-tw     { color: #1da1f2; }
.platform-tg     { color: #2ca5e0; }
.platform-wa     { color: #25d366; }

/* ── Timer ring ──────────────────────────────────────────────  */
.timer-ring svg { transform: rotate(-90deg); }
.timer-ring .track { stroke: rgba(255,255,255,.1); fill: none; }
.timer-ring .progress { fill: none; stroke-linecap: round; transition: stroke-dashoffset .5s; }

/* ── Loader ──────────────────────────────────────────────────  */
.cb-loader {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--purple-l);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────────  */
#toast-container {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: slideIn .25s ease;
  max-width: 320px;
}
@keyframes slideIn { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red);   }
.toast-info    { border-left: 3px solid var(--indigo); }

/* ── Modal ───────────────────────────────────────────────────  */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: 100%; max-width: 480px;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: scale(.95); opacity:0; } to { transform: scale(1); opacity:1; } }

/* ── Gradient text ───────────────────────────────────────────  */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Copy button ─────────────────────────────────────────────  */
.copy-btn { cursor: pointer; transition: .15s; }
.copy-btn:hover { opacity: .7; }
.copy-btn.copied { color: var(--green) !important; }

/* ── Mobile ──────────────────────────────────────────────────  */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,.6); }
  .main-content { margin-left: 0 !important; }
}

/* ── Skeleton loader ─────────────────────────────────────────  */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
