:root {
  --bg: #fbf8f2;
  --surface: #ffffff;
  --surface-soft: #f7efe3;
  --wood: #d7ad77;
  --wood-deep: #8f5f33;
  --wood-light: #ead4b6;
  --ink: #2b2118;
  --muted: #827260;
  --line: #efe3d2;
  --shadow: 0 10px 30px rgba(83, 55, 28, 0.1);
  --radius: 18px;
  --project-image-height: 190px;
}

:root[data-runtime-theme] {
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Tahoma, Arial, sans-serif;
}

body.fullscreen-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.screen {
  display: none;
  min-height: 100dvh;
  padding: 18px 16px 92px;
}

.screen.active {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, #d9b17a 0 9px, #c99860 9px 18px);
  box-shadow: var(--shadow);
  position: relative;
}

.brand-mark::after {
  content: "";
  width: 18px;
  height: 18px;
  border-right: 4px solid #fffaf2;
  border-bottom: 4px solid #fffaf2;
  position: absolute;
  top: 10px;
  left: 10px;
  transform: rotate(45deg);
}

.brand-name {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}

.page-heading {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.brand-slogan {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--wood-deep);
  box-shadow: 0 8px 24px rgba(83, 55, 28, 0.08);
  display: grid;
  place-items: center;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.search {
  position: relative;
  margin-bottom: 14px;
}

.search svg {
  width: 19px;
  height: 19px;
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  padding: 0 46px 0 16px;
  box-shadow: 0 8px 22px rgba(83, 55, 28, 0.05);
}

.search input::placeholder {
  color: #a79784;
}

html[dir="ltr"] .search svg {
  right: auto;
  left: 15px;
}

html[dir="ltr"] .search input {
  padding: 0 16px 0 46px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 12px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 13px;
  white-space: nowrap;
  box-shadow: 0 5px 16px rgba(83, 55, 28, 0.04);
}

.chip.active {
  border-color: transparent;
  background: var(--wood-deep);
  color: #fffaf2;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.section-title button {
  border: 0;
  background: transparent;
  color: var(--wood-deep);
  padding: 6px;
}

.dashboard-subtitle {
  margin: 6px 0 10px;
  font-size: 15px;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 11px;
  text-align: right;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.project-card:active {
  transform: scale(0.99);
}

.project-card-wrap {
  display: grid;
  gap: 7px;
}

.card-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.card-quick-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--wood-deep);
}

.project-media {
  height: var(--project-image-height);
  min-height: var(--project-image-height);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-soft);
  position: relative;
}

.project-media img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 1;
}

.project-media.home-media img {
  object-fit: contain;
  padding: 6px;
  background: #fffaf2;
}

.project-media.discover-media img {
  object-fit: contain;
  padding: 0;
  background: #fffaf2;
}

.project-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, rgba(155, 107, 61, 0.18) 0 10px, rgba(255, 255, 255, 0.14) 10px 20px);
}

.visual {
  position: absolute;
  inset: 0;
}

