/* ============================================
   Custom Styles
   Bootstrap 5.3 Local
   ============================================ */

/* ===== Icon Styles ===== */
img[alt="login"],
img[alt="logout"],
img[alt="save"],
img[alt="cancel"],
img[alt="back"],
img[alt="add"],
img[alt="update"],
img[alt="profile"],
img[alt="password"] {
  display: inline-block;
  vertical-align: middle;
  filter: brightness(0) saturate(100%) invert(1);
}

/* Icons in all buttons - make them bright/white */
.btn img[alt="login"],
.btn img[alt="logout"],
.btn img[alt="save"],
.btn img[alt="cancel"],
.btn img[alt="back"],
.btn img[alt="add"],
.btn img[alt="update"],
.btn img[alt="profile"],
.btn img[alt="password"],
.btn img[alt="location-dot"],
.btn img[alt="money-check-dollar"],
.btn img[alt="boxes-stacked"] {
  filter: brightness(0) saturate(100%) invert(1);
}

/* Icons in dropdown menu items */
.dropdown-item img[alt="profile"],
.dropdown-item img[alt="password"],
.dropdown-item img[alt="update"],
.dropdown-item img[alt="save"],
.dropdown-item img[alt="logout"] {
  filter: brightness(0) saturate(100%) invert(16%) sepia(7%) saturate(456%)
    hue-rotate(184deg) brightness(92%) contrast(92%);
}

/* ===== Utility Helpers ===== */
.icon-inline {
  display: inline-block;
  vertical-align: middle;
}

.scrollable-list-260 {
  max-height: 260px;
  overflow-y: auto;
}

.table-text-wrap-220 {
  max-width: 220px;
  white-space: normal;
}

.table-text-wrap-260 {
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
}

.avatar-img {
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 2px solid transparent;
}

.avatar-img-sm {
  width: 32px;
  height: 32px;
}

.avatar-img-md {
  width: 40px;
  height: 40px;
}

.avatar-img-lg {
  width: 64px;
  height: 64px;
}

.avatar-border-light {
  border-color: rgba(255, 255, 255, 0.3);
}

.avatar-border-muted {
  border-color: #dee2e6;
}

.avatar-placeholder {
  border-radius: 50%;
  border: 2px solid #dee2e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-placeholder-sm {
  width: 32px;
  height: 32px;
}

.avatar-placeholder-md {
  width: 40px;
  height: 40px;
}

.avatar-placeholder-lg {
  width: 64px;
  height: 64px;
}

.avatar-placeholder-light {
  border-color: rgba(255, 255, 255, 0.3);
}

.avatar-initial-sm {
  font-size: 0.875rem;
  font-weight: 700;
}

.avatar-initial-lg {
  font-size: 1.5rem;
  font-weight: 700;
}

.search-input-wide {
  min-width: 260px;
  max-width: 420px;
}

.coordinate-input {
  width: 140px;
}

.form-control-static {
  background-color: #e9ecef;
}

.image-preview-lg {
  max-width: 200px;
  height: auto;
  border: 2px solid #dee2e6;
}

.alert-feedback-success {
  color: #0a3622;
  background-color: #d1e7dd;
}

.alert-feedback-danger {
  color: #3d0f14;
  background-color: #f8d7da;
}

.alert-feedback-text-success {
  color: #0a3622;
  font-weight: 500;
}

.alert-feedback-text-danger {
  color: #3d0f14;
  font-weight: 500;
}

/* ===== Root Variables ===== */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --border-radius: 0.5rem;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* ===== Global Styles ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(
    90deg,
    rgba(110, 107, 110, 1) 0%,
    rgba(161, 161, 161, 1) 35%,
    rgba(240, 240, 240, 1) 68%
  );
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 2rem;
}

body.logged-in {
  background: #f8f9fa;
}

/* ===== Navbar Styles ===== */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(
    90deg,
    rgba(2, 0, 36, 1) 0%,
    rgba(9, 9, 121, 1) 35%,
    rgba(4, 111, 189, 1) 68%
  );
}

.navbar .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  padding: 0.125rem 0;
  line-height: 1.2;
}

