/* ==========================================================================
   DiaStore - SaaS Universal Stylesheet (Light Luxury Aesthetic)
   ========================================================================== */

:root {
  --bg-primary: #FCFCFE;
  --bg-secondary: #F6F5F2;
  --bg-card: #FFFFFF;
  
  --color-gold: #BFA88F;
  --color-gold-hover: #A9927D;
  --color-gold-light: #F2EDE6;
  
  --text-primary: #2C2A29;
  --text-secondary: #6B6866;
  --text-muted: #A39F9D;
  
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #20BA56;
  
  --border-color: #EBEAE6;
  --border-color-hover: #D4D1C9;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-gold: 0 4px 14px rgba(191, 168, 143, 0.2);
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* Estética Dinâmica & Sofisticada do Catálogo (Personalizável por Loja) */
  --theme-card-radius: 0px;
  --theme-button-radius: 0px;
  --theme-input-radius: 0px;
  --theme-image-radius: 0px;

  --radius-card: var(--theme-card-radius, 0px);
  --radius-button: var(--theme-button-radius, 0px);
  --radius-input: var(--theme-input-radius, 0px);

  --border-radius-sm: var(--radius-card);
  --border-radius-md: var(--radius-card);
  --border-radius-lg: var(--radius-card);
}

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

body {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  border-radius: var(--radius-button);
}

input, textarea, select {
  border-radius: var(--radius-input);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Public Storefront Container Layout (Centering like Meloja on Mobile)
   ========================================================================== */
#store-app-container {
  max-width: 480px; /* Target perfect mobile screen sizes */
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.03);
  position: relative;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Global body wrapper for Desktop preview styling */
@media (min-width: 768px) {
  body.storefront-body {
    background-color: #E2DFD8;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px 0;
  }
}

/* ==========================================================================
   Storefront Header Elements (Redesigned Header & Navigation)
   ========================================================================== */
#store-header {
  padding: 16px 20px 14px 20px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.store-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.store-brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.store-header-logo-small {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-card);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

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

.store-header-logo-initials {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-gold);
}

.store-brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.store-header-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-header-tagline {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-header-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.store-header-menu-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: var(--bg-card);
}

.menu-btn-icon {
  stroke-width: 2;
}

/* ==========================================================================
   Categories Drawer / Overlay (Sleek Sidebar Navigation)
   ========================================================================== */
.categories-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.3s;
}

.categories-drawer-overlay.active {
  visibility: visible;
  opacity: 1;
}

.categories-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.categories-drawer-panel {
  position: relative;
  width: 86%;
  max-width: 360px;
  height: 100%;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 36px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.categories-drawer-overlay.active .categories-drawer-panel {
  transform: translateX(0);
}

.categories-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.categories-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.categories-drawer-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-gold);
  font-weight: 600;
}

.categories-drawer-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}

.categories-drawer-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.categories-drawer-close-btn:hover {
  border-color: var(--color-gold);
  color: var(--text-primary);
  background: var(--bg-card);
}

.categories-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.categories-drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.categories-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
}

.categories-drawer-item:hover {
  border-color: var(--color-gold);
  transform: translateX(-2px);
  box-shadow: var(--shadow-sm);
}

.categories-drawer-item.active {
  border-color: var(--color-gold);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--color-gold);
}

.drawer-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.drawer-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold);
  flex-shrink: 0;
  overflow: hidden;
}

.drawer-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.categories-drawer-item.active .drawer-item-name {
  color: var(--color-gold);
  font-weight: 600;
}

.drawer-item-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 500;
  flex-shrink: 0;
}

.categories-drawer-item.active .drawer-item-count {
  background: var(--color-gold);
  color: #FFFFFF;
}

.categories-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.categories-drawer-whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background-color: var(--color-whatsapp, #25D366);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-button);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.categories-drawer-whatsapp-btn:hover {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   Storefront Highlight Banners Carousel (16:9)
   ========================================================================== */
.store-banners-section {
  width: 100%;
  margin: 14px 0 18px 0;
  padding: 0 20px;
}

.store-banners-carousel-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card, 0px);
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.store-banners-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.store-banner-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  user-select: none;
  overflow: hidden;
}

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

