/* ============================================================
   LEXOS PULSE — DESIGN SYSTEM v2.0
   © 2025 Lexos. All rights reserved.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --lp-red-950: #1a0208;
  --lp-red-900: #3b0510;
  --lp-red-800: #6b0a1e;
  --lp-red-700: #960f2b;
  --lp-red-600: #c0152a;
  --lp-red-500: #d91f36;
  --lp-red-400: #e84d63;
  --lp-red-300: #f28898;
  --lp-red-200: #f8bdc6;
  --lp-red-100: #fde8ec;
  --lp-red-50: #fff5f6;
  --lp-dark-950: #0a0a0f;
  --lp-dark-900: #0f0f18;
  --lp-dark-800: #16161f;
  --lp-dark-700: #1e1e2d;
  --lp-dark-600: #252538;
  --lp-neutral-950: #0f1117;
  --lp-neutral-900: #1a1d27;
  --lp-neutral-800: #252935;
  --lp-neutral-700: #363b4d;
  --lp-neutral-600: #4a5068;
  --lp-neutral-500: #6b7280;
  --lp-neutral-400: #9ca3af;
  --lp-neutral-300: #d1d5db;
  --lp-neutral-200: #e5e7eb;
  --lp-neutral-100: #f3f4f6;
  --lp-neutral-50: #f9fafb;
  --lp-neutral-0: #ffffff;
  --lp-success-dark: #064e3b;
  --lp-success: #059669;
  --lp-success-light: #d1fae5;
  --lp-warning-dark: #78350f;
  --lp-warning: #d97706;
  --lp-warning-light: #fef3c7;
  --lp-danger-dark: #7f1d1d;
  --lp-danger: #dc2626;
  --lp-danger-light: #fee2e2;
  --lp-info-dark: #1e3a5f;
  --lp-info: #2563eb;
  --lp-info-light: #dbeafe;
  --lp-surface-bg: #0f1117;
  --lp-surface-card: #1a1d27;
  --lp-surface-raised: #1e2130;
  --lp-surface-overlay: #252935;
  --lp-surface-border: #252935;
  --lp-surface-border-strong: #363b4d;
  --lp-text-primary: #f1f3f9;
  --lp-text-secondary: #9ca3af;
  --lp-text-muted: #6b7280;
  --lp-text-inverse: #0f1117;
  --lp-text-on-red: #ffffff;
  --lp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --lp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
  --lp-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --lp-shadow-red: 0 4px 20px rgba(192, 21, 42, 0.35);
  --lp-radius-sm: 6px;
  --lp-radius-md: 10px;
  --lp-radius-lg: 14px;
  --lp-radius-xl: 18px;
  --lp-radius-full: 9999px;
  --lp-transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --lp-transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --lp-sidebar-width: 256px;
  --lp-header-height: 60px;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--lp-surface-bg);
  color: var(--lp-text-primary);
  line-height: 1.5;
}

/* ---- LOGO ---- */
.lp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-logo-mark {
  width: 40px;
  height: 40px;
  background: #c0152a;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}

.lp-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.lp-logo-primary {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: #fff;
}

.lp-logo-sub {
  font-weight: 400;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ---- LAYOUT ---- */
.lp-layout {
  display: flex;
  min-height: 100vh;
}

.lp-main {
  margin-left: var(--lp-sidebar-width);
  padding-top: var(--lp-header-height);
  flex: 1;
  min-width: 0;
}

.lp-content {
  padding: 28px 32px;
}

/* ---- SIDEBAR ---- */
.lp-sidebar {
  width: var(--lp-sidebar-width);
  background: var(--lp-dark-950);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--lp-dark-600);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.lp-sidebar::-webkit-scrollbar {
  width: 4px;
}

.lp-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.lp-sidebar::-webkit-scrollbar-thumb {
  background: var(--lp-dark-600);
  border-radius: 2px;
}

.lp-sidebar-header {
  height: var(--lp-header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--lp-dark-600);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.lp-logo-img {
  display: block;
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Show dark logo by default; swap to light logo on light themes */
.lp-logo-light {
  display: none;
}

[data-theme="slate-light"] .lp-logo-dark,
[data-theme="warm-light"] .lp-logo-dark {
  display: none;
}

[data-theme="slate-light"] .lp-logo-light,
[data-theme="warm-light"] .lp-logo-light {
  display: block;
}

.lp-nav-group {
  padding: 6px 0;
}

.lp-nav-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--lp-neutral-600);
  padding: 8px 20px 4px;
}

.lp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--lp-neutral-400);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--lp-transition);
  border-left: 2px solid transparent;
  cursor: pointer;
}

.lp-nav-item:hover {
  background: var(--lp-dark-800);
  color: var(--lp-text-primary);
  border-left-color: var(--lp-neutral-600);
}

.lp-nav-item.active {
  background: rgba(192, 21, 42, 0.12);
  color: var(--lp-red-400);
  border-left-color: var(--lp-red-600);
}

.lp-nav-item.active svg,
.lp-nav-item.active [data-lucide] {
  color: var(--lp-red-500);
}

.lp-nav-item svg,
.lp-nav-item [data-lucide] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-width: 1.8;
}

.lp-sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--lp-dark-600);
  flex-shrink: 0;
}

.lp-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--lp-radius-sm);
  background: var(--lp-red-600);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-text-primary);
}

.lp-user-role {
  font-size: 10px;
  font-weight: 500;
  color: var(--lp-neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lp-logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--lp-neutral-500);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--lp-transition);
}

.lp-logout-btn:hover {
  color: var(--lp-red-400);
  background: rgba(192, 21, 42, 0.1);
}

/* ---- TOP HEADER ---- */
.lp-header {
  position: fixed;
  top: 0;
  left: var(--lp-sidebar-width);
  right: 0;
  height: var(--lp-header-height);
  background: var(--lp-dark-950);
  border-bottom: 1px solid var(--lp-dark-600);
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 90;
  gap: 16px;
}

.lp-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lp-text-primary);
  letter-spacing: -0.3px;
}

.lp-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-header-btn {
  width: 34px;
  height: 34px;
  background: var(--lp-dark-700);
  border: 1px solid var(--lp-surface-border);
  border-radius: var(--lp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-neutral-400);
  cursor: pointer;
  transition: var(--lp-transition);
  text-decoration: none;
}

.lp-header-btn:hover {
  border-color: var(--lp-red-700);
  color: var(--lp-red-400);
}

/* ---- CARDS ---- */
.lp-card {
  background: var(--lp-surface-card);
  border: 1px solid var(--lp-surface-border);
  border-radius: var(--lp-radius-lg);
  box-shadow: var(--lp-shadow-sm);
}

.lp-card-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--lp-surface-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--lp-text-primary);
  letter-spacing: -0.2px;
}

.lp-card-body {
  padding: 24px;
}

/* ---- STAT CARDS ---- */
.lp-stat-card {
  background: var(--lp-surface-card);
  border: 1px solid var(--lp-surface-border);
  border-radius: var(--lp-radius-lg);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--lp-transition-slow);
}

.lp-stat-card:hover {
  border-color: var(--lp-red-800);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-md);
}

.lp-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lp-red-600), var(--lp-red-400));
  opacity: 0;
  transition: var(--lp-transition);
}

.lp-stat-card:hover::before {
  opacity: 1;
}

.lp-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--lp-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.lp-stat-icon svg,
.lp-stat-icon [data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.lp-stat-icon.red {
  background: rgba(192, 21, 42, 0.15);
  color: var(--lp-red-400);
}

.lp-stat-icon.green {
  background: rgba(5, 150, 105, 0.15);
  color: var(--lp-success);
}

.lp-stat-icon.amber {
  background: rgba(217, 119, 6, 0.15);
  color: var(--lp-warning);
}

.lp-stat-icon.blue {
  background: rgba(37, 99, 235, 0.15);
  color: var(--lp-info);
}

.lp-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--lp-text-primary);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}

.lp-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--lp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---- BUTTONS ---- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--lp-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--lp-transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.lp-btn svg,
.lp-btn [data-lucide] {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.lp-btn-primary {
  background: var(--lp-red-600);
  color: var(--lp-text-on-red);
  border-color: var(--lp-red-600);
  box-shadow: var(--lp-shadow-red);
}

.lp-btn-primary:hover {
  background: var(--lp-red-500);
  border-color: var(--lp-red-500);
  box-shadow: 0 6px 24px rgba(192, 21, 42, 0.45);
  transform: translateY(-1px);
}

.lp-btn-primary:active {
  transform: translateY(0);
}

.lp-btn-secondary {
  background: var(--lp-surface-raised);
  color: var(--lp-text-primary);
  border-color: var(--lp-surface-border-strong);
}

.lp-btn-secondary:hover {
  background: var(--lp-neutral-700);
  border-color: var(--lp-neutral-600);
}

.lp-btn-ghost {
  background: transparent;
  color: var(--lp-text-secondary);
  border-color: transparent;
}

.lp-btn-ghost:hover {
  background: var(--lp-surface-raised);
  color: var(--lp-text-primary);
}

.lp-btn-danger {
  background: rgba(220, 38, 38, 0.12);
  color: var(--lp-danger);
  border-color: rgba(220, 38, 38, 0.3);
}

.lp-btn-danger:hover {
  background: var(--lp-danger);
  color: #fff;
  border-color: var(--lp-danger);
}

.lp-btn-success {
  background: rgba(5, 150, 105, 0.15);
  color: var(--lp-success);
  border-color: rgba(5, 150, 105, 0.3);
}

.lp-btn-success:hover {
  background: var(--lp-success);
  color: #fff;
}

.lp-btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.lp-btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}

.lp-btn-lg {
  padding: 11px 22px;
  font-size: 14px;
}

.lp-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--lp-radius-sm);
}

/* ---- TABLES ---- */
.lp-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lp-table thead tr {
  background: var(--lp-dark-800);
  border-bottom: 1px solid var(--lp-surface-border-strong);
}

.lp-table thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--lp-text-muted);
  white-space: nowrap;
}

.lp-table thead th.text-right,
.lp-table thead th.text-center {
  text-align: right;
}

.lp-table thead th.text-center {
  text-align: center;
}

.lp-table tbody tr {
  border-bottom: 1px solid var(--lp-surface-border);
  transition: background 0.12s ease;
}

.lp-table tbody tr:last-child {
  border-bottom: none;
}

.lp-table tbody tr:hover {
  background: var(--lp-surface-raised);
}

.lp-table tbody td {
  padding: 12px 16px;
  color: var(--lp-text-primary);
  vertical-align: middle;
}

.lp-table tbody td.muted {
  color: var(--lp-text-secondary);
}

/* ---- BADGES ---- */
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--lp-radius-full);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.lp-badge-red {
  background: rgba(192, 21, 42, 0.15);
  color: var(--lp-red-300);
}

.lp-badge-green {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
}

.lp-badge-amber {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
}

.lp-badge-blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.lp-badge-gray {
  background: rgba(107, 114, 128, 0.15);
  color: var(--lp-neutral-400);
}

.lp-badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* ---- FORM ELEMENTS ---- */
.lp-form-group {
  margin-bottom: 18px;
}

.lp-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}

