:root {
  --bg: #020617;
  --surface: rgba(12, 24, 56, 0.9);
  --surface-soft: rgba(15, 29, 64, 0.72);
  --accent: #ff7a59;
  --accent-soft: rgba(255, 122, 89, 0.14);
  --accent-dark: #ff4f2e;
  --accent-alt: #8b5cf6;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --border: rgba(255, 255, 255, 0.12);
  --gray-50: #e2e8f0;
  --gray-100: #cbd5e1;
  --gray-200: #94a3b8;
  --gray-300: #64748b;
  --gray-400: #475569;
  --gray-500: #334155;
  --gray-600: #1e293b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 40px 110px rgba(0, 0, 0, 0.28);
  --shadow-xl: 0 50px 140px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --radius-lg: 32px;
  --transition: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.light {
  background: radial-gradient(circle at top left, rgba(255, 122, 89, 0.12), transparent 18%),
              radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.12), transparent 20%),
              linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #081127;
}

body.light .top-header {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light .nav-links a {
  color: #475569;
}

body.light .nav-links a:hover,
body.light .nav-links a.active {
  background: rgba(255, 122, 89, 0.14);
  color: #081127;
}

body.light .btn-outline {
  background: rgba(15, 23, 42, 0.08);
  color: #081127;
  border-color: rgba(15, 23, 42, 0.12);
}

body.light .product-card,
body.light .bcv-card,
body.light .icon-card,
body.light .hero-slider {
  background: rgba(255, 255, 255, 0.94);
}

body.light .product-card {
  color: #081127;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top left, rgba(255, 122, 89, 0.18), transparent 18%),
              radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.18), transparent 20%),
              linear-gradient(180deg, #020617 0%, #0b1834 100%);
  color: var(--text);
  transition: background 250ms ease, color 250ms ease;
}

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

button,
a {
  font: inherit;
}

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

button {
  border: none;
  cursor: pointer;
}

#app {
  width: 100%;
}

.loader-container {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}

.loader-logo {
  width: min(220px, 55vw);
  max-height: 220px;
  border-radius: 30px;
  object-fit: contain;
  box-shadow: 0 28px 80px rgba(0,0,0,0.24);
  border: 1px solid rgba(255,255,255,0.14);
}

.loader-title {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--text);
  font-weight: 700;
}

.loader-subtitle {
  color: var(--gray-100);
  font-size: 0.95rem;
}

.app-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px);
  background: rgba(6, 17, 42, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.top-header.hide-on-scroll {
  transform: translateY(-120%);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-toggle {
  display: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 48px;
  height: 48px;
  border-radius: 18px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.top-header.nav-open .nav-links {
  display: flex;
}

.top-header.nav-open .nav-toggle {
  transform: rotate(90deg);
}

.logo {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.16);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 122, 89, 0.14);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(255, 122, 89, 0.12);
}

.cart-icon {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #ffb79e, #ff6a41);
  color: #fff;
  box-shadow: 0 22px 60px rgba(255, 122, 89, 0.28);
}

.cart-icon:hover {
  transform: translateY(-2px);
}

.cart-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.cart-icon span {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

.bcv-card {
  margin: 1rem 0 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.bcv-info {
  display: grid;
  gap: 0.35rem;
}

.bcv-info div {
  font-size: 0.95rem;
}

.bcv-rate {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.bcv-update {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  min-height: 72vh;
  padding: 3rem 0 2rem;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.25rem);
  line-height: 1.02;
  margin: 0;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.hero p {
  margin: 1.5rem 0 2rem;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

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

.hero-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.benefit-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition), background var(--transition);
}

.benefit-card {
  cursor: pointer;
}

.benefit-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.benefit-card i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 122, 89, 0.14);
  color: var(--accent);
  font-size: 1.35rem;
}

.benefit-card strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
}

.benefit-card p {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero .hero-actions .btn-primary,
.hero .hero-actions .btn-outline {
  min-width: 180px;
}

.featured-section {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.14);
}

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

.featured-header span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 700;
}

.featured-header h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.featured-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  background: rgba(255, 122, 89, 0.95);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.18);
}

.featured-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.featured-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.featured-info strong {
  font-size: 1rem;
}

.product-filter-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14);
}

.product-filter-banner strong {
  font-size: 1.05rem;
}

.product-filter-banner p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.featured-info span {
  color: var(--text-muted);
}

@media (max-width: 1080px) {
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.hero-slider {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 480px;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  transform-style: preserve-3d;
}

.hero-slider::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 45%);
}

.hero-slide {
  will-change: opacity, transform;
}