.visual::before,
.visual::after,
.visual span {
  content: "";
  position: absolute;
  display: block;
  border-radius: 8px;
  background: linear-gradient(180deg, #eac38d, #bd8250);
  box-shadow: 0 8px 16px rgba(83, 55, 28, 0.18);
}

.visual-coffee::before {
  width: 66px;
  height: 56px;
  right: 26px;
  bottom: 24px;
}

.visual-coffee::after {
  width: 74px;
  height: 9px;
  right: 22px;
  bottom: 80px;
  background: #9b6b3d;
}

.visual-coffee span {
  width: 18px;
  height: 30px;
  right: 40px;
  bottom: 48px;
  background: #fff8ec;
}

.visual-nightstand::before {
  width: 68px;
  height: 68px;
  right: 24px;
  bottom: 22px;
}

.visual-nightstand::after {
  width: 54px;
  height: 6px;
  right: 31px;
  bottom: 58px;
  background: #8d5f35;
}

.visual-nightstand span {
  width: 10px;
  height: 10px;
  right: 52px;
  bottom: 43px;
  border-radius: 50%;
  background: #fffaf2;
}

.visual-library::before {
  width: 78px;
  height: 72px;
  right: 20px;
  bottom: 22px;
  background: linear-gradient(180deg, #e5bb82, #ad7343);
}

.visual-library::after {
  width: 64px;
  height: 7px;
  right: 27px;
  bottom: 48px;
  background: #8f6139;
  box-shadow: 0 -22px 0 #8f6139, 0 22px 0 #8f6139;
}

.visual-library span {
  width: 7px;
  height: 58px;
  right: 56px;
  bottom: 29px;
  border-radius: 4px;
  background: #f9ead5;
}

.visual-kitchen::before {
  width: 86px;
  height: 62px;
  right: 16px;
  bottom: 24px;
}

.visual-kitchen::after {
  width: 86px;
  height: 8px;
  right: 16px;
  bottom: 60px;
  background: #8d5f35;
}

.visual-kitchen span {
  width: 20px;
  height: 36px;
  right: 50px;
  bottom: 24px;
  background: #fff8ec;
}

.project-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.project-info h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.project-info p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}

.metric-box {
  min-height: 48px;
  border-radius: 13px;
  background: var(--surface-soft);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.metric-box small {
  color: var(--muted);
  font-size: 11px;
}

.metric-box strong {
  color: var(--ink);
  font-size: 13px;
}

.sale-price {
  color: var(--wood-deep);
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  margin-bottom: 10px;
}

.card-action {
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--wood-deep);
  padding: 8px 12px;
  font-size: 13px;
}

.home-project-card {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
}

.home-project-card .home-media {
  flex: 0 0 42%;
  width: 42%;
  height: 172px;
  min-height: 172px;
  border-radius: 14px;
}

.home-project-card .project-info {
  flex: 1 1 auto;
  min-width: 0;
}

.home-project-card .project-info h3 {
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 5px;
}

.home-project-card .project-info p {
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.home-project-card .card-metrics {
  gap: 6px;
  margin-bottom: 7px;
}

.home-project-card .metric-box {
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 11px;
}

.home-project-card .metric-box small {
  font-size: 10px;
}

.home-project-card .metric-box strong {
  font-size: 12px;
}

.home-project-card .sale-price {
  margin-bottom: 8px;
}

.home-project-card .card-action {
  padding: 7px 11px;
  font-size: 12px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.page-header h1 {
  margin: 0;
  font-size: 22px;
}

.page-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-header .icon-button {
  flex: 0 0 auto;
}

.header-menu {
  flex: 0 0 auto;
}

.screen-back {
  flex: 0 0 auto;
}

.language-toggle {
  width: auto;
  min-width: 42px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.side-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(43, 33, 24, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.side-drawer-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(82vw, 330px);
  background: #fffdf8;
  border-left: 1px solid var(--line);
  box-shadow: -14px 0 34px rgba(43, 33, 24, 0.14);
  padding: 18px;
  transform: translateX(105%);
  transition: transform 0.2s ease;
  display: grid;
  align-content: start;
  gap: 14px;
}

.side-drawer.show {
  transform: translateX(0);
}

.side-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.side-drawer-title {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}

.side-drawer-nav {
  display: grid;
  gap: 8px;
}

.side-drawer-link {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px;
  font: inherit;
  text-align: start;
}

.converter-grid {
  display: grid;
  gap: 12px;
}

.converter-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 13px;
}

.converter-card h2 {
  margin: 0;
  font-size: 17px;
}

.converter-result {
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--wood-deep);
  padding: 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.converter-ref-list,
.converter-history,
.thickness-list {
  display: grid;
  gap: 8px;
}

.thickness-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.thickness-item,
.converter-ref-item,
.converter-history-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
  color: var(--ink);
  padding: 10px;
  text-align: start;
  line-height: 1.5;
}

.thickness-item strong,
.converter-ref-item strong,
.converter-history-item strong {
  display: block;
  color: var(--wood-deep);
}

.side-drawer-separator {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.discover-feed,
.workshop-list,
.story-sections,
.similar-list {
  display: grid;
  gap: 14px;
}

.discover-card {
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.discover-card .project-media {
  height: 470px;
  min-height: 470px;
  border-radius: 0;
}

.discover-overlay {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 2;
  display: grid;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.discover-card:hover .discover-overlay,
.discover-card:focus-within .discover-overlay,
.discover-card.reveal .discover-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.discover-title {
  width: fit-content;
  max-width: 100%;
  border-radius: 16px;
  background: rgba(43, 33, 24, 0.56);
  color: #fffaf2;
  padding: 9px 12px;
  backdrop-filter: blur(8px);
}

.discover-title h2 {
  margin: 0;
  font-size: 17px;
}

.discover-title p {
  margin: 5px 0 0;
  color: #fffaf2;
  font-size: 12px;
  font-weight: 700;
}

.discover-actions,
.story-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.discover-actions .secondary-button,
.story-actions .secondary-button {
  min-width: 0;
  background: rgba(255, 255, 255, 0.92);
}

.workshop-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: right;
  color: inherit;
  padding: 0;
}

.workshop-card .project-media {
  border-radius: 0;
  height: 210px;
  min-height: 210px;
}

.workshop-card-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.workshop-card-body h2,
.story-section h2 {
  margin: 0;
  font-size: 17px;
}

.workshop-card-body p,
.story-lead,
.story-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
}

.story-hero {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 3;
  max-height: 560px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.story-title {
  margin: 0 0 7px;
  font-size: 25px;
}

.story-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px;
  box-shadow: 0 8px 22px rgba(83, 55, 28, 0.05);
}

.story-gallery {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.story-gallery img {
  width: 138px;
  height: 110px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 auto;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.story-author strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.story-rich-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  position: sticky;
  top: 8px;
  z-index: 8;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  padding: 8px;
  box-shadow: 0 10px 22px rgba(83, 55, 28, 0.08);
  backdrop-filter: blur(10px);
}

.story-toolbar-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 52px repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.story-toolbar-controls button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--wood-deep);
  font-size: 11px;
  font-weight: 900;
}

.story-toolbar-controls button.active {
  background: var(--wood-soft);
  border-color: rgba(169, 124, 80, 0.55);
}

.story-toolbar-drag {
  cursor: grab;
  touch-action: none;
}

.story-toolbar-drag:active {
  cursor: grabbing;
}

.story-rich-toolbar .secondary-button,
.story-rich-toolbar .compact-select,
.story-rich-toolbar summary {
  min-width: 0;
  width: 100%;
}

.story-rich-toolbar.is-floating {
  position: fixed;
  width: min(390px, calc(100vw - 24px));
  max-height: 46vh;
  overflow-y: auto;
}

.story-rich-toolbar.is-bottom,
.story-rich-toolbar.is-free {
  position: fixed;
  z-index: 30;
  width: min(390px, calc(100vw - 24px));
  max-height: 46vh;
  overflow-y: auto;
}

.story-rich-toolbar.is-bottom {
  inset: auto 12px 12px auto;
}

.story-rich-toolbar[data-runtime-position] {
}

.story-image-marker {
  display: inline-block;
  width: 0;
  height: 0;
  overflow: hidden;
}

.story-tool-menu {
  position: relative;
}

.story-tool-menu summary {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--wood-deep);
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.story-tool-menu summary::-webkit-details-marker {
  display: none;
}

.story-tool-menu[open] {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.story-tool-menu[open] summary {
  grid-column: 1 / -1;
}

.story-tool-menu button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--wood-deep);
  font-weight: 800;
}

.story-rich-editor,
.story-rich-content {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf8;
  padding: 14px;
  line-height: 1.9;
  color: var(--ink);
}

.story-rich-editor {
  min-height: 330px;
  outline: none;
}

.story-rich-editor:empty::before {
  content: "اكتب القصة هنا...";
  color: var(--muted);
}

.story-rich-editor h2,
.story-rich-content h2 {
  margin: 12px 0 8px;
  font-size: 20px;
}

.story-rich-editor p,
.story-rich-content p {
  margin: 8px 0;
}

.story-rich-editor ul,
.story-rich-editor ol,
.story-rich-content ul,
.story-rich-content ol {
  padding-inline-start: 22px;
  margin: 10px 0;
}

.story-rich-editor blockquote,
.story-rich-content blockquote {
  margin: 12px 0;
  border-inline-start: 4px solid var(--wood);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 10px 12px;
  color: var(--wood-deep);
}

.story-rich-editor figure,
.story-rich-content figure {
  margin: 12px 0;
}

.story-rich-editor img,
.story-rich-content img,
.story-content-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(83, 55, 28, 0.05);
}

.story-rich-editor figcaption,
.story-rich-content figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.story-align-start {
  text-align: start;
}

.story-align-end {
  text-align: end;
}

.story-align-left {
  text-align: left;
}

.story-align-right {
  text-align: right;
}

.story-align-center {
  text-align: center;
}

.story-align-justify {
  text-align: justify;
}

.story-content-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--wood-deep);
  padding: 12px;
  font-weight: 800;
  text-decoration: none;
}

.detail-hero {
  height: clamp(340px, 66dvh, 620px);
  border-radius: 24px;
  margin: 0;
  box-shadow: var(--shadow);
  background: #fffaf2;
}

.detail-hero.is-paid-preview::after {
  content: "NajjaR · معاينة";
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(43, 33, 24, 0.7);
  color: #fff;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.detail-hero.is-paid-locked {
  display: grid;
  place-items: center;
  background: #f8f1e7;
}

