/* ════════════════════════════════════════════════════════════════════
   Nethive Licensing — Portal stylesheet
   Bootstrap 5.3 base, Nethive neon/dark palette
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Nethive palette */
  --nl-blue:        #3BC9FF;
  --nl-blue-alt:    #1EA7FF;
  --nl-blue-soft:   rgba(59, 201, 255, 0.14);
  --nl-blue-glow:   rgba(59, 201, 255, 0.30);
  --nl-yellow:      #F3BA17;
  --nl-yellow-alt:  #FFD24A;
  --nl-yellow-soft: rgba(243, 186, 23, 0.14);

  /* Status */
  --nl-success:     #2ECC71;
  --nl-warning:     #F39C12;
  --nl-danger:      #E74C3C;

  /* Sidebar (always dark) */
  --sidebar-w:      252px;
  --sidebar-w-sm:   64px;
  --sidebar-bg:     #16222e;
  --sidebar-hover:  rgba(59, 201, 255, 0.08);
  --sidebar-active: rgba(59, 201, 255, 0.14);
  --sidebar-border: rgba(47, 69, 90, 0.55);
  --sidebar-text:   #8fa8c0;
}

/* ── Global ─────────────────────────────────────────────────────────── */
body { overflow-x: hidden; }
a { color: inherit; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────
   Always dark. Fixed, full-height, own scroll.
   ──────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  transition: width .22s ease;
  overflow: visible;
}

.sidebar.collapsed { width: var(--sidebar-w-sm); }

/* Header */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem .9rem;
  border-bottom: 1px solid var(--sidebar-border);
  min-height: 60px;
  flex-shrink: 0;
  gap: .5rem;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  justify-content: center;
  padding: .85rem .4rem;
  gap: .5rem;
}

/* Brand */
.brand-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: -.3px;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--nl-blue) 0%, var(--nl-blue-alt) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .04em;
  color: #13202e;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--nl-blue-glow);
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.brand-text strong {
  font-size: .91rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small {
  font-size: .72rem;
  color: var(--sidebar-text);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar.collapsed .brand-text { display: none; }
.sidebar.collapsed .brand-mark { margin: 0 auto; }

/* Collapse toggle */
.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--sidebar-text);
  padding: .3rem .35rem;
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 1;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.sidebar-toggle-btn:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar.collapsed .sidebar-toggle-btn {
  width: 100%;
  justify-content: center;
  padding: .25rem;
  display: flex;
}

/* Nav */
.sidebar-nav {
  list-style: none;
  padding: .6rem 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-border) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 4px; }

.sidebar-nav li { white-space: nowrap; }

.sidebar-section-label {
  padding: .7rem 1.1rem .3rem;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(143, 168, 192, 0.5);
}
.sidebar.collapsed .sidebar-section-label { display: none; }

.sidebar-divider {
  height: 1px;
  background: var(--sidebar-border);
  margin: .4rem .75rem;
}
.sidebar.collapsed .sidebar-divider { margin: .4rem .5rem; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  transition: background .15s, color .15s, border-color .15s;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
}
.sidebar-link i {
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-link.active {
  background: var(--sidebar-active);
  color: var(--nl-blue);
  border-left-color: var(--nl-blue);
}
.sidebar-link.active i { color: var(--nl-blue); }

/* Action link (yellow tint) */
.sidebar-link-action { color: rgba(143, 168, 192, 0.7); }
.sidebar-link-action:hover {
  background: var(--nl-yellow-soft);
  color: var(--nl-yellow);
}
.sidebar-link-action:hover i { color: var(--nl-yellow); }

.sidebar.collapsed .sidebar-text { display: none !important; }
.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: .65rem;
  border-left: none;
  border-right: none;
}
.sidebar.collapsed .sidebar-link.active { border-left: none; border-right: none; }

