/* Dalle Pepper admin shell.
   One admin-only readability layer: lokta paper page, clean panels, red live actions. */

html.dp-admin-readable,
html.dalle-admin-polished,
html.dp-admin-readable body,
html.dalle-admin-polished body,
html.dp-admin-readable #root,
html.dalle-admin-polished #root,
html.dp-admin-readable .dp-admin-readable-root,
html.dp-admin-readable #root > div,
html.dalle-admin-polished #root > div,
body.dp-admin-view,
body.dp-admin-view #root,
body.dp-admin-view #root > div{
  --admin-page:#f4efe5;
  --admin-paper:#faf6ee;
  --admin-panel:#ffffff;
  --admin-field:#fffaf3;
  --admin-line:#d8cfbf;
  --admin-line-strong:#c5b9a7;
  --admin-text:#1f2933;
  --admin-muted:#5f6874;
  --admin-red:#b42318;
  --admin-red-dark:#861b12;
  --admin-green:#22734d;
  --admin-blue:#22577a;
  min-height:100%;
  background:
    repeating-linear-gradient(18deg,rgba(98,72,35,.024) 0 1px,transparent 1px 13px),
    repeating-linear-gradient(103deg,rgba(255,255,255,.28) 0 1px,transparent 1px 17px),
    linear-gradient(135deg,var(--admin-page),#fbf7ef 56%,#ede3d3)!important;
  color:var(--admin-text)!important;
}

html.dalle-admin-polished body:before{
  content:none!important;
  display:none!important;
}

html.dp-admin-readable *,
html.dalle-admin-polished *,
body.dp-admin-view *{
  text-shadow:none!important;
  letter-spacing:0!important;
}

html.dp-admin-readable .admin-shell *,
html.dalle-admin-polished .admin-shell *,
body.dp-admin-view .admin-shell *{
  opacity:1!important;
}

html.dp-admin-readable main,
html.dalle-admin-polished main,
body.dp-admin-view main{
  background:transparent!important;
  color:var(--admin-text)!important;
}

html.dp-admin-readable .admin-shell,
html.dalle-admin-polished .admin-shell,
body.dp-admin-view .admin-shell{
  width:min(100%,1160px)!important;
  margin:0 auto!important;
  padding:14px!important;
  background:transparent!important;
  color:var(--admin-text)!important;
}

html.dp-admin-readable main > div,
html.dp-admin-readable main > div > div,
html.dp-admin-readable main > div > div > div,
html.dalle-admin-polished main > div,
html.dalle-admin-polished main > div > div,
html.dalle-admin-polished main > div > div > div,
body.dp-admin-view main > div,
body.dp-admin-view main > div > div,
body.dp-admin-view main > div > div > div{
  background:transparent!important;
  color:var(--admin-text)!important;
}

html.dp-admin-readable .admin-panel,
html.dp-admin-readable form.admin-panel,
html.dp-admin-readable section,
html.dp-admin-readable aside,
html.dp-admin-readable .dalle-backend-control,
html.dp-admin-readable .admin-enhancer-panel,
html.dp-admin-readable .admin-tab-shell,
html.dalle-admin-polished .admin-panel,
html.dalle-admin-polished form.admin-panel,
html.dalle-admin-polished section,
html.dalle-admin-polished aside,
html.dalle-admin-polished .dalle-backend-control,
html.dalle-admin-polished .admin-enhancer-panel,
html.dalle-admin-polished .admin-tab-shell,
body.dp-admin-view .admin-panel,
body.dp-admin-view form.admin-panel,
body.dp-admin-view section,
body.dp-admin-view aside,
body.dp-admin-view .dalle-backend-control,
body.dp-admin-view .admin-enhancer-panel,
body.dp-admin-view .admin-tab-shell{
  background:var(--admin-panel)!important;
  background-image:none!important;
  border:1px solid var(--admin-line)!important;
  border-radius:8px!important;
  color:var(--admin-text)!important;
  box-shadow:0 6px 18px rgba(31,41,51,.07)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}

