/* ==========================================================================
   A ERVANÁRIA — ADMIN CMS DEDICATED STYLESHEET
   Botanical Forest & Natural Warm Minimalist Theme
   ========================================================================== */

:root {
  --admin-forest: #0d1910;
  --admin-forest-light: #162a1b;
  --admin-forest-card: #112015;
  --admin-sage: #9bc5a9;
  --admin-sage-dark: #2d5a37;
  --admin-sage-light: #e2ede5;
  --admin-cream: #f4f2ea;
  --admin-bg: #f8f7f2;
  --admin-card-bg: #ffffff;
  --admin-border: #ded9cd;
  --admin-border-light: #ece7dc;
  --admin-text-dark: #121f15;
  --admin-text-muted: #57685c;
  --admin-primary: #183320;
  --admin-primary-hover: #1f4229;
  --admin-danger: #e11d48;
  --admin-success: #15803d;
  --admin-warning: #d97706;
}

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

body.admin-body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. AUTH GATE / LOGIN SCREEN
   ========================================================================== */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #15271b 0%, #0a130c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
}

.auth-gate-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.auth-gate-logo {
  height: 48px;
  width: auto;
  margin: 0 auto 18px;
  display: block;
  object-fit: contain;
}

.auth-gate-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #111e15;
  margin-bottom: 6px;
}

.auth-gate-card p {
  font-size: 13px;
  color: #55665a;
  margin-bottom: 24px;
}

.auth-gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.auth-input-wrap label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #223527;
  margin-bottom: 6px;
}

.auth-input-wrap input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d4cdc0;
  border-radius: 10px;
  font-size: 14px;
  background: #faf9f6;
  color: #111e15;
  outline: none;
  transition: all 0.2s;
}

.auth-input-wrap input:focus {
  border-color: #1e3b27;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 59, 39, 0.15);
}

.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #4a584e;
}

.auth-submit-btn {
  background: #122216;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}

.auth-submit-btn:hover {
  background: #1b3524;
  transform: translateY(-1px);
}

.auth-error-text {
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 10px;
  text-align: center;
}

/* ==========================================================================
   2. MAIN ADMIN LAYOUT & SIDEBAR (CENTERED LOGO, FIXED WIDTH 280PX)
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--admin-bg);
}

.admin-nav-sidebar {
  width: 280px;
  background-color: #0d1910;
  color: #f4f2ea;
  border-right: 1px solid #1a2f21;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 100;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 22px;
  border-bottom: 1px solid #1a2f21;
  margin-bottom: 24px;
  width: 100%;
}

.admin-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.admin-logo-img-white {
  height: 42px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.3);
  margin: 0 auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #6d9378;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-left: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #b7cbbe;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  white-space: nowrap;
}

.nav-item svg {
  flex-shrink: 0;
  color: #7da68c;
}

.nav-item span.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active {
  background-color: #1a3523;
  color: #ffffff;
  border: 1px solid #2a5237;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nav-item.active svg {
  color: #9bc5a9;
}

.nav-badge {
  flex-shrink: 0;
  margin-left: auto;
  background: #09130c;
  color: #9bc5a9;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid #1a2f21;
}

.sidebar-bottom-actions {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #1a2f21;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #142519;
  border: 1px solid #233e2a;
  color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-btn-outline:hover {
  background: #1c3624;
}

.sidebar-btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: #7da68c;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.sidebar-btn-logout:hover {
  color: #ffffff;
}

/* ==========================================================================
   3. MAIN CONTENT & TABS
   ========================================================================== */
.admin-main {
  margin-left: 280px;
  flex: 1;
  padding: 32px 40px;
  min-height: 100vh;
  max-width: 1560px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: adminFadeIn 0.2s ease-in-out;
}

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

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-header-row h1 {
  font-size: 26px;
  font-weight: 800;
  color: #111e15;
  letter-spacing: -0.02em;
}

.panel-header-row p {
  font-size: 13.5px;
  color: #55665a;
  margin-top: 4px;
}

.btn-success-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #122216;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-success-admin:hover {
  background: #1b3524;
  transform: translateY(-1px);
}

.btn-primary-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #122216;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger-admin {
  background: #e11d48;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-action-delete {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-delete:hover {
  background: #fecaca;
}

.btn-action-edit {
  background: #ffffff;
  color: #1b3524;
  border: 1px solid #d4cdc0;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   4. FILTER BAR & TOOLBAR
   ========================================================================== */
.admin-filter-bar {
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

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

.search-icon-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #88968c;
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #ded9cd;
  border-radius: 8px;
  font-size: 13px;
  background: #faf9f6;
  color: #111e15;
  outline: none;
}

.search-input-wrap input:focus {
  border-color: #1b3524;
  background: #ffffff;
}

.select-wrap select {
  padding: 9px 12px;
  border: 1px solid #ded9cd;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: #111e15;
  outline: none;
  cursor: pointer;
}

.admin-count-indicator {
  margin-left: auto;
  font-size: 12.5px;
  color: #55665a;
  font-weight: 500;
}

/* ==========================================================================
   5. PRODUCT GRID & CARDS
   ========================================================================== */
.admin-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.admin-product-card {
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.admin-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.06);
  border-color: #1b3524;
}

