/* Ceiba Viva App Plus — administrative experience only */
:root {
  --app-ink: #173329;
  --app-muted: #667a72;
  --app-green: #1e5745;
  --app-green-deep: #0b2d22;
  --app-mint: #dff2e9;
  --app-gold: #c79b34;
  --app-line: rgba(23, 73, 57, 0.12);
  --app-glass: rgba(255, 255, 252, 0.72);
  --app-glass-strong: rgba(255, 255, 252, 0.9);
  --app-shadow: 0 22px 65px rgba(24, 60, 47, 0.1);
  --app-shadow-raised: 0 30px 90px rgba(19, 52, 40, 0.16);
  --app-safe-bottom: max(14px, env(safe-area-inset-bottom));
}

.wos-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.admin-tabs button { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; text-align: left; }
.admin-tabs button .wos-icon { width: 20px; height: 20px; justify-self: center; color: #9fd7bf; }
.admin-tabs button.is-active .wos-icon { color: var(--app-green); }
.admin-tabs button::before { content: ""; position: absolute; left: -7px; width: 3px; height: 0; border-radius: 99px; background: #92d5b7; transition: height .2s ease; }
.admin-tabs button:hover::before,
.admin-tabs button.is-active::before { height: 22px; }
.admin-sidebar-toggle { display: grid; width: 42px; height: 42px; min-height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--app-line); border-radius: 13px; color: var(--app-green); background: rgba(255,255,255,.72); }
.admin-body, .admin-sidebar { transition: grid-template-columns .28s ease, width .28s ease; }
.admin-body.admin-sidebar-collapsed { grid-template-columns: 88px minmax(0, 1fr); }
.admin-body.admin-sidebar-collapsed .admin-sidebar { width: 88px; padding-inline: 13px; }
.admin-body.admin-sidebar-collapsed .admin-brand span,
.admin-body.admin-sidebar-collapsed .admin-brand small,
.admin-body.admin-sidebar-collapsed .admin-nav-group,
.admin-body.admin-sidebar-collapsed .admin-tabs button span,
.admin-body.admin-sidebar-collapsed .admin-logout { display: none; }
.admin-body.admin-sidebar-collapsed .admin-brand { width: 48px; min-height: 48px; padding: 0; }
.admin-body.admin-sidebar-collapsed .admin-tabs button { justify-content: center; padding-inline: 0; }
.admin-body.admin-sidebar-collapsed .admin-tabs button .wos-icon { width: 23px; height: 23px; }
.admin-body.admin-sidebar-collapsed .admin-sidebar-toggle .wos-icon { transform: rotate(180deg); }

.entity-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(7,29,21,.42); backdrop-filter: blur(18px) saturate(1.15); }
.entity-modal.is-open { display: flex; animation: adminFadeIn .18s ease both; }
.entity-modal-card { display: grid; width: min(820px, 100%); max-height: min(90dvh, 900px); grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; background: rgba(250,253,251,.9); box-shadow: 0 38px 110px rgba(8,38,27,.28), inset 0 1px #fff; animation: adminModalIn .26s cubic-bezier(.2,.8,.2,1) both; }
.entity-modal-card > header, .entity-modal-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--app-line); }
.entity-modal-card > header h2 { margin: 0; }
.entity-modal-card > header > button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: #e9f3ee; color: var(--app-green); font-size: 1.4rem; }
.entity-modal-card > footer { justify-content: flex-end; border-top: 1px solid var(--app-line); border-bottom: 0; }
.entity-modal-body { overflow: auto; padding: 20px; }
.entity-modal-body .editor-card { margin: 0; border: 0; background: transparent; box-shadow: none; }
.entity-modal-body .editor-card-actions { display: none; }

.builder-items-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.builder-items-heading .admin-help { margin: 4px 0 0; }
.builder-visual-list { display: grid; gap: 10px; }
.builder-list-item { display: grid; grid-template-columns: 24px minmax(0,1fr) 34px; gap: 10px; padding: 13px; border: 1px solid var(--app-line); border-radius: 17px; background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(231,244,237,.68)); box-shadow: 0 10px 28px rgba(22,67,50,.07); transition: transform .18s ease, box-shadow .18s ease; }
.builder-list-item:hover { transform: translateY(-1px); box-shadow: 0 15px 35px rgba(22,67,50,.1); }
.builder-list-item-grip { color: #8aa59a; padding-top: 10px; font-weight: 900; }
.builder-list-item-fields { display: grid; gap: 9px; }
.builder-item-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: end; gap: 9px; }
.builder-icon-preview { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: var(--app-green); background: var(--app-mint); }
.builder-list-item-actions { display: grid; align-content: start; gap: 5px; }
.builder-list-item-actions button { display: grid; width: 31px; height: 31px; min-height: 31px; place-items: center; border: 1px solid var(--app-line); border-radius: 9px; color: var(--app-green); background: rgba(255,255,255,.8); padding: 0; }
.builder-list-empty { margin: 0; padding: 18px; border: 1px dashed var(--app-line); border-radius: 15px; color: var(--app-muted); text-align: center; }

@keyframes adminFadeIn { from { opacity: 0; } }
@keyframes adminModalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }

@media (max-width: 900px) {
  .admin-body.admin-sidebar-collapsed { grid-template-columns: 1fr; }
  .admin-sidebar-toggle { display: none; }
  .entity-modal { align-items: flex-end; padding: 8px; }
  .entity-modal-card { max-height: 94dvh; border-radius: 24px 24px 14px 14px; }
  .builder-list-item { grid-template-columns: 18px minmax(0,1fr) 32px; padding: 10px; }
}

/* Compact library cards: forms exist only inside their editing modal. */
.editor-stack {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 235px), 1fr));
  gap: 12px;
}
.editor-stack > .editor-card {
  align-content: start;
  min-height: 0;
  gap: 10px;
  padding: 13px;
  border-radius: 18px;
  contain-intrinsic-size: auto 280px;
}
.editor-stack > .section-editor-card { grid-column: auto; }
.editor-stack > .editor-card > label,
.editor-stack > .editor-card > .modal-grid,
.editor-stack > .editor-card > .media-picker,
.editor-stack > .editor-card > .admin-help,
.editor-stack > .editor-card > .friendly-details,
.editor-stack > .editor-card > details,
.editor-stack > .editor-card > .editor-inline,
.editor-stack > .editor-card > .quill-field,
.editor-stack > .editor-card > input[data-field] { display: none !important; }

