/* =========================================================
   RAGHUNANDAN JEWELLERS ADMIN PANEL STYLESHEET
   Clean Minimalist Architecture (100% Sans-Serif, No Emojis)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --admin-bg: #f4f6f8;
  --admin-surface: #ffffff;
  --admin-card: #ffffff;
  --admin-card-border: #e2e8f0;
  --text-main: #0f1012;
  --text-sub: #6c757d;
  --border-light: #e5e7eb;
  --border-medium: #cbd5e1;
  --color-black: #0f1012;
  --color-charcoal: #212529;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
  --info: #0369a1;
  --shadow-lg: 0 12px 28px rgba(15, 16, 18, 0.12);
  --sidebar-width: 260px;
  --topbar-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  font-family: var(--font-main);
  background-color: var(--admin-bg);
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Hide scrollbars globally across all browsers */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

h1, h2, h3, h4, h5, h6, button, input, select, textarea {
  font-family: var(--font-main);
}

/* =========================================================
   SIDEBAR NAVIGATION & MAIN APP LAYOUT
   ========================================================= */
.admin-app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background-color: var(--admin-bg);
}

.sidebar-backdrop {
  display: none;
}

/* Left Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: #0f1012;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 16px 16px;
  z-index: 200;
  overflow: hidden;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.sidebar-brand-badge {
  width: 40px;
  height: 40px;
  background: #000000;
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 3px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.sidebar-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar-brand-info {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  line-height: 1.1;
}

.sidebar-brand-label {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Sidebar Nav Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav-item {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #94a3b8;
  padding: 11px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  box-sizing: border-box;
  text-align: left;
}

.sidebar-nav-icon {
  flex-shrink: 0;
  color: inherit;
  transition: transform 0.18s ease;
}

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

.sidebar-nav-item:hover .sidebar-nav-icon {
  transform: scale(1.08);
}

.sidebar-nav-item.active {
  background: #ffffff;
  color: #0f1012;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.sidebar-nav-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  min-width: 1.5rem;
  text-align: center;
}

.inventory-count-pill {
  font-size: 0.82rem;
  color: var(--text-sub);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.inventory-count-pill strong {
  color: #0f1012;
  font-weight: 700;
}

.panel-card-subtitle {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.inventory-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 16px;
  color: var(--text-sub);
  font-size: 0.9rem;
  font-weight: 600;
}

.inventory-loading-inline {
  padding: 16px;
}

.inventory-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e2e8f0;
  border-top-color: #0f1012;
  border-radius: 50%;
  animation: inventory-spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

.sidebar-nav-item.active .sidebar-nav-badge {
  background: #0f1012;
  color: #ffffff;
}

.sidebar-nav-link {
  color: #64748b;
  margin-top: 8px;
}

.sidebar-nav-link:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

/* Sidebar Bottom User & Logout */
.sidebar-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
}

.sidebar-user-role {
  font-size: 0.64rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.sidebar-user-name {
  font-size: 0.8rem;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-btn-logout {
  width: 100%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.sidebar-btn-logout:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Right Main Content Wrap */
.admin-main-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--admin-bg);
  overflow: hidden;
}

/* Top Bar */
.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  height: var(--topbar-height);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-sidebar-toggle {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--color-black);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.topbar-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.topbar-page-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-black);
  margin: 0;
  text-transform: uppercase;
  line-height: 1.15;
}

.topbar-page-subtitle {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  text-transform: uppercase;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-topbar-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--color-black);
  color: var(--color-black);
  padding: 8px 16px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-topbar-store:hover {
  background: var(--color-black);
  color: #ffffff;
}

/* Layout Container — only this pane scrolls */
.admin-container {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 24px 28px 48px;
  overflow: auto;
}

/* Simplified 4-Field Form Grid */
.form-grid-simple {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid-simple .form-grid-full {
  grid-column: 1 / -1;
}


/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--admin-card-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 2px rgba(15, 16, 18, 0.04);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  font-weight: 700;
}

