.account-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem;
}

.account-sidebar {
  flex: 0 0 250px; /* Sidebar with fixed width */
}

.account-main {
  flex: 1; /* Main content takes the rest of the space */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-title {
  margin-left: 2rem
}

.account-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

.account-nav a {
  display: flex;
  align-items: center;
  padding: 1rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.account-nav a:hover {
  background-color: #f7f7f7;
  color: var(--primary);
}

.account-nav a.active {
  border-left-color: var(--primary);
  background-color: #f0fff0;
  color: var(--primary);
}

.account-nav i {
  margin-right: 0.8rem;
  width: 20px;
}

.account-section {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.section-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-family: var(--font-heading);
}

.section-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2);
}

.form-group input:disabled,
.form-group select:disabled {
  background-color: #f7f7f7;
  border-color: #e0e0e0;
  color: #555;
  cursor: not-allowed;
}

.form-actions {
  margin-top: 1.5rem;
  text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .account-layout {
    flex-direction: column;
  }

  .account-sidebar {
    width: 100%;
    flex: 0 0 auto;
  }
}

.order-history-card {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e3ebe5;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 20px rgba(26, 77, 46, 0.08);
}

.order-history-thumb-wrap {
  width: 96px;
  min-width: 96px;
}

.order-history-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e3ebe5;
}

.order-history-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-history-top,
.order-history-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.order-code {
  font-weight: 700;
  font-size: 1rem;
  color: #1a4d2e;
}

.order-date {
  color: #486454;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.order-status {
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #fff;
  text-transform: capitalize;
  white-space: nowrap;
}

.order-history-product .item-name {
  font-weight: 700;
  color: #122f1d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-history-product .item-qty {
  color: #486454;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.order-history-total .label {
  font-size: 0.8rem;
  color: #486454;
}

.order-history-total strong {
  display: block;
  margin-top: 0.2rem;
  color: #1a4d2e;
}

.order-detail-btn {
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  background-color: #1a4d2e;
}

.order-detail-btn:hover {
  background-color: #2d5a27;
}

@media (max-width: 768px) {
  .order-history-card {
    flex-direction: column;
  }

  .order-history-thumb-wrap,
  .order-history-thumb {
    width: 100%;
    height: 180px;
  }

  .order-history-top,
  .order-history-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .order-detail-btn {
    width: 100%;
  }
}

.account-alert {
  border-radius: 12px;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
}

.account-alert.error-state {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.account-helper,
.address-summary {
  background: #f6fbf7;
  border: 1px solid #dceee0;
  border-radius: 12px;
  color: #315a3c;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
}

.account-loading,
.empty-state-card {
  align-items: center;
  background: #f8fbf8;
  border: 1px dashed #cfe3d4;
  border-radius: 16px;
  color: #486454;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.empty-state-card svg {
  color: var(--green);
  height: 36px;
  width: 36px;
}

.empty-state-card h3 {
  color: var(--green);
  margin: 0;
}

.empty-state-card p {
  margin: 0;
}

.loading-dot {
  animation: pulseDot 1s infinite ease-in-out;
  background: var(--green);
  border-radius: 999px;
  height: 14px;
  width: 14px;
}

.account-nav a:focus-visible,
.account-form input:focus-visible,
.account-form select:focus-visible,
.order-detail-btn:focus-visible,
.account-section .btn:focus-visible {
  outline: 3px solid rgba(46, 125, 50, 0.24);
  outline-offset: 3px;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.35; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  .account-layout,
  .page-title {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
}
