@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --brand-navy: #1a3c5e;
  --brand-accent: #f05027;
  --brand-accent-dark: #dd3d15;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: "Outfit", "Inter", sans-serif;
}

.btn-primary {
  background-color: var(--brand-navy);
  border-color: var(--brand-navy);
}

.btn-primary:hover {
  background-color: #142f49;
  border-color: #142f49;
}

.btn-accent {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}

.btn-accent:hover {
  color: #fff;
  background-color: var(--brand-accent-dark);
  border-color: var(--brand-accent-dark);
}

.text-navy { color: var(--brand-navy); }
.bg-navy { background-color: var(--brand-navy); }

.admin-sidebar .nav-link.active {
  background-color: var(--brand-accent);
}

.admin-sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.product-card {
  border: 1px solid #eef0f4;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1) !important;
}

.product-card img {
  height: 200px;
  object-fit: cover;
}

.product-card .card-title a {
  font-weight: 600;
  font-size: 0.95rem;
}

.order-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.order-card:hover {
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.order-card-header {
  padding: 0.9rem 1.25rem;
  background: #fafbfc;
  border-bottom: 1px solid #eef0f4;
}

.order-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 0.65rem;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #eef0f4;
  margin-left: -12px;
  flex-shrink: 0;
}

.order-item-thumb:first-child {
  margin-left: 0;
}

.sale-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  border-radius: 999px !important;
  font-size: 0.68rem;
  padding: 0.35rem 0.65rem;
}

.product-card .wishlist-toggle-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.15);
  transition: transform 0.15s ease, color 0.15s ease;
}

.product-card .wishlist-toggle-btn:hover {
  transform: scale(1.1);
}

.wishlist-toggle-btn:hover,
.wishlist-toggle-btn.wishlist-active {
  color: var(--brand-accent);
}

.wishlist-toggle-btn-inline.wishlist-active {
  border-color: var(--brand-accent);
}

/* ============ Storefront auth pages (login/signup) ============ */
.auth-split {
  display: flex;
  flex: 1 1 auto;
  min-height: 550px;
}

.auth-split-visual {
  position: relative;
  overflow: hidden;
  flex: 0 0 45%;
  background: linear-gradient(135deg, #2f5f8a 0%, var(--brand-navy) 100%);
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.auth-split-deco {
  position: absolute;
  color: rgba(255, 255, 255, 0.16);
  z-index: 0;
}

.auth-split-icon {
  font-size: 6rem;
  opacity: 0.9;
}

.auth-split-form {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-underline-group {
  position: relative;
}

.auth-underline-input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid #dde1e7;
  border-radius: 0;
  padding: 0.6rem 0;
  background: transparent;
  font-size: 0.95rem;
}

.auth-underline-input:focus {
  outline: none;
  border-bottom-color: var(--brand-accent);
  box-shadow: none;
}

.auth-underline-group label {
  position: absolute;
  left: 0;
  top: 0.6rem;
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
  transition: transform 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}

.auth-underline-input:focus + label,
.auth-underline-input:not(:placeholder-shown) + label {
  transform: translateY(-1.3rem);
  font-size: 0.72rem;
  color: var(--brand-accent);
}

.auth-heading {
  font-size: 1.6rem;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .auth-split {
    min-height: auto;
  }

  .auth-heading {
    font-size: 1.35rem;
    white-space: normal;
  }
}

/* ============ Storefront home page ============ */
.home-hero {
  background: linear-gradient(135deg, #0f2438 0%, var(--brand-navy) 60%, #234a6e 100%);
}

.home-category-item {
  width: 92px;
  transition: transform 0.15s ease;
}

.home-category-item:hover {
  transform: translateY(-3px);
}

.home-category-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--brand-navy);
  font-size: 1.5rem;
}

.home-category-icon-accent {
  background: #ffe5e0;
  color: var(--brand-accent);
}

.promo-tile {
  border-radius: 1.1rem;
  padding: 1.75rem;
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo-tile-sale {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  color: #fff;
}

.promo-tile-navy {
  background: var(--brand-navy);
  color: #fff;
}

.promo-tile-muted {
  background: #f7f8fa;
  border: 1px solid #eef0f4;
  color: #111827;
}

.flash-countdown-box {
  background: var(--brand-navy);
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  min-width: 44px;
  text-align: center;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.flash-countdown-box small {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ============ Admin Panel design system ============ */
:root {
  --admin-sidebar-bg: #0f1c2e;
  --admin-primary: #f05027;
  --admin-primary-dark: #dd3d15;
  --admin-border: #eef0f4;
  --admin-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}

/* App-shell layout: the whole viewport is claimed once (body.admin-body-lock)
   so the page itself never scrolls. Sidebar and topbar are pinned; only
   .admin-content-scroll scrolls internally. Scoped to admin pages only --
   the storefront keeps its normal page scroll. */
body.admin-body-lock {
  height: 100vh;
  overflow: hidden;
}

.admin-shell {
  height: 100vh;
  overflow: hidden;
}

.admin-sidebar {
  width: 264px;
  height: 100vh;
  overflow: hidden;
  background-color: var(--admin-sidebar-bg) !important;
  padding: 1.25rem 1rem;
}

.admin-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: #f7f8fa;
}

.admin-topbar {
  flex-shrink: 0;
}

.admin-content-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
}

#sidebarOffcanvas {
  width: 264px;
}

.admin-sidebar .brand-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.admin-sidebar .nav-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0.9rem 0.6rem 0.3rem;
}

