/* ==========================================================================
   LabPro design system  -  one stylesheet for the whole application
   Built on Bootstrap 4 grid / modal / dropdown only. Everything else is here.
   ========================================================================== */

:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e4e9f0;
  --line-2: #eef2f7;

  --brand: #0d9488;
  --brand-600: #0f766e;
  --brand-700: #115e59;
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;

  --blue: #2563eb;       --blue-50: #eff6ff;
  --green: #16a34a;      --green-50: #f0fdf4;
  --amber: #d97706;      --amber-50: #fffbeb;
  --red: #e11d48;        --red-50: #fff1f2;
  --purple: #7c3aed;     --purple-50: #f5f3ff;
  --slate-50: #f8fafc;

  --side: #0b1b2b;
  --side-2: #12293f;
  --side-ink: #a9bbcf;

  --r: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
  --side-w: 240px;
  --top-h: 64px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 650; letter-spacing: -.01em; margin: 0; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); text-decoration: none; }
.tabular, .lp-num { font-variant-numeric: tabular-nums; }
[ng-cloak], .ng-cloak { display: none !important; }
::selection { background: var(--brand-100); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- icons ---------- */
.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: -.2em; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.i-xl { width: 28px; height: 28px; }

/* ==========================================================================
   SHELL
   ========================================================================== */
.lp-app { min-height: 100vh; display: flex; }
.lp-side {
  width: var(--side-w); background: var(--side); color: var(--side-ink); position: fixed; inset: 0 auto 0 0; z-index: 1040;
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.lp-brand { height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.lp-brand:hover { color: #fff; }
.lp-brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #14b8a6, #0d9488 55%, #0f766e); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(13, 148, 136, .45); }
.lp-brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; line-height: 1.15; }
.lp-brand-sub { font-size: 11px; color: var(--side-ink); font-weight: 500; letter-spacing: .02em; }

.lp-nav { padding: 14px 12px 20px; overflow-y: auto; flex: 1; }
.lp-nav::-webkit-scrollbar { width: 6px; } .lp-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.lp-nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #5f7791; font-weight: 700; padding: 18px 12px 8px; }
.lp-nav-label:first-child { padding-top: 6px; }
.lp-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 2px 0; border-radius: 10px;
  color: var(--side-ink); font-weight: 500; transition: background .15s, color .15s;
}
.lp-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.lp-nav a.active { background: linear-gradient(90deg, rgba(20,184,166,.22), rgba(20,184,166,.08)); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.lp-nav a.active .i { color: #5eead4; }
.lp-nav .lp-nav-badge { margin-left: auto; background: #f59e0b; color: #1c1300; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.lp-side-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.06); font-size: 12px; color: #6b829b; }
.lp-side-foot strong { color: #cbd9e8; display: block; font-weight: 600; }

.lp-main { margin-left: var(--side-w); flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.lp-top {
  height: var(--top-h); background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 1030;
}
.lp-burger { display: none; border: 0; background: transparent; padding: 8px; border-radius: 10px; color: var(--ink-2); }
.lp-burger:hover { background: var(--line-2); }
.lp-search { position: relative; flex: 1; max-width: 460px; }
.lp-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.lp-search input { width: 100%; height: 42px; padding: 0 14px 0 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--slate-50); font-size: 14px; transition: all .15s; }
.lp-search input:focus { outline: 0; background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13,148,136,.12); }
.lp-search-pop { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 50; }
.lp-search-pop a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.lp-search-pop a:last-child { border-bottom: 0; }
.lp-search-pop a:hover, .lp-search-pop a.hl { background: var(--brand-50); }
.lp-search-pop small { color: var(--ink-2); display: block; }
.lp-top-gap { flex: 1; }
.lp-user { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.lp-user:hover { border-color: #cbd5e1; }
.lp-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #5eead4, #0d9488); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.lp-user-name { font-weight: 600; line-height: 1.1; font-size: 13px; }
.lp-user-role { font-size: 11px; color: var(--ink-2); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; font-size: 14px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--brand-50); color: var(--brand-700); }
.dropdown-item.text-danger:hover { background: var(--red-50); color: var(--red) !important; }

.lp-page { padding: 28px; flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; }
.lp-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.lp-crumbs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.lp-crumbs a { color: var(--ink-2); } .lp-crumbs a:hover { color: var(--brand-700); }
.lp-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.lp-sub { color: var(--ink-2); margin-top: 2px; }
.lp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lp-foot { padding: 18px 28px 26px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.lp-scrim { display: none; }

@media (max-width: 991.98px) {
  .lp-side { transform: translateX(-100%); }
  .lp-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .lp-main { margin-left: 0; }
  .lp-burger { display: inline-grid; }
  .lp-top { padding: 0 14px; }
  .lp-page { padding: 18px 14px; }
  .lp-scrim.show { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1035; }
  .lp-user-name, .lp-user-role { display: none; }
  .lp-title { font-size: 22px; }
}

/* ==========================================================================
   CARDS, STATS
   ========================================================================== */
.lp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.lp-card + .lp-card { margin-top: 18px; }
.lp-card-h { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lp-card-h h3, .lp-card-t { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 10px; margin: 0; }
.lp-card-h .i { color: var(--brand); }
.lp-card-b { padding: 20px; }
.lp-card-f { padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--slate-50); border-radius: 0 0 var(--r) var(--r); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.lp-note { font-size: 12.5px; color: var(--ink-2); }

.lp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1199.98px) { .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .lp-stats { grid-template-columns: 1fr; } }
.lp-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
a.lp-stat { color: inherit; transition: transform .15s, box-shadow .15s; }
a.lp-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.lp-stat-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; }
.lp-stat-ic .i { width: 22px; height: 22px; }
/* stat text blocks */
.lp-stat > span:last-child { min-width: 0; }
.lp-stat-value, .lp-stat-hint { display: block; }
.lp-stat-label { color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.lp-stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lp-stat-hint { font-size: 12px; color: var(--ink-3); }
.t-teal { background: var(--brand-50); color: var(--brand-600); } .t-blue { background: var(--blue-50); color: var(--blue); }
.t-green { background: var(--green-50); color: var(--green); } .t-amber { background: var(--amber-50); color: var(--amber); }
.t-red { background: var(--red-50); color: var(--red); } .t-purple { background: var(--purple-50); color: var(--purple); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn { font-weight: 600; border-radius: 10px; padding: 8px 16px; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.4; transition: all .15s; border-width: 1px; }
.btn:focus, .btn.focus { box-shadow: 0 0 0 4px rgba(13,148,136,.18); }
.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(13,148,136,.4); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary:not(:disabled):not(.disabled):active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-secondary, .btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover, .btn-light:hover, .btn-secondary:focus, .btn-light:focus { background: var(--slate-50); border-color: #cbd5e1; color: var(--ink); }
.btn-soft { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-700); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #be123c; border-color: #be123c; }
.btn-soft-danger { background: var(--red-50); border-color: #fecdd3; color: var(--red); }
.btn-soft-danger:hover { background: #ffe4e6; color: #be123c; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; border-color: #15803d; }
.btn-link { color: var(--brand-600); font-weight: 600; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn .spin { width: 16px; height: 16px; border-width: 2px; }

/* ==========================================================================
   FORMS
   ========================================================================== */
label, .lp-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; display: block; }
.req { color: var(--red); margin-left: 2px; }
.form-control, .custom-select {
  height: 42px; border-radius: 10px; border: 1px solid #d5dce6; background-color: #fff; color: var(--ink); font-size: 14px; padding: 0 13px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; padding: 10px 13px; }
.form-control::placeholder { color: #a3b0c2; }
.form-control:hover, .custom-select:hover { border-color: #b7c2d2; }
.form-control:focus, .custom-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13,148,136,.13); background-color: #fff; color: var(--ink); }
.form-control:disabled, .form-control[readonly] { background: var(--slate-50); color: var(--ink-2); }
.form-control-sm, .custom-select-sm { height: 34px; border-radius: 8px; font-size: 13px; padding: 0 10px; }
.custom-select { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-size: 16px; background-position: right 12px center; padding-right: 36px; }
.is-invalid, .ng-submitted .ng-invalid.ng-touched, .lp-err { border-color: var(--red) !important; }
.lp-field { margin-bottom: 16px; }
.lp-field .lp-help { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.lp-field .lp-error { font-size: 12px; color: var(--red); margin-top: 5px; display: flex; gap: 6px; align-items: center; }
.lp-form-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 6px 0 14px; display: flex; align-items: center; gap: 10px; }
.lp-form-sec::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.lp-input-ic { position: relative; }
.lp-input-ic .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.lp-input-ic .form-control { padding-left: 38px; }
.lp-prefix { display: flex; } .lp-prefix > span { display: grid; place-items: center; padding: 0 12px; background: var(--slate-50); border: 1px solid #d5dce6; border-right: 0; border-radius: 10px 0 0 10px; color: var(--ink-2); font-weight: 600; }
.lp-prefix > .form-control { border-radius: 0 10px 10px 0; }

/* segmented radio (gender, discount type ...) */
.lp-seg { display: inline-flex; background: var(--line-2); border-radius: 11px; padding: 3px; gap: 2px; }
.lp-seg label { margin: 0; padding: 7px 16px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-size: 13.5px; font-weight: 600; user-select: none; display: flex; align-items: center; gap: 6px; }
.lp-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lp-seg input:checked + span, .lp-seg label.on { background: #fff; color: var(--brand-700); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.lp-seg span { padding: 7px 16px; border-radius: 8px; display: block; }
.lp-seg label { padding: 0; }
.lp-seg input:focus-visible + span { outline: 2px solid var(--brand); }

/* combobox */
.lp-combo { position: relative; }
.lp-combo-box { position: relative; }
.lp-combo-box .form-control { padding-right: 56px; cursor: text; }
.lp-combo-ic { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; align-items: center; color: var(--ink-3); }
.lp-combo-ic button { border: 0; background: transparent; padding: 3px; border-radius: 6px; color: var(--ink-3); display: grid; place-items: center; }
.lp-combo-ic button:hover { background: var(--line-2); color: var(--ink); }
.lp-combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1060; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; padding: 6px; min-width: 200px; }
.lp-combo-item { padding: 9px 11px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.lp-combo-item small { color: var(--ink-3); white-space: nowrap; }
.lp-combo-item.hl, .lp-combo-item:hover { background: var(--brand-50); }
.lp-combo-item.sel { color: var(--brand-700); font-weight: 600; }
.lp-combo-empty { padding: 12px; color: var(--ink-3); text-align: center; }
.lp-combo.up .lp-combo-list { top: auto; bottom: calc(100% + 6px); }
.lp-combo-new { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 4px; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.lp-table-wrap { overflow-x: auto; }
@media (min-width: 1100px) { .lp-table-wrap { overflow: visible; } }
.lp-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.lp-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; padding: 12px 14px; background: var(--slate-50); border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; position: sticky; top: 0; }
.lp-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.lp-table tbody tr { transition: background .1s; }
.lp-table tbody tr:hover { background: #fafcfe; }
.lp-table tbody tr:last-child td { border-bottom: 0; }
.lp-table .r, .lp-table th.r { text-align: right; }
.lp-table .c, .lp-table th.c { text-align: center; }
.lp-table .nowrap { white-space: nowrap; }
.lp-table .lp-row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: .9; }
.lp-who { display: flex; align-items: center; gap: 12px; }
.lp-who .lp-avatar { width: 38px; height: 38px; font-size: 13px; flex: 0 0 auto; }
.lp-who b { font-weight: 600; display: block; line-height: 1.2; }
.lp-who small { color: var(--ink-2); white-space: nowrap; }
.lp-who > div { min-width: 0; }
.lp-clamp { max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.lp-link-row { cursor: pointer; }
.lp-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.lp-toolbar .lp-search-in { position: relative; flex: 1 1 260px; max-width: 380px; }
.lp-toolbar .lp-search-in .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.lp-toolbar .lp-search-in .form-control { padding-left: 38px; }
.lp-toolbar .lp-fl { width: 170px; }
.lp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.lp-chip:hover { border-color: #b7c2d2; color: var(--ink); }
.lp-chip.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }
.lp-chip b { margin-left: 6px; color: var(--ink-3); font-weight: 600; }
.lp-chip.on b { color: var(--brand-600); }

.lp-pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-2); gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; }
.lp-pager-btns { display: flex; gap: 4px; }
.lp-pager-btns button { min-width: 34px; height: 34px; border: 1px solid transparent; background: transparent; border-radius: 8px; font-weight: 600; color: var(--ink-2); padding: 0 8px; }
.lp-pager-btns button:hover:not(:disabled) { background: var(--line-2); }
.lp-pager-btns button.on { background: var(--brand); color: #fff; }
.lp-pager-btns button:disabled { opacity: .4; cursor: not-allowed; }

.lp-empty { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.lp-empty .lp-empty-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--line-2); color: var(--ink-3); display: grid; place-items: center; margin: 0 auto 14px; }
.lp-empty .lp-empty-ic .i { width: 30px; height: 30px; }
.lp-empty h4 { font-size: 16px; margin-bottom: 4px; }
.lp-skel td { padding: 16px; } .lp-skel i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 37%, #eef2f7 63%); background-size: 400% 100%; animation: lp-shine 1.3s infinite; }
@keyframes lp-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ==========================================================================
   BADGES / STATUS
   ========================================================================== */
.lp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.lp-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lp-badge.plain::before { display: none; }
.st-1 { background: var(--blue-50); color: var(--blue); }       /* placed */
.st-2 { background: var(--amber-50); color: var(--amber); }     /* pending */
.st-3 { background: var(--green-50); color: var(--green); }     /* completed */
.st-4 { background: var(--red-50); color: var(--red); }         /* failed */
.st-5 { background: #f1f5f9; color: #64748b; }                  /* cancelled */
.st-6 { background: var(--purple-50); color: var(--purple); }   /* delivered */
.b-teal { background: var(--brand-50); color: var(--brand-700); } .b-red { background: var(--red-50); color: var(--red); }
.b-green { background: var(--green-50); color: var(--green); } .b-gray { background: #f1f5f9; color: #64748b; } .b-amber { background: var(--amber-50); color: var(--amber); } .b-blue { background: var(--blue-50); color: var(--blue); }
.lp-progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.lp-progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.lp-money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.text-due { color: var(--red); font-weight: 650; } .text-ok { color: var(--green); } .text-muted { color: var(--ink-2) !important; }

/* ==========================================================================
   TOAST / LOADER / MODAL
   ========================================================================== */
.lp-toasts { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 36px); }
.lp-toast { background: #fff; border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; gap: 12px; animation: lp-in .25s ease; }
.lp-toast .i { margin-top: 2px; }
.lp-toast b { display: block; font-weight: 650; }
.lp-toast span { color: var(--ink-2); font-size: 13px; }
.lp-toast.ok { border-left-color: var(--green); } .lp-toast.ok .i { color: var(--green); }
.lp-toast.err { border-left-color: var(--red); } .lp-toast.err .i { color: var(--red); }
.lp-toast.info { border-left-color: var(--blue); } .lp-toast.info .i { color: var(--blue); }
@keyframes lp-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

.lp-loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3000; background: transparent; overflow: hidden; }
.lp-loadbar::after { content: ''; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, #14b8a6, transparent); animation: lp-load 1s infinite; }
@keyframes lp-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: lp-spin .7s linear infinite; }
.spin.dark { border-color: var(--line); border-top-color: var(--brand); }
@keyframes lp-spin { to { transform: rotate(360deg); } }

.modal-content { border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--line-2); padding: 18px 22px; align-items: center; }
.modal-title { font-size: 17px; font-weight: 650; }
.modal-header .close { padding: 8px; margin: -8px -8px -8px auto; border-radius: 8px; opacity: .6; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--line-2); background: var(--slate-50); padding: 14px 22px; gap: 8px; }
.modal-backdrop.show { opacity: .5; }

.lp-alert { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.lp-alert.warn { background: var(--amber-50); color: #92400e; } .lp-alert.info { background: var(--blue-50); color: #1e40af; }
.lp-alert.danger { background: var(--red-50); color: #9f1239; } .lp-alert.ok { background: var(--green-50); color: #166534; }

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.lp-grid { display: grid; gap: 18px; }
.lp-grid.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.lp-grid.g-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1099.98px) { .lp-grid.g-2-1, .lp-grid.g-1-1 { grid-template-columns: 1fr; } }
.lp-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 991.98px) { .lp-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-quick a { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; align-items: center; gap: 14px; color: var(--ink); font-weight: 600; transition: all .15s; }
.lp-quick a:hover { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13,148,136,.09); transform: translateY(-1px); color: var(--ink); }
.lp-quick small { display: block; color: var(--ink-2); font-weight: 400; }
.lp-chart { height: 240px; display: flex; align-items: flex-end; gap: 14px; padding: 8px 4px 0; }
.lp-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.lp-bar-col { width: 100%; max-width: 54px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #2dd4bf, #0d9488); min-height: 4px; position: relative; transition: height .5s ease; }
.lp-bar-col:hover { filter: brightness(1.08); }
.lp-bar-val { font-size: 11px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lp-bar-lbl { font-size: 12px; color: var(--ink-2); }
.lp-list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.lp-list-row:last-child { border-bottom: 0; }
.lp-rank { width: 28px; height: 28px; border-radius: 9px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }

/* ==========================================================================
   INVOICE BUILDER
   ========================================================================== */
.lp-inv { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1339.98px) { .lp-inv { grid-template-columns: 1fr; } .lp-inv .lp-sticky { position: static; } }
.lp-inv.lp-inv-wide { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 1499.98px) { .lp-inv.lp-inv-wide { grid-template-columns: 1fr; } }
.lp-sticky { position: sticky; top: calc(var(--top-h) + 18px); }
.lp-pt-card { display: flex; gap: 16px; align-items: center; padding: 16px 20px; }
.lp-pt-card .lp-avatar { width: 52px; height: 52px; font-size: 18px; border-radius: 16px; }
.lp-pt-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.lp-pt-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lp-sum-row { display: flex; justify-content: space-between; padding: 7px 0; color: var(--ink-2); }
.lp-sum-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.lp-sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; border-top: 1px dashed #cbd5e1; margin-top: 8px; }
.lp-sum-total span { font-weight: 600; } .lp-sum-total b { font-size: 28px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lp-due-box { margin-top: 12px; background: var(--amber-50); border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; font-weight: 600; }
.lp-due-box.ok { background: var(--green-50); border-color: #bbf7d0; color: #166534; }
.lp-test-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.lp-test-row:last-child { border-bottom: 0; }
.lp-test-row .lp-test-n { flex: 1; min-width: 0; }
.lp-test-row small { color: var(--ink-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-picker { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
@media (max-width: 767.98px) { .lp-picker { grid-template-columns: 1fr; } }
.lp-tests-pop { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin: 0 20px 18px; }
.lp-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-method { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-method .lp-chip { padding: 5px 12px; font-size: 12.5px; }

/* ==========================================================================
   REPORT ENTRY
   ========================================================================== */
.lp-res-group { border: 1px solid var(--line); border-radius: var(--r); background: #fff; margin-bottom: 16px; overflow: hidden; }
.lp-res-group > header { padding: 12px 18px; background: var(--slate-50); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp-res-group > header b { font-weight: 650; }
.lp-res-row { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(130px, 1fr) 90px minmax(120px, 1fr) 110px; gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.lp-res-row:last-child { border-bottom: 0; }
.lp-res-row.head { background: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; padding-top: 9px; padding-bottom: 9px; }
.lp-res-row .form-control { height: 38px; font-weight: 600; }
.lp-res-row .form-control.hi { border-color: #fb7185; background: var(--red-50); color: #9f1239; }
.lp-res-row .form-control.lo { border-color: #fbbf24; background: var(--amber-50); color: #92400e; }
.lp-res-row .form-control.nm { border-color: #86efac; background: var(--green-50); }
.lp-flag { font-weight: 700; font-size: 12px; }
.lp-flag.h { color: var(--red); } .lp-flag.l { color: var(--amber); } .lp-flag.n { color: var(--green); }
@media (max-width: 991.98px) {
  .lp-res-row { grid-template-columns: 1fr 1fr; }
  .lp-res-row.head { display: none; }
}

/* ==========================================================================
   LOGIN
   ========================================================================== */
.lp-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; }
.lp-auth-art { background: radial-gradient(1200px 600px at 10% -10%, #14b8a6 0, transparent 55%), radial-gradient(900px 500px at 110% 110%, #2563eb 0, transparent 55%), linear-gradient(160deg, #06202b, #0b1b2b); color: #dbe7f3; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.lp-auth-art::after { content: ''; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 80px rgba(255,255,255,.02), 0 0 0 160px rgba(255,255,255,.015); }
.lp-auth-art h1 { color: #fff; font-size: 38px; line-height: 1.15; letter-spacing: -.03em; max-width: 480px; }
.lp-auth-art p { max-width: 460px; color: #aebfd1; font-size: 16px; margin-top: 16px; }
.lp-auth-points { margin-top: 36px; display: grid; gap: 14px; }
.lp-auth-points div { display: flex; gap: 12px; align-items: center; color: #d3e0ee; }
.lp-auth-points .i { color: #5eead4; }
.lp-auth-form { display: grid; place-items: center; padding: 40px 24px; }
.lp-auth-box { width: 100%; max-width: 400px; }
.lp-auth-box h2 { font-size: 26px; letter-spacing: -.02em; }
@media (max-width: 991.98px) { .lp-auth { grid-template-columns: 1fr; } .lp-auth-art { display: none; } }

/* ==========================================================================
   PRINT DOCUMENTS (invoice / lab report)
   ========================================================================== */
.lp-doc-wrap { max-width: 860px; margin: 0 auto; }
.lp-doc { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 40px 44px; }
.lp-doc-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--brand); }
.lp-doc-brand { display: flex; gap: 14px; align-items: center; }
.lp-doc-brand .lp-brand-mark { width: 52px; height: 52px; border-radius: 15px; }
.lp-doc-brand h2 { font-size: 22px; } .lp-doc-brand p { margin: 2px 0 0; color: var(--ink-2); font-size: 12.5px; }
.lp-doc-title { text-align: right; } .lp-doc-title h3 { font-size: 20px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-700); }
.lp-doc-title p { margin: 2px 0 0; color: var(--ink-2); }
.lp-doc-info { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.lp-doc-info dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 5px 10px; }
.lp-doc-info dt { color: var(--ink-2); font-weight: 500; } .lp-doc-info dd { margin: 0; font-weight: 600; }
.lp-doc table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.lp-doc th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 9px 10px; background: var(--slate-50); border-bottom: 1px solid var(--line); }
.lp-doc td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); }
.lp-doc th.r, .lp-doc td.r { text-align: right; }
.lp-doc-total { margin-left: auto; width: 320px; margin-top: 16px; }
.lp-doc-total div { display: flex; justify-content: space-between; padding: 5px 0; }
.lp-doc-total .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 9px; font-size: 18px; font-weight: 700; }
.lp-doc-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 56px; color: var(--ink-2); font-size: 12.5px; }
.lp-sign { border-top: 1px solid #94a3b8; padding-top: 6px; min-width: 180px; text-align: center; }
.lp-stamp { display: inline-block; border: 2px solid; border-radius: 8px; padding: 2px 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-6deg); font-size: 15px; }
.lp-stamp.paid { color: var(--green); } .lp-stamp.due { color: var(--red); }
.lp-rep-group { margin-top: 20px; }
.lp-rep-group h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-700); padding-bottom: 6px; border-bottom: 1px solid var(--brand-100); }
.flag-h { color: var(--red); font-weight: 700; } .flag-l { color: var(--amber); font-weight: 700; }

@media print {
  body { background: #fff; font-size: 12px; }
  .lp-side, .lp-top, .lp-foot, .lp-page-head, .no-print, .lp-toasts, .lp-loadbar { display: none !important; }
  .lp-main { margin: 0 !important; } .lp-page { padding: 0 !important; max-width: none; }
  .lp-doc { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .lp-doc-wrap { max-width: none; }
  @page { margin: 14mm; }
}

/* misc */
.lp-spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lp-hr { height: 1px; background: var(--line-2); margin: 16px 0; border: 0; }
.mt-n1 { margin-top: -4px; }
.w-100px { width: 100px; } .w-140px { width: 140px; }
.lp-kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; } .lp-kv dt { color: var(--ink-2); font-weight: 500; } .lp-kv dd { margin: 0; font-weight: 600; }