.admin-card-thumb {
  display: grid;
  height: 118px;
  margin: -13px -13px 2px;
  overflow: hidden;
  place-items: center;
  border-radius: 18px 18px 12px 12px;
  background: linear-gradient(145deg, #e5f2ec, #f7f2e7);
  color: var(--app-green);
}
.admin-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-card-thumb > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: rgba(255,255,255,.72); }
.admin-card-thumb .wos-icon { width: 25px; height: 25px; }
.admin-card-symbol { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 14px; color: var(--app-green); background: linear-gradient(145deg, var(--app-mint), #f1e8d1); }
.admin-card-symbol .wos-icon { width: 22px; height: 22px; }
.admin-card-excerpt,
.product-admin-summary {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--app-muted);
  font-size: .76rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.editor-stack > .editor-card .editor-card-head { align-items: flex-start; margin: 0; }
.editor-stack > .editor-card .editor-card-head strong { font-size: .91rem; line-height: 1.25; }
.editor-stack > .editor-card .product-admin-meta { gap: 5px; }
.editor-stack > .editor-card .product-admin-meta span { padding: 4px 7px; font-size: .61rem; }
.editor-stack > .editor-card .editor-card-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; margin-top: 2px; }
.editor-stack > .editor-card .editor-card-actions button { min-height: 36px; padding: 7px 10px; font-size: .69rem; }

.product-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.product-catalog-grid .product-admin-cover { height: 175px; margin: -13px -13px 0; }
.product-catalog-grid .product-admin-card { min-width: 0; }
.product-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(145px, .75fr)) auto;
  gap: 9px;
  align-items: end;
  margin-bottom: 13px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 19px;
  background: rgba(255,255,255,.68);
  box-shadow: var(--app-shadow), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
}
.product-admin-toolbar label { gap: 5px; }
.product-admin-toolbar label > span { color: var(--app-muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.product-admin-toolbar input,
.product-admin-toolbar select { min-height: 40px; padding: 8px 10px; font-size: .75rem; }
.product-filter-count { display: grid; min-width: 90px; padding: 4px 7px; color: var(--app-muted); text-align: right; }
.product-filter-count strong { color: var(--app-green); font: 600 1.45rem/1 var(--font-serif); }
.product-filter-count span { font-size: .61rem; }

.entity-modal-body .editor-card { gap: 13px; padding: 0; }
.entity-modal-body .admin-card-thumb,
.entity-modal-body .admin-card-symbol,
.entity-modal-body .admin-card-excerpt { display: none; }
.entity-modal-body label { gap: 6px; font-size: .7rem; }
.entity-modal-body input,
.entity-modal-body select { min-height: 42px; padding: 9px 11px; font-size: .82rem; }
.entity-modal-body textarea { min-height: 88px; max-height: 190px; padding: 10px 11px; font-size: .82rem; }
.entity-modal-body .modal-grid { gap: 10px; }
.entity-modal-body .media-picker { grid-template-columns: 130px minmax(0,1fr); gap: 12px; padding: 11px; }
.entity-modal-body .media-picker-preview,
.entity-modal-body .media-picker-preview img { min-height: 120px; height: 120px; }
.entity-modal-body .quill-editor,
.entity-modal-body .ql-editor { min-height: 180px; font-size: .88rem; }

/* Settings stays inline, but uses workstation-sized controls instead of oversized fields. */
.admin-body .admin-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 11px;
  padding: 14px;
}
.admin-body .admin-form > label { gap: 5px; font-size: .7rem; }
.admin-body .admin-form input,
.admin-body .admin-form select { min-height: 40px; padding: 8px 10px; font-size: .79rem; }
.admin-body .admin-form textarea { min-height: 82px; max-height: 150px; padding: 9px 10px; font-size: .79rem; }
.admin-body .admin-form .media-picker { min-width: 0; padding: 10px; }
.admin-body .admin-form .media-picker-preview,
.admin-body .admin-form .media-picker-preview img { min-height: 105px; height: 105px; }

@media (max-width: 1100px) {
  .product-admin-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-filter-count { text-align: left; }
}
@media (max-width: 620px) {
  .editor-stack,
  .product-catalog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .editor-stack > .editor-card { padding: 10px; }
  .admin-card-thumb { height: 94px; margin: -10px -10px 0; }
  .product-catalog-grid .product-admin-cover { height: 132px; margin: -10px -10px 0; }
  .editor-stack > .editor-card .editor-card-actions { grid-template-columns: 1fr; }
  .editor-stack > .editor-card .editor-card-actions .btn-danger { grid-column: auto; }
  .product-admin-toolbar { grid-template-columns: 1fr; padding: 10px; }
  .entity-modal-body .media-picker { grid-template-columns: 1fr; }
  .admin-body .admin-form { grid-template-columns: 1fr; padding: 11px; }
}

.admin-body {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 88% 4%, rgba(194, 224, 212, 0.7), transparent 27rem),
    radial-gradient(circle at 24% 82%, rgba(231, 216, 165, 0.3), transparent 30rem),
    linear-gradient(145deg, #f5f6f0, #eaf2ed 52%, #f5f1e8);
  color: var(--app-ink);
}

.admin-body::before,
.admin-body::after {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 44% 56% 61% 39% / 48% 42% 58% 52%;
  content: "";
  pointer-events: none;
  filter: blur(2px);
}

.admin-body::before {
  top: -16rem;
  right: -9rem;
  background: linear-gradient(145deg, rgba(154, 207, 186, 0.34), rgba(255, 255, 255, 0.05));
}

.admin-body::after {
  bottom: -21rem;
  left: 13%;
  background: linear-gradient(145deg, rgba(216, 187, 111, 0.2), rgba(255, 255, 255, 0.05));
}

.admin-sidebar,
.admin-topbar,
.admin-section-head,
.builder-workspaces,
.builder-panel,
.builder-stage,
.admin-lux-card,
.admin-bottom-sheet,
.admin-app-bar {
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
}

.admin-sidebar {
  width: 292px;
  padding: 22px 18px 116px;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 15% -4%, rgba(207, 171, 78, 0.2), transparent 15rem),
    linear-gradient(165deg, rgba(11, 45, 34, 0.97), rgba(5, 25, 18, 0.96));
  box-shadow: 18px 0 55px rgba(12, 39, 29, 0.12);
}

