/**
 * FZN Express — Global UI theme
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --fzn-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --fzn-primary: #6366f1;
  --fzn-primary-dark: #4f46e5;
  --fzn-accent: #818cf8;
  --fzn-success: #10b981;
  --fzn-warning: #f59e0b;
  --fzn-danger: #ef4444;
  --fzn-info: #0ea5e9;
  --fzn-bg: #f1f5f9;
  --fzn-surface: #ffffff;
  --fzn-border: #e2e8f0;
  --fzn-text: #0f172a;
  --fzn-text-muted: #64748b;
  --fzn-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --fzn-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --fzn-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --fzn-radius: 0.85rem;
  --fzn-radius-lg: 1.15rem;
  --fzn-sidebar-text: rgba(255, 255, 255, 0.92);
  --fzn-sidebar-muted: rgba(255, 255, 255, 0.55);
  --fzn-sidebar-width: 17.125rem;
  --fzn-main-offset: 0px;
  --fzn-footer-height: 3rem;
  --fzn-topbar-gap: 1rem;
  --fzn-layout-ease: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}
.fzn-promo-banner h1,.fzn-promo-banner h2,.fzn-promo-banner h3,.fzn-promo-banner h4,.fzn-promo-banner h5,.fzn-promo-banner h6, .fzn-pincode-hero h1,.fzn-pincode-hero h2,.fzn-pincode-hero h3,.fzn-pincode-hero h4,.fzn-pincode-hero h5,.fzn-pincode-hero h6, .fzn-pickup-hero h1,.fzn-pickup-hero h2,.fzn-pickup-hero h3,.fzn-pickup-hero h4,.fzn-pickup-hero h5,.fzn-pickup-hero h6 {
  color: var( --fzn-bg) !important;
}
body.fzn-app {
  font-family: var(--fzn-font) !important;
  background: var(--fzn-bg) !important;
  color: var(--fzn-text);
  overflow-x: hidden;
  margin: 0;
}

body.fzn-app .fixed-plugin {
  display: none !important;
}

/* ——— App shell: main area shifts with sidebar open/close ——— */
body.fzn-app.g-sidenav-show .sidenav.fixed-start + .main-content.fzn-main {
  margin-left: var(--fzn-main-offset) !important;
}

body.fzn-app .main-content.fzn-main {
  background: var(--fzn-bg) !important;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--fzn-main-offset)) !important;
  max-width: calc(100% - var(--fzn-main-offset)) !important;
  margin-left: var(--fzn-main-offset) !important;
  margin-right: 0 !important;
  padding: 0.5rem var(--fzn-topbar-gap) 0 0.25rem;
  transition:
    margin-left var(--fzn-layout-ease),
    width var(--fzn-layout-ease),
    max-width var(--fzn-layout-ease);
  box-sizing: border-box;
  overflow-x: hidden;
}

body.fzn-app .fzn-page-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-height: calc(100dvh - var(--fzn-footer-height) - 4.5rem);
  padding-bottom: calc(var(--fzn-footer-height) + 0.5rem);
}

body.fzn-app .fzn-content-wrap {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 0.5rem 1.25rem;
  flex: 1 1 auto;
  animation: fznFadeUp 0.4s ease;
}

body.fzn-app .fzn-content-wrap .container-fluid,
body.fzn-app .fzn-page-shell > .container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-left: auto;
  margin-right: auto;
}

body.fzn-app .fzn-topbar.navbar-main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0.5rem 0 0.75rem !important;
  flex-shrink: 0;
}

body.fzn-app .fzn-stat-grid,
body.fzn-app .fzn-card,
body.fzn-app .fzn-promo-banner,
body.fzn-app .fzn-page-header {
  width: 100%;
  max-width: 100%;
}

body.fzn-app .fzn-table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Mobile: full-width body; sidebar overlays */
@media (max-width: 1199.98px) {
  body.fzn-app {
    --fzn-main-offset: 0px !important;
  }

  body.fzn-app .main-content.fzn-main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #sidenav-main.fzn-sidebar {
    z-index: 1045;
    transform: translateX(calc(-100% - 1.25rem));
  }

  body.fzn-app.g-sidenav-pinned #sidenav-main.fzn-sidebar {
    transform: translateX(0);
  }
}

body.fzn-app .fzn-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.fzn-app .fzn-sidebar-overlay.is-visible {
  display: block;
  opacity: 1;
}

body.fzn-app .fzn-hamburger {
  flex-shrink: 0;
  border-color: var(--fzn-primary) !important;
  color: var(--fzn-primary) !important;
  background: rgba(99, 102, 241, 0.08) !important;
}

@keyframes fznFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Top navbar ——— */
body.fzn-app .fzn-topbar.navbar-main {
  background: var(--fzn-surface) !important;
  border: 1px solid var(--fzn-border) !important;
  border-radius: var(--fzn-radius-lg) !important;
  box-shadow: var(--fzn-shadow-sm) !important;
  padding: 0.5rem 1rem !important;
  margin-top: 0.75rem !important;
  backdrop-filter: blur(12px);
}

