:root {
  --primary: #16a34a;
  --primary-soft: #dcfce7;
  --card: #ffffff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --danger: #ef4444;
  --bg-soft: #f3f4f6;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 18px;
}

/* ---- Account Layout ---- */
.account-wrapper {
  padding: 32px 0 48px;
}

.account-header {
  margin-bottom: 24px;
}

.account-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.account-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Breadcrumb chỉ áp dụng trong account wrapper */
.account-wrapper .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.account-wrapper .breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  padding: 0 0.5rem;
}

/* ---- Sidebar ---- */
.account-sidebar {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px;
}

.account-user {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.account-user > div:last-child {
  flex: 1;
  min-width: 0;
}

.account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #e5f5eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  margin-right: 12px;
  flex-shrink: 0;
}

.account-user-name {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.account-user-email {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  cursor: help;
}

.account-user-email:hover::after {
  content: attr(data-email);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 8px;
  padding: 6px 10px;
  background: #1f2937;
  color: #fff;
  font-size: 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-out forwards;
}

.account-user-email:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 2px;
  border: 5px solid transparent;
  border-top-color: #1f2937;
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease-out forwards;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
  }
}

.account-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 6px;
}

.account-menu .list-group-item {
  border: none;
  padding: 9px 0;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #111827;
  background: transparent;
  text-decoration: none;
  transition: color 0.2s;
}

.account-menu .list-group-item:hover {
  color: var(--primary);
  text-decoration: none;
}

.account-menu .list-group-item i {
  width: 22px;
  font-size: 0.95rem;
  color: var(--muted);
  margin-right: 10px;
  transition: color 0.2s;
}

.account-menu .list-group-item:hover i {
  color: var(--primary);
}

.account-menu .list-group-item.active {
  color: var(--primary);
  font-weight: 600;
}

.account-menu .list-group-item.active i {
  color: var(--primary);
}

.account-menu .list-group-item.logout {
  color: var(--danger);
  margin-top: 6px;
}

.account-menu .list-group-item.logout:hover {
  color: var(--danger);
}

.account-menu .list-group-item.logout i {
  color: var(--danger);
}

.account-menu .divider {
  border-top: 1px dashed #e5e7eb;
  margin: 10px 0;
}

/* ---- Content Cards ---- */
.account-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 20px 20px 18px;
  margin-bottom: 18px;
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.account-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.account-card-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.account-card-header .badge-soft {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

.account-card-body {
  margin-top: 8px;
}

.account-card-body .form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #111827;
}

.account-card-body .form-control {
  border-radius: 10px;
  border-color: #e5e7eb;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.account-card-body .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.15rem rgba(22, 163, 74, 0.18);
  outline: none;
}

.account-card-body .form-control:disabled {
  background-color: #f3f4f6;
  opacity: 1;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  gap: 6px;
}

.btn-soft {
  border-radius: 999px;
  font-size: 0.88rem;
  padding: 7px 16px;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-soft-outline {
  border: 1px solid var(--border);
  background: #fff;
  color: #111827;
}

.btn-soft-outline:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: var(--border);
}

.btn-soft-primary {
  background: var(--primary);
  color: #fff;
}

.btn-soft-primary:hover {
  background: #15803d;
  color: #fff;
}

.text-muted-small {
  font-size: 0.8rem;
  color: var(--muted);
}

.address-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #f3f4f6;
  color: #4b5563;
  margin-top: 4px;
}

.account-card-body hr {
  margin: 20px 0;
  border-top: 1px solid var(--border);
}

/* Validation error styles */
.account-card-body .text-danger {
  font-size: 0.8rem;
  margin-top: 4px;
  display: block;
}

.account-card-body .field-validation-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 4px;
  display: block;
}

/* Address Warning Alert */
.address-warning-alert {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

/* Full-width alert for layout */
.address-warning-alert-global {
  width: 100%;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-top: 1px solid #f59e0b;
  border-bottom: 1px solid #f59e0b;
  padding: 0;
}

.address-warning-alert-global .address-warning-alert {
  max-width: 1200px;
  margin: 0 auto;
  border: none;
  border-radius: 0;
  padding: 14px 20px;
  background: transparent;
  box-shadow: none;
}

.address-warning-alert i {
  color: #f59e0b;
  font-size: 1.25rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.address-warning-alert-content {
  flex: 1;
}

.address-warning-alert-content h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #92400e;
  margin: 0 0 6px 0;
}

.address-warning-alert-content p {
  font-size: 0.85rem;
  color: #78350f;
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.address-warning-alert-content .btn-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f59e0b;
  text-decoration: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.address-warning-alert-content .btn-link:hover {
  color: #d97706;
  text-decoration: underline;
}

.address-warning-alert-content .btn-link i {
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .account-wrapper {
    padding-top: 20px;
    padding-bottom: 32px;
  }

  .account-sidebar {
    margin-bottom: 20px;
  }

  .account-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-card-header .badge-soft {
    margin-top: 8px;
  }
}

@media (max-width: 575.98px) {
  .account-actions {
    flex-direction: column;
  }

  .btn-soft {
    width: 100%;
  }

  .btn-soft-outline {
    margin-right: 0;
    margin-bottom: 6px;
  }
}
