/* CORENTRA — ADMIN ONLY DARK GREEN THEME */
body:has(.admin-layout) {
  background: #0b1510 !important;
  color: #f1f7f2 !important;
  color-scheme: dark;
}

body:has(.admin-layout) header,
body:has(.admin-layout) footer,
body:has(.admin-layout) #main,
body:has(.admin-layout) .owner-main,
body:has(.admin-layout) .admin-layout,
body:has(.admin-layout) .sidebar,
body:has(.admin-layout) .workspace {
  background: #0b1510 !important;
  color: #f1f7f2 !important;
  border-color: #294333 !important;
}

body:has(.admin-layout) .workspace .panel,
body:has(.admin-layout) .workspace .metrics > div,
body:has(.admin-layout) .workspace .table-wrap,
body:has(.admin-layout) .workspace .preview-card,
body:has(.admin-layout) .workspace .two-panels > div,
body:has(.admin-layout) .workspace fieldset,
body:has(.admin-layout) .workspace .editor-section,
body:has(.admin-layout) .workspace .sticky-actions,
body:has(.admin-layout) .workspace .card {
  background: #14251a !important;
  color: #f1f7f2 !important;
  border: 1px solid #34533d !important;
  box-shadow: none !important;
}

body:has(.admin-layout) .sidebar button,
body:has(.admin-layout) .workspace button,
body:has(.admin-layout) .workspace .button {
  background: #203b29 !important;
  color: #f1f7f2 !important;
  border: 1px solid #42684b !important;
}

body:has(.admin-layout) .sidebar button.active,
body:has(.admin-layout) .workspace button.primary,
body:has(.admin-layout) .workspace button[type="submit"],
body:has(.admin-layout) .workspace .primary {
  background: #347348 !important;
  color: #ffffff !important;
  border-color: #559568 !important;
}

body:has(.admin-layout) .workspace input,
body:has(.admin-layout) .workspace select,
body:has(.admin-layout) .workspace textarea {
  background: #0b1510 !important;
  color: #f1f7f2 !important;
  border: 1px solid #42684b !important;
}

body:has(.admin-layout) .workspace th {
  background: #203b29 !important;
  color: #ffffff !important;
}

body:has(.admin-layout) .workspace td,
body:has(.admin-layout) .workspace h1,
body:has(.admin-layout) .workspace h2,
body:has(.admin-layout) .workspace h3,
body:has(.admin-layout) .workspace p,
body:has(.admin-layout) .workspace label,
body:has(.admin-layout) .workspace small,
body:has(.admin-layout) .owner-label {
  color: #f1f7f2 !important;
}

body:has(.admin-layout) .workspace a {
  color: #a9ddb2 !important;
}

/* Admin overview heading contrast fix */
body:has(.admin-layout) .workspace .page-heading h1 {
  color: #ffffff !important;
}

body:has(.admin-layout) .workspace .page-heading .eyebrow {
  color: #a9ddb2 !important;
}

/* CORENTRA HOMEPAGE — GRAPHITE AND GOLD THEME */
html:has(.hero),
body:has(.hero) {
  background: #101318 !important;
  color: #f4f1e8 !important;
}

body:has(.hero) header,
body:has(.hero) main,
body:has(.hero) footer {
  background: transparent !important;
  color: #f4f1e8 !important;
  border-color: #343a45 !important;
}

body:has(.hero) .announcement {
  background: #202630 !important;
  color: #e8d6aa !important;
}

body:has(.hero) .hero h1,
body:has(.hero) .hero p,
body:has(.hero) .section-head h2,
body:has(.hero) .values h3,
body:has(.hero) .values p {
  color: #f4f1e8 !important;
}

body:has(.hero) .hero-stamp {
  background: #c8a45d !important;
  color: #17191d !important;
  border: 1px solid #e3c98e !important;
}

body:has(.hero) .hero-footnote,
body:has(.hero) .card-meta {
  color: #c8a45d !important;
}

body:has(.hero) .values {
  background: #1b222b !important;
  color: #f4f1e8 !important;
  border: 1px solid #343a45 !important;
}

body:has(.hero) .card {
  background: #1a2028 !important;
  color: #f4f1e8 !important;
  border: 1px solid #343a45 !important;
  border-radius: 12px !important;
  padding: 12px !important;
}

body:has(.hero) .card h3,
body:has(.hero) .card h3 button {
  color: #f4f1e8 !important;
}

body:has(.hero) .badge {
  background: #c8a45d !important;
  color: #17191d !important;
  border: 1px solid #e3c98e !important;
  font-weight: 700 !important;
}

body:has(.hero) .chip {
  background: #202630 !important;
  color: #f4f1e8 !important;
  border: 1px solid #46505e !important;
}

body:has(.hero) .chip.active {
  background: #c8a45d !important;
  color: #17191d !important;
  border-color: #e3c98e !important;
}

body:has(.hero) .primary {
  background: #c8a45d !important;
  color: #17191d !important;
  border: 1px solid #e3c98e !important;
}

body:has(.hero) input,
body:has(.hero) select {
  background: #1a2028 !important;
  color: #f4f1e8 !important;
  border-color: #46505e !important;
}

/* ADMIN PRODUCT STATUS TAGS */
body:has(.admin-layout) #adminProducts .ct-status {
  display: inline-block !important;
  padding: 6px 11px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
}