.store-banners-indicators {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.store-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.store-banner-dot.active {
  width: 16px;
  border-radius: 4px;
  background-color: var(--color-gold, #D4AF37);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

/* Admin Banner Form and Table Styles */
.banner-image-preview-box {
  width: 240px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #f4f4f6;
  border: 1.5px dashed #ccc;
  border-radius: var(--radius-card, 0px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-preview-16-9 {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Store Search Bar Container
   ========================================================================== */
.store-search-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.search-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: var(--transition-smooth);
}

.search-nav-btn svg {
  width: 20px;
  height: 20px;
}

.search-nav-btn:hover {
  color: var(--color-gold);
}

.search-input-wrapper {
  flex: 1;
}

.search-input-wrapper input {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
  border-color: var(--color-gold);
  background-color: #FFFFFF;
}

/* ==========================================================================
   Product Detail Nav (Storefront details header)
   ========================================================================== */
#store-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.store-back-button {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gold);
  font-size: 0.9rem;
  font-weight: 500;
}

.store-back-button svg {
  width: 18px;
  height: 18px;
}

.store-back-button:hover {
  color: var(--color-gold-hover);
}

.nav-store-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   Store Products Grid
   ========================================================================== */
.store-view-section {
  padding: 24px 20px;
  flex: 1;
}

.store-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.no-products-msg {
  grid-column: span 2;
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Product Card - Light Aesthetic */
.store-product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.store-product-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.store-product-card:hover .store-product-card-img {
  transform: scale(1.04);
}

.store-product-card:hover .store-product-card-btn {
  background-color: var(--color-gold-hover);
}

.store-product-card-img-wrapper {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background-color: #F8F8F9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.store-product-card-info {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.store-product-card-name {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.store-product-card-meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: auto;
  margin-bottom: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(44, 42, 41, 0.08);
  text-align: center;
}

.meta-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-col-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-weight: 500;
  opacity: 0.7;
}

.meta-col-val {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.store-product-card-btn {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-button);
  border: none;
  background-color: var(--color-gold);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
  margin-top: auto;
}

.store-product-card-btn:hover {
  background-color: var(--color-gold-hover);
}

/* ==========================================================================
   Product Detail Screen
   ========================================================================== */
.store-product-detail-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Detail Slider */
.store-carousel-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.store-carousel-scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.store-carousel-scroller::-webkit-scrollbar {
  display: none;
}

.store-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  scroll-snap-align: center;
  background-color: #F9F9FA;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-carousel-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.store-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.store-indicator-dot.active {
  background: var(--color-gold);
  transform: scale(1.2);
}

/* Info detail specs */
.store-product-info-block {
  text-align: left;
  padding: 0 4px;
}

.store-detail-name {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.store-detail-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.store-detail-price {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--color-gold);
  margin-top: 12px;
  margin-bottom: 20px;
}

/* Pedir no WhatsApp button */
.store-whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-button);
  transition: var(--transition-smooth);
}

.store-whatsapp-btn:hover {
  background-color: var(--color-whatsapp-hover);
}

.wa-btn-icon {
  width: 20px;
  height: 20px;
}

/* Floating WA Badge */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  border-radius: var(--radius-button);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
  transition: var(--transition-smooth);
}

.floating-whatsapp:hover {
  background-color: var(--color-whatsapp-hover);
  transform: scale(1.05);
}

.wa-icon-svg {
  width: 24px;
  height: 24px;
}

/* Informações / Descrição */
.store-info-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  margin-top: 10px;
}

.info-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.store-detail-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Outras Joias related grid */
.store-related-products-section {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  margin-top: 20px;
}

.store-related-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Public Footer */
#store-footer {
  margin-top: auto;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 20px 16px;
  text-align: center;
}

.store-footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.store-footer-brand {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-gold-hover);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#footer-store-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-copy-domain {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.8;
}

