/* ============================================================
   APEX CORE - Global Stylesheet (2026 Dark Design)
   ============================================================ */

:root {
  --bg-primary: #0F1115;
  --bg-secondary: #1B1F27;
  --bg-panel: #3A404D;
  --bg-card: #1B1F27;
  --bg-input: #14171d;
  --text-primary: #FFFFFF;
  --text-secondary: #a8adb8;
  --text-muted: #6b7280;
  --accent: #C1121F;
  --accent-hover: #d92c3b;
  --accent-soft: rgba(193, 18, 31, 0.12);
  --border: #2a2f3a;
  --border-light: #363c48;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(193, 18, 31, 0.35);
}

.btn-secondary {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #48505e;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: var(--success);
  color: #0b1220;
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-block {
  width: 100%;
}

/* ------------------------------------------------------------
   Navbar
   ------------------------------------------------------------ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.navbar-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 0 20px rgba(193, 18, 31, 0.35);
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 9px;
}

/* ------------------------------------------------------------
   SVG icons
   ------------------------------------------------------------ */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 26px;
  height: 26px;
}

.icon-xl {
  width: 34px;
  height: 34px;
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-brand span.highlight {
  color: var(--accent);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-nav .nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.navbar-nav .nav-link.active {
  color: var(--text-primary);
  background: var(--accent-soft);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.navbar-user:hover {
  background: rgba(255, 255, 255, 0.05);
}

.navbar-user .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-panel);
}

.navbar-user .user-name {
  font-size: 13px;
  font-weight: 600;
}

.navbar-user .user-role {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 12px 24px 20px;
}

.mobile-menu .nav-link {
  display: block;
  padding: 12px 8px;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.mobile-menu .nav-link.active {
  color: var(--text-primary);
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 140px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px circle at 15% 20%, rgba(193, 18, 31, 0.12), transparent 45%),
    radial-gradient(700px circle at 85% 15%, rgba(59, 130, 246, 0.08), transparent 45%),
    radial-gradient(800px circle at 50% 100%, rgba(193, 18, 31, 0.08), transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.hero-logo {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  border-radius: 28px;
  background: linear-gradient(145deg, var(--accent), #8f0d18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(193, 18, 31, 0.45);
  animation: heroFloat 5s ease-in-out infinite;
  overflow: hidden;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease both;
}

.hero h1 .highlight {
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 16px;
  animation: fadeUp 0.8s 0.1s ease both;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 40px;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-tag {
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  cursor: default;
}

.hero-tag:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(193, 18, 31, 0.2);
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.3s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 80px;
  flex-wrap: wrap;
}

.hero-stat {
  padding: 24px 48px;
  text-align: center;
}

.hero-stat + .hero-stat {
  border-left: 1px solid var(--border);
}

.hero-stat .value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-stat .value span {
  color: var(--accent);
}

.hero-stat .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
.section {
  padding: 90px 0;
}

.section-secondary {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head .eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.category-card:hover::after {
  transform: scaleX(1);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}

.category-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.category-card .count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Feature list */
.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);
  padding: 30px;
  transition: all 0.25s ease;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* CTA band */
.cta-band {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at 50% 50%, rgba(193, 18, 31, 0.15), transparent 60%);
}

.cta-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.cta-card h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.cta-card p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 16px;
}

/* ------------------------------------------------------------
   Auth pages
   ------------------------------------------------------------ */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.auth-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 50% 0%, rgba(193, 18, 31, 0.1), transparent 55%);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.auth-card.wide {
  max-width: 560px;
}

.auth-brand .brand-logo,
.admin-sidebar .brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand .logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand span {
  font-size: 22px;
  font-weight: 800;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card .auth-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-alt a {
  color: var(--accent);
  font-weight: 600;
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-secondary);
}

.form-group label .required {
  color: var(--accent);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.18);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8adb8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* File input */
.file-input {
  position: relative;
}

.file-input .form-control[type="file"] {
  padding: 10px;
  cursor: pointer;
}

.file-input .form-control[type="file"]::file-selector-button {
  background: var(--bg-panel);
  color: var(--text-primary);
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  margin-right: 12px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}

.image-preview {
  margin-top: 12px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
  display: none;
}

.image-preview.square {
  border-radius: 12px;
}

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.alert-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
}

.alert-close:hover {
  opacity: 1;
}

/* ------------------------------------------------------------
   Products page
   ------------------------------------------------------------ */
