@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a28;
  --bg4: #222235;
  --card: #14141f;
  --border: #2a2a3d;
  --text: #e8e8f0;
  --text2: #9898b0;
  --text3: #686880;
  --accent: #e50914;
  --accent2: #ff2d3a;
  --accent-glow: rgba(229, 9, 20, 0.15);
  --green: #00d97e;
  --yellow: #ffc107;
  --blue: #3b82f6;
  --purple: #a855f7;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Outfit', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; transition: all 0.2s; }
a:hover { color: #ff5566; }

/* ====== NAVBAR ====== */
.navbar {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
}

.nav-brand span { color: var(--text); }

.nav-links { display: flex; gap: 0.25rem; align-items: center; }
.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--bg3);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent2); }
.btn-success { background: var(--green); color: #000; }
.btn-danger { background: var(--red); color: #fff; }
.btn-warning { background: var(--yellow); color: #000; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ====== CARDS ====== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s;
}

.card:hover { border-color: rgba(229, 9, 20, 0.3); }

/* ====== FORMS ====== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text2);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ====== CONTAINERS ====== */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.container-sm { max-width: 480px; }
.container-md { max-width: 720px; }

/* ====== GRID ====== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ====== STATS ====== */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card .stat-label { font-size: 0.75rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }

/* ====== BADGES ====== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending { background: rgba(255, 193, 7, 0.15); color: var(--yellow); }
.badge-approved { background: rgba(0, 217, 126, 0.15); color: var(--green); }
.badge-rejected { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.badge-active { background: rgba(0, 217, 126, 0.15); color: var(--green); }
.badge-expired { background: rgba(104, 104, 128, 0.15); color: var(--text3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--blue); }

/* ====== TABLE ====== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  text-align: left;
  padding: 0.875rem 1rem;
  background: var(--bg3);
  color: var(--text3);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}

tr:hover { background: rgba(255, 255, 255, 0.02); }

/* ====== ALERTS ====== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-success { background: rgba(0, 217, 126, 0.1); border: 1px solid rgba(0, 217, 126, 0.3); color: var(--green); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--red); }
.alert-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--blue); }
.alert-warning { background: rgba(255, 193, 7, 0.1); border: 1px solid rgba(255, 193, 7, 0.3); color: var(--yellow); }

/* ====== PACKAGE CARDS ====== */
.pkg-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: all 0.3s;
}

.pkg-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 10px 40px rgba(229, 9, 20, 0.1); }
.pkg-card.popular { border-color: var(--accent); }
.pkg-card.popular::before {
  content: 'POPULAR';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.pkg-price { font-size: 2.5rem; font-weight: 800; margin: 1rem 0; }
.pkg-price .currency { font-size: 1rem; vertical-align: super; color: var(--text3); }
.pkg-price .period { font-size: 0.8rem; color: var(--text3); font-weight: 400; }

.pkg-features { list-style: none; margin: 1.5rem 0; text-align: left; }
.pkg-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text2);
}
.pkg-features li::before { content: '✓ '; color: var(--green); font-weight: 700; margin-right: 0.5rem; }

/* ====== HERO ====== */
.hero {
  text-align: center;
  padding: 5rem 2rem;
  background: radial-gradient(ellipse at center top, rgba(229, 9, 20, 0.08), transparent 70%);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero h1 .highlight { color: var(--accent); }
.hero p { font-size: 1.125rem; color: var(--text2); max-width: 600px; margin: 0 auto 2rem; }

/* ====== SECTION HEADER ====== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 { font-size: 1.25rem; font-weight: 700; }

/* ====== TOOL CARD ====== */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
}

.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tool-info { flex: 1; }
.tool-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.tool-info p { font-size: 0.8rem; color: var(--text3); }

/* ====== CHECKOUT ====== */
.payment-box {
  background: var(--bg3);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.payment-number {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  margin: 0.5rem 0;
  user-select: all;
}

/* ====== AUTH PAGES ====== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(229, 9, 20, 0.05), transparent 60%);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; text-align: center; }
.auth-card .subtitle { color: var(--text3); text-align: center; margin-bottom: 2rem; font-size: 0.875rem; }

/* ====== ADMIN SIDEBAR ====== */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 250px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
}

.admin-sidebar .brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.admin-sidebar .brand h2 { font-size: 1.1rem; font-weight: 700; }
.admin-sidebar .brand p { font-size: 0.75rem; color: var(--text3); }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text2);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav a:hover { background: var(--bg3); color: var(--text); }
.admin-nav a.active { background: var(--accent-glow); color: var(--accent2); border-left-color: var(--accent); }

.admin-nav .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-content { margin-left: 250px; padding: 2rem; flex: 1; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
  .navbar { padding: 0 1rem; }
  .container { padding: 1rem; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

/* ====== INVOICE ====== */
.invoice-number {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent2);
  background: var(--bg3);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ====== ANNOUNCEMENT ====== */
.announcement {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border-left: 4px solid;
}

.announcement.info { background: rgba(59, 130, 246, 0.08); border-color: var(--blue); }
.announcement.warning { background: rgba(255, 193, 7, 0.08); border-color: var(--yellow); }
.announcement.success { background: rgba(0, 217, 126, 0.08); border-color: var(--green); }
.announcement .ann-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.announcement .ann-msg { font-size: 0.8rem; color: var(--text2); }

/* ====== SKELETON ====== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text3);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ====== TABS ====== */
.tabs { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-btn {
  padding: 0.625rem 1.25rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}

/* Screenshot preview */
.screenshot-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.text-muted { color: var(--text3); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