/* Footer / user area */
.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: .75rem .85rem;
  flex-shrink: 0;
  overflow: visible;
}
.sidebar.collapsed .sidebar-footer {
  padding: .75rem .45rem;
  overflow: visible;
  position: relative;
  z-index: 1100;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--sidebar-text);
  font-size: .82rem;
  overflow: visible;
  position: relative;
}
.sidebar-user-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .4rem .55rem;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--sidebar-text);
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sidebar-user-btn:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-user-btn i { font-size: 1.15rem; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar-user-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-email {
  font-size: .7rem;
  opacity: .65;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar.collapsed .sidebar-user-name,
.sidebar.collapsed .sidebar-user-email { display: none; }
.sidebar.collapsed .sidebar-user-btn { justify-content: center; }

/* Dropdown */
.sidebar-dropdown {
  min-width: 220px;
  border-color: var(--sidebar-border);
  background: #1e2e3e;
  z-index: 1200;
}
[data-bs-theme="light"] .sidebar-dropdown {
  background: #fff;
  border-color: #dee2e6;
}
.sidebar-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .8rem;
  font-size: .875rem;
  color: #c8d9e9;
}
[data-bs-theme="light"] .sidebar-dropdown .dropdown-item {
  color: #212529;
}
.sidebar-dropdown .dropdown-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
[data-bs-theme="light"] .sidebar-dropdown .dropdown-item:hover {
  background: rgba(0,0,0,.05);
  color: #212529;
}
.sidebar-dropdown .dropdown-item i {
  width: 1.1rem;
  flex-shrink: 0;
  text-align: center;
}
.sidebar-dropdown .dropdown-divider {
  border-color: var(--sidebar-border);
  margin: .2rem 0;
}

/* Collapsed dropdown position */
.sidebar.collapsed .sidebar-dropdown {
  position: fixed !important;
  left: calc(var(--sidebar-w-sm) + .5rem) !important;
  right: auto !important;
  top: auto !important;
  bottom: .5rem !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}
.sidebar.collapsed .sidebar-dropdown::before {
  content: "";
  position: absolute;
  right: 100%;
  bottom: .9rem;
  width: 0; height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 9px solid #1e2e3e;
}
[data-bs-theme="light"] .sidebar.collapsed .sidebar-dropdown::before {
  border-right-color: #fff;
}

/* ── Mobile overlay ──────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ── Mobile top bar ──────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 1rem;
  background: var(--sidebar-bg);
  color: #fff;
  border-bottom: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Main content ───────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  transition: margin-left .22s ease;
  flex: 1;
  min-width: 0;
}
.main-content.sidebar-collapsed { margin-left: var(--sidebar-w-sm); }
.main-content.no-sidebar { margin-left: 0 !important; }

/* ── Page header ────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.75rem 1.1rem;
  border-bottom: 1px solid var(--bs-border-color);
  flex-wrap: wrap;
}
.page-header-copy { flex: 1; min-width: 0; }
.page-header-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.15;
}
.page-header-sub {
  margin: .2rem 0 0;
  font-size: .9rem;
  color: var(--bs-secondary-color);
}
.page-header-actions {
  display: flex;
  gap: .65rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Flash messages ─────────────────────────────────────────────────── */
#flash-messages { margin-bottom: 1rem; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.nl-card {
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}
.nl-card-header {
  padding: 1rem 1.25rem .85rem;
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.nl-card-header h5, .nl-card-header h6 {
  margin: 0;
  font-weight: 600;
}
.nl-card-header small {
  display: block;
  margin-top: .25rem;
  color: var(--bs-secondary-color);
  font-size: .8rem;
}
.nl-card-body { padding: 1.25rem; }
.nl-card-body-sm { padding: 1rem; }

/* ── Metric cards (dashboard) ───────────────────────────────────────── */
.metric-card {
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  padding: 1.25rem;
  height: 100%;
}
.metric-card-accent {
  border-color: rgba(59, 201, 255, 0.3);
  background: var(--nl-blue-soft);
}
[data-bs-theme="dark"] .metric-card-accent {
  background: rgba(59, 201, 255, 0.07);
}
.metric-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--bs-secondary-color);
  margin-bottom: .65rem;
}
.metric-value {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--bs-emphasis-color);
}
.metric-meta {
  display: block;
  margin-top: .5rem;
  font-size: .83rem;
  color: var(--bs-secondary-color);
}

/* ── Hero panel (dashboard top section) ─────────────────────────────── */
.hero-panel {
  border-radius: 1rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .6rem;
  color: var(--nl-blue);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  font-weight: 700;
}
.hero-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.2;
  color: var(--bs-emphasis-color);
}
.hero-copy {
  margin: .7rem 0 0;
  color: var(--bs-secondary-color);
  font-size: .93rem;
}
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; }

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-shell {
  overflow-x: auto;
  border-radius: .75rem;
  border: 1px solid var(--bs-border-color);
}
.nl-table {
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--bs-border-color);
}
.nl-table thead th {
  padding: .85rem 1rem;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--bs-secondary-color);
  border-bottom-width: 1px;
  white-space: nowrap;
}
.nl-table tbody td {
  padding: .95rem 1rem;
  vertical-align: middle;
  color: var(--bs-body-color);
}
.nl-table.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: var(--nl-blue-soft);
}
.t-name {
  font-weight: 600;
  color: var(--bs-emphasis-color);
}
.t-sub {
  font-size: .83rem;
  color: var(--bs-secondary-color);
  margin-top: 2px;
}

