/* LedgerPulse OS â€” Design System v1.0 (original) */
:root {
  --lp-bg: #eef1f8;
  --lp-bg-deep: #0b1020;
  --lp-sidebar: #111827;
  --lp-sidebar-hover: #1f2937;
  --lp-sidebar-active: #312e81;
  --lp-surface: #ffffff;
  --lp-surface-2: #f8fafc;
  --lp-border: #e2e8f0;
  --lp-text: #0f172a;
  --lp-text-muted: #64748b;
  --lp-primary: #6366f1;
  --lp-indigo: #6366f1;
  --lp-primary-dark: #4f46e5;
  --lp-accent: #06b6d4;
  --lp-accent-2: #8b5cf6;
  --lp-success: #059669;
  --lp-warning: #d97706;
  --lp-danger: #dc2626;
  --lp-radius: 14px;
  --lp-radius-sm: 10px;
  --lp-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --lp-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --lp-sidebar-w: 280px;
  --lp-topbar-h: 64px;
  --lp-content-pad: 28px;
  --lp-font: 'Segoe UI', 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  --lp-mono: 'Cascadia Code', Consolas, monospace;
  --lp-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #06b6d4 100%);
  --lp-gradient-soft: linear-gradient(135deg, rgba(99,102,241,.08) 0%, rgba(6,182,212,.06) 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--lp-font);
  background: var(--lp-bg);
  color: var(--lp-text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img, svg, video { max-width: 100%; height: auto; }

.lp-nav { overscroll-behavior: contain; }

#app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* â”€â”€ Sidebar â”€â”€ */
.lp-sidebar {
  width: var(--lp-sidebar-w);
  background: var(--lp-sidebar);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  border-left: 1px solid rgba(255,255,255,.06);
  transition: transform .25s ease;
}

.lp-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.lp-brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lp-brand-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--lp-gradient);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 20px rgba(99,102,241,.35);
}

.lp-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}

.lp-brand-tag {
  font-size: .72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.lp-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 20px;
}

.lp-nav-group { margin-bottom: 18px; }

.lp-nav-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
  padding: 8px 12px 6px;
  font-weight: 700;
}

.lp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  border-radius: var(--lp-radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: .88rem;
  text-align: right;
  transition: background .15s, color .15s;
  touch-action: manipulation;
  min-height: 44px;
}

.lp-nav-item:hover { background: var(--lp-sidebar-hover); color: #fff; }

.lp-nav-item.active {
  background: var(--lp-sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--lp-accent);
}

.lp-nav-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.lp-nav-item.active .lp-nav-icon {
  background: rgba(6,182,212,.2);
}

.lp-nav-badge {
  margin-right: auto;
  font-size: .65rem;
  background: rgba(99,102,241,.35);
  color: #c7d2fe;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}

.lp-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .72rem;
  color: #64748b;
  text-align: center;
}

.lp-offline-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--lp-success);
  border-radius: 50%;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(5,150,105,.6);
}

/* â”€â”€ Main â”€â”€ */
.lp-main {
  flex: 1;
  margin-right: var(--lp-sidebar-w);
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
  width: calc(100% - var(--lp-sidebar-w));
  display: flex;
  flex-direction: column;
}

.lp-topbar {
  min-height: var(--lp-topbar-h);
  background: var(--lp-surface);
  border-bottom: 1px solid var(--lp-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top, 0px)) 16px 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.lp-topbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.lp-topbar-info {
  flex: 1;
  min-width: 0;
}

.lp-topbar-actions {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

#lp-client-select {
  width: 100%;
  min-width: 0;
  font-size: .82rem;
}

.lp-topbar-settings {
  flex-shrink: 0;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
}

.lp-menu-toggle {
  display: none;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  border-radius: 8px;
  padding: 0;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1.15rem;
  touch-action: manipulation;
}

.lp-topbar-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-topbar-sub {
  font-size: .78rem;
  color: var(--lp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-content {
  flex: 1;
  width: 100%;
  max-width: 100%;
  padding: var(--lp-content-pad);
  padding-bottom: calc(var(--lp-content-pad) + env(safe-area-inset-bottom, 0px));
}

/* â”€â”€ Components â”€â”€ */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--lp-radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
  touch-action: manipulation;
  min-height: 40px;
}

.lp-btn:active { transform: scale(.98); }

.lp-btn-primary {
  background: var(--lp-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.3);
}

.lp-btn-primary:hover { box-shadow: 0 6px 20px rgba(99,102,241,.4); }

.lp-btn-ghost {
  background: var(--lp-surface);
  border-color: var(--lp-border);
  color: var(--lp-text);
}

.lp-btn-ghost:hover { background: var(--lp-surface-2); }

.lp-btn-sm { padding: 6px 12px; font-size: .78rem; }

.lp-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  overflow: hidden;
}

.lp-card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--lp-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lp-card-title {
  font-size: 1rem;
  font-weight: 800;
}

.lp-card-desc {
  font-size: .8rem;
  color: var(--lp-text-muted);
  margin-top: 4px;
}

.lp-card-body { padding: 20px; }

.lp-grid { display: grid; gap: 16px; }
.lp-grid > * { min-width: 0; }
.lp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .lp-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 769px) {
  .lp-topbar {
    flex-direction: row;
    align-items: center;
    padding: 0 28px;
    gap: 20px;
    min-height: var(--lp-topbar-h);
  }

  .lp-topbar-row { flex: 1; min-width: 0; }

  .lp-topbar-actions {
    width: auto;
    flex-shrink: 0;
    margin-right: auto;
  }

  #lp-client-select {
    width: auto;
    min-width: 200px;
    max-width: 280px;
  }

  .lp-card-header {
    flex-direction: row;
    align-items: center;
  }

  .lp-hero-actions {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 1200px) {
  :root { --lp-content-pad: 32px; }
  .lp-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1400px) {
  :root { --lp-content-pad: 36px; }
}