.admin-brand {
  position: relative;
  gap: 3px;
  margin: 0 4px 24px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
  font-size: 1.35rem;
}

.admin-brand,
.admin-brand:visited { color: #f7fbf8; }

.admin-brand small { color: rgba(229, 245, 237, 0.6); }

.admin-brand::after {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(8, 34, 25, 0.72);
  border-radius: 50%;
  background: #87d2ae;
  box-shadow: 0 0 0 4px rgba(135, 210, 174, 0.13);
  content: "";
}

.admin-tabs { gap: 4px; }

.admin-nav-group {
  margin: 17px 13px 6px;
  color: rgba(231, 247, 239, 0.45);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.admin-tabs button,
.admin-logout {
  min-height: 44px;
  border-color: transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(239, 249, 244, 0.76);
  padding: 11px 13px;
  font-size: 0.84rem;
  font-weight: 750;
}

.admin-tabs button:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-tabs button.is-active {
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(225, 242, 233, 0.82));
  color: var(--app-green-deep);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18), inset 0 1px #fff;
}

.admin-logout {
  margin-top: 22px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.admin-main {
  max-width: 1800px;
  padding: clamp(18px, 2.6vw, 38px);
  padding-bottom: 126px;
}

.admin-topbar,
.admin-section-head,
.admin-guidance,
.kpi-grid article,
.admin-quick-actions button,
.editor-card,
.table-wrap,
.admin-form,
.builder-workspaces,
.builder-panel,
.builder-stage {
  border: 1px solid rgba(255, 255, 255, 0.66);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(245, 250, 247, 0.58));
  box-shadow: var(--app-shadow), inset 0 1px rgba(255, 255, 255, 0.9);
}

.admin-topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  min-height: 88px;
  margin-bottom: 22px;
  padding: 17px 19px 17px 22px;
  border-radius: 24px;
}

.admin-topbar h1 {
  color: var(--app-green-deep);
  font-size: clamp(1.8rem, 3vw, 2.75rem);
}

.admin-topbar .eyebrow { margin-bottom: 4px; }

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-live-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--app-muted);
  padding: 8px 13px;
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-live-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #40a979;
  box-shadow: 0 0 0 4px rgba(64, 169, 121, 0.13);
}

.admin-live-state.is-offline i {
  background: #c77c42;
  box-shadow: 0 0 0 4px rgba(199, 124, 66, 0.13);
}

.admin-section-head {
  padding: 15px 17px;
  border-radius: 20px;
}

.admin-section-head h2 {
  color: var(--app-green-deep);
  font-size: clamp(1.6rem, 2.7vw, 2.25rem);
}

.admin-guidance {
  border-color: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(201, 231, 219, 0.8), transparent 22rem),
    rgba(255, 255, 255, 0.58);
}

.admin-guidance p { max-width: 82ch; }

.kpi-grid { gap: 12px; }

.kpi-grid article {
  min-height: 126px;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
}

.kpi-grid article::before {
  position: absolute;
  inset: auto -24px -46px auto;
  width: 116px;
  height: 116px;
  border-radius: 42% 58% 50% 50%;
  background: linear-gradient(145deg, rgba(115, 183, 155, 0.2), transparent);
  content: "";
}

.kpi-grid span { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.kpi-grid p { font-size: 0.8rem; }

.admin-quick-actions { gap: 12px; }

.admin-quick-actions button {
  min-height: 112px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 0, rgba(201, 231, 219, 0.75), transparent 9rem),
    rgba(255, 255, 255, 0.68);
}

.admin-quick-actions button:nth-child(3n + 2) {
  background:
    radial-gradient(circle at 95% 0, rgba(235, 219, 177, 0.55), transparent 9rem),
    rgba(255, 255, 255, 0.68);
}

.editor-stack { gap: 14px; }

.editor-card {
  border-radius: 22px;
  background: rgba(255, 255, 252, 0.69);
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.editor-card:hover,
.admin-quick-actions button:hover {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--app-shadow-raised), inset 0 1px #fff;
}

.editor-card-actions { order: 20; }

.admin-body .btn-primary,
.admin-body .btn-ghost,
.admin-body .btn-danger,
.admin-body button,
.admin-body a {
  -webkit-tap-highlight-color: transparent;
}

.admin-body .btn-primary,
.admin-body .btn-ghost,
.admin-body .btn-danger {
  min-height: 42px;
  border-radius: 13px;
  padding: 10px 15px;
}

.admin-body .btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(145deg, #28644f, #174837);
  box-shadow: 0 10px 28px rgba(24, 81, 61, 0.2), inset 0 1px rgba(255, 255, 255, 0.17);
}

.admin-body .btn-ghost {
  border-color: var(--app-line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--app-green);
}

.admin-body .btn-danger {
  border-color: rgba(164, 66, 52, 0.13);
  background: rgba(255, 241, 237, 0.72);
}

.admin-body label {
  gap: 7px;
  color: #536b62;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-body input,
.admin-body textarea,
.admin-body select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(22, 77, 58, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--app-ink);
  padding: 11px 13px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.95);
}

.admin-body input[type="color"] {
  min-height: 46px;
  padding: 5px;
}

.admin-body input[type="checkbox"] {
  width: 21px;
  height: 21px;
  min-height: 21px;
  accent-color: var(--app-green);
}

.admin-body input:focus,
.admin-body textarea:focus,
.admin-body select:focus {
  outline: none;
  border-color: rgba(45, 128, 96, 0.52);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(79, 157, 126, 0.14), inset 0 1px #fff;
}

.friendly-details,
.section-editor-card details,
.gallery-builder,
.media-picker {
  border-color: rgba(23, 73, 57, 0.09);
  border-radius: 17px;
  background: rgba(250, 253, 251, 0.62);
}

.product-gallery-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}

.product-gallery-admin figure {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 73, 57, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px;
}

.product-gallery-admin img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 11px;
  background: #edf5f1;
  object-fit: contain;
}