.stat-value {
  font-family: var(--font-main);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-black);
  line-height: 1.2;
}

.stat-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  margin-top: 4px;
  width: fit-content;
  font-weight: 600;
}

.stat-badge.s3-active {
  background: #dcfce7;
  color: var(--success);
  border: 1px solid #86efac;
}

.stat-badge.s3-inactive {
  background: #f1f5f9;
  color: var(--color-charcoal);
  border: 1px solid #cbd5e1;
}

/* Navigation Tabs */
.admin-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
  overflow-x: auto;
}

.tab-btn {
  font-family: var(--font-main);
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-black);
}

.tab-btn.active {
  color: var(--color-black);
  border-bottom-color: var(--color-black);
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Card Sections */
.panel-card {
  background: #ffffff;
  border: 1px solid var(--admin-card-border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(15, 16, 18, 0.04);
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.panel-card-title {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-black);
}

.panel-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-grid-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.form-label .required {
  color: var(--danger);
}

.form-label .hint {
  font-size: 0.72rem;
  color: var(--text-sub);
  font-weight: 400;
}

.form-input, .form-select, .form-textarea {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--color-black);
  padding: 10px 14px;
  font-size: 0.86rem;
  outline: none;
  width: 100%;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-black);
}

.form-textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.45;
}

.optional-tag {
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button .form-input {
  flex: 1;
}

.btn-mini {
  background: var(--admin-bg);
  border: 1px solid var(--border-light);
  color: var(--color-black);
  padding: 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-mini:hover {
  background: var(--color-black);
  color: #ffffff;
  border-color: var(--color-black);
}

/* =========================================================
   LUXURY UPLOAD PRODUCT HERO CARD & WORKSPACE
   ========================================================= */
.upload-hero-card {
  background: #ffffff;
  border: 1px solid var(--admin-card-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 16, 18, 0.04);
  width: 100%;
  max-width: none;
  margin: 0;
}

.upload-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border-light);
}

.upload-main-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-black);
  margin: 0;
  line-height: 1.15;
}

.upload-main-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.45;
}

.btn-sample-magic {
  background: #ffffff;
  border: 1.5px solid var(--color-black);
  color: var(--color-black);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-sample-magic:hover {
  background: var(--color-black);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 16, 18, 0.18);
}

/* Form Inputs & Styled Controls */
.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-black);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.label-with-icon svg {
  color: var(--text-sub);
}

.form-input-lg {
  padding: 12px 16px;
  font-size: 0.92rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  transition: all 0.2s ease;
}

.form-input-lg:focus {
  background: #ffffff;
  border-color: var(--color-black);
  box-shadow: 0 0 0 3px rgba(15, 16, 18, 0.08);
}

/* Suffix Wrap for Weight */
.input-suffix-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-suffix-select {
  position: absolute;
  right: 6px;
  height: 30px;
  max-width: 78px;
  border: none;
  border-radius: 4px;
  background: #e2e8f0;
  color: #0f1012;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  padding: 0 4px 0 8px;
  cursor: pointer;
}

.input-suffix-wrap .form-input {
  width: 100%;
  padding-right: 88px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 0.92rem;
  padding-top: 12px;
  padding-bottom: 12px;
}

.input-suffix-wrap .form-input:focus {
  background: #ffffff;
  border-color: var(--color-black);
  box-shadow: 0 0 0 3px rgba(15, 16, 18, 0.08);
}

.input-suffix-badge {
  position: absolute;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-sub);
  background: #e2e8f0;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  pointer-events: none;
  letter-spacing: 0.04em;
}