body.fzn-app .fzn-topbar .fzn-page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fzn-text);
  margin: 0;
  line-height: 1.3;
}

body.fzn-app .fzn-topbar .fzn-breadcrumb {
  font-size: 0.75rem;
  color: var(--fzn-text-muted);
  margin: 0;
}

body.fzn-app .fzn-topbar .fzn-breadcrumb a {
  color: var(--fzn-primary);
  text-decoration: none;
}

body.fzn-app .fzn-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.fzn-app .fzn-topbar .fzn-nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fzn-border);
  transition: box-shadow 0.2s ease;
}

body.fzn-app .fzn-topbar .fzn-nav-avatar:hover {
  box-shadow: 0 0 0 3px var(--fzn-accent-soft, rgba(99, 102, 241, 0.2));
}

body.fzn-app .fzn-icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  border: 1px solid var(--fzn-border);
  background: var(--fzn-surface);
  color: var(--fzn-text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

body.fzn-app .fzn-icon-btn:hover {
  background: #f8fafc;
  color: var(--fzn-primary);
  border-color: var(--fzn-accent);
}

/* ——— Page header ——— */
.fzn-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fzn-page-header h1,
.fzn-page-header .fzn-page-header-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fzn-text);
  margin: 0;
}

.fzn-page-header .fzn-page-header-sub {
  font-size: 0.85rem;
  color: var(--fzn-text-muted);
  margin: 0.25rem 0 0;
}

.fzn-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* ——— Stat cards ——— */
.fzn-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fzn-stat-card {
  background: var(--fzn-surface);
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--fzn-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fznFadeUp 0.45s ease backwards;
}

.fzn-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--fzn-shadow);
}

.fzn-stat-card .fzn-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fzn-text-muted);
  margin: 0 0 0.35rem;
}

.fzn-stat-card .fzn-stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--fzn-text);
  margin: 0;
  line-height: 1.2;
}

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