.product-gallery-admin figcaption {
  color: var(--app-muted);
  padding: 0 5px 4px;
  font-size: 0.68rem;
  font-weight: 800;
}

.product-gallery-admin button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(23, 51, 41, 0.84);
  color: #fff;
  padding: 0;
  box-shadow: 0 8px 20px rgba(12, 42, 31, 0.2);
}

.product-content-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-list-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(23, 73, 57, 0.1);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(235,247,240,.66));
  padding: 12px;
}

.product-list-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-list-editor > header > div { display: grid; gap: 2px; }
.product-list-editor > header strong { color: var(--app-ink); font-size: .82rem; }
.product-list-editor > header span { color: var(--app-muted); font-size: .66rem; }
.product-list-editor > header button { min-height: 36px; padding: 7px 10px; font-size: .69rem; }
.product-list-items { display: grid; gap: 7px; }

.product-list-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(23, 73, 57, 0.09);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  padding: 7px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product-list-item:focus-within {
  border-color: rgba(45, 128, 96, 0.36);
  box-shadow: 0 8px 24px rgba(22,67,50,.08);
  transform: translateY(-1px);
}

.product-list-grip { color: #91a89f; font-size: .78rem; font-weight: 900; text-align: center; }
.admin-body .product-list-item input { min-height: 38px; padding: 7px 9px; font-size: .76rem; }
.product-property-fields { display: grid; grid-template-columns: minmax(115px, .42fr) minmax(0, 1fr); gap: 7px; }
.product-list-actions { display: flex; gap: 4px; align-items: center; }
.admin-body .product-list-actions button {
  display: grid;
  width: 31px;
  min-width: 31px;
  height: 31px;
  min-height: 31px;
  place-items: center;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: rgba(255,255,255,.9);
  color: var(--app-green);
  padding: 0;
  font-size: .7rem;
}
.admin-body .product-list-actions [data-product-list-edit] { width: auto; padding-inline: 8px; }
.admin-body .product-list-actions .is-danger { color: #a13f35; background: #fff3ef; }
.product-list-empty { margin: 0; border: 1px dashed rgba(23,73,57,.16); border-radius: 13px; color: var(--app-muted); padding: 13px; font-size: .72rem; text-align: center; }

.admin-body .wos-icon { display: block; margin: auto; }
.builder-section-list [draggable="true"] { cursor: grab; }
.builder-section-list .is-dragging { cursor: grabbing; opacity: .45; }
.builder-section-list .is-drop-target { border-color: rgba(45,128,96,.55); box-shadow: 0 0 0 3px rgba(79,157,126,.14); }

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed rgba(23, 73, 57, 0.18);
  border-radius: 14px;
  color: var(--app-muted);
  padding: 18px;
  text-align: center;
}

.friendly-details summary,
.section-editor-card summary {
  min-height: 32px;
  list-style-position: inside;
}

.table-wrap {
  border-radius: 20px;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(31, 92, 69, 0.3) transparent;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(242, 249, 245, 0.96);
}

th,
td { padding: 13px 14px; }

.builder-workspaces {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  border-radius: 22px;
}

.builder-workspaces button {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  min-width: 0;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--app-muted);
  padding: 11px 34px 11px 12px;
  text-align: left;
}

.builder-workspaces button::after {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: rgba(31, 86, 67, 0.08);
  content: attr(data-count);
  font-size: 0.64rem;
  font-weight: 900;
}

.builder-workspaces button > span {
  grid-row: 1 / span 2;
  align-self: center;
  color: rgba(30, 87, 69, 0.42);
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
}

.builder-workspaces strong,
.builder-workspaces em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-workspaces strong { color: var(--app-ink); }
.builder-workspaces em { font-size: 0.67rem; font-style: normal; }

.builder-workspaces button:hover,
.builder-workspaces button.is-active {
  border-color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 100% 0, rgba(184, 222, 206, 0.68), transparent 8rem),
    rgba(255, 255, 255, 0.73);
  box-shadow: 0 13px 32px rgba(25, 72, 54, 0.09), inset 0 1px #fff;
}

.builder-workspaces button.is-active::after {
  background: var(--app-green);
  color: white;
}

.builder-shell { grid-template-columns: minmax(230px, 0.27fr) minmax(0, 1fr); }
.builder-panel,
.builder-stage { border-radius: 22px; }

.builder-preview-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(100%, 980px);
  margin: 0 auto 10px;
  color: var(--app-muted);
  font-size: 0.7rem;
}

.builder-preview-context span {
  border-radius: 999px;
  background: var(--app-mint);
  color: var(--app-green);
  padding: 5px 9px;
  font-weight: 900;
}

.builder-preview-frame.is-tablet .builder-public-page,
.builder-preview-frame.is-tablet .builder-preview-context { max-width: 720px; }

.builder-preview-frame.is-mobile .builder-preview-context { max-width: 390px; }

.builder-preview-frame.is-tablet .builder-preview-hero,
.builder-preview-frame.is-tablet .builder-preview-split,
.builder-preview-frame.is-tablet .builder-preview-ebook { grid-template-columns: 1fr 0.8fr; }

.builder-device-toggle { flex-wrap: wrap; }

.builder-device-toggle button {
  min-height: 36px;
  border-radius: 999px;
}

.builder-section-list button { min-height: 72px; }

.admin-lux-modal {
  padding: clamp(10px, 2.5vw, 30px);
  background:
    radial-gradient(circle at 16% 0, rgba(188, 225, 210, 0.35), transparent 26rem),
    rgba(8, 30, 22, 0.62);
  -webkit-backdrop-filter: blur(25px) saturate(1.2);
  backdrop-filter: blur(25px) saturate(1.2);
}

.admin-lux-card {
  max-height: calc(100dvh - clamp(20px, 5vw, 60px));
  border-radius: 26px;
  background:
    radial-gradient(circle at 7% 0, rgba(217, 240, 230, 0.75), transparent 28rem),
    rgba(252, 253, 249, 0.93);
  overscroll-behavior: contain;
}

.modal-hero,
.modal-actions {
  background: rgba(251, 253, 249, 0.84);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
}

.modal-hero h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); }

.icon-button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--app-line);
  background: rgba(255, 255, 255, 0.72);
  font-size: 1.25rem;
}