/* Styled Select with SVG down arrow */
.select-styled-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-select-styled {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 12px 38px 12px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select-styled:focus {
  background: #ffffff;
  border-color: var(--color-black);
  box-shadow: 0 0 0 3px rgba(15, 16, 18, 0.08);
}

.select-arrow-icon {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: var(--text-sub);
}

/* Luxury Studio Dropzone */
.luxury-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.luxury-dropzone:hover, .luxury-dropzone.dragover {
  border-color: var(--color-black);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 16, 18, 0.06);
  transform: translateY(-2px);
}

.dropzone-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.luxury-dropzone:hover .dropzone-icon-badge {
  transform: scale(1.08);
}

.btn-dropzone-browse {
  background: var(--color-black);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.18s ease;
}

.btn-dropzone-browse:hover {
  background: #23252a;
  transform: translateY(-1px);
}

/* External Image URL Fallback */
.image-url-fallback-wrap {
  margin-top: 16px;
}

.url-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 10px;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.url-divider::before, .url-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.url-divider span {
  padding: 0 12px;
}

.url-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.url-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.form-input-url {
  padding: 10px 14px 10px 38px;
  font-size: 0.84rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  width: 100%;
}

.form-input-url:focus {
  border-color: var(--color-black);
}

/* Upload Actions Bar */
.upload-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-light);
}

.btn-reset-clean {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--text-sub);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-reset-clean:hover {
  border-color: var(--color-black);
  color: var(--color-black);
  background: #ffffff;
}

.btn-submit-luxury {
  background: var(--color-black);
  color: #ffffff;
  border: 1px solid var(--color-black);
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(15, 16, 18, 0.2);
}

.btn-submit-luxury:hover {
  background: #23252a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 16, 18, 0.3);
}

.btn-submit-luxury:active {
  transform: translateY(0);
}

.btn-submit-luxury:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Live Compression Feedback Card */
.compression-preview-card {
  display: none;
  margin-top: 14px;
  background: var(--admin-bg);
  border: 1px solid var(--border-light);
  padding: 14px;
  gap: 16px;
  align-items: center;
  border-radius: 8px;
}

.compression-preview-card.active {
  display: block;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #fff;
}

.image-preview-item.is-cover {
  box-shadow: 0 0 0 2px #0f1012;
}

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

.image-preview-cover,
.image-preview-index,
.image-preview-cover-btn {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(15, 16, 18, 0.82);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
}

.image-preview-cover-btn {
  right: 4px;
  left: 4px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.image-preview-cover-btn:hover {
  background: #0f1012;
}

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 16, 18, 0.82);
  color: #fff;
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
}

.image-preview-note {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-sub);
}

.table-thumb-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.table-image-count {
  position: absolute;
  right: 2px;
  bottom: 2px;
  background: rgba(15, 16, 18, 0.82);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 999px;
}

.compress-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.compress-details {
  flex: 1;
  min-width: 0;
}

.compress-file-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-black);
  word-break: break-word;
}

.compress-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.compress-stats-row {
  display: flex;
  gap: 14px;
  font-size: 0.78rem;
  margin-top: 4px;
  color: var(--text-sub);
  flex-wrap: wrap;
}

.compress-stats-row strong {
  color: var(--color-black);
}

.compress-badge {
  background: #dcfce7;
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: auto;
}


.btn-submit {
  font-family: var(--font-main);
  background: var(--color-black);
  color: #ffffff;
  font-weight: 700;
  padding: 12px 24px;
  border: 1px solid var(--color-black);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-submit:hover {
  background: var(--color-charcoal);
}

.btn-reset {
  font-family: var(--font-main);
  background: #ffffff;
  color: var(--color-charcoal);
  border: 1px solid var(--border-light);
  padding: 12px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}

/* Products Table */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.table-search {
  flex: 1 1 220px;
  max-width: 360px;
  width: 100%;
}

.table-filter-pair {
  margin-left: auto;
}

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

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.admin-table th {
  background: #f8fafc;
  color: var(--color-charcoal);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
}

.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #fbfbfc;
}

.table-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border: 1px solid var(--border-light);
}

.table-product-title {
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.2;
}

