/* ============================================================
   NotiViz — Design System
   Palette: Blue #1565C0 / White / Slate grays
   ============================================================ */

:root {
  --nv-primary:       #1565C0;
  --nv-primary-dark:  #0D47A1;
  --nv-primary-light: #1976D2;
  --nv-accent:        #29B6F6;
  --nv-bg:            #F0F4F8;
  --nv-surface:       #FFFFFF;
  --nv-border:        #E2E8F0;
  --nv-text:          #1E293B;
  --nv-muted:         #64748B;
  --nv-success:       #10B981;
  --nv-danger:        #EF4444;
  --nv-warning:       #F59E0B;
  --nv-info:          #3B82F6;
  --nv-shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --nv-shadow:        0 4px 16px rgba(0,0,0,.10);
  --nv-shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --nv-radius:        12px;
  --nv-radius-sm:     8px;
  --nv-radius-lg:     20px;
  --nv-transition:    .2s ease;
  --sidebar-width:    260px;
}

/* ── Scrollbars ──────────────────────────────────────────── */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: var(--nv-border); border-radius: 99px; }
::-webkit-scrollbar-thumb        { background: var(--nv-primary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover  { background: var(--nv-primary-dark); }
* { scrollbar-width: thin; scrollbar-color: var(--nv-primary) var(--nv-border); }

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--nv-bg);
  color: var(--nv-text);
  min-height: 100vh;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--nv-text);
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}
.text-muted { color: var(--nv-muted) !important; }