.lp-input,
.lp-select,
.lp-textarea {
  width: 100%;
  background: var(--lp-dark-900);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: var(--lp-radius-sm);
  color: var(--lp-text-primary);
  font-family: "Inter", sans-serif;
  font-size: 13px;
  padding: 9px 13px;
  transition: var(--lp-transition);
  outline: none;
  appearance: none;
}

.lp-input:focus,
.lp-select:focus,
.lp-textarea:focus {
  border-color: var(--lp-red-600);
  box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.15);
  background: var(--lp-dark-800);
}

.lp-input::placeholder {
  color: var(--lp-text-muted);
}

.lp-input:disabled,
.lp-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lp-textarea {
  resize: vertical;
  min-height: 80px;
}

.lp-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

select option {
  background-color: #1a1d27;
  color: var(--lp-text-primary);
}

/* Date / time picker — make native calendar icon visible on dark backgrounds */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.75);
  cursor: pointer;
  opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ---- ALERTS ---- */
.lp-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--lp-radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  border-left: 3px solid;
}

.lp-alert svg,
.lp-alert [data-lucide] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.lp-alert-success {
  background: rgba(5, 150, 105, 0.1);
  border-color: var(--lp-success);
  color: #6ee7b7;
}

.lp-alert-error {
  background: rgba(192, 21, 42, 0.1);
  border-color: var(--lp-red-600);
  color: var(--lp-red-300);
}

.lp-alert-warning {
  background: rgba(217, 119, 6, 0.1);
  border-color: var(--lp-warning);
  color: #fbbf24;
}

.lp-alert-info {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--lp-info);
  color: #93c5fd;
}

/* ---- PAGE HEADER ---- */
.lp-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--lp-surface-border);
  flex-wrap: wrap;
  gap: 12px;
}

.lp-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--lp-text-primary);
  letter-spacing: -0.5px;
}

.lp-page-subtitle {
  font-size: 13px;
  color: var(--lp-text-muted);
  margin-top: 2px;
}

/* ---- MODALS ---- */
.lp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lp-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.lp-modal {
  background: var(--lp-surface-raised);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: var(--lp-radius-xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--lp-shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lp-modal-backdrop.open .lp-modal {
  transform: translateY(0) scale(1);
}

.lp-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--lp-surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lp-text-primary);
}

.lp-modal-body {
  padding: 24px;
}

.lp-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--lp-surface-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---- TOASTS ---- */
#lp-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.lp-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--lp-surface-raised);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: var(--lp-radius-md);
  padding: 13px 16px;
  min-width: 300px;
  max-width: 380px;
  box-shadow: var(--lp-shadow-lg);
  pointer-events: all;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lp-toast.show {
  transform: translateX(0);
}

.lp-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--lp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-toast-icon svg,
.lp-toast-icon [data-lucide] {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

.lp-toast.success .lp-toast-icon {
  background: rgba(5, 150, 105, 0.15);
  color: var(--lp-success);
}

.lp-toast.error .lp-toast-icon {
  background: rgba(192, 21, 42, 0.15);
  color: var(--lp-red-400);
}

.lp-toast.warning .lp-toast-icon {
  background: rgba(217, 119, 6, 0.15);
  color: var(--lp-warning);
}

.lp-toast.info .lp-toast-icon {
  background: rgba(37, 99, 235, 0.15);
  color: var(--lp-info);
}

.lp-toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-text-primary);
}

.lp-toast-msg {
  font-size: 12px;
  color: var(--lp-text-secondary);
  margin-top: 1px;
}

/* ---- EMPTY STATES ---- */
.lp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.lp-empty-icon {
  width: 56px;
  height: 56px;
  background: var(--lp-dark-700);
  border-radius: var(--lp-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--lp-text-muted);
}

.lp-empty-icon svg,
.lp-empty-icon [data-lucide] {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.lp-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lp-text-primary);
  margin-bottom: 6px;
}

.lp-empty-text {
  font-size: 13px;
  color: var(--lp-text-muted);
  max-width: 300px;
  margin-bottom: 20px;
}

/* ---- TABS ---- */
.lp-tabs {
  display: flex;
  gap: 2px;
  background: var(--lp-dark-900);
  border-radius: var(--lp-radius-md);
  padding: 4px;
}

.lp-tab {
  padding: 7px 16px;
  border-radius: var(--lp-radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-text-muted);
  cursor: pointer;
  transition: var(--lp-transition);
  border: none;
  background: none;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lp-tab:hover {
  color: var(--lp-text-primary);
}

.lp-tab.active {
  background: var(--lp-surface-raised);
  color: var(--lp-text-primary);
  box-shadow: var(--lp-shadow-sm);
}

/* ============================================================
   BACKWARD COMPAT — maps old class names to new design system
   ============================================================ */
.card {
  background: var(--lp-surface-card);
  border: 1px solid var(--lp-surface-border);
  border-radius: var(--lp-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--lp-shadow-sm);
}

.stat-card {
  background: var(--lp-surface-card);
  border: 1px solid var(--lp-surface-border);
  border-radius: var(--lp-radius-lg);
  padding: 1.25rem 1.5rem;
  transition: var(--lp-transition-slow);
}

.stat-card:hover {
  border-color: var(--lp-red-800);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-md);
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--lp-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--lp-surface-border);
  letter-spacing: -0.01em;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lp-text-primary);
  letter-spacing: -0.4px;
}

.page-header-sub {
  font-size: 0.825rem;
  color: var(--lp-text-muted);
  margin-top: 0.125rem;
}

.form-group {
  margin-bottom: 1.125rem;
}

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lp-text-secondary);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0.8rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: var(--lp-radius-sm);
  color: var(--lp-text-primary);
  background: var(--lp-dark-900);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--lp-red-600);
  box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.15);
  background: var(--lp-dark-800);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--lp-text-muted);
}

.form-textarea {
  resize: vertical;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--lp-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--lp-transition);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.25rem;
  white-space: nowrap;
  font-family: inherit;
}

.btn svg,
.btn [data-lucide] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--lp-red-600);
  color: #fff;
  border-color: var(--lp-red-600);
  box-shadow: var(--lp-shadow-red);
}

.btn-primary:hover {
  background: var(--lp-red-500);
  border-color: var(--lp-red-500);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(192, 21, 42, 0.45);
}

.btn-secondary {
  background: var(--lp-surface-raised);
  color: var(--lp-text-primary);
  border-color: var(--lp-surface-border-strong);
}

.btn-secondary:hover {
  background: var(--lp-neutral-700);
  border-color: var(--lp-neutral-600);
}

.btn-success {
  background: rgba(5, 150, 105, 0.15);
  color: var(--lp-success);
  border-color: rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
  background: var(--lp-success);
  color: #fff;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.12);
  color: var(--lp-danger);
  border-color: rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  background: var(--lp-danger);
  color: #fff;
}

.btn-warning {
  background: rgba(217, 119, 6, 0.15);
  color: var(--lp-warning);
  border-color: rgba(217, 119, 6, 0.3);
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  border-radius: var(--lp-radius-sm);
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 4px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--lp-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border-left: 3px solid;
}

.alert svg,
.alert [data-lucide] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.alert-success {
  background: rgba(5, 150, 105, 0.1);
  border-color: var(--lp-success);
  color: #6ee7b7;
}

.alert-error {
  background: rgba(192, 21, 42, 0.1);
  border-color: var(--lp-red-600);
  color: var(--lp-red-300);
}

.alert-warning {
  background: rgba(217, 119, 6, 0.1);
  border-color: var(--lp-warning);
  color: #fbbf24;
}

.alert-info {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--lp-info);
  color: #93c5fd;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--lp-text-muted);
}

.empty-state svg,
.empty-state [data-lucide] {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  color: var(--lp-neutral-600);
}

.empty-state p {
  font-size: 0.875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lp-spin 0.65s linear infinite;
}

@keyframes lp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   FORCED DARK OVERRIDES — ensure legacy Tailwind classes
   render correctly on dark backgrounds
   ============================================================ */
.bg-white {
  background-color: var(--lp-surface-card) !important;
}

.bg-slate-50 {
  background-color: var(--lp-surface-bg) !important;
}

.bg-slate-100 {
  background-color: var(--lp-surface-card) !important;
}

.bg-slate-200 {
  background-color: var(--lp-surface-raised) !important;
}

.bg-gray-50 {
  background-color: var(--lp-surface-bg) !important;
}

.bg-gray-100 {
  background-color: var(--lp-surface-card) !important;
}

.text-slate-900,
.text-gray-900 {
  color: var(--lp-text-primary) !important;
}

.text-slate-800,
.text-gray-800 {
  color: var(--lp-text-primary) !important;
}

.text-slate-700,
.text-gray-700 {
  color: var(--lp-text-primary) !important;
}

.text-slate-600,
.text-gray-600 {
  color: var(--lp-text-secondary) !important;
}

.text-slate-500,
.text-gray-500 {
  color: var(--lp-text-muted) !important;
}

.text-slate-400,
.text-gray-400 {
  color: var(--lp-text-muted) !important;
}

.border-slate-200,
.border-gray-200 {
  border-color: var(--lp-surface-border) !important;
}

.border-slate-100,
.border-gray-100 {
  border-color: var(--lp-surface-border) !important;
}

.divide-slate-100>*+* {
  border-color: var(--lp-surface-border) !important;
}

.bg-indigo-50 {
  background-color: var(--lp-surface-raised) !important;
}

.bg-indigo-100 {
  background-color: var(--lp-surface-overlay) !important;
}

.bg-indigo-500,
.bg-indigo-600 {
  background-color: var(--lp-red-600) !important;
}

.text-indigo-400 {
  color: var(--lp-red-300) !important;
}

.text-indigo-500 {
  color: var(--lp-red-300) !important;
}

.text-indigo-600 {
  color: var(--lp-red-300) !important;
}

.text-indigo-700 {
  color: var(--lp-red-200) !important;
}

.hover\:text-indigo-600:hover,
.hover\:text-indigo-700:hover {
  color: var(--lp-red-300) !important;
}

.focus\:border-indigo-500:focus {
  border-color: var(--lp-red-600) !important;
}

.focus\:ring-indigo-500\/\[0\.25\]:focus {
  --tw-ring-color: rgba(192, 21, 42, 0.25) !important;
}

.ring-indigo-500\/25 {
  --tw-ring-color: rgba(192, 21, 42, 0.25) !important;
}

.border-indigo-500 {
  border-color: var(--lp-red-600) !important;
}

.bg-violet-50,
.bg-violet-100 {
  background-color: var(--lp-surface-raised) !important;
}

.bg-violet-500,
.bg-violet-600 {
  background-color: var(--lp-red-600) !important;
}

.text-violet-600,
.text-violet-700,
.text-violet-800 {
  color: var(--lp-red-300) !important;
}

.ring-violet-300 {
  --tw-ring-color: rgba(192, 21, 42, 0.4) !important;
}

.bg-purple-50,
.bg-purple-100 {
  background-color: var(--lp-surface-raised) !important;
}

.bg-amber-50,
.bg-amber-100 {
  background-color: rgba(217, 119, 6, 0.12) !important;
}

.text-amber-700,
.text-amber-800 {
  color: #fbbf24 !important;
}

.text-amber-600 {
  color: #f59e0b !important;
}

.ring-amber-200,
.ring-amber-300 {
  --tw-ring-color: rgba(217, 119, 6, 0.4) !important;
}

