/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #4F46E5;
  --primary-dark:  #3730A3;
  --primary-light: #EEF2FF;
  --accent:        #EC4899;
  --dark:          #111827;
  --gray-700:      #374151;
  --gray-500:      #6B7280;
  --gray-300:      #D1D5DB;
  --gray-100:      #F3F4F6;
  --bg:            #F9FAFB;
  --white:         #FFFFFF;
  --success:       #10B981;
  --success-light: #D1FAE5;
  --warning:       #F59E0B;
  --warning-light: #FEF3C7;
  --danger:        #EF4444;
  --danger-light:  #FEE2E2;
  --info:          #3B82F6;
  --info-light:    #DBEAFE;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow:     0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.12);
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  18px;
  --font:       'Inter', sans-serif;
  --transition: .18s ease;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* ─── Utility ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); font-size: .875rem; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 20px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.btn-secondary { background: var(--gray-700); color: #fff; }
.btn-secondary:hover { background: var(--dark); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost     { background: transparent; color: var(--gray-700); border: 2px solid var(--gray-300); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-block { width: 100%; }

/* ─── Form ─── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: .875rem; font-weight: 600; color: var(--gray-700); }
.form-control {
  padding: 10px 14px; border: 2px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: .9rem; transition: border-color var(--transition); background: var(--white);
  width: 100%;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: .78rem; color: var(--gray-500); }
.form-error { font-size: .82rem; color: var(--danger); font-weight: 500; }

/* ─── Cards ─── */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }

/* ─── Badge ─── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-success  { background: var(--success-light); color: #065F46; }
.badge-warning  { background: var(--warning-light); color: #92400E; }
.badge-danger   { background: var(--danger-light); color: #991B1B; }
.badge-info     { background: var(--info-light); color: #1E40AF; }
.badge-gray     { background: var(--gray-100); color: var(--gray-700); }

/* ─── Alert ─── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; margin-bottom: 12px; }
.alert-success { background: var(--success-light); color: #065F46; }
.alert-danger  { background: var(--danger-light);  color: #991B1B; }
.alert-warning { background: var(--warning-light); color: #92400E; }
.alert-info    { background: var(--info-light);    color: #1E40AF; }

/* ─── Navbar ─── */
.navbar {
  background: var(--white); border-bottom: 1px solid var(--gray-300);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.navbar-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 64px;
}
.navbar-brand {
  font-size: 1.4rem; font-weight: 800; color: var(--primary);
  letter-spacing: -.02em; white-space: nowrap;
}
.navbar-brand span { color: var(--accent); }
.navbar-search {
  flex: 1; max-width: 460px;
  display: flex; align-items: center;
  background: var(--gray-100); border-radius: 99px;
  padding: 0 16px; gap: 8px;
}
.navbar-search input {
  flex: 1; background: none; border: none; outline: none;
  font-size: .9rem; padding: 10px 0; color: var(--dark);
}
.navbar-search i { color: var(--gray-500); }
.navbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  color: var(--gray-700); font-size: 1.1rem;
  transition: background var(--transition);
}
.nav-icon-btn:hover { background: var(--gray-100); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: #fff;
  font-size: .65rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.nav-user { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .875rem; color: var(--dark); }
.nav-user i { color: var(--primary); font-size: 1.2rem; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  color: #fff; padding: 60px 20px; text-align: center;
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.hero p  { font-size: 1.1rem; opacity: .9; max-width: 540px; margin: 0 auto 28px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f0f0ff; }
.btn-white-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-white-outline:hover { background: rgba(255,255,255,.1); }

/* ─── Section ─── */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 1.5rem; font-weight: 800; }

/* ─── Category Tabs ─── */
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-btn {
  padding: 7px 16px; border-radius: 99px; border: 2px solid var(--gray-300);
  font-size: .82rem; font-weight: 600; cursor: pointer; background: var(--white);
  color: var(--gray-700); transition: all var(--transition);
}
.cat-btn:hover, .cat-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── File Grid ─── */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.file-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.file-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.file-card-thumb {
  background: linear-gradient(135deg, var(--primary-light), #E0E7FF);
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--primary); position: relative;
}
.file-card-thumb .file-type-badge {
  position: absolute; bottom: 10px; right: 10px;
  background: var(--primary); color: #fff;
  font-size: .65rem; font-weight: 800; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px;
}
.file-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.file-card-name { font-weight: 700; font-size: .95rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-card-desc { font-size: .8rem; color: var(--gray-500);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-card-meta { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--gray-500); margin-top: auto; padding-top: 8px; }
.file-card-footer {
  padding: 12px 14px; border-top: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.file-price { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.file-price.free { color: var(--success); }

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 64px 20px; }
.empty-state i { font-size: 3rem; color: var(--gray-300); margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.2rem; color: var(--gray-500); }

/* ─── Toast ─── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--dark); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: slideInUp .25s ease; max-width: 320px;
  display: flex; align-items: center; gap: 10px;
}
.toast.success { background: #065F46; }
.toast.error   { background: #991B1B; }
.toast.info    { background: #1E40AF; }
@keyframes slideInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; animation: fadeIn .2s ease;
}
.modal { background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .25s ease;
}
.modal-wide { max-width: 560px; }

/* ── Proof of payment upload ── */
/* ── HTG price display ── */
.htg-hint {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
  min-height: 1.1em;
}
.input-with-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-with-suffix .form-control { flex: 1; }
.input-suffix {
  font-size: .875rem;
  font-weight: 700;
  color: var(--gray-500);
  white-space: nowrap;
}

/* ── Proof of payment upload ── */
.proof-upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  color: var(--gray-500);
}
.proof-upload-zone:hover, .proof-upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.proof-upload-zone i { font-size: 2rem; margin-bottom: 8px; display: block; }
.proof-upload-zone p { font-size: .875rem; margin-bottom: 4px; }
.proof-preview-img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  display: block;
  margin: 8px auto 0;
}
.proof-thumb {
  max-width: 80px;
  max-height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  cursor: pointer;
  vertical-align: middle;
}
.proof-modal-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--gray-500); padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; gap: 8px; justify-content: flex-end; }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:none; } }