.paid-content-lock {
  width: min(82%, 360px);
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: var(--ink);
}

.paid-content-lock p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.7;
}

.paid-lock-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--wood-deep);
  box-shadow: 0 10px 24px rgba(83, 55, 28, 0.1);
}

.paid-lock-icon svg {
  width: 27px;
  height: 27px;
}

.detail-hero img {
  object-fit: contain;
  object-position: center;
  background: #fffaf2;
  transition: opacity 0.18s ease;
}

.detail-hero.is-loading img {
  opacity: 0;
}

.gallery-loading-skeleton {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #f7efe3 25%, #fffaf2 42%, #f7efe3 62%);
  background-size: 240% 100%;
  animation: gallery-loading 1.2s ease-in-out infinite;
}

@keyframes gallery-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.detail-gallery {
  position: relative;
  margin: 8px 0 10px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.detail-gallery.is-dragging {
  cursor: grabbing;
}

.gallery-arrow {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wood-deep);
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  box-shadow: 0 8px 20px rgba(83, 55, 28, 0.14);
}

.gallery-arrow svg {
  width: 20px;
  height: 20px;
}

.gallery-arrow:disabled,
.secondary-button:disabled {
  opacity: 0.38;
}

.gallery-arrow-right {
  right: 10px;
}

.gallery-arrow-left {
  left: 10px;
}

.gallery-counter {
  min-width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(43, 33, 24, 0.68);
  color: #fffaf2;
  display: grid;
  place-items: center;
  font-size: 12px;
  padding: 0 9px;
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  direction: ltr;
  unicode-bidi: isolate;
}

.gallery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.gallery-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.secondary-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--wood-deep);
  padding: 0 13px;
  box-shadow: 0 7px 18px rgba(83, 55, 28, 0.06);
}

.gallery-empty {
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  color: var(--muted);
  padding: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.gallery-thumbs,
.draft-previews {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar,
.draft-previews::-webkit-scrollbar {
  display: none;
}

.thumb {
  width: 58px;
  height: 58px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}

.thumb.active {
  border-color: var(--wood);
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.locked-thumb {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border-color: var(--line);
  background: #f6eee2;
  color: var(--wood-deep);
}

.locked-thumb strong {
  font-size: 15px;
  line-height: 1;
}

.locked-thumb small {
  font-size: 9px;
  font-weight: 800;
}

.detail-title {
  margin: 0 0 8px;
  font-size: 24px;
}

.detail-desc {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.primary-button {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--wood-deep);
  color: #fffaf2;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 14px 28px rgba(114, 73, 34, 0.22);
}

.primary-button svg {
  width: 20px;
  height: 20px;
}

.project-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0 12px;
}

.section-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  box-shadow: 0 7px 20px rgba(83, 55, 28, 0.06);
}

.section-button.active {
  border-color: transparent;
  background: var(--wood-deep);
  color: #fffaf2;
}

.section-button.is-locked:not(.active) {
  border-style: dashed;
  background: #fbf6ee;
}

.section-button.is-locked .section-count {
  width: auto;
  min-width: 25px;
  padding: 0 7px;
  white-space: nowrap;
}

.section-count {
  min-width: 25px;
  height: 25px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--wood-deep);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.section-button.active .section-count {
  background: rgba(255, 255, 255, 0.28);
  color: #fffaf2;
}

.form {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--ink);
  font-size: 14px;
}

.field input,
.field select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  box-shadow: 0 8px 22px rgba(83, 55, 28, 0.05);
}

.upload {
  min-height: 74px;
  border: 1px dashed #d5b68e;
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

.upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload strong {
  color: var(--ink);
  font-size: 15px;
  position: relative;
  z-index: 1;
}

.upload-status {
  max-width: 128px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
}

.section-uploads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.section-uploads .upload {
  min-height: 86px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}

.section-uploads .upload-status {
  max-width: 100%;
}

.draft-previews {
  display: none;
  flex-wrap: wrap;
  overflow-x: visible;
  padding-bottom: 0;
}

.draft-previews.has-items {
  display: flex;
}

.draft-thumb {
  width: calc(33.333% - 6px);
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 7px;
  box-shadow: 0 7px 18px rgba(83, 55, 28, 0.06);
  position: relative;
}

.draft-thumb img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.draft-thumb span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(43, 33, 24, 0.78);
  color: #fffaf2;
  display: grid;
  place-items: center;
  position: absolute;
  top: 11px;
  left: 11px;
}

.upload svg {
  width: 23px;
  height: 23px;
  color: var(--wood-deep);
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 13px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--wood-deep);
  color: #fffaf2;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.profile h2,
.member-profile h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.profile p,
.member-profile p,
.saved-item span,
.setting-row span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.saved-list,
.settings-list {
  display: grid;
  gap: 9px;
}

.legal-content {
  display: grid;
  gap: 12px;
  color: var(--ink);
  line-height: 1.8;
  font-size: 14px;
}

.legal-content p {
  margin: 0;
  white-space: pre-line;
}

.legal-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.knowledge-table-wrap {
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.knowledge-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.knowledge-table th,
.knowledge-table td {
  border-bottom: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
  padding: 9px;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.knowledge-table th:first-child,
.knowledge-table td:first-child {
  border-inline-start: 0;
}

.knowledge-table th {
  background: var(--surface-soft);
  color: var(--wood-deep);
  font-weight: 800;
}

.knowledge-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
}

.knowledge-table.is-compact {
  font-size: 11px;
}

.knowledge-table.is-compact th,
.knowledge-table.is-compact td {
  padding: 6px 4px;
}

.knowledge-table.is-compact input {
  padding: 6px 5px;
  font-size: 11px;
}

.knowledge-table.is-ultra-compact {
  font-size: 9px;
}

.knowledge-table.is-ultra-compact th,
.knowledge-table.is-ultra-compact td {
  padding: 4px 2px;
}

.knowledge-table.is-ultra-compact input {
  padding: 5px 3px;
  font-size: 9px;
}

.knowledge-column-tools,
.knowledge-row-tools {
  display: grid;
  gap: 6px;
}

.knowledge-mini-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--wood-deep);
  font-size: 11px;
  font-weight: 800;
}

.knowledge-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-toolbar {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.knowledge-toolbar input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
}

.materials-source-footer {
  margin: 18px 0 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-soft) 82%, #fff);
  box-shadow: 0 10px 26px rgba(60, 42, 25, 0.07);
}

.materials-source-footer h2 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--wood-deep);
}

.materials-source-footer p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.saved-item,
.setting-row {
  min-height: 48px;
  border-radius: 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.setting-row button,
.logout {
  border: 0;
  background: transparent;
  color: var(--wood-deep);
}

.dashboard-form {
  display: grid;
  gap: 10px;
}

.compact-input,
.compact-select,
.compact-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  padding: 10px 12px;
}