.bg-green-50,
.bg-green-100 {
  background-color: rgba(5, 150, 105, 0.12) !important;
}

.text-green-700,
.text-green-800 {
  color: #34d399 !important;
}

.text-green-600 {
  color: var(--lp-success) !important;
}

.ring-green-200,
.ring-green-300 {
  --tw-ring-color: rgba(5, 150, 105, 0.4) !important;
}

.bg-emerald-50,
.bg-emerald-100 {
  background-color: rgba(5, 150, 105, 0.12) !important;
}

.text-emerald-600,
.text-emerald-700,
.text-emerald-800 {
  color: #34d399 !important;
}

.ring-emerald-200,
.ring-emerald-300 {
  --tw-ring-color: rgba(5, 150, 105, 0.4) !important;
}

.bg-red-50,
.bg-red-100 {
  background-color: rgba(220, 38, 38, 0.12) !important;
}

.text-red-600,
.text-red-700,
.text-red-800 {
  color: #f87171 !important;
}

.text-red-400,
.text-red-500 {
  color: #f87171 !important;
}

.ring-red-200,
.ring-red-300 {
  --tw-ring-color: rgba(220, 38, 38, 0.4) !important;
}

.bg-blue-50,
.bg-blue-100 {
  background-color: rgba(37, 99, 235, 0.12) !important;
}

.text-blue-700,
.text-blue-800 {
  color: #60a5fa !important;
}

.text-blue-600 {
  color: #60a5fa !important;
}

.ring-blue-200,
.ring-blue-300 {
  --tw-ring-color: rgba(37, 99, 235, 0.4) !important;
}

.bg-sky-50,
.bg-sky-100 {
  background-color: rgba(14, 165, 233, 0.12) !important;
}

.text-sky-600,
.text-sky-700 {
  color: #38bdf8 !important;
}

.bg-cyan-50,
.bg-cyan-100 {
  background-color: rgba(6, 182, 212, 0.12) !important;
}

.text-cyan-600,
.text-cyan-700,
.text-cyan-800 {
  color: #67e8f9 !important;
}

.ring-cyan-200,
.ring-cyan-300 {
  --tw-ring-color: rgba(6, 182, 212, 0.4) !important;
}

.bg-orange-50,
.bg-orange-100 {
  background-color: rgba(249, 115, 22, 0.12) !important;
}

.text-orange-700,
.text-orange-800 {
  color: #fdba74 !important;
}

.ring-orange-200,
.ring-orange-300 {
  --tw-ring-color: rgba(249, 115, 22, 0.4) !important;
}

.bg-rose-50,
.bg-rose-100 {
  background-color: rgba(225, 29, 72, 0.12) !important;
}

.text-rose-500,
.text-rose-600 {
  color: #fb7185 !important;
}

.bg-teal-50,
.bg-teal-100 {
  background-color: rgba(20, 184, 166, 0.12) !important;
}

.text-teal-600,
.text-teal-700 {
  color: #2dd4bf !important;
}

.text-white {
  color: #ffffff !important;
}

.shadow-sm {
  box-shadow: var(--lp-shadow-sm) !important;
}

.shadow,
.shadow-md {
  box-shadow: var(--lp-shadow-md) !important;
}

.shadow-lg,
.shadow-xl,
.shadow-2xl {
  box-shadow: var(--lp-shadow-lg) !important;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--lp-neutral-700);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lp-neutral-600);
}

::selection {
  background: rgba(192, 21, 42, 0.3);
  color: var(--lp-text-primary);
}

/* ---- TOOLTIP ---- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--lp-surface-overlay);
  color: var(--lp-text-primary);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 50;
  border: 1px solid var(--lp-surface-border-strong);
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ---- PRINT ---- */
@media print {

  .lp-sidebar,
  .lp-header,
  .lp-no-print,
  .no-print,
  #lp-toast-container {
    display: none !important;
  }

  .lp-main {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }

  .lp-content {
    padding: 0 !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .card,
  .lp-card {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1023px) {
  .lp-sidebar {
    transform: translateX(-100%);
    transition: var(--lp-transition-slow);
  }

  .lp-sidebar.open {
    transform: translateX(0);
  }

  .lp-main {
    margin-left: 0;
  }

  .lp-header {
    left: 0;
  }

  .lp-content {
    padding: 20px 16px;
  }

  .lp-page-header,
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── FLOATING ADD ITEM BUTTON ──────────────────────────────────────────────── */
.fab-wrap {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 150;
}

.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lp-red-600);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(192, 21, 42, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-btn:hover {
  background: var(--lp-red-500);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 28px rgba(192, 21, 42, 0.6);
}

.fab-btn:active {
  transform: scale(0.96);
}

.fab-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--lp-text-primary);
  background: var(--lp-surface-raised);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: var(--lp-radius-sm);
  padding: 3px 8px;
  white-space: nowrap;
}

.fab-shortcut {
  font-size: 10px;
  color: var(--lp-text-muted);
  font-family: monospace;
}

@keyframes fab-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 21, 42, 0.5);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(192, 21, 42, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(192, 21, 42, 0);
  }
}

.fab-btn.pulse {
  animation: fab-pulse 1.5s ease 3;
}

/* Ensure page content can be scrolled fully above the FAB */
body:has(.fab-wrap) .lp-content {
  padding-bottom: 100px;
}

@media print {
  .fab-wrap {
    display: none !important;
  }
}

/* ============================================================
   LEXOS PULSE — THEME SYSTEM v2
   Theme 1: lexos-dark   — DEFAULT (existing :root)
   Theme 2: midnight-pro — Pure black OLED dark
   Theme 3: slate-light  — Full light (white sidebar + content)
   Theme 4: warm-light   — Full light (ivory sidebar + content)
   RED (#C0152A) IS LOCKED AND NEVER CHANGES.
   ============================================================ */

/* ─── THEME 1: Lexos Dark (default, inherits :root) ─────── */
[data-theme="lexos-dark"] {
  color-scheme: dark;
}

/* ─── THEME 2: Midnight Pro ──────────────────────────────── */
[data-theme="midnight-pro"] {
  color-scheme: dark;
  --lp-dark-950: #000000;
  --lp-dark-900: #080808;
  --lp-dark-800: #101010;
  --lp-dark-700: #181818;
  --lp-dark-600: #252525;
  --lp-surface-bg: #050505;
  --lp-surface-card: #111111;
  --lp-surface-raised: #161616;
  --lp-surface-overlay: #1e1e1e;
  --lp-surface-border: #1f1f1f;
  --lp-surface-border-strong: #2e2e2e;
  --lp-neutral-950: #000000;
  --lp-neutral-900: #0d0d0d;
  --lp-neutral-800: #1a1a1a;
  --lp-neutral-700: #2a2a2a;
  --lp-neutral-600: #3d3d3d;
  --lp-neutral-500: #5c5c5c;
  --lp-neutral-400: #8a8a8a;
  --lp-neutral-300: #b0b0b0;
  --lp-text-primary: #f8f8f8;
  --lp-text-secondary: #a0a0a0;
  --lp-text-muted: #606060;
  --lp-text-inverse: #000000;
  --lp-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.5);
  --lp-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.5);
  --lp-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.8), 0 6px 16px rgba(0, 0, 0, 0.6);
  --lp-shadow-red: 0 4px 24px rgba(192, 21, 42, 0.45);
  --lp-red-600: #d4182f;
  --lp-red-500: #e82040;
  --lp-red-400: #f05070;
}

[data-theme="midnight-pro"] .lp-table thead tr {
  background: #0a0a0a;
}

[data-theme="midnight-pro"] .lp-nav-item.active {
  background: rgba(212, 24, 47, 0.1);
}

/* ─── SHARED LIGHT THEME VARIABLES ──────────────────────── */
/* Applied to both slate-light and warm-light via element overrides below */

/* ─── THEME 3: Slate Light ───────────────────────────────── */
[data-theme="slate-light"] {
  color-scheme: light;
  /* Sidebar vars — light sidebar */
  --lp-dark-950: #ffffff;
  --lp-dark-900: #f8f9fc;
  --lp-dark-800: #f0f2f7;
  --lp-dark-700: #e8ebf2;
  --lp-dark-600: #d0d4df;
  /* Content surface */
  --lp-surface-bg: #f0f2f7;
  --lp-surface-card: #ffffff;
  --lp-surface-raised: #ffffff;
  --lp-surface-overlay: #f8f9fc;
  --lp-surface-border: #e2e5ed;
  --lp-surface-border-strong: #d0d4df;
  /* Neutrals — light scale */
  --lp-neutral-950: #ffffff;
  --lp-neutral-900: #f8f9fc;
  --lp-neutral-800: #f0f2f7;
  --lp-neutral-700: #e2e5ed;
  --lp-neutral-600: #c8cdd8;
  --lp-neutral-500: #9099ae;
  --lp-neutral-400: #6b7589;
  --lp-neutral-300: #4a5568;
  --lp-neutral-200: #2d3748;
  --lp-neutral-100: #1a202c;
  --lp-neutral-50: #0f1117;
  --lp-neutral-0: #000000;
  /* Text */
  --lp-text-primary: #0f1825;
  --lp-text-secondary: #4a5568;
  --lp-text-muted: #8896a8;
  --lp-text-inverse: #ffffff;
  /* Shadows */
  --lp-shadow-sm:
    0 1px 3px rgba(15, 24, 37, 0.08), 0 1px 2px rgba(15, 24, 37, 0.05);
  --lp-shadow-md:
    0 4px 12px rgba(15, 24, 37, 0.1), 0 2px 6px rgba(15, 24, 37, 0.06);
  --lp-shadow-lg:
    0 10px 30px rgba(15, 24, 37, 0.12), 0 4px 12px rgba(15, 24, 37, 0.08);
  --lp-shadow-red: 0 4px 20px rgba(192, 21, 42, 0.25);
}

/* ─── THEME 4: Warm Light ────────────────────────────────── */
[data-theme="warm-light"] {
  color-scheme: light;
  /* Sidebar vars — warm ivory sidebar */
  --lp-dark-950: #fdfaf5;
  --lp-dark-900: #f8f3ec;
  --lp-dark-800: #ede5d8;
  --lp-dark-700: #e0d5c5;
  --lp-dark-600: #d8ccbc;
  /* Content surface */
  --lp-surface-bg: #f5f0e8;
  --lp-surface-card: #fdfaf5;
  --lp-surface-raised: #fdfaf5;
  --lp-surface-overlay: #f8f3ec;
  --lp-surface-border: #e8dfd0;
  --lp-surface-border-strong: #d8ccbc;
  /* Neutrals */
  --lp-neutral-950: #fdfaf5;
  --lp-neutral-900: #f5f0e8;
  --lp-neutral-800: #ede5d8;
  --lp-neutral-700: #e0d5c5;
  --lp-neutral-600: #c8b89a;
  --lp-neutral-500: #a09080;
  --lp-neutral-400: #786860;
  --lp-neutral-300: #504844;
  --lp-neutral-200: #302824;
  --lp-neutral-100: #1a1410;
  --lp-neutral-50: #0c0a08;
  --lp-neutral-0: #000000;
  /* Text */
  --lp-text-primary: #1e1810;
  --lp-text-secondary: #60504a;
  --lp-text-muted: #9a8878;
  --lp-text-inverse: #fdfaf5;
  /* Shadows */
  --lp-shadow-sm:
    0 1px 3px rgba(30, 24, 16, 0.08), 0 1px 2px rgba(30, 24, 16, 0.05);
  --lp-shadow-md:
    0 4px 12px rgba(30, 24, 16, 0.1), 0 2px 6px rgba(30, 24, 16, 0.06);
  --lp-shadow-lg:
    0 10px 30px rgba(30, 24, 16, 0.12), 0 4px 12px rgba(30, 24, 16, 0.08);
  --lp-shadow-red: 0 4px 20px rgba(192, 21, 42, 0.22);
}