.admin-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  transition: background-color 0.15s ease;
}

.admin-sidebar .nav-link i {
  width: 1.4rem;
  text-align: center;
  font-size: 1rem;
}

.admin-sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.admin-sidebar .nav-link.active {
  background-color: var(--admin-primary);
  color: #fff;
  font-weight: 600;
}

.admin-user-card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 0.6rem 0.7rem;
}

.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
}

.stat-card, .admin-card,
.admin-main .card {
  background-color: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 0.9rem;
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.admin-card .card-header,
.admin-main .card-header {
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  font-weight: 600;
  border-top-left-radius: 0.9rem !important;
  border-top-right-radius: 0.9rem !important;
}

/* Cascade the modern look to every admin page's existing Bootstrap .card /
   .table markup without having to touch each template individually. */
.admin-main .table {
  margin-bottom: 0;
}

.admin-main .table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #fafbfc;
  border-bottom: 1px solid var(--admin-border);
  padding: 0.85rem 1rem;
}

.admin-main .table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom-color: var(--admin-border);
}

.admin-main .table tbody tr:last-child td {
  border-bottom: none;
}

.admin-main .table-hover tbody tr:hover {
  background-color: #f8fafc;
}

.admin-main .table-striped {
  --bs-table-striped-bg: transparent;
}

.admin-main .table tbody tr:has(td[colspan]) {
  background-color: transparent !important;
}

.admin-main .table tbody tr:has(td[colspan]) td {
  padding: 3rem 1rem;
}

/* .btn-accent is the primary CTA (Add/Create); .btn-primary is used for
   secondary form actions like Filter/Search, so they're styled distinctly
   to keep one clear call-to-action per toolbar instead of two identical
   orange buttons competing for attention. */
