.furniture-form-page {
  direction: rtl;
  font-family: "Cairo", "DM Sans", sans-serif;
}

.furniture-form-page .admin-topbar,
.furniture-form-page .topbar-breadcrumb {
  direction: rtl;
}

.furniture-form-content {
  max-width: 1440px;
  margin: 0 auto;
}

.furniture-form-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 8% 10%, rgba(204, 34, 61, .72), transparent 30%),
    linear-gradient(135deg, #082e76 0%, #1f3f7c 70%, #315493 100%);
  box-shadow: 0 16px 45px rgba(8, 46, 118, .18);
}

.furniture-form-hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  left: -80px;
  bottom: -190px;
  border: 42px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
}

.hero-copy,
.hero-mark {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .65rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  color: #ffd9df;
}

.furniture-form-hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.3;
}

.furniture-form-hero p {
  max-width: 680px;
  margin: .65rem 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: .9rem;
}

.hero-mark {
  display: grid;
  place-items: center;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 26px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
}

.hero-mark i {
  font-size: 2.35rem;
}

.furniture-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.5rem;
  align-items: start;
}

.furniture-form-main {
  display: grid;
  gap: 1.25rem;
}

.furniture-form-card {
  overflow: hidden;
  border: 1px solid rgba(8, 46, 118, .08);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 7px 25px rgba(8, 46, 118, .06);
}

.form-card-heading {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(90deg, rgba(31, 63, 124, .04), transparent);
}

.form-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--accent);
  background: rgba(204, 34, 61, .09);
}

.form-card-heading h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-2);
}

.form-card-heading p {
  margin: .15rem 0 0;
  font-size: .72rem;
  color: var(--ink-muted);
}

.form-card-body {
  padding: 1.4rem;
}

.furniture-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.furniture-fields .span-2 {
  grid-column: 1 / -1;
}

.furniture-form-page .form-field {
  gap: .45rem;
}

.furniture-form-page .form-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .78rem;
}

.field-english {
  direction: ltr;
  font-family: "DM Sans", sans-serif;
  font-size: .62rem;
  font-weight: 600;
  color: rgba(31, 63, 124, .48);
}

.required {
  color: var(--accent);
}

.furniture-form-page .form-field input,
.furniture-form-page .form-field select,
.furniture-form-page .form-field textarea {
  min-height: 48px;
  text-align: right;
  border-color: rgba(8, 46, 118, .13);
  background: #fbfaf8;
}

.furniture-form-page .form-field textarea {
  min-height: 125px;
}

.furniture-form-page .form-field input:focus,
.furniture-form-page .form-field select:focus,
.furniture-form-page .form-field textarea:focus {
  border-color: var(--ink);
  background: #fff;
}

.furniture-form-page input[type="number"],
.furniture-form-page .ltr-field,
.furniture-form-page .code-field {
  direction: ltr;
  text-align: left;
}

.code-shell {
  position: relative;
}

.code-shell i {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--accent);
}

.furniture-form-page .code-field {
  padding-right: 42px;
  font-family: Consolas, monospace;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-2);
  background: rgba(31, 63, 124, .055);
}

.translation-note,
.locked-note {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  padding: .75rem .85rem;
  border: 1px solid rgba(31, 63, 124, .1);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(31, 63, 124, .045);
  font-size: .72rem;
}

.translation-note i,
.locked-note i {
  margin-top: .15rem;
  color: var(--accent);
}

.locked-note {
  display: none;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 156px;
  padding: 1.35rem;
  border: 1.5px dashed rgba(31, 63, 124, .25);
  border-radius: 14px;
  text-align: center;
  color: var(--ink);
  background: #fbfaf8;
  transition: .2s ease;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(204, 34, 61, .025);
}

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

.upload-zone i {
  display: block;
  margin-bottom: .55rem;
  font-size: 1.55rem;
  color: var(--accent);
}

.upload-zone strong {
  display: block;
  font-size: .85rem;
}

.upload-zone small {
  display: block;
  margin-top: .25rem;
  color: var(--ink-muted);
}

.cover-preview {
  display: none;
  align-items: center;
  gap: 1rem;
  margin-top: .85rem;
  padding: .75rem;
  border-radius: 12px;
  background: var(--page-bg-2);
}

.cover-preview img {
  width: 116px;
  height: 84px;
  border-radius: 10px;
  object-fit: cover;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.gallery-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: var(--page-bg-2);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-tile button {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: .8rem;
  background: rgba(137, 2, 24, .88);
  box-shadow: 0 2px 8px rgba(137, 2, 24, .3);
  transition: background .15s, transform .15s;
  cursor: pointer;
}

.gallery-tile button:hover {
  background: rgba(137, 2, 24, 1);
  transform: scale(1.05);
}

.gallery-new {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 7px;
  border-radius: 100px;
  color: #fff;
  background: var(--accent);
  font-size: .62rem;
  font-weight: 700;
}

.empty-gallery {
  grid-column: 1 / -1;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  color: var(--ink-muted);
  background: var(--page-bg-2);
  font-size: .75rem;
}

.furniture-form-aside {
  position: sticky;
  top: calc(var(--topbar-h) + 1.25rem);
  display: grid;
  gap: 1rem;
}

.form-summary-card {
  overflow: hidden;
  border: 1px solid rgba(8, 46, 118, .09);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(8, 46, 118, .08);
}

.summary-image {
  position: relative;
  display: grid;
  place-items: center;
  height: 176px;
  color: rgba(31, 63, 124, .28);
  background: linear-gradient(145deg, #e9edf5, #f8f6f1);
}

.summary-image img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-image i {
  font-size: 2.5rem;
}

.summary-content {
  padding: 1.2rem;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 4px 9px;
  border-radius: 100px;
  color: var(--accent);
  background: rgba(204, 34, 61, .08);
  font-size: .64rem;
  font-weight: 800;
}

.summary-content h3 {
  margin: .75rem 0 .35rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.summary-content p {
  margin: 0;
  color: var(--ink-muted);
  font-size: .75rem;
  line-height: 1.7;
}

.summary-code {
  margin-top: .9rem;
  padding: .7rem;
  border-radius: 9px;
  direction: ltr;
  text-align: center;
  color: #fff;
  background: var(--ink);
  font-family: Consolas, monospace;
  font-size: .75rem;
  font-weight: 700;
}

.save-panel {
  padding: 1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(8, 46, 118, .07);
}

.save-panel .btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.save-panel .btn + .btn {
  margin-top: .6rem;
}

.form-page-error {
  display: none;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(204, 34, 61, .2);
  border-radius: 12px;
  color: var(--danger);
  background: rgba(204, 34, 61, .06);
  font-size: .8rem;
  font-weight: 600;
}

.page-loading {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(245, 242, 236, .9);
  backdrop-filter: blur(6px);
}

.page-loading.hidden {
  display: none;
}

.loading-box {
  padding: 1.3rem 1.6rem;
  border-radius: 16px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.loading-box i {
  display: block;
  margin-bottom: .6rem;
  font-size: 1.4rem;
  color: var(--accent);
}

@media (max-width: 1100px) {
  .furniture-form-layout {
    grid-template-columns: 1fr;
  }

  .furniture-form-aside {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .furniture-form-hero {
    padding: 1.4rem;
  }

  .hero-mark {
    display: none;
  }

  .furniture-fields,
  .furniture-form-aside {
    grid-template-columns: 1fr;
  }

  .furniture-fields .span-2 {
    grid-column: auto;
  }

  .form-card-body {
    padding: 1rem;
  }
}