.table-sku-tag {
  font-size: 0.72rem;
  color: var(--color-black);
  font-weight: 700;
}

.table-dim-badge {
  font-size: 0.76rem;
  color: var(--text-sub);
  max-width: 220px;
  white-space: normal;
}

.badge-storage {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  display: inline-block;
}

.badge-storage.s3 {
  background: #e0f2fe;
  color: var(--info);
  border: 1px solid #bae6fd;
}

.badge-storage.local {
  background: #f1f5f9;
  color: var(--color-charcoal);
  border: 1px solid #cbd5e1;
}

.badge-storage.external {
  background: #f1f5f9;
  color: var(--text-sub);
  border: 1px solid #e2e8f0;
}

.admin-table tr.is-inactive td {
  background: #f8fafc;
}

.admin-table tr.is-inactive .table-product-title {
  color: #64748b;
}

.status-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #64748b;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-switch:disabled {
  opacity: 0.6;
  cursor: wait;
}

.status-switch.is-on {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.status-switch-knob {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #d1d5db;
  flex: 0 0 28px;
}

.status-switch-knob::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.15s ease;
}

.status-switch.is-on .status-switch-knob {
  background: #22c55e;
}

.status-switch.is-on .status-switch-knob::after {
  transform: translateX(12px);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-text {
  font-family: var(--font-main);
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--color-charcoal);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-text:hover {
  border-color: var(--color-black);
  color: var(--color-black);
}

.btn-action-text.delete:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: #fef2f2;
}

/* AWS S3 Settings Page */
.s3-guide-box {
  background: var(--admin-bg);
  border: 1px solid var(--border-light);
  padding: 16px;
  margin-bottom: 24px;
  font-size: 0.84rem;
  line-height: 1.6;
}

.s3-guide-box h4 {
  color: var(--color-black);
  margin-bottom: 6px;
  font-weight: 700;
}

.s3-test-result {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 0.84rem;
  display: none;
}

.s3-test-result.success {
  display: block;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: var(--success);
}

.s3-test-result.error {
  display: block;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: var(--danger);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-width) + 24px);
  right: auto;
  background: var(--color-black);
  border: 1px solid var(--color-black);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.22s ease;
  font-size: 0.84rem;
  font-weight: 600;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-actions button, .btn-icon {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--color-black);
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.table-actions button:hover, .btn-icon:hover {
  background: var(--color-black);
  color: #ffffff;
}

.table-actions button.delete:hover, .btn-icon.delete:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

/* =========================================================
   ADMIN LOGIN OVERLAY & CARD (CLEAN LUXURY DESIGN)
   ========================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 25%, #fbfbfc 0%, #f0f2f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 36px 32px 28px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  box-sizing: border-box;
  animation: loginAppear 0.22s ease-out;
}

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

.login-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.login-logo-badge {
  width: 52px;
  height: 52px;
  background: #000000;
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 5px;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.login-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.login-brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0f1012;
  margin: 0 0 4px;
  text-transform: uppercase;
  line-height: 1.2;
}

.login-brand-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
  margin: 0;
}

.login-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.login-alert .alert-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: #ef4444;
  color: #ffffff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.login-field {
  margin-bottom: 18px;
}

.login-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-toggle-pass {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-toggle-pass:hover {
  color: #0f1012;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap .input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.login-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px 10px 38px;
  color: #0f1012;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  background: #ffffff;
  border-color: #0f1012;
  box-shadow: 0 0 0 3px rgba(15, 16, 18, 0.08);
}

.login-input::placeholder {
  color: #94a3b8;
}

.btn-login-primary {
  width: 100%;
  background: #0f1012;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-login-primary:hover {
  background: #27272a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 16, 18, 0.15);
}

.btn-login-primary:active {
  background: #0f1012;
  transform: translateY(0);
}

.btn-login-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.login-back-link {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-back-link:hover {
  color: #0f1012;
}

/* =========================================================
   HEADER AUTHENTICATION BADGE & LOGOUT BUTTON
   ========================================================= */