html.dp-admin-readable [class*="bg-stone"],
html.dp-admin-readable [class*="bg-slate"],
html.dp-admin-readable [class*="bg-zinc"],
html.dp-admin-readable [class*="bg-neutral"],
html.dp-admin-readable [class*="bg-gray"],
html.dp-admin-readable [class*="bg-black"],
html.dp-admin-readable [class*="bg-white/["],
html.dp-admin-readable [class*="bg-white\\["],
html.dp-admin-readable [class*="bg-gradient"],
html.dp-admin-readable [class*="from-stone"],
html.dp-admin-readable [class*="from-slate"],
html.dp-admin-readable [class*="from-zinc"],
html.dp-admin-readable [class*="from-neutral"],
html.dp-admin-readable [class*="from-black"],
html.dp-admin-readable [class*="to-stone"],
html.dp-admin-readable [class*="to-slate"],
html.dp-admin-readable [class*="to-zinc"],
html.dp-admin-readable [class*="to-neutral"],
html.dp-admin-readable [class*="to-black"],
html.dalle-admin-polished [class*="bg-stone"],
html.dalle-admin-polished [class*="bg-slate"],
html.dalle-admin-polished [class*="bg-zinc"],
html.dalle-admin-polished [class*="bg-neutral"],
html.dalle-admin-polished [class*="bg-gray"],
html.dalle-admin-polished [class*="bg-black"],
html.dalle-admin-polished [class*="bg-white/["],
html.dalle-admin-polished [class*="bg-white\\["],
html.dalle-admin-polished [class*="bg-gradient"],
html.dalle-admin-polished [class*="from-stone"],
html.dalle-admin-polished [class*="from-slate"],
html.dalle-admin-polished [class*="from-zinc"],
html.dalle-admin-polished [class*="from-neutral"],
html.dalle-admin-polished [class*="from-black"],
html.dalle-admin-polished [class*="to-stone"],
html.dalle-admin-polished [class*="to-slate"],
html.dalle-admin-polished [class*="to-zinc"],
html.dalle-admin-polished [class*="to-neutral"],
html.dalle-admin-polished [class*="to-black"],
body.dp-admin-view [class*="bg-stone"],
body.dp-admin-view [class*="bg-slate"],
body.dp-admin-view [class*="bg-zinc"],
body.dp-admin-view [class*="bg-neutral"],
body.dp-admin-view [class*="bg-gray"],
body.dp-admin-view [class*="bg-black"],
body.dp-admin-view [class*="bg-white/["],
body.dp-admin-view [class*="bg-white\\["],
body.dp-admin-view [class*="bg-gradient"],
body.dp-admin-view [class*="from-stone"],
body.dp-admin-view [class*="from-slate"],
body.dp-admin-view [class*="from-zinc"],
body.dp-admin-view [class*="from-neutral"],
body.dp-admin-view [class*="from-black"],
body.dp-admin-view [class*="to-stone"],
body.dp-admin-view [class*="to-slate"],
body.dp-admin-view [class*="to-zinc"],
body.dp-admin-view [class*="to-neutral"],
body.dp-admin-view [class*="to-black"]{
  background:var(--admin-panel)!important;
  background-image:none!important;
  border-color:var(--admin-line)!important;
  color:var(--admin-text)!important;
}

