.customer-portal-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(199, 166, 107, 0.18), transparent 28rem),
    linear-gradient(180deg, #f4efe6 0%, #e8dfd2 100%);
  color: #2d241a;
}

.customer-portal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.customer-portal-shell-orders {
  place-items: start center;
}

.customer-portal-card {
  width: min(100%, 46rem);
  padding: 2rem;
  border: 1px solid rgba(71, 54, 35, 0.12);
  border-radius: 1.5rem;
  background: rgba(255, 250, 242, 0.94);
  box-shadow: 0 1.5rem 4rem rgba(71, 54, 35, 0.12);
}

.customer-portal-card-wide {
  width: min(100%, 72rem);
}

.customer-portal-language {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
}

.customer-portal-language-orders {
  margin-bottom: 1rem;
}

.customer-portal-lang-btn {
  min-width: 2.7rem;
  min-height: 2.2rem;
  border: 1px solid rgba(71, 54, 35, 0.16);
  border-radius: 999px;
  background: #fffdf9;
  color: #5e4a35;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.customer-portal-lang-btn.is-active {
  background: #6b4d24;
  border-color: #6b4d24;
  color: #fffdf9;
}

.customer-portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.95fr);
  gap: 1.5rem;
  align-items: stretch;
}

.customer-portal-panel {
  min-width: 0;
}

.customer-portal-form-panel {
  padding: 1.4rem;
  border-radius: 1.2rem;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid rgba(71, 54, 35, 0.08);
}

.customer-portal-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #87653a;
}

.customer-portal-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}

.customer-portal-copy {
  margin: 1rem 0 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.7;
  color: #564636;
}

.customer-portal-status-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.9rem;
}

.customer-portal-status-grid-large {
  margin-top: 1.25rem;
}

.customer-portal-financial-meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.customer-portal-financial-meta > div {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(71, 54, 35, 0.08);
}

.customer-portal-financial-meta span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c7357;
}

.customer-portal-financial-meta strong {
  display: block;
  margin-top: 0.3rem;
  color: #2d241a;
}

.customer-portal-status-grid article {
  padding: 1rem;
  border-radius: 1rem;
  background: #fffdf9;
  border: 1px solid rgba(71, 54, 35, 0.08);
}

.customer-portal-status-grid span {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c7357;
}

.customer-portal-status-grid strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.05rem;
  color: #2d241a;
}

.customer-portal-notes {
  margin: 1.5rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.7;
  color: #564636;
}

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

.customer-portal-field {
  display: grid;
  gap: 0.45rem;
}

.customer-portal-field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: #5e4a35;
}

.customer-portal-field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(71, 54, 35, 0.16);
  background: #fffdf9;
  color: #2d241a;
  font: inherit;
  box-sizing: border-box;
}

.customer-portal-field input:focus {
  outline: 2px solid rgba(135, 101, 58, 0.22);
  border-color: rgba(135, 101, 58, 0.55);
}

.customer-portal-submit {
  width: 100%;
  min-height: 3rem;
}

.customer-portal-feedback {
  min-height: 1.4rem;
  margin: 0;
  font-size: 0.95rem;
  color: #5f6540;
}

.customer-portal-feedback.is-error {
  color: #9f2e2e;
}

.customer-portal-feedback.is-success {
  color: #45633a;
}

.customer-portal-help {
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  background: rgba(135, 101, 58, 0.08);
  border: 1px solid rgba(135, 101, 58, 0.14);
  color: #6b573f;
  line-height: 1.6;
  font-size: 0.92rem;
}

.customer-portal-orders-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.customer-portal-inline-sep {
  margin: 0 0.55rem;
  color: #9d8568;
}

.customer-portal-logout {
  white-space: nowrap;
}

.customer-portal-order-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.customer-portal-order-card {
  padding: 1.2rem;
  border-radius: 1.2rem;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid rgba(71, 54, 35, 0.08);
}

.customer-portal-order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.customer-portal-order-id {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2d241a;
}

