*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: #050816;
  color: #f5f5f5;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px;
}

header.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 22, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.nav-brand span {
  font-size: 18px;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: radial-gradient(circle at 0 0, #22d3ee, #4f46e5);
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-user {
  margin-left: 16px;
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: #e5e7eb;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #fff;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #e5e7eb;
  font-size: 22px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr);
  gap: 32px;
  align-items: center;
  padding-top: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-img {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  object-fit: contain;
  background: radial-gradient(circle at 0 0, #22d3ee, #4f46e5);
}

.hero h1 {
  font-size: 32px;
  margin: 0 0 4px;
}

.hero p {
  margin: 0;
  color: #9ca3af;
}

.carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.6);
  border: none;
  color: #e5e7eb;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
}

.carousel-dot.active {
  background: #22d3ee;
}

.section {
  margin-top: 40px;
}

.section h2 {
  margin: 0 0 12px;
}

.section-subtitle {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

.form-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-row label {
  font-size: 14px;
}

.form-row input,
.form-row textarea,
.form-row select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 14px;
}

.form-row small {
  color: #9ca3af;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 14px;
}

.btn.primary {
  background: linear-gradient(135deg, #22d3ee, #4f46e5);
  border-color: transparent;
  color: #0b1020;
  font-weight: 600;
}

.btn.small {
  padding: 4px 10px;
  font-size: 12px;
}

.message-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.message-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #9ca3af;
}

.message-item-content {
  margin-top: 4px;
  font-size: 14px;
}

.footer {
  margin-top: 40px;
  padding: 16px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #6b7280;
  font-size: 13px;
}

.form-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-inline input {
  flex: 1;
}

.chip-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 12px;
}

.chip button {
  border: none;
  background: none;
  color: #9ca3af;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.form-row.full-width {
  grid-column: 1 / -1;
}

.filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-media {
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
}

.product-media img,
.product-media video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.product-media {
  position: relative;
}

.media-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.55));
  border: none;
  cursor: pointer;
  color: #e5e7eb;
}

.media-play-btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 2px solid rgba(248, 250, 252, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
}

.media-play-btn-icon span {
  display: block;
  margin-left: 3px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #f9fafb;
}

.product-meta {
  font-size: 12px;
  color: #9ca3af;
}

.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.qrcode-container {
  width: 88px;
  height: 88px;
}

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-msg {
  margin-top: 8px;
  font-size: 13px;
}

.form-msg.error {
  color: #f97373;
}

.form-msg.success {
  color: #4ade80;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-wrapper th,
.table-wrapper td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(31, 41, 55, 1);
}

.table-wrapper th {
  text-align: left;
  color: #9ca3af;
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.badge.admin {
  border-color: #fbbf24;
  color: #facc15;
}

.badge.user {
  border-color: #22c55e;
  color: #22c55e;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-mobile-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    right: 10px;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-user {
    display: none;
  }

  .hero {
    padding-top: 10px;
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