html.dp-admin-readable h1,
html.dp-admin-readable h2,
html.dp-admin-readable h3,
html.dp-admin-readable h4,
html.dp-admin-readable label,
html.dp-admin-readable span,
html.dp-admin-readable li,
html.dp-admin-readable p,
html.dp-admin-readable small,
html.dp-admin-readable [class*="text-white"],
html.dp-admin-readable [class*="text-stone"],
html.dp-admin-readable [class*="text-slate"],
html.dp-admin-readable [class*="text-zinc"],
html.dp-admin-readable [class*="text-neutral"],
html.dp-admin-readable [class*="text-gray"],
html.dp-admin-readable [class*="text-amber"],
html.dalle-admin-polished h1,
html.dalle-admin-polished h2,
html.dalle-admin-polished h3,
html.dalle-admin-polished h4,
html.dalle-admin-polished label,
html.dalle-admin-polished span,
html.dalle-admin-polished li,
html.dalle-admin-polished p,
html.dalle-admin-polished small,
html.dalle-admin-polished [class*="text-white"],
html.dalle-admin-polished [class*="text-stone"],
html.dalle-admin-polished [class*="text-slate"],
html.dalle-admin-polished [class*="text-zinc"],
html.dalle-admin-polished [class*="text-neutral"],
html.dalle-admin-polished [class*="text-gray"],
html.dalle-admin-polished [class*="text-amber"],
body.dp-admin-view h1,
body.dp-admin-view h2,
body.dp-admin-view h3,
body.dp-admin-view h4,
body.dp-admin-view label,
body.dp-admin-view span,
body.dp-admin-view li,
body.dp-admin-view p,
body.dp-admin-view small,
body.dp-admin-view [class*="text-white"],
body.dp-admin-view [class*="text-stone"],
body.dp-admin-view [class*="text-slate"],
body.dp-admin-view [class*="text-zinc"],
body.dp-admin-view [class*="text-neutral"],
body.dp-admin-view [class*="text-gray"],
body.dp-admin-view [class*="text-amber"]{
  color:var(--admin-text)!important;
}

html.dp-admin-readable p,
html.dp-admin-readable small,
html.dp-admin-readable .admin-help-text,
html.dalle-admin-polished p,
html.dalle-admin-polished small,
html.dalle-admin-polished .admin-help-text,
body.dp-admin-view p,
body.dp-admin-view small,
body.dp-admin-view .admin-help-text{
  color:var(--admin-muted)!important;
}

html.dp-admin-readable .admin-shell .rounded-xl,
html.dp-admin-readable .admin-shell .rounded-lg,
html.dp-admin-readable .admin-shell .rounded-md,
html.dalle-admin-polished .admin-shell .rounded-xl,
html.dalle-admin-polished .admin-shell .rounded-lg,
html.dalle-admin-polished .admin-shell .rounded-md,
body.dp-admin-view .admin-shell .rounded-xl,
body.dp-admin-view .admin-shell .rounded-lg,
body.dp-admin-view .admin-shell .rounded-md{
  border-radius:7px!important;
}

html.dp-admin-readable .admin-shell [class*=" p-6"],
html.dp-admin-readable .admin-shell [class*=" p-5"],
html.dp-admin-readable .admin-shell [class*=" p-4"],
html.dalle-admin-polished .admin-shell [class*=" p-6"],
html.dalle-admin-polished .admin-shell [class*=" p-5"],
html.dalle-admin-polished .admin-shell [class*=" p-4"],
body.dp-admin-view .admin-shell [class*=" p-6"],
body.dp-admin-view .admin-shell [class*=" p-5"],
body.dp-admin-view .admin-shell [class*=" p-4"]{
  padding:12px!important;
}

html.dp-admin-readable .admin-shell [class*=" gap-6"],
html.dp-admin-readable .admin-shell [class*=" gap-5"],
html.dp-admin-readable .admin-shell [class*=" gap-4"],
html.dalle-admin-polished .admin-shell [class*=" gap-6"],
html.dalle-admin-polished .admin-shell [class*=" gap-5"],
html.dalle-admin-polished .admin-shell [class*=" gap-4"],
body.dp-admin-view .admin-shell [class*=" gap-6"],
body.dp-admin-view .admin-shell [class*=" gap-5"],
body.dp-admin-view .admin-shell [class*=" gap-4"]{
  gap:12px!important;
}