.hero-slide.active {
  transform: scale(1.005);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: grid;
  place-items: center;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.2), rgba(2,6,23,0.74));
}

.slider-text h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.slider-text p {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
}

.slider-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.6);
  transition: background var(--transition), transform var(--transition);
}

.slider-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.drawer-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.icon-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.icon-card i {
  font-size: 1.45rem;
  color: var(--accent);
}

.icon-card span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-logo img {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hero-promo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 122, 89, 0.16);
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 122, 89, 0.28);
  box-shadow: 0 18px 40px rgba(255, 122, 89, 0.12);
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.25rem);
  line-height: 1.02;
  margin: 0;
}

.hero-slider {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  min-height: 480px;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.8));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: grid;
  place-items: center;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

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

.slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.08), rgba(15,23,42,0.22));
}

.slider-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.9);
  transition: background var(--transition), transform var(--transition);
}

.slider-dot.active {
  background: var(--accent);
  transform: scale(1.15);
}

.drawer-icons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.icon-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 22px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.icon-card i {
  font-size: 1.35rem;
  color: var(--accent);
}

.icon-card span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.user-panel-screen {
  display: grid;
  gap: 1.5rem;
}

.user-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.user-panel-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-panel-avatar,
.profile-avatar-large {
  width: 90px;
  height: 90px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.18);
}

.user-panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.user-panel-tabs button {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  transition: var(--transition);
}

.user-panel-tabs button.active,
.user-panel-tabs button:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.18);
}

.user-panel-section {
  background: var(--surface);
  border-radius: 28px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.profile-card {
  display: grid;
  gap: 1rem;
}

.profile-card-header h3 {
  margin: 0;
}

.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar-actions {
  display: grid;
  gap: 0.75rem;
}

.user-panel-avatar,
.profile-avatar-large,
.profile-avatar-row img {
  box-shadow: var(--shadow);
}

.message-board {
  display: grid;
  gap: 1rem;
}

.message-row {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 1rem;
}

.message-row.message-user {
  border-color: rgba(59,130,246,0.2);
}

.message-row.message-store {
  border-color: rgba(34,197,94,0.2);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.message-body {
  margin-top: 0.75rem;
  line-height: 1.75;
}

.btn-outline.upload-avatar-btn {
  padding: 0.95rem 1.2rem;
  border-radius: 24px;
}

.admin-form .form-group input,
.admin-form .form-group textarea,
.admin-form .form-group select {
  background: rgba(255,255,255,0.08);
}

.admin-form .form-group textarea {
  min-height: 120px;
}

.admin-form .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-panel-screen .stat-card {
  background: rgba(255,255,255,0.08);
}

@media (max-width: 900px) {
  .user-panel-tabs {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .user-panel-header,
  .profile-avatar-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.admin-sidebar {
  background: var(--surface);
  border-radius: 28px;
  padding: 1.5rem;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: var(--shadow);
}

.admin-sidebar h3 {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
}

.admin-sidebar nav {
  display: grid;
  gap: 0.75rem;
}

.admin-sidebar button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text-muted);
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.admin-sidebar button.active,
.admin-sidebar button:hover {
  color: var(--accent-dark);
  background: rgba(179,109,46,0.1);
  border-color: rgba(179,109,46,0.15);
}

.admin-content {
  display: grid;
  gap: 1.5rem;
}

.admin-section {
  background: var(--surface);
  border-radius: 28px;
  padding: 1.75rem;
  border: 1px solid rgba(15,23,42,0.06);
  box-shadow: var(--shadow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  background: rgba(252,244,229,0.8);
  border-radius: 26px;
  padding: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.finance-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.18);
}

.finance-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

.finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
}

.finance-row:last-child {
  border-bottom: none;
}

.finance-row strong {
  color: var(--text);
}

.trend-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 28px;
  padding: 1.5rem;
}

.trend-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.trend-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.trend-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trend-line {
  display: grid;
  width: 100%;
  gap: 0.25rem;
  align-items: end;
  height: 8rem;
  padding: 0.5rem 0;
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  position: relative;
}

.trend-line span {
  width: 100%;
  border-radius: 999px;
  transition: height 260ms ease;
}

.trend-sales {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.45));
}

.trend-expenses {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.95), rgba(248, 113, 113, 0.35));
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.table-container {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  color: var(--gray-700);
  font-size: 0.95rem;
}

th {
  text-align: left;
  color: var(--text-muted);
}

