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

:root {
  --primary-color: #a83d84;
  --primary-hover: #8e2b70;
  --primary-light: #fdf2f8;
  --secondary-color: #0f172a;
  --accent-color: #7c2d8c;
  --accent-light: #fae8ff;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --surface-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-focus: #c05499;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fef2f2;
  --success-color: #10b981;
  --success-light: #ecfdf5;
  --warning-color: #f59e0b;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

/* Header & Responsive Navigation */
header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 500;
  transition: var(--transition);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(168, 61, 132, 0.45));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.logo:hover .logo-img {
  transform: scale(1.12) rotate(4deg);
}

.logo-img-lg {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 4px 16px rgba(168, 61, 132, 0.5));
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.nav-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Mobile Toggle Hamburger Button */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

.mobile-toggle:hover {
  background-color: var(--surface-hover);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Mobile Navigation Drawer */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: var(--surface-color);
  z-index: 1000;
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-drawer-links a, .mobile-drawer-links button {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  font-family: inherit;
  white-space: nowrap;
  min-height: 40px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white !important;
  box-shadow: 0 2px 4px rgba(168, 104, 74, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 104, 74, 0.35);
}

.btn-secondary {
  background-color: var(--surface-color);
  border-color: var(--border-color);
  color: var(--text-main) !important;
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--text-light);
}

.btn-danger {
  background-color: var(--danger-light);
  color: var(--danger-color) !important;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background-color: var(--danger-color);
  color: white !important;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  min-height: 34px;
}

/* Toolbar & Search Bar */
.toolbar-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.toolbar-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 2.75rem !important;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.per-page-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Form Controls & Cards */
.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--surface-color);
  transition: var(--transition);
  min-height: 42px;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(168, 61, 132, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  background-color: var(--bg-color);
  transition: var(--transition);
  cursor: pointer;
}

.file-dropzone:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

/* Stone Grid & Cards Layout */
.stone-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.stone-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.stone-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(168, 61, 132, 0.3);
}

/* Optimized Card Media Formatting */
.stone-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.stone-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.stone-card-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
}

.stone-card:hover .stone-card-img {
  transform: scale(1.05);
}

.media-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stone-card-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.stone-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
}

.stone-id {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--secondary-color);
  letter-spacing: -0.3px;
}

.stone-shape-tag {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  white-space: nowrap;
}

.stone-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
  background-color: var(--bg-color);
  padding: 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  color: var(--text-light);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
}

.spec-value {
  color: var(--text-main);
  font-weight: 700;
}