.fzn-stat-card.fzn-stat-primary .fzn-stat-icon {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.fzn-stat-card.fzn-stat-success .fzn-stat-icon {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.fzn-stat-card.fzn-stat-warning .fzn-stat-icon {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.fzn-stat-card.fzn-stat-info .fzn-stat-icon {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

/* ——— Cards ——— */
body.fzn-app .fzn-card {
  background: var(--fzn-surface);
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  box-shadow: var(--fzn-shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
  animation: fznFadeUp 0.5s ease backwards;
}

body.fzn-app .fzn-card .fzn-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--fzn-border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

body.fzn-app .fzn-card .fzn-card-header h6,
body.fzn-app .fzn-card .fzn-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fzn-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.fzn-app .fzn-card .fzn-card-body {
  padding: 0;
}

body.fzn-app .fzn-card .fzn-card-body.padded {
  padding: 1.25rem;
}

/* Legacy card upgrade */
body.fzn-app .card:not(#sidenav-main) {
  border: 1px solid var(--fzn-border) !important;
  border-radius: var(--fzn-radius-lg) !important;
  box-shadow: var(--fzn-shadow-sm) !important;
}

body.fzn-app .card:not(#sidenav-main) .card-header {
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%) !important;
  border-bottom: 1px solid var(--fzn-border) !important;
}

/* ——— Tables ——— */
body.fzn-app .fzn-table-wrap {
  overflow-x: auto;
}

body.fzn-app table.fzn-table,
body.fzn-app .fzn-card table.table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

body.fzn-app table.fzn-table thead th,
body.fzn-app .fzn-card table.table thead th {
  background: #f8fafc !important;
  color: var(--fzn-text-muted) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--fzn-border) !important;
  border-top: none !important;
  white-space: nowrap;
}

body.fzn-app table.fzn-table tbody td,
body.fzn-app .fzn-card table.table tbody td {
  padding: 0.9rem 1rem !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 0.875rem;
  color: var(--fzn-text);
}

body.fzn-app table.fzn-table tbody tr,
body.fzn-app .fzn-card table.table tbody tr {
  transition: background 0.15s ease;
}

body.fzn-app table.fzn-table tbody tr:hover,
body.fzn-app .fzn-card table.table tbody tr:hover {
  background: #f8fafc !important;
}

body.fzn-app table.fzn-table tbody tr:last-child td {
  border-bottom: none !important;
}

/* ——— Badges ——— */
.fzn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.fzn-badge-delivered { background: #d1fae5; color: #047857; }
.fzn-badge-cancelled { background: #fee2e2; color: #b91c1c; }
.fzn-badge-transit,
.fzn-badge-pending,
.fzn-badge-manifested,
.fzn-badge-info { background: #e0f2fe; color: #0369a1; }
.fzn-badge-courier { background: #ede9fe; color: #5b21b6; }
.fzn-badge-waybill { background: #f1f5f9; color: #334155; font-family: ui-monospace, monospace; }

/* ——— Buttons ——— */
body.fzn-app .btn {
  font-family: var(--fzn-font);
  font-weight: 600;
  border-radius: 0.6rem !important;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

body.fzn-app .btn-primary,
body.fzn-app .btn.bg-gradient-primary {
  background: linear-gradient(135deg, var(--fzn-primary), var(--fzn-accent)) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

body.fzn-app .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

body.fzn-app .btn-success {
  background: linear-gradient(135deg, #059669, #10b981) !important;
  border: none !important;
}

body.fzn-app .btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

body.fzn-app .fzn-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ——— Forms ——— */
body.fzn-app .form-control,
body.fzn-app .form-select {
  font-family: var(--fzn-font);
  border-radius: 0.6rem !important;
  border-color: var(--fzn-border) !important;
  padding: 0.55rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.fzn-app .form-control:focus,
body.fzn-app .form-select:focus {
  border-color: var(--fzn-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

body.fzn-app .fzn-search-bar {
  display: flex;
  gap: 0.5rem;
  min-width: 280px;
}

body.fzn-app .fzn-search-bar .form-control {
  min-width: 200px;
}

/* ——— Modals ——— */
body.fzn-app .modal-content {
  border: none;
  border-radius: var(--fzn-radius-lg);
  box-shadow: var(--fzn-shadow-lg);
}

body.fzn-app .modal-header {
  border-bottom: 1px solid var(--fzn-border);
  padding: 1rem 1.25rem;
}

/* ——— Pagination ——— */
body.fzn-app .pagination .page-link {
  border-radius: 0.5rem !important;
  margin: 0 2px;
  border-color: var(--fzn-border);
  color: var(--fzn-text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}

body.fzn-app .pagination .page-item.active .page-link {
  background: var(--fzn-primary) !important;
  border-color: var(--fzn-primary) !important;
}

/* ——— Promo banner ——— */
.fzn-promo-banner {
  border-radius: var(--fzn-radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #312e81 0%, #6366f1 50%, #818cf8 100%);
  padding: 1.75rem;
  color: #fff;
  position: relative;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}

.fzn-promo-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.fzn-promo-banner h5 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.fzn-promo-banner p {
  opacity: 0.9;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.fzn-promo-banner .btn-light {
  position: relative;
  z-index: 1;
  font-weight: 600;
  border-radius: 0.6rem;
}

/* ——— Empty state ——— */
.fzn-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--fzn-text-muted);
}

.fzn-empty i {
  font-size: 2.5rem;
  opacity: 0.4;
  margin-bottom: 0.75rem;
}

/* ——— Footer (fixed bottom, follows main offset) ——— */
body.fzn-app .footer.fzn-footer {
  position: fixed;
  bottom: 0;
  right: 0;
  left: var(--fzn-main-offset);
  width: calc(100% - var(--fzn-main-offset));
  z-index: 1020;
  height: var(--fzn-footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  margin: 0 !important;
  color: var(--fzn-text-muted);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--fzn-border);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  transition:
    left var(--fzn-layout-ease),
    width var(--fzn-layout-ease);
}

@media (max-width: 1199.98px) {
  body.fzn-app .footer.fzn-footer {
    left: 0 !important;
    width: 100% !important;
  }
}

/* ——— Sidebar ——— */
#sidenav-main.fzn-sidebar {
  background: linear-gradient(165deg, #1e1b4b 0%, #312e81 45%, #1e293b 100%) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 15.625rem !important;
  max-width: 15.625rem !important;
  height: calc(100vh - 1.5rem);
  position: fixed !important;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1030;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.fzn-app.g-sidenav-pinned #sidenav-main.fzn-sidebar {
  transform: translateX(0) !important;
  pointer-events: auto;
}

body.fzn-app:not(.g-sidenav-pinned) #sidenav-main.fzn-sidebar {
  transform: translateX(calc(-100% - 1.5rem)) !important;
  pointer-events: none;
}

#sidenav-main.fzn-sidebar::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

#sidenav-main.fzn-sidebar .sidenav-header {
  padding: 1.25rem 1rem 0.75rem;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

#sidenav-main.fzn-sidebar .fzn-sidebar-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

#sidenav-main.fzn-sidebar .fzn-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (min-width: 1200px) {
  #sidenav-main.fzn-sidebar .fzn-sidebar-close {
    display: none;
  }
}

#sidenav-main.fzn-sidebar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  min-width: 0;
  flex: 1;
}
#sidenav-main.fzn-sidebar .navbar-brand-img { max-height: 42px; width: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25)); transition: transform 0.3s; }
#sidenav-main.fzn-sidebar .navbar-brand:hover .navbar-brand-img { transform: scale(1.05); }
#sidenav-main.fzn-sidebar .fzn-brand-text { color: var(--fzn-sidebar-text); font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
#sidenav-main.fzn-sidebar .fzn-brand-sub { display: block; font-size: 0.65rem; color: var(--fzn-sidebar-muted); text-transform: uppercase; letter-spacing: 0.08em; }
#sidenav-main.fzn-sidebar hr.horizontal.dark { border-color: rgba(255,255,255,0.1) !important; margin: 0.5rem 1rem; }
#sidenav-main.fzn-sidebar #sidenav-collapse-main { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
#sidenav-main.fzn-sidebar .fzn-nav-section { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fzn-sidebar-muted); padding: 1rem 1.25rem 0.35rem; margin: 0; }
#sidenav-main.fzn-sidebar .navbar-nav { padding: 0 0.65rem 0.5rem; }
#sidenav-main.fzn-sidebar .fzn-nav-item { opacity: 0; transform: translateX(-12px); animation: fznNavSlideIn 0.45s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes fznNavSlideIn { to { opacity: 1; transform: translateX(0); } }
/* Reset Soft UI nav-link / icon rules inside our sidebar */
#sidenav-main.fzn-sidebar .nav-item {
  list-style: none;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.6rem 0.75rem !important;
  margin-bottom: 0.2rem !important;
  border-radius: 0.65rem !important;
  color: var(--fzn-sidebar-muted) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease !important;
  width: 100%;
  box-shadow: none !important;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 55%;
  background: var(--fzn-accent);
  border-radius: 0 4px 4px 0;
  transition: transform 0.25s;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link .icon,
#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link .nav-link-text,
#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link .sidenav-mini-icon {
  display: none !important;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link:hover {
  color: var(--fzn-sidebar-text) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: none !important;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link:hover .fzn-nav-icon {
  background: rgba(129, 140, 248, 0.2);
  color: var(--fzn-accent);
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.28), rgba(129, 140, 248, 0.1)) !important;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.3) !important;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link.active::before {
  transform: translateY(-50%) scaleY(1);
}

#sidenav-main.fzn-sidebar .fzn-nav-icon {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease, color 0.2s ease;
}

#sidenav-main.fzn-sidebar .fzn-nav-icon i {
  display: block;
  line-height: 1;
  font-size: 1.05rem;
}

#sidenav-main.fzn-sidebar .nav-link.fzn-nav-link.active .fzn-nav-icon {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

#sidenav-main.fzn-sidebar .fzn-nav-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1 !important;
  width: auto !important;
}
#sidenav-main.fzn-sidebar .fzn-impersonate { margin: 0.75rem 1rem 0; padding: 0.65rem 0.85rem; border-radius: 0.65rem; background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.35); animation: fznPulse 2s infinite; }
@keyframes fznPulse { 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0.2)} 50%{box-shadow:0 0 0 6px rgba(239,68,68,0)} }
#sidenav-main.fzn-sidebar .fzn-impersonate a { color: #fecaca !important; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
#sidenav-main.fzn-sidebar .fzn-sidebar-footer { margin: 0 0.75rem 1rem; flex-shrink: 0; padding: 0.85rem; border-radius: 0.85rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
#sidenav-main.fzn-sidebar .fzn-user-row { display: flex; align-items: center; gap: 0.65rem; }
#sidenav-main.fzn-sidebar .fzn-user-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(129,140,248,0.5); }
#sidenav-main.fzn-sidebar .fzn-user-name { color: var(--fzn-sidebar-text); font-size: 0.8rem; font-weight: 600; margin: 0; }
#sidenav-main.fzn-sidebar .fzn-user-role { font-size: 0.65rem; color: var(--fzn-accent); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
#sidenav-main.fzn-sidebar .fzn-wallet-pill { margin-top: 0.65rem; padding: 0.45rem 0.65rem; border-radius: 0.5rem; background: rgba(45,206,137,0.12); border: 1px solid rgba(45,206,137,0.25); display: flex; justify-content: space-between; font-size: 0.75rem; color: #86efac; }
#sidenav-main.fzn-sidebar .fzn-logout-btn { margin-top: 0.65rem; display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; padding: 0.45rem; border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.12); color: var(--fzn-sidebar-muted); font-size: 0.75rem; font-weight: 600; text-decoration: none; transition: all 0.2s; }
#sidenav-main.fzn-sidebar .fzn-logout-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

body.fzn-app .fzn-topbar .fzn-nav-avatar {
  width: 32px;
  height: 32px;
  border: none;
  padding: 0;
}

body.fzn-app .btn-outline-primary {
  color: var(--fzn-primary);
  border-color: var(--fzn-primary);
  font-weight: 600;
}

body.fzn-app .btn-outline-primary:hover {
  background: var(--fzn-primary);
  color: #fff;
}

/* ——— Warehouse module ——— */
.fzn-wh-form .fzn-form-section {
  background: var(--fzn-surface);
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.fzn-wh-form .fzn-form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fzn-text-muted);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--fzn-border);
}

.fzn-wh-form .fzn-form-section-title i {
  color: var(--fzn-primary);
  font-size: 1rem;
}

.fzn-wh-form .form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fzn-text);
  margin-bottom: 0.35rem;
}

.fzn-wh-form .form-text {
  font-size: 0.75rem;
}

.fzn-wh-form .fzn-pin-loader {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--fzn-primary);
}