.navbar-nav .nav-link {
  color: #c0c3cf;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  border-radius: 0.375rem;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .dropdown-menu {
  border: none;
  box-shadow: var(--box-shadow-lg);
  margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.navbar-nav .dropdown-item:hover {
  background-color: var(--light-color);
}

.navbar-nav .dropdown-menu .profile-dropdown-name {
  color: #1c2751;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.navbar-nav .dropdown-menu .profile-dropdown-email {
  color: #25325e;
  font-weight: 500;
  letter-spacing: 0.015em;
}

/* ===== Container & Layout ===== */
.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Content container (not navbar) */
.container-fluid.content-container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.form-control::placeholder {
  color: #afb4c4;
  opacity: 1;
}
.form-control:-ms-input-placeholder {
  color: #afb4c4;
}
.form-control::-ms-input-placeholder {
  color: #afb4c4;
}

/* Desktop: Reduce navbar height */
@media (min-width: 992px) {
  .navbar {
    padding: 0.25rem 0;
    min-height: 48px;
  }

  .navbar .container-fluid {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .navbar-nav .nav-link {
    padding: 0.375rem 0.875rem;
  }
}

@media (min-width: 1200px) {
  .container-fluid {
    padding: 1.5rem;
  }

  .container-fluid.content-container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .navbar .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
}

/* ===== Card Styles ===== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
  transition: var(--transition);
  overflow: hidden;
}

.card-header {
  background-color: #004526;
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem 1.5rem;
}

.login-card-header {
  background: linear-gradient(
    90deg,
    rgba(2, 0, 36, 1) 0%,
    rgba(9, 9, 121, 1) 35%,
    rgba(4, 111, 189, 1) 68%
  );
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem 1.5rem;
}

.card-header.bg-white {
  background: white;
  color: var(--dark-color);
  border-bottom: 2px solid var(--light-color);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

/* ===== Login Page ===== */
body:not(.logged-in) {
  position: relative;
  padding: 0 !important;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(
    circle at top left,
    #6d83f2 0%,
    #3b53d6 28%,
    #0c1c4d 85%
  );
  color: #e9ecff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:not(.logged-in)::before,
body:not(.logged-in)::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.6;
  z-index: 0;
}

body:not(.logged-in)::before {
  width: 420px;
  height: 420px;
  background: rgba(108, 99, 255, 0.45);
  top: -120px;
  right: -120px;
}

body:not(.logged-in)::after {
  width: 520px;
  height: 520px;
  background: rgba(0, 204, 255, 0.35);
  bottom: -140px;
  left: -160px;
}

body:not(.logged-in) .container-fluid.content-container {
  position: relative;
  z-index: 1;
  padding: clamp(1.5rem, 4vw, 3rem);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

body:not(.logged-in) .container-fluid.content-container .alert {
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.login-container {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  min-height: 0;
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.login-container::before {
  content: "";
  position: absolute;
  inset: clamp(0rem, 2vw, 1rem);
  background: none;
  z-index: 0;
  backdrop-filter: blur(10px);
}

.login-illustration {
  position: relative;
  z-index: 1;
  flex: 0 1 420px;
}

.login-illustration-card {
  background: linear-gradient(
    160deg,
    rgba(15, 28, 79, 0.9) 0%,
    rgba(9, 19, 59, 0.7) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(1.25rem, 3vw, 1.75rem);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  color: #f5f7ff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 60px rgba(1, 9, 49, 0.35);
}

.login-illustration-card::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(102, 177, 255, 0.45) 0%,
    transparent 65%
  );
  filter: blur(10px);
  z-index: 0;
}

.login-illustration-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.login-illustration-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.login-illustration-text {
  font-size: 1rem;
  color: rgba(226, 232, 255, 0.9);
  margin-bottom: 1.25rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.login-illustration-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
}

.login-illustration-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
  color: rgba(232, 236, 255, 0.94);
  position: relative;
  padding-left: 1.6rem;
}

.login-illustration-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #63f2ff 0%, #4d76ff 100%);
  box-shadow: 0 0 12px rgba(80, 140, 255, 0.7);
}

.login-illustration-footer {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 255, 0.72);
  position: relative;
  z-index: 1;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  border-radius: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid #293079;
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.85) 60%,
      rgba(243, 246, 255, 0.92) 100%
    )
    border-box;
  box-shadow: 0 35px 45px rgba(9, 19, 59, 0.5);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  mix-blend-mode: soft-light;
}

.login-card-header {
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 2.25rem)
    clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.login-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(77, 139, 255, 0.16) 0%,
    rgba(70, 45, 255, 0.08) 100%
  );
  margin-bottom: 1.25rem;
  box-shadow: inset 0 0 18px rgba(76, 128, 255, 0.18);
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-title {
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #dddfea;
}

