@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/vazirmatn/Vazirmatn-Regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/vazirmatn/Vazirmatn-Medium.woff2") format("woff2");
  font-display: swap;
  font-weight: 500;
}
@font-face {
  font-family: Vazirmatn;
  src: url("../fonts/vazirmatn/Vazirmatn-Bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}
:root {
  --page: #101827;
  --panel: #182334;
  --field: #101a29;
  --line: #2b3a50;
  --text: #edf3fb;
  --muted: #98a8bc;
  --accent: #c99036;
  --accent-soft: #f3d493;
  --danger: #ef7b86;
  --radius: 18px;
}
* {
  box-sizing: border-box;
}
.customer-auth {
  min-height: 100dvh;
  margin: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 15% 10%,
      rgba(201, 144, 54, 0.13),
      transparent 34%
    ),
    radial-gradient(
      circle at 84% 86%,
      rgba(54, 105, 201, 0.16),
      transparent 38%
    ),
    var(--page);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.auth-card {
  width: min(100%, 430px);
  padding: 28px 21px;
  background: rgba(24, 35, 52, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: card-in 0.38s ease both;
}
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-soft);
  font-size: 20px;
  font-weight: 700;
}
.auth-brand h1 {
  margin: 0;
  font-size: 20px;
}
.auth-brand p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-field {
  margin-bottom: 15px;
}
.auth-field label {
  display: block;
  margin: 0 0 7px;
  color: #c9d3e0;
  font-size: 12px;
  font-weight: 500;
}
.auth-input-wrap {
  position: relative;
}
.auth-input {
  width: 100%;
  min-height: 47px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--field);
  color: var(--text);
  font:
    14px Vazirmatn,
    Tahoma,
    sans-serif;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.auth-input::placeholder {
  color: #718096;
}
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 144, 54, 0.13);
}
.auth-input.is-invalid {
  border-color: var(--danger);
}
.field-error {
  display: block;
  margin-top: 6px;
  color: #ff9ba4;
  font-size: 11px;
}
.password-toggle {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 7px;
  cursor: pointer;
}
.password-toggle:hover {
  color: var(--accent-soft);
}
.auth-alert {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 123, 134, 0.36);
  border-radius: 10px;
  background: rgba(239, 123, 134, 0.1);
  color: #ffadb4;
  font-size: 12px;
  line-height: 1.7;
}
.auth-submit {
  width: 100%;
  min-height: 47px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #1f1608;
  font:
    700 14px Vazirmatn,
    Tahoma,
    sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(201, 144, 54, 0.2);
  transition:
    transform 0.16s,
    background 0.18s;
}
.auth-submit:hover {
  background: var(--accent-soft);
}
.auth-submit:active {
  transform: scale(0.98);
}
.auth-submit.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}
.auth-submit.is-loading:after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(31, 22, 8, 0.35);
  border-top-color: #1f1608;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
.auth-footer {
  margin: 19px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.auth-footer a,
.back-home {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 700;
}
.back-home {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
}
.auth-hint {
  margin: -4px 0 15px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 600px) {
  .auth-card {
    padding: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-input,
  .auth-submit {
    animation: none;
    transition: none;
  }
}
.otp-resend-form {
  margin-top: 12px;
}
.otp-resend {
  background: #243347;
  color: var(--text);
  box-shadow: none;
}
.otp-resend:hover {
  background: #30455d;
}
.otp-resend.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}
.otp-resend.is-loading:after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(237, 243, 251, 0.38);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
/* Cart */
.cart-page {
  display: block;
  padding: 0;
}
.cart-layout {
  max-width: 1050px;
  margin: auto;
  padding: 28px 16px;
}
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.cart-header a,
.cart-header span {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.cart-header h1 {
  font-size: 24px;
}
.cart-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
}
.cart-items {
  display: grid;
  gap: 12px;
}
.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.cart-product-image {
  width: 70px;
  height: 70px;
  background: var(--field);
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 25px;
  overflow: hidden;
}
.cart-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-product-info h2 {
  font-size: 15px;
  margin: 0 0 5px;
}
.cart-product-info p,
.cart-summary small {
  color: var(--muted);
  font-size: 11px;
}
.cart-product-info strong {
  color: var(--accent-soft);
  font-size: 13px;
}
.cart-item-actions {
  display: grid;
  gap: 7px;
  justify-items: end;
}
.quantity-control {
  display: flex;
  align-items: center;
  direction: ltr;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--field);
}
.quantity-control button {
  width: 33px;
  height: 35px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}