/* ── Status badges ──────────────────────────────────────────────────── */
.nl-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* active */
.nl-badge-active, .status-badge-active {
  color: #d4fff0;
  background: rgba(46, 204, 113, .18);
  border-color: rgba(46, 204, 113, .4);
  box-shadow: 0 0 10px rgba(46, 204, 113, .15);
}
/* expired */
.nl-badge-expired, .status-badge-expired {
  color: #ffe7e7;
  background: rgba(231, 76, 60, .16);
  border-color: rgba(231, 76, 60, .38);
}
/* suspended */
.nl-badge-suspended, .status-badge-suspended {
  color: #fff3d6;
  background: rgba(243, 156, 18, .16);
  border-color: rgba(243, 156, 18, .38);
}
/* revoked */
.nl-badge-revoked, .status-badge-revoked {
  color: #ffe7e7;
  background: rgba(231, 76, 60, .16);
  border-color: rgba(231, 76, 60, .38);
}
/* success / muted / info / accent */
.nl-badge-success, .soft-badge-success, .soft-badge-active {
  color: #d4fff0;
  background: rgba(46, 204, 113, .18);
  border-color: rgba(46, 204, 113, .4);
}
.nl-badge-muted, .soft-badge-muted {
  color: var(--bs-secondary-color);
  background: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
}
.nl-badge-info, .soft-badge-info {
  color: #d4f4ff;
  background: rgba(59, 201, 255, .14);
  border-color: rgba(59, 201, 255, .3);
}
.nl-badge-accent, .soft-badge-accent {
  color: #fff3d6;
  background: rgba(243, 186, 23, .14);
  border-color: rgba(243, 186, 23, .32);
}
.nl-badge-danger, .soft-badge-danger {
  color: #ffe7e7;
  background: rgba(231, 76, 60, .16);
  border-color: rgba(231, 76, 60, .38);
}

/* backwards compat */
.soft-badge { display: inline-flex; align-items: center; padding: .25rem .7rem; border-radius: 999px; border: 1px solid transparent; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-badge { display: inline-flex; align-items: center; padding: .25rem .7rem; border-radius: 999px; border: 1px solid transparent; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ── Quick actions (dashboard) ──────────────────────────────────────── */
.quick-action {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  border-radius: .75rem;
  text-decoration: none;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  transition: all .15s ease;
}
.quick-action:hover {
  border-color: rgba(59, 201, 255, .3);
  background: var(--nl-blue-soft);
  color: var(--bs-body-color);
}
.quick-action-icon {
  width: 40px; height: 40px;
  border-radius: .6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nl-blue-soft);
  color: var(--nl-blue);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all .15s ease;
}
.quick-action:hover .quick-action-icon {
  box-shadow: 0 0 14px var(--nl-blue-glow);
}
.quick-action-body strong, .quick-action-body span { display: block; }
.quick-action-body span { font-size: .83rem; color: var(--bs-secondary-color); margin-top: 2px; }

/* ── Filter bar ─────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.filter-bar .filter-field { min-width: 180px; flex: 1 1 180px; }
.filter-bar .filter-field-wide { min-width: 260px; flex: 2 1 260px; }
.filter-bar .filter-actions { flex-shrink: 0; }

/* ── Detail layout ──────────────────────────────────────────────────── */
.detail-field {
  margin-bottom: .1rem;
}
.detail-field-label {
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--bs-secondary-color);
  margin-bottom: .3rem;
}
.detail-field-value {
  font-weight: 500;
  color: var(--bs-body-color);
}

/* ── Mini list (licenses sidebar) ──────────────────────────────────── */
.mini-list { display: grid; gap: .6rem; }
.mini-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;
  border-radius: .75rem;
  text-decoration: none;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  transition: all .15s ease;
}
.mini-list-item:hover {
  border-color: rgba(59, 201, 255, .3);
  background: var(--nl-blue-soft);
  color: var(--bs-body-color);
}
.mini-list-item strong { display: block; font-size: .82rem; font-weight: 600; color: var(--bs-emphasis-color); }
.mini-list-item span { display: block; font-size: .76rem; color: var(--bs-secondary-color); margin-top: 2px; }

/* ── Contact cards ──────────────────────────────────────────────────── */
.contact-card {
  border: 1px solid var(--bs-border-color);
  border-radius: .85rem;
  background: var(--bs-body-bg);
  padding: 1.1rem;
}
.contact-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}
.contact-card h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--bs-emphasis-color); }