.compact-input,
.compact-select {
  min-height: 44px;
}

.compact-textarea {
  min-height: 78px;
  resize: vertical;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-grid label,
.settings-toggle {
  display: grid;
  gap: 6px;
}

.settings-toggle {
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.settings-toggle input {
  width: 20px;
  height: 20px;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-profile-main {
  min-width: 0;
  flex: 1;
}

.member-profile-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-top-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dashboard-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-menu-button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
}

.dashboard-menu-button.active {
  border-color: var(--wood);
  background: #fffaf2;
  color: var(--wood-deep);
}

.danger-button {
  min-height: 44px;
  border: 1px solid #e7c4b8;
  border-radius: 14px;
  background: #fff7f4;
  color: #9a3f28;
}

.admin-project-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-left: 2px;
}

.admin-project-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: right;
}

.admin-project-item.active {
  border-color: var(--wood);
  background: #fffaf2;
}

.admin-project-main {
  display: grid;
  gap: 3px;
}

.admin-project-main small,
.admin-project-item span {
  color: var(--muted);
  font-size: 12px;
}

.admin-project-actions {
  display: flex;
  gap: 6px;
}

.admin-mini-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffaf2;
  color: var(--wood-deep);
  padding: 0 10px;
  font-size: 12px;
}

.project-manager-card {
  overflow: visible;
}

.compact-action-button {
  width: auto;
  min-height: 38px;
  padding: 7px 11px;
}

.project-manager-tabs {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 5px 18px rgba(83, 55, 28, 0.08);
  backdrop-filter: blur(10px);
}

.project-manager-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-manager-tabs button.active {
  background: var(--surface-soft);
  color: var(--wood-deep);
  box-shadow: inset 0 0 0 1px var(--line);
}

.project-manager-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.project-manager-stat {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.project-manager-stat strong {
  font-size: 23px;
}

.project-manager-stat span {
  color: var(--muted);
  font-size: 11px;
}

.project-manager-stat.is-positive {
  border-color: #d5e4d7;
  background: #f5faf6;
}

.project-manager-stat.is-content {
  background: #fffaf2;
}

.project-manager-stat.has-warning {
  border-color: #efd4a9;
  background: #fff8ec;
}

.project-manager-filters {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.project-manager-card .admin-project-list {
  max-height: none;
  overflow: visible;
  gap: 10px;
}

.admin-project-card {
  display: block;
  padding: 10px;
  background: #fffdf8;
}

.admin-project-card[draggable="true"] {
  cursor: grab;
}

.admin-project-card[draggable="true"]:active {
  cursor: grabbing;
}

.admin-project-card-body {
  width: 100%;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: start;
}

.admin-project-thumb {
  width: 84px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
}

.admin-project-thumb picture,
.admin-project-thumb img,
.admin-project-thumb-fallback {
  width: 100%;
  height: 100%;
  display: block;
}

.admin-project-thumb img {
  object-fit: cover;
}

.admin-project-thumb-fallback {
  display: grid;
  place-items: center;
  color: var(--wood-deep);
  font-size: 24px;
  font-weight: 700;
}

.admin-project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
}

.project-state-pill,
.project-payment-pill,
.project-readiness {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  line-height: 1.4;
}

.project-state-pill.is-available,
.project-readiness.is-ready {
  background: #edf7ef;
  color: #2f6b3d;
}

.project-state-pill.is-draft,
.project-state-pill.is-scheduled,
.project-state-pill.is-preparing,
.project-readiness.has-warning {
  background: #fff4e3;
  color: #8a5b19;
}

.project-state-pill.is-hidden {
  background: #f0eeee;
  color: #665e58;
}

.project-payment-pill {
  background: #f3f7f8;
  color: #42606c;
}

.project-card-metrics {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.admin-project-card .project-readiness {
  margin-top: 2px;
}

.admin-project-card .admin-project-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 9px;
}

.admin-project-card .admin-mini-button {
  padding: 0 6px;
}

.project-card-issues {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.project-card-issues summary {
  padding: 8px 2px 2px;
  color: var(--wood-deep);
  cursor: pointer;
}

.project-card-issues ul {
  margin: 6px 0 0;
  padding-inline-start: 20px;
  line-height: 1.7;
}

.project-editor-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--wood-deep);
  font-size: 11px;
  font-weight: 700;
}

.project-editor-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.project-editor-actionbar {
  position: sticky;
  bottom: 76px;
  z-index: 7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 -6px 20px rgba(83, 55, 28, 0.08);
  backdrop-filter: blur(10px);
}

.project-save-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.project-save-status.is-saving {
  color: #8a5b19;
}

.project-save-status.is-success {
  color: #2f6b3d;
}

.project-save-status.is-error {
  color: #9a3f28;
}

.project-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid #efd4a9;
  border-radius: 14px;
  background: #fff8ec;
  color: #8a5b19;
  padding: 9px 11px;
  font-size: 11px;
}

.project-preview-banner strong,
.project-preview-banner span {
  display: block;
}

.dashboard-status {
  display: none;
  border-radius: 14px;
  padding: 10px 12px;
  background: #f4efe6;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dashboard-status.show {
  display: block;
}

.dashboard-status.success {
  background: #edf7ef;
  color: #2f6b3d;
}

.dashboard-status.error {
  background: #fff1ed;
  color: #9a3f28;
}

.detail-actions,
.sort-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.detail-request-bar {
  position: sticky;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 8px;
  margin: 14px 0;
  padding: 8px;
  border: 1px solid rgba(239, 227, 210, 0.9);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 28px rgba(83, 55, 28, 0.14);
  backdrop-filter: blur(12px);
}

.detail-request-bar .primary-button,
.detail-request-bar .secondary-button {
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 0 8px;
}

.detail-secondary-actions {
  margin-top: 8px;
  grid-template-columns: minmax(0, 1fr);
}

.detail-secondary-actions[hidden] {
  display: none;
}

.detail-summary-card,
.order-project-summary {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.detail-summary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-summary-item {
  border-radius: 12px;
  background: #fffdf8;
  padding: 9px;
}

.detail-summary-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.detail-project-sections {
  margin-top: 12px;
  margin-bottom: 12px;
}

.detail-summary-item small,
.order-project-summary p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.detail-summary-item strong,
.order-project-summary strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-top: 3px;
}

.detail-actions,
.story-actions {
  position: sticky;
  bottom: 82px;
  z-index: 6;
  border: 1px solid rgba(226, 216, 199, 0.82);
  border-radius: 20px;
  background: rgba(251, 248, 242, 0.94);
  padding: 8px;
  backdrop-filter: blur(12px);
}

.badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--wood-deep);
  color: #fffaf2;
  padding: 5px 9px;
  font-size: 11px;
  margin-bottom: 7px;
}