@media (max-width: 768px) {
  :root {
    --lp-sidebar-w: min(88vw, 300px);
    --lp-content-pad: 14px;
    --lp-topbar-h: auto;
  }

  .lp-sidebar {
    transform: translateX(100%);
    box-shadow: none;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .lp-sidebar.open {
    transform: translateX(0);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.35);
  }

  .lp-main {
    margin-right: 0;
    width: 100%;
  }

  .lp-menu-toggle { display: grid; place-items: center; }

  .lp-grid-2, .lp-grid-3, .lp-grid-4 { grid-template-columns: 1fr; }

  .lp-content {
    padding: 14px 12px calc(18px + env(safe-area-inset-bottom, 0));
  }

  .lp-hero {
    padding: 18px 16px;
    margin-bottom: 14px;
  }

  .lp-hero h1 {
    font-size: 1.28rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .lp-hero p {
    font-size: .84rem;
    line-height: 1.65;
    max-width: none;
  }

  .lp-hero-actions {
    flex-direction: column;
    align-items: stretch !important;
  }

  .lp-hero-actions .lp-select,
  .lp-hero-actions .lp-btn,
  .lp-hero-actions label {
    width: 100%;
  }

  .lp-hero-actions label {
    justify-content: space-between;
  }

  .lp-card-header {
    padding: 14px 16px 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .lp-card-header .lp-btn {
    width: 100%;
    justify-content: center;
  }

  .lp-card-body { padding: 14px 16px; }

  .lp-stat { padding: 14px; }

  .lp-stat-value {
    font-size: 1.3rem;
    word-break: break-word;
  }

  .lp-tool-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lp-tool-card {
    padding: 14px;
    width: 100%;
  }

  button.lp-tool-card {
    display: block;
    width: 100%;
    font-family: inherit;
    text-align: right;
  }

  .lp-tool-card:active { transform: scale(0.99); }

  .lp-result-box { padding: 16px; }

  .lp-result-main {
    font-size: 1.45rem;
    word-break: break-word;
  }

  .lp-file-link {
    padding: 12px;
    gap: 8px;
    align-items: flex-start;
  }

  .lp-file-link > div {
    flex: 1;
    min-width: 0;
  }

  .lp-file-link strong {
    display: block;
    font-size: .88rem;
    word-break: break-word;
  }

  .lp-checklist-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .lp-checklist-item .lp-pill { margin-right: 30px; }

  .lp-table { font-size: .78rem; }

  .lp-table th, .lp-table td { padding: 8px 10px; }

  .lp-input, .lp-select, .lp-textarea, .lp-xls-cell {
    font-size: 16px;
  }

  .lp-input, .lp-select, .lp-textarea { padding: 12px; }

  .lp-btn-row,
  .lp-open-modal-actions,
  .lp-card-body > .lp-btn + .lp-btn,
  .lp-card-body > label.lp-btn {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .lp-btn-row .lp-btn,
  .lp-btn-row label.lp-btn { width: 100%; }

  .lp-overlay.show {
    display: block;
    backdrop-filter: blur(2px);
  }

  body.sidebar-open { overflow: hidden; }

  /* Workbook mobile */
  .lp-wb-status { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  .lp-wb-tabs {
    position: sticky;
    top: 0;
    z-index: 40;
    margin: 0 -12px 8px;
    padding: 6px 12px 10px;
    background: linear-gradient(var(--lp-bg) 70%, transparent);
    scrollbar-width: none;
  }

  .lp-wb-tabs::-webkit-scrollbar { display: none; }

  .lp-wb-tab {
    padding: 10px 12px;
    font-size: .76rem;
    min-height: 44px;
  }

  .lp-wb-hero .lp-card-body {
    flex-direction: column;
    align-items: stretch !important;
  }

  .lp-wb-hero .lp-btn { width: 100%; }

  .lp-xls-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .lp-xls-title {
    flex: 1 1 100%;
    font-size: .88rem;
    line-height: 1.4;
  }

  .lp-xls-add { width: 100%; }

  .lp-xls-scroll {
    max-height: min(52vh, 440px);
    -webkit-overflow-scrolling: touch;
  }

  .lp-xls-table { min-width: 560px; font-size: .78rem; }

  .lp-xls-cell {
    min-height: 40px;
    padding: 8px 6px;
  }

  .lp-xls-formula {
    flex-wrap: wrap;
    font-size: .78rem;
  }

  .lp-xls-formula-val {
    word-break: break-all;
    min-width: 0;
  }

  .lp-xls-vat-summary .lp-grid-2 { gap: 12px; }

  .lp-banner-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .lp-banner-row .lp-btn { width: 100%; }
}

@media (max-width: 380px) {
  .lp-topbar-title { font-size: .95rem; }
  .lp-topbar-sub { font-size: .72rem; }
  .lp-brand-name { font-size: 1rem; }
  .lp-brand-tag { font-size: .65rem; }
  .lp-tab { font-size: .76rem; padding: 8px 12px; }
}

.lp-stat {
  padding: 18px;
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
}

.lp-stat-value {
  font-size: 1.6rem;
  font-weight: 900;
  font-family: var(--lp-mono);
  background: var(--lp-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-stat-label {
  font-size: .78rem;
  color: var(--lp-text-muted);
  margin-top: 4px;
}

.lp-input, .lp-select, .lp-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  font-family: inherit;
  font-size: .88rem;
  background: var(--lp-surface);
  transition: border-color .15s, box-shadow .15s;
}

.lp-input:focus, .lp-select:focus, .lp-textarea:focus {
  outline: none;
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.lp-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: var(--lp-text-muted);
  margin-bottom: 6px;
}

.lp-field { margin-bottom: 14px; }

.lp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.lp-table-wrap .lp-table { min-width: 480px; }

.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.lp-table th, .lp-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid var(--lp-border);
}

.lp-table th {
  background: var(--lp-surface-2);
  font-size: .75rem;
  color: var(--lp-text-muted);
  font-weight: 700;
}

.lp-table tr:hover td { background: rgba(99,102,241,.03); }

.lp-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}

.lp-pill-indigo { background: #eef2ff; color: #4338ca; }
.lp-pill-teal { background: #ecfeff; color: #0e7490; }
.lp-pill-green { background: #ecfdf5; color: #047857; }
.lp-pill-amber { background: #fffbeb; color: #b45309; }
.lp-pill-red { background: #fef2f2; color: #b91c1c; }

.lp-hero {
  background: var(--lp-gradient-soft);
  border: 1px solid rgba(99,102,241,.15);
  border-radius: var(--lp-radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.lp-hero::after {
  content: '';
  position: absolute;
  top: -40%; left: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
  pointer-events: none;
}

.lp-hero h1 {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.lp-hero p {
  color: var(--lp-text-muted);
  max-width: 620px;
  font-size: .92rem;
}

.lp-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.lp-tool-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  text-align: right;
  color: inherit;
}

button.lp-tool-card {
  width: 100%;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.lp-tool-card:hover {
  border-color: var(--lp-primary);
  transform: translateY(-2px);
  box-shadow: var(--lp-shadow-lg);
}

.lp-tool-card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--lp-gradient-soft);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.lp-tool-card-title {
  font-weight: 800;
  font-size: .92rem;
  margin-bottom: 4px;
}

.lp-tool-card-desc {
  font-size: .76rem;
  color: var(--lp-text-muted);
  line-height: 1.5;
}

.lp-result-box {
  background: var(--lp-bg-deep);
  color: #e2e8f0;
  border-radius: var(--lp-radius);
  padding: 20px 24px;
  margin-top: 16px;
}

.lp-result-main {
  font-size: 2rem;
  font-weight: 900;
  font-family: var(--lp-mono);
  color: var(--lp-accent);
}

.lp-result-sub {
  font-size: .82rem;
  color: #94a3b8;
  margin-top: 6px;
}

.lp-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--lp-surface-2);
  border-radius: var(--lp-radius-sm);
  border: 1px solid var(--lp-border);
}

.lp-tabs::-webkit-scrollbar { display: none; }

.lp-tab {
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--lp-text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  touch-action: manipulation;
  min-height: 40px;
}

.lp-tab.active {
  background: var(--lp-surface);
  color: var(--lp-primary-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.lp-progress {
  height: 8px;
  background: var(--lp-border);
  border-radius: 4px;
  overflow: hidden;
}

.lp-progress-bar {
  height: 100%;
  background: var(--lp-gradient);
  border-radius: 4px;
  transition: width .3s;
}

.lp-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lp-border);
}

.lp-checklist-item:last-child { border-bottom: none; }

.lp-checklist-item input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: var(--lp-primary);
}

.lp-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--lp-text-muted);
}

.lp-file-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  text-decoration: none;
  color: var(--lp-text);
  transition: background .12s, border-color .12s;
  margin-bottom: 8px;
}

.lp-file-link:hover {
  background: var(--lp-surface-2);
  border-color: var(--lp-primary);
}

.lp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
}

.lp-overlay.show { display: block; }

.lp-alert {
  padding: 12px 16px;
  border-radius: var(--lp-radius-sm);
  font-size: .85rem;
  margin-bottom: 16px;
}

.lp-alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.lp-alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* â”€â”€ Office open modal â”€â”€ */
.lp-open-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.lp-open-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.lp-open-modal-card {
  position: relative;
  width: min(520px, 100%);
  background: var(--lp-surface);
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  box-shadow: var(--lp-shadow-lg);
  padding: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

.lp-open-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lp-open-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.lp-open-modal-sub {
  font-size: .82rem;
  color: var(--lp-text-muted);
  margin-top: 6px;
  line-height: 1.6;
}

.lp-open-modal-x {
  border: none;
  background: var(--lp-surface-2);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.lp-open-modal-path {
  background: var(--lp-bg);
  border: 1px dashed var(--lp-border);
  border-radius: var(--lp-radius-sm);
  padding: 12px;
  font-size: .76rem;
  font-family: var(--lp-mono);
  word-break: break-all;
  direction: ltr;
  text-align: left;
  margin-bottom: 14px;
  max-height: 120px;
  overflow-y: auto;
}

.lp-open-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.lp-open-modal-actions .lp-btn { flex: 1; min-width: 120px; justify-content: center; }

.lp-open-modal-tip {
  font-size: .78rem;
  color: var(--lp-text-muted);
  background: var(--lp-gradient-soft);
  border-radius: var(--lp-radius-sm);
  padding: 10px 12px;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .lp-open-modal-actions { flex-direction: column; }
  .lp-open-modal-actions .lp-btn { width: 100%; min-width: 0; }
}

@media print {
  .lp-sidebar, .lp-topbar, .no-print { display: none !important; }
  .lp-main { margin: 0 !important; }
  .lp-content { padding: 0; max-width: none; }
  body { background: white; }
}

/* â”€â”€ Print: CV / Cover letter (A4 Â· pages flow naturally) â”€â”€ */
@page {
  size: A4 portrait;
  margin: 14mm 16mm;
}

#lp-print-root { display: none; }

@media print {
  html, body {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.lp-print-active #app,
  body.lp-print-active #lp-loader {
    display: none !important;
  }

  body.lp-print-active #lp-print-root {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .lp-print-page {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .lp-ats-cv--print,
  .lp-print-letter {
    direction: ltr;
    text-align: left;
    color: #000 !important;
    font-family: Calibri, 'Segoe UI', Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.38;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .lp-ats-cv--print .lp-ats-head {
    margin: 0 0 10pt;
    padding-bottom: 8pt;
    border-bottom: 1.5pt solid #000;
    page-break-after: avoid;
    break-after: avoid-page;
  }

  .lp-ats-cv--print .lp-ats-name {
    margin: 0 0 3pt;
    font-size: 20pt;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.15;
  }

  .lp-ats-cv--print .lp-ats-headline {
    margin: 0 0 5pt;
    font-size: 11pt;
    color: #222 !important;
  }

  .lp-ats-cv--print .lp-ats-contact {
    margin: 0;
    font-size: 9.5pt;
    color: #333 !important;
    line-height: 1.4;
  }

  .lp-ats-cv--print section {
    margin: 0 0 8pt;
    page-break-inside: auto;
    break-inside: auto;
  }

  .lp-ats-cv--print .lp-ats-h {
    margin: 10pt 0 5pt;
    padding-bottom: 2pt;
    font-size: 10pt;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 0.75pt solid #666;
    page-break-after: avoid;
    break-after: avoid-page;
  }

  .lp-ats-cv--print .lp-ats-block {
    margin: 0 0 7pt;
    page-break-inside: avoid;
    break-inside: avoid-page;
  }

  .lp-ats-cv--print .lp-ats-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10pt;
    flex-wrap: nowrap;
  }

  .lp-ats-cv--print .lp-ats-row strong {
    font-size: 10.5pt;
    font-weight: 700;
  }

  .lp-ats-cv--print .lp-ats-row span {
    font-size: 9.5pt;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .lp-ats-cv--print .lp-ats-sub {
    font-size: 10pt;
    color: #222 !important;
    margin: 1pt 0 3pt;
  }

  .lp-ats-cv--print ul {
    margin: 2pt 0 0;
    padding-left: 14pt;
    list-style-type: disc;
  }

  .lp-ats-cv--print li {
    margin: 0 0 2pt;
    font-size: 10pt;
    line-height: 1.35;
    page-break-inside: avoid;
    break-inside: avoid-page;
  }

  .lp-ats-cv--print p {
    margin: 0;
    font-size: 10pt;
    line-height: 1.38;
  }

  .lp-print-letter {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.55;
    padding: 0;
  }

  .lp-print-letter-body {
    white-space: normal;
    word-wrap: break-word;
  }
}

/* â”€â”€ Workbook (Excel replacement) â”€â”€ */
.lp-wb-hero {
  border: 2px solid var(--lp-indigo) !important;
  background: var(--lp-gradient-soft) !important;
}

.lp-wb-hero .lp-card-body,
.lp-banner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lp-wb-hero .lp-btn { flex-shrink: 0; }

.lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}

.lp-hero-actions .lp-select-sm { min-width: 140px; flex: 1; max-width: 220px; }

.lp-wb-status { margin-bottom: 16px; }

/* â”€â”€ File catalog sidebar (Excel Â· Books) â”€â”€ */
.lp-wb-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lp-wb-main {
  min-width: 0;
}

.lp-files-sidebar {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  overflow: hidden;
  box-shadow: var(--lp-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}

.lp-fs-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.lp-fs-head strong { font-size: .92rem; }
.lp-fs-sub { font-size: .72rem; color: var(--lp-text-muted); }

.lp-fs-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 6px 0 10px;
  -webkit-overflow-scrolling: touch;
}

.lp-fs-section { margin-bottom: 2px; }

.lp-fs-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 800;
  color: var(--lp-text);
  text-align: right;
}

.lp-fs-section-head:hover { background: var(--lp-surface-2); }

.lp-fs-ico { flex-shrink: 0; }
.lp-fs-title { flex: 1; min-width: 0; }
.lp-fs-count {
  font-size: .68rem;
  font-weight: 700;
  color: var(--lp-text-muted);
  background: var(--lp-bg);
  padding: 2px 7px;
  border-radius: 999px;
}
.lp-fs-chevron {
  font-size: .7rem;
  color: var(--lp-text-muted);
  flex-shrink: 0;
}

.lp-fs-list { padding: 0 6px 4px; }

.lp-fs-item {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 2px;
  border-radius: var(--lp-radius-sm);
}

.lp-fs-item.active { background: rgba(99, 102, 241, .08); }

.lp-fs-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--lp-radius-sm);
  text-decoration: none;
  color: var(--lp-text);
  font-size: .78rem;
  line-height: 1.35;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
}

.lp-fs-open:hover {
  background: var(--lp-surface-2);
  color: var(--lp-indigo);
}

.lp-fs-open-btn { width: 100%; }

.lp-fs-file-ico { flex-shrink: 0; font-size: .9rem; }
.lp-fs-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-fs-action {
  flex-shrink: 0;
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  background: var(--lp-surface);
  cursor: pointer;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  color: var(--lp-indigo);
}

.lp-fs-action:hover {
  background: var(--lp-indigo);
  color: #fff;
  border-color: var(--lp-indigo);
}

.lp-lib-layout .lp-files-sidebar { border-color: rgba(99, 102, 241, .25); }

.lp-fs-desc {
  padding: 0 14px 6px;
  font-size: .68rem;
  color: var(--lp-text-muted);
  line-height: 1.4;
}

/* â”€â”€ Library main grid â”€â”€ */
.lp-lib-block {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
}
.lp-lib-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.lp-lib-block-ico { font-size: 1.6rem; }
.lp-lib-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.lp-lib-file-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  background: var(--lp-surface-2);
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: border-color .15s, box-shadow .15s;
  min-height: 88px;
}
.lp-lib-file-card:hover {
  border-color: var(--lp-indigo);
  box-shadow: 0 2px 8px rgba(99, 102, 241, .12);
}
.lp-lib-file-ico { font-size: 1.25rem; }
.lp-lib-file-name { font-size: .82rem; font-weight: 700; line-height: 1.35; color: var(--lp-text); }
.lp-lib-file-meta { font-size: .68rem; color: var(--lp-text-muted); }

/* â”€â”€ PDF / file viewer modal â”€â”€ */
.lp-file-viewer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lp-file-viewer[hidden] { display: none !important; }
body.lp-viewer-open { overflow: hidden; }

.lp-file-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .65);
  backdrop-filter: blur(4px);
}

