@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #070710;
  --card: #111125;
  --border: rgba(255, 255, 255, 0.1);
  --text: #f8f9fb;
  --muted: rgba(248, 249, 251, 0.65);
  --accent: #ff4ecd;
  --accent-2: #ffda3b;
  --accent-3: #6278ff;
  --accent-4: #ff6b6b;
  --gradient: linear-gradient(135deg, #4a00e0, #ff0080);
  --radius: 18px;
  --shadow: 0 18px 45px rgba(8, 0, 65, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

.container {
  width: min(1200px, 90%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 7, 16, 0.9);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: 0.35rem;
}

.brand-pill {
  background: var(--gradient);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.brand.small {
  font-size: 1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.main-nav a {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  transition: background 0.3s;
}

.main-nav a:hover,
.main-nav a.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown {
  position: relative;
}

.dropdown button {
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 200px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  display: grid;
}

.dropdown-menu a {
  border-radius: var(--radius);
  padding: 0.5rem;
}

.header-search {
  position: relative;
  max-width: 420px;
  width: 100%;
  margin: 0 2rem;
  flex: 1;
}

.header-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 78, 205, 0.15);
}

.header-search svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(14, 13, 68, 0.4);
}

.btn.primary {
  background: var(--gradient);
  color: var(--text);
}

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

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.full {
  width: 100%;
}

.btn.white-theme {
  background: #ffffff;
  color: #070710;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn.white-theme:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

body.white-theme {
  --bg: #ffffff;
  --card: #f8f9fa;
  --border: rgba(0, 0, 0, 0.1);
  --text: #070710;
  --muted: rgba(7, 7, 16, 0.65);
  background: var(--bg);
  color: var(--text);
}

body.white-theme .site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
}

body.white-theme .header-search input {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

body.white-theme .header-search input:focus {
  background: rgba(0, 0, 0, 0.1);
}

body.white-theme .main-nav a:hover,
body.white-theme .main-nav a.is-active {
  background: rgba(0, 0, 0, 0.1);
}

body.white-theme .card,
body.white-theme .category-card,
body.white-theme .order-card,
body.white-theme .cancel-card,
body.white-theme .support-item,
body.white-theme .support-thread,
body.white-theme .cart-card,
body.white-theme .cart-summary {
  background: var(--card);
  border: 1px solid var(--border);
}

body.white-theme .support-item.is-active {
  background: rgba(255, 78, 205, 0.1) !important;
  border-color: var(--accent) !important;
}

body.white-theme .support-item:hover {
  border-color: var(--accent) !important;
}

body.white-theme .messages {
  background: rgba(0, 0, 0, 0.03);
}

body.white-theme .nav-toggle span {
  background: var(--text);
}

body.white-theme .dropdown-menu {
  background: var(--card);
  border: 1px solid var(--border);
}

body.white-theme .hero-card {
  background: var(--card);
  border: 1px solid var(--border);
}

body.white-theme .photo-placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 241, 0.1), rgba(98, 120, 255, 0.1));
  border: 1px dashed rgba(0, 0, 0, 0.2);
}

body.white-theme .accordion {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
}

body.white-theme .file-upload-label {
  border-color: var(--border);
}

body.white-theme .file-upload-label:hover {
  border-color: var(--accent);
}

body.white-theme .file-upload-label.has-file {
  border-color: var(--accent-3);
}

body.white-theme .timeline li {
  border-left-color: var(--accent-3);
}

body.white-theme .section.dark {
  background: #f5f5f5;
}

body.white-theme .section.gradient {
  background: radial-gradient(circle at top, rgba(255, 110, 241, 0.1), transparent),
    radial-gradient(circle at bottom, rgba(98, 120, 255, 0.1), transparent);
}

body.white-theme .site-footer {
  background: rgba(0, 0, 0, 0.02);
}

