/* =============================================================
   GetLockOn Admin Theme — Tailwind CSS + Custom Extensions
   Companion to tailwind.min.css (CDN). Do not remove either.
   ============================================================= */

/* ── Google Font loaded in layout.php head ─────────────────── */
:root {
  --lm-primary: #4f46e5;
  --lm-primary-hover: #4338ca;
  --lm-danger: #ef4444;
  --lm-warning: #f59e0b;
  --lm-success: #10b981;
  --lm-info: #3b82f6;
  --lm-text: #111827;
  --lm-text-muted: #6b7280;
  --lm-border: #e5e7eb;
  --lm-surface: #f9fafb;
  --lm-surface-alt: #ffffff;
  --lm-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

/* ── Reset / base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #f3f4f6;
  color: var(--lm-text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

/* ── Admin shell layout ──────────────────────────────────── */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.layout-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #ffffff;
  border-right: 1px solid var(--lm-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  transition: transform 0.25s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--lm-border);
}

.sidebar-logo__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--lm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-logo__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--lm-text);
  line-height: 1.2;
}

.sidebar-logo__tagline {
  font-size: 11px;
  color: var(--lm-text-muted);
  font-weight: 400;
  line-height: 1;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-group {
  padding: 0 8px;
  margin-bottom: 8px;
}

.sidebar-group__label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lm-text-muted);
  padding: 8px 12px 4px;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
  transition: background .15s, color .15s;
}

.sidebar-list a svg {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  flex-shrink: 0;
  transition: color .15s;
}

.sidebar-list a:hover {
  background: #f3f4f6;
  color: var(--lm-primary);
}

.sidebar-list a:hover svg {
  color: var(--lm-primary);
}

.sidebar-list li.active>a {
  background: #eef2ff;
  color: var(--lm-primary);
  font-weight: 600;
}

.sidebar-list li.active>a svg {
  color: var(--lm-primary);
}

/* Sidebar bottom account section */
.sidebar-account {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  border-top: 1px solid var(--lm-border);
  margin-top: auto;
}

.sidebar-account__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lm-text-muted);
  padding: 8px 12px 4px;
  display: block;
}

.sidebar-account__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
}

.sidebar-account__link svg {
  width: 18px;
  height: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}

.sidebar-account__link:hover {
  background: #f3f4f6;
  color: var(--lm-primary);
}

.sidebar-account__link:hover svg {
  color: var(--lm-primary);
}

.sidebar-account__link--danger:hover {
  background: #fef2f2;
  color: var(--lm-danger);
}

.sidebar-account__link--danger:hover svg {
  color: var(--lm-danger);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 40;
}

.sidebar-overlay.open {
  display: block;
}

/* ── Topbar ──────────────────────────────────────────────── */
.layout-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: #ffffff;
  border-bottom: 1px solid var(--lm-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  z-index: 30;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.layout-header__brand {
  flex: 1;
  min-width: 0;
}

.layout-header__brand span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--lm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layout-header__brand strong {
  display: none;
  /* subtitle shown via pageSubtitle */
}

.layout-header__subtitle {
  font-size: 12px;
  color: var(--lm-text-muted);
  margin: 0;
}

.layout-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger toggle — shown only on mobile */
.layout-header__toggle {
  display: none;
  margin-right: 8px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: #374151;
}

.layout-header__toggle:hover {
  background: #f3f4f6;
}

/* Header chips */
.header-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--lm-border);
  background: #ffffff;
  color: #374151;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.header-chip svg {
  width: 16px;
  height: 16px;
}

.header-chip:hover,
.header-chip:focus-visible {
  background: #f3f4f6;
  outline: none;
}

.header-chip--ghost {
  border-color: transparent;
  background: transparent;
}

.header-chip--ghost:hover {
  background: #f3f4f6;
  border-color: var(--lm-border);
}

.header-chip--secondary {
  background: #f9fafb;
}