.fzn-wh-form .fzn-return-panel {
  display: none;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--fzn-border);
}

.fzn-wh-form .fzn-return-panel.is-open {
  display: block;
}

.fzn-wh-form .fzn-switch-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius);
  margin-bottom: 0;
}

.fzn-wh-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.fzn-wh-detail .fzn-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.fzn-wh-detail .fzn-detail-item {
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius);
}

.fzn-wh-detail .fzn-detail-item label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fzn-text-muted);
  margin-bottom: 0.25rem;
}

.fzn-wh-detail .fzn-detail-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fzn-text);
  word-break: break-word;
}

.fzn-wh-detail .fzn-detail-address {
  grid-column: 1 / -1;
}

.fzn-search-inline {
  max-width: 320px;
}

/* ——— Pincode lookup ——— */
.fzn-pincode-hero {
  background: linear-gradient(135deg, #312e81 0%, #6366f1 55%, #818cf8 100%);
  border-radius: var(--fzn-radius-lg);
  padding: 1.5rem 1.75rem;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.3);
}

.fzn-pincode-hero h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.fzn-pincode-hero p {
  margin: 0 0 1rem;
  opacity: 0.9;
  font-size: 0.875rem;
}

.fzn-pincode-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 520px;
}

.fzn-pincode-search .form-control {
  flex: 1;
  min-width: 200px;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.fzn-pincode-search .btn-light {
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.fzn-pincode-hint {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.65rem;
}

.fzn-svc-yes,
.fzn-svc-no {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fzn-svc-yes {
  background: #d1fae5;
  color: #047857;
}

.fzn-svc-no {
  background: #fee2e2;
  color: #b91c1c;
}

.fzn-pincode-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--fzn-text-muted);
}

.fzn-pincode-loading .spinner-border {
  color: var(--fzn-primary);
}

/* ——— Wallet ——— */
.fzn-wallet-balance-card {
  background: linear-gradient(135deg, #059669 0%, #10b981 45%, #34d399 100%);
  border-radius: var(--fzn-radius-lg);
  padding: 1.5rem 1.75rem;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fzn-wallet-balance-card .fzn-wallet-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.fzn-wallet-balance-card .fzn-wallet-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.fzn-wallet-balance-card .fzn-wallet-user-name {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.fzn-wallet-balance-card .fzn-wallet-user-email {
  font-size: 0.8rem;
  opacity: 0.9;
  margin: 0;
}

.fzn-wallet-balance-card .fzn-wallet-amount-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin: 0 0 0.2rem;
}

.fzn-wallet-balance-card .fzn-wallet-amount {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.fzn-wallet-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.fzn-wallet-action-card {
  background: var(--fzn-surface);
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  overflow: hidden;
}

.fzn-wallet-action-card.credit .fzn-wallet-action-head {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-bottom: 1px solid #d1fae5;
}

.fzn-wallet-action-card.debit .fzn-wallet-action-head {
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
  border-bottom: 1px solid #fee2e2;
}

.fzn-wallet-action-card .fzn-wallet-action-head {
  padding: 0.85rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fzn-wallet-action-card.credit .fzn-wallet-action-head i { color: #059669; }
.fzn-wallet-action-card.debit .fzn-wallet-action-head i { color: #dc2626; }

.fzn-wallet-action-card .fzn-wallet-action-body {
  padding: 1.15rem;
}

.fzn-txn-credit {
  background: #d1fae5;
  color: #047857;
}

.fzn-txn-debit {
  background: #fee2e2;
  color: #b91c1c;
}

/* ——— Waybill generator ——— */
.fzn-waybill-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #6366f1 50%, #818cf8 100%);
  border-radius: var(--fzn-radius-lg);
  padding: 1.5rem 1.75rem;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.35);
}

.fzn-waybill-hero h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.fzn-waybill-hero p {
  margin: 0 0 1.15rem;
  opacity: 0.92;
  font-size: 0.875rem;
}

.fzn-waybill-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.fzn-waybill-controls .fzn-count-field {
  min-width: 160px;
}

.fzn-waybill-controls .fzn-count-field label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.35rem;
  display: block;
}

.fzn-waybill-controls .form-select,
.fzn-waybill-controls .form-control {
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.fzn-waybill-controls .btn-generate {
  font-weight: 700;
  border: none;
  background: #fff;
  color: var(--fzn-primary-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 0.55rem 1.25rem;
}

.fzn-waybill-controls .btn-generate:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.fzn-waybill-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fzn-waybill-copy-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
}

.fzn-waybill-row-num {
  color: var(--fzn-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  width: 3rem;
}

/* ——— Pickup request ——— */
.fzn-pickup-hero {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #2dd4bf 100%);
  border-radius: var(--fzn-radius-lg);
  padding: 1.35rem 1.5rem;
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 36px rgba(20, 184, 166, 0.35);
}

.fzn-pickup-hero h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.fzn-pickup-hero p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.92;
}

.fzn-courier-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.fzn-courier-pick-card {
  border: 2px solid var(--fzn-border);
  border-radius: var(--fzn-radius);
  padding: 1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  background: var(--fzn-surface);
  transition: all 0.2s ease;
  user-select: none;
}

.fzn-courier-pick-card:hover {
  border-color: var(--fzn-accent);
  box-shadow: var(--fzn-shadow-sm);
}

.fzn-courier-pick-card.active {
  border-color: var(--fzn-primary);
  background: linear-gradient(180deg, #eef2ff 0%, #fff 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.fzn-courier-pick-card .courier-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.5rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: #f1f5f9;
  color: var(--fzn-primary);
}

.fzn-courier-pick-card.active .courier-icon {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}

.fzn-courier-pick-card .courier-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fzn-text);
  margin: 0;
}

.fzn-courier-pick-card .courier-hint {
  font-size: 0.65rem;
  color: var(--fzn-text-muted);
  margin: 0.25rem 0 0;
}

.fzn-pickup-panel {
  display: none;
}

.fzn-pickup-panel.is-active {
  display: block;
}

.fzn-courier-badge-delhivery { background: #ede9fe; color: #5b21b6; }
.fzn-courier-badge-xpressbees { background: #ffedd5; color: #c2410c; }
.fzn-courier-badge-default { background: #f1f5f9; color: #475569; }

/* ——— Dashboard ——— */
.fzn-dash-welcome {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #6366f1 100%);
  border-radius: var(--fzn-radius-lg);
  padding: 1.5rem 1.75rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.35);
  animation: fznFadeUp 0.45s ease backwards;
}

.fzn-dash-welcome h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #fff;
}

.fzn-dash-welcome p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.fzn-dash-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.fzn-dash-quick .btn {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
}

.fzn-dash-quick .btn-light {
  color: #312e81;
}

.fzn-stat-card .fzn-stat-meta {
  font-size: 0.75rem;
  color: var(--fzn-text-muted);
  margin-top: 0.35rem;
}

.fzn-stat-card .fzn-stat-meta .text-success,
.fzn-stat-card .fzn-stat-meta .text-primary {
  font-weight: 600;
}

.fzn-chart-card .fzn-card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.fzn-chart-wrap {
  position: relative;
  height: 260px;
}

.fzn-chart-wrap.fzn-chart-sm {
  height: 220px;
}

.fzn-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--fzn-text-muted);
}

.fzn-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fzn-chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.fzn-dash-insight {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fzn-dash-insight-item {
  background: var(--fzn-surface);
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius);
  padding: 0.85rem 1rem;
  text-align: center;
}

.fzn-dash-insight-item .val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fzn-text);
  margin: 0;
}

.fzn-dash-insight-item .lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fzn-text-muted);
  margin: 0.25rem 0 0;
}