.image-manager-list,
.orders-list,
.activity-list,
.stats-grid {
  display: grid;
  gap: 8px;
}

.image-manager-item,
.order-item,
.activity-item,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 10px;
}

button.stat-card {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: start;
}

button.order-item {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: start;
}

.order-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.order-info-box {
  border-radius: 12px;
  background: #fffdf8;
  padding: 8px;
}

.order-info-box small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.order-info-box strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-warning {
  border: 1px solid #efd4a9;
  border-radius: 12px;
  background: #fff8ec;
  color: #8a5b19;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.6;
}

.order-timeline {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.order-timeline-item {
  border-radius: 11px;
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.order-timeline-item strong {
  display: block;
  color: var(--ink);
}

.order-timeline-item span {
  display: block;
}

.orders-manager-heading,
.order-card-heading,
.order-manager-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.orders-manager-heading {
  margin-bottom: 12px;
}

.orders-manager-heading h2,
.orders-manager-heading p,
.order-card-heading h3,
.order-card-date {
  margin: 0;
}

.orders-manager-heading h2 {
  font-size: 20px;
}

.orders-manager-heading p,
.order-manager-toolbar {
  color: var(--muted);
  font-size: 12px;
}

.order-manager-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.order-summary-card {
  min-height: 70px;
  text-align: start;
  border-inline-start: 3px solid var(--line);
}

.order-summary-card,
.sales-summary-grid .stat-card {
  display: grid;
  align-content: center;
  gap: 4px;
  overflow: hidden;
}

.order-summary-card strong,
.order-summary-card span,
.sales-summary-grid .stat-card strong,
.sales-summary-grid .stat-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-summary-card strong,
.sales-summary-grid .stat-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.order-summary-card span,
.sales-summary-grid .stat-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.order-summary-card.order-status-new,
.order-card.order-status-new {
  border-inline-start-color: #b9812d;
}

.order-summary-card.order-status-awaiting_payment,
.order-card.order-status-awaiting_payment {
  border-inline-start-color: #a96532;
}

.order-summary-card.order-status-paid,
.order-card.order-status-paid {
  border-inline-start-color: #3f7a5c;
}

.order-summary-card.order-status-delivered,
.order-card.order-status-delivered {
  border-inline-start-color: #48708b;
}

.order-manager-filters,
.order-custom-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

[data-admin-section="orders"] > .dashboard-grid select:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.order-custom-dates label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.order-manager-toolbar {
  align-items: center;
  margin: 10px 0;
}

.order-manager-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.order-card {
  border: 1px solid var(--line);
  border-inline-start-width: 4px;
  border-radius: 14px;
  background: #fffdf8;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(83, 55, 28, 0.05);
}

.order-card-heading h3 {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.order-number {
  color: var(--wood-dark);
  font-size: 12px;
  font-weight: 700;
}

.order-status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--wood-dark);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
}

.order-card-customer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.order-card-customer span,
.order-card-date {
  color: var(--muted);
}

.order-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.order-card-meta > span {
  min-width: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 7px;
}

.order-card-meta small,
.order-card-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.order-card-meta small {
  color: var(--muted);
  font-size: 10px;
}

.order-card-meta strong {
  margin-top: 3px;
  font-size: 11px;
}

.order-card-date,
.order-card-alert,
.order-card-ready {
  font-size: 11px;
  line-height: 1.6;
}

.order-card-alert,
.order-card-ready {
  margin: 0;
  border-radius: 10px;
  padding: 7px 9px;
}

.order-card-alert {
  background: #fff7e8;
  color: #8a5b19;
}

.order-card-ready {
  background: #edf7f0;
  color: #356b4c;
}

.order-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.order-card-actions button {
  min-width: 0;
  min-height: 42px;
  padding-inline: 7px;
  font-size: 12px;
}

.order-detail-modal {
  padding: 0;
  align-items: stretch;
}

.order-detail-sheet {
  width: min(100%, 430px);
  max-height: 100vh;
  border-radius: 0;
  padding: 0;
  overscroll-behavior: contain;
}

.order-detail-sheet .order-request-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  padding: 13px 14px;
  backdrop-filter: blur(12px);
}

.order-detail-content {
  display: grid;
  gap: 12px;
  padding: 14px 14px 96px;
}

.order-detail-hero {
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px;
  display: grid;
  gap: 5px;
  border-inline-start: 4px solid var(--wood);
}

.order-detail-hero > span,
.order-detail-hero > small {
  color: var(--muted);
  font-size: 12px;
}

.order-detail-hero > strong {
  font-size: 24px;
}

.order-status-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.order-status-flow button {
  min-width: 0;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--muted);
  padding: 6px 3px;
  font: inherit;
  font-size: 9px;
  line-height: 1.35;
}

.order-status-flow button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 10px;
}

.order-status-flow button.is-complete,
.order-status-flow button.is-current {
  border-color: #a8c7b3;
  color: #356b4c;
}

.order-status-flow button.is-current {
  background: #edf7f0;
  font-weight: 700;
}

.order-detail-warnings,
.order-customer-note,
.order-discount-detail,
.order-pdf-note {
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 12px;
}

.order-detail-warnings {
  background: #fff7e8;
  color: #8a5b19;
}

.order-detail-warnings p,
.order-customer-note p,
.order-pdf-note {
  margin: 0;
}

.order-detail-warnings p + p {
  margin-top: 4px;
}

.order-detail-section {
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.order-discount-detail {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  background: #f4eee3;
}

.order-customer-note,
.order-pdf-note {
  margin-top: 8px;
  background: var(--surface-soft);
  line-height: 1.7;
}

.order-detail-section > .secondary-button {
  width: 100%;
  margin-top: 7px;
}

.order-detail-actions {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 6;
  width: min(100%, 430px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}

.order-detail-actions button {
  min-width: 0;
  min-height: 40px;
  padding: 6px;
  font-size: 11px;
}

.sales-report-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.96);
  padding: 4px;
  backdrop-filter: blur(10px);
}

.sales-report-tabs button {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
}

.sales-report-tabs button.active {
  background: var(--surface-soft);
  color: var(--wood-dark);
  font-weight: 700;
}

.sales-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sales-trend {
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 14px 10px 8px;
  overflow-x: auto;
}