/* ==========================================================================
   SAAS FRONTEND STYLING (Landing, Login, Dashboard, Admin)
   ========================================================================== */
.saas-body {
  background-color: #F8F9FA;
  font-family: var(--font-sans);
  color: #333;
}

/* Landing Page Frame */
.landing-hero {
  max-width: 800px;
  margin: 100px auto;
  padding: 40px 24px;
  text-align: center;
  background: white;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

.landing-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.landing-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.saas-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.saas-btn-primary {
  background-color: var(--color-gold);
  color: white;
  border: none;
}

.saas-btn-primary:hover {
  background-color: var(--color-gold-hover);
}

.saas-btn-outline {
  border: 1px solid var(--color-gold);
  background: transparent;
  color: var(--color-gold);
  margin-left: 12px;
}

.saas-btn-outline:hover {
  background-color: var(--color-gold-light);
}

/* Auth Cards (login.html) */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 32px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  border: 1px solid #EEE;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #DDD;
  border-radius: var(--radius-input);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  background: #FAFAFA;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--color-gold);
  background: #FFF;
}

.auth-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--color-gold);
  border: none;
  border-radius: var(--radius-button);
  color: white;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: var(--transition-smooth);
}

.auth-btn:hover {
  background-color: var(--color-gold-hover);
}

.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 20px;
  color: #666;
}

.auth-switch a {
  color: var(--color-gold);
  font-weight: 600;
}

/* Dashboards Frame */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: 240px;
  background-color: #1E1E22;
  color: #B5B5BE;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #FFF;
  margin-bottom: 36px;
  text-align: center;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-button);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.menu-item:hover, .menu-item.active {
  background-color: rgba(255,255,255,0.05);
  color: #FFF;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.dashboard-main {
  flex: 1;
  background-color: #F8F9FA;
  padding: 40px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dashboard-title {
  font-size: 1.8rem;
  font-weight: 500;
}

/* Card metrics */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid #EAEAEA;
  box-shadow: var(--shadow-sm);
}

.metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #92929D;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Management Tables & Forms */
.dashboard-card {
  background: white;
  border: 1px solid #EAEAEA;
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.card-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.dashboard-table th, .dashboard-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #EAEAEA;
  font-size: 0.9rem;
}

.dashboard-table th {
  background-color: #FAFAFB;
  font-weight: 600;
  color: #666;
}

.action-badge {
  padding: 4px 8px;
  border-radius: var(--radius-button);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.action-badge-danger {
  background-color: #FCE8E6;
  color: #EA4335;
}

.action-badge-edit {
  background-color: #E6F4EA;
  color: #137333;
}

/* ==========================================================================
   Modern Toast Notifications & Loading UI States
   ========================================================================== */

/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
  width: 90%;
  pointer-events: none;
}

/* Toast Cards */
.toast {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(-20px);
  opacity: 0;
  animation: toast-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease;
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.info {
  border-left-color: #3b82f6;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toast-close-btn:hover {
  color: var(--text-primary);
}

@keyframes toast-fade-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Button Loading States */
.btn-loading {
  position: relative !important;
  color: transparent !important;
  pointer-events: none !important;
  user-select: none !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: button-spin 0.6s linear infinite;
}

/* Dark color spinner for light buttons */
.btn-loading-dark::after {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--text-primary);
}

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

/* Top Progress Bar Loader */
.top-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold-hover) 50%, var(--color-gold) 100%);
  background-size: 200% 100%;
  animation: loading-bar-animation 1.5s infinite linear;
  z-index: 10001;
  pointer-events: none;
}

@keyframes loading-bar-animation {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Status Badges */
.status-badge {
  padding: 4px 8px;
  border-radius: var(--radius-button);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
}
.status-published {
  background-color: #E6F4EA;
  color: #137333;
}
.status-published:hover {
  background-color: #d2ebd9;
}
.status-private {
  background-color: #F1F3F4;
  color: #5F6368;
}
.status-private:hover {
  background-color: #e3e6e8;
}

/* ==========================================================================
   VIEW TOGGLE (Grid vs List)
   ========================================================================== */
.store-view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 2px;
  margin-left: 6px;
  flex-shrink: 0;
}