.fzn-stat-card.fzn-stat-danger .fzn-stat-icon {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* ——— Profile edit ——— */
.fzn-profile-side {
  overflow: visible;
}

@media (min-width: 992px) {
  .fzn-profile-side {
    position: sticky;
    top: 1rem;
  }
}

.fzn-profile-cover {
  height: 88px;
  background: linear-gradient(135deg, #312e81 0%, #6366f1 100%);
  border-radius: var(--fzn-radius-lg) var(--fzn-radius-lg) 0 0;
  margin: -1px -1px 0;
}

.fzn-profile-body {
  padding: 0 1.25rem 1.25rem !important;
}

.fzn-profile-avatar-wrap {
  position: relative;
  width: 108px;
  margin: -54px auto 0;
}

.fzn-profile-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--fzn-surface);
  box-shadow: var(--fzn-shadow);
  display: block;
}

.fzn-profile-avatar-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fzn-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--fzn-surface);
  font-size: 0.85rem;
  margin: 0;
}

.fzn-profile-avatar-edit:hover {
  background: #4f46e5;
  color: #fff;
}

.fzn-profile-body h5 {
  font-size: 1.05rem;
  font-weight: 700;
  word-break: break-word;
}

.fzn-profile-body .fzn-badge {
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
  padding: 0.35rem 0.65rem;
}