body:has(.admin-layout) #adminProducts .ct-status.ct-on {
  background: #173c2b !important;
  color: #a9e8bd !important;
  border-color: #347b50 !important;
}

body:has(.admin-layout) #adminProducts .ct-status.ct-off {
  background: #482522 !important;
  color: #ffc0b4 !important;
  border-color: #985044 !important;
}

body:has(.admin-layout) #adminProducts .ct-toggle {
  background: #263342 !important;
  color: #f4f1e8 !important;
  border: 1px solid #53657a !important;
}

/* CORENTRA FOOTER BUTTON DESIGN */
body:has(.hero) footer .footer-links {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

body:has(.hero) footer .footer-links button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 10px 18px !important;
  background: #202630 !important;
  color: #e8d6aa !important;
  border: 1px solid #9c8047 !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
  cursor: pointer !important;
  transition: background .2s ease, color .2s ease !important;
}

body:has(.hero) footer .footer-links button:hover {
  background: #c8a45d !important;
  color: #17191d !important;
  border-color: #e3c98e !important;
}

@media(max-width:600px) {
  body:has(.hero) footer .footer-links button {
    padding: 9px 13px !important;
    font-size: 11px !important;
  }
}

/* DIRECT FOOTER POLICY BUTTON FIX */
footer .footer-links button[data-policy] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  padding: 11px 20px !important;
  background-color: #252d38 !important;
  color: #f1d99f !important;
  border: 1px solid #c8a45d !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .4px !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.25) !important;
}

footer .footer-links button[data-policy]:hover {
  background-color: #c8a45d !important;
  color: #17191d !important;
  border-color: #e3c98e !important;
}

/* CORENTRA POLICY POPUP — TEXT VISIBILITY FIX */
body:has(.hero) dialog#dialog {
  background: #171d25 !important;
  color: #f4f1e8 !important;
  border: 1px solid #c8a45d !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.65) !important;
}

body:has(.hero) dialog#dialog::backdrop {
  background: rgba(0,0,0,.78) !important;
}

body:has(.hero) dialog#dialog #content,
body:has(.hero) dialog#dialog #content p,
body:has(.hero) dialog#dialog #content strong,
body:has(.hero) dialog#dialog #content label,
body:has(.hero) dialog#dialog #content small {
  color: #f4f1e8 !important;
}

body:has(.hero) dialog#dialog #content h1,
body:has(.hero) dialog#dialog #content h2,
body:has(.hero) dialog#dialog #content h3 {
  color: #e2c27c !important;
}

body:has(.hero) dialog#dialog .policy-text {
  color: #f4f1e8 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  line-height: 1.8 !important;
  font-size: 15px !important;
}

body:has(.hero) dialog#dialog #close {
  background: #252d38 !important;
  color: #ffffff !important;
  border: 1px solid #c8a45d !important;
  border-radius: 7px !important;
}


/* CORENTRA ADMIN POPUPS — PRODUCT AND PROMO CONTRAST FIX */
body:has(.admin-layout) dialog#dialog {
  background: #14251a !important;
  color: #f1f7f2 !important;
  color-scheme: dark !important;
  border: 1px solid #559568 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.65) !important;
  max-width: 94vw !important;
  max-height: 90vh !important;
  overflow: auto !important;
}

body:has(.admin-layout) dialog#dialog::backdrop {
  background: rgba(0,0,0,.78) !important;
}

body:has(.admin-layout) dialog#dialog #content,
body:has(.admin-layout) dialog#dialog #content * {
  color: #f1f7f2 !important;
}

body:has(.admin-layout) dialog#dialog #content h1,
body:has(.admin-layout) dialog#dialog #content h2,
body:has(.admin-layout) dialog#dialog #content h3,
body:has(.admin-layout) dialog#dialog #content legend,
body:has(.admin-layout) dialog#dialog #content .eyebrow {
  color: #e2c27c !important;
}

body:has(.admin-layout) dialog#dialog #content label,
body:has(.admin-layout) dialog#dialog #content p,
body:has(.admin-layout) dialog#dialog #content small {
  color: #f1f7f2 !important;
}

body:has(.admin-layout) dialog#dialog input,
body:has(.admin-layout) dialog#dialog select,
body:has(.admin-layout) dialog#dialog textarea {
  background: #0b1510 !important;
  color: #ffffff !important;
  border: 1px solid #52745a !important;
  border-radius: 7px !important;
}

body:has(.admin-layout) dialog#dialog input::placeholder,
body:has(.admin-layout) dialog#dialog textarea::placeholder {
  color: #aebdaf !important;
}

body:has(.admin-layout) dialog#dialog fieldset,
body:has(.admin-layout) dialog#dialog .editor-section,
body:has(.admin-layout) dialog#dialog .preview-card {
  background: #192d20 !important;
  color: #f1f7f2 !important;
  border-color: #42684b !important;
}

body:has(.admin-layout) dialog#dialog button {
  background: #203b29 !important;
  color: #ffffff !important;
  border: 1px solid #52745a !important;
  border-radius: 7px !important;
}

body:has(.admin-layout) dialog#dialog button.primary {
  background: #347348 !important;
  color: #ffffff !important;
  border-color: #65a576 !important;
}

body:has(.admin-layout) dialog#dialog .sticky-actions {
  background: #14251a !important;
  border-color: #42684b !important;
}

body:has(.admin-layout) dialog#dialog #close {
  background: #203b29 !important;
  color: #ffffff !important;
  border: 1px solid #559568 !important;
}