.theme-toggle {
  margin-left: 0.5rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: 0;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-highlight {
  font-weight: 700;
  color: var(--accent-2);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.section {
  padding: 4rem 0;
}

.section.dark {
  background: #09091c;
}

.section.gradient {
  background: radial-gradient(circle at top, rgba(255, 110, 241, 0.2), transparent),
    radial-gradient(circle at bottom, rgba(98, 120, 255, 0.2), transparent);
}

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

.section-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.lead {
  color: var(--muted);
  max-width: 560px;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.category-card,
.order-card,
.cancel-card,
.support-item,
.support-thread,
.cart-card,
.cart-summary {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.category-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.cards article {
  background: #000000;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s, border 0.25s, box-shadow 0.25s;
  color: #ffffff;
}

.cards article * {
  color: #ffffff;
}

.cards article:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow);
  background: #0a0a0a;
}

.product-card {
  background: #000000;
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  position: relative;
}

.product-card img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.product-card h3 {
  font-size: 0.9rem;
  margin: 0.5rem 0;
  color: #ffffff;
}

.product-card .product-code {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.product-card .product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.product-card .product-actions button {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.85rem;
}

.pill-filter {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 0;
  padding: 0.45rem 1.2rem;
  cursor: pointer;
}

.pill-filter.is-active {
  background: var(--gradient);
}

.tag-list,
.tag {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.status.preparing {
  background: #f5c542;
  color: #1f1300;
}

.status.shipping {
  background: #69b5ff;
  color: #001a38;
}

.status.delivered {
  background: #58d08f;
  color: #002014;
}

.status.cancelled {
  background: #ff5d5d;
  color: #2a0000;
}

.status.pending {
  background: #ff9f43;
  color: #2a1200;
}

.status.neutral {
  background: #b7b7c5;
  color: #141422;
}

.timeline ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.timeline li {
  border-left: 2px solid var(--accent-3);
  padding-left: 1rem;
}

.step-title {
  font-weight: 600;
}

.step-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.photo-placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 241, 0.3), rgba(98, 120, 255, 0.3));
  border-radius: var(--radius);
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.photo-placeholder.small {
  min-height: 90px;
  width: 120px;
}

.thumb-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.thumb.is-active {
  outline: 2px solid var(--accent);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
}

.filter-field select,
.filter-field input,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

label {
  display: grid;
  gap: 0.5rem;
  font-weight: 500;
}

label input,
label textarea,
label select {
  width: 100%;
}

.filter-field.full {
  width: 100%;
}

.product-detail {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.product-actions {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.stacked-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.5rem;
}

.stacked-list.contact li {
  display: grid;
  gap: 0.3rem;
}

.check-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.check-list li::before {
  content: "✓ ";
  color: var(--accent-2);
  font-weight: 700;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  place-items: start;
  min-height: 60vh;
}

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

.auth-card {
  max-width: 420px;
  width: 100%;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.cart-list {
  display: grid;
  gap: 1rem;
}

.cart-card {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity input {
  width: 50px;
  text-align: center;
  padding: 0.3rem;
}

.cart-summary {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 2px solid var(--border);
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.account-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.cancel-card {
  background: rgba(255, 93, 93, 0.1);
  border-color: #ff5d5d;
}

.support-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
}

.support-list {
  display: grid;
  gap: 1rem;
}

.support-item {
  cursor: pointer;
  transition: all 0.3s;
}

.support-item:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent) !important;
}

.support-item.is-active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent) !important;
  background: rgba(255, 78, 205, 0.15) !important;
}

.support-thread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.messages {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.reply-form {
  display: grid;
  gap: 0.6rem;
}

.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  background: rgba(0, 0, 0, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.footer-meta {
  text-align: center;
  color: var(--muted);
  margin-top: 2rem;
}

.muted,
.fine-print {
  color: var(--muted);
  font-size: 0.9rem;
}

.accordion {
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.accordion summary {
  cursor: pointer;
  font-weight: 600;
}

.legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.section-actions {
  display: flex;
  gap: 0.5rem;
}

.section-actions.wrap {
  flex-wrap: wrap;
}

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

th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.admin-sidebar {
  background: #050512;
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  display: grid;
  gap: 1rem;
}

.admin-sidebar nav a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  color: var(--muted);
}

.admin-sidebar nav a.is-active,
.admin-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.admin-content {
  padding: 2rem;
  display: grid;
  gap: 2rem;
  background: var(--bg);
}

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

.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.status-badge.active {
  background: rgba(88, 208, 143, 0.2);
  color: #58d08f;
}

.status-badge.passive,
.status-badge.inactive {
  background: rgba(255, 93, 93, 0.2);
  color: #ff5d5d;
}

.status-badge button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.hidden {
  display: none;
}

.file-upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.file-upload-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(90%, 420px);
  box-shadow: var(--shadow);
  text-align: center;
}

.file-upload-modal input[type="file"] {
  margin: 1rem 0;
}

.file-upload-modal .btn {
  margin: 0.5rem;
}

.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.product-modal.is-open {
  display: flex;
}

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

@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(7, 7, 16, 0.95);
    transform: translateY(-100%);
    transition: transform 0.3s;
  }

  .main-nav.is-open {
    transform: translateY(0);
    padding-top: 6rem;
    gap: 2rem;
  }

  .nav-toggle {
    display: flex;
  }

  .cart-layout,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .cart-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-search {
    display: none;
  }

  .main-nav.is-open .header-search {
    display: block;
    max-width: 300px;
    margin: 0 auto;
  }
}