.view-toggle-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  border-radius: var(--radius-button);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.view-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.view-toggle-btn:hover {
  color: var(--text-primary);
}

.view-toggle-btn.active {
  background-color: var(--color-gold);
  color: #ffffff;
}

/* ==========================================================================
   STOREFRONT LIST VIEW MODE
   ========================================================================== */
.store-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-product-list-item {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 10px 12px;
  gap: 12px;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.store-product-list-item:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-sm);
}

.store-product-list-thumb {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: #F8F8F9;
}

.store-product-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-product-list-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.store-product-list-title {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.store-product-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.store-product-list-meta span {
  white-space: nowrap;
}

.store-product-list-meta strong {
  font-weight: 500;
  color: var(--text-primary);
}

.store-product-list-arrow {
  color: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.store-product-list-arrow svg {
  width: 18px;
  height: 18px;
}

.store-product-list-item:hover .store-product-list-arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   PAGINATION STYLING
   ========================================================================== */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding: 12px 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pagination-btn svg {
  width: 14px;
  height: 14px;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.pagination-btn:disabled,
.pagination-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-page-num {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pagination-page-num:hover:not(.active) {
  border-color: var(--border-color-hover);
  color: var(--color-gold);
}

.pagination-page-num.active {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: #ffffff;
  font-weight: 600;
}

/* ==========================================================================
   THEME CUSTOMIZER & LIVE PREVIEW (PERSONALIZAÇÃO TAB)
   ========================================================================== */

.theme-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #EAEAEA;
}

.theme-layout-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .theme-layout-container {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.theme-controls-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.theme-group-card {
  background: #FFFFFF;
  border: 1px solid #E5E5E7;
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.theme-group-header {
  margin-bottom: 18px;
}

.theme-group-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.theme-group-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Palettes Grid */
.palette-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.palette-card {
  background: #FAFAFC;
  border: 1.5px solid #E5E5E8;
  border-radius: var(--radius-card);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.palette-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.palette-card.active {
  border-color: var(--color-gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--color-gold), var(--shadow-sm);
}

.palette-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.palette-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.palette-badge-active {
  font-size: 0.68rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--color-gold);
  padding: 2px 8px;
  border-radius: var(--radius-button);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.palette-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  flex-grow: 1;
}

.palette-swatches-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed #E5E5E8;
}

.palette-swatch-dot {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

/* Color Subgroups */
.color-subgroup {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed #EAEAEA;
}

.color-subgroup:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.color-subgroup-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.color-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.color-picker-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.color-picker-item label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-row input[type="color"] {
  width: 44px;
  height: 38px;
  border: 1px solid #D5D5D8;
  border-radius: var(--radius-input);
  padding: 2px;
  cursor: pointer;
  background: #FFFFFF;
  flex-shrink: 0;
}

.color-picker-row input[type="text"] {
  flex: 1;
  min-width: 90px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #FAFAFC;
  border: 1px solid #D5D5D8;
  border-radius: var(--radius-input);
  outline: none;
  transition: var(--transition-smooth);
}

.color-picker-row input[type="text"]:focus {
  border-color: var(--color-gold);
  background: #FFFFFF;
}

/* Radius Presets Grid */
.radius-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.radius-preset-card {
  background: #FAFAFC;
  border: 1.5px solid #E5E5E8;
  border-radius: var(--radius-card);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.radius-preset-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.radius-preset-card.active {
  border-color: var(--color-gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 1px var(--color-gold), var(--shadow-sm);
}

.radius-preset-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.radius-preset-preview-shape {
  width: 44px;
  height: 28px;
  background-color: var(--color-gold);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.radius-preset-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.radius-preset-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.radius-preset-values {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.radius-preset-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   STICKY LIVE PREVIEW (RIGHT COLUMN)
   ========================================================================== */

.theme-preview-column {
  position: relative;
  align-self: stretch;
}

.theme-preview-sticky-wrapper {
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  border: 1px solid #E0E0E3;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  background: #FFFFFF;
  z-index: 10;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.theme-preview-header-bar {
  background: #202024;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.preview-browser-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.preview-browser-dots span:nth-child(1) { background: #FF5F56; }
.preview-browser-dots span:nth-child(2) { background: #FFBD2E; }
.preview-browser-dots span:nth-child(3) { background: #27C93F; }

.preview-status-tag {
  color: #A0A0AA;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.live-preview-viewport {
  padding: 16px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.preview-store-header {
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.preview-store-logo {
  width: 36px;
  height: 36px;
  margin: 0 auto 4px auto;
  border-radius: var(--radius-card);
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.preview-store-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1px;
  transition: color 0.2s ease;
}

.preview-store-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.preview-categories-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.preview-cat-item {
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: default;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.preview-product-card {
  border: 1px solid transparent;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.preview-img-container {
  position: relative;
}

.preview-img-aspect {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 130px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-radius 0.25s ease;
}

.preview-ring-svg {
  width: 42px;
  height: 42px;
  color: var(--color-gold);
  opacity: 0.85;
}

.preview-product-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #FFFFFF;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: border-radius 0.25s ease;
}

.preview-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-product-name {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
  transition: color 0.2s ease;
}

.preview-product-description {
  font-size: 0.72rem;
  line-height: 1.35;
  margin: 0;
  transition: color 0.2s ease;
}

.preview-product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
  margin-bottom: 4px;
}

.preview-price-val {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.preview-ref-code {
  font-size: 0.65rem;
  font-family: monospace;
  transition: color 0.2s ease;
}

.preview-action-buttons {
  display: flex;
  gap: 6px;
}

.preview-action-btn {
  flex: 1;
  padding: 7px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: default;
  text-align: center;
  border: none;
  transition: all 0.25s ease;
}

.preview-action-btn.primary {
  color: #FFFFFF;
}

.preview-action-btn.secondary {
  background: transparent;
  border: 1px solid transparent;
}

.preview-wa-banner {
  padding: 8px 10px;
  color: #FFFFFF;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: auto;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==========================================================================
   DIASTORE ADMIN PANEL - DARK SAAS DESIGN SYSTEM & RESPONSIVENESS
   (Referência Visual: Gerador de Toco / Gerenciador de Escalas)
   ========================================================================== */

.admin-store-body {
  --admin-bg: #0b0f19;
  --admin-bg-alt: #0e1424;
  --admin-surface: #131b2e;
  --admin-surface-hover: #19233c;
  --admin-surface-elevated: #162035;
  --admin-sidebar-bg: #090e18;
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-border-focus: #3b82f6;
  --admin-border-subtle: rgba(255, 255, 255, 0.05);
  --admin-text-main: #f8fafc;
  --admin-text-secondary: #94a3b8;
  --admin-text-muted: #64748b;
  --admin-primary: #2563eb;
  --admin-primary-hover: #1d4ed8;
  --admin-primary-glow: rgba(37, 99, 235, 0.25);
  --admin-success: #10b981;
  --admin-success-bg: rgba(16, 185, 129, 0.12);
  --admin-danger: #ef4444;
  --admin-danger-bg: rgba(239, 68, 68, 0.12);
  --admin-danger-hover: #dc2626;
  --admin-warning: #f59e0b;
  --admin-accent-gold: #c5a059;
  --admin-radius-sm: 6px;
  --admin-radius-md: 10px;
  --admin-radius-lg: 14px;
  --admin-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --admin-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --admin-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  background-color: var(--admin-bg) !important;
  color: var(--admin-text-main) !important;
  font-family: var(--admin-font) !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Layout Principal e Correção do Encolhimento da Sidebar */
.admin-store-body .dashboard-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}

/* Sidebar Desktop */
.admin-store-body .dashboard-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  flex-shrink: 0;
  background-color: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-sizing: border-box;
}

/* Área de Conteúdo Principal */
.admin-store-body .dashboard-main {
  flex: 1;
  min-width: 0; /* Impede que tabelas internas largas expandam o flex item e apertem a sidebar */
  background-color: var(--admin-bg);
  padding: 32px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Cabeçalho da Sidebar */
.admin-store-body .sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-store-body .sidebar-brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  text-align: left;
}

.admin-store-body .sidebar-brand-badge {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.admin-store-body .sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.admin-store-body .menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--admin-radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--admin-text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.admin-store-body .menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-store-body .menu-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--admin-text-main);
  border-color: rgba(255, 255, 255, 0.05);
}

.admin-store-body .menu-item.active {
  background-color: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
  font-weight: 600;
  border-color: rgba(37, 99, 235, 0.25);
}

.admin-store-body .menu-item.active svg {
  opacity: 1;
  color: #60a5fa;
}

.admin-store-body .sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--admin-border);
}

/* Header Superior Mobile */
.admin-mobile-header {
  display: none;
}

.admin-drawer-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--admin-text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.admin-drawer-close-btn:hover {
  color: var(--admin-text-main);
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
}

/* Dashboard Header & Cards */
.admin-store-body .dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-store-body .dashboard-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--admin-text-main);
  letter-spacing: -0.3px;
  margin: 0;
}

.admin-store-body .dashboard-subtitle {
  color: var(--admin-text-secondary);
  font-size: 0.88rem;
  margin-top: 4px;
  margin-bottom: 0;
}

.admin-store-body .dashboard-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-lg);
  padding: 24px;
  box-shadow: var(--admin-shadow-sm);
  margin-bottom: 24px;
  transition: border-color 0.2s ease;
}

.admin-store-body .dashboard-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Botões Padronizados do Admin */
.admin-store-body .saas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--admin-radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.4;
  user-select: none;
}

.admin-store-body .saas-btn:active {
  transform: scale(0.98);
}

.admin-store-body .saas-btn-primary {
  background-color: var(--admin-primary) !important;
  color: #ffffff !important;
  border: 1px solid var(--admin-primary) !important;
  box-shadow: 0 2px 8px var(--admin-primary-glow);
}

.admin-store-body .saas-btn-primary:hover {
  background-color: var(--admin-primary-hover) !important;
  border-color: var(--admin-primary-hover) !important;
  box-shadow: 0 4px 14px var(--admin-primary-glow);
}

.admin-store-body .saas-btn-outline {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--admin-border) !important;
  color: var(--admin-text-main) !important;
  margin-left: 0 !important;
}

.admin-store-body .saas-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.admin-store-body .saas-btn-danger {
  background: var(--admin-danger-bg) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: var(--admin-danger) !important;
}

.admin-store-body .saas-btn-danger:hover {
  background: var(--admin-danger) !important;
  color: #ffffff !important;
}

/* Action Badges em Tabelas e Listas */
.admin-store-body .action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--admin-radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid transparent;
}

.admin-store-body .action-badge-edit {
  background-color: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
  border-color: rgba(37, 99, 235, 0.25);
}

.admin-store-body .action-badge-edit:hover {
  background-color: rgba(37, 99, 235, 0.22);
  color: #93c5fd;
}

.admin-store-body .action-badge-danger {
  background-color: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.admin-store-body .action-badge-danger:hover {
  background-color: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

/* Status Badges */
.admin-store-body .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.admin-store-body .status-published {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-store-body .status-published:hover {
  background-color: rgba(16, 185, 129, 0.25);
}

.admin-store-body .status-private {
  background-color: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-store-body .status-private:hover {
  background-color: rgba(148, 163, 184, 0.2);
}

/* Formulários & Campos Dark */
.admin-store-body .form-group {
  margin-bottom: 20px;
}

.admin-store-body .form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.admin-store-body .form-group input[type="text"],
.admin-store-body .form-group input[type="number"],
.admin-store-body .form-group textarea,
.admin-store-body .form-group select {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--admin-surface-elevated);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-md);
  color: var(--admin-text-main);
  font-family: var(--admin-font);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.admin-store-body .form-group input:focus,
.admin-store-body .form-group textarea:focus,
.admin-store-body .form-group select:focus {
  border-color: var(--admin-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background-color: #0b1120;
}

.admin-store-body .form-group small,
.admin-store-body .form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

/* Seções Estruturadas do Formulário de Joias */
.form-sections-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.form-section-card {
  background: var(--admin-surface-elevated);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-md);
  padding: 20px;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border-subtle);
}

.form-section-icon {
  font-size: 1.2rem;
}

.form-section-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--admin-text-main);
  margin: 0;
}

.form-section-header p {
  font-size: 0.78rem;
  color: var(--admin-text-secondary);
  margin: 2px 0 0 0;
}

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

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .form-grid-2,
  .form-grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Upload de Imagens com Preview */
.image-upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--admin-radius-md);
  padding: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.2s ease;
}

.image-upload-zone:hover {
  border-color: var(--admin-primary);
  background: rgba(37, 99, 235, 0.04);
}

.images-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--admin-radius-sm);
  overflow: hidden;
  border: 1px solid var(--admin-border);
  background: #090e18;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

/* Tabelas e Wrappers Responsivos */
.admin-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--admin-radius-md);
  border: 1px solid var(--admin-border);
}

.admin-store-body .dashboard-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--admin-surface);
}