.sales-trend-column {
  flex: 1 0 22px;
  height: 145px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.sales-trend-bar {
  width: 100%;
  max-width: 24px;
  height: 120px;
  overflow: visible;
}

.sales-trend-bar rect {
  fill: #8da995;
}

.sales-trend-column small {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}


.service-state {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.service-state.ok {
  color: #2f7a4c;
}

.service-state.warning {
  color: #9a681d;
}

.service-state.error {
  color: #a13d32;
}

.dashboard-search-results:empty {
  display: none;
}

.dashboard-result-button,
.quick-action-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  padding: 10px;
  text-align: start;
  font: inherit;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-overview {
  padding: 16px;
  overflow: hidden;
}

.dashboard-overview-header,
.dashboard-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-overview-header h2,
.dashboard-section-heading h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

.dashboard-overview-header h2 {
  font-size: 20px;
}

.dashboard-overview-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-eyebrow,
.dashboard-section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--wood-deep);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-refresh-button,
.dashboard-text-action {
  width: auto;
  flex: 0 0 auto;
}

.dashboard-refresh-button {
  min-height: 38px;
  padding: 7px 12px;
}

.dashboard-refresh-button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

.dashboard-search-block {
  margin-top: 15px;
}

.dashboard-search-results {
  margin-top: 8px;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.dashboard-kpi-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  text-align: start;
  overflow: hidden;
}

button.dashboard-kpi-card {
  appearance: none;
}

.dashboard-kpi-card strong {
  display: block;
  font-size: 27px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.dashboard-kpi-card span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-kpi-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.dashboard-kpi-card.is-priority {
  border-color: #edc9bc;
  background: #fff7f4;
}

.dashboard-kpi-card.is-content {
  background: #fffaf2;
}

.dashboard-kpi-card.is-traffic {
  border-color: #d9e3e8;
  background: #f5f9fa;
}

.dashboard-kpi-card.is-positive {
  border-color: #d5e4d7;
  background: #f5faf6;
}

.dashboard-overview-section {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.dashboard-section-heading {
  align-items: center;
  margin-bottom: 10px;
}

.dashboard-section-heading h3 {
  font-size: 15px;
  line-height: 1.4;
}

.dashboard-text-action {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--wood-deep);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-security-warning {
  border-color: #edc9bc;
  background: #fff7f4;
  color: #8e402d;
  margin-bottom: 8px;
}

.dashboard-compact-list {
  gap: 7px;
}

.dashboard-compact-list .dashboard-result-button,
.dashboard-compact-list .order-item {
  padding: 10px 11px;
  box-shadow: none;
}

.dashboard-compact-list .admin-session-note {
  margin-top: 4px;
}

.dashboard-quick-actions .quick-action-button {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: #fffdf8;
}

.dashboard-quick-actions .quick-action-button strong,
.dashboard-quick-actions .quick-action-button span {
  display: block;
}

.dashboard-quick-actions .quick-action-button strong {
  font-size: 13px;
}

.dashboard-quick-actions .quick-action-button span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.dashboard-overview-columns {
  display: grid;
  gap: 0;
}

.dashboard-health-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-health-button {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--ink);
  padding: 10px;
  text-align: start;
}

.dashboard-health-button strong,
.dashboard-health-button span {
  display: block;
}

.dashboard-health-button strong {
  font-size: 18px;
  margin-bottom: 5px;
}

.dashboard-health-button span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.dashboard-health-button.is-ready {
  border-color: #d5e4d7;
  background: #f5faf6;
}

.dashboard-health-button.has-warning {
  border-color: #efd4a9;
  background: #fff8ec;
}

.dashboard-audit-details {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf8;
  overflow: hidden;
}

.dashboard-audit-details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.dashboard-audit-details > summary::-webkit-details-marker {
  display: none;
}

.dashboard-audit-details > summary::after {
  content: "+";
  color: var(--wood-deep);
  font-size: 18px;
}

.dashboard-audit-details[open] > summary::after {
  content: "−";
}

.dashboard-audit-details > .orders-list {
  padding: 0 8px 8px;
}

.dashboard-empty-state {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fffdf8;
  color: var(--muted);
  padding: 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #fff6e8;
  color: var(--wood-deep);
  padding: 4px 8px;
  font-size: 11px;
  margin: 4px 0;
}

.image-manager-item img {
  width: 100%;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
}

.image-manager-item.is-cover-image {
  border-color: #d5e4d7;
  background: #f5faf6;
}

.image-manager-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.image-manager-label strong,
.image-manager-label span {
  display: block;
}

.image-manager-label strong {
  color: var(--ink);
  font-size: 12px;
}

.image-manager-label span {
  font-size: 10px;
}

.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(43, 33, 24, 0.92);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.fullscreen-viewer.show {
  opacity: 1;
  pointer-events: auto;
}

.fullscreen-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.fullscreen-viewer img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  transform: translate3d(var(--viewer-x, 0px), var(--viewer-y, 0px), 0) scale(var(--viewer-scale, 1));
  transform-origin: center;
  transition: transform 0.18s ease;
  cursor: grab;
  will-change: transform;
}

.fullscreen-viewer img[data-runtime-transform] {
}

.fullscreen-viewer.is-panning img {
  cursor: grabbing;
  transition: none;
}

.fullscreen-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.94);
}

.fullscreen-arrow {
  width: 46px;
  height: 46px;
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--wood-deep);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.fullscreen-arrow svg {
  width: 22px;
  height: 22px;
}

.fullscreen-arrow-next {
  right: max(12px, env(safe-area-inset-right));
}

.fullscreen-arrow-prev {
  left: max(12px, env(safe-area-inset-left));
}

.fullscreen-counter {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 4;
  transform: translateX(-50%);
  min-width: 58px;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(43, 33, 24, 0.72);
  color: #fff;
  text-align: center;
  font-size: 13px;
  direction: ltr;
  unicode-bidi: isolate;
}

.detail-recommendations {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.detail-recommendations h2 {
  margin: 0;
  font-size: 19px;
}

.detail-related-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.detail-related-list::-webkit-scrollbar {
  display: none;
}

.related-project-card {
  width: min(280px, 76vw);
  min-width: min(280px, 76vw);
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  text-align: start;
  box-shadow: 0 7px 20px rgba(83, 55, 28, 0.06);
  scroll-snap-align: start;
}

.related-project-media {
  min-height: 98px;
  border-radius: 12px;
  overflow: hidden;
  background: #fffaf2;
}

.related-project-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.related-project-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.related-project-info strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.45;
}

.related-project-info span,
.related-project-info small {
  color: var(--muted);
  font-size: 12px;
}

.order-request-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(43, 33, 24, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.order-request-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.order-request-sheet {
  width: min(100%, 430px);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px 18px 10px 10px;
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(43, 33, 24, 0.2);
  padding: 16px;
  transform: translateY(18px);
  transition: transform 0.18s ease;
}

.order-request-modal.show .order-request-sheet {
  transform: translateY(0);
}

.order-request-modal.order-detail-modal {
  align-items: stretch;
  padding: 0;
}

.order-request-sheet.order-detail-sheet {
  width: min(100%, 430px);
  max-height: 100vh;
  border-radius: 0;
  padding: 0;
}

.order-request-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.order-request-header h2,
.order-request-header p {
  margin: 0;
}

.order-request-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.order-request-form {
  display: grid;
  gap: 11px;
}

.order-request-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}