.lp-file-viewer-box {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--lp-surface);
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .25);
  overflow: hidden;
}

.lp-file-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
}

.lp-file-viewer-body {
  flex: 1;
  min-height: 0;
  background: #525659;
  position: relative;
}

.lp-fv-frame {
  width: 100%;
  height: min(70vh, 720px);
  border: none;
  display: block;
  background: #525659;
}

.lp-fv-fallback {
  padding: 24px;
  color: #fff;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lp-file-viewer-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
  position: relative;
  z-index: 2;
}
.lp-file-viewer-foot .lp-btn {
  pointer-events: auto;
  cursor: pointer;
}

@media (max-width: 768px) {
  .lp-lib-file-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-fv-frame { height: 55vh; }
}

@media (max-width: 1024px) {
  .lp-wb-layout {
    grid-template-columns: 1fr;
  }

  .lp-files-sidebar {
    position: static;
    max-height: min(420px, 55vh);
  }
}

@media (max-width: 768px) {
  .lp-files-sidebar { max-height: min(360px, 50vh); }
  .lp-fs-label { white-space: normal; }
}

.lp-wb-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.lp-wb-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  background: var(--lp-surface);
  color: var(--lp-text-muted);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  scroll-snap-align: start;
  touch-action: manipulation;
  min-height: 42px;
  font-family: inherit;
}