.header-chip--danger {
  color: var(--lm-danger);
  border-color: #fecaca;
}

.header-chip--danger:hover {
  background: #fef2f2;
}

.header-chip--warning {
  color: #92400e;
  border-color: #fde68a;
  background: #fffbeb;
}

.header-chip--warning:hover {
  background: #fef3c7;
}

/* Shortcut pill */
.shortcut-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f3f4f6;
  color: var(--lm-text-muted);
  font-size: 11px;
  line-height: 1;
}

/* Notifications bell */
.header-notifications {
  position: relative;
}

.header-notifications__icon {
  color: #6b7280;
}

.header-notifications__icon--unread {
  color: var(--lm-primary);
}

.header-notifications__toggle--unread {
  border-color: var(--lm-primary);
}

.notifications-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: #fff;
  border: 1px solid var(--lm-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  z-index: 200;
  overflow: hidden;
}

/* ── Main content ─────────────────────────────────────────── */
.admin-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 24px;
  min-height: calc(100vh - var(--topbar-h));
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 639px) {
  .admin-content {
    padding: 16px 16px 32px;
  }

  .layout-header {
    padding: 0 16px;
    gap: 8px;
  }

  .layout-header__subtitle {
    display: none;
  }

  .layout-header__actions {
    gap: 4px;
  }

  .header-chip {
    padding: 6px 8px;
    font-size: 12px;
    gap: 4px;
  }

  .header-chip span:not(.shortcut-pill) {
    display: none;
  }

  .header-chip div[style*="font-size:11px"] {
    display: none !important;
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1023px) {
  .layout-header {
    left: 0;
  }

  .layout-header__toggle {
    display: flex;
  }

  .admin-content {
    margin-left: 0 !important;
    padding: 16px;
  }

  .layout-sidebar {
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
  }

  .layout-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
  }

  .sidebar-overlay.open {
    display: block;
  }
}

/* ── Surface cards ─────────────────────────────────────────── */
.surface-card {
  background: #fff;
  border: 1px solid var(--lm-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--lm-shadow);
}

/* ── Stats / metric cards ──────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--lm-text-muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--lm-text);
  line-height: 1.2;
}

.metric-context {
  font-size: 12px;
  color: var(--lm-text-muted);
  margin: 6px 0 0;
}

/* ── Tables ─────────────────────────────────────────────── */
.table-card {
  background: #fff;
  border: 1px solid var(--lm-border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}

.table-card__scroll {
  overflow-x: auto;
}

.table-card__table {
  width: 100%;
  border-collapse: collapse;
}

.table-card__table thead {
  background: #f9fafb;
}

.table-card__table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--lm-text-muted);
  border-bottom: 1px solid var(--lm-border);
  white-space: nowrap;
}

.table-card__table td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--lm-text);
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.table-card__table tbody tr:hover {
  background: #fafafa;
}

.table-card__table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border: 1px solid var(--lm-border);
  border-radius: 12px;
  padding: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.input-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--lm-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--lm-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.input-control:focus {
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}

.input-control::placeholder {
  color: #9ca3af;
}

select.input-control {
  cursor: pointer;
}

textarea.input-control {
  resize: vertical;
  min-height: 90px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  background: var(--lm-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}

.btn-primary:hover {
  background: var(--lm-primary-hover);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--lm-primary);
  outline-offset: 2px;
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--lm-border);
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.btn-secondary:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  background: var(--lm-danger);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-danger svg {
  width: 16px;
  height: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 12px;
  border-radius: 6px;
}

/* Outline variants */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.btn-outline--warning {
  color: #92400e;
}

.btn-outline--warning:hover {
  background: #fffbeb;
}

