/* FastLikePro — dark theme styles */
:root {
  --bg: #0d1117;
  --bg-elev: #161b22;
  --border: #30363d;
  --muted: #8b949e;
  --text: #e6edf3;
  --accent-from: #7c3aed;
  --accent-to: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Prompt', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a {
  color: #a78bfa;
  text-decoration: none;
}
a:hover { color: #f0abfc; }

.gradient-text {
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.btn-gradient {
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  color: #fff !important;
  border: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}
.btn-gradient:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  color: #fff !important;
}

.btn-outline-light-custom {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline-light-custom:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-color: #555;
}

.navbar-fast {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-fast .navbar-brand { font-weight: 700; font-size: 1.35rem; }
.navbar-fast .nav-link { color: #cbd5e1 !important; }
.navbar-fast .nav-link:hover { color: #fff !important; }

.card-dark {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
}
.card-dark .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1200px 200px at 0% 0%, rgba(124,58,237,0.12), transparent 40%),
              radial-gradient(900px 200px at 100% 100%, rgba(236,72,153,0.10), transparent 40%);
  pointer-events: none;
}
.stat-card .stat-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; margin-top: 0.25rem; }

.form-control, .form-select {
  background: #0b0f15;
  color: var(--text);
  border: 1px solid var(--border);
}
.form-control:focus, .form-select:focus {
  background: #0b0f15;
  color: var(--text);
  border-color: #7c3aed;
  box-shadow: 0 0 0 0.2rem rgba(124,58,237,0.25);
}
.form-control::placeholder { color: #64748b; }

.table-dark-custom {
  background: transparent;
  color: var(--text);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.table-dark-custom thead th {
  background: #0b0f15;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
}
.table-dark-custom tbody td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid #21262d;
  vertical-align: middle;
}
.table-dark-custom tbody tr:hover { background: rgba(255,255,255,0.02); }

.badge-pill {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-pending { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.badge-processing { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.35); }
.badge-completed { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.35); }
.badge-failed { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.35); }
.badge-approved { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.35); }
.badge-rejected { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.35); }

/* Landing page */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.35), transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(236,72,153,0.25), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; line-height: 1.1; }
.hero p.lead { color: #cbd5e1; font-size: 1.15rem; }

.category-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-3px);
  border-color: #7c3aed;
  box-shadow: 0 12px 30px rgba(124,58,237,0.25);
}
.category-card .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(236,72,153,0.25));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.category-card h5 { font-weight: 700; }

.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  height: 100%;
}
.feature-card .ficon {
  font-size: 2rem;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.5rem;
  display: block;
}

/* Sidebar layout for panel/admin */
.layout-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  min-height: calc(100vh - 70px);
}
@media (max-width: 900px) {
  .layout-wrap { grid-template-columns: 1fr; padding: 1rem; }
  .sidebar { position: static !important; }
}
.sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  position: sticky;
  top: 86px;
  height: fit-content;
}
.sidebar .side-head {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.75rem;
}
.sidebar a.side-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  color: #cbd5e1;
  margin-bottom: 0.15rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar a.side-link:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}
.sidebar a.side-link.active {
  background: linear-gradient(90deg, rgba(124,58,237,0.2), rgba(236,72,153,0.2));
  color: #fff;
  border: 1px solid rgba(124,58,237,0.4);
}

.content-area { min-width: 0; }
.page-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; }

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,58,237,0.18), rgba(236,72,153,0.18));
  border: 1px solid rgba(124,58,237,0.35);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.footer {
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.alert-soft-danger { background: rgba(239,68,68,0.1); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.alert-soft-success { background: rgba(16,185,129,0.1); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); }
.alert-soft-warning { background: rgba(245,158,11,0.1); color: #fcd34d; border: 1px solid rgba(245,158,11,0.25); }
.alert-soft-info { background: rgba(59,130,246,0.1); color: #93c5fd; border: 1px solid rgba(59,130,246,0.25); }

.price-tag {
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

hr.soft { border-color: var(--border); opacity: 1; }

.cat-pill {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(139,92,246,0.18);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,0.35);
  white-space: nowrap;
}

.slip-thumb {
  max-width: 100px;
  max-height: 100px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}

/* ══════════════════════════════════════════════════════════════════════════
   Bootstrap dark-theme overrides
   Bootstrap 5 defaults to light-mode colors; these patches ensure every
   Bootstrap utility/component is legible on our dark background.
   ══════════════════════════════════════════════════════════════════════════ */

/* text-muted: Bootstrap default ≈ #6c757d (dark text on dark bg → invisible)
   Override to our --muted (#8b949e) which passes WCAG AA on all our surfaces. */
.text-muted { color: #8b949e !important; }

/* Form labels: full brightness so they're clearly readable */
.form-label { color: var(--text) !important; }

/* Improve placeholder contrast: #64748b → #8b949e */
.form-control::placeholder { color: #8b949e; }

/* alert-secondary: Bootstrap uses cream background + dark text (light-mode only).
   Restyle to match our dark palette. */
.alert-secondary {
  background: rgba(139,148,158,0.12);
  color: #cbd5e1;
  border: 1px solid rgba(139,148,158,0.30);
}

/* code elements: Bootstrap default pink on dark bg can look odd */
code {
  color: #f0abfc;
  background: rgba(240,171,252,0.10);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.875em;
}

/* Navbar toggler: Bootstrap default icon has dark stroke → invisible on dark navbar */
.navbar-fast .navbar-toggler {
  border-color: rgba(255,255,255,0.25);
}
.navbar-fast .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu: restyle to match dark theme instead of Bootstrap's #343a40 */
.dropdown-menu-dark {
  background: #161b22;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.dropdown-menu-dark .dropdown-item { color: #cbd5e1; }
.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
  background: rgba(255,255,255,0.07);
  color: #fff;
}
.dropdown-menu-dark .dropdown-item:active {
  background: rgba(124,58,237,0.25);
  color: #fff;
}

/* Bootstrap badge overrides (used in admin security page) */
.badge.bg-success {
  background: rgba(16,185,129,0.2) !important;
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.35);
}
.badge.bg-secondary {
  background: rgba(139,148,158,0.2) !important;
  color: #cbd5e1;
  border: 1px solid rgba(139,148,158,0.35);
}
.badge.bg-danger  { background: rgba(239,68,68,0.2) !important; color: #f87171; border: 1px solid rgba(239,68,68,0.35); }
.badge.bg-warning { background: rgba(245,158,11,0.2) !important; color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.badge.bg-info    { background: rgba(59,130,246,0.2) !important; color: #93c5fd; border: 1px solid rgba(59,130,246,0.35); }
.badge.bg-primary { background: rgba(124,58,237,0.2) !important; color: #c4b5fd; border: 1px solid rgba(124,58,237,0.35); }

/* Bootstrap .small / <small> inherits correctly; no override needed.
   Bootstrap table th inside our custom table: already handled by .table-dark-custom.
   Bootstrap .nav-link: already overridden in .navbar-fast. */