.lp-wb-tab:hover {
  border-color: var(--lp-indigo);
  color: var(--lp-indigo);
}

@media (min-width: 769px) {
  .lp-wb-tab:hover { transform: translateY(-1px); }
}

.lp-wb-tab.active {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(6,182,212,.08));
  border-color: var(--lp-indigo);
  color: var(--lp-indigo);
  box-shadow: 0 2px 8px rgba(99,102,241,.12);
}

.lp-wb-live {
  color: #10b981;
  font-size: .65rem;
  animation: lp-pulse 2s ease infinite;
}

@keyframes lp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.lp-wb-sheet { overflow: hidden; }

.lp-wb-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lp-wb-table { min-width: 640px; }

.lp-wb-table .num,
.lp-wb-cell.num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }

.lp-wb-cell {
  width: 100%;
  min-width: 72px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--lp-bg);
  font-size: .82rem;
  font-family: inherit;
  transition: border-color .12s, box-shadow .12s;
}

.lp-wb-cell:focus {
  outline: none;
  border-color: var(--lp-indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.lp-wb-cell.sm { min-width: 56px; max-width: 90px; }

@media (min-width: 769px) {
  .lp-wb-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px;
  }

  .lp-xls-scroll {
    max-height: calc(100vh - 340px);
    min-height: 260px;
  }

  .lp-tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .lp-btn-row { flex-direction: row; }
  .lp-btn-row .lp-btn,
  .lp-btn-row label.lp-btn { width: auto; }
}

@media (max-width: 768px) {
  .lp-wb-tab { padding: 10px 12px; font-size: .78rem; }
  .lp-wb-cell { font-size: .78rem; padding: 8px; min-height: 40px; }
}

/* Excel-like grid */
.lp-xls-wrap { background: var(--lp-surface); border-radius: var(--lp-radius); overflow: hidden; }
.lp-xls-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--lp-border); background: var(--lp-surface-2); }
.lp-xls-title { font-weight: 800; font-size: .95rem; }
.lp-xls-formula { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--lp-border); font-size: .82rem; }
.lp-xls-fx { font-weight: 800; color: var(--lp-indigo); font-style: italic; min-width: 24px; }
.lp-xls-formula-val { font-family: var(--lp-mono); color: var(--lp-text-muted); flex: 1; }
.lp-xls-scroll { overflow: auto; max-height: 55vh; }
.lp-xls-table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 640px; }
.lp-xls-table th, .lp-xls-table td { border: 1px solid var(--lp-border); padding: 6px 8px; vertical-align: middle; }
.lp-xls-table thead th { background: #e2e8f0; font-weight: 700; position: sticky; top: 0; z-index: 1; }
.lp-xls-rn { width: 36px; text-align: center; background: #f1f5f9; color: var(--lp-text-muted); font-weight: 600; }
.lp-xls-computed-h { background: #ecfdf5 !important; color: #047857; }
.lp-xls-computed { background: #f0fdf4; color: #065f46; font-weight: 600; }
.lp-xls-cell { width: 100%; border: none; background: transparent; padding: 4px 6px; font: inherit; min-height: 28px; }
.lp-xls-cell:focus { outline: 2px solid var(--lp-indigo); border-radius: 2px; background: #fff; }
.lp-xls-total { background: var(--lp-surface-2); font-weight: 700; }
.lp-xls-foot, .lp-xls-link { padding: 10px 16px; font-size: .82rem; color: var(--lp-text-muted); border-top: 1px solid var(--lp-border); }
.lp-xls-link a { color: var(--lp-indigo); font-weight: 700; }
.lp-xls-auto-row { background: #fffbeb; }
.lp-xls-auto-row .lp-xls-computed { background: #fef3c7; }

/* â”€â”€ Automation Pipeline â”€â”€ */
.lp-auto-layout .lp-files-sidebar { border-color: rgba(5, 150, 105, .35); }
.lp-auto-hero { border-right: 4px solid #059669; }

.lp-auto-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(5, 150, 105, .08), rgba(99, 102, 241, .06));
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  overflow-x: auto;
}

.lp-auto-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--lp-border);
  border-radius: 999px;
  background: var(--lp-surface);
  cursor: pointer;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  color: var(--lp-text-muted);
  white-space: nowrap;
  transition: all .15s;
}

.lp-auto-step.done {
  border-color: #059669;
  background: rgba(5, 150, 105, .1);
  color: #047857;
}

.lp-auto-step:hover { border-color: var(--lp-indigo); color: var(--lp-indigo); }

.lp-auto-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lp-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
}

.lp-auto-step.done .lp-auto-step-num { background: #059669; color: #fff; }

.lp-auto-step-badge {
  font-size: .65rem;
  background: var(--lp-indigo);
  color: #fff;
  padding: 1px 6px;
  border-radius: 999px;
}

.lp-auto-arrow { color: var(--lp-text-muted); font-size: .75rem; flex-shrink: 0; }

.lp-auto-tabs { flex-wrap: wrap; margin-bottom: 12px; }

.lp-auto-card { border: 1px solid rgba(5, 150, 105, .2); }

.lp-auto-pipe-card {
  padding: 14px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  background: var(--lp-surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lp-auto-pipe-card.done { border-color: #059669; background: rgba(5, 150, 105, .06); }

.lp-link-btn {
  background: none;
  border: none;
  color: var(--lp-indigo);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

@media (max-width: 768px) {
  .lp-auto-pipeline { padding: 10px; }
  .lp-auto-step { padding: 6px 10px; font-size: .72rem; }
}
.lp-xls-lock { font-size: .75rem; opacity: .6; }
.lp-select-sm { padding: 6px 10px; font-size: .82rem; min-height: 36px; }
.lp-input-sm { padding: 6px 10px; font-size: .82rem; min-height: 36px; }
.lp-btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lp-table .num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.lp-card + .lp-card { margin-top: 16px; }
.lp-section-gap { margin-bottom: 24px; }
.lp-simple-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.lp-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--lp-border);
  background: rgba(255,255,255,.03);
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.lp-flow-step:hover { border-color: rgba(240,193,75,.55); transform: translateY(-1px); }
.lp-flow-step span {
  width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(240,193,75,.18); color: #f0c14b; font-weight: 800; font-size: .85rem;
}
.lp-flow-step b { font-size: .92rem; }
.lp-flow-step small { color: var(--lp-text-muted); font-size: .72rem; }
@media (max-width: 900px) {
  .lp-simple-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lp-text-pre { white-space: pre-wrap; font-family: inherit; line-height: 1.8; }
.lp-scroll-h { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lp-wb-sheet { padding: 0 !important; background: transparent !important; border: none !important; box-shadow: none !important; }

/* Loader */
#lp-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--lp-bg);
  z-index: 9999;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

.lp-loader-inner { text-align: center; padding: 24px; }

.lp-loader-spin {
  width: 48px;
  height: 48px;
  border: 3px solid var(--lp-border);
  border-top-color: var(--lp-primary);
  border-radius: 50%;
  animation: lp-spin 1s linear infinite;
  margin: 0 auto 16px;
}

.lp-loader-brand {
  font-weight: 900;
  font-size: 1.2rem;
  background: var(--lp-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-loader-sub {
  font-size: .8rem;
  color: var(--lp-text-muted);
  margin-top: 6px;
}

.lp-career-hist {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lp-border);
}
.lp-int-q { font-size: 1.15rem; line-height: 1.55; margin: 8px 0 12px; }
.lp-int-hint {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--lp-gradient-soft);
  border-radius: var(--lp-radius-sm);
  font-size: .88rem;
  color: var(--lp-text-muted);
}
.lp-int-timer {
  font-family: var(--lp-mono);
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--lp-surface-2);
  border: 1px solid var(--lp-border);
}
.lp-int-timer.warn { background: #fffbeb; color: #b45309; }
.lp-int-timer.danger { background: #fef2f2; color: #b91c1c; }
.lp-int-score { margin: 0; padding: 12px 16px; }
.lp-int-score .lp-result-main { font-size: 1.4rem; }
.lp-int-h { margin: 16px 0 8px; font-size: .92rem; }
.lp-int-ul { margin: 0 18px 8px 0; font-size: .88rem; line-height: 1.7; color: var(--lp-text-muted); }
.lp-int-model {
  margin: 16px 0;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
}
.lp-int-model summary { cursor: pointer; font-weight: 800; color: var(--lp-primary); }
.lp-int-model p { margin-top: 10px; line-height: 1.75; }
.lp-int-results { text-align: center; padding: 28px 20px; }
.lp-int-results .lp-table-wrap { text-align: right; margin-top: 20px; }
.lp-cv-sheet { line-height: 1.75; }
.lp-cv-sheet h2 { margin-bottom: 4px; }
.lp-cv-sheet h4 { margin: 16px 0 6px; font-size: .92rem; }

/* â”€â”€ ATS CV Builder â”€â”€ */
.lp-ats-panel { border: 1px solid var(--lp-border); }
.lp-ats-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.lp-ats-score-num {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lp-ats-score-num small { font-size: .45em; font-weight: 700; opacity: .65; }
.lp-ats-score-num.ok { color: var(--lp-success, #059669); }
.lp-ats-score-num.mid { color: var(--lp-warning, #d97706); }
.lp-ats-score-num.low { color: var(--lp-danger, #dc2626); }

.lp-cv-layout { align-items: start; }
.lp-cv-preview-card { position: sticky; top: 72px; }
.lp-ats-preview-wrap {
  max-height: min(72vh, 820px);
  overflow: auto;
  padding: 8px 4px;
  background: #fff;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
}

.lp-cv-block {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--lp-surface-2);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
}
.lp-cv-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.lp-cv-demo-bar {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--lp-surface-2);
  border: 1px dashed var(--lp-border);
  border-radius: var(--lp-radius-sm);
}
.lp-cv-demo-btns {
  flex-wrap: wrap;
  gap: 8px;
}
.lp-cv-demo-btns .lp-btn-active {
  border-color: var(--lp-primary);
  color: var(--lp-primary);
  font-weight: 700;
}

/* ATS preview document (single column Â· parser-safe) */
.lp-ats-cv {
  direction: ltr;
  text-align: left;
  color: #111;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 10.5pt;
  line-height: 1.45;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 12px 20px;
}
.lp-ats-head { margin-bottom: 14px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.lp-ats-name {
  margin: 0 0 4px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.lp-ats-headline { margin: 0 0 6px; font-size: .95rem; color: #333; }
.lp-ats-contact { margin: 0; font-size: .85rem; color: #444; }
.lp-ats-h {
  margin: 14px 0 6px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3px;
}
.lp-ats-block { margin-bottom: 10px; }
.lp-ats-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lp-ats-sub { font-size: .9rem; color: #333; margin-bottom: 4px; }
.lp-ats-cv ul { margin: 4px 0 0 18px; padding: 0; }
.lp-ats-cv li { margin-bottom: 3px; }

@media (max-width: 768px) {
  .lp-int-q { font-size: 1.02rem; }
  .lp-card-header .lp-int-score { width: 100%; }
  .lp-cv-preview-card { position: static; }
  .lp-ats-preview-wrap { max-height: none; }
  .lp-ats-score-num { font-size: 2rem; }
}

.lp-card-title-lg { font-size: 1.15rem; }

.lp-hero-sector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  .lp-card-body .lp-btn-row {
    flex-direction: row;
  }

  .lp-card-body .lp-btn-row .lp-btn {
    width: auto;
  }

  .lp-hero-actions .lp-select-sm {
    flex: 0 1 auto;
  }
}

@media (max-width: 768px) {
  .lp-hero-sector {
    width: 100%;
    justify-content: space-between;
  }

  .lp-hero-sector .lp-select-sm {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
}

/* Export Â· Search Â· Charts Â· Hub Â· ETA */
.lp-xls-toolbar-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-right: auto; }
.lp-xls-export { display: flex; gap: 4px; }
.lp-calc-bridge { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--lp-border); }

.lp-search-modal { position: fixed; inset: 0; z-index: 9999; }
.lp-search-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.lp-search-box {
  position: relative; max-width: 560px; margin: 10vh auto 0; background: var(--lp-surface);
  border: 1px solid var(--lp-border); border-radius: 16px; padding: 16px; box-shadow: 0 24px 48px rgba(0,0,0,.25);
}
.lp-search-input { width: 100%; font-size: 1rem; }
.lp-search-hint { font-size: .72rem; color: var(--lp-text-muted); margin: 6px 0 10px; }
.lp-search-results { max-height: 320px; overflow: auto; }
.lp-search-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: right;
  padding: 10px 12px; border: none; background: transparent; cursor: pointer; border-radius: 10px;
}
.lp-search-item:hover, .lp-search-item.active { background: var(--lp-surface-2); }
.lp-search-type { margin-right: auto; font-size: .72rem; color: var(--lp-text-muted); }
.lp-search-empty { padding: 20px; text-align: center; color: var(--lp-text-muted); }

.lp-chart-card { background: var(--lp-surface-2); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.lp-chart-title { font-weight: 700; font-size: .85rem; margin-bottom: 10px; }
.lp-chart-row { display: grid; grid-template-columns: 72px 1fr 64px; gap: 8px; align-items: center; margin-bottom: 6px; font-size: .78rem; }
.lp-chart-track { height: 8px; background: var(--lp-border); border-radius: 4px; overflow: hidden; }
.lp-chart-fill { height: 100%; background: var(--lp-primary); border-radius: 4px; }
.lp-chart-fill.green { background: #10b981; }
.lp-chart-fill.amber { background: #f59e0b; }
.lp-mini-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }

.lp-hub-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.lp-hub-alert { padding: 10px 14px; border-radius: 10px; font-size: .85rem; }
.lp-hub-alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lp-hub-alert-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.lp-hub-alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.lp-pipe-log.ok { color: #059669; }
.lp-pipe-log.fail { color: #dc2626; }

.lp-eta-block { margin-top: 16px; padding: 12px; background: var(--lp-surface-2); border-radius: 10px; }
.lp-eta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 0; font-size: .82rem; cursor: pointer; }
.lp-eta-row small { color: var(--lp-text-muted); flex: 1 1 100%; margin-right: 24px; }

.lp-lib-chapters { margin-top: 8px; }
.lp-lib-chapter { padding: 14px; margin-bottom: 10px; background: var(--lp-surface-2); border-radius: 10px; line-height: 1.75; }
.lp-lib-example, .lp-lib-exercise { font-size: .85rem; margin-top: 8px; color: var(--lp-text-muted); }

.lp-lib-book-card {
  padding: 14px; background: var(--lp-surface-2); border-radius: 12px;
  border: 1px solid var(--lp-border); display: flex; flex-direction: column; gap: 10px;
}
.lp-lib-book-name { font-weight: 700; font-size: .92rem; }
.lp-lib-book-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.lp-export-print { padding: 24px; font-family: system-ui, sans-serif; }
.lp-export-print h1 { font-size: 1.2rem; margin-bottom: 16px; }
.lp-export-table-wrap table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.lp-export-table-wrap th, .lp-export-table-wrap td { border: 1px solid #ccc; padding: 6px 8px; text-align: right; }

@media print {
  .lp-export-print { padding: 0; }
}

/* System Guide â€” Ø¯Ù„ÙŠÙ„ Ø§Ù„Ù†Ø¸Ø§Ù… */
.lp-guide-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.lp-guide-sidebar {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 14px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}
.lp-guide-sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .82rem;
  color: var(--lp-text-muted);
  margin-bottom: 4px;
}
.lp-guide-search { margin-bottom: 6px; font-size: .82rem; }
.lp-guide-nav-group { margin-top: 8px; }
.lp-guide-nav-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--lp-text-muted);
  padding: 6px 8px 4px;
  letter-spacing: .02em;
}
.lp-guide-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: right;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: .82rem;
  color: var(--lp-text);
}
.lp-guide-nav-item:hover { background: var(--lp-surface-2); }
.lp-guide-nav-item.active {
  background: var(--lp-primary-soft, #eef2ff);
  color: var(--lp-primary);
  font-weight: 600;
}
.lp-guide-nav-item small {
  margin-right: auto;
  font-size: .68rem;
  opacity: .65;
  font-weight: 400;
}
.lp-guide-main { min-width: 0; display: flex; flex-direction: column; gap: 32px; }

/* Hero */
.lp-guide-hero {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f 0%, #312e81 50%, #4c1d95 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(49, 46, 129, .25);
}
.lp-guide-hero-inner { padding: 28px 32px; }
.lp-guide-hero h1 { margin: 0 0 8px; font-size: 1.55rem; }
.lp-guide-hero p { margin: 0 0 8px; opacity: .92; line-height: 1.7; font-size: .92rem; }
.lp-guide-hero-intro { opacity: .85; font-size: .88rem; max-width: 720px; }
.lp-guide-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lp-guide-stat-pill {
  padding: 6px 14px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  font-size: .78rem;
  backdrop-filter: blur(4px);
}

/* Group blocks â€” legacy removed; modules flow */
.lp-guide-modules { display: flex; flex-direction: column; gap: 36px; }

/* Module sections â€” creative card */
.lp-guide-module {
  position: relative;
  border-radius: 20px;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  overflow: hidden;
  scroll-margin-top: 88px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, .06);
}
.lp-guide-module-accent {
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 4px;
  background: var(--lp-primary, #6366f1);
}
.lp-guide-module--core .lp-guide-module-accent { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.lp-guide-module--resources .lp-guide-module-accent { background: linear-gradient(90deg, #0ea5e9, #06b6d4); }
.lp-guide-module--growth .lp-guide-module-accent { background: linear-gradient(90deg, #10b981, #14b8a6); }
.lp-guide-module--system .lp-guide-module-accent { background: linear-gradient(90deg, #64748b, #475569); }

.lp-guide-module-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--lp-surface-2) 0%, var(--lp-surface) 100%);
  border-bottom: 1px solid var(--lp-border);
}
.lp-guide-module-id { display: flex; align-items: center; gap: 10px; }
.lp-guide-module-num {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--lp-primary, #6366f1);
  color: #fff; border-radius: 12px;
  font-size: .85rem; font-weight: 800;
}
.lp-guide-module--core .lp-guide-module-num { background: #6366f1; }
.lp-guide-module--resources .lp-guide-module-num { background: #0ea5e9; }
.lp-guide-module--growth .lp-guide-module-num { background: #10b981; }
.lp-guide-module--system .lp-guide-module-num { background: #64748b; }
.lp-guide-module-ico { font-size: 1.8rem; }
.lp-guide-module-group { font-size: .7rem; font-weight: 700; color: var(--lp-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.lp-guide-module-title h2 { margin: 4px 0 2px; font-size: 1.2rem; }
.lp-guide-module-tagline { margin: 0; font-size: .82rem; color: var(--lp-text-muted); line-height: 1.5; }
.lp-guide-module-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lp-guide-module-stat {
  padding: 4px 12px;
  background: var(--lp-surface-2);
  border: 1px solid var(--lp-border);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--lp-text-muted);
}

.lp-guide-module-preview {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 38%);
  gap: 20px;
  padding: 20px 24px;
  align-items: start;
}
.lp-guide-module-brief { min-width: 0; }
.lp-guide-benefit-inline {
  padding: 10px 14px;
  background: #eff6ff;
  border-radius: 10px;
  font-size: .82rem;
  line-height: 1.55;
  margin-bottom: 10px;
}
.lp-guide-module-guide { margin: 0; font-size: .8rem; line-height: 1.65; color: var(--lp-text-muted); }
.lp-guide-module-shot .lp-guide-shot-img { max-height: 200px; }
.lp-guide-module-shot .lp-guide-shot-cap { padding: 6px 10px; font-size: .68rem; }

/* Tools stack under each module */
.lp-guide-module-tools {
  background: var(--lp-surface-2);
  border-top: 1px solid var(--lp-border);
  padding: 16px 24px 24px;
}
.lp-guide-module-tools-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--lp-border);
}
.lp-guide-module-tools-label { font-weight: 700; font-size: .88rem; flex: 1; }
.lp-guide-module-tools-count {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--lp-primary, #6366f1);
  color: #fff; border-radius: 8px;
  font-size: .72rem; font-weight: 700;
}
.lp-guide-tools-stack { display: flex; flex-direction: column; gap: 10px; }

/* Compact tool rows */
.lp-guide-tool-row {
  display: grid;
  grid-template-columns: 32px 140px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: 14px;
  transition: box-shadow .2s, border-color .2s;
}
.lp-guide-tool-row:hover {
  border-color: var(--lp-primary, #6366f1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, .1);
}
.lp-guide-tool-row-num {
  font-size: .68rem;
  font-weight: 800;
  color: var(--lp-text-muted);
  padding-top: 4px;
  opacity: .6;
}
.lp-guide-tool-row-shot .lp-guide-shot { border-radius: 10px; }
.lp-guide-tool-row-shot .lp-guide-shot-img { max-height: 88px; min-height: 60px; }
.lp-guide-tool-row-shot .lp-guide-shot-cap { display: none; }
.lp-guide-tool-row-shot .lp-guide-zoom-badge { font-size: .6rem; padding: 4px 8px; opacity: 0; }
.lp-guide-tool-row-shot .lp-guide-shot-btn:hover .lp-guide-zoom-badge { opacity: 1; }
.lp-guide-tool-row-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lp-guide-tool-row-head { display: flex; align-items: center; gap: 8px; }
.lp-guide-tool-ico { font-size: 1rem; }
.lp-guide-tool-title { margin: 0; font-size: .88rem; font-weight: 700; }
.lp-guide-tool-desc { margin: 0; font-size: .78rem; color: var(--lp-text-muted); line-height: 1.5; }
.lp-guide-tool-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.lp-guide-tool-when { font-size: .72rem; color: var(--lp-text-muted); }

/* Compact expert */
.lp-guide-expert-compact { display: flex; flex-direction: column; gap: 6px; }
.lp-guide-tool-expert { margin: 0; font-size: .78rem; line-height: 1.55; color: #166534; }
.lp-guide-tool-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.lp-guide-tool-tags span {
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: .68rem;
  line-height: 1.4;
  color: #475569;
}
.lp-guide-tool-journal { margin: 0; font-size: .7rem; color: #6b21a8; font-family: ui-monospace, monospace; }
.lp-guide-tool-journal strong { font-family: inherit; color: #7c3aed; }

/* Legacy chapter aliases â€” keep shot styles */
.lp-guide-chapter { scroll-margin-top: 88px; }
.lp-guide-overview { line-height: 1.75; font-size: .92rem; margin: 0 0 14px; }
.lp-guide-benefit-box {
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: .85rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

/* Screenshots + lightbox trigger */
.lp-guide-shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--lp-border);
  background: #0f172a;
  position: relative;
}
.lp-guide-shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  position: relative;
}
.lp-guide-shot-btn:hover .lp-guide-zoom-badge { opacity: 1; transform: translate(-50%, 0); }
.lp-guide-shot-btn:hover .lp-guide-shot-img { filter: brightness(.95); }
.lp-guide-shot-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: top;
  background: #f1f5f9;
  transition: filter .2s;
}
.lp-guide-shot-hero .lp-guide-shot-img { max-height: 520px; }
.lp-guide-zoom-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translate(-50%, 8px);
  padding: 6px 14px;
  background: rgba(15, 23, 42, .85);
  color: #fff;
  font-size: .72rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  white-space: nowrap;
}
.lp-guide-shot-cap {
  display: block;
  padding: 8px 12px;
  font-size: .72rem;
  text-align: center;
  background: var(--lp-surface-2);
  color: var(--lp-text-muted);
  border-top: 1px solid var(--lp-border);
}

/* Lightbox */
.lp-guide-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lp-guide-lightbox[hidden] { display: none !important; }
body.lp-guide-lb-open { overflow: hidden; }
.lp-guide-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .88);
  backdrop-filter: blur(6px);
}
.lp-guide-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1400px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--lp-surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
.lp-guide-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--lp-surface-2);
  border-bottom: 1px solid var(--lp-border);
}
.lp-guide-lightbox-toolbar strong { font-size: .9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-guide-lb-actions { display: flex; gap: 6px; flex-shrink: 0; }
.lp-guide-lightbox-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #0f172a;
  min-height: 200px;
}
.lp-guide-lightbox-body img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.lp-guide-screen-box {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  margin: 10px 0;
  font-size: .84rem;
  line-height: 1.75;
}
.lp-guide-screen-box p { margin: 6px 0 0; }
.lp-guide-screen-main { background: #fffbeb; border-color: #fde68a; }
.lp-guide-steps {
  margin: 8px 0 0;
  padding-right: 20px;
  font-size: .84rem;
  line-height: 1.8;
  color: var(--lp-text);
}
.lp-guide-steps-sm { font-size: .8rem; margin-top: 6px; }
.lp-guide-steps-wrap { margin: 10px 0; }
.lp-guide-steps-wrap strong { font-size: .82rem; }
.lp-guide-benefit-sm { margin-top: 4px; font-size: .82rem; padding: 10px 12px; }
.lp-guide-how { font-size: .82rem; color: var(--lp-text-muted); margin: 4px 0 0; }

/* Expert accounting blocks */
.lp-guide-expert-wrap { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.lp-guide-expert-box {
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 12px;
  border-right: 4px solid #16a34a;
}
.lp-guide-expert-label { display: block; font-size: .82rem; margin-bottom: 8px; color: #166534; }
.lp-guide-expert-text { margin: 0; font-size: .86rem; line-height: 1.85; color: #14532d; }
.lp-guide-rules-box {
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  font-size: .84rem;
}
.lp-guide-rules-box strong { display: block; margin-bottom: 6px; color: #1e40af; font-size: .8rem; }
.lp-guide-journal-box {
  padding: 12px 14px;
  background: #faf5ff;
  border: 1px solid #d8b4fe;
  border-radius: 10px;
}
.lp-guide-journal-box strong { display: block; margin-bottom: 6px; color: #6b21a8; font-size: .8rem; }
.lp-guide-journal-code {
  display: block;
  font-size: .8rem;
  line-height: 1.7;
  color: #581c87;
  font-family: ui-monospace, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.lp-guide-tips-box {
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  font-size: .84rem;
}
.lp-guide-tips-box strong { display: block; margin-bottom: 6px; color: #92400e; font-size: .8rem; }
.lp-guide-mistakes-box {
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  font-size: .84rem;
}
.lp-guide-mistakes-box strong { display: block; margin-bottom: 6px; color: #991b1b; font-size: .8rem; }
.lp-guide-controls-box {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: .84rem;
}
.lp-guide-controls-box strong { display: block; margin-bottom: 6px; color: #334155; font-size: .8rem; }
.lp-guide-list { margin: 0; padding-right: 18px; line-height: 1.75; }
.lp-guide-list li { margin-bottom: 4px; }
.lp-guide-list-rules li { color: #1e3a8a; }
.lp-guide-list-tips li { color: #78350f; }
.lp-guide-list-mistakes li { color: #7f1d1d; }
.lp-guide-list-controls li { color: #475569; }

/* Mock screens */
.lp-guide-mock {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-radius: 12px;
  padding: 14px;
  color: #e2e8f0;
  min-height: 140px;
}
.lp-guide-mock-title {
  font-size: .72rem;
  opacity: .75;
  margin-bottom: 10px;
  text-align: center;
}
.lp-guide-mock-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.lp-guide-mock-stat { height: 28px; background: rgba(255,255,255,.12); border-radius: 6px; }
.lp-guide-mock-stat.warn { background: rgba(245,158,11,.35); }
.lp-guide-mock-stat.ok { background: rgba(16,185,129,.35); }
.lp-guide-mock-bar { height: 8px; background: rgba(99,102,241,.5); border-radius: 4px; margin-bottom: 6px; }
.lp-guide-mock-bar.wide { width: 85%; }
.lp-guide-mock-grid { display: flex; flex-direction: column; gap: 4px; }
.lp-guide-mock-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 0.7fr;
  gap: 4px;
  font-size: .65rem;
}
.lp-guide-mock-row span { height: 14px; background: rgba(255,255,255,.1); border-radius: 3px; }
.lp-guide-mock-row.head span { background: rgba(255,255,255,.2); }
.lp-guide-mock-row.auto span:first-child { background: rgba(99,102,241,.45); font-size: .6rem; line-height: 14px; text-align: center; }
.lp-guide-mock-calc { display: flex; flex-direction: column; gap: 6px; }
.lp-guide-mock-field { height: 22px; background: rgba(255,255,255,.12); border-radius: 6px; }
.lp-guide-mock-result { padding: 8px; background: rgba(16,185,129,.25); border-radius: 6px; font-size: .75rem; text-align: center; }
.lp-guide-mock-btn { padding: 6px; background: rgba(99,102,241,.5); border-radius: 6px; font-size: .7rem; text-align: center; }
.lp-guide-mock-pipe { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: .75rem; }
.lp-guide-mock-pipe span.done { width: 22px; height: 22px; background: rgba(16,185,129,.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.lp-guide-mock-check { display: flex; gap: 8px; justify-content: center; font-size: .85rem; }
.lp-guide-mock-cal { display: flex; gap: 6px; justify-content: center; }
.lp-guide-mock-cal .day { width: 36px; height: 36px; background: rgba(255,255,255,.12); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .75rem; }
.lp-guide-mock-cal .day.hot { background: rgba(239,68,68,.45); }
.lp-guide-mock-files, .lp-guide-mock-sectors, .lp-guide-mock-set { display: flex; gap: 10px; justify-content: center; font-size: 1.4rem; flex-wrap: wrap; }
.lp-guide-mock-career { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.lp-guide-mock-career .cv { padding: 8px 16px; background: rgba(16,185,129,.3); border-radius: 8px; font-size: .8rem; }
.lp-guide-mock-career .track { font-size: .75rem; opacity: .8; }
.lp-guide-mock-lib { display: flex; gap: 8px; justify-content: center; }
.lp-guide-mock-lib button { padding: 6px 12px; border: none; border-radius: 6px; background: rgba(255,255,255,.15); color: inherit; font-size: .72rem; }
.lp-guide-mock-search { padding: 10px; background: rgba(255,255,255,.1); border-radius: 8px; font-size: .75rem; text-align: center; }

@media (max-width: 900px) {
  .lp-guide-layout { grid-template-columns: 1fr; }
  .lp-guide-sidebar { position: static; max-height: none; }
  .lp-guide-module-head { grid-template-columns: 1fr; }
  .lp-guide-module-actions { flex-direction: row; align-items: center; }
  .lp-guide-module-preview { grid-template-columns: 1fr; }
  .lp-guide-module-shot { order: -1; }
  .lp-guide-tool-row { grid-template-columns: 1fr; }
  .lp-guide-tool-row-num { display: none; }
  .lp-guide-tool-row-shot .lp-guide-shot-img { max-height: 140px; }
  .lp-guide-hero-inner { padding: 20px; }
  .lp-guide-lightbox-panel { width: 100%; max-height: 100vh; border-radius: 0; }
  .lp-guide-lightbox { padding: 0; }
}

/* ?? Trial license + purchase modal ?? */
.lp-nav-buy-wrap {
  margin: 12px 10px 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, .35);
  background: linear-gradient(180deg, rgba(201,162,39,.12), rgba(17,24,39,.5));
}
.lp-nav-buy-note {
  margin: 0 0 8px;
  font-size: .72rem;
  color: #cbd5e1;
  line-height: 1.45;
  text-align: center;
}
.lp-nav-buy-wrap .lp-btn { width: 100%; }
.lp-nav-locked { opacity: .92; }
.lp-nav-lock { margin-inline-start: auto; font-size: .75rem; opacity: .7; }

.lp-license-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
}
.lp-license-trial {
  border-color: rgba(201,162,39,.4);
  background: linear-gradient(100deg, rgba(201,162,39,.1), var(--lp-surface) 55%);
}
.lp-license-full {
  border-color: rgba(5,150,105,.35);
  background: rgba(5,150,105,.08);
  color: var(--lp-success);
  font-weight: 700;
}
.lp-license-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lp-license-banner-text strong { font-size: .9rem; color: #b45309; }
.lp-license-banner-text span { font-size: .8rem; color: var(--lp-text-muted); }

.lp-view-only { position: relative; }
.lp-view-only::after {
  content: "ãÚÇíäÉ — ÇáÇÓÊÎÏÇã ÇáßÇãá ÈÚÏ ÇáÔÑÇÁ";
  pointer-events: none;
  position: sticky;
  bottom: 8px;
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: #92400e;
  background: rgba(251, 191, 36, .2);
  border: 1px solid rgba(201,162,39,.35);
}

.lp-buy-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lp-buy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(6px);
}
.lp-buy-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: var(--lp-surface);
  color: var(--lp-text);
  border-radius: 18px;
  border: 1px solid var(--lp-border);
  box-shadow: var(--lp-shadow-lg);
  padding: 20px 18px 16px;
}
.lp-buy-modal-x {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
  color: var(--lp-text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.lp-buy-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  color: #92400e;
  background: rgba(251, 191, 36, .22);
  border: 1px solid rgba(201,162,39,.35);
  margin-bottom: 10px;
}
.lp-buy-modal-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  line-height: 1.35;
  padding-inline-end: 2rem;
}
.lp-buy-desc {
  margin: 0 0 12px;
  color: var(--lp-text-muted);
  font-size: .9rem;
  line-height: 1.55;
}
.lp-buy-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: linear-gradient(100deg, rgba(201,162,39,.14), rgba(99,102,241,.08));
  border: 1px solid rgba(201,162,39,.3);
}
.lp-buy-price strong {
  font-size: 1.25rem;
  color: #b45309;
  margin-inline-end: 8px;
}
.lp-buy-old {
  text-decoration: line-through;
  color: var(--lp-text-muted);
  font-size: .85rem;
  font-weight: 600;
}
.lp-buy-price small {
  color: var(--lp-text-muted);
  font-size: .75rem;
}
.lp-buy-perks {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.lp-buy-perks li {
  position: relative;
  padding: 0 0 0 .1rem;
  padding-inline-start: 1rem;
  font-size: .84rem;
  color: var(--lp-text-muted);
  line-height: 1.4;
}
.lp-buy-perks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9a227;
}
.lp-buy-form { display: grid; gap: 10px; }
.lp-buy-field label {
  display: block;
  margin-bottom: 4px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--lp-text-muted);
}
.lp-buy-opt { font-weight: 500; opacity: .75; }
.lp-buy-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
  color: var(--lp-text);
  font: inherit;
  font-size: .95rem;
}
.lp-buy-field input:focus {
  outline: none;
  border-color: #c9a227;
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}
.lp-buy-msg {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .82rem;
  line-height: 1.4;
}
.lp-buy-msg.err {
  background: rgba(220, 38, 38, .1);
  color: var(--lp-danger);
  border: 1px solid rgba(220, 38, 38, .25);
}
.lp-buy-submit { width: 100%; min-height: 44px; margin-top: 2px; }
.lp-buy-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--lp-text-muted);
  font-size: .8rem;
}
.lp-buy-link {
  border: 0;
  background: none;
  color: var(--lp-primary);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.lp-buy-fine {
  margin: 12px 0 0;
  text-align: center;
  font-size: .72rem;
  color: var(--lp-text-muted);
  line-height: 1.45;
}
body.lp-buy-modal-open { overflow: hidden; }

@media (max-width: 520px) {
  .lp-buy-modal { padding: 10px; align-items: flex-end; }
  .lp-buy-modal-card {
    width: 100%;
    border-radius: 18px 18px 12px 12px;
    max-height: 88vh;
  }
  .lp-topbar-buy { padding-inline: 10px; }
}