.login-subtitle {
  font-size: 0.98rem;
  color: #1e61ff;
  letter-spacing: 0.01em;
}

.login-card .card-body {
  padding: clamp(2rem, 4vw, 2.5rem);
}

.login-form .form-floating {
  position: relative;
}

.login-form .form-control {
  border-radius: 0.85rem;
  border: 1px solid rgba(107, 113, 122, 0.15);
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 25px rgba(76, 132, 255, 0.08);
  transition: all 0.25s ease;
  color: #0f1c4f;
}

.login-form .form-control::placeholder {
  color: transparent;
}

.login-form .form-control:focus {
  background-color: #ffffff;
}

.login-form .form-floating > label {
  color: #9ea4b3;
  font-weight: 500;
  transition: var(--transition);
  font-size: 1rem;
}

.login-form .form-control:focus ~ label,
.login-form .form-control:not(:placeholder-shown) ~ label {
  color: #959aaa;
  font-size: 0.9rem;
}

.login-form .invalid-feedback {
  font-size: 0.8rem;
  color: #d63384;
}

.btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem !important;
  border-radius: 0.9rem;
  border: none;
  background-image: linear-gradient(
    135deg,
    #4857ff 0%,
    #6c8dff 40%,
    #00c2ff 100%
  );
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 18px 35px rgba(30, 71, 180, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover,
.btn-gradient:focus {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(30, 71, 180, 0.4);
  color: #ffffff;
}

.btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 12px 28px rgba(30, 71, 180, 0.26);
}

.login-support {
  color: #5c6d99;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.login-support small {
  font-size: 0.85rem;
}

@media (max-width: 1199.98px) {
  .login-container {
    flex-direction: column;
    gap: clamp(1rem, 3vw, 2rem);
  }

  .login-container::before {
    inset: clamp(0.5rem, 5vw, 1.5rem);
  }

  .login-illustration {
    width: 100%;
    display: flex !important;
    justify-content: center;
  }

  .login-illustration-card {
    max-width: 520px;
  }
}

.bg-head-green1 {
  background: #064f33;
}

.bg-head-green2 {
  background: #0b6a44;
}

.bg-head-green3 {
  background: #148558;
}

.bg-head-green4 {
  background: #1faf70;
}

@media (max-width: 991.98px) {
  .login-illustration {
    display: none !important;
  }

  .login-container {
    padding: clamp(1rem, 4vw, 1.75rem) 0;
  }

  .login-card {
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  body:not(.logged-in) .container-fluid.content-container {
    padding: clamp(1.25rem, 6vw, 1.75rem);
  }

  .login-container::before {
    inset: clamp(0.2rem, 4vw, 0.75rem);
  }

  .login-card {
    max-width: 100%;
  }

  .login-card-header {
    padding-bottom: clamp(1.35rem, 5vw, 1.75rem);
  }

  .login-title {
    font-size: clamp(1.5rem, 6vw, 1.9rem);
  }

  .btn-gradient {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  body:not(.logged-in) {
    background: linear-gradient(160deg, #272c6c 0%, #101742 100%);
  }

  body:not(.logged-in)::before,
  body:not(.logged-in)::after {
    display: none;
  }

  .login-container {
    padding: 1.25rem 0;
  }

  .login-container::before {
    display: none;
  }

  .login-card {
    border-radius: 1.25rem;
    box-shadow: 0 22px 45px rgba(3, 10, 45, 0.35);
  }

  .login-form .form-control {
    border-radius: 0.75rem;
  }

  .btn-gradient {
    padding: 0.85rem 1rem;
    letter-spacing: 0.04em;
  }

  .login-support {
    color: #4f5b88;
  }
}

/* ===== Dashboard Cards ===== */
.dashboard-card {
  border-left: 4px solid;
  transition: var(--transition);
  height: 100%;
}

.dashboard-card.primary {
  border-left-color: var(--primary-color);
}

.dashboard-card.info {
  border-left-color: var(--info-color);
}

.dashboard-card.success {
  border-left-color: var(--success-color);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg);
}

.dashboard-card .card-body {
  padding: 1.5rem;
}

.dashboard-card h5 {
  color: #6c757d;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.dashboard-card h2,
.dashboard-card h4 {
  margin: 0;
  font-weight: 700;
}

/* ===== Table Styles ===== */
.table-responsive {
  border-radius: var(--border-radius);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  display: block;
  position: relative;
  border: 1px solid #dee2e6;
}

.table-responsive .table {
  width: 100%;
  margin-bottom: 0;
  min-width: 900px; /* Ensure table has minimum width for horizontal scroll */
  display: table;
  table-layout: auto;
}

.table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th,
.table tbody td {
  border: 1px solid #dee2e6;
}

.table thead th {
  border-bottom: 2px solid #dee2e6;
}

.table thead {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  color: #212529;
}

.table thead th {
  border: 1px solid #dee2e6;
  border-bottom: 2px solid #dee2e6;
  padding: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: center;
}

.table thead th:first-child {
  border-left: 1px solid #dee2e6;
}

.table thead th:last-child {
  border-right: 1px solid #dee2e6;
}

.table thead th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.table thead th.sortable:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

.table thead th.sortable .sort-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.table thead th.sortable .sort-link:hover {
  color: inherit;
  text-decoration: none;
}

.order-items-table .order-col-item {
  width: 35%;
}

.order-items-table .order-col-qty,
.order-items-table .order-col-unit,
.order-items-table .order-col-action {
  width: 10%;
}

.order-items-table .order-col-price,
.order-items-table .order-col-discount,
.order-items-table .order-col-total {
  width: 15%;
}

/* Desktop: Show table, hide cards */
.order-items-cards {
  display: none;
}

/* Mobile card styles */
.order-item-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background-color: #fff;
}

.order-item-card:last-child {
  margin-bottom: 0;
}

.order-item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* margin-bottom: 0.75rem; */
  padding-bottom: 0.1rem;
  /* border-bottom: 1px solid #e9ecef; */
}

.order-item-card-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #212529;
  margin: 0;
  flex: 1;
  padding-right: 0.5rem;
}