/* ============================================================
   LIGHT THEME COMPONENT OVERRIDES
   Covers BOTH slate-light and warm-light unless noted.
   ============================================================ */
[data-theme="slate-light"],
[data-theme="warm-light"] {
  background: var(--lp-surface-bg);
}

/* ── Body ── */
[data-theme="slate-light"] body {
  background: #f0f2f7;
  color: #0f1825;
}

[data-theme="warm-light"] body {
  background: #f5f0e8;
  color: #1e1810;
}

/* ── Sidebar ── */
[data-theme="slate-light"] .lp-sidebar,
[data-theme="warm-light"] .lp-sidebar {
  background: var(--lp-dark-950);
  border-right-color: var(--lp-dark-600);
}

[data-theme="slate-light"] .lp-sidebar::-webkit-scrollbar-thumb {
  background: #d0d4df;
}

[data-theme="warm-light"] .lp-sidebar::-webkit-scrollbar-thumb {
  background: #d8ccbc;
}

/* Sidebar header */
[data-theme="slate-light"] .lp-sidebar-header,
[data-theme="warm-light"] .lp-sidebar-header {
  border-bottom-color: var(--lp-dark-600);
}

/* Nav group labels */
[data-theme="slate-light"] .lp-nav-group-label {
  color: #8896a8;
}

[data-theme="warm-light"] .lp-nav-group-label {
  color: #9a8878;
}

/* Nav items */
[data-theme="slate-light"] .lp-nav-item {
  color: #4a5568;
}

[data-theme="warm-light"] .lp-nav-item {
  color: #60504a;
}

[data-theme="slate-light"] .lp-nav-item:hover {
  background: #e8ebf2;
  color: #0f1825;
  border-left-color: #9099ae;
}

[data-theme="warm-light"] .lp-nav-item:hover {
  background: #e0d5c5;
  color: #1e1810;
  border-left-color: #a09080;
}

/* Active nav item — red stays */
[data-theme="slate-light"] .lp-nav-item.active,
[data-theme="warm-light"] .lp-nav-item.active {
  background: rgba(192, 21, 42, 0.09);
  color: #c0152a;
  border-left-color: #c0152a;
}

[data-theme="slate-light"] .lp-nav-item.active svg,
[data-theme="slate-light"] .lp-nav-item.active [data-lucide],
[data-theme="warm-light"] .lp-nav-item.active svg,
[data-theme="warm-light"] .lp-nav-item.active [data-lucide] {
  color: #c0152a;
}

/* Sidebar footer */
[data-theme="slate-light"] .lp-sidebar-footer {
  border-top-color: #d0d4df;
}

[data-theme="warm-light"] .lp-sidebar-footer {
  border-top-color: #d8ccbc;
}

/* User row */
[data-theme="slate-light"] .lp-user-name {
  color: #0f1825;
}

[data-theme="warm-light"] .lp-user-name {
  color: #1e1810;
}

[data-theme="slate-light"] .lp-user-role {
  color: #8896a8;
}

[data-theme="warm-light"] .lp-user-role {
  color: #9a8878;
}

[data-theme="slate-light"] .lp-logout-btn {
  color: #8896a8;
}

[data-theme="warm-light"] .lp-logout-btn {
  color: #9a8878;
}

[data-theme="slate-light"] .lp-logout-btn:hover,
[data-theme="warm-light"] .lp-logout-btn:hover {
  color: #c0152a;
  background: rgba(192, 21, 42, 0.08);
}

/* ── Top Header ── */
[data-theme="slate-light"] .lp-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e5ed;
  box-shadow: 0 1px 4px rgba(15, 24, 37, 0.06);
}

[data-theme="warm-light"] .lp-header {
  background: #fdfaf5;
  border-bottom: 1px solid #e8dfd0;
  box-shadow: 0 1px 4px rgba(30, 24, 16, 0.06);
}

[data-theme="slate-light"] .lp-header-title {
  color: #0f1825;
}

[data-theme="warm-light"] .lp-header-title {
  color: #1e1810;
}

[data-theme="slate-light"] .lp-header-btn {
  background: #f0f2f7;
  border-color: #d0d4df;
  color: #4a5568;
}

[data-theme="warm-light"] .lp-header-btn {
  background: #ede5d8;
  border-color: #d8ccbc;
  color: #60504a;
}

[data-theme="slate-light"] .lp-header-btn:hover,
[data-theme="warm-light"] .lp-header-btn:hover {
  border-color: #c0152a;
  color: #c0152a;
}

/* ── Cards ── */
[data-theme="slate-light"] .lp-card,
[data-theme="slate-light"] .card {
  background: #ffffff;
  border-color: #e2e5ed;
  box-shadow: 0 1px 4px rgba(15, 24, 37, 0.07);
}

[data-theme="warm-light"] .lp-card,
[data-theme="warm-light"] .card {
  background: #fdfaf5;
  border-color: #e8dfd0;
  box-shadow: 0 1px 4px rgba(30, 24, 16, 0.07);
}

[data-theme="slate-light"] .lp-card-header,
[data-theme="slate-light"] .lp-modal-header,
[data-theme="slate-light"] .lp-modal-footer {
  border-color: #e2e5ed;
}

[data-theme="warm-light"] .lp-card-header,
[data-theme="warm-light"] .lp-modal-header,
[data-theme="warm-light"] .lp-modal-footer {
  border-color: #e8dfd0;
}

[data-theme="slate-light"] .lp-card-title,
[data-theme="slate-light"] .lp-modal-title {
  color: #0f1825;
}

[data-theme="warm-light"] .lp-card-title,
[data-theme="warm-light"] .lp-modal-title {
  color: #1e1810;
}

/* ── Stat Cards ── */
[data-theme="slate-light"] .lp-stat-card,
[data-theme="slate-light"] .stat-card {
  background: #ffffff;
  border-color: #e2e5ed;
}

[data-theme="warm-light"] .lp-stat-card,
[data-theme="warm-light"] .stat-card {
  background: #fdfaf5;
  border-color: #e8dfd0;
}

/* ── Form Inputs (.lp-* and legacy .form-*) ── */
[data-theme="slate-light"] .lp-input,
[data-theme="slate-light"] .lp-select,
[data-theme="slate-light"] .lp-textarea,
[data-theme="slate-light"] .form-input,
[data-theme="slate-light"] .form-select,
[data-theme="slate-light"] .form-textarea {
  background: #f8f9fc;
  border-color: #d0d4df;
  color: #0f1825;
}

[data-theme="warm-light"] .lp-input,
[data-theme="warm-light"] .lp-select,
[data-theme="warm-light"] .lp-textarea,
[data-theme="warm-light"] .form-input,
[data-theme="warm-light"] .form-select,
[data-theme="warm-light"] .form-textarea {
  background: #f8f3ec;
  border-color: #d8ccbc;
  color: #1e1810;
}

[data-theme="slate-light"] .lp-input:focus,
[data-theme="slate-light"] .lp-select:focus,
[data-theme="slate-light"] .lp-textarea:focus,
[data-theme="slate-light"] .form-input:focus,
[data-theme="slate-light"] .form-select:focus,
[data-theme="slate-light"] .form-textarea:focus {
  background: #ffffff;
  border-color: #c0152a;
  box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.1);
}

[data-theme="warm-light"] .lp-input:focus,
[data-theme="warm-light"] .lp-select:focus,
[data-theme="warm-light"] .lp-textarea:focus,
[data-theme="warm-light"] .form-input:focus,
[data-theme="warm-light"] .form-select:focus,
[data-theme="warm-light"] .form-textarea:focus {
  background: #fdfaf5;
  border-color: #c0152a;
  box-shadow: 0 0 0 3px rgba(192, 21, 42, 0.09);
}

[data-theme="slate-light"] .lp-input::placeholder,
[data-theme="slate-light"] .form-input::placeholder,
[data-theme="slate-light"] .form-textarea::placeholder {
  color: #a0acbc;
}

[data-theme="warm-light"] .lp-input::placeholder,
[data-theme="warm-light"] .form-input::placeholder,
[data-theme="warm-light"] .form-textarea::placeholder {
  color: #b0a090;
}

/* Labels */
[data-theme="slate-light"] .lp-label,
[data-theme="slate-light"] .form-label {
  color: #4a5568;
}

[data-theme="warm-light"] .lp-label,
[data-theme="warm-light"] .form-label {
  color: #60504a;
}

/* Select dropdown options (native browser) */
[data-theme="slate-light"] select option {
  background-color: #ffffff;
  color: #0f1825;
}

[data-theme="warm-light"] select option {
  background-color: #fdfaf5;
  color: #1e1810;
}

/* Date/time picker icon — don't invert on light backgrounds */
[data-theme="slate-light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="slate-light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="slate-light"] input[type="time"]::-webkit-calendar-picker-indicator,
[data-theme="warm-light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="warm-light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="warm-light"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.6;
}