/* ── Status / badge pills ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--active,
.badge--success {
  background: #d1fae5;
  color: #065f46;
}

.badge--expired {
  background: #fee2e2;
  color: #7f1d1d;
}

.badge--blocked {
  background: #fee2e2;
  color: #991b1b;
}

.badge--suspended {
  background: #fef3c7;
  color: #78350f;
}

.badge--free {
  background: #e0e7ff;
  color: #3730a3;
}

.badge--refunded {
  background: #fef9c3;
  color: #713f12;
}

.badge--trial {
  background: #f0fdf4;
  color: #14532d;
}

.badge--info {
  background: #dbeafe;
  color: #1e3a8a;
}

.badge--neutral {
  background: #f3f4f6;
  color: #374151;
}

.badge--warning {
  background: #fef3c7;
  color: #78350f;
}

.badge--danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Legacy .chip alias */
.chip {
  @apply badge badge--info;
}

/* ── Flash / alert messages ────────────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 14px;
  margin-bottom: 16px;
}

.flash-success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.flash-error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #7f1d1d;
}

.flash-warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #78350f;
}

.flash-info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a8a;
}

/* ── Section titles ─────────────────────────────────────────── */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--lm-text);
  margin: 0 0 4px;
}

.section-subtitle {
  font-size: 13.5px;
  color: var(--lm-text-muted);
  margin: 0;
}

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 500;
  animation: fadeIn .15s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .18);
  animation: slideUp .18s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Page header bar ────────────────────────────────────────── */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.page-header>div:first-child {
  flex: 1;
  min-width: 0;
}

.page-header h1,
.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--lm-text);
  margin: 0;
  line-height: 1.25;
}

.page-header .section-subtitle,
.page-header p {
  font-size: 13.5px;
  color: var(--lm-text-muted);
  margin: 6px 0 0 0;
  line-height: 1.5;
}

/* ── Analytics / misc lists ─────────────────────────────────── */
.analytics-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f9fafb;
}

.analytics-list li.empty {
  justify-content: center;
  color: var(--lm-text-muted);
  font-style: italic;
  background: transparent;
}

.analytics-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analytics-feed li {
  padding: 12px 14px;
  border-left: 3px solid var(--lm-primary);
  background: #f9fafb;
  border-radius: 0 8px 8px 0;
}

.analytics-feed li.empty {
  border-left-color: var(--lm-border);
  color: var(--lm-text-muted);
  background: transparent;
  text-align: center;
}

/* ── Impersonation banner ────────────────────────────────────── */
.impersonation-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  margin-bottom: 20px;
}

/* ── Debugger (dev-only) ─────────────────────────────────────── */
.debugger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.debugger__toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .4);
  transition: transform .2s, box-shadow .2s;
}

.debugger__toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .5);
}

.debugger__toggle svg {
  width: 22px;
  height: 22px;
}

.debugger__panel {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 84px;
  background: rgba(15, 23, 42, .92);
  color: #e2e8f0;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, .5);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, .5);
  display: none;
  overflow: hidden;
  max-height: calc(80vh - 80px);
}

.debugger__panel.is-open {
  display: flex;
  flex-direction: column;
}

.debugger__panel-header {
  padding: 12px 16px;
  background: rgba(30, 41, 59, .6);
  border-bottom: 1px solid rgba(71, 85, 105, .5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debugger__filters {
  display: flex;
  gap: 8px;
}

.debugger__filter {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(71, 85, 105, .3);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
}

.debugger__filter:hover {
  background: rgba(71, 85, 105, .5);
  color: #e2e8f0;
}

.debugger__filter.is-active {
  background: var(--lm-primary);
  color: #fff;
  border-color: rgba(255, 255, 255, .1);
}

.debugger__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debugger__actions {
  display: flex;
  gap: 6px;
}

.debugger__action {
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, .2);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.debugger__action:hover {
  background: rgba(255, 255, 255, .05);
}

.debugger__action--clear:hover {
  background: rgba(239, 68, 68, .15);
  color: #f87171;
  border-color: rgba(239, 68, 68, .2);
}

.debugger__status-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.debugger__status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.debugger__status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.debugger__status--live::before {
  background: var(--lm-success);
  box-shadow: 0 0 8px var(--lm-success);
}

.debugger__status--offline::before {
  background: var(--lm-danger);
}

.debugger__close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
}

.debugger__content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.debugger__placeholder {
  padding: 40px;
  text-align: center;
  color: #64748b;
  font-style: italic;
  font-size: 13px;
}

.debugger__entry {
  padding: 10px 12px;
  background: rgba(30, 41, 59, .4);
  border-radius: 8px;
  border-left: 3px solid transparent;
}

.debugger__entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.debugger__entry-level {
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .05);
}

