/* ── MedInventory Custom Styles ────────────────────────────────────────── */

/* Layout */
#wrapper {
  min-height: 100vh;
}

#sidebar {
  width: 250px;
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  overflow-y: auto;
  transition: width 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
}

#wrapper.sidebar-collapsed #sidebar {
  width: 0;
  overflow: hidden;
}

/* Sidebar nav */
#sidebar .nav-link {
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  transition: background 0.15s;
}
#sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Page content */
#page-content-wrapper {
  min-width: 0;
  overflow-x: auto;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  border-radius: 0.75rem;
}

/* ── Table tweaks ──────────────────────────────────────────────────────── */
.table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  font-size: 0.75rem;
}

/* ── Small button variant ─────────────────────────────────────────────── */
.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ── Toast container ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
}

/* ── Login page ────────────────────────────────────────────────────────── */
body.login-bg {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

/* ── Status colours ────────────────────────────────────────────────────── */
.status-pending   { color: #ffc107; }
.status-approved  { color: #198754; }
.status-rejected  { color: #dc3545; }
.status-completed { color: #0d6efd; }

/* ── Stat card icon box ────────────────────────────────────────────────── */
.stat-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
}

.min-vh-60 {
  min-height: 60vh;
}

.input-group-search {
  max-width: 320px;
}

.item-suggestions-dropdown {
  top: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1050;
}

.item-suggestions-dropdown-md {
  top: 100%;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
}

.item-suggestions-dropdown-lg {
  top: 100%;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1060;
}

.select-location-width {
  max-width: 280px;
}

.input-group-log-filter {
  max-width: 220px;
}

.vendor-search-width {
  width: 220px;
}

.form-page-narrow {
  max-width: 900px;
}

.form-page-820 {
  max-width: 820px;
}

.autocomplete-dropdown {
  max-height: 220px;
  overflow-y: auto;
  font-size: .9rem;
}

/* ── Login captcha ─────────────────────────────────────────────────────── */
.captcha-img {
  cursor: pointer;
  background: #f5f5f5;
  display: block;
}
.captcha-refresh-btn {
  align-self: stretch;
}
.captcha-input {
  letter-spacing: 4px;
  text-transform: uppercase;
}
.captcha-input::placeholder {
  letter-spacing: normal;
  text-transform: none;
}

/* ── Sidebar logo ──────────────────────────────────────────────────────── */
.sidebar-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Login page card/logo ──────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 420px;
}
.login-logo {
  max-height: 50px;
}

/* ── Form page widths ──────────────────────────────────────────────────── */
.form-page-640 {
  max-width: 640px;
}
.form-page-780 {
  max-width: 780px;
}
.form-page-860 {
  max-width: 860px;
}

/* ── Responsive tweaks ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    width: 0;
    position: fixed;
    z-index: 1050;
    height: 100%;
  }
  #wrapper.sidebar-open #sidebar {
    width: 250px;
  }
}
