/* =========================================================
   InSuiteQueue — app.css
   ERP Bootstrap 5 — Custom Properties & Components
   ========================================================= */

/* ---- Variables ---------------------------------------- */
:root {
  --isq-sidebar-width: 272px;
  --isq-sidebar-bg-top   : #111e36;
  --isq-sidebar-bg-bot   : #172036;
  --isq-sidebar-active-bg: rgba(45,156,219,.15);
  --isq-sidebar-active-border: #2d9cdb;
  --isq-sidebar-hover    : rgba(255,255,255,.05);
  --isq-sidebar-card     : rgba(255,255,255,.07);
  --isq-sidebar-card-border: rgba(255,255,255,.08);
  --isq-topbar-h: 78px;
  --isq-primary: #2d9cdb;
  --isq-primary-light: #5bb8e8;
  --isq-accent : #00c9a7;
  --isq-font: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, system-ui, -apple-system, sans-serif;
  --isq-radius: .5rem;
  --isq-shadow: 0 2px 12px rgba(0,0,0,.07);
}

[data-bs-theme="dark"] {
  --isq-sidebar-bg-top: #0a1220;
  --isq-sidebar-bg-bot: #0d1828;
}

/* ---- Base --------------------------------------------- */
body {
  font-family: var(--isq-font);
  font-size: .92rem;
  background: #f0f4f8;
}

[data-bs-theme="dark"] body {
  background: #121827;
}

a { color: var(--isq-primary); }

/* ---- Layout ------------------------------------------- */
.isq-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.isq-sidebar {
  width           : var(--isq-sidebar-width);
  min-width       : var(--isq-sidebar-width);
  background      : linear-gradient(180deg, var(--isq-sidebar-bg-top) 0%, var(--isq-sidebar-bg-bot) 100%);
  box-shadow      : 2px 0 16px rgba(0,0,0,.25);
  position        : fixed;
  top: 0; left: 0;
  height          : 100vh;
  overflow-y      : hidden;
  overflow-x      : hidden;
  z-index         : 1040;
  transition      : transform .25s ease;
  scrollbar-width : thin;
  scrollbar-color : rgba(255,255,255,.08) transparent;
  border-right    : 1px solid rgba(255,255,255,.04);
}

.isq-sidebar::before {
  content         : '';
  position        : absolute;
  inset           : 0 0 auto 0;
  height          : 180px;
  background      : radial-gradient(circle at top left, rgba(91,184,232,.26), transparent 58%);
  pointer-events  : none;
}

.isq-sidebar::-webkit-scrollbar { width: 3px; }
.isq-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* ── Brand ──────────────────────────────── */
.isq-sidebar-brand {
  display         : flex;
  align-items     : center;
  gap             : .75rem;
  min-height      : var(--isq-topbar-h);
  padding         : 1rem 1.2rem;
  border-bottom   : 1px solid rgba(255,255,255,.06);
  background      : rgba(5,10,24,.22);
  position        : sticky;
  top             : 0;
  z-index         : 2;
  backdrop-filter : blur(8px);
}

.isq-logo-icon {
  width           : 36px;
  height          : 36px;
  border-radius   : 10px;
  background      : linear-gradient(135deg, var(--isq-primary) 0%, var(--isq-accent) 100%);
  display         : flex;
  align-items     : center;
  justify-content : center;
  color           : #fff;
  font-size       : 1rem;
  flex-shrink     : 0;
  box-shadow      : 0 3px 10px rgba(45,156,219,.4);
}

.isq-logo-text {
  font-size       : 1rem;
  font-weight     : 700;
  color           : #fff;
  letter-spacing  : -.2px;
  line-height     : 1.2;
}

.isq-logo-sub {
  font-size       : .65rem;
  color           : rgba(255,255,255,.4);
  font-weight     : 400;
  letter-spacing  : .03em;
  display         : block;
  line-height     : 1;
}

.isq-sidebar-chip {
  --bs-badge-padding-x: .6rem;
  --bs-badge-padding-y: .3rem;
  font-size       : .62rem;
  letter-spacing  : .08em;
}

.isq-sidebar-panel {
  background      : linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border          : 1px solid var(--isq-sidebar-card-border);
  border-radius   : .8rem;
  backdrop-filter : blur(10px);
}

.isq-sidebar-panel-label {
  color           : rgba(255,255,255,.5);
  letter-spacing  : .16em;
}

.isq-sidebar-panel-text {
  color           : rgba(255,255,255,.68);
  line-height     : 1.45;
}

.isq-sidebar-nav-wrap {
  min-height      : 0;
  overflow-y      : auto;
  padding-bottom  : .75rem;
}