.admin-app-bar {
  width: min(440px, calc(100% - 24px));
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(17, 62, 47, 0.91), rgba(7, 37, 27, 0.88));
  box-shadow: 0 22px 65px rgba(6, 31, 22, 0.3), inset 0 1px rgba(255, 255, 255, 0.18);
}

.admin-app-bar a,
.admin-app-bar button {
  border-radius: 16px;
  color: rgba(247, 252, 249, 0.9) !important;
}

.admin-app-bar a:hover,
.admin-app-bar button:hover { color: #fff !important; }

.admin-bottom-sheet {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(circle at 50% 0, rgba(201, 231, 219, 0.75), transparent 22rem),
    rgba(248, 251, 247, 0.94);
}

.admin-status {
  bottom: 104px;
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 252, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

.admin-is-loading [data-refresh],
.admin-is-loading [data-app-refresh] {
  pointer-events: none;
  opacity: 0.58;
}

.admin-is-loading [data-app-refresh] span {
  display: inline-block;
  animation: adminAppSpin 0.8s linear infinite;
}

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

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .admin-topbar,
  .admin-section-head,
  .editor-card,
  .builder-workspaces,
  .builder-panel,
  .builder-stage,
  .admin-lux-card,
  .admin-app-bar { background-color: rgba(250, 252, 248, 0.97); }

  .admin-sidebar,
  .admin-app-bar { background-color: #0b3024; }
}

@media (max-width: 1180px) {
  .admin-body { grid-template-columns: 252px minmax(0, 1fr); }
  .admin-sidebar { width: 252px; padding-inline: 14px; }
  .builder-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .builder-workspaces button { padding-right: 12px; }
  .builder-workspaces button::after { display: none; }
  .builder-workspaces em { display: none; }
}

@media (max-width: 900px) {
  .admin-body {
    display: block;
    padding: 0;
  }

  .admin-sidebar { display: none; }

  .admin-main {
    padding: max(12px, env(safe-area-inset-top)) clamp(12px, 3vw, 22px);
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .admin-topbar {
    top: max(8px, env(safe-area-inset-top));
    min-height: 76px;
    border-radius: 20px;
  }

  .admin-topbar h1 { font-size: clamp(1.55rem, 5vw, 2.25rem); }
  .admin-live-state { display: none; }

  .builder-workspaces {
    grid-template-columns: repeat(4, minmax(128px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .builder-workspaces button { scroll-snap-align: start; }

  .builder-shell { grid-template-columns: 1fr; min-height: 0; }

  .builder-panel {
    position: static;
    max-height: none;
  }

  .builder-section-list {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .builder-preview-frame { min-height: 520px; }

  .builder-toolbar,
  .builder-toolbar-actions {
    flex-direction: row;
    align-items: center;
  }

  .product-editor-layout { grid-template-columns: 1fr; }
  .product-editor-preview { position: static; }
  .product-content-lists { grid-template-columns: 1fr; }

  .admin-app-bar {
    bottom: max(9px, env(safe-area-inset-bottom));
    width: calc(100% - 18px);
  }
}

@media (max-width: 620px) {
  .admin-main { padding-inline: 9px; }
  .product-list-editor > header { align-items: stretch; flex-direction: column; }
  .product-list-item { grid-template-columns: 14px minmax(0, 1fr); align-items: start; }
  .product-property-fields { grid-template-columns: 1fr; }
  .product-list-actions { grid-column: 2; justify-content: flex-end; }

  .admin-topbar {
    min-height: 68px;
    margin-bottom: 12px;
    padding: 12px 13px 12px 16px;
    border-radius: 18px;
  }

  .admin-topbar .eyebrow { font-size: 0.58rem; }

  .admin-topbar-actions .btn-ghost {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 0.72rem;
  }

  .admin-section-head {
    gap: 11px;
    margin-bottom: 10px;
    padding: 13px;
    border-radius: 18px;
  }

  .admin-section-head h2 { font-size: 1.55rem; }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-actions button,
  .admin-section-head > .btn-primary { width: 100%; }

  .admin-guidance { padding: 13px 14px; }
  .admin-guidance p { font-size: 0.82rem; }

  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid article { min-height: 105px; padding: 14px; border-radius: 18px; }
  .kpi-grid span { font-size: 2rem; }
  .kpi-grid p { font-size: 0.7rem; line-height: 1.25; }

  .admin-quick-actions { grid-template-columns: 1fr; }
  .admin-quick-actions button { min-height: 90px; }

  .editor-stack { grid-template-columns: 1fr; }
  .editor-card { padding: 14px; border-radius: 18px; }
  .section-editor-card { grid-column: auto; }

  .editor-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .editor-card-actions .btn-danger { grid-column: 1 / -1; }

  .modal-grid,
  .editor-inline,
  .quick-product-controls { grid-template-columns: 1fr; }

  .admin-body input,
  .admin-body textarea,
  .admin-body select { font-size: 16px; }

  .media-picker { grid-template-columns: 1fr; }
  .media-picker-preview,
  .media-picker-preview img { min-height: 190px; }

  .table-wrap {
    border-radius: 16px;
    box-shadow: inset -16px 0 22px -24px rgba(9, 44, 32, 0.8), var(--app-shadow);
  }

  table { min-width: 650px; font-size: 0.8rem; }

  .builder-workspaces {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 0;
    border-radius: 18px;
    overflow: visible;
  }

  .builder-workspaces button {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 8px;
    padding: 9px;
  }

  .builder-workspaces button > span { font-size: 1rem; }
  .builder-workspaces em { display: none; }

  .builder-panel,
  .builder-stage { padding: 10px; border-radius: 18px; }
  .builder-section-list { grid-template-columns: 1fr; }

  .builder-toolbar,
  .builder-toolbar-actions { align-items: stretch; flex-direction: column; }

  .builder-device-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .builder-device-toggle button { padding-inline: 6px; font-size: 0.68rem; }
  .builder-preview-frame { min-height: 440px; padding: 8px; border-radius: 15px; }

  .builder-preview-hero,
  .builder-preview-split,
  .builder-preview-ebook,
  .builder-preview-frame.is-tablet .builder-preview-hero,
  .builder-preview-frame.is-tablet .builder-preview-split,
  .builder-preview-frame.is-tablet .builder-preview-ebook { grid-template-columns: 1fr; }

  .builder-preview-section { min-height: 170px; padding: 28px 18px 20px; }
  .builder-preview-section h3 { font-size: 2rem; }
  .builder-preview-section figure,
  .builder-preview-section img { min-height: 190px; }

  .admin-lux-modal { align-items: stretch; padding: 0; }

  .admin-lux-card {
    width: 100%;
    max-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .modal-hero {
    padding: max(14px, env(safe-area-inset-top)) 14px 14px;
  }

  .modal-hero p:not(.eyebrow) { display: none; }
  .modal-hero h2 { font-size: 1.75rem; }

  .product-editor-layout,
  .builder-modal-body { padding: 14px; }

  .product-editor-preview figure,
  .product-editor-preview img { min-height: 250px; }

  .modal-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }

  .modal-actions > * { width: 100%; }

  .admin-app-bar {
    gap: 3px;
    padding: 6px;
    border-radius: 20px;
  }

  .admin-app-bar a,
  .admin-app-bar button { min-height: 52px; }
  .admin-app-bar span { font-size: 1.12rem; }
  .admin-app-bar em { font-size: 0.62rem; }

  .admin-bottom-sheet { width: 100%; border-radius: 24px 24px 0 0; }
  .sheet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 370px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .admin-topbar-actions .btn-ghost { font-size: 0; }
  .admin-topbar-actions .btn-ghost::after { content: "Ver sitio"; font-size: 0.72rem; }
  .builder-device-toggle button { font-size: 0.61rem; }
  .product-gallery-admin { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-body *::before,
  .admin-body *::after { scroll-behavior: auto !important; }
}

/* Ceiba Drive visual finder and backup centre. */
.admin-body .media-library-modal { z-index: 180; }
.admin-body .media-library-card {
  width: min(1120px, 100%);
  height: min(88dvh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
}
.media-library-body { min-height: 0; overflow: auto; padding: 18px; }
.media-library-toolbar { position: sticky; z-index: 2; top: -18px; display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,.35fr); gap: 12px; margin: -18px -18px 18px; padding: 16px 18px; border-bottom: 1px solid var(--app-line); background: rgba(248,252,249,.96); }
.media-library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 12px; }
.media-library-grid > .empty-state { grid-column: 1/-1; }
.media-library-tile { display: grid; min-width: 0; overflow: hidden; padding: 0; border: 1px solid rgba(23,73,57,.11); border-radius: 18px; color: var(--app-ink); background: #fff; box-shadow: 0 9px 25px rgba(17,61,45,.07); text-align: left; transition: transform .14s ease,border-color .14s ease,box-shadow .14s ease; }
.media-library-tile:hover,.media-library-tile:focus-visible { transform: translateY(-2px); border-color: rgba(31,106,79,.42); box-shadow: 0 16px 34px rgba(17,61,45,.13); outline: 0; }
.media-library-image { display: grid; aspect-ratio: 1.15; overflow: hidden; place-items: center; background: #edf4ef; }
.media-library-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.media-library-tile:hover img { transform: scale(1.035); }
.media-library-copy { display: grid; gap: 4px; min-width: 0; padding: 11px 12px 13px; }
.media-library-copy strong,.media-library-copy small,.media-library-copy em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-library-copy strong { font-size: .78rem; }
.media-library-copy small { color: var(--app-green); font-size: .64rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.media-library-copy em { color: var(--app-muted); font-size: .68rem; font-style: normal; }
.media-library-launch { display: flex!important; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; }
.media-library-launch .wos-icon { width: 18px; height: 18px; }
.media-drive-shell { display:grid; gap:18px; }
.media-drive-toolbar { display:grid; grid-template-columns:minmax(190px,.65fr) minmax(340px,1.35fr); gap:24px; align-items:start; padding:22px; border:1px solid rgba(31,91,69,.12); border-radius:24px; background:linear-gradient(135deg,#eaf5ef,#fbfcf8); }
.media-drive-toolbar h3 { margin:3px 0 5px; color:var(--app-green-deep); font:700 clamp(1.7rem,3vw,2.4rem)/1 var(--font-serif); }
.media-drive-toolbar p { margin:0; color:var(--app-muted); }
.media-drive-tools { display:grid; gap:9px; }
.media-drive-tools > input,.media-drive-tool-row > input { min-width:0; width:100%; }
.media-drive-tool-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.media-drive-tool-row .btn-ghost { min-width:124px; justify-content:center; }
.media-drive-back { justify-self:start; border:0; padding:8px 2px; color:var(--app-green); background:transparent; font-weight:900; cursor:pointer; }
.media-folder-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:11px; }
.media-folder-card { position:relative; min-width:0; overflow:hidden; border:1px solid rgba(31,91,69,.12); border-radius:18px; background:#fff; box-shadow:0 8px 22px rgba(20,63,47,.055); }
.media-folder-card > button:first-child { display:grid; grid-template-columns:34px minmax(0,1fr); grid-template-rows:auto auto; width:100%; gap:2px 10px; align-items:center; border:0; padding:16px 42px 16px 15px; color:var(--app-green-deep); background:transparent; text-align:left; cursor:pointer; }
.media-folder-card .wos-icon { grid-row:1/3; width:30px; height:30px; color:#c69d00; }
.media-folder-card strong,.media-folder-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.media-folder-card small { color:var(--app-muted); }
.media-folder-card > button:last-child { position:absolute; top:9px; right:9px; display:grid; width:30px; height:30px; place-items:center; border:0; border-radius:10px; color:#9b4135; background:#fff2ee; cursor:pointer; }
.media-drive-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; }
.media-drive-grid > .empty-state { grid-column:1/-1; }
.media-drive-grid.editor-stack > .editor-card { margin:0; }
.builder-media-images { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.builder-media-images > figure { position:relative; overflow:hidden; aspect-ratio:1; margin:0; border:1px solid var(--app-line); border-radius:14px; background:#edf4ef; }
.builder-media-images img { width:100%; height:100%; object-fit:cover; }
.builder-media-images button { position:absolute; top:6px; right:6px; display:grid; width:28px; height:28px; place-items:center; border:0; border-radius:9px; color:#8f332d; background:rgba(255,244,240,.94); cursor:pointer; }
.builder-media-images .builder-list-empty { grid-column:1/-1; }
.builder-preview-media { display:grid; gap:14px; }
.builder-preview-media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.builder-preview-media-grid img { width:100%; aspect-ratio:1; border-radius:8px; object-fit:cover; }
.backup-center { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; border: 1px solid rgba(34,102,76,.15); border-radius: 22px; background: linear-gradient(135deg,#e3f2ea,#fbfaf4); box-shadow: var(--app-shadow); }
.backup-center h3 { margin: 2px 0 6px; font: 700 1.55rem/1.05 var(--font-serif); color: var(--app-green-deep); }
.backup-center p { max-width: 720px; margin: 0; color: var(--app-muted); line-height: 1.55; }
.backup-center-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.backup-center-actions label { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.admin-body .backup-ready-modal { z-index: 190; }
.admin-body .backup-ready-card { width: min(590px,100%); padding: clamp(24px,5vw,46px); text-align: center; }
.backup-ready-card h2 { margin: 7px 0 10px; color: var(--app-green-deep); font: 700 clamp(2rem,5vw,3.2rem)/.98 var(--font-serif); }
.backup-ready-card > p:not(.eyebrow) { color: var(--app-muted); line-height: 1.65; }
.backup-ready-visual { display: grid; width: 76px; height: 76px; margin: 0 auto 18px; place-items: center; border-radius: 24px; color: #fff; background: linear-gradient(145deg,#2d765a,#123e2e); box-shadow: 0 18px 38px rgba(18,71,51,.22); font-size: 2rem; }
.backup-ready-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.backup-ready-meta span,.backup-ready-meta strong { padding: 7px 10px; border-radius: 999px; color: var(--app-green); background: #edf5f0; font-size: .72rem; }
.backup-ready-card .modal-actions { margin: 24px -46px -46px; }
@media(max-width:720px){
  .media-library-toolbar { grid-template-columns: 1fr; }
  .media-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .media-drive-toolbar { grid-template-columns:1fr; padding:16px; }
  .media-drive-tool-row { grid-template-columns:1fr; }
  .media-drive-tool-row .btn-ghost { width:100%; }
  .media-drive-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .backup-center { align-items: stretch; flex-direction: column; }
  .backup-center-actions { display: grid; }
  .backup-ready-card .modal-actions { margin: 24px -24px -24px; }
}

/* Definitive editor layer: one fast modal and form language across the panel. */
.admin-body .entity-modal,
.admin-body .admin-lux-modal {
  display: flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(8, 29, 22, .54);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  backdrop-filter: blur(10px) saturate(1.08);
  transition: opacity .16s ease, visibility 0s linear .16s;
}

.admin-body .entity-modal.is-open,
.admin-body .admin-lux-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: none;
  transition-delay: 0s;
}

.admin-body .admin-lux-modal { align-items: center; justify-content: center; }
.admin-body .entity-modal-card,
.admin-body .admin-lux-card {
  opacity: 0;
  transform: translateY(10px) scale(.988);
  animation: none;
  will-change: transform, opacity;
  transition: transform .18s cubic-bezier(.2,.75,.2,1), opacity .14s ease;
}

.admin-body .entity-modal.is-open .entity-modal-card,
.admin-body .admin-lux-modal.is-open .admin-lux-card {
  opacity: 1;
  transform: none;
}

.admin-body .entity-modal-card,
.admin-body .admin-lux-card {
  border: 1px solid rgba(255,255,255,.82);
  background: rgba(250,252,248,.98);
  box-shadow: 0 28px 78px rgba(6,34,24,.25), inset 0 1px #fff;
}

.admin-body .product-modal-editor,
.admin-body .builder-modal-card,
.admin-body .order-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.admin-body [data-product-modal-body],
.admin-body .builder-modal-body,
.admin-body .order-modal-body,
.admin-body .entity-modal-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-body .modal-hero,
.admin-body .modal-actions,
.admin-body .entity-modal-card > header,
.admin-body .entity-modal-card > footer {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(250,252,248,.98);
}

.admin-body .modal-hero,
.admin-body .entity-modal-card > header {
  border-bottom: 1px solid rgba(23,73,57,.1);
}

.admin-body .modal-actions,
.admin-body .entity-modal-card > footer {
  border-top: 1px solid rgba(23,73,57,.1);
  box-shadow: 0 -10px 26px rgba(24,60,47,.035);
}

.admin-body .entity-modal-card > header > button,
.admin-body .icon-button {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(23,73,57,.1);
  border-radius: 14px;
  color: var(--app-green);
  background: #edf5f0;
  box-shadow: none;
  transition: transform .14s ease, background .14s ease;
}

.admin-body .entity-modal-card > header > button:hover,
.admin-body .icon-button:hover { transform: scale(1.04); background: #e1efe7; }

.admin-body .entity-modal-body .editor-card {
  display: grid;
  gap: 16px;
}

.admin-body .entity-modal-body label,
.admin-body .admin-lux-card label {
  display: grid;
  gap: 7px;
  color: #496359;
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .015em;
}

.admin-body .entity-modal-card input:not([type="checkbox"]):not([type="color"]),
.admin-body .entity-modal-card select,
.admin-body .entity-modal-card textarea,
.admin-body .admin-lux-card input:not([type="checkbox"]):not([type="color"]),
.admin-body .admin-lux-card select,
.admin-body .admin-lux-card textarea {
  min-height: 44px;
  border: 1px solid rgba(24,76,58,.14);
  border-radius: 13px;
  padding: 10px 12px;
  color: var(--app-ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,56,41,.025);
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.admin-body .entity-modal-card textarea,
.admin-body .admin-lux-card textarea { min-height: 96px; resize: vertical; }

.admin-body .entity-modal-card input:focus,
.admin-body .entity-modal-card select:focus,
.admin-body .entity-modal-card textarea:focus,
.admin-body .admin-lux-card input:focus,
.admin-body .admin-lux-card select:focus,
.admin-body .admin-lux-card textarea:focus {
  outline: 0;
  border-color: rgba(31,105,78,.58);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(68,145,114,.13);
}

.admin-body .entity-modal-card input[type="file"],
.admin-body .admin-lux-card input[type="file"] {
  padding: 6px;
  color: var(--app-muted);
  background: #f5f8f5;
}

.admin-body input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  border: 0;
  border-radius: 9px;
  padding: 7px 11px;
  color: #fff;
  background: var(--app-green);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-body .friendly-details,
.admin-body .section-editor-card details,
.admin-body .gallery-builder,
.admin-body .media-picker,
.admin-body .product-list-editor {
  border: 1px solid rgba(23,73,57,.1);
  border-radius: 17px;
  background: #f7faf7;
  box-shadow: none;
}

.admin-body .friendly-details summary,
.admin-body .section-editor-card details > summary {
  cursor: pointer;
  color: var(--app-green);
  font-weight: 900;
}

.admin-body .product-list-item {
  border-color: rgba(23,73,57,.1);
  background: #fff;
  box-shadow: none;
}

.admin-body .product-list-actions button {
  border-color: rgba(23,73,57,.11);
  color: var(--app-green);
  background: #eff6f2;
}

.admin-body .product-list-actions .is-danger {
  color: #9b4135;
  background: #fff1ed;
}

.admin-body .admin-help {
  border: 1px solid rgba(45,111,84,.1);
  border-radius: 13px;
  padding: 10px 12px;
  color: #587269;
  background: #edf6f1;
}

@media (max-width: 720px) {
  .admin-body .entity-modal,
  .admin-body .admin-lux-modal { align-items: flex-end; padding: 0; }

  .admin-body .entity-modal-card,
  .admin-body .admin-lux-card {
    width: 100%;
    max-height: 96dvh;
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
  }

  .admin-body .modal-hero,
  .admin-body .entity-modal-card > header { padding: 14px 15px; }
  .admin-body .entity-modal-body { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body .entity-modal,
  .admin-body .admin-lux-modal,
  .admin-body .entity-modal-card,
  .admin-body .admin-lux-card { transition-duration: .01ms !important; }
}

/* Theme-complete administrative surfaces; this file intentionally loads last. */
html[data-theme="dark"] .admin-body {
  --app-ink:#e8f3ed; --app-muted:#a9c0b5; --app-green:#9bd5b9; --app-green-deep:#d8f2e4; --app-mint:#173b2c; --app-line:rgba(198,230,214,.15);
  color:#e8f3ed; background:radial-gradient(circle at 88% 4%,#173f2e,transparent 28rem),#071710;
}
html[data-theme="dark"] .admin-body .admin-topbar,
html[data-theme="dark"] .admin-body .admin-section-head,
html[data-theme="dark"] .admin-body .admin-guidance,
html[data-theme="dark"] .admin-body .editor-card,
html[data-theme="dark"] .admin-body .admin-form,
html[data-theme="dark"] .admin-body .admin-lux-card,
html[data-theme="dark"] .admin-body .entity-modal-card,
html[data-theme="dark"] .admin-body .modal-hero,
html[data-theme="dark"] .admin-body .modal-actions,
html[data-theme="dark"] .admin-body .entity-modal-card>header,
html[data-theme="dark"] .admin-body .entity-modal-card>footer,
html[data-theme="dark"] .admin-body .media-library-toolbar,
html[data-theme="dark"] .admin-body .media-library-tile,
html[data-theme="dark"] .admin-body .media-drive-toolbar,
html[data-theme="dark"] .admin-body .media-folder-card { color:#e8f3ed; border-color:rgba(198,230,214,.15); background:#0d241a; box-shadow:none; }
html[data-theme="dark"] .admin-body input:not([type="color"]),
html[data-theme="dark"] .admin-body textarea,
html[data-theme="dark"] .admin-body select { color:#eef8f2!important; border-color:rgba(198,230,214,.2)!important; background:#081a12!important; color-scheme:dark; }
html[data-theme="dark"] .admin-body option { color:#eef8f2; background:#081a12; }
html[data-theme="dark"] .admin-body .friendly-details,
html[data-theme="dark"] .admin-body .product-list-editor,
html[data-theme="dark"] .admin-body .product-list-item,
html[data-theme="dark"] .admin-body .media-picker,
html[data-theme="dark"] .admin-body .admin-help { color:#b9cec3; border-color:rgba(198,230,214,.14); background:#102a1f; }
html[data-theme="contrast"] .admin-body { --app-ink:#fff;--app-muted:#fff;--app-green:#ffe600;--app-green-deep:#ffe600;--app-line:#fff;color:#fff;background:#000; }
html[data-theme="contrast"] .admin-body .admin-topbar,
html[data-theme="contrast"] .admin-body .admin-section-head,
html[data-theme="contrast"] .admin-body .admin-guidance,
html[data-theme="contrast"] .admin-body .editor-card,
html[data-theme="contrast"] .admin-body .admin-form,
html[data-theme="contrast"] .admin-body .admin-lux-card,
html[data-theme="contrast"] .admin-body .entity-modal-card,
html[data-theme="contrast"] .admin-body .modal-hero,
html[data-theme="contrast"] .admin-body .modal-actions,
html[data-theme="contrast"] .admin-body .entity-modal-card>header,
html[data-theme="contrast"] .admin-body .entity-modal-card>footer,
html[data-theme="contrast"] .admin-body .media-library-toolbar,
html[data-theme="contrast"] .admin-body .media-library-tile,
html[data-theme="contrast"] .admin-body .media-drive-toolbar,
html[data-theme="contrast"] .admin-body .media-folder-card,
html[data-theme="contrast"] .admin-body .friendly-details,
html[data-theme="contrast"] .admin-body .product-list-editor,
html[data-theme="contrast"] .admin-body .product-list-item,
html[data-theme="contrast"] .admin-body .media-picker,
html[data-theme="contrast"] .admin-body .admin-help { color:#fff!important;border:2px solid #fff!important;background:#000!important;box-shadow:none!important; }
html[data-theme="contrast"] .admin-body input:not([type="color"]),
html[data-theme="contrast"] .admin-body textarea,
html[data-theme="contrast"] .admin-body select { color:#fff!important;border:2px solid #fff!important;background:#000!important;color-scheme:dark; }
html[data-theme="contrast"] .admin-body option { color:#fff;background:#000; }