[data-theme="slate-light"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
[data-theme="slate-light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
[data-theme="slate-light"] input[type="time"]::-webkit-calendar-picker-indicator:hover,
[data-theme="warm-light"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
[data-theme="warm-light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
[data-theme="warm-light"] input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ── Tables ── */
[data-theme="slate-light"] .lp-table thead tr {
  background: #f0f2f7;
  border-bottom: 2px solid #e2e5ed;
}

[data-theme="warm-light"] .lp-table thead tr {
  background: #ede5d8;
  border-bottom: 2px solid #d8ccbc;
}

[data-theme="slate-light"] .lp-table thead th {
  color: #4a5568;
}

[data-theme="warm-light"] .lp-table thead th {
  color: #60504a;
}

[data-theme="slate-light"] .lp-table tbody tr {
  border-bottom-color: #edf0f5;
}

[data-theme="warm-light"] .lp-table tbody tr {
  border-bottom-color: #ede5d8;
}

[data-theme="slate-light"] .lp-table tbody tr:hover {
  background: #f5f7fb;
}

[data-theme="warm-light"] .lp-table tbody tr:hover {
  background: #f8f3ec;
}

[data-theme="slate-light"] .lp-table tbody td {
  color: #0f1825;
}

[data-theme="warm-light"] .lp-table tbody td {
  color: #1e1810;
}

[data-theme="slate-light"] .lp-table tbody td.muted {
  color: #8896a8;
}

[data-theme="warm-light"] .lp-table tbody td.muted {
  color: #9a8878;
}

/* ── Tabs ── */
[data-theme="slate-light"] .lp-tabs {
  background: #e8ebf2;
}

[data-theme="slate-light"] .lp-tab {
  color: #8896a8;
}

[data-theme="slate-light"] .lp-tab:hover {
  color: #0f1825;
}

[data-theme="slate-light"] .lp-tab.active {
  background: #ffffff;
  color: #0f1825;
}

[data-theme="warm-light"] .lp-tabs {
  background: #e0d5c5;
}

[data-theme="warm-light"] .lp-tab {
  color: #9a8878;
}

[data-theme="warm-light"] .lp-tab:hover {
  color: #1e1810;
}

[data-theme="warm-light"] .lp-tab.active {
  background: #fdfaf5;
  color: #1e1810;
}

/* ── Buttons ── */
[data-theme="slate-light"] .lp-btn-secondary,
[data-theme="slate-light"] .btn-secondary {
  background: #f0f2f7;
  color: #0f1825;
  border-color: #d0d4df;
}

[data-theme="warm-light"] .lp-btn-secondary,
[data-theme="warm-light"] .btn-secondary {
  background: #ede5d8;
  color: #1e1810;
  border-color: #d8ccbc;
}

[data-theme="slate-light"] .lp-btn-secondary:hover,
[data-theme="slate-light"] .btn-secondary:hover {
  background: #e2e5ed;
  border-color: #c0c5d0;
}

[data-theme="warm-light"] .lp-btn-secondary:hover,
[data-theme="warm-light"] .btn-secondary:hover {
  background: #e0d5c5;
}

[data-theme="slate-light"] .lp-btn-ghost,
[data-theme="slate-light"] .btn-ghost {
  color: #4a5568;
}

[data-theme="warm-light"] .lp-btn-ghost,
[data-theme="warm-light"] .btn-ghost {
  color: #60504a;
}

[data-theme="slate-light"] .lp-btn-ghost:hover,
[data-theme="slate-light"] .btn-ghost:hover {
  background: #f0f2f7;
  color: #0f1825;
}

[data-theme="warm-light"] .lp-btn-ghost:hover,
[data-theme="warm-light"] .btn-ghost:hover {
  background: #ede5d8;
  color: #1e1810;
}

/* ── Empty States ── */
[data-theme="slate-light"] .lp-empty-icon {
  background: #e8ebf2;
  color: #8896a8;
}

[data-theme="warm-light"] .lp-empty-icon {
  background: #e0d5c5;
  color: #9a8878;
}

/* ── Page Headers & Separators ── */
[data-theme="slate-light"] .lp-page-header,
[data-theme="slate-light"] .section-title {
  border-bottom-color: #e2e5ed;
}

[data-theme="warm-light"] .lp-page-header,
[data-theme="warm-light"] .section-title {
  border-bottom-color: #e8dfd0;
}

/* ── Badges ── */
[data-theme="slate-light"] .lp-badge-gray {
  background: rgba(74, 85, 104, 0.1);
  color: #4a5568;
}

[data-theme="warm-light"] .lp-badge-gray {
  background: rgba(96, 80, 74, 0.12);
  color: #60504a;
}

/* ── Modals / Dialogs ── */
[data-theme="slate-light"] .lp-modal {
  background: #ffffff;
  border-color: #e2e5ed;
}

[data-theme="warm-light"] .lp-modal {
  background: #fdfaf5;
  border-color: #e8dfd0;
}

[data-theme="slate-light"] #lp-dialog-box {
  background: #ffffff !important;
  border-color: #e2e5ed !important;
}

[data-theme="warm-light"] #lp-dialog-box {
  background: #fdfaf5 !important;
  border-color: #e8dfd0 !important;
}

[data-theme="slate-light"] #lp-dialog-title {
  color: #0f1825 !important;
}

[data-theme="slate-light"] #lp-dialog-message {
  color: #4a5568 !important;
}

[data-theme="warm-light"] #lp-dialog-title {
  color: #1e1810 !important;
}

[data-theme="warm-light"] #lp-dialog-message {
  color: #60504a !important;
}

[data-theme="slate-light"] #lp-dialog-input {
  background: #f8f9fc !important;
  border-color: #d0d4df !important;
  color: #0f1825 !important;
}

[data-theme="warm-light"] #lp-dialog-input {
  background: #f8f3ec !important;
  border-color: #d8ccbc !important;
  color: #1e1810 !important;
}

[data-theme="slate-light"] #lp-dialog-cancel {
  border-color: #d0d4df !important;
  color: #4a5568 !important;
}

[data-theme="warm-light"] #lp-dialog-cancel {
  border-color: #d8ccbc !important;
  color: #60504a !important;
}

/* ── Toasts ── */
[data-theme="slate-light"] .lp-toast {
  background: #ffffff;
  border-color: #e2e5ed;
  box-shadow: 0 8px 30px rgba(15, 24, 37, 0.14);
}

[data-theme="warm-light"] .lp-toast {
  background: #fdfaf5;
  border-color: #e8dfd0;
  box-shadow: 0 8px 30px rgba(30, 24, 16, 0.14);
}

[data-theme="slate-light"] .lp-toast-title {
  color: #0f1825;
}

[data-theme="slate-light"] .lp-toast-msg {
  color: #4a5568;
}

[data-theme="warm-light"] .lp-toast-title {
  color: #1e1810;
}

[data-theme="warm-light"] .lp-toast-msg {
  color: #60504a;
}

/* ── Search Bars & Inline inputs (autocomplete, search triggers) ── */
[data-theme="slate-light"] .lp-search-trigger,
[data-theme="slate-light"] .autocomplete-wrap input,
[data-theme="slate-light"] .party-search-input {
  background: #f8f9fc;
  border-color: #d0d4df;
  color: #0f1825;
}

[data-theme="warm-light"] .lp-search-trigger,
[data-theme="warm-light"] .autocomplete-wrap input,
[data-theme="warm-light"] .party-search-input {
  background: #f8f3ec;
  border-color: #d8ccbc;
  color: #1e1810;
}

/* ── Autocomplete dropdown panels ── */
[data-theme="slate-light"] .autocomplete-list,
[data-theme="slate-light"] #lp-global-search-results,
[data-theme="slate-light"] [id$="_dropdown"],
[data-theme="slate-light"] [class*="autocomplete-drop"],
[data-theme="slate-light"] .doc-item-results {
  background: #ffffff !important;
  border-color: #d0d4df !important;
  box-shadow: 0 8px 24px rgba(15, 24, 37, 0.12) !important;
}

[data-theme="warm-light"] .autocomplete-list,
[data-theme="warm-light"] #lp-global-search-results,
[data-theme="warm-light"] [id$="_dropdown"],
[data-theme="warm-light"] [class*="autocomplete-drop"],
[data-theme="warm-light"] .doc-item-results {
  background: #fdfaf5 !important;
  border-color: #d8ccbc !important;
  box-shadow: 0 8px 24px rgba(30, 24, 16, 0.12) !important;
}

[data-theme="slate-light"] .autocomplete-item,
[data-theme="slate-light"] .doc-item-opt {
  color: #0f1825 !important;
}

[data-theme="warm-light"] .autocomplete-item,
[data-theme="warm-light"] .doc-item-opt {
  color: #1e1810 !important;
}

[data-theme="slate-light"] .autocomplete-item:hover,
[data-theme="slate-light"] .doc-item-opt:hover {
  background: #f0f2f7 !important;
}

[data-theme="warm-light"] .autocomplete-item:hover,
[data-theme="warm-light"] .doc-item-opt:hover {
  background: #f5f0e8 !important;
}

/* ── Theme panel inside header (itself on light bg) ── */
[data-theme="slate-light"] #theme-panel {
  background: #ffffff;
  border-color: #d0d4df;
}

[data-theme="warm-light"] #theme-panel {
  background: #fdfaf5;
  border-color: #d8ccbc;
}

/* ── Misc: page separators, inline badges, helper text ── */
[data-theme="slate-light"] hr,
[data-theme="slate-light"] .lp-divider {
  border-color: #e2e5ed;
}

[data-theme="warm-light"] hr,
[data-theme="warm-light"] .lp-divider {
  border-color: #e8dfd0;
}

/* ── Tailwind utility overrides for light themes ── */
[data-theme="slate-light"] .bg-white,
[data-theme="slate-light"] .bg-slate-50,
[data-theme="slate-light"] .bg-slate-100,
[data-theme="slate-light"] .bg-gray-50,
[data-theme="slate-light"] .bg-gray-100 {
  background-color: #ffffff !important;
}

[data-theme="warm-light"] .bg-white,
[data-theme="warm-light"] .bg-slate-50,
[data-theme="warm-light"] .bg-slate-100,
[data-theme="warm-light"] .bg-gray-50,
[data-theme="warm-light"] .bg-gray-100 {
  background-color: #fdfaf5 !important;
}

/* Scrollbars */
[data-theme="slate-light"] ::-webkit-scrollbar-track {
  background: #f0f2f7;
}

[data-theme="warm-light"] ::-webkit-scrollbar-track {
  background: #f5f0e8;
}

/* Selection */
[data-theme="slate-light"] ::selection {
  background: rgba(192, 21, 42, 0.15);
  color: #0f1825;
}

[data-theme="warm-light"] ::selection {
  background: rgba(192, 21, 42, 0.12);
  color: #1e1810;
}

/* Login page */
[data-theme="slate-light"] .lp-login {
  background: #f0f2f7;
}

[data-theme="warm-light"] .lp-login {
  background: #f5f0e8;
}

[data-theme="slate-light"] .lp-panel {
  background: #1a1f2e;
}

[data-theme="warm-light"] .lp-panel {
  background: #1c1410;
}

/* ============================================================
   LIGHT THEME â€” ENHANCED SEMANTIC COLOR OVERRIDES
   Dark themes use light/pastel text colors (fine on dark bg).
   Light themes need deep/saturated colors for readability.
   Both slate-light and warm-light share the same color palette.
   ============================================================ */

/* -- Semantic CSS variable overrides -- */
[data-theme="slate-light"],
[data-theme="warm-light"] {
  --lp-success: #047857;
  --lp-success-dark: #d1fae5;
  --lp-success-light: #d1fae5;
  --lp-warning: #92400e;
  --lp-warning-dark: #fef3c7;
  --lp-warning-light: #fef3c7;
  --lp-danger: #991b1b;
  --lp-danger-dark: #fee2e2;
  --lp-danger-light: #fee2e2;
  --lp-info: #1d4ed8;
  --lp-info-dark: #dbeafe;
  --lp-info-light: #dbeafe;
}

/* -- lp-badge variants -- */
[data-theme="slate-light"] .lp-badge-green,
[data-theme="warm-light"] .lp-badge-green {
  background: #d1fae5;
  color: #065f46;
}

[data-theme="slate-light"] .lp-badge-amber,
[data-theme="warm-light"] .lp-badge-amber {
  background: #fef3c7;
  color: #78350f;
}

[data-theme="slate-light"] .lp-badge-blue,
[data-theme="warm-light"] .lp-badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

[data-theme="slate-light"] .lp-badge-purple,
[data-theme="warm-light"] .lp-badge-purple {
  background: #ede9fe;
  color: #4c1d95;
}

[data-theme="slate-light"] .lp-badge-red,
[data-theme="warm-light"] .lp-badge-red {
  background: #fee2e2;
  color: #7f1d1d;
}

[data-theme="slate-light"] .lp-badge-gray,
[data-theme="warm-light"] .lp-badge-gray {
  background: #f1f5f9;
  color: #475569;
}