.customer-portal-order-type {
  margin-top: 0.2rem;
  color: #6a5845;
}

.customer-portal-status-pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(135, 101, 58, 0.12);
  color: #6b4d24;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-portal-order-progress {
  margin-top: 1rem;
}

.customer-portal-order-progress-bar {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(110, 87, 57, 0.12);
}

.customer-portal-order-progress-bar span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b98a49 0%, #7d5a2e 100%);
}

.customer-portal-order-progress-meta {
  margin-top: 0.55rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: #6d5944;
}

.customer-portal-metrics-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.8rem;
}

.customer-portal-metrics-grid > div {
  padding: 0.95rem;
  border-radius: 1rem;
  background: #fffdf9;
  border: 1px solid rgba(71, 54, 35, 0.06);
}

.customer-portal-metrics-grid-financial {
  margin-top: 0.8rem;
}

.customer-portal-metrics-grid span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c7357;
}

.customer-portal-metrics-grid strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.15rem;
  color: #2d241a;
}

.customer-portal-warning {
  margin-top: 0.95rem;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  background: rgba(185, 138, 73, 0.12);
  border: 1px solid rgba(185, 138, 73, 0.22);
  color: #6d4f23;
}

.customer-portal-order-dates {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: #6d5944;
  font-size: 0.92rem;
}

.customer-portal-history-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.customer-portal-history-card {
  padding: 1.2rem;
  border-radius: 1.2rem;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid rgba(71, 54, 35, 0.08);
}

.customer-portal-history-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.customer-portal-history-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.customer-portal-history-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: #fffdf9;
  border: 1px solid rgba(71, 54, 35, 0.06);
}

.customer-portal-history-row strong,
.customer-portal-history-row span {
  display: block;
}

.customer-portal-history-row strong {
  color: #2d241a;
}

.customer-portal-history-row span {
  margin-top: 0.25rem;
  color: #6d5944;
  font-size: 0.92rem;
}

.customer-portal-history-empty {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 253, 249, 0.95);
  border: 1px dashed rgba(71, 54, 35, 0.16);
  color: #6d5944;
}

.customer-portal-empty {
  margin-top: 1.5rem;
  padding: 2rem;
  border-radius: 1.2rem;
  background: rgba(255, 253, 249, 0.92);
  border: 1px dashed rgba(71, 54, 35, 0.18);
}

.customer-portal-empty h2 {
  margin: 0 0 0.6rem;
}

.customer-portal-empty p {
  margin: 0;
  line-height: 1.7;
  color: #5f503f;
}

[dir="rtl"] .customer-portal-body {
  font-family: "Arial", "Tahoma", sans-serif;
}

[dir="rtl"] .customer-portal-language {
  justify-content: flex-start;
}

[dir="rtl"] .customer-portal-kicker,
[dir="rtl"] .customer-portal-status-grid span,
[dir="rtl"] .customer-portal-financial-meta span,
[dir="rtl"] .customer-portal-metrics-grid span,
[dir="rtl"] .customer-portal-status-pill {
  letter-spacing: 0;
  text-transform: none;
}

[dir="rtl"] .customer-portal-notes {
  padding-left: 0;
  padding-right: 1.2rem;
}

[dir="rtl"] .customer-portal-field input {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .customer-portal-order-progress-bar span {
  margin-left: auto;
}

@media (max-width: 900px) {
  .customer-portal-grid {
    grid-template-columns: 1fr;
  }

  .customer-portal-orders-header {
    flex-direction: column;
  }

  .customer-portal-history-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .customer-portal-shell {
    padding: 1rem;
  }

  .customer-portal-card {
    padding: 1.4rem;
    border-radius: 1.1rem;
  }

  .customer-portal-inline-sep {
    display: none;
  }

  .customer-portal-order-top,
  .customer-portal-order-progress-meta,
  .customer-portal-order-dates,
  .customer-portal-history-row {
    flex-direction: column;
  }

  .customer-portal-history-row {
    grid-template-columns: 1fr;
  }
}
