:root {
  --primary-yellow: #facc15;
  --light-yellow: #fef08a;
  --dark-yellow: #eab308;
  --text-color-dark: #374151;
  --text-color-medium: #6b7280;
  --text-color-light: #9ca3af;
  --border-color-light: #e5e7eb;
  --bg-light-gray: #f9fafb;
  --error-red: #ef4444;
}

body {
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  background-color: var(--bg-light-gray);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 1.5rem;
  color: var(--text-color-dark);
}

@media (min-width: 640px) {
  body {
    padding: 2.5rem;
  }
}
@media (min-width: 1024px) {
  body {
    padding: 3rem;
  }
}

.ab-main-profile-container {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 1rem;
  overflow: visible;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 40px;
}

@media (min-width: 1024px) {
  .ab-main-profile-container {
    flex-direction: row;
  }
}

.ab-sidebar {
  width: 100%;
  padding: 1.5rem;
  background-color: rgba(233, 187, 79, 0.2);
  color: var(--text-color-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

@media (min-width: 640px) {
  .ab-sidebar {
    padding: 2rem;
  }
}
@media (min-width: 1024px) {
  .ab-sidebar {
    width: 30%;
    align-items: flex-start;
    border-bottom-left-radius: 1rem;
    border-top-right-radius: 0;
  }
}

.ab-profile-box {
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
  width: 100%;
  gap: 1.25rem;
  position: relative;
}
.ab-profile-initials {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--primary-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color-dark);
  z-index: 1;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  line-height: 1;
  position: relative;
}
.ab-profile-initials::before {
  content: attr(data-initials);
}
.ab-profile-box img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  object-fit: cover;
  background-color: transparent;
  display: none;
}
.ab-profile-box img[src]:not([src=""]) {
  display: block;
}
.ab-profile-box .ab-text-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #1f2937;
}
.ab-profile-box h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 !important;
}
.ab-profile-box p {
  font-size: 14px;
  color: #4b5563;
  margin: 0 !important;
}

.ab-menu-nav {
  width: 100%;
}
.ab-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ab-menu-nav button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 15px;
  border-radius: 0.625rem;
  transition: all 250ms ease-in-out;
  color: var(--text-color-dark);
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 1.05rem;
  text-align: left;
}
.ab-menu-nav button:hover {
  background-color: var(--primary-yellow);
  color: var(--text-color-dark);
  transform: translateY(-2px);
}
.ab-menu-nav button.active {
  background-color: #ffffff;
  color: var(--dark-yellow);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.ab-menu-nav button span {
  font-weight: 600;
  font-size: 1rem;
}

.ab-icon {
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: middle;
  margin-right: 0.85rem;
  display: inline-block;
}

.ab-content-area {
  flex: 1 1 0%;
  padding: 2.5rem;
  overflow-x: visible;
  overflow-y: visible;
  min-width: 0;
}

.ab-content-section h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color-dark);
  margin-bottom: 1.875rem;
  margin-top: 0 !important;
}

.ab-profile-section {
  position: relative;
}
.ab-edit-save-btn {
  padding: 0.625rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background-color: rgba(234, 179, 8, 0.1);
  color: #eab308;
  transition: all 200ms ease-in-out;
  border: 1px solid #eab308;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.ab-edit-save-btn:hover {
  background-color: #eab308;
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ab-profile-photo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2.5rem;
}
.ab-profile-photo-container::before {
  content: attr(data-initials);
  position: absolute;
  left: 0;
  top: 0;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background-color: var(--primary-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color-dark);
  z-index: 1;
  border: 4px solid var(--border-color-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  line-height: 1;
}
.ab-profile-photo-main {
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  border: 4px solid var(--border-color-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
  object-fit: cover;
  background-color: transparent;
  display: none;
}
.ab-profile-photo-main[src]:not([src=""]) {
  display: block;
}
.ab-profile-photo-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.ab-profile-photo-container span {
  color: var(--text-color-medium);
  font-weight: 500;
}

.ab-input-grid-wrapper {
  margin-top: 1.5rem;
}

.ab-input-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 15px;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .ab-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ab-input-group {
  margin-bottom: 0;
  position: relative;
}

.ab-input-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color-dark);
  margin-bottom: 0.5rem;
}
.ab-input-field {
  background-color: #ffffff;
  margin-top: 0.25rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border-color-light);
  border-radius: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 200ms ease-in-out;
}
.ab-input-field:focus {
  outline: 2px solid var(--primary-yellow);
  outline-offset: 2px;
  border-color: var(--primary-yellow);
  box-shadow: 0 0 0 calc(2px + 2px) var(--light-yellow);
}
.ab-input-field[readonly] {
  background-color: var(--bg-light-gray);
  border-color: var(--border-color-light);
  cursor: not-allowed;
}
.ab-input-field[readonly]:focus {
  outline: none;
  border-color: var(--border-color-light);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.ab-input-field.editable {
  background-color: #ffffff;
  border-color: var(--border-color-light);
  cursor: text;
}
.ab-input-field.ab-invalid {
  border-color: var(--error-red);
  box-shadow: 0 0 0 1px var(--error-red);
}
.ab-error-message {
  color: var(--error-red);
  font-size: 0.8rem;
  display: block;
  margin-top: 0.35rem;
  min-height: 1em;
}

#changePasswordContent .ab-input-group {
  margin-bottom: 1.25rem;
}