/* -- Alert variants -- */
[data-theme="slate-light"] .alert-success,
[data-theme="warm-light"] .alert-success {
  background: #d1fae5;
  border-color: #059669;
  color: #064e3b;
}

[data-theme="slate-light"] .alert-error,
[data-theme="warm-light"] .alert-error {
  background: #fee2e2;
  border-color: #dc2626;
  color: #7f1d1d;
}

[data-theme="slate-light"] .alert-warning,
[data-theme="warm-light"] .alert-warning {
  background: #fef3c7;
  border-color: #d97706;
  color: #78350f;
}

[data-theme="slate-light"] .alert-info,
[data-theme="warm-light"] .alert-info {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e3a8a;
}

/* -- btn-success / btn-danger / btn-warning -- */
[data-theme="slate-light"] .btn-success,
[data-theme="warm-light"] .btn-success {
  background: rgba(5, 150, 105, 0.1);
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.3);
}

[data-theme="slate-light"] .btn-success:hover,
[data-theme="warm-light"] .btn-success:hover {
  background: #059669;
  color: #fff;
  border-color: #059669;
}

[data-theme="slate-light"] .btn-danger,
[data-theme="warm-light"] .btn-danger {
  background: rgba(220, 38, 38, 0.09);
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.25);
}

[data-theme="slate-light"] .btn-danger:hover,
[data-theme="warm-light"] .btn-danger:hover {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

[data-theme="slate-light"] .btn-warning,
[data-theme="warm-light"] .btn-warning {
  background: rgba(217, 119, 6, 0.1);
  color: #78350f;
  border-color: rgba(217, 119, 6, 0.3);
}

/* -- Tailwind text-color utilities -- */
[data-theme="slate-light"] .text-green-600,
[data-theme="warm-light"] .text-green-600 {
  color: #059669 !important;
}

[data-theme="slate-light"] .text-green-700,
[data-theme="slate-light"] .text-green-800,
[data-theme="warm-light"] .text-green-700,
[data-theme="warm-light"] .text-green-800 {
  color: #047857 !important;
}

[data-theme="slate-light"] .text-emerald-600,
[data-theme="slate-light"] .text-emerald-700,
[data-theme="slate-light"] .text-emerald-800,
[data-theme="warm-light"] .text-emerald-600,
[data-theme="warm-light"] .text-emerald-700,
[data-theme="warm-light"] .text-emerald-800 {
  color: #047857 !important;
}

[data-theme="slate-light"] .text-emerald-400,
[data-theme="warm-light"] .text-emerald-400 {
  color: #059669 !important;
}

[data-theme="slate-light"] .text-amber-600,
[data-theme="warm-light"] .text-amber-600 {
  color: #b45309 !important;
}

[data-theme="slate-light"] .text-amber-700,
[data-theme="slate-light"] .text-amber-800,
[data-theme="warm-light"] .text-amber-700,
[data-theme="warm-light"] .text-amber-800 {
  color: #92400e !important;
}

[data-theme="slate-light"] .text-amber-400,
[data-theme="warm-light"] .text-amber-400 {
  color: #d97706 !important;
}

[data-theme="slate-light"] .text-yellow-600,
[data-theme="slate-light"] .text-yellow-700,
[data-theme="warm-light"] .text-yellow-600,
[data-theme="warm-light"] .text-yellow-700 {
  color: #a16207 !important;
}

[data-theme="slate-light"] .text-red-400,
[data-theme="slate-light"] .text-red-500,
[data-theme="warm-light"] .text-red-400,
[data-theme="warm-light"] .text-red-500 {
  color: #dc2626 !important;
}

[data-theme="slate-light"] .text-red-600,
[data-theme="slate-light"] .text-red-700,
[data-theme="slate-light"] .text-red-800,
[data-theme="warm-light"] .text-red-600,
[data-theme="warm-light"] .text-red-700,
[data-theme="warm-light"] .text-red-800 {
  color: #b91c1c !important;
}

[data-theme="slate-light"] .text-rose-400,
[data-theme="warm-light"] .text-rose-400 {
  color: #e11d48 !important;
}

[data-theme="slate-light"] .text-rose-500,
[data-theme="slate-light"] .text-rose-600,
[data-theme="warm-light"] .text-rose-500,
[data-theme="warm-light"] .text-rose-600 {
  color: #be123c !important;
}

[data-theme="slate-light"] .text-blue-400,
[data-theme="warm-light"] .text-blue-400 {
  color: #2563eb !important;
}

[data-theme="slate-light"] .text-blue-600,
[data-theme="warm-light"] .text-blue-600 {
  color: #2563eb !important;
}

[data-theme="slate-light"] .text-blue-700,
[data-theme="slate-light"] .text-blue-800,
[data-theme="warm-light"] .text-blue-700,
[data-theme="warm-light"] .text-blue-800 {
  color: #1d4ed8 !important;
}

[data-theme="slate-light"] .text-sky-400,
[data-theme="warm-light"] .text-sky-400 {
  color: #0284c7 !important;
}

[data-theme="slate-light"] .text-sky-600,
[data-theme="slate-light"] .text-sky-700,
[data-theme="warm-light"] .text-sky-600,
[data-theme="warm-light"] .text-sky-700 {
  color: #0284c7 !important;
}

[data-theme="slate-light"] .text-cyan-400,
[data-theme="warm-light"] .text-cyan-400 {
  color: #0891b2 !important;
}

[data-theme="slate-light"] .text-cyan-600,
[data-theme="slate-light"] .text-cyan-700,
[data-theme="slate-light"] .text-cyan-800,
[data-theme="warm-light"] .text-cyan-600,
[data-theme="warm-light"] .text-cyan-700,
[data-theme="warm-light"] .text-cyan-800 {
  color: #0891b2 !important;
}

[data-theme="slate-light"] .text-teal-400,
[data-theme="warm-light"] .text-teal-400 {
  color: #0d9488 !important;
}

[data-theme="slate-light"] .text-teal-600,
[data-theme="slate-light"] .text-teal-700,
[data-theme="warm-light"] .text-teal-600,
[data-theme="warm-light"] .text-teal-700 {
  color: #0f766e !important;
}

[data-theme="slate-light"] .text-purple-400,
[data-theme="warm-light"] .text-purple-400 {
  color: #7c3aed !important;
}

[data-theme="slate-light"] .text-purple-600,
[data-theme="slate-light"] .text-purple-700,
[data-theme="warm-light"] .text-purple-600,
[data-theme="warm-light"] .text-purple-700 {
  color: #6d28d9 !important;
}

[data-theme="slate-light"] .text-violet-400,
[data-theme="warm-light"] .text-violet-400 {
  color: #7c3aed !important;
}

[data-theme="slate-light"] .text-violet-600,
[data-theme="slate-light"] .text-violet-700,
[data-theme="slate-light"] .text-violet-800,
[data-theme="warm-light"] .text-violet-600,
[data-theme="warm-light"] .text-violet-700,
[data-theme="warm-light"] .text-violet-800 {
  color: #5b21b6 !important;
}

[data-theme="slate-light"] .text-orange-400,
[data-theme="warm-light"] .text-orange-400 {
  color: #ea580c !important;
}

[data-theme="slate-light"] .text-orange-700,
[data-theme="slate-light"] .text-orange-800,
[data-theme="warm-light"] .text-orange-700,
[data-theme="warm-light"] .text-orange-800 {
  color: #c2410c !important;
}

/* -- Tailwind bg-color utilities (proper pastel tints) -- */
[data-theme="slate-light"] .bg-green-50,
[data-theme="slate-light"] .bg-green-100,
[data-theme="warm-light"] .bg-green-50,
[data-theme="warm-light"] .bg-green-100 {
  background-color: #d1fae5 !important;
}

[data-theme="slate-light"] .bg-emerald-50,
[data-theme="slate-light"] .bg-emerald-100,
[data-theme="warm-light"] .bg-emerald-50,
[data-theme="warm-light"] .bg-emerald-100 {
  background-color: #d1fae5 !important;
}

[data-theme="slate-light"] .bg-amber-50,
[data-theme="slate-light"] .bg-amber-100,
[data-theme="warm-light"] .bg-amber-50,
[data-theme="warm-light"] .bg-amber-100 {
  background-color: #fef3c7 !important;
}

[data-theme="slate-light"] .bg-yellow-50,
[data-theme="slate-light"] .bg-yellow-100,
[data-theme="warm-light"] .bg-yellow-50,
[data-theme="warm-light"] .bg-yellow-100 {
  background-color: #fef9c3 !important;
}

[data-theme="slate-light"] .bg-red-50,
[data-theme="slate-light"] .bg-red-100,
[data-theme="warm-light"] .bg-red-50,
[data-theme="warm-light"] .bg-red-100 {
  background-color: #fee2e2 !important;
}

[data-theme="slate-light"] .bg-rose-50,
[data-theme="slate-light"] .bg-rose-100,
[data-theme="warm-light"] .bg-rose-50,
[data-theme="warm-light"] .bg-rose-100 {
  background-color: #ffe4e6 !important;
}

[data-theme="slate-light"] .bg-blue-50,
[data-theme="slate-light"] .bg-blue-100,
[data-theme="warm-light"] .bg-blue-50,
[data-theme="warm-light"] .bg-blue-100 {
  background-color: #dbeafe !important;
}

[data-theme="slate-light"] .bg-sky-50,
[data-theme="slate-light"] .bg-sky-100,
[data-theme="warm-light"] .bg-sky-50,
[data-theme="warm-light"] .bg-sky-100 {
  background-color: #e0f2fe !important;
}

[data-theme="slate-light"] .bg-cyan-50,
[data-theme="slate-light"] .bg-cyan-100,
[data-theme="warm-light"] .bg-cyan-50,
[data-theme="warm-light"] .bg-cyan-100 {
  background-color: #cffafe !important;
}

[data-theme="slate-light"] .bg-purple-50,
[data-theme="slate-light"] .bg-purple-100,
[data-theme="warm-light"] .bg-purple-50,
[data-theme="warm-light"] .bg-purple-100 {
  background-color: #ede9fe !important;
}

[data-theme="slate-light"] .bg-violet-50,
[data-theme="slate-light"] .bg-violet-100,
[data-theme="warm-light"] .bg-violet-50,
[data-theme="warm-light"] .bg-violet-100 {
  background-color: #ede9fe !important;
}

[data-theme="slate-light"] .bg-orange-50,
[data-theme="slate-light"] .bg-orange-100,
[data-theme="warm-light"] .bg-orange-50,
[data-theme="warm-light"] .bg-orange-100 {
  background-color: #ffedd5 !important;
}

[data-theme="slate-light"] .bg-teal-50,
[data-theme="slate-light"] .bg-teal-100,
[data-theme="warm-light"] .bg-teal-50,
[data-theme="warm-light"] .bg-teal-100 {
  background-color: #ccfbf1 !important;
}

/* -- Tailwind ring colors -- */
[data-theme="slate-light"] .ring-green-200,
[data-theme="slate-light"] .ring-green-300,
[data-theme="warm-light"] .ring-green-200,
[data-theme="warm-light"] .ring-green-300 {
  --tw-ring-color: rgba(5, 150, 105, 0.35) !important;
}

[data-theme="slate-light"] .ring-amber-200,
[data-theme="slate-light"] .ring-amber-300,
[data-theme="warm-light"] .ring-amber-200,
[data-theme="warm-light"] .ring-amber-300 {
  --tw-ring-color: rgba(217, 119, 6, 0.35) !important;
}

[data-theme="slate-light"] .ring-red-200,
[data-theme="slate-light"] .ring-red-300,
[data-theme="warm-light"] .ring-red-200,
[data-theme="warm-light"] .ring-red-300 {
  --tw-ring-color: rgba(220, 38, 38, 0.35) !important;
}

[data-theme="slate-light"] .ring-blue-200,
[data-theme="slate-light"] .ring-blue-300,
[data-theme="warm-light"] .ring-blue-200,
[data-theme="warm-light"] .ring-blue-300 {
  --tw-ring-color: rgba(37, 99, 235, 0.35) !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD SEMANTIC TOKENS — per-theme CSS variables
   These replace all hardcoded inline colours on dashboard.php so that
   every token reacts instantly when JS swaps [data-theme] on <html>.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Dark themes (lexos-dark + midnight-pro) ─────────────────────────────── */
[data-theme="lexos-dark"],
[data-theme="midnight-pro"] {
  /* stat-card icon circles */
  --lp-icon-indigo-bg: rgba(99, 102, 241, 0.15);
  --lp-icon-indigo: #818cf8;
  --lp-icon-green-bg: rgba(16, 185, 129, 0.14);
  --lp-icon-green: #34d399;
  --lp-icon-amber-bg: rgba(245, 158, 11, 0.14);
  --lp-icon-amber: #fbbf24;
  --lp-icon-sky-bg: rgba(14, 165, 233, 0.14);
  --lp-icon-sky: #38bdf8;

  /* stat-card pill chips */
  --lp-chip-green: #34d399;
  --lp-chip-green-bg: rgba(5, 150, 105, 0.12);
  --lp-chip-amber: #fbbf24;
  --lp-chip-amber-bg: rgba(245, 158, 11, 0.12);
  --lp-chip-amber-bdr: rgba(245, 158, 11, 0.25);
  --lp-chip-red: #fca5a5;
  --lp-chip-red-bg: rgba(220, 38, 38, 0.12);
  --lp-chip-sky: #38bdf8;
  --lp-chip-sky-bg: rgba(14, 165, 233, 0.12);

  /* month IN/OUT pills */
  --lp-month-in-bg: rgba(16, 185, 129, 0.1);
  --lp-month-in-bdr: rgba(16, 185, 129, 0.2);
  --lp-month-in-lbl: #34d399;
  --lp-month-in-val: #6ee7b7;
  --lp-month-out-bg: rgba(245, 158, 11, 0.1);
  --lp-month-out-bdr: rgba(245, 158, 11, 0.2);
  --lp-month-out-lbl: #fbbf24;
  --lp-month-out-val: #fde68a;

  /* chart legend dots */
  --lp-chart-inward: #34d399;
  --lp-chart-outward: #fbbf24;

  /* low-stock rows */
  --lp-ls-zero-bg: rgba(239, 68, 68, 0.08);
  --lp-ls-zero-bdr: rgba(239, 68, 68, 0.3);
  --lp-ls-zero-qty: #f87171;
  --lp-ls-warn-bg: rgba(245, 158, 11, 0.07);
  --lp-ls-warn-bdr: rgba(245, 158, 11, 0.25);
  --lp-ls-warn-qty: #fbbf24;

  /* progress bar track */
  --lp-progress-track: rgba(255, 255, 255, 0.08);

  /* GRN item-count badge */
  --lp-grn-badge-bg: rgba(99, 102, 241, 0.15);
  --lp-grn-badge: #a5b4fc;

  /* vendor/customer section */
  --lp-meta-pill-bg: rgba(255, 255, 255, 0.07);
  --lp-bar-track: rgba(255, 255, 255, 0.07);
}

/* ── Light themes (slate-light + warm-light) ─────────────────────────────── */
[data-theme="slate-light"],
[data-theme="warm-light"] {
  /* stat-card icon circles */
  --lp-icon-indigo-bg: rgba(99, 102, 241, 0.1);
  --lp-icon-indigo: #4338ca;
  --lp-icon-green-bg: rgba(16, 185, 129, 0.1);
  --lp-icon-green: #047857;
  --lp-icon-amber-bg: rgba(245, 158, 11, 0.1);
  --lp-icon-amber: #92400e;
  --lp-icon-sky-bg: rgba(14, 165, 233, 0.1);
  --lp-icon-sky: #0284c7;

  /* stat-card pill chips */
  --lp-chip-green: #047857;
  --lp-chip-green-bg: #d1fae5;
  --lp-chip-amber: #78350f;
  --lp-chip-amber-bg: #fef3c7;
  --lp-chip-amber-bdr: #fde68a;
  --lp-chip-red: #b91c1c;
  --lp-chip-red-bg: #fee2e2;
  --lp-chip-sky: #1e40af;
  --lp-chip-sky-bg: #dbeafe;

  /* month IN/OUT pills */
  --lp-month-in-bg: #dcfce7;
  --lp-month-in-bdr: #a7f3d0;
  --lp-month-in-lbl: #047857;
  --lp-month-in-val: #065f46;
  --lp-month-out-bg: #fef9c3;
  --lp-month-out-bdr: #fde68a;
  --lp-month-out-lbl: #92400e;
  --lp-month-out-val: #78350f;

  /* chart legend dots */
  --lp-chart-inward: #059669;
  --lp-chart-outward: #b45309;

  /* low-stock rows */
  --lp-ls-zero-bg: #fee2e2;
  --lp-ls-zero-bdr: #fca5a5;
  --lp-ls-zero-qty: #b91c1c;
  --lp-ls-warn-bg: #fef3c7;
  --lp-ls-warn-bdr: #fde68a;
  --lp-ls-warn-qty: #92400e;

  /* progress bar track */
  --lp-progress-track: rgba(15, 24, 37, 0.1);

  /* GRN item-count badge */
  --lp-grn-badge-bg: rgba(99, 102, 241, 0.1);
  --lp-grn-badge: #4338ca;

  /* vendor/customer section */
  --lp-meta-pill-bg: rgba(15, 24, 37, 0.06);
  --lp-bar-track: rgba(15, 24, 37, 0.08);
}

/* ── Login panel: always stays dark — keep panel text readable ────────────── */
.lp-panel {
  --lp-text-primary: #f1f5f9;
  --lp-text-secondary: #cbd5e1;
  --lp-text-muted: #94a3b8;
  --lp-text-disabled: #64748b;
}

.lp-panel::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) !important;
}