.page-header {
  padding: 64px 0 40px;
  background: linear-gradient(to bottom, rgba(193, 18, 31, 0.06), transparent);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Toolbar */
.toolbar {
  padding: 24px 0 8px;
}

.toolbar-inner {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.search-box .form-control {
  padding-left: 40px;
}

.toolbar .form-control {
  min-width: 190px;
}

/* Product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0 40px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.product-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-panel);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.05);
}

.product-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 17, 21, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 12px;
  border-radius: 100px;
}

.product-version {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}

.product-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-body .product-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.product-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.product-price {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.product-price .currency {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.product-actions .btn {
  flex: 1;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 60px;
  flex-wrap: wrap;
}

.pagination .page-link {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.pagination .page-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination .page-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 20px;
}

/* Access locked (not logged in) */
.access-locked {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
}

.access-locked .lock-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--accent);
}

.access-locked h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
}

.access-locked p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.access-locked .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ------------------------------------------------------------
   Profile
   ------------------------------------------------------------ */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding: 40px 0 80px;
  align-items: start;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--bg-panel);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.profile-card .username {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-card .role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
}

.role-badge.admin {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(193, 18, 31, 0.35);
}

.role-badge.user {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.profile-meta {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  text-align: left;
}

.profile-meta .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13.5px;
}

.profile-meta .meta-row .label {
  color: var(--text-muted);
}

.profile-meta .meta-row .value {
  font-weight: 600;
  text-align: right;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.panel h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ------------------------------------------------------------
   Admin panel
   ------------------------------------------------------------ */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 32px 0 80px;
  align-items: start;
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 92px;
}

.admin-sidebar .admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.admin-sidebar .admin-brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-sidebar .admin-brand strong {
  font-size: 15px;
}

.admin-sidebar .admin-brand small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav .admin-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.admin-nav .admin-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.admin-nav .admin-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.admin-main {
  min-width: 0;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.admin-header .admin-breadcrumb {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.admin-header .admin-breadcrumb a {
  color: var(--text-secondary);
}

.admin-header .admin-breadcrumb a:hover {
  color: var(--accent);
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s ease;
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 16px;
}

.stat-card .stat-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Admin tables */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.table-head h2 {
  font-size: 17px;
  font-weight: 700;
}

.table-head .table-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px 22px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  white-space: nowrap;
}

.table td {
  padding: 14px 22px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background 0.15s ease;
}

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

.table .user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table .user-cell .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.table .user-cell .user-name {
  font-weight: 600;
}

.table .user-cell .user-mail {
  font-size: 12px;
  color: var(--text-muted);
}

.table .product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table .product-cell .thumb {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-panel);
}

.table .product-cell .pname {
  font-weight: 600;
}

.table .product-cell .pcat {
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.badge-admin {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(193, 18, 31, 0.35);
}

.badge-super {
  background: rgba(193, 18, 31, 0.18);
  color: #ff5c66;
  border: 1px solid rgba(193, 18, 31, 0.55);
  box-shadow: 0 0 12px rgba(193, 18, 31, 0.25);
}

.perm-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.perm-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.badge-user {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.row-actions .btn {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* Tabs for admin */
.admin-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.admin-tabs .tab {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-tabs .tab:hover {
  color: var(--text-primary);
}

.admin-tabs .tab.active {
  background: var(--accent);
  color: #fff;
}

/* ------------------------------------------------------------
   Contact section
   ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all 0.25s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.contact-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 18px;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 56px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand span {
  font-size: 18px;
  font-weight: 800;
}

.footer p {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 320px;
}

.footer h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: none;
}

.footer-bottom .heart {
  color: var(--accent);
}

/* ------------------------------------------------------------
   Toast notifications
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: toastIn 0.3s ease both;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------------------------------------------
   Scrollbar
   ------------------------------------------------------------ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-panel);
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: #4a5160;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .navbar-actions .btn-text {
    display: none;
  }

  .navbar-toggle {
    display: block;
  }

  .mobile-menu.open {
    display: block;
  }

  .hero {
    padding: 80px 0 100px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 8px;
  }

  .hero-stat + .hero-stat {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .section {
    padding: 60px 0;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .features-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .cta-card {
    padding: 36px 24px;
  }

  .toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar .form-control {
    width: 100%;
    min-width: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .table {
    min-width: 720px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .navbar-actions .navbar-user .user-name {
    display: none;
  }
}

/* ============================================================
   Badges & user states
   ============================================================ */
.badge-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #ff6b6b;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-success {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.row-banned {
  opacity: 0.72;
}

.row-banned .avatar {
  filter: grayscale(1);
}

.row-open {
  background: rgba(193, 18, 31, 0.04);
}

.user-ban-reason {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--danger);
}

/* ============================================================
   Modals
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.78);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
  max-height: 88vh;
  overflow-y: auto;
}

.modal.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-dialog.modal-sm {
  max-width: 440px;
}

.modal-dialog.modal-lg {
  max-width: 820px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-head h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.modal-body {
  padding: 22px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Permission grid */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.perm-grid .perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text-secondary);
  white-space: normal;
}

