/* ─── Base ─────────────────────────────────────────────── */
body.admin-body {
  font-family: "Sarabun", sans-serif;
  background-color: #f3f4f6;
  color: #1f2937;
}

/* ─── Navbar ───────────────────────────────────────────── */
.admin-navbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.admin-navbar .navbar-logo {
  object-fit: contain;
}

.admin-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151 !important;
  padding: 0.4rem 0.6rem !important;
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.admin-nav-link:hover {
  background-color: #f3f4f6;
  color: #4f46e5 !important;
}

.admin-nav-link.active {
  color: #4f46e5 !important;
  font-weight: 600;
}

.admin-user-menu {
  font-size: 0.875rem;
  color: #374151 !important;
}

.admin-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e0e7ff;
  color: #4f46e5;
  font-size: 0.8rem;
}

/* ─── Main content ─────────────────────────────────────── */
.admin-main {
  min-height: calc(100vh - 57px);
}

/* ─── Cards ────────────────────────────────────────────── */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ─── Stat cards ───────────────────────────────────────── */
.stat-card .card-body {
  padding: 1.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.bg-primary-soft { background-color: #ede9fe; }
.bg-success-soft { background-color: #d1fae5; }
.bg-warning-soft { background-color: #fef3c7; }
.bg-danger-soft  { background-color: #fee2e2; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.stat-label {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}

/* ─── Tables ───────────────────────────────────────────── */
.table {
  font-size: 0.875rem;
}

.table thead th {
  font-weight: 600;
  color: #6b7280;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
}

.table tbody tr:hover {
  background-color: #f9fafb;
}

/* ─── Buttons ──────────────────────────────────────────── */
.btn-primary {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

.btn-primary:hover {
  background-color: #4338ca;
  border-color: #4338ca;
}

.btn-outline-primary {
  color: #4f46e5;
  border-color: #4f46e5;
}

.btn-outline-primary:hover {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

/* ─── Badges ───────────────────────────────────────────── */
.badge.bg-success { background-color: #10b981 !important; }
.badge.bg-warning { background-color: #f59e0b !important; color: #fff !important; }
.badge.bg-danger  { background-color: #ef4444 !important; }

/* ─── Flash messages ───────────────────────────────────── */
.alert {
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

/* ─── Slide-over panel ─────────────────────────────────── */
.slide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1040;
}

.slide-overlay.open { display: block; }

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 95vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.slide-panel.open { transform: translateX(0); }

.slide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.slide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.slide-dl dt {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.slide-dl dd {
  font-size: 0.875rem;
  color: #111827;
  margin-bottom: 0;
}

/* ─── Login page ───────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
}

.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ─── Category filter chips ────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.chip.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

/* ─── Info stat icon ───────────────────────────────────── */
.bg-info-soft {
  background-color: rgba(6, 182, 212, 0.1);
}

/* ─── Message card (contact us inbox) ──────────────────── */
.msg-card {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.msg-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-color: #4f46e5;
}

.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Admin avatar in navbar ───────────────────────────── */
.admin-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ─── Responsive adjustments ──────────────────────────── */
@media (max-width: 576px) {
  .slide-panel {
    width: 100%;
    max-width: 100vw;
  }

  .chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
  }
}

@media (max-width: 768px) {
  #dashboard-map {
    height: 350px !important;
  }
}

/* ─── Form validation errors ──────────────────────────── */
.field-error .form-control,
.field-error .form-select {
  border-color: #dc3545;
}

.field-error-message {
  color: #dc3545;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* ─── Lightbox fullscreen viewer ──────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1060;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: transform 0.2s ease;
  cursor: grab;
}

.lightbox-controls {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1061;
}

/* ─── Loading states ──────────────────────────────────── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  color: #6b7280;
  font-size: 0.875rem;
  border-radius: inherit;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.75;
}

.geocode-status {
  font-size: 0.8125rem;
  transition: opacity 0.3s ease;
}

.geocode-status.fade-out {
  opacity: 0;
}

/* ─── Settings sidebar ────────────────────────────────── */
.settings-sidebar {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.settings-nav {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #475569;
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.settings-nav:hover {
  background: #f0f4f8;
  color: #4f46e5;
}

.settings-nav.active {
  background: #eff6ff;
  color: #4f46e5;
  border-left-color: #4f46e5;
  font-weight: 600;
}

@media (max-width: 768px) {
  .settings-sidebar {
    display: flex;
    overflow-x: auto;
    margin-bottom: 1rem;
  }
  .settings-nav {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 10px 14px;
  }
  .settings-nav.active {
    border-bottom-color: #4f46e5;
    border-left: none;
  }
}

/* ─── Slide-over carousel ─────────────────────────────── */
.slide-carousel {
  overflow: hidden;
  background: #f8fafc;
}

.slide-carousel .carousel-item {
  height: 220px;
}

.slide-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  background: #f8fafc;
}

.slide-carousel .carousel-indicators {
  margin-bottom: 0.5rem;
}

.slide-carousel .carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.3);
}

.slide-carousel .carousel-indicators button.active {
  background-color: #4f46e5;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