.order-request-form .compact-textarea {
  min-height: 88px;
}

.order-form-status {
  min-height: 20px;
  margin: 0;
  color: #9c3d2f;
  font-size: 12px;
}

.order-page-form {
  display: grid;
  gap: 18px;
}

.order-page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.order-project-intro {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 7px 20px rgba(83, 55, 28, 0.07);
}

.order-project-cover {
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 7px;
  background: var(--surface-soft);
}

.order-project-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.order-project-copy {
  min-width: 0;
}

.order-project-copy h2,
.order-project-copy p {
  margin: 0;
}

.order-project-copy h2 {
  margin-block: 4px 7px;
  font-size: 17px;
  line-height: 1.45;
}

.order-project-copy p,
.order-section-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.order-project-price {
  color: var(--wood-deep);
  font-size: 15px;
}

.order-block {
  display: grid;
  gap: 11px;
}

.order-section-heading h2,
.order-section-heading p {
  margin: 0;
}

.order-section-heading h2 {
  font-size: 17px;
}

.order-basic-package {
  display: grid;
  gap: 12px;
  border: 1px solid var(--wood-light);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.order-basic-package-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-basic-package-head strong {
  font-size: 16px;
}

.order-selected-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf6ee;
  color: #2d6d38;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}

.order-included-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
  padding-bottom: 3px;
}

.order-included-item {
  display: grid;
  gap: 6px;
  scroll-snap-align: start;
  min-width: 0;
}

.order-included-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.order-included-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.order-included-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 7px;
}

.order-included-placeholder.is-protected {
  border: 1px dashed rgba(150, 104, 57, 0.34);
  background: #f8f1e7;
  color: var(--wood-deep);
  font-weight: 700;
}

.order-included-item strong {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-included-item small {
  color: var(--muted);
  font-size: 10px;
}

.order-addon-list {
  display: grid;
  gap: 9px;
}

.order-addon-card {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  cursor: pointer;
}

.order-addon-card:has(input:checked) {
  border-color: var(--wood);
  background: #fffaf2;
  box-shadow: 0 5px 16px rgba(83, 55, 28, 0.07);
}

.order-addon-card.is-unavailable {
  cursor: not-allowed;
  opacity: 0.58;
}

.order-addon-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--wood-deep);
}

.order-addon-image {
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 7px;
  background: var(--surface-soft);
}

.order-addon-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.order-addon-copy {
  min-width: 0;
}

.order-addon-copy strong,
.order-addon-copy small {
  display: block;
}

.order-addon-copy strong {
  font-size: 14px;
}

.order-addon-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.order-addon-price {
  color: var(--wood-deep);
  font-size: 13px;
  white-space: nowrap;
}

.order-customer-fields {
  display: grid;
  gap: 10px;
}

.order-customer-fields label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.order-total-card {
  display: grid;
  gap: 8px;
  border-block: 1px solid var(--line);
  padding-block: 12px;
}

.order-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.order-total-row strong {
  color: var(--ink);
}

.order-total-row.order-grand-total {
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding-top: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.order-grand-total strong {
  color: var(--wood-deep);
  font-size: 18px;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.payment-method {
  display: grid;
  min-height: 88px;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  text-align: center;
}

.payment-method svg {
  width: 26px;
  height: 26px;
}

.payment-method small {
  color: var(--muted);
  font-size: 11px;
}

.payment-method-whatsapp {
  border-color: #9fd6aa;
  background: #f2fbf4;
  color: #17652b;
}

.payment-method:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 350px) {
  .order-project-intro {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .order-project-cover {
    width: 78px;
  }

  .order-addon-card {
    grid-template-columns: auto 58px minmax(0, 1fr);
  }

  .order-addon-image {
    width: 58px;
  }

  .order-addon-price {
    grid-column: 3;
  }
}

.security-field {
  position: absolute !important;
  inset-inline-start: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.section-manager-list {
  display: grid;
  gap: 8px;
}

.is-managed-hidden {
  display: none !important;
}

.managed-page-admin,
.managed-page-block-list,
.managed-page-copy-fields {
  display: grid;
  gap: 10px;
}

.managed-page-copy-panel,
.managed-page-editor-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  overflow: hidden;
}

.managed-page-copy-panel > summary,
.managed-page-editor-row > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.managed-page-copy-panel > summary::-webkit-details-marker,
.managed-page-editor-row > summary::-webkit-details-marker {
  display: none;
}

.managed-page-editor-row > summary > span:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.managed-page-editor-row > summary small {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--wood-deep);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.managed-page-editor-row > summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managed-page-state {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  flex: 0 0 auto;
}

.managed-page-state.is-visible {
  background: #edf7ef;
  color: #2f6b3d;
}

.managed-page-state.is-hidden-state {
  background: #f3ece5;
  color: var(--muted);
}

.managed-page-copy-fields,
.managed-page-editor-body {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.managed-copy-field {
  display: grid;
  gap: 7px;
}

.managed-copy-field label,
.managed-page-editor-body label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.managed-page-row-actions {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 7px;
}

.managed-page-remove {
  min-height: 34px;
}

.managed-public-block {
  margin: 16px 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.managed-public-block-highlight {
  padding-inline: 14px;
  border-inline-start: 4px solid var(--wood);
  background: var(--surface-soft);
}

.managed-public-block h2,
.managed-public-block p {
  margin: 0;
}

.managed-public-block h2 {
  font-size: 18px;
  margin-bottom: 7px;
}

.managed-public-block p {
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-line;
}

.managed-public-block .secondary-button {
  width: 100%;
  margin-top: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 360px) {
  .managed-page-admin .dashboard-grid,
  [data-admin-section="project-detail-page"] .dashboard-actions,
  [data-admin-section="sales-page"] .dashboard-actions {
    grid-template-columns: 1fr;
  }
}

.section-manager-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  padding: 8px;
}

.section-manager-row .compact-input {
  min-height: 40px;
  background: var(--surface);
}

.section-manager-actions {
  display: flex;
  gap: 5px;
}

.section-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--wood-deep);
}

.admin-session {
  display: grid;
  gap: 10px;
}

.member-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-profile .avatar {
  flex: 0 0 auto;
}

.role-badge {
  display: inline-flex;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--wood-deep);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

.header-account {
  margin-inline-start: auto;
  flex: 0 0 auto;
}

.header-language {
  flex: 0 0 auto;
}

.admin-session-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.admin-locked {
  display: grid;
  gap: 8px;
  text-align: center;
}

.admin-locked p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.is-hidden {
  display: none !important;
}

.toggle {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--wood);
  position: relative;
}

.toggle::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fffaf2;
  position: absolute;
  top: 3px;
  right: 3px;
}