.perm-grid .perm-item:hover {
  color: var(--text-primary);
}

.perm-grid input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================
   Product modal
   ============================================================ */
.pm-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.pm-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-input);
  aspect-ratio: 16 / 10;
}

.pm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pm-cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(193, 18, 31, 0.35);
  margin-bottom: 12px;
}

.pm-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.pm-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 14px;
}

.pm-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.pm-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.pm-price .currency {
  color: var(--accent);
  margin-right: 3px;
}

.pm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .pm-body {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Notification bell
   ============================================================ */
.bell-wrap {
  position: relative;
}

.bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.bell-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.bell-dot {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

.bell-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.bell-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.bell-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 0;
}

.bell-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.bell-empty .icon {
  display: block;
  margin: 0 auto 8px;
}

.bell-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.bell-item:last-child {
  border-bottom: none;
}

.bell-item:hover {
  background: var(--bg-input);
}

.bell-item.unread {
  background: rgba(193, 18, 31, 0.06);
  border-left: 3px solid var(--accent);
}

.bell-item-title {
  display: block;
  font-size: 13.5px;
  color: var(--text-primary);
}

.bell-item-time {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   Team section
   ============================================================ */
.section-secondary {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.team-card {
  position: relative;
  background: linear-gradient(180deg, rgba(27, 31, 39, 0.85), rgba(20, 23, 29, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 20px 26px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.team-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.team-card-super {
  border: 1px solid rgba(193, 18, 31, 0.45);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(193, 18, 31, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(27, 31, 39, 0.9), rgba(20, 23, 29, 0.98));
  box-shadow: 0 0 0 1px rgba(193, 18, 31, 0.2), 0 12px 40px rgba(193, 18, 31, 0.18);
  transform: scale(1.03);
}

.team-card-super::before {
  background: linear-gradient(90deg, transparent, var(--accent), #ff5c66, var(--accent), transparent);
  height: 4px;
  box-shadow: 0 0 12px rgba(193, 18, 31, 0.6);
}

.team-card-super:hover {
  transform: scale(1.03) translateY(-5px);
  border-color: rgba(193, 18, 31, 0.7);
  box-shadow: 0 0 0 1px rgba(193, 18, 31, 0.3), 0 16px 48px rgba(193, 18, 31, 0.28);
}

.team-crown {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--accent);
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(193, 18, 31, 0.55));
}

.team-crown .icon {
  color: #ffd166;
  filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.6));
}

.team-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
}

.team-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-light);
  background: var(--bg-input);
}

.team-card-super .team-avatar {
  width: 92px;
  height: 92px;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.25), 0 0 24px rgba(193, 18, 31, 0.45);
}

.team-card-super .team-avatar-wrap {
  width: 92px;
  height: 92px;
}

.team-status {
  position: absolute;
  bottom: 4px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.team-card h3 {
  font-size: 17px;
  margin-bottom: 4px;
  font-weight: 800;
}

.team-card-super h3 {
  font-size: 20px;
  background: linear-gradient(90deg, #ff5c66, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.team-role {
  display: block;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.team-card-super .team-role {
  color: #ffb4ba;
  font-weight: 600;
}

.team-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.team-badge-admin {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(193, 18, 31, 0.35);
}

.team-badge-super {
  background: rgba(193, 18, 31, 0.18);
  color: #ff5c66;
  border: 1px solid rgba(193, 18, 31, 0.55);
  box-shadow: 0 0 12px rgba(193, 18, 31, 0.3);
}

/* ============================================================
   Snowfall
   ============================================================ */
#snow {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #ffffff;
  animation-name: snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes snow-fall {
  0% {
    transform: translate3d(0, -4vh, 0);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    transform: translate3d(-6vw, 108vh, 0) rotate(360deg);
    opacity: 0;
  }
}

/* ============================================================
   Closed tickets
   ============================================================ */
.ticket-actions {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  align-items: flex-end;
}

.ticket-actions form:last-child {
  flex-shrink: 0;
}

.ticket-closed-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ffb4ba;
}

.alert-static {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
}

@media (max-width: 640px) {
  .ticket-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ============================================================
   Support thread
   ============================================================ */
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 0;
}

.chat-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.chat-row .avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.chat-bubble {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 640px;
}

.chat-bubble.chat-admin {
  background: rgba(193, 18, 31, 0.07);
  border-color: rgba(193, 18, 31, 0.3);
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
}

.chat-meta span {
  color: var(--text-muted);
  font-weight: 400;
}

.chat-text {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================
   Notifications list
   ============================================================ */
.notif-list {
  list-style: none;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.notif-icon .icon {
  color: #fff;
}

.notif-support {
  background: var(--accent);
}

.notif-info {
  background: var(--info);
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 14px;
  color: var(--text-primary);
}

.notif-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