.ab-update-profile-btn-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
}

.ab-orders-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 20px;
}
.ab-orders-controls input[type="search"],
.ab-orders-controls select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color-light);
  border-radius: 0.5rem;
  font-size: 0.9rem;

  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.ab-orders-controls input[type="search"] {
  min-width: 200px;
  flex-grow: 1;
  max-width: 300px;
}
.ab-orders-controls select {
  width: 200px;
}
@media (min-width: 640px) {
  .ab-orders-controls input[type="search"] {
    flex-grow: 0;
  }
}

@media (max-width: 640px) {
  .ab-orders-controls {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    gap: 10px;
    width: 100%;
  }
  .ab-orders-controls input[type="search"] {
    max-width: 100% !important;
    width: 100% !important;
  }
  .ab-orders-controls select {
    width: 100% !important;
  }
}
.ab-orders-table-container {
  overflow-x: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  position: relative;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  width: 100%;
  max-width: 100%;
  max-height: 70vh;
  display: block;
}
.ab-orders-table-container::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.ab-orders-table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}
.ab-orders-table-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
  transition: background 0.3s ease;
}
.ab-orders-table-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
.ab-orders-table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0.75rem;
  overflow: visible;
  background-color: #ffffff;
  table-layout: auto;
}
.ab-orders-table thead {
  background-color: var(--bg-light-gray);
  position: sticky;
  top: 0;
  z-index: 10;
}
.ab-orders-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 2px solid var(--border-color-light);
  background-color: var(--bg-light-gray);
  position: sticky;
  top: 0;
}
.ab-orders-table th:first-child {
  padding-left: 1.75rem;
}
.ab-orders-table th:last-child {
  padding-right: 1.75rem;
}
.ab-orders-table th:nth-child(5) {
  width: 80px;
  text-align: center;
}
.ab-orders-table tbody {
  background-color: #ffffff;
}
.ab-orders-table tbody tr {
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.ab-orders-table tbody tr:hover {
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.ab-orders-table td {
  padding: 1.25rem 1.5rem;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text-color-medium);
  border-bottom: 1px solid var(--border-color-light);
  vertical-align: middle;
}
.ab-orders-table td:first-child {
  padding-left: 1.75rem;
}
.ab-orders-table td:last-child {
  padding-right: 1.75rem;
}
.ab-orders-table td:nth-child(5) {
  text-align: center;
  padding: 0.5rem;
}
.ab-orders-table tbody tr:last-child td {
  border-bottom: none;
}
.ab-orders-table td.ab-order-id {
  font-weight: 600;
  color: var(--text-color-dark);
  font-family: 'Courier New', monospace;
}
.ab-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: capitalize;
}
.ab-status-badge.ab-delivered {
  background-color: #d1fae5;
  color: #065f46;
}
.ab-status-badge.ab-processing {
  background-color: var(--light-yellow);
  color: var(--dark-yellow);
}
.ab-status-badge.ab-shipped {
  background-color: #dbeafe;
  color: #1e40af;
}
.ab-status-badge.ab-cancelled {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Responsive Table Styles */
@media (max-width: 768px) {
  .ab-content-area {
    padding: 1.5rem;
    overflow-x: visible;
  }
  .ab-orders-table-container {
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .ab-orders-table {
    min-width: 550px !important;
    width: auto;
    font-size: 0.85rem;
  }
  .ab-orders-table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .ab-orders-table th:first-child {
    padding-left: 1.25rem;
  }
  .ab-orders-table th:last-child {
    padding-right: 1.25rem;
  }
  .ab-orders-table td {
    padding: 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .ab-orders-table td:first-child {
    padding-left: 1.25rem;
  }
  .ab-orders-table td:last-child {
    padding-right: 1.25rem;
  }
}

@media (max-width: 640px) {
  .ab-orders-table-container {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--border-color-light);
    border-bottom: 1px solid var(--border-color-light);
    overflow-x: auto !important;
    overflow-y: auto;
    width: calc(100% + 2rem);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .ab-orders-table {
    min-width: 600px !important;
    width: auto;
    border-radius: 0;
    display: table;
  }
  .ab-orders-table th {
    padding: 0.65rem 0.85rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .ab-orders-table td {
    padding: 0.85rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .ab-orders-table-container::-webkit-scrollbar {
    height: 6px;
    display: block;
  }
}

@media (max-width: 480px) {
  .ab-orders-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  .ab-orders-table {
    min-width: 550px !important;
    width: auto;
  }
  .ab-orders-table th {
    padding: 0.6rem 0.75rem;
    font-size: 0.65rem;
    white-space: nowrap;
  }
  .ab-orders-table td {
    padding: 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
}

/* Smooth scrolling indicator */
.ab-orders-table-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 100%;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.ab-orders-table-container.scrollable::after {
  opacity: 1;
}

.ab-pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ab-pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color-light);
  background-color: #fff;
  color: var(--primary-yellow);
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.ab-pagination-btn:hover:not(:disabled) {
  background-color: var(--light-yellow);
  color: var(--dark-yellow);
}
.ab-pagination-btn:disabled {
  color: var(--text-color-light);
  cursor: not-allowed;
  background-color: var(--bg-light-gray);
}
.ab-page-indicator {
  padding: 0.5rem 0.75rem;
  color: var(--text-color-medium);
  font-size: 0.9rem;
}

.ab-password-form-container {
  margin-left: auto;
  margin-right: auto;
  display: grid;
}
.ab-password-form-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 20px;
}
.ab-profile-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.875rem;
}
.ab-profile-top-bar h3 {
  margin: 0 !important;
}
.ab-hidden {
  display: none !important;
}

/* View Order Button */
.ab-view-action {
  text-align: center;
  padding: 0.5rem;
}
.ab-view-order-btn {
  background-color: var(--primary-yellow);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}
.ab-view-order-btn:hover {
  background-color: var(--dark-yellow);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.4);
}
.ab-view-order-btn:active {
  transform: scale(0.95);
}

/* Order Products Modal */
.ab-order-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ab-order-modal.ab-active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}
.ab-order-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.ab-order-modal-content {
  position: relative;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.ab-order-modal.ab-active .ab-order-modal-content {
  transform: scale(1);
}
.ab-order-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color-light);
}
.ab-order-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color-dark);
}
.ab-order-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color-medium);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.ab-order-modal-close:hover {
  background-color: var(--bg-light-gray);
  color: var(--text-color-dark);
  transform: rotate(90deg);
}
.ab-order-modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}
.ab-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-color-medium);
}
.ab-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-light-gray);
  border-top-color: var(--primary-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.ab-order-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.ab-order-product-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color-light);
  border-radius: 0.75rem;
  background-color: #ffffff;
  transition: all 0.2s ease;
}
.ab-order-product-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.ab-order-product-image {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--bg-light-gray);
}
.ab-order-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ab-order-product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ab-order-product-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color-dark);
  line-height: 1.4;
}
.ab-order-product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-color-medium);
}
.ab-product-color,
.ab-product-size {
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-light-gray);
  border-radius: 0.25rem;
}
.ab-order-product-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--text-color-medium);
  margin-top: 0.5rem;
}
.ab-order-product-meta span {
  white-space: nowrap;
}
.ab-order-product-meta strong {
  color: var(--text-color-dark);
  font-weight: 600;
}
.ab-order-product-total {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color-light);
  color: var(--text-color-dark);
  font-size: 1rem;
}
@media (max-width: 768px) {
  .ab-order-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  .ab-order-modal-header {
    padding: 1rem 1.5rem;
  }
  .ab-order-modal-body {
    padding: 1.5rem;
  }
  .ab-order-products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .ab-order-product-item {
    flex-direction: column;
  }
  .ab-order-product-image {
    width: 100%;
    height: 200px;
  }
}