html.dp-admin-readable input:not([type=color]),
html.dp-admin-readable textarea,
html.dp-admin-readable select,
html.dalle-admin-polished input:not([type=color]),
html.dalle-admin-polished textarea,
html.dalle-admin-polished select,
body.dp-admin-view input:not([type=color]),
body.dp-admin-view textarea,
body.dp-admin-view select{
  min-height:38px!important;
  background:var(--admin-field)!important;
  background-color:var(--admin-field)!important;
  border:1px solid var(--admin-line-strong)!important;
  border-radius:6px!important;
  color:var(--admin-text)!important;
  box-shadow:none!important;
  outline:none!important;
  color-scheme:light!important;
}

html.dp-admin-readable select,
html.dalle-admin-polished select,
body.dp-admin-view select{
  appearance:auto!important;
  -webkit-appearance:menulist!important;
}

html.dp-admin-readable select option,
html.dalle-admin-polished select option,
body.dp-admin-view select option{
  background:#fffaf3!important;
  color:var(--admin-text)!important;
}

html.dp-admin-readable input:not([type=color]):focus,
html.dp-admin-readable textarea:focus,
html.dp-admin-readable select:focus,
html.dalle-admin-polished input:not([type=color]):focus,
html.dalle-admin-polished textarea:focus,
html.dalle-admin-polished select:focus,
body.dp-admin-view input:not([type=color]):focus,
body.dp-admin-view textarea:focus,
body.dp-admin-view select:focus{
  border-color:var(--admin-blue)!important;
  box-shadow:0 0 0 2px rgba(34,87,122,.18)!important;
}

html.dp-admin-readable input[type=range],
html.dalle-admin-polished input[type=range],
body.dp-admin-view input[type=range]{
  accent-color:var(--admin-red)!important;
}

html.dp-admin-readable button,
html.dalle-admin-polished button,
body.dp-admin-view button{
  min-height:34px!important;
  background:#f8f3ea!important;
  border:1px solid var(--admin-line-strong)!important;
  border-radius:6px!important;
  color:var(--admin-text)!important;
  box-shadow:none!important;
}

html.dp-admin-readable button:hover,
html.dalle-admin-polished button:hover,
body.dp-admin-view button:hover{
  background:#efe7da!important;
}

html.dp-admin-readable [data-live-action],
html.dp-admin-readable [data-admin-settings-push],
html.dp-admin-readable [data-product-contract-save],
html.dp-admin-readable [data-product-contract-apply-all],
html.dp-admin-readable button[type=submit],
html.dalle-admin-polished [data-live-action],
html.dalle-admin-polished [data-admin-settings-push],
html.dalle-admin-polished [data-product-contract-save],
html.dalle-admin-polished [data-product-contract-apply-all],
html.dalle-admin-polished button[type=submit],
body.dp-admin-view [data-live-action],
body.dp-admin-view [data-admin-settings-push],
body.dp-admin-view [data-product-contract-save],
body.dp-admin-view [data-product-contract-apply-all],
body.dp-admin-view button[type=submit]{
  background:var(--admin-red)!important;
  border-color:var(--admin-red-dark)!important;
  color:#ffffff!important;
}

html.dp-admin-readable [data-live-action]:hover,
html.dp-admin-readable [data-admin-settings-push]:hover,
html.dp-admin-readable [data-product-contract-save]:hover,
html.dp-admin-readable [data-product-contract-apply-all]:hover,
html.dp-admin-readable button[type=submit]:hover,
html.dalle-admin-polished [data-live-action]:hover,
html.dalle-admin-polished [data-admin-settings-push]:hover,
html.dalle-admin-polished [data-product-contract-save]:hover,
html.dalle-admin-polished [data-product-contract-apply-all]:hover,
html.dalle-admin-polished button[type=submit]:hover,
body.dp-admin-view [data-live-action]:hover,
body.dp-admin-view [data-admin-settings-push]:hover,
body.dp-admin-view [data-product-contract-save]:hover,
body.dp-admin-view [data-product-contract-apply-all]:hover,
body.dp-admin-view button[type=submit]:hover{
  background:var(--admin-red-dark)!important;
}

.dalle-backend-control{
  margin:12px 0!important;
  padding:12px!important;
}