/* ── Instance cards ─────────────────────────────────────────────────── */
.instance-card {
  border: 1px solid var(--bs-border-color);
  border-radius: .75rem;
  padding: .85rem 1rem;
  background: var(--bs-body-bg);
}
.instance-card code {
  font-size: .82rem;
  color: var(--nl-blue);
  word-break: break-all;
}

/* ── Token panel ─────────────────────────────────────────────────────── */
.token-panel {
  padding: 1rem 1.1rem;
  border-radius: .85rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}
.token-panel-highlight {
  border-color: rgba(243, 186, 23, .3);
  background: var(--nl-yellow-soft);
}
.token-output {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: .65rem .9rem;
  border-radius: .65rem;
  background: var(--bs-tertiary-bg);
  color: var(--nl-blue);
  border: 1px solid var(--bs-border-color);
  font-family: "Consolas", "Monaco", monospace;
  font-size: .87rem;
}

/* ── JSON / code ─────────────────────────────────────────────────────── */
.portal-json {
  margin: 0;
  padding: 1.1rem 1.25rem;
  border-radius: .85rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  color: var(--bs-code-color);
  font-size: .88rem;
  overflow-x: auto;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.1rem;
  border-radius: .85rem;
  border: 1px dashed var(--bs-border-color);
  color: var(--bs-secondary-color);
}
.empty-state i { font-size: 1.5rem; color: var(--nl-blue); flex-shrink: 0; }
.empty-state strong { display: block; color: var(--bs-body-color); font-weight: 600; }
.empty-state p { display: block; margin: .25rem 0 0; font-size: .88rem; }

/* ── Buttons override ───────────────────────────────────────────────── */
.btn-primary {
  --bs-btn-color: #13202e;
  --bs-btn-hover-color: #13202e;
  --bs-btn-active-color: #13202e;
  background-image: linear-gradient(135deg, var(--nl-blue) 0%, var(--nl-blue-alt) 100%);
  --bs-btn-border-color: var(--nl-blue-alt);
  --bs-btn-hover-border-color: var(--nl-blue);
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, #60d6ff 0%, #3ABCFF 100%);
  box-shadow: 0 4px 16px var(--nl-blue-glow) !important;
}
.btn-nl-yellow {
  background-image: linear-gradient(135deg, var(--nl-yellow) 0%, var(--nl-yellow-alt) 100%);
  color: #13202e;
  border: none;
  font-weight: 600;
}
.btn-nl-yellow:hover {
  background-image: linear-gradient(135deg, var(--nl-yellow-alt) 0%, #ffe580 100%);
  color: #13202e;
  box-shadow: 0 4px 16px rgba(243, 186, 23, .3) !important;
}

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--nl-blue-alt);
  box-shadow: 0 0 0 .2rem rgba(59, 201, 255, .15);
}

/* ── Login page ─────────────────────────────────────────────────────── */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.login-card {
  width: min(100%, 30rem);
}

/* ── Portal form actions ─────────────────────────────────────────────── */
.portal-form-actions {
  display: flex;
  gap: .65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar { left: calc(-1 * var(--sidebar-w)); }
  .sidebar.mobile-open { left: 0; width: var(--sidebar-w) !important; }
  .sidebar.mobile-open .sidebar-text { display: inline !important; }
  .sidebar.mobile-open .sidebar-header { flex-direction: row !important; justify-content: space-between !important; padding: 1rem 1.1rem !important; }
  .sidebar.mobile-open .brand-text { display: flex !important; }
  .sidebar.mobile-open .brand-mark { margin: 0 !important; }
  .sidebar.mobile-open .sidebar-link { justify-content: flex-start !important; padding: .6rem 1.1rem !important; border-left: 3px solid transparent !important; border-right: 3px solid transparent !important; }
  .sidebar.mobile-open .sidebar-link.active { border-left-color: var(--nl-blue) !important; }
  .sidebar.mobile-open .sidebar-section-label { display: block !important; }
  .sidebar.mobile-open .sidebar-divider { display: block !important; }
  .sidebar.mobile-open .sidebar-footer { padding: .75rem .85rem !important; }
  .sidebar.mobile-open .sidebar-user-btn { justify-content: flex-start !important; }
  .sidebar.mobile-open .sidebar-user-name,
  .sidebar.mobile-open .sidebar-user-email { display: block !important; }
  .main-content { margin-left: 0 !important; }
  .page-header { padding: 1rem 1.1rem .85rem; }
}

@media (max-width: 767.98px) {
  .page-header-actions { width: 100%; }
  .hero-panel { padding: 1.25rem; flex-direction: column; align-items: stretch; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .filter-field,
  .filter-bar .filter-field-wide { min-width: 0; flex: 1 1 100%; }
}