.order-item-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-item-card-row {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  line-height: 1.5;
}

.order-item-card-label {
  color: #6c757d;
  font-weight: 500;
}

.order-item-card-value {
  color: #212529;
  font-weight: 600;
  text-align: right;
}

.order-item-card-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 0.5rem;
}

.order-item-card-actions .btn {
  flex: 1;
}

/* Mobile: Show cards, hide table */
@media (max-width: 767.98px) {
  .order-items-wrapper .order-items-table {
    display: none;
  }

  .order-items-cards {
    display: block;
  }

  /* Reduce font size for mobile card detail */
  .order-item-card-title {
    font-size: 0.8125rem;
  }

  .order-item-card-row {
    font-size: 0.75rem;
  }

  .order-item-card-value {
    font-size: 0.75rem;
  }
}

.stock-info-table .stock-col-name {
  width: 30%;
}

.stock-info-table .stock-col-factory {
  width: 18%;
}

.stock-info-table .stock-col-group {
  width: 16%;
}

.stock-info-table .stock-col-unit {
  width: 10%;
}

.stock-info-table .stock-col-price {
  width: 12%;
}

.stock-info-table .stock-col-discount {
  width: 7%;
}

.stock-info-table .stock-col-stock {
  width: 7%;
}

.stock-info-row {
  cursor: pointer;
}

.modal-header-muted {
  background-color: #e9ecef;
  border-bottom: 1px solid #dee2e6;
}

.modal-header-muted .modal-title {
  color: #212529;
  font-weight: 600;
}

.modal-footer-muted {
  background-color: #e9ecef;
  border-top: 1px solid #dee2e6;
}

.password-field .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #b5bdc4;
  padding: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  color: #b5bdc4;
}

.password-toggle:hover img,
.password-toggle:focus img {
  filter: none;
}

.password-toggle:focus {
  outline: none;
}

.password-toggle img {
  pointer-events: none;
  width: 1.2rem;
  height: 1.2rem;
  filter: none;
}

.table thead th.sortable .sort-icon {
  opacity: 0.7;
  transition: opacity 0.2s;
  display: inline-block;
  margin-left: 0.25rem;
  filter: brightness(0) saturate(100%) invert(0.2);
}

.table thead th.sortable:hover .sort-icon {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(0);
}