.dbc-head{
  display:flex!important;
  gap:12px!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
}

.dbc-actions{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}

.dbc-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important;
  gap:8px!important;
  margin-top:10px!important;
}

.dbc-grid > div,
.dalle-backend-control pre{
  background:#fbf7ef!important;
  border:1px solid var(--admin-line)!important;
  border-radius:6px!important;
  color:var(--admin-text)!important;
  padding:8px!important;
}

.dalle-backend-control pre{
  white-space:pre-wrap!important;
  overflow:auto!important;
  max-height:92px!important;
}

.dalle-color-wheel-label{
  margin-top:8px!important;
  color:var(--admin-muted)!important;
  font-size:.72rem!important;
  font-weight:800!important;
  text-transform:uppercase!important;
}

.dalle-major-color-swatches{
  display:grid!important;
  grid-template-columns:repeat(6,18px)!important;
  gap:6px!important;
  margin-top:8px!important;
  max-width:144px!important;
}

.dalle-major-color-swatch{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  padding:0!important;
  border-radius:50%!important;
  border:1px solid rgba(31,41,51,.28)!important;
  background:var(--swatch-color)!important;
  box-shadow:0 0 0 2px #fff,0 2px 7px rgba(31,41,51,.18)!important;
}

.dalle-major-color-swatch:hover,
.dalle-major-color-swatch:focus-visible{
  outline:2px solid var(--admin-blue)!important;
  outline-offset:2px!important;
}

.admin-theme-preview,
.admin-theme-chip,
.admin-check-row,
.admin-theme-flow span,
.admin-architecture-map span{
  background:#fbf7ef!important;
  border:1px solid var(--admin-line)!important;
  color:var(--admin-text)!important;
}

.dp-cockpit-readout{
  display:none!important;
}

.admin-devanagari-panel{
  margin:10px 0!important;
  padding:10px!important;
  max-height:190px!important;
  overflow:auto!important;
  background:#fffaf3!important;
  border:1px solid var(--admin-line)!important;
  border-radius:8px!important;
}

.admin-devanagari-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-bottom:8px!important;
}

.admin-devanagari-head h3{
  font-size:1rem!important;
  line-height:1.1!important;
}

.admin-devanagari-head span,
.admin-devanagari-panel p{
  font-size:.76rem!important;
}

.admin-devanagari-compose{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:end!important;
}

.admin-devanagari-groups{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important;
  gap:8px!important;
  margin-top:8px!important;
}

.admin-devanagari-groups strong{
  display:block!important;
  margin-bottom:4px!important;
  font-size:.72rem!important;
  color:var(--admin-muted)!important;
}

.admin-devanagari-groups div div{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:3px!important;
}

.admin-devanagari-groups button{
  min-height:24px!important;
  min-width:24px!important;
  padding:1px 5px!important;
  font-size:.8rem!important;
}

.admin-shell [class*="lg:grid-cols-[360px_1fr]"]{
  grid-template-columns:minmax(220px,300px) minmax(0,1fr)!important;
  gap:12px!important;
}

.admin-shell aside.admin-panel{
  padding:10px!important;
}

.admin-shell aside.admin-panel [class*="aspect-video"]{
  min-height:110px!important;
}

.admin-shell form.admin-panel [class*="lg:grid-cols-[minmax(0,1fr)_220px]"]{
  grid-template-columns:minmax(0,1fr) 190px!important;
  gap:12px!important;
}

.admin-shell form.admin-panel textarea{
  min-height:92px!important;
}

@media (max-width:720px){
  html.dp-admin-readable .admin-shell,
  body.dp-admin-view .admin-shell{
    padding:8px!important;
  }

  .dbc-head{
    display:block!important;
  }

  .admin-devanagari-compose,
  .admin-shell [class*="lg:grid-cols-[360px_1fr]"],
  .admin-shell form.admin-panel [class*="lg:grid-cols-[minmax(0,1fr)_220px]"]{
    grid-template-columns:1fr!important;
  }
}