/* ─── Auth Page ─── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #EEF2FF, #F5F3FF); padding: 24px; }
.auth-box { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; overflow: hidden; }
.auth-logo { padding: 28px 28px 0; text-align: center; font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.auth-logo span { color: var(--accent); }
.auth-tabs { display: flex; border-bottom: 2px solid var(--gray-100); margin-top: 20px; }
.auth-tab { flex: 1; padding: 14px; text-align: center; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition); }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { padding: 28px; display: none; }
.auth-form.active { display: block; }

/* ─── Admin Layout ─── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--dark); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 20px; font-size: 1.25rem; font-weight: 800; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand span { color: var(--accent); }
.sidebar-nav { padding: 16px 0; flex: 1; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  font-size: .875rem; font-weight: 500; color: rgba(255,255,255,.7);
  cursor: pointer; transition: all var(--transition); border: none; background: none; width: 100%;
  text-align: left;
}
.sidebar-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-item.active { background: var(--primary); color: #fff; }
.sidebar-item i { width: 18px; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-main { flex: 1; overflow-y: auto; }
.admin-topbar { background: var(--white); border-bottom: 1px solid var(--gray-300); padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.admin-topbar-title { font-size: 1.15rem; font-weight: 700; }
.admin-content { padding: 28px; }

/* ─── Stats Cards ─── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }

.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: .8rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 2rem; font-weight: 800; margin-top: 4px; }
.stat-icon  { float: right; font-size: 1.8rem; opacity: .2; }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { background: var(--gray-100); font-weight: 700; text-align: left; padding: 12px 14px; color: var(--gray-700); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-100); }

/* ─── File Upload Zone ─── */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--gray-100);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); background: var(--primary-light); }
.upload-zone i { font-size: 2rem; color: var(--gray-300); margin-bottom: 10px; }
.upload-zone p { font-size: .875rem; color: var(--gray-500); }
.upload-zone.has-file { border-color: var(--success); background: var(--success-light); }
.upload-zone.has-file i { color: var(--success); }