.table thead th.sortable .sort-link {
  color: #212529;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

.table tbody td {
  padding: 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
  border: 1px solid #dee2e6;
}

.table tbody td:first-child {
  border-left: 1px solid #dee2e6;
}

.table tbody td:last-child {
  border-right: 1px solid #dee2e6;
}

.table tbody tr:last-child td {
  border-bottom: 1px solid #dee2e6;
}

.table img.rounded-circle {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 2px solid #dee2e6;
  transition: var(--transition);
}

.table img.rounded-circle:hover {
  border-color: var(--primary-color);
  transform: scale(1.1);
}

/* ===== Badge Styles ===== */
.badge {
  font-weight: 600;
  padding: 0.5em 0.75em;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.badge.bg-success {
  background-color: var(--success-color) !important;
}

.badge.bg-danger {
  background-color: var(--danger-color) !important;
}

.badge.bg-info {
  background-color: var(--info-color) !important;
  color: var(--dark-color);
}

/* ===== Form Styles ===== */
.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.form-control {
  border: 2px solid #e9ecef;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select {
  border: 2px solid #e9ecef;
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* ===== Map & Location Styles ===== */
.mapbox-wrapper {
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: 320px;
  position: relative;
}

.mapbox-wrapper.mapbox-height-280 {
  min-height: 280px;
}

.mapbox-wrapper.mapbox-height-240 {
  min-height: 240px;
}

#customerLocationMap {
  width: 100%;
  min-height: 320px;
}

.mapbox-canvas-260 {
  min-height: 260px;
}

.mapbox-canvas-220 {
  min-height: 220px;
}

.coordinate-picker-map {
  height: 320px;
  border-radius: 0.5rem;
}

.map-canvas-large {
  width: 100%;
  height: 520px;
  border-radius: 0.75rem;
  overflow: hidden;
}

.mapbox-geocoder-container .mapboxgl-ctrl-geocoder {
  min-width: 100%;
  max-width: 100%;
  box-shadow: none;
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  padding-left: 2.5rem;
  position: relative;
}

.mapbox-geocoder-container .mapboxgl-ctrl-geocoder--input {
  font-size: 0.95rem;
  padding: 0;
  border: none;
  box-shadow: none;
}

.mapbox-geocoder-container .mapboxgl-ctrl-geocoder--pin-right {
  right: 12px;
}

.mapbox-geocoder-container
  .mapboxgl-ctrl-geocoder
  > .mapboxgl-ctrl-geocoder--icon {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

.location-feedback {
  min-height: 1.5rem;
}

.mapbox-wrapper.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  z-index: 1080;
  border: none;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 1rem 1rem;
}

.mapbox-wrapper.fullscreen #customerLocationMap {
  width: 100%;
  max-width: 720px;
  height: 100%;
  min-height: calc(100vh - 6rem);
  border-radius: 0.75rem;
  box-shadow: var(--box-shadow-lg);
}

.mapbox-wrapper .mapbox-close {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: none;
  box-shadow: var(--box-shadow);
}

.mapbox-wrapper.fullscreen .mapbox-close {
  display: inline-flex;
}

.map-action-icon {
  filter: invert(1) brightness(1.8) contrast(1.1);
  transition: filter 0.2s ease;
}

.btn-outline-primary:hover .map-action-icon,
.btn-outline-primary:focus .map-action-icon,
.btn-outline-success:hover .map-action-icon,
.btn-outline-success:focus .map-action-icon {
  filter: invert(1) brightness(2.2) contrast(1.1);
}

body.mapbox-fullscreen-open {
  overflow: hidden;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger-color);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success-color);
}

/* ===== Button Styles ===== */
.btn {
  border-radius: 0.375rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653a8f 100%);
}

/* ===== Alert Styles ===== */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: 1rem 1.5rem;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

div.alert.alert-success {
  background-color: #d1e7dd;
  border-left: 4px solid var(--success-color);
  color: #0a3622;
}

div.alert.alert-success,
div.alert.alert-success *,
div.alert.alert-success p,
div.alert.alert-success span,
div.alert.alert-success div,
div.alert.alert-success strong,
div.alert.alert-success b,
div.alert.alert-success em,
div.alert.alert-success i {
  color: #0a3622;
  font-weight: 500;
}

div.alert.alert-success a {
  color: #052e1a;
  text-decoration: underline;
  font-weight: 600;
}

div.alert.alert-danger {
  background-color: #f8d7da;
  border-left: 4px solid var(--danger-color);
  color: #3d0f14;
}

div.alert.alert-danger,
div.alert.alert-danger *,
div.alert.alert-danger p,
div.alert.alert-danger span,
div.alert.alert-danger div,
div.alert.alert-danger strong,
div.alert.alert-danger b,
div.alert.alert-danger em,
div.alert.alert-danger i {
  color: #3d0f14;
  font-weight: 500;
}

