/* ═══════════════════════════════════════════════════════════
   Fynix — Modern Dark Theme
   Premium SaaS-grade UI
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #0f0f1a;
  --bg-card: #141422;
  --bg-card-hover: #1a1a2e;
  --bg-input: #181830;
  --bg-hover: #1e1e38;
  --bg-elevated: #1c1c32;
  --border: #1f1f3a;
  --border-light: #2a2a4a;
  --text-primary: #f0f0f8;
  --text-secondary: #a0a0c0;
  --text-muted: #5a5a7a;
  --accent: #7c5cfc;
  --accent-hover: #6a4aea;
  --accent-soft: rgba(124, 92, 252, 0.12);
  --accent-glow: rgba(124, 92, 252, 0.25);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.08);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(20, 20, 34, 0.7);
  --glass-border: rgba(255, 255, 255, 0.06);
  --sidebar-width: 260px;
}

/* ─── Reset & Base ────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 1.75rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.125rem;
}

img {
  max-width: 100%;
  display: block;
}
code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: var(--bg-input);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
small {
  font-size: 0.85em;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── Forms ───────────────────────────────────────────── */

input,
select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  width: 100%;
  transition: var(--transition);
  font-family: inherit;
  outline: none;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-light);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    var(--shadow-glow);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}
textarea {
  resize: vertical;
  min-height: 100px;
}
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a5a7a' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.form-group {
  margin-bottom: 18px;
}
.form-row {
  display: flex;
  gap: 16px;
}
.form-row .form-group {
  flex: 1;
}
.form-hint,
small.text-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-group input[type='checkbox'] {
  width: auto;
}
input[type='checkbox'] {
  width: auto;
  accent-color: var(--accent);
  cursor: pointer;
}
input[type='color'] {
  width: 50px;
  height: 38px;
  padding: 3px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ─── Buttons ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #9b6dff 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #8a5cf0 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: #dc2626;
  color: #fff;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}
.btn-success:hover {
  background: #16a34a;
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}
.btn-block {
  display: flex;
  width: 100%;
  text-align: center;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
}

/* ─── Cards ───────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.card:not(.no-hover):hover {
  border-color: var(--border-light);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.card-header h3 {
  margin: 0;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.card + .card {
  margin-top: 20px;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ─── Stats Boxes ─────────────────────────────────────── */

.stat-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #9b6dff);
  opacity: 0;
  transition: var(--transition);
}
.stat-box:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-box:hover::before {
  opacity: 1;
}
.stat-box .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 8px;
}
.stat-box .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.stat-box .stat-value.accent {
  color: var(--accent);
}

/* ─── Tables ──────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 12px 16px;
  text-align: left;
}
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}
td {
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: var(--bg-hover);
  color: var(--text-primary);
}
td a {
  color: var(--accent);
  font-weight: 500;
}

/* ─── Badges ──────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge-danger,
.badge-error {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-info {
  background: var(--info-soft);
  color: var(--info);
}
.badge-secondary {
  background: rgba(160, 160, 192, 0.1);
  color: var(--text-secondary);
}

/* ─── Flash Messages ──────────────────────────────────── */

.flash {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash-success {
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--success);
}
.flash-error {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
.flash-info {
  background: var(--info-soft);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--info);
}
.flash-warning {
  background: var(--warning-soft);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* ─── Pagination ──────────────────────────────────────── */

.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 28px;
}
.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.pagination a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.pagination .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════════════════════ */

.auth-wrapper,
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(124, 92, 252, 0.06) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(155, 109, 255, 0.04) 0%,
      transparent 50%
    ),
    var(--bg-primary);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #9b6dff, var(--accent));
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #b794ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.auth-logo p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-footer a {
  color: var(--accent);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD & ADMIN LAYOUT
   ═══════════════════════════════════════════════════════════ */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo h1 {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #b794ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.sidebar-logo p {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-top: 2px;
}