/* ============================================================
   LEXOS PULSE - NOTIFICATION SYSTEM STYLES
   ============================================================ */

#notif-drawer.open {
  display: flex !important;
  transform: translateX(0) !important;
}

.notif-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--lp-surface-border);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.notif-item:hover {
  background: var(--lp-surface-overlay);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: #C0152A;
  border-radius: 0 3px 3px 0;
}

.notif-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 5px;
}

.notif-type-dot {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-type-dot svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.notif-type-info {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
}

.notif-type-feature {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
}

.notif-type-update {
  background: rgba(5, 150, 105, 0.12);
  color: #34d399;
}

.notif-type-maintenance {
  background: rgba(217, 119, 6, 0.12);
  color: #fbbf24;
}

.notif-type-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.notif-type-promotion {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
}

.notif-type-critical {
  background: rgba(192, 21, 42, 0.15);
  color: #f87171;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--lp-text-primary);
  line-height: 1.3;
  flex: 1;
}

.notif-item.unread .notif-item-title {
  color: var(--lp-text-primary);
}

.notif-item:not(.unread) .notif-item-title {
  color: var(--lp-text-secondary);
}

.notif-item-time {
  font-size: 10px;
  color: var(--lp-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-item-message {
  font-size: 12px;
  color: var(--lp-text-muted);
  line-height: 1.5;
  margin-left: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item.expanded .notif-item-message {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.notif-item-actions {
  display: none;
  margin-left: 38px;
  margin-top: 10px;
  gap: 8px;
}

.notif-item:hover .notif-item-actions {
  display: flex;
}

.notif-action-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--lp-surface-border-strong);
  background: var(--lp-surface-raised);
  color: var(--lp-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-action-btn:hover {
  background: var(--lp-surface-overlay);
  color: var(--lp-text-primary);
}

.notif-action-btn.primary {
  background: rgba(192, 21, 42, 0.10);
  color: #f87171;
  border-color: rgba(192, 21, 42, 0.25);
}

.notif-action-btn.primary:hover {
  background: #C0152A;
  color: #fff;
}

.notif-live-toast {
  background: var(--lp-surface-raised);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 360px;
  width: 360px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.notif-live-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.notif-live-toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

.notif-live-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
}

.notif-live-toast.toast-info::before {
  background: #60a5fa;
}

.notif-live-toast.toast-feature::before {
  background: #a78bfa;
}

.notif-live-toast.toast-update::before {
  background: #34d399;
}

.notif-live-toast.toast-maintenance::before {
  background: #fbbf24;
}

.notif-live-toast.toast-warning::before {
  background: #f59e0b;
}

.notif-live-toast.toast-promotion::before {
  background: #f472b6;
}

.notif-live-toast.toast-critical::before {
  background: #C0152A;
}

.notif-live-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-live-toast-content {
  flex: 1;
  min-width: 0;
}

.notif-live-toast-app {
  font-size: 10px;
  font-weight: 700;
  color: var(--lp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-live-toast-app::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #C0152A;
  border-radius: 2px;
  display: inline-block;
}

.notif-live-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--lp-text-primary);
  margin-bottom: 3px;
  line-height: 1.3;
}

.notif-live-toast-msg {
  font-size: 11px;
  color: var(--lp-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-live-toast-close {
  background: none;
  border: none;
  color: var(--lp-text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
  line-height: 1;
}

.notif-live-toast-close:hover {
  color: var(--lp-text-primary);
}

.notif-live-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(192, 21, 42, 0.4);
  border-radius: 0 0 12px 12px;
  animation: notif-progress 6s linear forwards;
}

@keyframes notif-progress {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

@keyframes notif-bell-shake {

  0%,
  100% {
    transform: rotate(0);
  }

  15% {
    transform: rotate(10deg);
  }

  30% {
    transform: rotate(-10deg);
  }

  45% {
    transform: rotate(6deg);
  }

  60% {
    transform: rotate(-4deg);
  }

  75% {
    transform: rotate(2deg);
  }
}

.notif-bell-shake {
  animation: notif-bell-shake 0.6s ease;
}

.notif-empty {
  padding: 60px 24px;
  text-align: center;
}

.notif-empty-icon {
  width: 56px;
  height: 56px;
  background: var(--lp-dark-700);
  border-radius: var(--lp-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--lp-text-muted);
}

.notif-section-label {
  padding: 8px 18px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--lp-text-muted);
  background: var(--lp-surface-bg);
}


/* ============================================================
   LEXOS PULSE - NOTIFICATION SYSTEM STYLES
   ============================================================ */

#notif-drawer.open {
  display: flex !important;
  transform: translateX(0) !important;
}

.notif-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--lp-surface-border);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.notif-item:hover {
  background: var(--lp-surface-overlay);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: #C0152A;
  border-radius: 0 3px 3px 0;
}

.notif-item-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 5px;
}

.notif-type-dot {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-type-dot svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.notif-type-info {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
}

.notif-type-feature {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
}

.notif-type-update {
  background: rgba(5, 150, 105, 0.12);
  color: #34d399;
}

.notif-type-maintenance {
  background: rgba(217, 119, 6, 0.12);
  color: #fbbf24;
}

.notif-type-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.notif-type-promotion {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
}

.notif-type-critical {
  background: rgba(192, 21, 42, 0.15);
  color: #f87171;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--lp-text-primary);
  line-height: 1.3;
  flex: 1;
}

.notif-item.unread .notif-item-title {
  color: var(--lp-text-primary);
}

.notif-item:not(.unread) .notif-item-title {
  color: var(--lp-text-secondary);
}

.notif-item-time {
  font-size: 10px;
  color: var(--lp-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-item-message {
  font-size: 12px;
  color: var(--lp-text-muted);
  line-height: 1.5;
  margin-left: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item.expanded .notif-item-message {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.notif-item-actions {
  display: none;
  margin-left: 38px;
  margin-top: 10px;
  gap: 8px;
}

.notif-item:hover .notif-item-actions {
  display: flex;
}

.notif-action-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--lp-surface-border-strong);
  background: var(--lp-surface-raised);
  color: var(--lp-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-action-btn:hover {
  background: var(--lp-surface-overlay);
  color: var(--lp-text-primary);
}

.notif-action-btn.primary {
  background: rgba(192, 21, 42, 0.10);
  color: #f87171;
  border-color: rgba(192, 21, 42, 0.25);
}

.notif-action-btn.primary:hover {
  background: #C0152A;
  color: #fff;
}

.notif-live-toast {
  background: var(--lp-surface-raised);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 360px;
  width: 360px;
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.notif-live-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.notif-live-toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

.notif-live-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
}

.notif-live-toast.toast-info::before {
  background: #60a5fa;
}

.notif-live-toast.toast-feature::before {
  background: #a78bfa;
}

.notif-live-toast.toast-update::before {
  background: #34d399;
}

.notif-live-toast.toast-maintenance::before {
  background: #fbbf24;
}

.notif-live-toast.toast-warning::before {
  background: #f59e0b;
}

.notif-live-toast.toast-promotion::before {
  background: #f472b6;
}

.notif-live-toast.toast-critical::before {
  background: #C0152A;
}

.notif-live-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-live-toast-content {
  flex: 1;
  min-width: 0;
}

.notif-live-toast-app {
  font-size: 10px;
  font-weight: 700;
  color: var(--lp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-live-toast-app::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #C0152A;
  border-radius: 2px;
  display: inline-block;
}

.notif-live-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--lp-text-primary);
  margin-bottom: 3px;
  line-height: 1.3;
}

.notif-live-toast-msg {
  font-size: 11px;
  color: var(--lp-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-live-toast-close {
  background: none;
  border: none;
  color: var(--lp-text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
  line-height: 1;
}

.notif-live-toast-close:hover {
  color: var(--lp-text-primary);
}

.notif-live-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(192, 21, 42, 0.4);
  border-radius: 0 0 12px 12px;
  animation: notif-progress 6s linear forwards;
}

@keyframes notif-progress {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

@keyframes notif-bell-shake {

  0%,
  100% {
    transform: rotate(0);
  }

  15% {
    transform: rotate(10deg);
  }

  30% {
    transform: rotate(-10deg);
  }

  45% {
    transform: rotate(6deg);
  }

  60% {
    transform: rotate(-4deg);
  }

  75% {
    transform: rotate(2deg);
  }
}

.notif-bell-shake {
  animation: notif-bell-shake 0.6s ease;
}

.notif-empty {
  padding: 60px 24px;
  text-align: center;
}

.notif-empty-icon {
  width: 56px;
  height: 56px;
  background: var(--lp-dark-700);
  border-radius: var(--lp-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--lp-text-muted);
}

.notif-section-label {
  padding: 8px 18px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--lp-text-muted);
  background: var(--lp-surface-bg);
}

/* ============================================================
   LEXOS PULSE — INTELLIGENT GLOBAL SEARCH
   Spotlight / Command Palette style
   ============================================================ */

/* ---- SEARCH TRIGGER BUTTON (header) ---- */
.lp-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--lp-dark-800);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: var(--lp-radius-sm);
  color: var(--lp-text-muted);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 180px;
  max-width: 240px;
}

.lp-search-trigger:hover {
  background: var(--lp-surface-overlay);
  border-color: var(--lp-neutral-600);
  color: var(--lp-text-secondary);
}

.lp-search-trigger span {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- BACKDROP ---- */
#lp-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px) saturate(0.8);
  -webkit-backdrop-filter: blur(8px) saturate(0.8);
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(60px, 12vh, 120px);
}

#lp-search-overlay.open {
  display: flex;
  animation: search-overlay-in 0.18s ease;
}

@keyframes search-overlay-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ---- SEARCH MODAL ---- */
#lp-search-modal {
  width: min(680px, calc(100vw - 40px));
  background: var(--lp-surface-raised);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(192, 21, 42, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.65),
    0 8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.18s ease;
  max-height: calc(100vh - 160px);
  display: flex;
  flex-direction: column;
}

#lp-search-overlay.open #lp-search-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ---- INPUT ROW ---- */
.lp-search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--lp-surface-border);
  flex-shrink: 0;
}

.lp-search-icon-wrap {
  color: var(--lp-red-500);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.lp-search-icon-wrap svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

#lp-search-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--lp-text-primary);
  letter-spacing: -0.2px;
  caret-color: #C0152A;
}

#lp-search-input-field::placeholder {
  color: var(--lp-text-muted);
  font-weight: 400;
}

.lp-search-kbd-hint {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.lp-search-kbd {
  font-size: 11px;
  font-family: monospace;
  background: var(--lp-dark-900);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: 5px;
  padding: 3px 7px;
  color: var(--lp-text-muted);
  line-height: 1.4;
}

/* ---- FILTER TABS ---- */
.lp-search-filters {
  display: flex;
  gap: 4px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--lp-surface-border);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.lp-search-filters::-webkit-scrollbar {
  display: none;
}

.lp-search-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--lp-surface-border-strong);
  background: transparent;
  color: var(--lp-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif;
}

.lp-search-filter-btn:hover {
  background: var(--lp-surface-overlay);
  color: var(--lp-text-primary);
  border-color: var(--lp-neutral-600);
}

.lp-search-filter-btn.active {
  background: rgba(192, 21, 42, 0.12);
  color: var(--lp-red-400);
  border-color: rgba(192, 21, 42, 0.3);
}

.lp-search-filter-btn svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

/* ---- RESULTS CONTAINER ---- */
#lp-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 10px;
}

#lp-search-results::-webkit-scrollbar {
  width: 5px;
}