.debugger__entry-source {
  font-weight: 600;
  color: #64748b;
}

.debugger__entry-message {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  word-break: break-all;
}

.debugger__entry-context {
  margin-top: 8px;
  padding: 8px;
  background: rgba(15, 23, 42, .5);
  border-radius: 6px;
  font-size: 12px;
  color: #94a3b8;
  overflow-x: auto;
}

/* Source specific accent */
.debugger__entry[data-source="sql"] {
  border-left-color: #3b82f6;
}

.debugger__entry[data-source="php"] {
  border-left-color: #8b5cf6;
}

.debugger__entry[data-source="warnings"] {
  border-left-color: #f59e0b;
}


/* ── Search overlay ─────────────────────────────────────────── */
.admin-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
  z-index: 1200;
}

.admin-search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.admin-search-panel {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%) scale(.96);
  width: min(720px, calc(100% - 32px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .16);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-search-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.admin-search-panel__header {
  display: flex;
  align-items: center;
  padding: 16px 20px 4px;
  gap: 12px;
}

.admin-search-panel__body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-search-panel__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--lm-border);
  font-size: 12px;
  color: var(--lm-text-muted);
  display: flex;
  justify-content: space-between;
}

.admin-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--lm-border);
  background: #f9fafb;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.admin-search-input:focus {
  border-color: var(--lm-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}

.admin-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-search-result {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  background: #f9fafb;
  font-size: 14px;
  transition: background .12s;
}

.admin-search-result:hover,
.admin-search-result:focus {
  background: #eef2ff;
  outline: none;
}

.admin-search-result__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.admin-search-result__type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--lm-primary);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .05em;
}

.admin-search-result__meta {
  font-size: 12px;
  color: var(--lm-text-muted);
  margin-top: 3px;
}

.admin-search-empty {
  font-size: 14px;
  color: var(--lm-text-muted);
  padding: 4px 0;
}

.admin-search-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}

.admin-search-close:hover {
  background: #f3f4f6;
}

.admin-search-close svg {
  width: 18px;
  height: 18px;
}

/* Notifications items */
.notifications-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--lm-border);
}

.notifications-panel__header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.notifications-panel__header button {
  border: none;
  background: transparent;
  color: var(--lm-primary);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.notifications-panel__body {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notifications-empty {
  padding: 20px;
  text-align: center;
  color: var(--lm-text-muted);
  font-size: 14px;
}

.notifications-panel__item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  transition: background .15s;
}

.notifications-panel__item:hover {
  background: rgba(59, 130, 246, .06);
}

.notifications-panel__item h4 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
}

.notifications-panel__item p {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.notifications-panel__meta {
  margin-top: 5px;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

.notifications-panel__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--lm-border);
  background: #f9fafb;
  text-align: center;
}

.notifications-panel__footer a {
  color: var(--lm-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .notifications-panel {
    right: -16px;
    width: min(92vw, 360px);
  }
}

/* ── Utility extras ─────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--lm-border);
  margin: 20px 0;
}

.text-muted {
  color: var(--lm-text-muted);
}

.font-mono {
  font-family: 'Roboto Mono', 'Fira Code', monospace;
}

/* code blocks */
code {
  font-family: 'Roboto Mono', monospace;
  font-size: 12.5px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}