div.alert.alert-danger a {
  color: #1f080a;
  text-decoration: underline;
  font-weight: 600;
}

.alert > span,
.alert > div:not(.btn-close) {
  flex: 1;
}

.alert .btn-close {
  padding: 0.5rem;
  align-self: center !important;
  margin-left: auto;
  flex-shrink: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  position: relative !important;
  top: 0 !important;
  right: 0 !important;
  transform: none !important;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

/* ===== Custom Confirmation Modal Styles ===== */
#confirmModal .modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--box-shadow-lg);
}

#confirmModal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

#confirmModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

#confirmModal .modal-body {
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

#confirmModal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
}

#confirmModal .modal-footer .btn {
  min-width: 100px;
}

#stockPriceModal .table-responsive {
  max-height: 60vh;
}

/* ===== Pagination Styles ===== */
.pagination {
  margin-top: 1.5rem;
  justify-content: center;
}

.page-link {
  color: var(--primary-color);
  border: 2px solid #e9ecef;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border-radius: 0.375rem;
  transition: var(--transition);
  font-weight: 600;
}

.page-link:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 576px) {
  .pagination {
    margin-top: 1rem;
  }

  .page-link {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* ===== Profile Picture Styles ===== */
.profile-picture {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: var(--box-shadow-lg);
  transition: var(--transition);
}

.profile-picture:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.profile-picture-placeholder {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 4px solid white;
  box-shadow: var(--box-shadow-lg);
}

/* ===== Search & Filter Styles ===== */
.search-filter-card {
  background: white;
  margin-bottom: 0.75rem;
}

.search-filter-card .btn {
  height: calc(1.5rem + 0.75rem + 2px);
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  body {
    background: #f8f9fa;
  }

  /* Reduce form control sizes on mobile */
  .form-control,
  .form-select,
  textarea.form-control {
    padding: 0.275rem 0.75rem;
    font-size: 0.875rem;
    border-width: 1.5px;
    line-height: 1.5;
  }

  .form-control:focus,
  .form-select:focus {
    padding: 0.275rem 0.75rem;
  }

  .form-label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
  }

  /* Reduce margin bottom between form rows on mobile - minimal spacing */
  .row.g-3 {
    --bs-gutter-y: 0;
    row-gap: 0;
    margin-bottom: 0;
  }

  /* Remove Bootstrap gutter padding on columns for mobile */
  .row.g-3 > [class*="col-"] {
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0.35rem;
  }

  /* Remove bottom margin from last column */
  .row.g-3 > [class*="col-"]:last-child {
    margin-bottom: 0;
  }

  /* Reduce margin on row wrapper */
  .row.g-3.mb-3 {
    margin-bottom: 0.5rem !important;
  }

  /* Reduce spacing between form elements */
  .row.g-3 > [class*="col-"] > .form-label {
    margin-bottom: 0.25rem !important;
  }

  /* Reduce button sizes on mobile */
  /* Exclude btn-gradient which has its own styling with !important */
  .btn:not(.btn-gradient) {
    padding: 0.275rem 0.75rem;
    font-size: 0.875rem;
  }

  .btn-sm:not(.btn-gradient) {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
  }

  .btn-lg:not(.btn-gradient) {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
  }

  /* Reduce form floating label size */
  .form-floating > .form-control,
  .form-floating > .form-select {
    padding: 0.275rem 0.75rem;
    font-size: 0.875rem;
  }

  .form-floating > label {
    font-size: 0.875rem;
    padding: 0.275rem 0.75rem;
  }

  /* Reduce input group sizes */
  .input-group-text {
    padding: 0.275rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Override: Keep login form larger for better UX */
  .login-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-width: 1px;
  }

  .login-form .form-floating > .form-control,
  .login-form .form-floating > .form-select {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .login-form .form-floating > label {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }

  /* Reduce navbar height on mobile */
  .navbar {
    padding: 0.5rem 0;
    min-height: 50px;
  }

  /* Mobile navigation enhancements */
  .navbar-toggler {
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 18px rgba(2, 17, 61, 0.25);
    transition: var(--transition);
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.35);
    outline: none;
  }

  .navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.16);
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.88)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  }

  .navbar-collapse {
    background: linear-gradient(
      135deg,
      rgba(13, 110, 253, 0.96) 0%,
      rgba(2, 0, 36, 0.95) 100%
    );
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 0.75rem;
    box-shadow: 0 20px 45px rgba(5, 32, 98, 0.35);
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .navbar-collapse.show {
    animation: mobileMenuSlide 0.3s ease;
  }

  .navbar-collapse::-webkit-scrollbar {
    width: 6px;
  }

  .navbar-collapse::-webkit-scrollbar-track {
    background: transparent;
  }

  .navbar-collapse::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
  }

  .navbar-collapse > .navbar-nav + .navbar-nav {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .navbar-nav {
    gap: 0.5rem;
  }

  .navbar-nav .nav-link {
    color: #f5f7ff;
    padding: 0.75rem 0.875rem;
    margin: 0;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:focus {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }

  .navbar-nav .dropdown-toggle::after {
    margin-left: 0.75rem;
    transform: rotate(90deg);
    border-top-color: rgba(255, 255, 255, 0.85);
  }

  .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    background: none;
    border: none;
    padding: 0.25rem 0 0.75rem;
    margin: 0;
    box-shadow: none;
  }

  .navbar-nav .dropdown-item {
    padding: 0.6rem 1rem 0.6rem 1.25rem;
    border-radius: 0.75rem;
    color: #eef2ff;
    font-weight: 500;
  }

  .navbar-nav .dropdown-item + .dropdown-item {
    margin-top: 0.35rem;
  }

  .navbar-nav .dropdown-item:hover,
  .navbar-nav .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
  }

  .navbar-nav .dropdown-item img[alt="profile"],
  .navbar-nav .dropdown-item img[alt="update"],
  .navbar-nav .dropdown-item img[alt="save"],
  .navbar-nav .dropdown-item img[alt="logout"] {
    filter: brightness(0) saturate(100%) invert(96%) sepia(2%) saturate(518%)
      hue-rotate(169deg) brightness(105%) contrast(103%);
  }

  .navbar-nav .dropdown-item img[alt="password"],
  .navbar-nav .dropdown-item img[alt="key"] {
    filter: brightness(0) saturate(100%) invert(1);
  }

  .navbar-nav .dropdown-menu .profile-dropdown-name {
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0.01em;
  }

  .navbar-nav .dropdown-menu .profile-dropdown-email {
    color: rgba(255, 255, 255, 0.92);
  }

  .navbar-nav .dropdown-divider {
    background-color: rgba(255, 255, 255, 0.2);
  }

  /* Login layout adjustments for mobile */
  body:not(.logged-in) {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    display: block;
  }

  body:not(.logged-in) .container-fluid.content-container {
    padding: 1rem;
    flex: none;
    display: block;
    min-height: auto;
    overflow: visible;
  }

  .login-container {
    flex: none;
    display: block;
    padding: 1rem 0.5rem 2rem;
    min-height: auto;
  }

  /* Same padding for navbar and content on mobile */
  .navbar .container-fluid,
  .container-fluid.content-container {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
    position: relative;
  }

  .table-responsive .table {
    width: 100%;
    margin-bottom: 0;
    display: table;
    min-width: 800px; /* Minimum width to ensure horizontal scroll */
  }

  .table {
    font-size: 0.875rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.5rem;
    white-space: nowrap;
  }

  .table thead th:first-child,
  .table tbody td:first-child {
    position: static;
    left: auto;
    box-shadow: none;
  }

  .table thead th:first-child {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    color: #212529;
  }

  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .dashboard-card {
    margin-bottom: 1rem;
  }

  .navbar-brand {
    font-size: 1.25rem;
    padding: 0.125rem 0;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
  }

  .login-card .card-body {
    padding: 1.5rem 1rem;
  }

  #confirmModal .modal-dialog {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  #confirmModal .modal-body,
  #confirmModal .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 576px) {
  /* Even smaller padding for very small screens */
  body {
    background: linear-gradient(
      90deg,
      rgba(110, 107, 110, 1) 0%,
      rgba(161, 161, 161, 1) 35%,
      rgba(240, 240, 240, 1) 68%
    );
  }
  .navbar {
    padding: 0.375rem 0;
    min-height: 48px;
  }

  .navbar .container-fluid,
  .container-fluid.content-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
  }

  .navbar-brand {
    font-size: 1.125rem;
  }

  /* Further reduce form control sizes on very small screens */
  .form-control,
  .form-select,
  textarea.form-control {
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
    border-width: 1px;
  }

  .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.3125rem;
  }

  .btn:not(.btn-gradient) {
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
  }

  .btn-sm {
    padding: 0.1875rem 0.4375rem;
    font-size: 0.75rem;
  }

  .form-floating > .form-control,
  .form-floating > .form-select {
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
  }

  .form-floating > label {
    font-size: 0.8125rem;
    padding: 0.3125rem 0.625rem;
  }

  .input-group-text {
    padding: 0.3125rem 0.625rem;
    font-size: 0.8125rem;
  }

  /* Override: Keep login form at medium size for better UX */
  .login-form .form-control {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
  }

  .login-form .form-floating > .form-control,
  .login-form .form-floating > .form-select {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
  }

  .login-form .form-floating > label {
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
  }

  /* ===== Login Page ===== */
  .login-container {
    max-height: 100dvh;
  }

  .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    display: block;
    width: 100%;
  }

  .table-responsive .table {
    min-width: 700px;
  }

  .table {
    font-size: 0.75rem;
  }

  .table thead th,
  .table tbody td {
    padding: 0.375rem;
    white-space: nowrap;
  }

  .table thead th:first-child,
  .table tbody td:first-child {
    position: sticky;
    left: 0;
    background-color: #f8f9fa;
    z-index: 10;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
  }

  .order-items-table thead th:first-child,
  .order-items-table tbody td:first-child {
    position: static;
    left: auto;
    background-color: inherit;
    z-index: auto;
    box-shadow: none;
  }

  #stockPriceModal .table thead th:first-child,
  #stockPriceModal .table tbody td:first-child {
    position: static;
    left: auto;
    background-color: inherit;
    z-index: auto;
    box-shadow: none;
  }

  #stockPriceModal .modal-body .stock-summary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
  }

  #stockPriceModal .modal-body .stock-summary label {
    font-weight: 600;
  }

  #stockPriceModal .modal-body .stock-summary .value {
    font-weight: 700;
  }

  .stock-value {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(103, 126, 234, 0.08);
    color: #495057;
  }

  .stock-display .form-control {
    font-weight: 600;
    background-color: #f8f9ff;
    border-right: none;
  }

  .stock-display .input-group-text {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #f1f3ff;
  }

  .order-items-wrapper {
    overflow-x: auto;
  }

  /* Mobile: Show cards, hide table */
  .order-items-wrapper .order-items-table {
    display: none;
  }

  .order-items-cards {
    display: block;
  }

  .table thead th:first-child {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    color: #212529;
  }

  .btn {
    font-size: 0.75rem;
    padding: 0.375rem 1rem;
  }

  .card-header {
    padding: 1rem;
    font-size: 0.875rem;
  }

  .card-body {
    padding: 0.75rem;
  }
}