.sidebar-section-label {
  padding: 20px 24px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.sidebar-nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}
.sidebar-nav li {
  margin: 2px 12px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 450;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  position: relative;
}
.sidebar-nav .nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar-nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  flex-shrink: 0;
  transition: var(--transition);
}
.sidebar-nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-nav a:hover svg,
.sidebar-nav a:hover .nav-icon {
  opacity: 1;
}
.sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.sidebar-nav a.active svg,
.sidebar-nav a.active .nav-icon {
  opacity: 1;
  color: var(--accent);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.sidebar-footer a:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.sidebar-footer a svg {
  width: 18px;
  height: 18px;
  opacity: 0.5;
}

/* ─── Main Content ────────────────────────────────────── */

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px;
  min-height: 100vh;
  background:
    radial-gradient(
      ellipse at 70% 10%,
      rgba(124, 92, 252, 0.03) 0%,
      transparent 50%
    ),
    var(--bg-primary);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-header .page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.main-header h1 {
  font-size: 1.6rem;
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════ */

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.landing-nav .logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #b794ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.landing-nav .nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.landing-nav .nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}
.landing-nav .nav-links a:hover {
  color: var(--text-primary);
}

/* Hero */
.hero {
  text-align: center;
  padding: 120px 48px 100px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(124, 92, 252, 0.12) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 30% 80%,
      rgba(155, 109, 255, 0.06) 0%,
      transparent 40%
    ),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -60%);
  background: radial-gradient(
    circle,
    rgba(124, 92, 252, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 252, 0.2);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  position: relative;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--accent), #b794ff, #d4b0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-cta .btn-primary {
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
}
.hero-cta .btn-ghost {
  padding: 14px 28px;
  font-size: 1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Features */
.features {
  padding: 100px 48px;
  max-width: 1100px;
  margin: 0 auto;
}
.features .section-header {
  text-align: center;
  margin-bottom: 56px;
}
.features .section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.features .section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-card:hover::after {
  opacity: 1;
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  font-weight: 600;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* How It Works */
.how-it-works {
  padding: 100px 48px;
  background:
    radial-gradient(
      ellipse at 50% 50%,
      rgba(124, 92, 252, 0.04) 0%,
      transparent 60%
    ),
    var(--bg-secondary);
}
.how-it-works .section-header {
  text-align: center;
  margin-bottom: 56px;
}
.how-it-works .section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.how-it-works .section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.step {
  text-align: center;
  padding: 24px 16px;
  position: relative;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9b6dff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.3);
}
.step h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}
.step p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Pricing */
.pricing {
  padding: 100px 48px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.pricing .section-header {
  margin-bottom: 40px;
}
.pricing .section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.pricing .section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #9b6dff, #d4b0ff);
}
.pricing-amount {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #b794ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.pricing-detail {
  color: var(--text-secondary);
  margin: 8px 0 24px;
  font-size: 0.95rem;
}
.pricing-features {
  list-style: none;
  text-align: left;
  margin: 24px 0;
}
.pricing-features li {
  padding: 10px 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.93rem;
}
.pricing-features li .check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* CTA */
.cta {
  padding: 100px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% 50%,
      rgba(124, 92, 252, 0.1) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.cta h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.cta .btn-primary {
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Footer */
.landing-footer {
  padding: 40px 48px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.landing-footer a {
  color: var(--text-secondary);
  margin: 0 14px;
  font-weight: 500;
  transition: var(--transition);
}
.landing-footer a:hover {
  color: var(--text-primary);
}
.landing-footer p {
  margin-top: 14px;
}

/* ═══════════════════════════════════════════════════════════
   STORE / WEBSTORE
   ═══════════════════════════════════════════════════════════ */

.store-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.store-nav .store-name {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.store-nav .store-name img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.store-nav .store-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.store-nav .store-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}
.store-nav .store-links a:hover {
  color: var(--text-primary);
}

.store-banner {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.store-announcement {
  background: var(--accent-soft);
  border-bottom: 1px solid rgba(124, 92, 252, 0.2);
  padding: 10px 32px;
  color: var(--accent);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.store-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.category-tabs a {
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.category-tabs a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.category-tabs a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition-slow);
}
.product-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-input);
}
.product-card-body {
  padding: 18px;
}
.product-card-name {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.product-card-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.product-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.product-card-price .original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-right: 8px;
  font-weight: 400;
}
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-list-item {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
}
.product-list-item:hover {
  border-color: var(--border-light);
}
.product-list-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.product-list-info {
  flex: 1;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.product-detail-img {
  width: 100%;
  border-radius: var(--radius-lg);
}
.product-detail-name {
  font-size: 1.6rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.product-detail-category {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.85rem;
}
.product-detail-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}
.product-detail-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

.out-of-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.featured-badge {
  display: inline-flex;
  align-items: center;
  background: var(--warning-soft);
  color: var(--warning);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Cart */
.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.cart-item-info {
  flex: 1;
}
.cart-item-name {
  font-weight: 600;
}
.cart-item-price {
  color: var(--accent);
  font-weight: 600;
}
.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-qty input {
  width: 60px;
  text-align: center;
}
.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}
.cart-summary-total {
  font-size: 1.15rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 8px;
}

/* Checkout */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}
.checkout-summary {
  position: sticky;
  top: 100px;
}
#stripe-elements {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
}
#payment-button {
  margin-top: 16px;
}

