@import url("./styles.css");

@font-face {
  font-family: "Thmanyah Sans";
  src: url("/fonts/thmanyah/ThmanyahSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Thmanyah Sans";
  src: url("/fonts/thmanyah/ThmanyahSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-thmanyah: "Thmanyah Sans", "Cairo", "Inter", system-ui, sans-serif;
  --font-latin: "Inter", "Manrope", "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --surface: #ffffff;
  --surface-soft: #f8f6f1;
  --text-strong: #152033;
  --text-muted-strong: #475569;
  --border-strong: #d8dee9;
}

[hidden] {
  display: none !important;
}

body,
.public-site,
.admin-shell,
.field,
button,
input,
select,
textarea {
  font-family: var(--font-thmanyah);
}

html[lang="en"] body,
html[lang="en"] .public-site,
html[lang="en"] .admin-shell,
html[lang="en"] .field,
html[lang="en"] button,
html[lang="en"] input,
html[lang="en"] select,
html[lang="en"] textarea,
html[lang="es"] body,
html[lang="es"] .public-site,
html[lang="es"] .admin-shell,
html[lang="es"] .field,
html[lang="es"] button,
html[lang="es"] input,
html[lang="es"] select,
html[lang="es"] textarea {
  font-family: var(--font-latin);
}

h1,
h2,
h3,
h4,
.heading-xl,
.heading-lg {
  font-family: var(--font-thmanyah) !important;
  font-weight: 800;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] .heading-xl,
html[lang="en"] .heading-lg,
html[lang="es"] h1,
html[lang="es"] h2,
html[lang="es"] h3,
html[lang="es"] h4,
html[lang="es"] .heading-xl,
html[lang="es"] .heading-lg {
  font-family: var(--font-latin) !important;
}

html[data-theme="dark"],
html[data-admin-theme="dark"] {
  --background: #07182f;
  --foreground: #f8fafc;
  --bg: #07182f;
  --fg: #f8fafc;
  --muted: #cbd5e1;
  --warm: #0d213d;
  --border: rgba(216, 178, 92, .22);
  --surface: #0b2545;
  --surface-soft: #0d213d;
  --text-strong: #f8fafc;
  --text-muted-strong: #dbe4ef;
}

.public-site {
  background: var(--bg);
  color: var(--fg);
  transition: background-color .35s ease, color .35s ease;
  animation: pageFade .35s ease both;
}

@keyframes pageFade {
  from { opacity: .84; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-intro {
  max-width: 36rem;
}

.muted,
.card-luxe p,
.product-desc,
.value-desc,
.projects-note {
  color: var(--text-muted-strong) !important;
}

.card-luxe {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px -28px rgba(6, 24, 49, .55);
}

.card-luxe h3,
.value-title,
.product-title,
.field-label,
.supplier-tag,
.process-item p {
  color: var(--text-strong) !important;
}

.section-lead {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

.header {
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.brand img,
.footer-brand img,
.admin-logo,
.login-logo {
  object-fit: contain;
}

.brand img {
  max-width: 9rem;
}

.theme-toggle {
  width: 2.55rem;
  height: 2.55rem;
  display: inline-grid;
  place-items: center;
  border-radius: .65rem;
  color: var(--navy);
  background: rgba(184, 138, 46, .08);
  border: 1px solid rgba(184, 138, 46, .28);
  transition: transform .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.theme-toggle:hover {
  color: #fff;
  background: var(--navy);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.language-menu {
  position: relative;
  display: inline-flex;
}

.language-options {
  position: absolute;
  z-index: 70;
  inset-block-start: calc(100% + .45rem);
  inset-inline-end: 0;
  min-width: 9.5rem;
  display: grid;
  gap: .25rem;
  padding: .45rem;
  border: 1px solid rgba(184, 138, 46, .28);
  border-radius: .7rem;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 20px 45px -34px rgba(6, 24, 49, .75);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.language-menu.open .language-options,
.language-menu:hover .language-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.language-options a {
  border-radius: .5rem;
  padding: .55rem .65rem;
  font-weight: 800;
  white-space: nowrap;
}

.language-options a:hover,
.language-options a.active {
  background: rgba(184, 138, 46, .12);
  color: var(--navy);
}

.mobile-menu-actions .language-menu,
.mobile-menu-actions .language-menu .lang-toggle {
  width: 100%;
}

.mobile-menu-actions .language-options {
  position: static;
  margin-top: .4rem;
  width: 100%;
}

.mobile-menu {
  position: absolute;
  z-index: 70;
  top: 100%;
  inset-inline: 1rem;
  border: 1px solid var(--border);
  border-radius: .85rem;
  overflow: hidden;
  box-shadow: 0 24px 60px -42px rgba(6, 24, 49, .65);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  display: block;
  transition: opacity .25s ease, transform .25s ease, background-color .25s ease, border-color .25s ease;
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(.6rem);
  pointer-events: auto;
}

.mobile-action {
  min-height: 2.75rem;
  justify-content: center;
}

@media (max-width: 1023px) {
  .header-actions {
    display: flex;
    margin-inline-start: auto;
  }
  .header-actions .btn-primary {
    display: none;
  }
}

html[data-theme="dark"] .header {
  background: rgba(7, 24, 47, .92);
  border-color: rgba(216, 178, 92, .2);
}

html[data-theme="dark"] .header .brand {
  background: #fff;
  border-radius: .55rem;
  box-shadow: 0 12px 28px -22px rgba(0, 0, 0, .75);
  padding: .12rem .22rem;
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .lang-toggle,
html[data-theme="dark"] .menu-btn,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .heading-lg,
html[data-theme="dark"] .heading-xl,
html[data-theme="dark"] .product-title {
  color: #f8fafc;
}

html[data-theme="dark"] .mobile-menu,
html[data-theme="dark"] .card-luxe,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .project-tag,
html[data-theme="dark"] .filter-tabs button {
  background: #0b2545;
  border-color: rgba(216, 178, 92, .24);
}

html[data-theme="dark"] .bg-warm {
  background: #0d213d;
}

html[data-theme="dark"] .field {
  background: #07182f;
  color: #f8fafc;
  border-color: rgba(216, 178, 92, .28);
}

.btn-primary,
.btn-ghost,
.btn-on-dark,
.floating-btn,
.admin-btn {
  will-change: transform;
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-on-dark:hover,
.floating-btn:hover,
.admin-btn:hover {
  transform: translateY(-2px);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.product-media img,
.about-img-wrap img,
.gallery-item img {
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .35s ease;
}

.product-media:hover img,
.about-img-wrap:hover img {
  transform: scale(1.025);
}

.product-features li::before {
  content: "✓";
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2rem;
}

.filter-tabs button {
  border: 1px solid rgba(184, 138, 46, .45);
  border-radius: 999px;
  padding: .6rem 1rem;
  color: var(--text-strong);
  background: #fff;
  font-weight: 700;
  transition: all .25s ease;
}

.filter-tabs button.active,
.filter-tabs button:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--gold);
}

.filter-card.is-hidden {
  display: none;
}

.gallery-item .label .desc {
  margin-top: .35rem;
  color: rgba(255, 255, 255, .78);
  font-size: .82rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-floating-actions {
  position: fixed;
  z-index: 80;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: grid;
  gap: .55rem;
}

[dir="rtl"] .site-floating-actions {
  right: auto;
  left: max(1rem, env(safe-area-inset-left));
}

.floating-btn {
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: .75rem;
  color: #fff;
  background: linear-gradient(135deg, #0b2545, #061831);
  border: 1px solid rgba(216, 178, 92, .4);
  box-shadow: 0 18px 34px -24px #061831;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .25s ease;
}

.floating-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.contact-section {
  background: linear-gradient(180deg, #fff 0%, #f8f6f1 100%);
}

html[data-theme="dark"] .contact-section {
  background: linear-gradient(180deg, #07182f 0%, #0d213d 100%);
}

.enhanced-form {
  box-shadow: 0 22px 60px -42px rgba(6, 24, 49, .7);
}

.required-badge {
  color: var(--text-muted-strong);
  font-size: .72rem;
  font-weight: 800;
  margin-inline-start: .35rem;
}

.required-badge span {
  color: #dc2626;
  margin-inline-end: .15rem;
}

.field-error {
  color: #dc2626;
  display: block;
  font-size: .82rem;
  font-weight: 700;
  margin-top: .45rem;
  animation: fieldErrorIn .22s ease both;
}

.field-group.has-error .field,
.field-group.has-error .select-trigger {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .11);
}

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

.select-group {
  isolation: isolate;
  position: relative;
  z-index: 18;
}

.select-trigger {
  align-items: center;
  display: flex;
  justify-content: space-between;
  text-align: inherit;
  width: 100%;
  min-height: 3.15rem;
  padding-inline: 1rem;
}

.select-trigger.is-placeholder {
  color: var(--text-muted-strong);
}

.select-chevron {
  color: #b88a2e;
  font-weight: 900;
  transition: transform .22s ease;
}

.select-trigger.is-open .select-chevron {
  transform: rotate(180deg);
}

.select-menu {
  background: var(--surface);
  border: 1px solid rgba(184, 138, 46, .25);
  border-radius: .75rem;
  box-shadow: 0 22px 55px -34px rgba(4, 23, 48, .7);
  display: grid;
  gap: .2rem;
  inset-inline: 0;
  margin-top: .35rem;
  max-height: 16rem;
  min-width: 100%;
  opacity: 0;
  overflow: auto;
  padding: .35rem;
  pointer-events: none;
  position: absolute;
  top: 100%;
  transform: translateY(-5px) scale(.985);
  transform-origin: top;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  visibility: hidden;
  z-index: 12;
}

.select-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.select-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: .55rem;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-height: 2.7rem;
  padding: .7rem .8rem;
  text-align: inherit;
  width: 100%;
}

.select-option:hover,
.select-option[aria-selected="true"] {
  background: rgba(184, 138, 46, .13);
  color: #8a641e;
}

.select-option[aria-selected="true"]::after {
  content: "✓";
  color: #b88a2e;
  font-weight: 900;
}

.conditional-field {
  animation: fieldReveal .24s ease both;
}

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

.site-modal-backdrop,
.admin-modal-backdrop {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 24, 49, .58);
  backdrop-filter: blur(10px);
  animation: adminFadeIn .2s ease both;
}

.site-access-modal,
.admin-modal {
  position: relative;
  width: min(100%, 28rem);
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(216, 178, 92, .34);
  border-radius: .9rem;
  background: var(--surface);
  color: var(--text-strong);
  padding: 1.55rem;
  box-shadow: 0 30px 70px -42px rgba(6, 24, 49, .85);
  animation: adminModalIn .28s cubic-bezier(.2, .8, .2, 1) both;
}

.site-access-modal h2,
.admin-modal h2 {
  color: var(--text-strong);
  font-size: 1.35rem;
  font-weight: 900;
}

.site-access-modal p,
.admin-modal p {
  color: var(--text-muted-strong);
  line-height: 1.8;
}

.site-access-modal label {
  display: grid;
  gap: .4rem;
  font-weight: 800;
}

.site-access-modal input {
  width: 100%;
  border: 1px solid rgba(184, 138, 46, .28);
  border-radius: .6rem;
  padding: .8rem .9rem;
  color: var(--text-strong);
  background: var(--surface-soft);
  font: inherit;
  text-align: center;
}

.site-modal-close,
.admin-modal-close {
  position: absolute;
  inset-block-start: .75rem;
  inset-inline-end: .75rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: .5rem;
  color: var(--text-muted-strong);
}

.site-access-icon,
.admin-modal-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: .75rem;
  color: #f8fafc;
  background: linear-gradient(135deg, #b88a2e, #8c641b);
}

.site-access-error,
.site-access-ok {
  border-radius: .55rem;
  padding: .7rem .85rem;
  font-weight: 800;
  animation: fieldErrorIn .22s ease both;
}

.site-access-error {
  background: #fef2f2;
  color: #991b1b !important;
}

.site-access-ok {
  background: #ecfdf3;
  color: #166534 !important;
}

html.admin-access-granted .public-site,
html.login-leaving body {
  animation: loginLeave .42s ease both;
}

@keyframes loginLeave {
  to { opacity: 0; transform: translateY(8px); }
}

@keyframes adminFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes adminModalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: hover) {
  .product:hover {
    transform: none;
    box-shadow: 0 18px 48px -42px rgba(5, 24, 49, .55);
  }
  .product .product-media:hover {
    transform: translateY(-2px);
  }
  .card-luxe:hover,
  .why-item:hover,
  .gallery-item:hover,
  .supplier-tag:hover,
  .process-item:hover {
    transform: translateY(-4px) scale(1.012);
    box-shadow: 0 26px 68px -42px rgba(5, 24, 49, .72), 0 0 0 1px rgba(216, 178, 92, .18);
  }
}

.footer-brand {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 46px -34px rgba(0, 0, 0, .8);
  display: inline-flex;
  padding: .55rem .8rem;
}

.footer-social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.2rem;
}

.footer-social-link {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(216, 178, 92, .24);
  border-radius: .75rem;
  color: #fff;
  display: inline-flex;
  gap: .45rem;
  min-height: 2.55rem;
  padding: .55rem .72rem;
  transition: transform .22s ease, background-color .22s ease, border-color .22s ease, color .22s ease;
}

.admin-shell {
  min-height: 100vh;
  background: #f5f7fb;
  color: #172033;
  transition: background-color .3s ease, color .3s ease;
}

@media (min-width: 1024px) {
  .admin-shell {
    display: grid;
    grid-template-columns: minmax(15rem, 17rem) 1fr;
  }
}

.admin-sidebar {
  background: radial-gradient(circle at 20% 0%, rgba(216, 178, 92, .18), transparent 16rem), #061831;
  color: rgba(255, 255, 255, .86);
  min-height: 100vh;
  padding: 1.25rem;
  position: sticky;
  top: 0;
  box-shadow: 20px 0 60px -50px rgba(6, 24, 49, .8);
}

.admin-nav {
  display: grid;
  gap: .25rem;
}

.admin-sidebar a,
.admin-sidebar button,
.admin-section-tabs a {
  display: block;
  width: 100%;
  border-radius: .5rem;
  padding: .7rem .85rem;
  text-align: start;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.admin-sidebar a:hover,
.admin-sidebar button:hover {
  background: rgba(216, 178, 92, .14);
  color: #fff;
  transform: translateX(-2px);
}

[dir="rtl"] .admin-sidebar a:hover,
[dir="rtl"] .admin-sidebar button:hover {
  transform: translateX(2px);
}

.admin-user-block {
  color: #d8b25c;
  margin-bottom: 1.5rem;
}

.admin-main {
  padding: 1.5rem;
}

.admin-card {
  background: #fff;
  border: 1px solid #e1e6ef;
  border-radius: .75rem;
  box-shadow: 0 14px 36px -28px rgba(6, 24, 49, .6);
  padding: 1.25rem;
}

.admin-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .admin-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .admin-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.admin-title {
  color: #0b2545;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e1e6ef;
  padding: .75rem;
  text-align: start;
  vertical-align: top;
}

.admin-form {
  display: grid;
  gap: 1rem;
}

.admin-form label {
  display: grid;
  gap: .35rem;
  color: #334155;
  font-weight: 600;
}

.admin-form label.full {
  grid-column: 1 / -1;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-card input,
.admin-card select,
.admin-card textarea {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: .5rem;
  padding: .75rem .85rem;
  color: #172033;
  background: #fff;
  font: inherit;
}

.admin-form textarea {
  min-height: 8rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  background: #0b2545;
  color: #fff;
  padding: .7rem 1rem;
  font-weight: 700;
}

.admin-btn.secondary {
  background: #b88a2e;
}

.admin-btn.ghost {
  background: #eef2f8;
  color: #0b2545;
}

.admin-btn.danger {
  background: #991b1b;
  color: #fff;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  background: #eef2f8;
  color: #0b2545;
  padding: .2rem .55rem;
  font-size: .8rem;
  font-weight: 700;
}

.badge.danger {
  background: #fef2f2;
  color: #991b1b;
}

.public-message {
  border-radius: .5rem;
  padding: .75rem 1rem;
  margin-top: .75rem;
  font-weight: 700;
}

.public-message.ok {
  background: #ecfdf3;
  color: #166534;
}

.public-message.err {
  background: #fef2f2;
  color: #991b1b;
}

.admin-topbar {
  background: rgba(255, 255, 255, .82);
  border: 1px solid #e1e6ef;
  border-radius: .9rem;
  padding: .85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(12px);
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid #d7deea;
  background: #fff;
  color: #0b2545;
  border-radius: .55rem;
  padding: .55rem .75rem;
  font-weight: 800;
}

.admin-toast {
  position: fixed;
  z-index: 120;
  top: max(1rem, env(safe-area-inset-top));
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  border: 1px solid rgba(216, 178, 92, .34);
  border-radius: .95rem;
  padding: .95rem 1.1rem;
  background: rgba(255, 255, 255, .94);
  color: #0b2545;
  box-shadow: 0 22px 48px -32px rgba(6, 24, 49, .65);
  backdrop-filter: blur(12px);
  animation: adminToastIn .36s cubic-bezier(.2, .8, .2, 1) both;
  font-weight: 800;
}

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

.admin-page-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-switch-row {
  align-items: center !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  gap: 1rem !important;
}

.admin-switch {
  display: inline-flex;
  position: relative;
}

.admin-switch input {
  opacity: 0;
  position: absolute;
}

.admin-switch span {
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  height: 1.65rem;
  position: relative;
  transition: background .22s ease;
  width: 3rem;
}

.admin-switch span::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .22);
  content: "";
  height: 1.22rem;
  inset-block-start: .215rem;
  inset-inline-start: .22rem;
  position: absolute;
  transition: transform .22s ease;
  width: 1.22rem;
}

.admin-switch input:checked + span {
  background: #b88a2e;
}

.admin-switch input:checked + span::after {
  transform: translateX(1.35rem);
}

html[dir="rtl"] .admin-switch input:checked + span::after {
  transform: translateX(-1.35rem);
}

.admin-section-tabs {
  background: rgba(255, 255, 255, .86);
  border: 1px solid #e4e9f2;
  border-radius: .85rem;
  display: grid;
  gap: .35rem;
  padding: .55rem;
  position: sticky;
  top: 1rem;
}

.admin-section-tabs a:hover,
.admin-section-tabs a.active {
  background: rgba(184, 138, 46, .13);
  color: #0b2545;
}

.admin-home-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 980px) {
  .admin-home-layout {
    grid-template-columns: minmax(13rem, 18rem) 1fr;
    align-items: start;
  }
}

.code-editor {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  min-height: 15rem;
}

.sticky-save {
  bottom: 1rem;
  position: sticky;
  z-index: 3;
}

.admin-sidebar-action.public {
  border: 1px solid rgba(216, 178, 92, .48);
  background: rgba(216, 178, 92, .1);
  color: #f6d681;
  font-weight: 900;
}

.admin-sidebar-action.public::before {
  content: "↗";
  margin-inline-end: .45rem;
}

.admin-sidebar-action.logout {
  border: 1px solid rgba(248, 113, 113, .38);
  background: rgba(127, 29, 29, .64);
  color: #fee2e2;
  font-weight: 900;
}

.admin-sidebar-action.logout::before {
  content: "↵";
  margin-inline-end: .45rem;
}

.admin-permissions-panel {
  border: 1px dashed rgba(184, 138, 46, .36);
  border-radius: .75rem;
  padding: 1rem;
  background: #fbfaf7;
}

.admin-permissions-grid {
  display: grid;
  gap: .65rem;
}

@media (min-width: 760px) {
  .admin-permissions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-check {
  display: flex !important;
  align-items: flex-start;
  gap: .65rem !important;
  border: 1px solid #e1e6ef;
  border-radius: .65rem;
  padding: .7rem;
  background: #fff;
}

.admin-check input {
  width: 1rem !important;
  margin-top: .25rem;
  accent-color: #b88a2e;
}

.admin-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: radial-gradient(circle at 20% 10%, rgba(184, 138, 46, .16), transparent 28rem), linear-gradient(135deg, #f8f6f1, #eef2f8);
  position: relative;
  overflow: hidden;
}

.login-card {
  position: relative;
  width: min(100%, 28rem);
  padding: 2rem;
  animation: adminModalIn .45s cubic-bezier(.2, .8, .2, 1) both;
}

.login-logo {
  width: 12rem;
  height: 4.5rem;
  margin: 0 auto;
}

.login-brand-block {
  text-align: center;
}

.login-brand-block h1 {
  color: #0b2545;
  margin-top: 1rem;
}

.login-brand-block p {
  color: #475569;
  margin: .6rem 0 1.2rem;
}

.login-switches {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.login-field {
  display: grid;
  gap: .35rem;
  margin-top: .8rem;
  font-weight: 800;
}

.login-security-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: .65rem;
  color: #b88a2e;
  background: rgba(184, 138, 46, .1);
}

.login-submit {
  width: 100%;
  margin-top: 1rem;
}

html[data-admin-theme="dark"] .admin-shell {
  background: #07182f;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-card,
html[data-admin-theme="dark"] .admin-topbar,
html[data-admin-theme="dark"] .admin-section-tabs,
html[data-admin-theme="dark"] .admin-permissions-panel {
  background: #0b2545;
  border-color: rgba(216, 178, 92, .22);
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-title,
html[data-admin-theme="dark"] .login-brand-block h1 {
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-form label,
html[data-admin-theme="dark"] .admin-table th,
html[data-admin-theme="dark"] .admin-table td,
html[data-admin-theme="dark"] .login-brand-block p {
  color: #dbe4ef;
}

html[data-admin-theme="dark"] .admin-form input,
html[data-admin-theme="dark"] .admin-form select,
html[data-admin-theme="dark"] .admin-form textarea,
html[data-admin-theme="dark"] .admin-card input,
html[data-admin-theme="dark"] .admin-card select,
html[data-admin-theme="dark"] .admin-card textarea {
  background: #07182f;
  color: #f8fafc;
  border-color: rgba(216, 178, 92, .28);
}

html[data-admin-theme="dark"] .admin-login-shell {
  background: radial-gradient(circle at 80% 0%, rgba(216, 178, 92, .12), transparent 28rem), #07182f;
}

@media (max-width: 760px) {
  .brand img { width: 6.2rem; height: 3rem; }
  .select-menu { position: absolute; top: 100%; }
  .admin-section-tabs { position: static; }
  .admin-page-head { flex-direction: column; }
  .admin-table { display: block; overflow-x: auto; }
}

@media (max-width: 520px) {
  .admin-login-shell { padding: 1rem; }
  .login-card { padding: 1.35rem; }
}