.quantity-control button:hover {
  background: #263650;
}
.quantity-control output {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
}
.remove-item {
  border: 0;
  background: transparent;
  color: var(--danger);
  font: 11px Vazirmatn;
  cursor: pointer;
}
.cart-summary {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  height: max-content;
}
.cart-summary h2 {
  margin: 0 0 15px;
  font-size: 16px;
}
.cart-summary p {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.cart-summary .total {
  display: flex;
  justify-content: space-between;
  margin: 15px 0;
  color: var(--text);
}
.cart-summary .total b {
  color: var(--accent-soft);
}
.cart-summary .auth-submit {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 13px;
}
.cart-summary small {
  display: block;
  text-align: center;
  margin-top: 12px;
  line-height: 1.7;
}
.cart-empty {
  max-width: 450px;
  margin: 80px auto;
  text-align: center;
  padding: 35px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cart-empty p {
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 20px;
}
.cart-empty .auth-submit {
  display: block;
  text-decoration: none;
  padding: 13px;
}
@media (max-width: 700px) {
  .cart-grid {
    grid-template-columns: 1fr;
  }
  .cart-item {
    grid-template-columns: 58px 1fr;
  }
  .cart-product-image {
    width: 58px;
    height: 58px;
  }
  .cart-item-actions {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 9px;
  }
  .cart-header h1 {
    font-size: 20px;
  }
}
/* Customer orders */
.orders-page {
  display: block;
  padding: 0;
}
.orders-layout {
  width: min(760px, 100%);
  margin: auto;
  padding: 42px 16px 60px;
}
.orders-heading {
  display: grid;
  gap: 17px;
  margin-bottom: 26px;
}
.orders-heading > a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.orders-heading > div > span {
  color: var(--accent-soft);
  font-size: 11px;
}
.orders-heading h1 {
  font-size: 27px;
  margin: 5px 0;
}
.orders-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.orders-list {
  display: grid;
  gap: 12px;
}
.order-card {
  padding: 17px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.order-card:hover {
  transform: translateY(-2px);
  border-color: #475b77;
}
.order-card-top,
.order-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-number {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.order-date {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.order-status {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.status-pending {
  background: #483916;
  color: #f3d493;
}
.status-approved {
  background: #143d35;
  color: #73ddbb;
}
.status-rejected {
  background: #4b2229;
  color: #ffadb4;
}
.status-completed {
  background: #213c5b;
  color: #9ec9ff;
}
.order-card-bottom {
  padding-top: 15px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.order-card-bottom > b {
  font-size: 17px;
  color: var(--accent-soft);
}
.order-card-bottom small {
  font-size: 10px;
  font-weight: 400;
}
.order-card-bottom a {
  padding: 9px 12px;
  background: var(--accent);
  border-radius: 9px;
  color: #1f1608;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.15s,
    background 0.2s;
}
.order-card-bottom a:hover {
  background: var(--accent-soft);
}
.order-card-bottom a:active {
  transform: scale(0.96);
}
@media (max-width: 460px) {
  .orders-layout {
    padding: 28px 12px;
  }
  .orders-heading h1 {
    font-size: 23px;
  }
  .order-card {
    padding: 14px;
  }
  .order-card-bottom {
    align-items: flex-end;
  }
  .order-card-bottom a {
    max-width: 145px;
    text-align: center;
    line-height: 1.7;
  }
}
/* Order delete interaction */
.order-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}
.order-actions .order-delete {
  border: 0;
  background: transparent;
  color: var(--danger);
  font: 11px Vazirmatn;
  cursor: pointer;
}
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}
.order-modal.open {
  opacity: 1;
  visibility: visible;
}
.order-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 22, 0.68);
  backdrop-filter: blur(3px);
}
.order-modal-card {
  position: relative;
  width: min(380px, 100%);
  padding: 23px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
  text-align: center;
}
.order-modal-card h2 {
  font-size: 17px;
  margin: 0 0 9px;
}
.order-modal-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 19px;
}
.order-modal-card div {
  display: flex;
  gap: 8px;
}
.order-modal-card button {
  flex: 1;
  border: 0;
  border-radius: 9px;
  padding: 10px;
  font: 600 12px Vazirmatn;
  cursor: pointer;
}
.order-modal-card button:first-child {
  background: #27364a;
  color: var(--text);
}
.order-modal-card button:last-child {
  background: var(--danger);
  color: #fff;
}
.order-toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  background: #e6f8ed;
  color: #17613d;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s;
}
.order-toast.show {
  opacity: 1;
  transform: none;
}
  .order-card-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
  .order-actions {
    width: 100%;
    justify-content: space-between;
  }
  .order-card-bottom a {
    max-width: none;
    flex: 1;
  }
  .order-modal-card div {
    flex-direction: column;
  }
}