/* ===== Loading States ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mobileMenuSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Utility Classes ===== */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-custom {
  box-shadow: var(--box-shadow-lg);
}

.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}

/* ===== Breadcrumb Styles ===== */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #6c757d;
  font-weight: bold;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* ===== Form Section Styles ===== */
.form-section {
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

/* ===== Disabled Input Styles ===== */
.form-control:disabled,
.form-select:disabled {
  background-color: #e9ecef;
  opacity: 1;
  cursor: not-allowed;
}

/* ===== File Input Styles ===== */
.form-control[type="file"] {
  padding: 0.5rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  margin-right: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
  opacity: 0.9;
}

/* ===== Image Thumbnail Styles ===== */
.img-thumbnail {
  border: 2px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 0.25rem;
  transition: var(--transition);
}

.img-thumbnail:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* ===== Button Group Styles ===== */
.btn-group-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-group-actions .btn {
  flex: 0 0 auto;
}

/* ===== Help Text Styles ===== */
.form-text,
small.text-muted {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
  display: block;
}

/* ===== Required Field Indicator ===== */
.text-danger {
  color: var(--danger-color) !important;
}

.form-label .text-danger {
  font-weight: 700;
}

/* ===== HR Divider Styles ===== */
hr {
  border: none;
  border-top: 2px solid #e9ecef;
  margin: 1.5rem 0;
}

/* ===== Print Styles ===== */
@media print {
  body {
    background: white;
  }

  .navbar,
  .btn,
  .pagination,
  .breadcrumb {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid #dee2e6;
  }
}

#detailModal .modal-dialog {
  max-width: 720px;
}

@media (min-width: 992px) {
  #detailModal .modal-dialog {
    max-width: 840px;
  }
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