tr:hover {
  background: rgba(179,109,46,0.05);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.status-pill.pending { background: rgba(251, 191, 36, 0.12); color: #b45309; }
.status-pill.paid { background: rgba(34,197,94,0.12); color: #166534; }
.status-pill.shipped { background: rgba(37,99,235,0.12); color: #1d4ed8; }
.status-pill.delivered { background: rgba(14,165,233,0.12); color: #0c4a6e; }

.status-pill.balance { background: rgba(75, 210, 182, 0.14); color: #0f766e; }

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-dark);
  font-weight: 700;
}

.admin-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.admin-form .form-group {
  margin-bottom: 0;
}

.admin-notice {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 22px;
  background: rgba(248,250,252,0.9);
  border: 1px solid rgba(148,163,184,0.22);
  color: var(--text-muted);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

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

  .drawer-icons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

.hero p {
  margin: 1.5rem 0 2rem;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  padding: 1rem 1.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22);
  transform-style: preserve-3d;
}

.theme-toggle {
  min-width: 4.6rem;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 58%);
  opacity: 0.48;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translateZ(1px);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.24), transparent 30%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #ff7a59, #ff4f2e);
  color: #fff;
  box-shadow: 0 30px 80px rgba(255, 122, 89, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 36px 96px rgba(255, 122, 89, 0.32);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
}

.btn-block {
  width: 100%;
  max-width: 100%;
}

@keyframes btnPulse {
  0%, 100% { transform: translateY(-2px) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.product-card {
  background: rgba(15, 29, 69, 0.92);
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  backdrop-filter: blur(14px);
}

.product-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 45px 108px rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 122, 89, 0.22);
}

.product-card {
  perspective: 900px;
}

.product-card:hover .product-info {
  transform: translateZ(2px);
}

.product-info {
  padding: 1.4rem;
  display: grid;
  gap: 0.85rem;
  transition: transform var(--transition);
}

.product-footer {
  padding: 1rem 1.4rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-info {
  padding: 1.4rem;
  display: grid;
  gap: 0.85rem;
}

.product-info h3 {
  margin: 0;
  font-size: 1.15rem;
}

.product-info p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
  min-height: 3rem;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.cart-item-info {
  display: grid;
  gap: 0.5rem;
}

.cart-item-info h4 {
  margin: 0;
  font-size: 1rem;
}

.cart-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.cart-qty-btn,
.cart-remove-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.cart-qty-btn:hover,
.cart-remove-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.cart-item-total {
  font-weight: 700;
  text-align: right;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.85rem;
  color: var(--text-muted);
}

.cart-summary-row.total-line {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--text);
}

.cart-summary-row strong {
  color: var(--text);
}

.footer {
  margin-top: 3.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.5rem 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
}

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

.loading-products {
  display: grid;
  place-items: center;
  padding: 4rem 0;
  width: 100%;
  color: var(--text-muted);
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .hero-benefits {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .top-header.nav-open .nav-links {
    display: flex;
  }
}

@media (max-width: 760px) {
  .header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    justify-content: center;
  }

  .hero {
    padding-top: 1.5rem;
  }

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

/* ============================================
   MODALES
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.modal-close {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-500);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(197, 155, 108, 0.1);
}

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

.btn-block {
  width: 100%;
}

/* ============================================
   BOTONES FLOTANTES
   ============================================ */
.float-btn {
  position: fixed;
  bottom: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 1000;
}

.float-btn:hover {
  transform: scale(1.1);
}

.whatsapp-btn {
  right: 2rem;
  background: #25D366;
}

.whatsapp-btn a {
  color: white;
  font-size: 2rem;
  text-decoration: none;
}

.chatbot-btn {
  right: 2rem;
  bottom: 8rem;
  background: var(--accent);
  color: white;
  font-size: 1.75rem;
}

/* ============================================
   CHATBOT
   ============================================ */
.chatbot-window {
  position: fixed;
  bottom: 10rem;
  right: 2rem;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
}

.chatbot-header {
  background: var(--accent);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message {
  max-width: 80%;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.message.bot {
  background: var(--gray-200);
  align-self: flex-start;
}

.message.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
}

.chatbot-input {
  display: flex;
  padding: 0.5rem;
  border-top: 1px solid var(--gray-200);
}

.chatbot-input input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  margin-right: 0.5rem;
}

.chatbot-input button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
}

/* ============================================
   SPINNER
   ============================================ */
.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .chatbot-window {
    width: calc(100% - 2rem);
    right: 1rem;
    bottom: 9rem;
    height: 400px;
  }
  
  .float-btn {
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-btn {
    right: 1rem;
    bottom: 1rem;
  }
  
  .chatbot-btn {
    right: 1rem;
    bottom: 6rem;
  }
}