/* ─── Checkout ─── */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.order-summary-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; position: sticky; top: 80px; }
.order-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.order-line:last-child { border-bottom: none; }
.order-total { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.pay-method {
  border: 2px solid var(--gray-300); border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pay-method:hover { border-color: var(--primary); background: var(--primary-light); }
.pay-method.selected { border-color: var(--primary); background: var(--primary-light); }
.pay-method i { font-size: 1.5rem; }
.pay-method .pm-name { font-size: .8rem; font-weight: 700; }
.pay-instructions { background: var(--info-light); border: 1px solid var(--info); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.pay-instructions p { font-size: .875rem; color: var(--gray-700); margin-bottom: 6px; }
.pay-instructions strong { color: var(--primary); font-size: 1rem; display: block; margin: 6px 0; }

/* ─── Dashboard ─── */
.purchases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.purchase-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.purchase-thumb { background: var(--primary-light); height: 90px; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--primary); }
.purchase-body { padding: 14px; }
.purchase-name { font-weight: 700; margin-bottom: 4px; }
.purchase-meta { font-size: .78rem; color: var(--gray-500); }
.purchase-footer { padding: 12px 14px; border-top: 1px solid var(--gray-100); }

/* ─── Key cards ─── */
.thumb-key { background: linear-gradient(135deg, #fff8e1, #fff3cd); color: #f59e0b; }
.key-value-box { margin-top: 10px; background: var(--gray-50); border: 1px dashed var(--border); border-radius: 6px; padding: 8px 12px; }
.key-value { font-family: 'Courier New', monospace; font-size: .85rem; font-weight: 700; letter-spacing: .04em; word-break: break-all; color: var(--gray-800); }
.keys-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.key-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--gray-50); border-radius: 6px; }
.key-row .key-value { flex: 1; font-size: .8rem; }

/* ─── Footer ─── */
.footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 40px 20px 24px; margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px; }
.footer-brand { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-brand span { color: var(--accent); }
.footer h4 { color: #fff; font-size: .875rem; margin-bottom: 12px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer ul li a { font-size: .85rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer ul li a:hover { color: #fff; }
.footer-bottom   { text-align: center; font-size: .8rem; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); max-width: 1200px; margin-left: auto; margin-right: auto; }
.footer-tagline  { font-size: .85rem; }

/* ─── Payment Method Colors ─── */
.pm-moncash  { color: #e31e23; }
.pm-natcash  { color: #0075BE; }
.pm-zelle    { color: #6E1FFC; }
.pm-paypal   { color: #003087; }
.pm-cashapp  { color: #00C244; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
  .admin-sidebar { display: none; }
  .files-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 1.7rem; }
  .hero p  { font-size: .95rem; }
  .payment-methods { grid-template-columns: repeat(3, 1fr); }
  .navbar-search { display: none; }
  .files-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .files-grid { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════
   Extracted from inline styles — added during refactor
   ═══════════════════════════════════════════════════════ */

/* ─── Page layout ─── */
.page-content { padding-top: 32px; padding-bottom: 48px; }
.page-header  { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.page-title   { font-size: 1.5rem; font-weight: 800; }

/* ─── Links ─── */
.link-back    { color: var(--gray-500); font-size: .875rem; }
.link-muted   { font-size: .82rem; color: var(--gray-500); }
.link-primary { color: var(--primary); font-weight: 600; }

/* ─── Password input wrapper ─── */
.pwd-wrapper { position: relative; }
.pwd-wrapper .form-control { padding-right: 42px; }
.pwd-toggle-btn {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); padding: 4px; line-height: 1;
}
.pwd-toggle-btn:hover { color: var(--dark); }

/* ─── Auth page extras ─── */
.auth-footer { padding: 0 28px 20px; text-align: center; }

/* ─── Profile header card ─── */
.profile-header-card {
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  color: #fff; margin-bottom: 24px;
}
.profile-header-inner { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0;
}
.profile-name    { font-size: 1.25rem; font-weight: 800; }
.profile-email   { opacity: .8; font-size: .875rem; }
.profile-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Section tabs ─── */
.section-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-100); margin-bottom: 24px; }

/* ─── Card section title ─── */
.card-section-title { font-weight: 700; margin-bottom: 16px; font-size: 1rem; }

/* ─── Modals ─── */
.modal-center       { text-align: center; padding: 40px 28px; }
.modal-danger-center { text-align: center; padding: 36px 28px; }
.modal-success-icon { font-size: 3rem; color: var(--success); margin-bottom: 16px; }
.modal-danger-icon  { font-size: 2.5rem; color: var(--danger); margin-bottom: 12px; display: block; }
.modal-desc         { color: var(--gray-500); font-size: .9rem; margin-bottom: 24px; }
.modal-actions      { display: flex; gap: 8px; justify-content: center; }
.modal-title-danger { font-weight: 700; margin-bottom: 8px; }

/* ─── Order summary ─── */
.order-divider     { padding-top: 12px; margin-top: 4px; border-top: 2px solid var(--gray-300); }
.order-line-name   { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.order-line-price  { font-weight: 600; white-space: nowrap; }

/* ─── Cart items ─── */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--primary-light); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 1.2rem;
}
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-name  { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-type  { font-size: .75rem; color: var(--gray-500); }
.cart-item-price { font-weight: 800; color: var(--primary); white-space: nowrap; }
.cart-item-remove {
  background: none; border: none; cursor: pointer;
  color: var(--danger); font-size: .95rem; padding: 4px;
}
.cart-item-remove:hover { color: #DC2626; }

/* ─── Sidebar extras ─── */
.sidebar-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: .65rem; padding: 2px 7px; border-radius: 99px; font-weight: 800;
}
.sidebar-brand-sub { font-size: .65rem; opacity: .5; font-weight: 400; }

/* ─── Admin dashboard rows ─── */
.dash-order-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.dash-order-row:last-child { border-bottom: none; }
.dash-order-name { font-size: .85rem; font-weight: 600; }
.dash-order-meta { font-size: .75rem; color: var(--gray-500); }
.dash-file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100);
}
.dash-file-row:last-child { border-bottom: none; }
.dash-file-name  { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-file-price { font-size: .75rem; color: var(--gray-500); }

/* ─── Table utilities ─── */
.table-empty { text-align: center; color: var(--gray-500); padding: 32px; }
.table-file-cell { display: flex; align-items: center; gap: 8px; }
.mono       { font-family: monospace; }
.capitalize { text-transform: capitalize; }
.nowrap     { white-space: nowrap; }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }
.fw-800     { font-weight: 800; }
.fs-sm      { font-size: .875rem; }
.fs-xs      { font-size: .78rem; }
.resize-v   { resize: vertical; }

/* ─── Icon color utilities ─── */
.icon-primary { color: var(--primary); }
.icon-warning { color: var(--warning); }
.icon-success { color: var(--success); }
.icon-danger  { color: var(--danger); }
.icon-info    { color: var(--info); }

/* ─── Admin topbar ─── */
.admin-topbar-user { display: flex; align-items: center; gap: 8px; }
.admin-avatar {
  width: 32px; height: 32px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem; flex-shrink: 0;
}

/* ─── Admin page layouts ─── */
.dashboard-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.upload-card          { max-width: 640px; }
.settings-grid        { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
.order-filters-bar    { margin-bottom: 20px; }
.required-star        { color: var(--danger); }
.cart-card            { margin-bottom: 20px; }

@media (max-width: 900px) {
  .dashboard-cards-grid { grid-template-columns: 1fr; }
}