/* ── Section labels ─────────────────────── */
.isq-nav-section-label {
  list-style      : none;
  padding         : 1.05rem 1.25rem .35rem;
  font-size       : .62rem;
  text-transform  : uppercase;
  letter-spacing  : 1.8px;
  color           : rgba(255,255,255,.28);
  font-weight     : 700;
}

/* ── Nav links ──────────────────────────── */
.isq-nav-link {
  display         : flex;
  align-items     : center;
  gap             : .7rem;
  padding         : .72rem .9rem;
  color           : rgba(255,255,255,.58);
  text-decoration : none;
  border-radius   : .9rem;
  margin          : 3px .7rem;
  font-size       : .855rem;
  font-weight     : 500;
  transition      : background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  border          : 1px solid transparent;
  position        : relative;
  overflow        : hidden;
}

.isq-nav-link .isq-nav-icon {
  width           : 34px;
  height          : 34px;
  border-radius   : 10px;
  background      : rgba(255,255,255,.06);
  display         : flex;
  align-items     : center;
  justify-content : center;
  flex-shrink     : 0;
  font-size       : .9rem;
  transition      : background .15s ease;
}

.isq-nav-link .isq-nav-label {
  flex            : 1 1 auto;
  min-width       : 0;
}

.isq-nav-link .isq-nav-chevron {
  color           : rgba(255,255,255,.22);
  font-size       : .72rem;
  transition      : transform .18s ease, color .18s ease;
}

.isq-nav-link:hover {
  background      : var(--isq-sidebar-hover);
  color           : rgba(255,255,255,.88);
  border-color    : rgba(255,255,255,.08);
  transform       : translateX(2px);
}
.isq-nav-link:hover .isq-nav-icon {
  background      : rgba(255,255,255,.10);
}
.isq-nav-link:hover .isq-nav-chevron {
  color           : rgba(255,255,255,.55);
  transform       : translateX(2px);
}

.isq-nav-link.active {
  background      : linear-gradient(90deg, rgba(45,156,219,.2), rgba(45,156,219,.08));
  color           : #f3fbff;
  font-weight     : 600;
  border-color    : rgba(91,184,232,.22);
  box-shadow      : inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(7,15,28,.22);
}
.isq-nav-link.active .isq-nav-icon {
  background      : linear-gradient(135deg, rgba(45,156,219,.35), rgba(0,201,167,.22));
  color           : #ffffff;
}

.isq-nav-link.active .isq-nav-chevron {
  color           : rgba(255,255,255,.72);
}

.isq-nav-badge { margin-left: auto; font-size: .65rem; min-width: 18px; text-align: center; }

/* ── Sidebar footer ─────────────────────────────────── */
.isq-sidebar-footer {
  padding         : .85rem 1rem 1rem;
  border-top      : 1px solid rgba(255,255,255,.07);
  background      : rgba(0,0,0,.16);
  flex-shrink     : 0;
  position        : sticky;
  bottom          : 0;
  backdrop-filter : blur(8px);
}

.isq-sidebar-usercard {
  background      : linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border          : 1px solid var(--isq-sidebar-card-border);
  border-radius   : .8rem;
}

.isq-sf-name {
  font-size       : .82rem;
  font-weight     : 600;
  color           : rgba(255,255,255,.88);
  line-height     : 1.2;
}

.isq-sf-role {
  font-size       : .68rem;
  color           : rgba(255,255,255,.38);
  text-transform  : capitalize;
  margin-top      : 1px;
}

.isq-btn-logout {
  border-radius   : .8rem;
  border-color    : rgba(255,255,255,.12);
  color           : rgba(255,255,255,.82);
  background      : rgba(255,255,255,.04);
  transition      : background .15s, color .15s, border-color .15s;
}
.isq-btn-logout:hover {
  background      : rgba(231,76,110,.25);
  color           : #fff;
  border-color    : rgba(231,76,110,.3);
}

.isq-sidebar-backdrop {
  position        : fixed;
  inset           : 0;
  background      : rgba(7,15,28,.48);
  backdrop-filter : blur(3px);
  opacity         : 0;
  visibility      : hidden;
  transition      : opacity .2s ease, visibility .2s ease;
  z-index         : 1035;
}

.isq-sidebar-backdrop.show {
  opacity         : 1;
  visibility      : visible;
}