.admin-store-body .dashboard-table th {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--admin-text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border);
  white-space: nowrap;
}

.admin-store-body .dashboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--admin-border-subtle);
  color: var(--admin-text-main);
  font-size: 0.88rem;
}

.admin-store-body .dashboard-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Listas Compactas Mobile */
.mobile-items-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.mobile-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--admin-surface-elevated);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-md);
  padding: 12px;
  transition: all 0.2s ease;
}

.mobile-item-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.mobile-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--admin-radius-sm);
  background: #090e18;
  border: 1px solid var(--admin-border);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--admin-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.mobile-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.mobile-item-price {
  font-weight: 600;
  color: #60a5fa;
}

.mobile-item-cat-tag {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--admin-text-secondary);
  font-size: 0.72rem;
}

.mobile-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* Estados Vazios */
.admin-empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--admin-surface-elevated);
  border: 1px dashed var(--admin-border);
  border-radius: var(--admin-radius-lg);
  margin: 16px 0;
}

.admin-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: inline-block;
}

.admin-empty-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--admin-text-main);
  margin-bottom: 6px;
}

.admin-empty-desc {
  font-size: 0.85rem;
  color: var(--admin-text-secondary);
  max-width: 380px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}

/* Tabela de Cadastro em Lote */
.admin-store-body .bulk-row input,
.admin-store-body .bulk-row select {
  background: #090e18 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 8px 10px !important;
  border-radius: var(--admin-radius-sm) !important;
  font-size: 0.85rem !important;
  outline: none !important;
}

.admin-store-body .bulk-row input:focus,
.admin-store-body .bulk-row select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

/* Alternância Desktop / Mobile */
@media (max-width: 768px) {
  .desktop-only-view {
    display: none !important;
  }

  .mobile-only-view {
    display: flex !important;
  }

  .admin-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--admin-sidebar-bg);
    border-bottom: 1px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 990;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--admin-text-main);
  }

  .admin-drawer-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--admin-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--admin-border);
    color: var(--admin-text-main);
    cursor: pointer;
  }

  .admin-store-body .dashboard-layout {
    flex-direction: column;
  }

  .admin-store-body .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
  }

  .admin-store-body .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }

  .admin-sidebar-backdrop.active {
    display: block;
  }

  .admin-drawer-close-btn {
    display: flex !important;
  }

  .admin-store-body .dashboard-main {
    padding: 16px;
    width: 100%;
  }

  .admin-store-body .dashboard-header {
    margin-bottom: 20px;
  }

  .admin-store-body .dashboard-card {
    padding: 16px;
    margin-bottom: 16px;
  }
}

@media (min-width: 769px) {
  .desktop-only-view {
    display: block !important;
  }

  .mobile-only-view {
    display: none !important;
  }
}