.fzn-profile-meta {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}

.fzn-profile-meta li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0;
  font-size: 0.85rem;
  color: var(--fzn-text-muted);
  border-bottom: 1px solid var(--fzn-border);
}

.fzn-profile-meta li:last-child {
  border-bottom: none;
}

.fzn-profile-meta li i {
  flex-shrink: 0;
  width: 1.1rem;
  text-align: center;
  color: var(--fzn-primary);
}

.fzn-profile-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--fzn-border);
}

.fzn-profile-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Input groups: icon + field on one line (do not set width:100% on inner .form-control) */
body.fzn-app .input-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}

body.fzn-app .input-group > .form-control,
body.fzn-app .input-group > .form-select {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

body.fzn-app .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.fzn-app .input-group > .form-control:not(:first-child),
body.fzn-app .input-group > .form-select:not(:first-child) {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

body.fzn-app .input-group > .input-group-text:first-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.fzn-profile-form .row > [class*="col-"] {
  min-width: 0;
}

/* ——— Admin: animations ——— */
.fzn-fade-in {
  animation: fznFadeUp 0.5s ease backwards;
}

.fzn-tilt-hover {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* ——— Settings page ——— */
.fzn-settings-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 991.98px) {
  .fzn-settings-layout {
    grid-template-columns: 1fr;
  }
}

.fzn-settings-sidebar {
  position: sticky;
  top: 1rem;
  z-index: 10;
}

@media (max-width: 991.98px) {
  .fzn-settings-sidebar {
    position: static;
  }

  .fzn-settings-tabs {
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.35rem;
  }

  .fzn-settings-tabs .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .fzn-settings-tabs .tab-chevron {
    display: none;
  }

  .fzn-settings-nav-head {
    display: none;
  }
}

.fzn-settings-nav {
  overflow: hidden;
}

.fzn-settings-nav-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--fzn-border);
  margin-bottom: 0.35rem;
}