/* ── Card ────────────────────────────────────────────────── */
.nv-card {
  background: var(--nv-surface);
  border-radius: var(--nv-radius);
  box-shadow: var(--nv-shadow-sm);
  border: 1px solid var(--nv-border);
  padding: 1.75rem;
  transition: box-shadow var(--nv-transition);
}
.nv-card:hover { box-shadow: var(--nv-shadow); }
.nv-card-header {
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--nv-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nv-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

/* ── Stat cards ──────────────────────────────────────────── */
.nv-stat-card {
  background: var(--nv-surface);
  border-radius: var(--nv-radius);
  border: 1px solid var(--nv-border);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--nv-shadow-sm);
  transition: box-shadow var(--nv-transition), transform var(--nv-transition);
}
.nv-stat-card:hover { box-shadow: var(--nv-shadow); transform: translateY(-2px); }
.nv-stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--nv-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.nv-stat-icon.blue   { background: #EFF6FF; color: var(--nv-primary); }
.nv-stat-icon.green  { background: #ECFDF5; color: var(--nv-success); }
.nv-stat-icon.orange { background: #FFFBEB; color: var(--nv-warning); }
.nv-stat-icon.red    { background: #FEF2F2; color: var(--nv-danger);  }
.nv-stat-value {
  font-size: 2rem; font-weight: 800;
  color: var(--nv-text); line-height: 1;
}
.nv-stat-label {
  font-size: .8rem; color: var(--nv-muted);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
  margin-top: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.nv-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1.1rem;
  border-radius: var(--nv-radius-sm);
  font-size: .875rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--nv-transition);
  text-decoration: none; white-space: nowrap;
  line-height: 1.4;
}
.nv-btn:focus-visible { outline: 3px solid var(--nv-accent); outline-offset: 2px; }
.nv-btn-primary {
  background: var(--nv-primary); color: #fff;
  box-shadow: 0 2px 8px rgba(21,101,192,.3);
}
.nv-btn-primary:hover { background: var(--nv-primary-dark); color: #fff; transform: translateY(-1px); }
.nv-btn-outline {
  background: transparent; color: var(--nv-primary);
  border: 2px solid var(--nv-primary);
}
.nv-btn-outline:hover { background: var(--nv-primary); color: #fff; }
.nv-btn-ghost {
  background: transparent; color: var(--nv-muted);
}
.nv-btn-ghost:hover { background: var(--nv-border); color: var(--nv-text); }
.nv-btn-danger {
  background: var(--nv-danger); color: #fff;
}
.nv-btn-danger:hover { background: #DC2626; color: #fff; }
.nv-btn-success {
  background: var(--nv-success); color: #fff;
}
.nv-btn-success:hover { background: #059669; color: #fff; }
.nv-btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.nv-btn-lg { padding: .75rem 1.75rem; font-size: 1rem; border-radius: 10px; }
.nv-btn-block { width: 100%; justify-content: center; }

/* ── Form Controls ───────────────────────────────────────── */
.nv-form-group { margin-bottom: 1.25rem; }
.nv-label {
  display: block; margin-bottom: .4rem;
  font-size: .85rem; font-weight: 600; color: var(--nv-text);
}
.nv-label .required { color: var(--nv-danger); margin-left: 2px; }
.nv-input, .nv-select, .nv-textarea {
  display: block; width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--nv-border);
  border-radius: var(--nv-radius-sm);
  font-size: .9rem; color: var(--nv-text);
  background: var(--nv-surface);
  transition: border-color var(--nv-transition), box-shadow var(--nv-transition);
  outline: none;
  -webkit-appearance: none;
}
input.nv-input, .nv-select { height: 2.5rem; }
.nv-input:focus, .nv-select:focus, .nv-textarea:focus {
  border-color: var(--nv-primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.15);
}
.nv-input.is-invalid, .nv-select.is-invalid {
  border-color: var(--nv-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}
.nv-invalid-feedback {
  display: none; color: var(--nv-danger);
  font-size: .8rem; margin-top: .3rem;
}
.nv-input.is-invalid ~ .nv-invalid-feedback,
.nv-select.is-invalid ~ .nv-invalid-feedback { display: block; }
.nv-textarea { resize: vertical; min-height: 100px; }
.pwd-strength-wrap { margin-top: .55rem; }
.pwd-strength-bar { height: 5px; background: var(--nv-border); border-radius: 99px; overflow: hidden; margin-bottom: .55rem; }
.pwd-bar-fill { height: 100%; width: 0; border-radius: 99px; transition: width .25s, background-color .25s; }
.pwd-bar-fill.lvl1 { background: #ef4444; }
.pwd-bar-fill.lvl2 { background: #f97316; }
.pwd-bar-fill.lvl3 { background: #eab308; }
.pwd-bar-fill.lvl4 { background: #22c55e; }
.pwd-checks { display: flex; flex-direction: column; gap: .28rem; }
.pwd-check { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--nv-muted); transition: color .2s; }
.pwd-check.ok { color: #16a34a; }
.pwd-check i { font-size: .72rem; width: 13px; flex-shrink: 0; transition: color .2s; }
.nv-input-icon { position: relative; }
.nv-input-icon .nv-input { padding-left: 2.5rem; }
.nv-input-icon > i {
  position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%);
  color: var(--nv-muted); font-size: .9rem; pointer-events: none;
}
.nv-input-icon .nv-input { padding-right: 2.75rem; }
.nv-input-pwd-toggle {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 2.75rem; display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--nv-muted); transition: color var(--nv-transition);
}
.nv-input-pwd-toggle:hover { color: var(--nv-primary); }

/* ── Toggle Switch ───────────────────────────────────────── */
.nv-switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.nv-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.nv-switch-track {
  width: 42px; height: 24px;
  background: #CBD5E1; border-radius: 99px;
  transition: background var(--nv-transition);
  position: relative; flex-shrink: 0;
}
.nv-switch-track::after {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  top: 3px; left: 3px;
  box-shadow: var(--nv-shadow-sm);
  transition: transform var(--nv-transition);
}
.nv-switch input:checked + .nv-switch-track { background: var(--nv-primary); }
.nv-switch input:checked + .nv-switch-track::after { transform: translateX(18px); }
.nv-switch-label { font-size: .875rem; color: var(--nv-text); user-select: none; }

/* ── Badge ───────────────────────────────────────────────── */
.nv-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 99px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.nv-badge-success { background: #DCFCE7; color: #166534; }
.nv-badge-danger  { background: #FEE2E2; color: #991B1B; }
.nv-badge-warning { background: #FEF9C3; color: #854D0E; }
.nv-badge-info    { background: #DBEAFE; color: #1E40AF; }
.nv-badge-muted   { background: #F1F5F9; color: #475569;  }
.nv-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Table ───────────────────────────────────────────────── */
.nv-table-wrap { overflow-x: auto; border-radius: var(--nv-radius); }
.nv-table {
  width: 100%; border-collapse: collapse;
  font-size: .875rem;
}
.nv-table thead th {
  background: #F8FAFC; padding: .75rem 1rem;
  text-align: left; font-weight: 700; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--nv-muted); border-bottom: 1px solid var(--nv-border);
  white-space: nowrap;
}
.nv-table tbody td {
  padding: .85rem 1rem; border-bottom: 1px solid var(--nv-border);
  vertical-align: middle; color: var(--nv-text);
}
.nv-table tbody tr:last-child td { border-bottom: none; }
.nv-table tbody tr:hover { background: #F8FAFC; }
.nv-table .actions { display: flex; gap: .4rem; }

/* ── Sidebar Layout ──────────────────────────────────────── */
.nv-layout { display: flex; min-height: 100vh; }
.nv-sidebar {
  width: var(--sidebar-width);
  background: var(--nv-primary-dark);
  flex-shrink: 0;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--nv-transition);
}
.nv-sidebar-logo {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.nv-sidebar-logo h1 {
  color: #fff; font-size: 1.4rem; font-weight: 800;
  margin: 0; letter-spacing: -.02em;
}
.nv-sidebar-logo span { color: var(--nv-accent); }
.nv-sidebar-logo p { color: rgba(255,255,255,.5); font-size: .75rem; margin: 0; }
.nv-sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.nv-nav-section-title {
  padding: .5rem 1.5rem;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.35);
}
.nv-nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.5rem; margin: .1rem .75rem;
  border-radius: var(--nv-radius-sm);
  color: rgba(255,255,255,.7);
  text-decoration: none; font-size: .875rem; font-weight: 500;
  transition: all var(--nv-transition);
  cursor: pointer;
}
.nv-nav-item i { width: 18px; text-align: center; font-size: 1rem; }
.nv-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nv-nav-item.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.nv-nav-item.active i { color: var(--nv-accent); }
.nv-sidebar-footer {
  padding: .875rem 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.nv-user-info { display: flex; align-items: center; gap: .5rem; overflow: hidden; }
.nv-user-avatar {
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 32px;
  align-self: center;
  width: 32px;   min-width: 32px;   max-width: 32px;
  height: 32px;  min-height: 32px;  max-height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  line-height: 32px;
  text-align: center;
  font-size: .8rem; font-weight: 700; color: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
.nv-user-info > div { flex: 1; min-width: 0; overflow: hidden; }
.nv-user-name { font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-user-role { font-size: .68rem; color: rgba(255,255,255,.5); }
.nv-user-info > button { flex: 0 0 auto; }

/* ── Main content ────────────────────────────────────────── */
.nv-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.nv-topbar {
  background: var(--nv-surface);
  border-bottom: 1px solid var(--nv-border);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--nv-shadow-sm);
}
.nv-topbar-title h2 { font-size: 1.25rem; margin: 0; }
.nv-topbar-title p { font-size: .8rem; color: var(--nv-muted); margin: 0; }
.nv-content { padding: 2rem; flex: 1; }

/* ── Auth pages ──────────────────────────────────────────── */
.nv-auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--nv-primary-dark) 0%, var(--nv-primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.nv-auth-card {
  background: var(--nv-surface);
  border-radius: var(--nv-radius-lg);
  box-shadow: var(--nv-shadow-lg);
  padding: 2.5rem;
  width: 100%; max-width: 420px;
}
.nv-auth-logo {
  text-align: center; margin-bottom: 2rem;
}
.nv-auth-logo h1 {
  font-size: 2rem; font-weight: 800;
  color: var(--nv-primary);
  letter-spacing: -.04em; margin: 0;
}
.nv-auth-logo span { color: var(--nv-accent); }
.nv-auth-logo p { color: var(--nv-muted); font-size: .875rem; margin: .5rem 0 0; }
.nv-auth-divider {
  height: 1px; background: var(--nv-border);
  margin: 1.5rem 0; position: relative;
}

/* ── Visitor form ────────────────────────────────────────── */
.nv-visitor-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #EFF6FF 0%, #DBEAFE 100%);
  display: flex; flex-direction: column;
}
.nv-visitor-header {
  background: var(--nv-surface);
  border-bottom: 1px solid var(--nv-border);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--nv-shadow-sm);
}
.nv-visitor-header .brand h1 {
  font-size: 1.25rem; font-weight: 800;
  color: var(--nv-primary); margin: 0;
}
.nv-visitor-header .brand span { color: var(--nv-accent); }
.nv-visitor-logo { max-height: 44px; max-width: 180px; object-fit: contain; display: block; }
.nv-visitor-brand-name { font-size: 1.1rem; font-weight: 700; color: var(--nv-primary); }
.nv-visitor-footer {
  text-align: center; padding: .6rem 1rem;
  font-size: .75rem; color: var(--nv-muted);
  background: var(--nv-surface); border-top: 1px solid var(--nv-border);
}
.nv-visitor-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.nv-visitor-card {
  background: var(--nv-surface);
  border-radius: var(--nv-radius-lg);
  box-shadow: var(--nv-shadow-lg);
  padding: 2.5rem;
  width: 100%; max-width: 560px;
}
.nv-visitor-card h2 {
  font-size: 1.5rem; color: var(--nv-primary); margin-bottom: .25rem;
}
.nv-visitor-card .subtitle { color: var(--nv-muted); font-size: .9rem; margin-bottom: 2rem; }

/* ── Success / Empty states ──────────────────────────────── */
.nv-state {
  text-align: center; padding: 4rem 2rem;
}
.nv-state-icon {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1.25rem;
}
.nv-state-icon.success { background: #DCFCE7; color: var(--nv-success); }
.nv-state-icon.empty   { background: #F1F5F9; color: var(--nv-muted);   }
.nv-state h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.nv-state p  { color: var(--nv-muted); max-width: 400px; margin: 0 auto; }

/* ── Toast ───────────────────────────────────────────────── */
#nv-toast-container {
  position: fixed; top: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.nv-toast {
  background: var(--nv-surface);
  border-radius: var(--nv-radius-sm);
  box-shadow: var(--nv-shadow-lg);
  padding: .875rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  min-width: 280px; max-width: 400px;
  animation: slideInRight .25s ease;
  border-left: 4px solid var(--nv-info);
}
.nv-toast.success { border-left-color: var(--nv-success); }
.nv-toast.danger  { border-left-color: var(--nv-danger);  }
.nv-toast.warning { border-left-color: var(--nv-warning); }
.nv-toast i { font-size: 1.1rem; }
.nv-toast.success i { color: var(--nv-success); }
.nv-toast.danger  i { color: var(--nv-danger);  }
.nv-toast.warning i { color: var(--nv-warning); }
.nv-toast span { flex: 1; font-size: .875rem; }
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── Modal ───────────────────────────────────────────────── */
.nv-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
  animation: fadeIn .2s ease;
}
.nv-modal {
  background: var(--nv-surface);
  border-radius: var(--nv-radius-lg);
  box-shadow: var(--nv-shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: scaleIn .2s ease;
  overflow: hidden;
}
.nv-modal.nv-modal-lg { max-width: 740px; }
.nv-modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--nv-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.nv-modal-title { font-size: 1.1rem; font-weight: 700; margin: 0; }
.nv-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--nv-muted); font-size: 1.2rem; padding: .25rem;
  border-radius: 6px; transition: all var(--nv-transition);
  display: flex; align-items: center;
}
.nv-modal-close:hover { background: var(--nv-border); color: var(--nv-text); }
.nv-modal-body { padding: 1.75rem; overflow-y: auto; flex: 1; }
.nv-modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--nv-border);
  display: flex; gap: .75rem; justify-content: flex-end;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Loader ──────────────────────────────────────────────── */
.nv-loader {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem;
}
.nv-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--nv-border);
  border-top-color: var(--nv-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Search bar ──────────────────────────────────────────── */
.nv-search {
  position: relative; max-width: 320px;
}
.nv-search input {
  padding-left: 2.5rem;
  border-radius: 99px;
  border: 1.5px solid var(--nv-border);
  background: var(--nv-bg);
  width: 100%;
}
.nv-search i {
  position: absolute; left: .9rem; top: 50%;
  transform: translateY(-50%);
  color: var(--nv-muted); font-size: .875rem;
}

/* ── Lang toggle ─────────────────────────────────────────── */
.nv-lang-toggle {
  display: flex; gap: .35rem;
}
.nv-lang-btn {
  padding: .3rem .65rem;
  border-radius: 6px; border: 1.5px solid var(--nv-border);
  background: transparent; font-size: .8rem; font-weight: 700;
  color: var(--nv-muted); cursor: pointer;
  transition: all var(--nv-transition);
}
.nv-lang-btn.active {
  background: var(--nv-primary); color: #fff; border-color: var(--nv-primary);
}

/* ── QR code box ─────────────────────────────────────────── */
.nv-qr-box {
  background: var(--nv-bg);
  border: 2px solid var(--nv-border);
  border-radius: var(--nv-radius);
  padding: 2rem;
  display: inline-flex;
  flex-direction: column; align-items: center; gap: 1rem;
}
.nv-qr-box canvas { border-radius: var(--nv-radius-sm); }

/* ── Drag handle ─────────────────────────────────────────── */
.nv-drag-handle {
  cursor: grab; color: var(--nv-muted);
  padding: .25rem; touch-action: none;
}
.nv-drag-handle:active { cursor: grabbing; }
.nv-sortable-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--nv-surface);
  border: 1.5px solid var(--nv-border);
  border-radius: var(--nv-radius-sm);
  margin-bottom: .5rem;
  transition: box-shadow var(--nv-transition);
}
.nv-sortable-item:hover { box-shadow: var(--nv-shadow-sm); }
.nv-sortable-item.dragging { box-shadow: var(--nv-shadow); opacity: .8; }

/* ── Utilities ───────────────────────────────────────────── */
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem  !important; }
.gap-3 { gap: .75rem !important; }
.gap-4 { gap: 1rem   !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.flex-wrap { flex-wrap: wrap !important; }
.w-100 { width: 100% !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-auto { margin-top: auto !important; }
.ms-auto { margin-left: auto !important; }

@media (min-width: 769px) {
  .d-md-none { display: none !important; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nv-sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
    box-shadow: none;
  }
  .nv-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--nv-shadow-lg);
  }
  .nv-main { margin-left: 0; overflow-x: hidden; }
  .nv-content { padding: 1rem; overflow-x: hidden; }

  /* Topbar mobile : compact et sans débordement */
  .nv-topbar {
    padding: .75rem 1rem;
    gap: .5rem;
    overflow: hidden;
  }
  .nv-topbar-title { display: none; }          /* cache titre+date — remplacé par logo mobile */
  .nv-topbar .nv-lang-toggle { display: none; }/* cache le sélecteur de langue */
  .nv-topbar .nv-btn > span { display: none; } /* icônes seules dans les boutons du topbar */
  .nv-topbar .nv-btn > i { margin: 0; }
  .nv-nav-config { display: none; }

  .nv-visitor-card { padding: 1.5rem; }
  .nv-auth-card { padding: 1.75rem; }

  /* Overlay sombre derrière la sidebar ouverte */
  .nv-sidebar-backdrop {
    display: block !important;
    position: fixed; inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 99;
    animation: fadeIn .2s ease;
  }
}

.nv-sidebar-backdrop { display: none; }

.nv-mobile-brand {
  display: none;
  font-size: 1.2rem; font-weight: 800;
  color: var(--nv-primary); letter-spacing: -.03em;
  flex-shrink: 0;
  margin-right: auto;
}
.nv-mobile-brand span { color: var(--nv-accent); }
@media (max-width: 768px) {
  .nv-mobile-brand { display: block; }
}