.admin-main .btn-accent {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-main .btn-accent:hover {
  background-color: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
  color: #fff;
}

.admin-main .btn-primary {
  background-color: #1f2937;
  border-color: #1f2937;
}

.admin-main .btn-primary:hover {
  background-color: #111827;
  border-color: #111827;
  color: #fff;
}

.admin-main .btn-outline-primary {
  color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-main .btn-outline-primary:hover {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-main .btn {
  border-radius: 0.55rem;
  font-size: 0.88rem;
}

.admin-main .form-control,
.admin-main .form-select {
  border-radius: 0.55rem;
  border-color: #dde1e7;
  font-size: 0.9rem;
}

.admin-main .form-control:focus,
.admin-main .form-select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 0.2rem rgba(240, 80, 39, 0.15);
}

.admin-main .nav-pills .nav-link.active {
  background-color: var(--admin-primary);
}

.admin-main .list-group-item.active {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-main .form-check-input:checked {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-main .form-check-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 0.2rem rgba(240, 80, 39, 0.15);
}

.admin-empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: #94a3b8;
}

.admin-empty-state i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-trend-up,
.stat-trend-down {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  gap: 0.2rem;
}

.stat-trend-up {
  color: #16a34a;
  background-color: #dcfce7;
  border: 1px solid rgba(22, 163, 74, 0.15);
}

.stat-trend-down {
  color: #dc2626;
  background-color: #fee2e2;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.notif-dropdown {
  width: 340px;
  max-width: calc(100vw - 2rem);
  border-radius: 1rem;
  overflow: hidden;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  border-bottom: 1px solid var(--admin-border);
  transition: background-color 0.15s ease;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background-color: #f8fafc;
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.min-w-0 { min-width: 0; }

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6d57, var(--admin-primary));
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.status-pill {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.card-header-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  color: var(--admin-primary);
  background-color: #ffe5e0;
  border: 1px solid rgba(240, 80, 39, 0.15);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.card-header-action:hover {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}

.card-header .status-pill {
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* KPI cards -- clickable, white, hover lifts + tints toward the brand color */
.kpi-card {
  display: block;
  background: #fff;
  border: 2px solid var(--admin-border);
  border-radius: 1rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  border-color: rgba(240, 80, 39, 0.3);
  box-shadow: 0 8px 20px rgba(240, 80, 39, 0.08);
  color: inherit;
}

.kpi-card:hover .kpi-value { color: var(--admin-primary); }
.kpi-card:hover .kpi-arrow { color: var(--admin-primary); transform: translateX(2px); }
.kpi-card:hover .kpi-icon { transform: scale(1.1); }

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  transition: color 0.2s ease;
}

.kpi-arrow {
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Ranked list badges (Top Sellers) */
.rank-badge {
  width: 44px;
  height: 44px;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.rank-badge.rank-1 { background: #ffe5e0; color: var(--admin-primary); }
.rank-badge.rank-2 { background: #f1f5f9; color: #475569; }
.rank-badge.rank-3-plus { background: #f8fafc; color: #94a3b8; }

.top-seller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  transition: background-color 0.15s ease;
}

.top-seller-row:hover {
  background-color: #f8fafc;
}

.top-seller-badge {
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
}

.top-seller-row:hover .top-seller-badge {
  background-color: #ffe5e0;
  color: var(--admin-primary);
  border-color: rgba(240, 80, 39, 0.15);
}

/* Mini progress bar (stock level) */
.mini-progress {
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-progress-bar {
  height: 100%;
  border-radius: 999px;
}

.dashboard-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.dashboard-row-link:hover {
  background-color: #f8fafc;
  color: inherit;
}

.dashboard-row-link:last-child {
  border-bottom: none !important;
}

.dashboard-row-link:hover .kpi-arrow { color: var(--admin-primary); }

/* ============ Admin login page ============ */
body.admin-login-body {
  height: 100vh;
  overflow: hidden;
}

.admin-login-bg {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #1e2a6e 0%, #2f3e9e 45%, #4a2f9e 100%);
  padding: 2rem;
}

.admin-login-deco {
  position: absolute;
  color: rgba(255, 255, 255, 0.16);
  z-index: 0;
}

.admin-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  min-height: 540px;
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.admin-login-brand {
  flex: 0 0 42%;
  background: linear-gradient(160deg, #4457d6 0%, #6b3fc9 100%);
  padding: 3rem;
  position: relative;
}

.admin-login-logo {
  width: 84px;
  height: 84px;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 2.1rem;
}

.admin-login-divider {
  width: 48px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.admin-login-form {
  padding: 3.5rem 3.25rem;
}

.admin-login-input-group {
  position: relative;
}

.admin-login-input-group > i:first-child {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.admin-login-input-group input.form-control {
  height: 48px;
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  border-radius: 0.75rem;
  border-color: #dde1e7;
}

.admin-login-input-group input.form-control:focus {
  border-color: var(--admin-primary, var(--brand-accent));
  box-shadow: 0 0 0 0.2rem rgba(240, 80, 39, 0.15);
}

.admin-login-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #94a3b8;
  padding: 0.25rem;
  line-height: 1;
}

.admin-login-toggle-pw:hover {
  color: #64748b;
}

.admin-login-copyright {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1;
}

.btn-admin-login {
  background: linear-gradient(135deg, #4457d6 0%, #6b3fc9 100%);
  border: none;
  color: #fff;
  border-radius: 0.75rem;
}

.btn-admin-login:hover {
  background: linear-gradient(135deg, #3a4bc0 0%, #5c35ad 100%);
  color: #fff;
}

@media (max-width: 767.98px) {
  .admin-login-form {
    padding: 2.5rem 1.75rem;
  }
}

/* ============ Support chat widget ============ */
.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
}

.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark));
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(240, 80, 39, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-toggle-btn:hover {
  transform: scale(1.06);
}

.chat-toggle-btn-hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

.chat-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 8rem);
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chat-panel-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-panel-header {
  background: var(--brand-navy);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-online-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.25rem;
}

.chat-close-btn {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.chat-close-btn:hover {
  color: #fff;
}

.chat-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f7f8fa;
}

.chat-msg {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 0.9rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.chat-msg-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #eef0f4;
  border-bottom-left-radius: 0.25rem;
}

.chat-msg-user {
  align-self: flex-end;
  background: var(--brand-accent);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.chat-msg a {
  color: inherit;
  text-decoration: underline;
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chat-quick-btn {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #eef0f4;
  background: #fff;
  color: var(--brand-navy);
  white-space: nowrap;
}

.chat-quick-btn:hover {
  background: #ffe5e0;
  border-color: rgba(240, 80, 39, 0.2);
  color: var(--brand-accent);
}

.chat-panel-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #eef0f4;
  background: #fff;
}

.chat-input {
  flex: 1 1 auto;
  border: 1px solid #dde1e7;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  outline: none;
}

.chat-input:focus {
  border-color: var(--brand-accent);
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--brand-accent);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send-btn:hover {
  background: var(--brand-accent-dark);
}

@media (max-width: 480px) {
  .chat-panel {
    width: calc(100vw - 2rem);
    right: -0.5rem;
  }
}

/* ============ Admin panel: searchable selects (Select2) ============
   Styled after Semantic UI's Dropdown module: a plain white bordered
   box (not a filled/borderless surface), understated corners, a
   floating bordered menu with a light shadow, muted gray hover/active
   states rather than a bold color fill, and square-ish gray label
   chips for multi-select. */

:root {
  --admin-primary-tint: rgba(240, 80, 39, 0.1);
  --su-border: #d4d4d5;
  --su-border-hover: #b0b0b1;
  --su-hover-bg: rgba(0, 0, 0, 0.05);
  --su-label-bg: #e8e8e8;
  --su-label-text: #333;
}

.admin-main .select2-container--default .select2-selection--single,
.offcanvas .select2-container--default .select2-selection--single,
.admin-main .select2-container--default .select2-selection--multiple,
.offcanvas .select2-container--default .select2-selection--multiple {
  border: 1px solid var(--su-border);
  border-radius: 0.3rem;
  background-color: #fff;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.admin-main .select2-container--default .select2-selection--single,
.offcanvas .select2-container--default .select2-selection--single {
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.25rem;
}

.admin-main .select2-container--default .select2-selection--multiple,
.offcanvas .select2-container--default .select2-selection--multiple {
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.25rem 0.25rem;
}

.admin-main .select2-selection--single:hover,
.offcanvas .select2-selection--single:hover,
.admin-main .select2-selection--multiple:hover,
.offcanvas .select2-selection--multiple:hover {
  border-color: var(--su-border-hover);
}

.admin-main .select2-container--default .select2-selection--single .select2-selection__rendered,
.offcanvas .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.5;
  padding-left: 0.65rem;
  color: rgba(0, 0, 0, 0.87);
}

.admin-main .select2-container--default .select2-selection--single .select2-selection__placeholder,
.offcanvas .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.admin-main .select2-container--default .select2-selection--single .select2-selection__arrow,
.offcanvas .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(1.5em + 0.75rem);
}

.admin-main .select2-container--default .select2-selection--single .select2-selection__arrow b,
.offcanvas .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #999 transparent transparent;
}

.admin-main .select2-container--default.select2-container--focus .select2-selection--single,
.admin-main .select2-container--default.select2-container--open .select2-selection--single,
.admin-main .select2-container--default.select2-container--focus .select2-selection--multiple,
.admin-main .select2-container--default.select2-container--open .select2-selection--multiple,
.offcanvas .select2-container--default.select2-container--focus .select2-selection--single,
.offcanvas .select2-container--default.select2-container--open .select2-selection--single,
.offcanvas .select2-container--default.select2-container--focus .select2-selection--multiple,
.offcanvas .select2-container--default.select2-container--open .select2-selection--multiple {
  border-color: var(--admin-primary);
  box-shadow: 0 2px 3px 0 rgba(34, 36, 38, 0.15);
}

/* Multi-select chips, styled as Semantic UI's squared-off gray labels */
.admin-main .select2-selection__choice,
.offcanvas .select2-selection__choice {
  background-color: var(--su-label-bg) !important;
  border: none !important;
  border-radius: 0.28rem !important;
  color: var(--su-label-text) !important;
  padding: 0.2rem 0.6rem !important;
  margin: 0.2rem 0.25rem 0.2rem 0 !important;
  font-size: 0.8rem;
  font-weight: 500;
}

.admin-main .select2-selection__choice__remove,
.offcanvas .select2-selection__choice__remove {
  color: rgba(0, 0, 0, 0.5) !important;
  border: none !important;
  margin-right: 0.4rem !important;
}

.admin-main .select2-selection__choice__remove:hover,
.offcanvas .select2-selection__choice__remove:hover {
  color: #db2828 !important;
}

/* Dropdown: bordered floating menu, Semantic UI style */
.select2-dropdown {
  border: 1px solid var(--su-border);
  border-radius: 0.3rem;
  box-shadow: 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15);
  overflow: hidden;
}

.select2-results {
  padding: 0;
}

.select2-container--default .select2-results__option {
  padding: 0.65rem 2rem 0.65rem 0.9rem;
  border-top: 1px solid rgba(34, 36, 38, 0.08);
  position: relative;
}

.select2-container--default .select2-results__options > .select2-results__option:first-child {
  border-top: none;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--su-hover-bg) !important;
  color: rgba(0, 0, 0, 0.95) !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  font-weight: 700;
}

.select2-container--default .select2-results__option[aria-selected="true"]::after {
  content: "\f633"; /* bootstrap-icons "check-lg" */
  font-family: "bootstrap-icons";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-primary);
  font-weight: 600;
}

.select2-container--default .select2-search--dropdown {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(34, 36, 38, 0.08);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--su-border);
  border-radius: 0.3rem;
  padding: 0.4rem 0.65rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  outline: none;
  border-color: var(--admin-primary);
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  color: rgba(0, 0, 0, 0.4);
  margin-right: 0.5rem;
}