#lp-search-results::-webkit-scrollbar-thumb {
  background: var(--lp-neutral-700);
  border-radius: 3px;
}

/* ---- SECTION HEADER ---- */
.lp-search-section-head {
  padding: 10px 18px 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--lp-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---- RESULT ITEM ---- */
.lp-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 8px;
  margin: 1px 8px;
  transition: background 0.1s ease;
  text-decoration: none;
  position: relative;
}

.lp-search-result-item:hover,
.lp-search-result-item.focused {
  background: var(--lp-surface-overlay);
}

.lp-search-result-item.focused::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: #C0152A;
  border-radius: 0 3px 3px 0;
}

/* ---- TYPE ICON ---- */
.lp-result-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-result-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.lp-result-icon i {
  width: 16px;
  height: 16px;
}

.lp-result-icon.red {
  background: rgba(192, 21, 42, 0.12);
  color: var(--lp-red-400);
}

.lp-result-icon.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
}

.lp-result-icon.green {
  background: rgba(5, 150, 105, 0.12);
  color: #34d399;
}

.lp-result-icon.amber {
  background: rgba(217, 119, 6, 0.12);
  color: #fbbf24;
}

.lp-result-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
}

.lp-result-icon.indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.lp-result-icon.gray {
  background: rgba(107, 114, 128, 0.12);
  color: #9ca3af;
}

/* ---- CONTENT ---- */
.lp-result-content {
  flex: 1;
  min-width: 0;
}

.lp-result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.lp-result-title mark {
  background: rgba(192, 21, 42, 0.2);
  color: var(--lp-red-300);
  border-radius: 2px;
  padding: 0 1px;
}

.lp-result-subtitle {
  font-size: 11px;
  color: var(--lp-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-result-code {
  font-size: 10px;
  font-family: monospace;
  font-weight: 700;
  background: var(--lp-dark-900);
  color: var(--lp-red-400);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.lp-result-meta {
  font-size: 11px;
  color: var(--lp-text-muted);
  flex-shrink: 0;
  text-align: right;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-result-enter {
  font-size: 11px;
  color: var(--lp-text-muted);
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.lp-search-result-item.focused .lp-result-enter {
  opacity: 1;
}

/* ---- COMMAND ITEM ---- */
.lp-search-command-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 8px;
  margin: 1px 8px;
  transition: background 0.1s ease;
  text-decoration: none;
}

.lp-search-command-item:hover,
.lp-search-command-item.focused {
  background: rgba(192, 21, 42, 0.08);
}

.lp-cmd-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
}

.lp-cmd-type.nav {
  background: rgba(37, 99, 235, 0.12);
  color: #60a5fa;
}

.lp-cmd-type.create {
  background: rgba(5, 150, 105, 0.12);
  color: #34d399;
}

/* ---- EMPTY / LOADING STATE ---- */
.lp-search-empty {
  padding: 48px 24px;
  text-align: center;
}

.lp-search-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.lp-search-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--lp-text-primary);
  margin-bottom: 6px;
}

.lp-search-empty-sub {
  font-size: 12px;
  color: var(--lp-text-muted);
}

/* ---- LOADING SHIMMER ---- */
.lp-search-shimmer {
  padding: 8px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 2px 8px;
  border-radius: 8px;
}

.lp-shimmer-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--lp-surface-border-strong);
  flex-shrink: 0;
  animation: lp-shimmer 1.2s infinite linear;
}

.lp-shimmer-lines {
  flex: 1;
}

.lp-shimmer-line {
  height: 10px;
  background: var(--lp-surface-border-strong);
  border-radius: 5px;
  margin-bottom: 7px;
  animation: lp-shimmer 1.2s infinite linear;
}

.lp-shimmer-line.short {
  width: 55%;
}

@keyframes lp-shimmer {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
}

/* ---- FOOTER ---- */
.lp-search-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--lp-surface-border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lp-search-footer-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--lp-text-muted);
}

/* ---- RECENT TAG ---- */
.lp-search-recent-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--lp-surface-overlay);
  border: 1px solid var(--lp-surface-border-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--lp-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.lp-search-recent-tag:hover {
  background: var(--lp-surface-border-strong);
  color: var(--lp-text-primary);
}

/* ---- SUGGESTION CHIP ---- */
.lp-search-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(192, 21, 42, 0.06);
  border: 1px solid rgba(192, 21, 42, 0.2);
  border-radius: 999px;
  font-size: 11px;
  color: var(--lp-red-400);
  cursor: pointer;
  margin: 3px;
  transition: all 0.15s ease;
}

.lp-search-suggestion:hover {
  background: rgba(192, 21, 42, 0.12);
}