/* Account page */

.account-page {
  padding: 3rem 0 5rem;
}

.account-page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.account-page-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  color: var(--color-text, #222);
}

.account-page-header p {
  margin: 0;
  color: var(--color-text-muted, #777);
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

.account-auth-card,
.account-info-card {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.account-auth-card {
  overflow: hidden;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--color-border, #e5e5e5);
}

.account-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--color-text-muted, #777);
  padding: 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.account-tab:hover {
  background: rgba(5, 102, 141, 0.04);
}

.account-tab.active {
  color: var(--color-primary, #05668d);
}

.account-tab.active::after {
  content: "";
  position: absolute;
  right: 20%;
  left: 20%;
  bottom: -1px;
  height: 2px;
  background: var(--color-primary, #05668d);
}

.account-auth-panel {
  padding: 2rem;
}

.account-auth-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--color-text, #222);
}

.account-auth-description {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted, #777);
  line-height: 1.8;
}

.account-form-field {
  margin-bottom: 1rem;
}

.account-form-field label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  font-weight: 600;
  color: var(--color-text, #222);
}

.account-form-field label span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-text-muted, #777);
}

.account-form-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 10px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #222);
  padding: 0.8rem 0.9rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-form-field input:focus {
  border-color: var(--color-primary, #05668d);
  box-shadow: 0 0 0 3px rgba(5, 102, 141, 0.1);
}

.account-form-field small {
  display: block;
  margin-top: 0.4rem;
  color: var(--color-text-muted, #777);
  font-size: 0.8rem;
}

.account-form-message {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #fff4f4;
  color: #a33;
  font-size: 0.9rem;
  line-height: 1.7;
}

.account-submit-btn {
  width: 100%;
  margin-top: 0.5rem;
}

.account-info-card {
  padding: 1.5rem;
}

.account-info-card h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--color-text, #222);
}

.account-info-card ul {
  margin: 0;
  padding: 0 1.1rem 0 0;
  color: var(--color-text-muted, #777);
  line-height: 2;
}

.account-info-card li {
  margin-bottom: 0.5rem;
}

/* Authenticated user card */

.account-user-card {
  max-width: 980px;
  margin: 0 auto 1.5rem;
  padding: 0;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 18px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.account-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background:
    linear-gradient(
      135deg,
      rgba(5, 102, 141, 0.08),
      rgba(5, 102, 141, 0.02)
    );
  border-bottom: 1px solid var(--color-border, #e5e5e5);
}

.account-user-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-primary, #05668d);
  font-size: 0.82rem;
  font-weight: 600;
}

.account-user-header h2 {
  margin: 0;
  color: var(--color-text, #222);
  font-size: 1.45rem;
  font-weight: 700;
}

.account-logout-btn {
  flex-shrink: 0;
  border: 1px solid var(--color-border, #dcdcdc);
  border-radius: 10px;
  background: var(--color-surface, #fff);
  color: var(--color-text-muted, #666);
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.account-logout-btn:hover {
  color: #a33;
  border-color: rgba(170, 50, 50, 0.3);
  background: #fff8f8;
}

.account-user-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border, #e5e5e5);
}

.account-user-detail {
  padding: 1.25rem 1.5rem;
  background: var(--color-surface, #fff);
}

.account-user-detail span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted, #777);
  font-size: 0.82rem;
}

.account-user-detail strong {
  display: block;
  color: var(--color-text, #222);
  font-size: 1rem;
  font-weight: 600;
  direction: rtl;
}

.account-user-actions {
  display: flex;
  justify-content: flex-start;
  padding: 1.25rem 1.5rem;
}

.account-user-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  text-decoration: none;
  border-radius: 10px;
}

/* Account dashboard */

.account-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.account-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 1.8rem;
  background:
    linear-gradient(
      135deg,
      rgba(5, 102, 141, 0.09),
      rgba(5, 102, 141, 0.025)
    );
  border-bottom: 1px solid var(--color-border, #e5e5e5);
}

.account-dashboard-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--color-primary, #05668d);
  font-size: 0.82rem;
  font-weight: 600;
}

.account-dashboard-header h2 {
  margin: 0;
  color: var(--color-text, #222);
  font-size: 1.45rem;
}

.account-dashboard-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 360px;
}

.account-dashboard-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-left: 1px solid var(--color-border, #e5e5e5);
  background: #fcfcfc;
}

.account-dashboard-nav-item {
  appearance: none;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-muted, #777);
  padding: 0.9rem 1rem;
  text-align: right;
  font: inherit;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.account-dashboard-nav-item + .account-dashboard-nav-item {
  margin-top: 0.35rem;
}

.account-dashboard-nav-item span {
  display: block;
  color: inherit;
  font-weight: 600;
}

.account-dashboard-nav-item small {
  display: block;
  margin-top: 0.25rem;
  color: var(--color-text-muted, #999);
  font-size: 0.76rem;
}

.account-dashboard-nav-item:hover {
  background: rgba(5, 102, 141, 0.05);
  color: var(--color-text, #333);
}

.account-dashboard-nav-item.active {
  background: rgba(5, 102, 141, 0.09);
  border-color: rgba(5, 102, 141, 0.18);
  color: var(--color-primary, #05668d);
}

.account-dashboard-content {
  min-width: 0;
  padding: 2rem;
}

.account-dashboard-panel {
  width: 100%;
}

.account-panel-header {
  margin-bottom: 1.75rem;
}

.account-panel-header h3 {
  margin: 0 0 0.4rem;
  color: var(--color-text, #222);
  font-size: 1.3rem;
}

.account-panel-header p {
  margin: 0;
  color: var(--color-text-muted, #777);
  line-height: 1.7;
}

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

.account-profile-item {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 12px;
  background: #fff;
}

.account-profile-item span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--color-text-muted, #777);
  font-size: 0.82rem;
}

.account-profile-item strong {
  display: block;
  color: var(--color-text, #222);
  font-size: 0.98rem;
  font-weight: 600;
}

.account-empty-state {
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--color-border, #dcdcdc);
  border-radius: 14px;
  background: #fcfcfc;
  text-align: center;
}

.account-empty-state h4 {
  margin: 0 0 0.5rem;
  color: var(--color-text, #333);
  font-size: 1rem;
}

.account-empty-state p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--color-text-muted, #777);
  line-height: 1.8;
  font-size: 0.9rem;
}

.account-orders,
.account-active-order {
  width: 100%;
}

.account-logout-btn {
  flex-shrink: 0;
  border: 1px solid var(--color-border, #dcdcdc);
  border-radius: 10px;
  background: var(--color-surface, #fff);
  color: var(--color-text-muted, #666);
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.account-logout-btn:hover {
  color: #a33;
  border-color: rgba(170, 50, 50, 0.3);
  background: #fff8f8;
}

@media (max-width: 760px) {
  .account-dashboard-body {
    grid-template-columns: 1fr;
  }

  .account-dashboard-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.75rem;
    border-left: 0;
    border-bottom: 1px solid var(--color-border, #e5e5e5);
  }

  .account-dashboard-nav-item {
    min-width: 150px;
    text-align: center;
  }

  .account-dashboard-nav-item + .account-dashboard-nav-item {
    margin-top: 0;
    margin-right: 0.4rem;
  }

  .account-dashboard-content {
    padding: 1.4rem;
  }
}

@media (max-width: 560px) {
  .account-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.25rem;
  }

  .account-dashboard-header h2 {
    font-size: 1.25rem;
  }

  .account-profile-grid {
    grid-template-columns: 1fr;
  }

  .account-dashboard-nav-item {
    min-width: 135px;
    padding: 0.8rem;
  }
}

@media (max-width: 900px) {
  .account-layout {
    grid-template-columns: 1fr;
    max-width: 680px;
  }
}

@media (max-width: 640px) {
  .account-page {
    padding: 2rem 0 4rem;
  }

  .account-user-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.25rem;
  }

  .account-user-details {
    grid-template-columns: 1fr;
  }

  .account-user-detail {
    padding: 1rem 1.25rem;
  }

  .account-user-actions {
    padding: 1rem 1.25rem;
  }

  .account-user-actions .btn {
    width: 100%;
  }

  .account-page-header h1 {
    font-size: 1.65rem;
  }

  .account-auth-panel {
    padding: 1.4rem;
  }

  .account-info-card {
    padding: 1.25rem;
  }
}

/* Account visibility states */
#account-auth-section[hidden],
#account-dashboard[hidden],
.account-dashboard-panel[hidden] {
  display: none !important;
}


/* Account order cards */

.account-order-card {
  width: 100%;
  box-sizing: border-box;
  padding: 1.25rem;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 14px;
  background: var(--color-surface, #fff);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.035);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.account-order-card + .account-order-card {
  margin-top: 1rem;
}

.account-order-card:hover {
  border-color: rgba(5, 102, 141, 0.24);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.055);
  transform: translateY(-1px);
}

.account-order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border, #ededed);
}

.account-order-label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--color-text-muted, #888);
  font-size: 0.78rem;
}

.account-order-number {
  display: block;
  color: var(--color-text, #222);
  font-size: 1rem;
  font-weight: 700;
  direction: ltr;
  text-align: right;
}

.account-order-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(5, 102, 141, 0.2);
  border-radius: 999px;
  background: rgba(5, 102, 141, 0.08);
  color: var(--color-primary, #05668d);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.account-order-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--color-border, #ededed);
  border-radius: 10px;
  background: var(--color-border, #ededed);
}

.account-order-detail {
  min-width: 0;
  padding: 0.9rem 1rem;
  background: var(--color-surface, #fff);
}

.account-order-detail span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-text-muted, #888);
  font-size: 0.76rem;
}

.account-order-detail strong {
  display: block;
  color: var(--color-text, #333);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .account-order-card {
    padding: 1rem;
  }

  .account-order-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-order-status {
    align-self: flex-start;
  }

  .account-order-details {
    grid-template-columns: 1fr;
  }

  .account-order-detail {
    padding: 0.8rem 0.9rem;
  }
}

/* Account order detail modal */

.account-order-modal-open {
  overflow: hidden;
}

.account-order-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 15, 15, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: accountOrderModalFadeIn 0.2s ease;
}

.account-order-detail-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
  background: var(--color-surface, #ffffff);
  border: 1px solid rgba(5, 102, 141, 0.18);
  border-radius: 20px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.18),
    0 4px 18px rgba(0, 0, 0, 0.08);
  animation: accountOrderModalSlideUp 0.24s ease;
}

.account-order-detail-dialog > p {
  margin: 0;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--color-text-muted, #777);
}

.account-order-detail-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--color-border, #ededed);
  background: linear-gradient(
    to bottom,
    rgba(5, 102, 141, 0.045),
    rgba(5, 102, 141, 0)
  );
}

.account-order-detail-dialog-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text, #222);
}

.account-order-modal-number {
  display: block;
  direction: ltr;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 600;
  color: #028090;
  letter-spacing: 0.02em;
}

.account-order-detail-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--color-border, #e5e5e5);
  border-radius: 50%;
  background: var(--color-surface, #fff);
  color: var(--color-text-muted, #777);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.account-order-detail-close:hover {
  color: #028090;
  border-color: rgba(5, 102, 141, 0.35);
  background: rgba(5, 102, 141, 0.06);
  transform: rotate(4deg);
}

.account-order-detail-close:focus-visible {
  outline: 2px solid rgba(5, 102, 141, 0.45);
  outline-offset: 2px;
}

.account-order-detail-body {
  overflow-y: auto;
  padding: 1.35rem 1.5rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(5, 102, 141, 0.35) transparent;
}

.account-order-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.account-order-modal-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--color-border, #ededed);
  border-radius: 12px;
  background: rgba(248, 248, 248, 0.72);
}

.account-order-modal-detail-label {
  font-size: 0.76rem;
  color: var(--color-text-muted, #777);
}

.account-order-modal-detail-value {
  min-width: 0;
  color: var(--color-text, #222);
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.account-order-modal-summary
.account-order-modal-detail:last-child
.account-order-modal-detail-value {
  color: #028090;
}

.account-order-modal-section {
  margin-top: 1.35rem;
}

.account-order-modal-section h4 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text, #222);
}

.account-order-modal-section h4::before {
  content: "";
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 4px;
  background: #05668d;
}

.account-order-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.account-order-modal-detail-full {
  grid-column: 1 / -1;
}

.account-order-modal-items {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.account-order-modal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--color-border, #ededed);
  border-radius: 12px;
  background: var(--color-surface, #fff);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.account-order-modal-item:hover {
  border-color: rgba(5, 102, 141, 0.22);
  background: rgba(5, 102, 141, 0.025);
}

.account-order-modal-item-name {
  min-width: 0;
  color: var(--color-text, #222);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.account-order-modal-item-quantity {
  white-space: nowrap;
  color: var(--color-text-muted, #777);
  font-size: 0.78rem;
}

.account-order-modal-item-total {
  white-space: nowrap;
  direction: rtl;
  color: #028090;
  font-size: 0.84rem;
  font-weight: 700;
}

.account-order-modal-section > p {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--color-border, #ddd);
  border-radius: 12px;
  text-align: center;
  color: var(--color-text-muted, #777);
  font-size: 0.85rem;
}

.account-order-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--color-border, #ededed);
  background: linear-gradient(
    to top,
    rgba(5, 102, 141, 0.055),
    rgba(5, 102, 141, 0)
  );
}

.account-order-modal-footer span {
  color: var(--color-text-muted, #666);
  font-size: 0.85rem;
  font-weight: 600;
}

.account-order-modal-footer strong {
  direction: rtl;
  color: #028090;
  font-size: 1.05rem;
  font-weight: 800;
}

@keyframes accountOrderModalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes accountOrderModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .account-order-detail-modal {
    align-items: flex-end;
    padding: 0;
  }

  .account-order-detail-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .account-order-detail-dialog-header {
    padding: 1.1rem 1rem;
  }

  .account-order-detail-dialog-header h3 {
    font-size: 1.05rem;
  }

  .account-order-detail-close {
    width: 36px;
    height: 36px;
  }

  .account-order-detail-body {
    padding: 1rem;
  }

  .account-order-modal-summary {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 1.15rem;
  }

  .account-order-modal-grid {
    grid-template-columns: 1fr;
  }

  .account-order-modal-detail-full {
    grid-column: auto;
  }

  .account-order-modal-item {
    grid-template-columns: 1fr auto;
    gap: 0.45rem 0.75rem;
  }

  .account-order-modal-item-name {
    grid-column: 1 / -1;
  }

  .account-order-modal-item-quantity {
    grid-column: 1;
  }

  .account-order-modal-item-total {
    grid-column: 2;
    grid-row: 2;
  }

  .account-order-modal-footer {
    padding: 1rem;
  }

  .account-order-modal-footer strong {
    font-size: 0.95rem;
  }
}


/* Order milestone graphic */

.account-order-milestone {
  margin: 24px 0 28px;
  padding: 22px 20px 24px;
  border: 1px solid rgba(5, 102, 141, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(5, 102, 141, 0.08),
      transparent 58%
    ),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 14px 35px rgba(31, 24, 12, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.account-order-milestone-title {
  margin-bottom: 26px;
  color: #29251d;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.account-order-milestone-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  direction: rtl;
  padding: 0 8px;
}

.account-order-milestone-line {
  position: absolute;
  top: 28px;
  right: 8%;
  left: 8%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.account-order-milestone-progress {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #05668d 0%,
      #028090 45%,
      #02c39a 100%
    );
  box-shadow:
    0 0 12px rgba(5, 102, 141, 0.28);
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-order-milestone-step {
  position: relative;
  z-index: 2;
  display: flex;
  width: 20%;
  min-width: 72px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.account-order-milestone-circle {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 3px solid #ddd9d0;
  border-radius: 50%;
  background: #ffffff;
  color: #aaa49a;
  box-shadow:
    0 5px 14px rgba(31, 24, 12, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.account-order-milestone-circle svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-order-milestone-label {
  color: #9b968d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.account-order-milestone-step.is-completed
  .account-order-milestone-circle {
  border-color: #05668d;
  background:
    linear-gradient(145deg, #e6f5ef, #00a896);
  color: #fff;
  box-shadow:
    0 7px 18px rgba(5, 102, 141, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.account-order-milestone-step.is-completed
  .account-order-milestone-label {
  color: #028090;
}

.account-order-milestone-step.is-current
  .account-order-milestone-circle {
  width: 66px;
  height: 66px;
  margin-top: -5px;
  border-color: #05668d;
  background:
    radial-gradient(
      circle at 35% 30%,
      #f0f3bd 0%,
      #02c39a 52%,
      #05668d 100%
    );
  color: #fff;
  box-shadow:
    0 0 0 7px rgba(5, 102, 141, 0.10),
    0 0 0 13px rgba(5, 102, 141, 0.045),
    0 12px 28px rgba(5, 102, 141, 0.30);
  transform: scale(1.02);
}

.account-order-milestone-step.is-current
  .account-order-milestone-circle svg {
  width: 29px;
  height: 29px;
}

.account-order-milestone-step.is-current
  .account-order-milestone-label {
  color: #05668d;
  font-weight: 900;
  transform: translateY(2px);
}

.account-order-milestone-step.is-upcoming
  .account-order-milestone-circle {
  opacity: 0.88;
}

.account-order-milestone-cancelled {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 13px 15px;
  border: 1px solid rgba(150, 58, 58, 0.16);
  border-radius: 15px;
  background: rgba(150, 58, 58, 0.045);
  color: #813d3d;
}

.account-order-milestone-cancelled-icon {
  display: flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(150, 58, 58, 0.25);
  border-radius: 50%;
  background: rgba(150, 58, 58, 0.08);
  font-size: 1.2rem;
  font-weight: 700;
}

.account-order-milestone-cancelled span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-order-milestone-cancelled strong {
  font-size: 0.78rem;
  font-weight: 800;
}

.account-order-milestone-cancelled small {
  color: #9a6c6c;
  font-size: 0.68rem;
}

@media (max-width: 640px) {
  .account-order-milestone {
    margin: 20px 0 24px;
    padding: 18px 14px 20px;
    border-radius: 18px;
  }

  .account-order-milestone-title {
    margin-bottom: 22px;
  }

  .account-order-milestone-track {
    padding: 0 2px;
  }

  .account-order-milestone-line {
    top: 25px;
    right: 7%;
    left: 7%;
    height: 6px;
  }

  .account-order-milestone-circle {
    width: 48px;
    height: 48px;
    border-width: 2px;
  }

  .account-order-milestone-circle svg {
    width: 21px;
    height: 21px;
  }

  .account-order-milestone-step {
    min-width: 52px;
    gap: 8px;
  }

  .account-order-milestone-label {
    font-size: 0.62rem;
  }

  .account-order-milestone-step.is-current
    .account-order-milestone-circle {
    width: 56px;
    height: 56px;
    margin-top: -4px;
  }

  .account-order-milestone-step.is-current
    .account-order-milestone-circle svg {
    width: 24px;
    height: 24px;
  }

  .account-order-milestone-cancelled {
    padding: 11px 12px;
  }
}
