.form-error {
    background: #ef4444;
    color: white;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-success {
    background: #10b981;
    color: white;
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.link-like {
  background: none!important;
  border: none;
  padding: 0!important;
  color: #0f9aee;
  cursor: pointer;
}

.logout {
  background: none!important;
  border: none;
  padding: 0.5rem 0 0 0.8rem !important;
}

[data-theme="dark"] .form-control {
  background-color: #2b3035;
  color: #dee2e6;
}

[data-theme="dark"] .form-control:focus {
    color: #f8f9fa; /* Light text for dark backgrounds */
    border-color: rgb(134, 182, 254); /* Keep the blue border */
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(134, 182, 254, 0.25); /* Softer blue glow */
}

[data-theme="dark"] ::placeholder {
  color: #98999b;
}

/* this is here because we don't want life to be simple */
/* Tom Select wrapper styling to match Bootstrap form controls */
.ts-wrapper {
  position: relative;
  width: 100%;
}

.ts-wrapper.form-control {
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Tom Select control styling */
.ts-control {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}

[data-theme="dark"] .full .ts-control {
  background-color: #2b3035; /* does nothing, set because idk what to do */
}

[data-theme="light"] .ts-control, 
[data-theme="light"] .ts-wrapper.single.input-active.dropdown-active .ts-control {
  background: #fff;
}

[data-theme="dark"] .ts-control, 
[data-them="dark"] .ts-wrapper.single.input-active.dropdown-active .ts-control {
  background: #2b3035!important;
}

[data-theme="dark"] .ts-control input {
  color: #dee2e6;
}

/* Add dropdown arrow */
.ts-control::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 12px;
  pointer-events: none;
}

/* Tom Select items (selected value) */
.ts-control .item {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Tom Select input */
.ts-control input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: inherit;
  color: inherit;
  flex: 1;
}

/* Focus states */
.ts-wrapper.focus .ts-control,
.ts-wrapper.input-active .ts-control {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dropdown styling */
.ts-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  max-height: 200px;
  overflow: hidden;
}

.ts-dropdown .option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--bs-body-color);
  transition: background-color 0.15s ease-in-out;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background-color: var(--bs-primary);
  color: #fff;
}

.ts-dropdown .option.selected {
  background-color: var(--bs-gray-100);
  color: var(--bs-body-color);
}

/* Light mode specific styling */
[data-theme="light"] .ts-control,
.ts-control {
  color: #212529;
  background-color: #fff;
  border-color: #ced4da;
}

[data-theme="light"] .ts-control::after,
.ts-control::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

[data-theme="light"] .ts-dropdown,
.ts-dropdown {
  background: #fff;
  border-color: #ced4da;
}

[data-theme="light"] .ts-dropdown .option.selected,
.ts-dropdown .option.selected {
  background-color: #f8f9fa;
}

/* Dark mode specific styling */
[data-theme="dark"] .ts-control {
  color: #dee2e6;
  background-color: #2b3035;
  border-color: #495057;
}

[data-theme="dark"] .ts-control::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

[data-theme="dark"] .ts-wrapper.focus .ts-control,
[data-theme="dark"] .ts-wrapper.input-active .ts-control {
  color: #dee2e6;
  background-color: #2b3035;
  border-color: #86b7fe;
}

[data-theme="dark"] .ts-dropdown {
  background: #2b3035;
  border-color: #495057;
}

[data-theme="dark"] .ts-dropdown .option {
  color: #dee2e6;
}

[data-theme="dark"] .ts-dropdown .option.selected {
  background-color: #495057;
  color: #dee2e6;
}

.no-results {
  color: #fff!important;
}
/* the end */

/* .clickable-row {
    cursor: pointer;
} */

[data-theme="light"] .clickable-row:hover td {
    background-color: #f0f0f0;
}

[data-theme="dark"] .clickable-row:hover td {
  background-color: #535151;
  /* background-color: #ada3a3; */
}

textarea {
  resize: none;
}

@keyframes fadeOut {
  0% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

.form-success.fadeout {
    animation: fadeOut 3s forwards;
}

.card-rounded {
  border-radius: 12px; /* adjust px for more or less curve */
  box-shadow: 0 6px 18px rgba(0,0,0,0.1); /* optional: soft shadow */
  padding: 2rem;
}

.m-badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.75rem;
  text-transform: uppercase;
}

.m-badge-warning { 
    background-color: #fef3c7; /* Light yellow */
    color: #92400e; /* Dark yellow/brown text */
}
.m-badge-success { 
    background-color: #d1fae5; /* Light green */
    color: #065f46; /* Dark green text */
}
.m-badge-danger  { 
    background-color: #fee2e2; /* Light red */
    color: #991b1b; /* Dark red text */
}
.m-badge-muted { 
    background-color: #e5e7eb; /* Light gray */
    color: #374151; /* Dark gray text */
}
.m-badge-info { 
    background-color: #dbeafe; /* Light blue */
    color: #1e40af; /* Dark blue text */
}

[data-theme="dark"] .list-group-item {
  background: #20232a;
  border-color: #2b2f36;
  color: #e8eaed;
}

[data-theme="light"] .sidebar-link.active,
[data-theme="light"] .nav-item.active > .sidebar-link {
    background: #f0f0f0; /* or your hover bg */
    color: #007bff;      /* or your hover color */
}
.nav-item.dropdown.open > .dropdown-menu {
    display: block;
}

[data-theme="dark"] .sidebar-link.active,
[data-theme="dark"] .nav-item.active > .sidebar-link {
    background: #d0d2d7; /* or your hover bg */
    color: #007bff!important;      /* or your hover color */
}

.is-invalid {
  border-color: #dc3545 !important;
}

.invalid-feedback {
  display: block;
  font-size: 0.875rem;
  color: #dc3545;
}

/* .auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 1rem;
} */

/* .auth-card {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
} */

@media (max-width: 480px) {
  .auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 1rem;
  }
  .auth-card {
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
    border-radius: 8px;
  }
  .auth-card h4 {
    font-size: 1.25rem;
  }
  .form-control {
    font-size: 0.9rem;
  }
  .btn {
    width: 100%;
    font-size: 1rem;
  }
}

.icon-btn {
  padding: 0.4rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.icon-btn i {
  font-size: 1.0rem;
}

.pagination-wrapper {
  display: flex;
  align-items: center;
}

.pagination-btn {
  flex-shrink: 0;
}

#pageInfo {
  flex-grow: 1;
  text-align: center;
  white-space: nowrap;
}

/* On small screens, force buttons to minimal fixed width */
@media (max-width: 576px) {
  .pagination-btn {
    padding: 0.25rem 0.4rem;
    min-width: 36px; /* ensures consistent small button size */
    width: 36px; /* fixes the expansion issue */
    text-align: center;
  }
  #pageInfo {
    font-size: 0.9rem; /* optional, makes it fit better */
  }
}