.fzn-settings-nav-head > i {
  font-size: 1.35rem;
  color: var(--fzn-primary);
}

.fzn-settings-nav-head strong {
  display: block;
  font-size: 0.9rem;
  color: var(--fzn-text);
}

.fzn-settings-nav-head span {
  font-size: 0.75rem;
  color: var(--fzn-text-muted);
}

.fzn-settings-tabs {
  padding: 0.35rem;
}

.fzn-settings-tabs .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.65rem;
  color: var(--fzn-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  border: none;
  width: 100%;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.fzn-settings-tabs .nav-link:hover {
  background: #f1f5f9;
  color: var(--fzn-text);
}

.fzn-settings-tabs .nav-link.active {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.fzn-settings-tabs .nav-link.active .tab-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.fzn-settings-tabs .nav-link.active .tab-chevron {
  color: rgba(255, 255, 255, 0.8);
}

.fzn-settings-tabs .tab-icon {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--fzn-primary);
  flex-shrink: 0;
  font-size: 1rem;
}

.fzn-settings-tabs .tab-text {
  flex: 1;
  min-width: 0;
}

.fzn-settings-tabs .tab-chevron {
  font-size: 0.75rem;
  opacity: 0.4;
  flex-shrink: 0;
}

.fzn-settings-main {
  min-width: 0;
  padding-bottom: 5rem;
}

.fzn-settings-pane-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  animation: fznFadeUp 0.4s ease;
}

.fzn-settings-pane-head .pane-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.fzn-settings-pane-head h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--fzn-text);
}

.fzn-settings-pane-head p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--fzn-text-muted);
  line-height: 1.5;
}

.fzn-settings-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.fzn-settings-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.fzn-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 575.98px) {
  .fzn-toggle-grid {
    grid-template-columns: 1fr;
  }
}

.fzn-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--fzn-border);
  border-radius: var(--fzn-radius);
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fzn-toggle-row:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.fzn-toggle-row .toggle-info {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}

.fzn-toggle-row .toggle-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--fzn-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fzn-toggle-row .form-check-input {
  width: 2.5rem;
  height: 1.35rem;
  cursor: pointer;
}

.fzn-toggle-row .form-check-input:checked {
  background-color: var(--fzn-primary);
  border-color: var(--fzn-primary);
}

/* File upload zones */
.fzn-file-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 2px dashed var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  background: #fafbfc;
  transition: border-color 0.2s, background 0.2s;
}

.fzn-file-zone:hover {
  border-color: var(--fzn-primary);
  background: rgba(99, 102, 241, 0.04);
}

.fzn-file-zone-sm {
  padding: 0.75rem;
}

.fzn-file-preview {
  width: 72px;
  height: 72px;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid var(--fzn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.fzn-file-zone-sm .fzn-file-preview {
  width: 56px;
  height: 56px;
}

.fzn-file-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fzn-file-placeholder {
  font-size: 1.5rem;
  color: var(--fzn-text-muted);
  opacity: 0.5;
}

.fzn-file-meta {
  flex: 1;
  min-width: 0;
}

.fzn-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fzn-text);
  word-break: break-all;
}

.fzn-code-key {
  background: #f1f5f9;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.8rem;
  color: #4338ca;
}

.fzn-settings-main .tab-pane {
  animation: fznFadeUp 0.35s ease;
}

/* ——— Roles ——— */
.fzn-role-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  color: #4338ca;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: capitalize;
}

.fzn-role-list .list-group-item {
  border-color: var(--fzn-border);
  padding: 0.85rem 1rem;
}

/* ——— Permissions ——— */
.fzn-perm-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fzn-perm-chip.perm-show { background: #dbeafe; color: #1d4ed8; }
.fzn-perm-chip.perm-add { background: #d1fae5; color: #047857; }
.fzn-perm-chip.perm-update { background: #fef3c7; color: #b45309; }
.fzn-perm-chip.perm-delete { background: #fee2e2; color: #b91c1c; }

.fzn-perm-accordion .accordion-button {
  font-weight: 600;
  background: var(--fzn-surface);
  box-shadow: none;
}

.fzn-perm-accordion .accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), transparent);
  color: var(--fzn-primary);
}

.fzn-perm-table thead th {
  font-size: 0.75rem;
  vertical-align: middle;
}

.fzn-perm-table .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

/* ——— Courier admin cards ——— */
.fzn-courier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.fzn-courier-admin-card {
  position: relative;
  border-radius: var(--fzn-radius-lg);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.fzn-courier-admin-card .courier-card-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.25), transparent 70%);
  pointer-events: none;
}