.admin-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-black);
}

.auth-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  display: inline-block;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.auth-user {
  text-transform: uppercase;
  color: var(--color-black);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--danger);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-logout:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  transform: translateY(-1px);
}

/* =========================================================
   UPLOAD WORKSPACE: FORM + LIVE STOREFRONT PREVIEW
   ========================================================= */
.upload-workspace-layout {
  width: 100%;
}

.upload-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.upload-fields {
  min-width: 0;
}

.upload-media {
  min-width: 0;
  position: sticky;
  top: 0;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.upload-media .luxury-dropzone {
  flex: 1;
  justify-content: center;
  min-height: 180px;
}

.upload-media .form-label {
  margin-bottom: 2px;
}

.weight-card-container {
  margin-top: 20px;
}

.upload-main-form {
  width: 100%;
}

.form-input-highlight {
  border-color: #94a3b8;
  background: #fafbfc;
  font-weight: 600;
}

.form-input-highlight:focus {
  border-color: var(--color-black);
  background: #ffffff;
}

/* Live Preview Sidebar */
.live-preview-sidebar {
  min-width: 0;
}

.preview-panel-sticky {
  position: sticky;
  top: 90px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.preview-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.preview-panel-ratio {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
}

.preview-panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f1012;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}

.preview-live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulseGreen 1.8s infinite;
}

.preview-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-black);
  margin: 0 0 4px;
}

.preview-panel-subtitle {
  font-size: 0.74rem;
  color: var(--text-sub);
  margin: 0 0 18px;
  line-height: 1.4;
}

/* Storefront Card Mockup (Exact clone of category.html product card) */
.preview-card-wrapper {
  margin-bottom: 18px;
}

.storefront-preview-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.storefront-preview-card:hover {
  border-color: var(--color-black);
  box-shadow: 0 14px 32px rgba(15, 16, 18, 0.12);
  transform: translateY(-3px);
}

.preview-card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fbfbfc;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.preview-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.storefront-preview-card:hover .preview-card-img {
  transform: scale(1.06);
}

.preview-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 18, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 3;
}

.storefront-preview-card:hover .preview-card-overlay {
  opacity: 1;
}

.preview-btn-view {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-black);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transform: translateY(6px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.storefront-preview-card:hover .preview-btn-view {
  transform: translateY(0);
}

.preview-arrow {
  transition: transform 0.2s ease;
}

.storefront-preview-card:hover .preview-arrow {
  transform: translateX(3px);
}

.preview-card-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
}

.preview-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-black);
  margin: 0 0 8px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-card-weight-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding-top: 4px;
}

.preview-weight-label {
  color: var(--text-sub);
  font-weight: 500;
}

.preview-weight-value {
  color: var(--color-black);
  font-weight: 700;
}

.preview-card-meta-notes {
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-note-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  line-height: 1.3;
}

.meta-note-label {
  color: var(--text-sub);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.meta-note-val {
  color: var(--color-black);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* =========================================================
   INVENTORY TABLE WEIGHT CELL
   ========================================================= */
.table-weight-cell {
  font-weight: 700;
  color: var(--color-black);
  background: #f8fafc;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  display: inline-block;
  font-size: 0.8rem;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .upload-split {
    grid-template-columns: 1fr;
  }

  .upload-media {
    position: static;
  }

  .preview-panel-sticky {
    position: static;
  }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    width: min(280px, 86vw);
    flex: none;
    transform: translateX(-105%);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.5);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 400;
  }

  .admin-sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 16, 18, 0.45);
    z-index: 350;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .btn-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .admin-topbar {
    padding: 0 16px;
  }

  .admin-container {
    padding: 16px 14px 36px;
  }

  .form-grid-simple {
    grid-template-columns: 1fr;
  }

  .upload-hero-card,
  .panel-card {
    padding: 16px;
  }

  .table-filter-pair {
    width: 100%;
  }

  .table-filter-select {
    flex: 1 1 140px;
    max-width: none;
    min-width: 0;
  }
}