/* Main content */
.isq-main,
.isq-main-wrapper {
  margin-left: var(--isq-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* Topbar */
.isq-topbar {
  height: var(--isq-topbar-h);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(246,249,252,.94));
  border-bottom: 1px solid rgba(15,23,42,.06);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(12px);
}

.isq-topbar-shell {
  min-width: 0;
  flex-wrap: nowrap;
}

[data-bs-theme="dark"] .isq-topbar {
  background: linear-gradient(180deg, rgba(28,37,55,.96), rgba(22,31,48,.94));
  border-color: rgba(148,163,184,.12);
}

.isq-topbar-surface {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: .65rem .9rem;
  border: 1px solid rgba(15,23,42,.06);
  background: rgba(255,255,255,.72);
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

[data-bs-theme="dark"] .isq-topbar-surface {
  background: rgba(15,23,42,.3);
  border-color: rgba(148,163,184,.12);
  box-shadow: none;
}

.isq-topbar-main {
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.isq-topbar-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.isq-topbar-eyebrow {
  color: #64748b;
  letter-spacing: .16em;
  font-weight: 700;
}

[data-bs-theme="dark"] .isq-topbar-eyebrow {
  color: #94a3b8;
}

.isq-topbar-chip {
  --bs-badge-padding-x: .7rem;
  --bs-badge-padding-y: .4rem;
  font-size: .7rem;
  font-weight: 600;
}

.isq-topbar-actions {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.isq-page-title { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }

.isq-topbar-divider { width: 1px; height: 24px; background: #dee2e6; }

.isq-quick-search {
  width: min(420px, 34vw);
  border: 1px solid rgba(15,23,42,.06);
  background: rgba(255,255,255,.78);
  border-radius: .75rem;
  overflow: hidden;
  flex: 0 0 auto;
}

[data-bs-theme="dark"] .isq-quick-search {
  background: rgba(15,23,42,.28);
  border-color: rgba(148,163,184,.12);
}

.isq-search-addon {
  color: #64748b;
  padding-left: .85rem;
}

.isq-search-input {
  background: transparent;
  box-shadow: none !important;
  min-height: 38px;
}

.isq-search-input::placeholder {
  color: #94a3b8;
}

.isq-topbar-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  color: #334155;
  background: rgba(255,255,255,.7);
}

[data-bs-theme="dark"] .isq-topbar-icon-btn {
  color: #e2e8f0;
  background: rgba(15,23,42,.28);
  border-color: rgba(148,163,184,.12);
}

.isq-topbar-cta {
  min-height: 40px;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  padding-inline: .9rem;
}

/* Content area */
.isq-content {
  padding: 1.75rem;
  flex: 1 1 auto;
}

/* Footer */
.isq-footer {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #e9ecef;
  padding: .6rem 1.5rem;
  font-size: .8rem;
  color: #6c757d;
}

/* ---- KPI Cards ---------------------------------------- */
.isq-kpi-card {
  border-radius: var(--isq-radius);
  transition: transform .2s, box-shadow .2s;
}

.isq-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1) !important;
}

.isq-kpi-card .isq-kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.isq-kpi-card .isq-kpi-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---- Avatar ------------------------------------------- */
.isq-avatar {
  width           : 34px;
  height          : 34px;
  border-radius   : 10px;
  display         : inline-flex;
  align-items     : center;
  justify-content : center;
  font-size       : .8rem;
  font-weight     : 700;
  flex-shrink     : 0;
  background      : linear-gradient(135deg, var(--isq-primary) 0%, var(--isq-accent,#00c9a7) 100%);
  color           : #fff;
  letter-spacing  : .02em;
}

.isq-avatar-sm {
  width: 32px; height: 32px;
  font-size: .75rem;
}

/* ---- Ticket badge (guichet) --------------------------- */
.isq-ticket-big {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
}

/* Live dot */
.isq-dot-live {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

/* ---- Timeline (ticket view) --------------------------- */
.isq-timeline { position: relative; }
.isq-timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: #e9ecef;
}

.isq-tl-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  position: relative;
}

/* ---- Buttons extra ------------------------------------ */
.btn-xs {
  padding: .2rem .45rem;
  font-size: .75rem;
  border-radius: .35rem;
  line-height: 1.4;
}

/* ---- Typography ---------------------------------------- */
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-black { font-weight: 900 !important; }
.x-small { font-size: .75rem; }
.letter-spacing-2 { letter-spacing: 2px; }
.cursor-pointer { cursor: pointer; }

/* ---- Sidebar toggle (mobile) -------------------------- */
.isq-sidebar-toggle { display: none; }

@media (max-width: 991.98px) {
  .isq-sidebar {
    transform: translateX(-100%);
  }
  .isq-sidebar.show {
    transform: translateX(0);
  }
  .isq-main,
  .isq-main-wrapper {
    margin-left: 0;
  }
  .isq-sidebar-toggle { display: flex; }
  .isq-content { padding: 1rem; }
  .isq-topbar {
    padding: 0 .85rem;
    gap: .55rem;
    min-height: var(--isq-topbar-h);
    height: auto;
    padding-block: .7rem;
  }
  .isq-topbar-shell {
    flex-wrap: wrap;
  }
  .isq-topbar-surface {
    width: 100%;
    padding: .55rem .7rem;
  }
  .isq-topbar-main {
    flex-wrap: wrap;
    align-items: stretch !important;
  }
  .isq-topbar-actions {
    width: 100%;
    justify-content: flex-start !important;
    flex-wrap: wrap;
  }
  .isq-quick-search {
    min-width: 100%;
    width: 100%;
    order: 10;
  }
  .isq-topbar-icon-btn,
  .isq-topbar-cta {
    min-width: 40px;
  }
  .isq-page-title {
    font-size: .95rem;
    white-space: normal;
    line-height: 1.2;
  }
  .isq-topbar-divider { display: none; }

  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 {
    flex-direction: column;
    align-items: flex-start !important;
    gap: .75rem;
  }

  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 > *:last-child {
    width: 100%;
  }

  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 > *:last-child .btn,
  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 > *:last-child .btn-group,
  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 > *:last-child .dropdown {
    width: 100%;
  }

  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 > *:last-child .btn-group .btn,
  .isq-content > .d-flex.align-items-center.justify-content-between.mb-4 > *:last-child .dropdown .btn {
    width: 100%;
  }

  .isq-content .d-flex.gap-2,
  .isq-content .d-flex.gap-3 {
    flex-wrap: wrap;
  }

  .isq-content .d-flex.gap-2 > .btn,
  .isq-content .d-flex.gap-3 > .btn {
    flex: 1 1 180px;
  }
}

@media (max-width: 767.98px) {
  .isq-content {
    padding: .75rem;
  }
  .card .card-body {
    padding: .9rem;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .btn,
  .form-control,
  .form-select {
    min-height: 38px;
  }

  .isq-content .table {
    font-size: .86rem;
  }

  .isq-content .table th,
  .isq-content .table td {
    white-space: nowrap;
    vertical-align: middle;
  }

  .isq-content .pagination {
    flex-wrap: wrap;
    gap: .35rem;
  }

  .isq-content .modal-footer {
    flex-wrap: wrap;
  }

  .isq-content .modal-footer .btn {
    flex: 1 1 140px;
  }

  .isq-content .input-group {
    flex-wrap: wrap;
  }

  .isq-content .input-group > .form-control,
  .isq-content .input-group > .form-select,
  .isq-content .input-group > .btn,
  .isq-content .input-group > .input-group-text {
    width: 100%;
    border-radius: .375rem !important;
    margin-bottom: .35rem;
  }
}

/* ---- Dark mode adjustments ---------------------------- */
[data-bs-theme="dark"] .card {
  background: #1c2537;
  border-color: #2a3550;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
  background: #1c2537 !important;
  border-color: #2a3550;
}

[data-bs-theme="dark"] .table {
  --bs-table-color: #adb5bd;
  --bs-table-bg: transparent;
  --bs-table-border-color: #2a3550;
}

[data-bs-theme="dark"] .table-light {
  --bs-table-color: #adb5bd;
  --bs-table-bg: #151e2e;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #1c2537;
  border-color: #2a3550;
  color: #e0e6f0;
}

[data-bs-theme="dark"] .isq-topbar .dropdown-menu,
[data-bs-theme="dark"] .dropdown-menu {
  background: #1c2537;
  border-color: #2a3550;
}

/* ---- Scrollbar global --------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 6px; }

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: #2a3550; }

/* ---- Borne service buttons override ------------------- */
.isq-borne-service-btn {
  background: #fff;
  border-radius: 16px !important;
  transition: transform .15s, box-shadow .15s, background .15s;
  cursor: pointer;
}

.isq-borne-service-btn:hover,
.isq-borne-service-btn:focus {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
  background: var(--svc-color, #2d9cdb);
  color: #fff;
}

/* ---- Misc -------------------------------------------- */
.object-fit-cover { object-fit: cover; }

/* =========================================================
   AUTH LAYOUT — Login page
   ========================================================= */

body.isq-auth-body {
  background: #f0f4f8;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: var(--isq-font);
}

.isq-auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Panneau gauche dégradé */
.isq-auth-left {
  width: 45%;
  min-width: 380px;
  background: linear-gradient(145deg, #0a1628 0%, #0f2044 40%, #1a3a6b 70%, #2d9cdb 100%);
  position: relative;
  overflow: hidden;
}

.isq-auth-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(45,156,219,.12);
  top: -160px;
  right: -160px;
  pointer-events: none;
}

.isq-auth-left::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -100px;
  left: -80px;
  pointer-events: none;
}

.isq-auth-left-inner {
  position: relative;
  z-index: 1;
}

.isq-auth-logo {
  width: 88px;
  height: 88px;
  background: rgba(255,255,255,.12);
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
}

.isq-feature-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: #fff;
}

/* Panneau droit — formulaire */
.isq-auth-right {
  flex: 1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.isq-auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.04);
}

.isq-auth-form h4 {
  font-size: 1.45rem;
  color: #0f2044;
}

.isq-auth-card .input-group-text {
  background: #f0f4f8;
  border-color: #dee2e6;
  color: #6c757d;
}

.isq-auth-card .form-control {
  border-color: #dee2e6;
  padding: .65rem .9rem;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}

.isq-auth-card .form-control:focus {
  border-color: var(--isq-primary);
  box-shadow: 0 0 0 3px rgba(45,156,219,.15);
}

.isq-auth-card .btn-primary {
  background: linear-gradient(135deg, #1a3a6b 0%, #2d9cdb 100%);
  border: none;
  padding: .75rem;
  font-size: 1rem;
  letter-spacing: .3px;
  transition: opacity .2s, transform .15s;
}

.isq-auth-card .btn-primary:hover {
  opacity: .92;
  transform: translateY(-1px);
}

.isq-auth-card .btn-primary:active {
  transform: translateY(0);
}

/* Badge version */
.isq-auth-version {
  font-size: .72rem;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

/* Responsive */
@media (max-width: 991.98px) {
  .isq-auth-left { display: none !important; }
  .isq-auth-right { background: #f0f4f8; }
  .isq-auth-card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .isq-auth-card { padding: 1.5rem 1.25rem; box-shadow: none; border: none; }
}

/* Dark mode auth */
[data-bs-theme="dark"] .isq-auth-right { background: #0d1526; }
[data-bs-theme="dark"] .isq-auth-card {
  background: #1c2537;
  border-color: #2a3550;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
[data-bs-theme="dark"] .isq-auth-form h4 { color: #e0e6f0; }
[data-bs-theme="dark"] .isq-auth-card .input-group-text {
  background: #151e2e;
  border-color: #2a3550;
  color: #8a9ab5;
}
[data-bs-theme="dark"] .isq-auth-card .form-control {
  background: #151e2e;
  border-color: #2a3550;
  color: #e0e6f0;
}

/* Bootstrap extension : 7 colonnes égales */
@media (min-width: 1200px) {
  .row-cols-xl-7 > * {
    flex: 0 0 auto;
    width: 14.2857142857%;
  }
}

/* ---- Layout refit: aligned header/sidebar ---------------- */
.isq-sidebar {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.isq-sidebar-brand {
  min-height: var(--isq-topbar-h);
  padding: 1rem 1.2rem;
}

.isq-sidebar-nav-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: .5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

.isq-sidebar-footer {
  position: static;
  padding: .75rem 1rem 1rem;
}

.isq-main,
.isq-main-wrapper {
  width: calc(100% - var(--isq-sidebar-width));
}

.isq-topbar {
  height: var(--isq-topbar-h);
  padding: .7rem 1.35rem;
  background: #eef3f8;
  border-bottom: 1px solid rgba(15,23,42,.08);
  backdrop-filter: none;
}

.isq-topbar-shell {
  height: 100%;
  padding: 0 .75rem 0 1rem;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.92);
  border-radius: .8rem;
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

.isq-topbar-surface {
  min-height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.isq-topbar-actions {
  min-width: max-content;
}

.isq-quick-search {
  width: min(420px, 34vw);
  border-color: rgba(15,23,42,.08);
  background: #fff;
  border-radius: .8rem;
}

.isq-topbar-icon-btn,
.isq-topbar-cta {
  border-radius: .75rem;
}

.isq-content {
  padding: 1.25rem 1.35rem 1.75rem;
}

[data-bs-theme="dark"] .isq-topbar {
  background: #111827;
  border-color: rgba(148,163,184,.12);
}

[data-bs-theme="dark"] .isq-topbar-shell {
  background: rgba(28,37,55,.92);
  border-color: rgba(148,163,184,.14);
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .isq-main,
  .isq-main-wrapper {
    width: 100%;
  }

  .isq-topbar {
    height: auto;
    min-height: var(--isq-topbar-h);
    padding: .7rem .85rem;
  }

  .isq-topbar-shell {
    height: auto;
    padding: .6rem .7rem;
  }

  .isq-topbar-surface {
    width: 100%;
  }
}