.stone-card-footer {
  padding: 0.75rem;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-row {
  display: flex;
  gap: 0.4rem;
}

.action-row > * {
  flex: 1;
}

/* View Page Details Table Layout */
.view-container {
  display: flex;
  gap: 2rem;
  max-width: 1100px;
  margin: 1rem auto;
  align-items: flex-start;
  width: 100%;
}

.media-viewer-card {
  flex: 1;
  background: #000000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-display {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

.media-display img, .media-display iframe, .media-display video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.details-table-wrapper {
  flex: 1;
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  min-width: 0;
}

.details-header {
  background: linear-gradient(135deg, var(--secondary-color), #1e293b);
  color: white;
  padding: 1.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.details-table tr {
  border-bottom: 1px solid var(--border-color);
}

.details-table tr:nth-child(even) {
  background-color: var(--bg-color);
}

.details-table td {
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

.details-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 40%;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.details-table td:last-child {
  font-weight: 700;
  color: var(--secondary-color);
  word-break: break-word;
}

/* Modal Overlay & Details Container */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

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

.modal-container {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  position: relative;
  transform: scale(0.95);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(15, 23, 42, 0.2);
}

.modal-body {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  flex-wrap: wrap;
}

.modal-media {
  flex: 1;
  width: 100%;
  min-width: 260px;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-media img, .modal-media video, .modal-media iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-info {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.modal-details-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.modal-details-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 40%;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.modal-details-table td:last-child {
  font-weight: 700;
  color: var(--secondary-color);
}

/* ============================================================
   CUSTOM DIALOG SYSTEM (replaces browser alert/confirm)
   ============================================================ */
.v-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.v-dialog-overlay.v-dialog-open {
  opacity: 1;
}
.v-dialog-box {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2rem 2rem 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.10);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
}
.v-dialog-overlay.v-dialog-open .v-dialog-box {
  transform: scale(1) translateY(0);
}
.v-dialog-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.v-dialog-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.v-dialog-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.2px;
}
.v-dialog-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.5rem 0;
}
.v-dialog-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}
.v-dialog-actions .btn {
  min-width: 88px;
  padding: 0.5rem 1.2rem;
  font-size: 0.88rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #f8fafc;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border-left: 4px solid #22c55e;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 220px;
  max-width: 360px;
}

.toast svg {
  color: #22c55e;
  flex-shrink: 0;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
}

.empty-state h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

/* Pagination Buttons */
.pagination-container {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.pagination-btn {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  min-height: 38px;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--surface-hover);
  border-color: var(--text-light);
}

.pagination-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  cursor: default;
}

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

/* BREAKPOINTS & RESPONSIVE DESIGN FOR MOBILE MEDIA */
@media (max-width: 1400px) {
  .stone-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .stone-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .nav-links {
    display: none;
  }

  .dark-mode-toggle {
    display: inline-flex !important;
    width: 38px;
    height: 38px;
    padding: 0.4rem;
  }

  .mobile-toggle {
    display: inline-flex !important;
    width: 38px;
    height: 38px;
  }

  .logo {
    font-size: 1.2rem;
    gap: 0.4rem;
  }

  .logo-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
  }

  .toolbar-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .toolbar-controls {
    justify-content: space-between;
    width: 100%;
  }

  .stone-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .stone-card-media {
    aspect-ratio: 1 / 1;
  }

  .view-container {
    flex-direction: column;
    gap: 1.25rem;
  }

  .modal-body {
    flex-direction: column;
    padding: 1rem;
  }

  .modal-media {
    aspect-ratio: 1 / 1;
    max-height: 320px;
  }

  .card {
    padding: 1.25rem;
  }
}

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

  .header-content {
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .stone-card-media {
    aspect-ratio: 4 / 3;
    height: auto;
    max-height: 250px;
  }

  .modal-media {
    aspect-ratio: 1 / 1;
    max-height: 280px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }


  .pagination-container {
    width: 100%;
    justify-content: center;
  }

  .wizard-steps {
    gap: 0.25rem !important;
  }
  .step-badge {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.85rem !important;
  }
  .step-title {
    font-size: 0.7rem !important;
  }
  .drag-drop-zone {
    padding: 1.5rem 0.85rem !important;
  }
  .mapping-grid {
    grid-template-columns: 1fr !important;
    padding: 0.85rem !important;
  }
  .table-container,
  .stone-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  .adm-table, .stone-table, .preview-table {
    min-width: 580px;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .vp-container {
    flex-direction: column !important;
  }
  .vp-media-panel, .vp-info-panel {
    width: 100% !important;
  }
  .show-label {
    display: none !important;
  }
  .toolbar-card {
    padding: 0.85rem !important;
  }
  .toolbar-row-2 {
    margin-top: 0.5rem !important;
  }
}

/* ============================================================
   DARK MODE THEME
   ============================================================ */
[data-theme="dark"] {
  --primary-color: #c956a2;
  --primary-hover: #db6cb4;
  --primary-light: #321028;
  --secondary-color: #f1f5f9;
  --accent-color: #a855f7;
  --accent-light: #240938;
  --bg-color: #0d1117;
  --surface-color: #161b22;
  --surface-hover: #21262d;
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --text-light: #484f58;
  --border-color: #30363d;
  --border-focus: #c956a2;
  --danger-color: #f85149;
  --danger-hover: #da3633;
  --danger-light: #1f1117;
  --success-color: #3fb950;
  --success-light: #0d1f16;
  --warning-color: #d29922;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -4px rgba(0,0,0,0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6), 0 8px 10px -6px rgba(0,0,0,0.2);
}

[data-theme="dark"] header {
  background-color: rgba(22, 27, 34, 0.92);
  border-bottom-color: #30363d;
}

[data-theme="dark"] .stone-card-media {
  background-color: #010409;
}

[data-theme="dark"] .modal-close {
  background: rgba(241, 245, 249, 0.1);
  color: #e6edf3;
}

[data-theme="dark"] .modal-close:hover {
  background: rgba(241, 245, 249, 0.2);
}

[data-theme="dark"] .stone-specs-grid {
  background-color: var(--bg-color);
}

[data-theme="dark"] .details-header {
  background: linear-gradient(135deg, #21262d, #161b22);
}

[data-theme="dark"] .mobile-nav-drawer {
  background: var(--surface-color);
}

[data-theme="dark"] .file-dropzone {
  background-color: var(--bg-color);
}

[data-theme="dark"] .file-dropzone:hover {
  background-color: var(--primary-light);
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.dark-mode-toggle:hover {
  background-color: var(--surface-hover);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.dark-mode-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}



/* ============================================================
   ADVANCED FILTER PANEL
   ============================================================ */
.filter-panel {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.25s ease;
}

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

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.filter-panel-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.9rem;
}

.filter-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.weight-range-group {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.weight-range-sep {
  font-size: 0.8rem;
  color: var(--text-light);
  flex-shrink: 0;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

/* Filter Toggle Button */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.83rem;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  min-height: 38px;
  font-family: inherit;
  white-space: nowrap;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.filter-count-badge {
  background: var(--primary-color);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
}

/* ============================================================
   LIST / TABLE VIEW
   ============================================================ */
.view-toggle-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-toggle-btn {
  background: var(--surface-color);
  border: none;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  font-family: inherit;
}

.view-toggle-btn:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.view-toggle-btn.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

.view-toggle-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Stone Table (List View) */
.stone-table-wrapper {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.stone-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.stone-table thead {
  background: linear-gradient(135deg, var(--secondary-color), #1e293b);
  color: white;
}

[data-theme="dark"] .stone-table thead {
  background: linear-gradient(135deg, #21262d, #0d1117);
}

.stone-table thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.stone-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.stone-table tbody tr:last-child {
  border-bottom: none;
}

.stone-table tbody tr:hover {
  background-color: var(--surface-hover);
}

.stone-table tbody tr:nth-child(even) {
  background-color: var(--bg-color);
}

.stone-table tbody tr:nth-child(even):hover {
  background-color: var(--surface-hover);
}

.stone-table td {
  padding: 0.7rem 1rem;
  color: var(--text-main);
  vertical-align: middle;
}

.stone-table td:first-child {
  font-weight: 700;
  color: var(--secondary-color);
}

.stone-table .table-actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

/* ============================================================
   TOOLBAR ENHANCEMENTS
   ============================================================ */
.toolbar-row-2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.toolbar-row-2 label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.sort-select {
  padding: 0.42rem 2rem 0.42rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: 38px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.sort-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(194, 133, 90, 0.15);
}

.btn-export {
  background: var(--success-light);
  color: var(--success-color) !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-export:hover {
  background: var(--success-color);
  color: white !important;
}

.btn-print {
  background: var(--accent-light);
  color: var(--accent-color) !important;
  border: 1px solid rgba(139, 111, 71, 0.3);
}



.toolbar-actions-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

/* Duplicate Warning */
.duplicate-warning {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #92400e;
  margin-top: 0.4rem;
}

[data-theme="dark"] .duplicate-warning {
  background: #1c1505;
  border-color: #d29922;
  color: #fbbf24;
}

.duplicate-warning.show {
  display: flex;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  header,
  .mobile-nav-overlay,
  .mobile-nav-drawer,
  .toolbar-card,
  .filter-panel,
  #paginationContainer,
  #paginationInfo,
  .stone-card-footer,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: white !important;
  }

  .container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .stone-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .stone-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .stone-table-wrapper {
    box-shadow: none !important;
  }

  .stone-table thead {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS FOR ALL DEVICES (Mobile, Tablet, Desktop)
   ============================================================ */
.stone-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0.75rem !important;
  }

  .header-content {
    padding: 0.6rem 0.85rem;
  }

  .stone-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
  }

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

  .toolbar {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .toolbar-row-1 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .search-container {
    max-width: 100%;
    width: 100%;
  }

  .toolbar-actions-right {
    margin-left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .toolbar-row-2 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

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

  .vp-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-bottom: 3rem;
  }

  .vp-carousel-wrapper {
    max-height: 420px;
  }

  .vp-action-row {
    flex-direction: column;
  }

  .vp-action-row .btn {
    width: 100%;
  }

  .dark-mode-toggle {
    width: 36px;
    height: 36px;
  }
}

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

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

  .logo {
    font-size: 1.25rem;
  }

  .logo-icon,
  .logo-img {
    width: 26px;
    height: 26px;
  }

  .adm-loader-wrap,
  .lst-loader-wrap {
    padding: 2.5rem 1rem;
    min-height: 200px;
  }

  .adm-diamond-svg {
    width: 64px;
    height: 64px;
  }

  .lst-orbit-ring {
    width: 80px;
    height: 80px;
  }

  .vp-stone-title {
    font-size: 1.35rem;
  }

  .vp-specs-table td {
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
  }
}

/* ============================================================
   CARD VIDEO LOADER
   ============================================================ */
.card-vid-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  z-index: 2;
  gap: 0.6rem;
  transition: opacity 0.4s ease;
}

.card-vid-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Circular SVG ring */
.cvl-ring {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 8px rgba(168, 61, 132, 0.6));
}

.cvl-bg {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 2.5;
}

.cvl-fill {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.3s linear;
}

.cvl-pct {
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Pulse shimmer on card background */
@keyframes shimmerPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.card-vid-loader::after {
  content: '360° Video';
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Spinning ring animation when no real progress data */
@keyframes spinRing {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

.cvl-fill.spinning {
  animation: spinRing 1.8s ease-in-out infinite alternate;
}

/* Premium Page Loader Spinner */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-right-color: var(--accent-color);
  border-radius: 50%;
  animation: spinnerSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 15px rgba(168, 61, 132, 0.25);
}

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

/* ============================================================
   BRAND LOGO LOADER (PREMIUM ANIMATED LOGO WITH ORBIT & AURA)
   ============================================================ */
.brand-loader-wrap,
.adm-loader-wrap,
.lst-loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 4rem 2rem;
  width: 100%;
  min-height: 280px;
}

.brand-logo-loader,
.adm-diamond-loader,
.lst-orbit-ring {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-loader-aura {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 91, 159, 0.4) 0%, rgba(147, 51, 234, 0.2) 50%, transparent 70%);
  animation: brandAuraPulse 2.4s ease-in-out infinite alternate;
  pointer-events: none;
  filter: blur(8px);
}

@keyframes brandAuraPulse {
  0% { transform: scale(0.85); opacity: 0.45; }
  100% { transform: scale(1.35); opacity: 0.95; }
}

.brand-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: #f472b6;
  border-right-color: #e06b98;
  border-bottom-color: #9333ea;
  border-left-color: transparent;
  animation: brandRingSpin 2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 16px rgba(196, 91, 159, 0.25);
}

.brand-loader-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f472b6;
  box-shadow: 0 0 10px #f472b6, 0 0 20px #e06b98;
}

@keyframes brandRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.brand-loader-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  animation: brandLogoBreathe 2.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 14px rgba(196, 91, 159, 0.55));
}

@keyframes brandLogoBreathe {
  0% {
    transform: scale(0.92);
    filter: drop-shadow(0 2px 8px rgba(196, 91, 159, 0.4));
  }
  100% {
    transform: scale(1.06);
    filter: drop-shadow(0 6px 22px rgba(224, 107, 152, 0.8)) brightness(1.1);
  }
}

.brand-loader-bar,
.lst-loader-bar {
  width: 180px;
  height: 4px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.brand-loader-bar-fill,
.lst-loader-bar-fill {
  height: 100%;
  width: 45%;
  border-radius: 99px;
  background: linear-gradient(90deg, #9333ea, #e06b98, #a83d84, #9333ea);
  background-size: 250% 100%;
  animation: brandBarSlide 1.6s ease-in-out infinite;
}

@keyframes brandBarSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.brand-loader-title,
.adm-loader-title,
.lst-loader-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin: 0;
}

.brand-loader-sub,
.adm-loader-sub,
.lst-loader-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   MEDIA HOVER CENTER PREVIEW (BIG IN MIDDLE SCREEN)
   ============================================================ */
.media-center-preview {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 999999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s ease;
}

.media-center-preview.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.mcp-card {
  width: 390px;
  max-width: min(92vw, 440px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.1),
              0 0 45px rgba(168, 61, 132, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .mcp-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(0, 0, 0, 0.06),
              0 0 40px rgba(168, 61, 132, 0.25);
}

.mcp-media-wrap {
  position: relative;
  width: 100%;
  height: 350px;
  max-height: 52vh;
  background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

[data-theme="light"] .mcp-media-wrap {
  background: radial-gradient(circle at center, #f1f5f9 0%, #e2e8f0 100%);
}

.mcp-img,
.mcp-vid {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

.mcp-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.mcp-badge-video {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.mcp-badge-image {
  background: linear-gradient(135deg, #10b981, #059669);
}

.mcp-hint {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .mcp-hint {
  color: #334155;
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
}

.mcp-footer {
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-theme="light"] .mcp-footer {
  background: rgba(248, 250, 252, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mcp-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mcp-id {
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

[data-theme="light"] .mcp-id {
  color: #0f172a;
}

.mcp-shape-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(168, 61, 132, 0.16);
  border: 1px solid rgba(168, 61, 132, 0.32);
  padding: 2px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mcp-details-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mcp-pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 9px;
  border-radius: 6px;
}

[data-theme="light"] .mcp-pill {
  color: #475569;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.mcp-pill.font-bold {
  font-weight: 700;
  color: #f472b6;
}

[data-theme="light"] .mcp-pill.font-bold {
  color: var(--primary-color);
}

.mcp-lab-pill {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

/* Hover effect on table media thumbnails */
.adm-thumb,
.stone-table td video,
.stone-table td img,
.media-hover-trigger {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease !important;
  cursor: zoom-in !important;
}

.adm-thumb:hover,
.stone-table td video:hover,
.stone-table td img:hover,
.media-hover-trigger:hover {
  transform: scale(1.14);
  box-shadow: 0 0 16px rgba(168, 61, 132, 0.55);
  border-color: var(--primary-color) !important;
  z-index: 5;
  position: relative;
}

/* ==========================================================================
   UNIVERSAL MEDIA LOADER SYSTEM
   ========================================================================== */

.media-loader-wrapper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  background: rgba(241, 245, 249, 0.7);
  box-sizing: border-box;
}

/* Logo wrappers should always have transparent background */
.media-loader-wrapper.logo-img-wrap,
.media-loader-wrapper.brand-loader-img-wrap,
.media-loader-wrapper.logo-img-lg-wrap,
.logo .media-loader-wrapper,
.brand-loader .media-loader-wrapper {
  background: transparent !important;
  animation: none !important;
}

.media-loader-wrapper.logo-img-wrap .media-spinner-overlay,
.media-loader-wrapper.brand-loader-img-wrap .media-spinner-overlay,
.media-loader-wrapper.logo-img-lg-wrap .media-spinner-overlay {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.stone-card-media > .media-loader-wrapper,
.modal-media > .media-loader-wrapper,
.lightbox-content > .media-loader-wrapper,
.mcp-media-container > .media-loader-wrapper,
.adm-thumb-wrap > .media-loader-wrapper {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
}

.media-loader-wrapper.is-loading {
  animation: media-skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes media-skeleton-pulse {
  0% { background-color: rgba(241, 245, 249, 0.6); }
  50% { background-color: rgba(226, 232, 240, 0.95); }
  100% { background-color: rgba(241, 245, 249, 0.6); }
}

.media-spinner-overlay {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

[data-theme="dark"] .media-spinner-overlay {
  background: rgba(15, 23, 42, 0.85);
}

.media-loader-wrapper.is-loaded .media-spinner-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
}

.media-spinner-ring {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(168, 61, 132, 0.2);
  border-top-color: var(--primary-color, #a83d84);
  border-radius: 50%;
  animation: media-spinner-spin 0.7s linear infinite;
  box-sizing: border-box;
  flex-shrink: 0;
}

.media-loader-wrapper.sm-thumb .media-spinner-ring,
.media-loader-wrapper.logo-img-wrap .media-spinner-ring {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

@keyframes media-spinner-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.media-loader-wrapper > img,
.media-loader-wrapper > video {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.media-loader-wrapper.is-loading > img,
.media-loader-wrapper.is-loading > video {
  opacity: 0 !important;
}

.media-loader-wrapper.is-loaded > img,
.media-loader-wrapper.is-loaded > video {
  opacity: 1 !important;
}

.media-loader-wrapper.is-error .media-spinner-overlay {
  background: rgba(248, 250, 252, 0.95);
  opacity: 1 !important;
  visibility: visible !important;
}

.media-loader-wrapper.is-error .media-spinner-ring {
  display: none !important;
}

.media-loader-wrapper.is-error .media-spinner-overlay::after {
  content: '📷';
  font-size: 0.9rem;
  opacity: 0.5;
}