/* Store Footer */
.store-footer {
  padding: 28px 32px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 60px;
}
.store-footer a {
  color: var(--text-secondary);
  font-weight: 500;
}
.store-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════
   ERROR PAGES
   ═══════════════════════════════════════════════════════════ */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      rgba(124, 92, 252, 0.06) 0%,
      transparent 60%
    ),
    var(--bg-primary);
}
.error-code {
  font-size: 7rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #b794ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  line-height: 1;
}
.error-message {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin: 12px 0 28px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }
  .hero {
    padding: 80px 24px 60px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  .features,
  .how-it-works,
  .pricing,
  .cta {
    padding: 60px 24px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .landing-nav {
    padding: 14px 20px;
  }
  .landing-nav .nav-links {
    gap: 16px;
  }
  .landing-nav .nav-links a:not(.btn) {
    display: none;
  }
  .stat-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .auth-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .stat-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero-cta {
    flex-direction: column;
  }
}

/* ─── Utilities ───────────────────────────────────────── */

.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-muted {
  color: var(--text-muted);
}
.text-accent {
  color: var(--accent);
}
.text-success {
  color: var(--success);
}
.text-danger {
  color: var(--danger);
}
.text-warning {
  color: var(--warning);
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}
.d-flex {
  display: flex;
}
.gap-1 {
  gap: 8px;
}
.gap-2 {
  gap: 16px;
}
.gap-3 {
  gap: 24px;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.flex-wrap {
  flex-wrap: wrap;
}
.w-100 {
  width: 100%;
}
.hidden {
  display: none;
}

/* ─── Filter/Toolbar Bar ──────────────────────────────── */

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.toolbar input,
.toolbar select {
  width: auto;
  min-width: 160px;
}
.toolbar input[type='text'] {
  flex: 1;
  min-width: 200px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-tabs a {
  padding: 7px 18px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
}
.filter-tabs a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.filter-tabs a.active,
.filter-tabs a.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.25);
}

/* ─── Empty State ─────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state p {
  font-size: 0.95rem;
}

/* ─── Inline forms (tables) ──────────────────────────── */

td form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
td form input[type='text'] {
  width: auto;
  min-width: 80px;
  padding: 5px 10px;
  font-size: 0.82rem;
}

/* ─── Action row (product form) ──────────────────────── */

.action-row {
  padding: 20px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