.admin-card-thumb-wrap {
  position: relative;
  height: 200px;
  background: #f8f6f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid #eee9df;
}

.admin-card-thumb {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s;
}

.admin-product-card:hover .admin-card-thumb {
  transform: scale(1.04);
}

.admin-card-brand-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #122216;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.admin-stock-status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.admin-stock-status-pill.is-in-stock {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.admin-stock-status-pill.is-low-stock {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.admin-stock-status-pill.is-out-of-stock {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.admin-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.admin-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #111e15;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card-sku {
  font-size: 11.5px;
  font-family: monospace;
  color: #66776b;
  margin-bottom: 4px;
}

.admin-card-meta {
  font-size: 12px;
  color: #4a584e;
  margin-bottom: 14px;
}

.admin-card-inventory-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #faf9f6;
  border: 1px solid #ded9cd;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 12px;
}

.admin-card-field-group label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #55665a;
  margin-bottom: 4px;
}

.price-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 6px;
  padding: 2px 6px;
}

.price-input-wrapper input {
  width: 100%;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: #111e15;
  outline: none;
}

.price-input-wrapper span {
  font-size: 12px;
  font-weight: 700;
  color: #88968c;
}

.stock-stepper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 6px;
  overflow: hidden;
}

.stock-stepper button {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-size: 14px;
  font-weight: 800;
  color: #1b3524;
  cursor: pointer;
}

.stock-stepper button:hover {
  background: #e2ede5;
}

.stock-stepper input {
  width: 100%;
  border: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #111e15;
  outline: none;
}

.admin-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #eee9df;
}

.btn-card-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #111e15;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-card-edit:hover {
  background: #f4f2ea;
  border-color: #1b3524;
}

.btn-card-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-card-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* ==========================================================================
   6. CARD SECTIONS & STUDIO STYLES
   ========================================================================== */
.admin-card-section {
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.admin-card-section h3 {
  font-size: 17px;
  font-weight: 800;
  color: #111e15;
  margin-bottom: 4px;
}

.section-sub {
  font-size: 13px;
  color: #55665a;
  margin-bottom: 18px;
}

.form-grid-brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

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

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.admin-form-group label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #223527;
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ded9cd;
  border-radius: 8px;
  font-size: 13px;
  background: #ffffff;
  color: #111e15;
  outline: none;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  border-color: #1b3524;
  box-shadow: 0 0 0 2px rgba(27, 53, 36, 0.1);
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed #c2dac7;
  border-radius: 12px;
  background: #faf9f6;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-dropzone:hover {
  background: #e2ede5;
  border-color: #1b3524;
}

.upload-dropzone svg {
  color: #1b3524;
  margin: 0 auto 8px;
  display: block;
}

.upload-dropzone p {
  font-size: 13.5px;
  color: #111e15;
  margin-bottom: 4px;
}

.upload-sub {
  font-size: 11.5px;
  color: #66776b;
}

/* Banner Studio Elements */
.banner-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e2ede5;
  color: #1b3524;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  margin-bottom: 12px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #15803d;
}

.banner-dim-info {
  font-size: 12px;
  color: #55665a;
  margin-bottom: 16px;
}

.banner-live-preview-box {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
  margin-bottom: 16px;
}

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

.banner-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.banner-preview-text-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 40px;
  max-width: 580px;
  color: #ffffff;
}

.preview-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9bc5a9;
  margin-bottom: 6px;
}

.preview-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
}

.preview-desc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.preview-btn {
  align-self: flex-start;
  background: #ffffff;
  color: #111e15;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
}

.banner-position-control-box {
  background: #faf9f6;
  border: 1px solid #ded9cd;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
}

.banner-slider-control {
  width: 100%;
  margin: 10px 0;
  accent-color: #1b3524;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #66776b;
}

/* ==========================================================================
   7. POP-UP & MARKETING STUDIO
   ========================================================================== */
.bf-popup-card {
  width: 380px;
  flex-shrink: 0;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid #ded9cd;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.bf-popup-img-wrap {
  width: 100%;
  height: 200px;
  position: relative;
  background: #0d1910;
  overflow: hidden;
}

.bf-popup-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #15803d;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.bf-popup-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   8. MODAL STYLES
   ========================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10000;
}

.admin-modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border: 1px solid #ded9cd;
}

.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #ded9cd;
}

.admin-modal-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: #111e15;
}

.admin-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #7da68c;
  cursor: pointer;
  line-height: 1;
}

.admin-modal-body {
  padding: 24px;
}

.admin-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee9df;
}

.btn-save-modal {
  background: #122216;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-save-modal:hover {
  background: #1b3524;
}

/* ==========================================================================
   9. TABLES & METRICS
   ========================================================================== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #faf9f6;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #55665a;
  border-bottom: 1px solid #ded9cd;
  text-align: left;
}

.admin-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid #eee9df;
  color: #111e15;
}

.metric-card {
  background: #ffffff;
  border: 1px solid #ded9cd;
  border-radius: 12px;
  padding: 20px;
}

.metric-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #66776b;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
  color: #111e15;
}