.bottom-nav {
  width: 100%;
  max-width: 430px;
  height: 74px;
  position: fixed;
  right: 50%;
  bottom: 0;
  transform: translateX(50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  z-index: 10;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  grid-template-columns: none;
}

.nav-item {
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  font-size: 12px;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item.active {
  background: var(--surface-soft);
  color: var(--wood-deep);
}

.empty {
  display: none;
  text-align: center;
  color: var(--muted);
  padding: 26px 12px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  line-height: 1.8;
}

.empty.show {
  display: grid;
  place-items: center;
  min-height: 128px;
  background: linear-gradient(180deg, #fffdf8, #f7efe3);
  color: var(--wood-deep);
  font-weight: 800;
}

.empty.show::before {
  content: "NajjaR";
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.security-alert {
  border-color: rgba(154, 63, 40, 0.22);
  background: #fff1ed;
}

.skeleton-list {
  display: grid;
  gap: 12px;
}

.skeleton-card {
  height: 230px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent),
    #f1e8dc;
  background-size: 220% 100%, 100% 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

.catalog-error {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 18px;
  border: 1px solid rgba(153, 105, 62, 0.18);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.catalog-error strong {
  color: var(--ink);
}

.catalog-error .secondary-button {
  width: auto;
  min-width: 150px;
  margin-top: 4px;
}

.load-more-row {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  width: 100%;
  padding: 6px 0 2px;
}

.load-more-row .secondary-button {
  width: min(100%, 240px);
}

.load-more-row small {
  margin-inline-start: 6px;
  color: var(--muted);
}

.account-events-loading [data-screen="account"] .account-card,
.account-events-loading [data-screen="add"] form {
  pointer-events: none;
  opacity: 0.72;
}

.detail-load-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background: #f8f1e7;
  color: var(--ink);
  font-size: 13px;
}

.detail-load-state.is-error {
  flex-wrap: wrap;
  border: 1px solid rgba(154, 63, 40, 0.18);
  background: #fff4f0;
}

.detail-load-state .secondary-button {
  width: auto;
}

.inline-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(153, 105, 62, 0.22);
  border-top-color: var(--wood);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.image-retry-state {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.image-retry-state .secondary-button {
  width: auto;
}

.image-failed {
  opacity: 0.2;
}

.member-top-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.member-section-heading h2,
.member-section-heading p {
  margin: 0;
}

.member-section-heading h2 {
  font-size: 19px;
  line-height: 1.35;
}

.member-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.member-center-status {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.member-center-status.show {
  display: block;
}

.member-center-status.success {
  background: #edf7ef;
  color: #35603f;
}

.member-center-status.error {
  background: #fff2ef;
  color: #843d30;
}

.member-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-summary-grid .stat-card {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.member-summary-grid .stat-card strong,
.member-summary-grid .stat-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.member-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 18px;
}

.member-settings-form,
.member-field,
.member-password-block {
  display: grid;
  gap: 8px;
}

.member-settings-form {
  gap: 13px;
}

.member-field > span,
.member-password-block > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.member-field input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.member-password-block {
  margin-top: 5px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.member-order-list,
.member-favorites-list {
  display: grid;
}

.member-order-card {
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.member-order-card:first-child {
  padding-top: 2px;
}

.member-order-card:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.member-order-card > header,
.member-order-meta,
.member-order-actions,
.member-favorite-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.member-order-card > header {
  justify-content: space-between;
  align-items: flex-start;
}

.member-order-card > header div {
  min-width: 0;
}

.member-order-card > header span,
.member-order-meta,
.member-favorite-item span {
  color: var(--muted);
  font-size: 11px;
}

.member-order-card h3 {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.member-order-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--wood-deep);
  font-size: 10px;
  white-space: nowrap;
}

.member-order-status.status-paid,
.member-order-status.status-delivered {
  background: #edf7ef;
  color: #35603f;
}

.member-order-status.status-awaiting_payment {
  background: #fff7e8;
  color: #805d26;
}

.member-order-meta {
  justify-content: space-between;
  margin: 9px 0 12px;
}

.member-order-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  min-height: 48px;
}

.member-order-flow span {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  color: #aaa096;
  text-align: center;
}

.member-order-flow b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 10px;
}

.member-order-flow small {
  max-width: 100%;
  font-size: 8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.member-order-flow .complete {
  color: #58705f;
}

.member-order-flow .complete b {
  border-color: #9bb3a1;
  background: #edf7ef;
}

.member-order-flow .current {
  color: var(--ink);
  font-weight: 700;
}

.member-order-timeline {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.member-order-timeline summary {
  cursor: pointer;
  color: var(--wood-deep);
  font-size: 12px;
  font-weight: 700;
}

.member-order-timeline p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 0;
  font-size: 11px;
}

.member-order-timeline p span {
  color: var(--muted);
  text-align: end;
}

.member-order-actions {
  flex-wrap: wrap;
  margin-top: 12px;
}

.member-order-actions .primary-button,
.member-order-actions .secondary-button {
  width: auto;
  min-height: 40px;
  flex: 1 1 120px;
}

.member-pdf-locked {
  flex: 1 1 100%;
  color: var(--muted);
  font-size: 11px;
}

.member-empty-state {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 28px 14px;
  color: var(--muted);
  text-align: center;
}

.member-empty-state strong {
  color: var(--ink);
  font-size: 14px;
}

.member-empty-state p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.member-empty-state .secondary-button {
  width: auto;
  margin-top: 5px;
}

.member-order-skeleton {
  display: grid;
  gap: 9px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.member-order-skeleton span {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eee5d9 25%, #faf5ed 50%, #eee5d9 75%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

.member-order-skeleton span:nth-child(2) {
  width: 68%;
}

.member-order-skeleton span:nth-child(3) {
  width: 86%;
}

.member-favorite-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.member-favorite-item:last-child {
  border-bottom: 0;
}

.member-favorite-media {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
  padding: 0;
}

.member-favorite-media img,
.member-favorite-media .project-fallback-visual {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.member-favorite-item > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
}

.member-favorite-item strong {
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.member-favorite-actions {
  margin-top: 5px;
}

.member-favorite-actions .secondary-button {
  width: auto;
  min-height: 36px;
}

.member-favorite-actions .icon-button {
  width: 36px;
  height: 36px;
  color: #843d30;
}

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

@keyframes skeleton-shimmer {
  from {
    background-position: 120% 0, 0 0;
  }
  to {
    background-position: -120% 0, 0 0;
  }
}

@media (min-width: 431px) {
  body {
    background:
      radial-gradient(circle at top, rgba(234, 212, 182, 0.38), transparent 35%),
      var(--bg);
  }

  .app {
    box-shadow: 0 0 0 1px rgba(83, 55, 28, 0.06);
  }
}