/* =========================================================
   CUSTOM DELETE CONFIRMATION ALERT MODAL
   ========================================================= */
.custom-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-alert-overlay.active {
  opacity: 1;
}

.custom-alert-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 30px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.94) translateY(12px);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-alert-overlay.active .custom-alert-card {
  transform: scale(1) translateY(0);
}

.custom-alert-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.custom-alert-title {
  font-family: var(--font-main);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-black);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.custom-alert-message {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin: 0 0 24px;
}

.delete-highlight-name {
  color: var(--color-black);
  font-weight: 700;
  display: inline-block;
  word-break: break-word;
}

.custom-alert-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-alert-cancel {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--color-black);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-alert-cancel:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-alert-delete {
  flex: 1;
  background: #dc2626;
  border: 1px solid #dc2626;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.btn-alert-delete:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}

/* ================= Dynamic Weight Breakdown & Composition Styles ================= */
.weight-card-container {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px 14px;
  box-shadow: none;
}

.weight-card-container:focus-within {
  border-color: #cbd5e1;
  box-shadow: none;
}

.weight-card-header {
  display: block;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.metal-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.metal-choice-row .form-input-details,
#inp-metal-color-wrap {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .metal-choice-row {
    grid-template-columns: 1fr;
  }
}

.weight-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.weight-card-title {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-black);
  text-transform: none;
}

.weight-card-subtitle {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-sub);
}

.weight-primary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.weight-field-metal {
  flex: 1 1 240px;
  max-width: 320px;
}

.weight-toggle-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  padding-bottom: 1px;
}

.btn-toggle-weight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-toggle-weight:hover {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-toggle-weight.active {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-toggle-weight .plus-icon {
  font-weight: 900;
  font-size: 0.85rem;
}

.weight-inputs-grid {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.weight-inputs-grid:has(.weight-dynamic-box.is-open) {
  display: grid;
}

.weight-field-col {
  margin-bottom: 0;
  min-width: 0;
}

.weight-field-metal .form-input {
  background: #ffffff;
}

.weight-dynamic-box {
  display: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  animation: fadeInDown 0.25s ease both;
}

.weight-dynamic-box.is-open {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.label-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-black);
}

.mini-tag {
  font-size: 0.65rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.btn-remove-box {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-remove-box:hover {
  background: #fee2e2;
  color: #dc2626;
}

.form-input-details {
  margin-top: 0;
  font-size: 0.8rem;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.weight-calc-hint {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 6px;
}

/* Live Weight Summary Bar */
.weight-summary-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.summary-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-main);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.chip-metal {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.chip-diamond {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.chip-stone {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.chip-gross {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* Cascading Table Filters in Inventory Tab */
.table-filter-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.table-filter-select {
  width: auto;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  min-width: 170px;
  max-width: 240px;
  flex: 0 1 220px;
}

/* Table Weight Stack cell */
.table-weight-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weight-primary-pill {
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  color: #000000;
}

.weight-sub-pill {
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

.weight-sub-pill.dia-pill strong {
  color: #0284c7;
}

.weight-sub-pill.stone-pill strong {
  color: #059669;
}

.weight-sub-pill.gross-pill strong {
  color: #64748b;
}

@media (max-width: 900px) {
  .table-search {
    flex: 1 1 100%;
    max-width: none;
  }

  .table-filter-pair {
    width: 100%;
    margin-left: 0;
  }

  .table-filter-select {
    min-width: 0;
    max-width: none;
    flex: 1 1 0;
  }

  .weight-primary-row,
  .weight-inputs-grid {
    grid-template-columns: 1fr;
  }

  .weight-toggle-actions {
    justify-content: flex-start;
  }

  .toast {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
}


