:root {
  --studio-bg: #faf7f2;
  --studio-surface: #ffffff;
  --studio-soft: #f5ece6;
  --studio-blush: #f7e9ee;
  --studio-crimson: #9e0b4b;
  --studio-crimson-dark: #750736;
  --studio-bordeaux: #2b0915;
  --studio-gold: #c4963a;
  --studio-gold-soft: #e9d9b4;
  --studio-ink: #1e1719;
  --studio-muted: #66595e;
  --studio-border: #eadfd7;
}

body.studio-body {
  margin: 0;
  background: var(--studio-bg);
  color: var(--studio-ink);
  font-family: var(--font-sans);
}

.studio-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.studio-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--studio-border);
}

.studio-header-inner {
  width: min(1220px, 100% - 2rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.studio-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--studio-bordeaux);
}

.studio-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

/* Main */
.studio-main {
  flex: 1;
  width: min(1220px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

/* Login */
.studio-login-wrap {
  max-width: 460px;
  margin: 3rem auto;
}

.studio-login-card {
  background: var(--studio-surface);
  border: 1.5px solid var(--studio-gold-soft);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 22px 48px rgba(43, 9, 21, 0.08);
}

.studio-login-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.studio-login-head img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.9rem;
  border: 2px solid var(--studio-gold);
}

.studio-login-head h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 0.3rem;
  color: var(--studio-bordeaux);
}

/* Tabs */
.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
  padding: 0.45rem;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 18px;
}

.studio-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--studio-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-tab:hover {
  color: var(--studio-crimson);
  background: var(--studio-blush);
}

.studio-tab.active {
  background: var(--studio-bordeaux);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(43, 9, 21, 0.18);
}

.studio-tab-count {
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(196, 150, 58, 0.22);
  color: var(--studio-gold);
}

.studio-tab.active .studio-tab-count {
  background: var(--studio-crimson);
  color: #ffffff;
}

/* Drop Studio Layout */
.studio-drop-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1.75rem;
  align-items: start;
}

.studio-panel {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 22px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 28px rgba(43, 9, 21, 0.04);
}

.studio-panel h2,
.studio-panel h3 {
  font-family: var(--font-serif);
  color: var(--studio-bordeaux);
  margin-top: 0;
}

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

.studio-field-full {
  grid-column: 1 / -1;
}

/* Collection Choice Pills in Drop Form */
.studio-collection-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.65rem;
}

.studio-collection-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--studio-border);
  background: var(--studio-bg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-collection-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.studio-collection-choice strong {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--studio-bordeaux);
}

.studio-collection-choice small {
  font-size: 0.74rem;
  color: var(--studio-muted);
}

.studio-collection-choice:has(input:checked) {
  border-color: var(--studio-crimson);
  background: var(--studio-blush);
  box-shadow: 0 4px 12px rgba(158, 11, 75, 0.12);
}

/* Drag & Drop Image Upload Zone */
.studio-dropzone {
  position: relative;
  border: 2px dashed var(--studio-gold);
  border-radius: 18px;
  background: linear-gradient(135deg, #fdfaf5 0%, #fcf4f7 100%);
  padding: 1.4rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-dropzone:hover,
.studio-dropzone.drag-over {
  border-color: var(--studio-crimson);
  background: var(--studio-blush);
  transform: translateY(-1px);
}

.studio-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.studio-dropzone-icon {
  font-size: 1.9rem;
  margin-bottom: 0.35rem;
}

.studio-dropzone-preview {
  width: 100%;
  max-height: 240px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 0.85rem;
  border: 1px solid var(--studio-border);
}

/* Variant Builder */
.studio-variants-box {
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: var(--studio-bg);
  border: 1px solid var(--studio-border);
}

.studio-variants-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.studio-variant-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 110px auto auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.studio-variant-row input[type="text"],
.studio-variant-row input[type="number"] {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--studio-border);
  background: var(--studio-surface);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  width: 100%;
}

/* Sticky Live Card Preview */
.studio-preview-sticky {
  position: sticky;
  top: 96px;
}

.studio-preview-card-wrap {
  max-width: 340px;
  margin: 0.75rem auto 0;
}

/* Admin Jewelry Catalog Grid */
.studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-end;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.4rem;
}

.studio-toolbar .pv-field {
  margin-bottom: 0;
  flex: 1 1 180px;
}

.studio-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
}

.studio-item-card {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 26px rgba(43, 9, 21, 0.05);
}

.studio-item-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--studio-soft);
  overflow: hidden;
}

.studio-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-item-body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.studio-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--studio-border);
}

.studio-btn-xs {
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--studio-border);
  background: var(--studio-bg);
  color: var(--studio-bordeaux);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.studio-btn-xs:hover {
  border-color: var(--studio-crimson);
  color: var(--studio-crimson);
}

.studio-btn-xs.primary {
  background: var(--studio-crimson);
  color: #ffffff;
  border-color: var(--studio-crimson);
}

.studio-btn-xs.danger {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

/* Orders Cards */
.studio-orders-list {
  display: grid;
  gap: 1rem;
}

.studio-order-card {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(43, 9, 21, 0.04);
}

.studio-order-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.studio-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--studio-blush);
  color: var(--studio-crimson);
}

/* Dialog */
dialog.studio-dialog {
  border: 1px solid var(--studio-gold-soft);
  border-radius: 24px;
  padding: 0;
  width: min(720px, 94vw);
  max-height: 90vh;
  background: var(--studio-surface);
  box-shadow: 0 28px 60px rgba(43, 9, 21, 0.25);
}

dialog.studio-dialog::backdrop {
  background: rgba(30, 10, 18, 0.55);
  backdrop-filter: blur(6px);
}

.studio-dialog-inner {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  max-height: 90vh;
}

/* Toast */
.studio-toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 360px;
}

.studio-toast {
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  background: var(--studio-bordeaux);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(43, 9, 21, 0.28);
  border: 1px solid var(--studio-gold);
}

.studio-toast.error {
  background: #7f1d1d;
  border-color: #fca5a5;
}

@media (max-width: 960px) {
  .studio-drop-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .studio-form-grid {
    grid-template-columns: 1fr;
  }

  .studio-variant-row {
    grid-template-columns: 1fr 1fr;
  }
}