.fzn-courier-admin-card.is-active .courier-card-glow,
.fzn-courier-admin-card:hover .courier-card-glow {
  opacity: 1;
}

.fzn-courier-admin-card.is-updating {
  opacity: 0.7;
  pointer-events: none;
}

.fzn-courier-admin-card .courier-card-inner {
  position: relative;
  padding: 1.5rem;
  background: var(--fzn-surface);
  border: 2px solid var(--fzn-border);
  border-radius: var(--fzn-radius-lg);
  height: 100%;
  transition: border-color 0.3s, transform 0.35s;
}

.fzn-courier-admin-card.is-active .courier-card-inner {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12);
}

.fzn-courier-admin-card:hover {
  transform: translateY(-6px);
}

.fzn-courier-admin-card:hover .courier-card-inner {
  box-shadow: var(--fzn-shadow);
}

.fzn-courier-admin-card .courier-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #fff;
}

.fzn-courier-admin-card.fzn-courier-delhivery .courier-icon-wrap {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
}

.fzn-courier-admin-card.fzn-courier-xpress .courier-icon-wrap {
  background: linear-gradient(135deg, #c2410c, #f97316);
}

.fzn-courier-admin-card.fzn-courier-default .courier-icon-wrap {
  background: linear-gradient(135deg, #475569, #64748b);
}

.fzn-courier-admin-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.fzn-courier-admin-card .slug {
  margin-bottom: 1rem;
}

.fzn-courier-admin-card .courier-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.fzn-courier-admin-card .courier-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fzn-courier-admin-card .courier-features li {
  padding: 0.2rem 0;
}

/* ——— Support tickets ——— */
.fzn-stat-card--active {
  outline: 2px solid var(--fzn-primary);
  outline-offset: 2px;
  box-shadow: 0 8px 24px rgba(94, 114, 228, 0.18);
}

.fzn-ticket-search-form {
  min-width: min(100%, 320px);
  max-width: 420px;
}

.fzn-ticket-search-form .input-group {
  flex-wrap: nowrap;
}

.fzn-ticket-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fzn-ticket-badge-open {
  background: rgba(251, 191, 36, 0.2);
  color: #b45309;
}

.fzn-ticket-badge-progress {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}

.fzn-ticket-badge-resolved {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.fzn-ticket-badge-closed {
  background: rgba(100, 116, 139, 0.2);
  color: #475569;
}

.fzn-ticket-conversation {
  max-height: min(58vh, 520px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.6) 0%, #fff 100%);
}

.fzn-ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fzn-ticket-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

.fzn-ticket-msg--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.fzn-ticket-msg--theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.fzn-ticket-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
}

.fzn-ticket-msg-author {
  font-weight: 600;
  color: var(--fzn-text);
}

.fzn-ticket-msg-time {
  color: var(--fzn-muted);
}

.fzn-ticket-msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  line-height: 1.55;
  font-size: 0.9rem;
  word-break: break-word;
}

.fzn-ticket-msg--theirs .fzn-ticket-msg-bubble {
  background: #fff;
  border: 1px solid var(--fzn-border);
  border-bottom-left-radius: 0.25rem;
}

.fzn-ticket-msg--mine .fzn-ticket-msg-bubble {
  background: linear-gradient(135deg, var(--fzn-primary), #7b8ff0);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
  box-shadow: 0 4px 14px rgba(94, 114, 228, 0.25);
}

.fzn-ticket-thread-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--fzn-muted);
}

.fzn-ticket-thread-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

body.fzn-app .fzn-card .fzn-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--fzn-border);
  background: #fafbfc;
  border-radius: 0 0 var(--fzn-radius) var(--fzn-radius);
}

.fzn-ticket-reply-box textarea {
  resize: vertical;
  min-height: 88px;
}

.fzn-ticket-closed-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  font-size: 0.875rem;
}

.fzn-ticket-notices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fzn-ticket-notice {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.fzn-ticket-notice-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
  flex-shrink: 0;
}

.fzn-ticket-meta-list {
  margin: 0;
}

.fzn-ticket-meta-list dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fzn-muted);
  margin-bottom: 0.15rem;
}

.fzn-ticket-meta-list dd {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}

.fzn-ticket-meta-list dd:last-child {
  margin-bottom: 0;
}

.fzn-ticket-tips {
  padding: 1rem;
  border-radius: 0.65rem;
  background: rgba(94, 114, 228, 0.06);
  border: 1px dashed rgba(94, 114, 228, 0.25);
  margin-bottom: 0.5rem;
}

.fzn-ticket-tips-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fzn-primary);
}

.fzn-ticket-tips ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  color: var(--fzn-muted);
}

.fzn-ticket-tips li + li {
  margin-top: 0.25rem;
}
