/* ==========================================================================
   SmartLAB – design system
   Layers on top of Bootstrap 5.3. Tokens first, then shell, components, motion.
   ========================================================================== */

:root {
    --pp-brand: #2563eb;
    --pp-brand-600: #1d4ed8;
    --pp-brand-50: #eff6ff;
    --pp-accent: #14b8a6;
    --pp-success: #16a34a;
    --pp-warning: #f59e0b;
    --pp-danger: #e11d48;
    --pp-info: #0ea5e9;

    --pp-ink: #0f172a;
    --pp-text: #334155;
    --pp-muted: #64748b;
    --pp-line: #e2e8f0;
    --pp-bg: #f1f5f9;
    --pp-surface: #ffffff;   /* cards, inputs, menus: themes change these (see "Themes") */
    --pp-surface-2: #f8fafc;
    --pp-surface-3: #f1f5f9;
    --pp-line-soft: #eef2f7;
    --pp-card: #ffffff;

    --pp-side: #0b1220;
    --pp-side-2: #111a2e;
    --pp-side-text: #94a3b8;
    --pp-side-w: 272px;

    --pp-radius: 14px;
    --pp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --pp-shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
    --pp-ease: cubic-bezier(.22, 1, .36, 1);

    --bs-primary: var(--pp-brand);
    --bs-primary-rgb: 37, 99, 235;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--pp-text);
    --bs-body-bg: var(--pp-bg);
    --bs-border-color: var(--pp-line);
    --bs-link-color: var(--pp-brand);
    --bs-link-hover-color: var(--pp-brand-600);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--bs-body-font-family);
    background: var(--pp-bg);
    color: var(--pp-text);
    font-size: .925rem;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--pp-ink); font-weight: 650; letter-spacing: -.01em; }
a { text-decoration: none; }
::selection { background: rgba(37, 99, 235, .18); }

/* ---------- Buttons ---------- */
.btn {
    border-radius: 10px;
    font-weight: 550;
    padding: .55rem 1.05rem;
    transition: transform .18s var(--pp-ease), box-shadow .18s var(--pp-ease), background-color .18s, border-color .18s;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-sm { padding: .32rem .7rem; border-radius: 8px; font-size: .8rem; }
.btn-primary {
    --bs-btn-bg: var(--pp-brand); --bs-btn-border-color: var(--pp-brand);
    --bs-btn-hover-bg: var(--pp-brand-600); --bs-btn-hover-border-color: var(--pp-brand-600);
    --bs-btn-active-bg: var(--pp-brand-600); --bs-btn-active-border-color: var(--pp-brand-600);
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 18px -8px rgba(37, 99, 235, .6); }
.btn-danger  { box-shadow: 0 6px 14px -8px rgba(225, 29, 72, .6); }
.btn-success { box-shadow: 0 6px 14px -8px rgba(22, 163, 74, .55); }
.btn-soft {
    background: var(--pp-brand-50); color: var(--pp-brand); border: 1px solid transparent;
}
.btn-soft:hover { background: #dbeafe; color: var(--pp-brand-600); }
.btn-icon {
    width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 9px;
}
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn .spin {
    width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%; display: inline-block; vertical-align: -.125em; margin-right: .45rem;
    animation: pp-spin .7s linear infinite;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--pp-line);
    background-color: var(--pp-surface);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--pp-brand);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
}
.form-floating > label { color: var(--pp-muted); }
.form-label, label { font-weight: 550; color: var(--pp-ink); font-size: .85rem; }
.form-floating > label, .form-check-label { font-weight: 450; }
.pp-req { color: var(--pp-danger); margin-inline-start: .2em; font-weight: 700; } /* required field */
.field-error { color: var(--pp-danger); font-size: .78rem; margin-top: .25rem; display: block; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pp-muted); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.6rem; }
/* Eye button on password boxes (partials/password-reveal): shows the typed password */
.pw-wrap { position: relative; }
.pw-wrap > .pw-input { padding-right: 2.9rem; background-image: none; }
.pw-toggle {
    position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); z-index: 5;
    width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    border: 0; border-radius: .5rem; background: transparent; color: var(--pp-muted);
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--pp-brand); background: rgba(37, 99, 235, .08); }

/* ---------- Shell ---------- */
.pp-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--pp-side-w); z-index: 1040;
    background: linear-gradient(180deg, var(--pp-side) 0%, var(--pp-side-2) 100%);
    color: var(--pp-side-text);
    display: flex; flex-direction: column;
    transition: transform .35s var(--pp-ease);
}
.pp-brand {
    display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.4rem 1rem;
    color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
}
.pp-usercard {
    margin: .5rem 1rem 1rem; padding: .8rem; border-radius: 12px;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06);
    display: flex; align-items: center; gap: .75rem;
}
.pp-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--pp-brand), #7c3aed); color: #fff; font-weight: 700;
}
.pp-usercard .name { color: #fff; font-weight: 600; font-size: .9rem; line-height: 1.2; }
.pp-usercard .meta { font-size: .75rem; }
.pp-role {
    display: inline-block; padding: .05rem .5rem; border-radius: 99px; font-size: .68rem; font-weight: 600;
    background: rgba(20, 184, 166, .16); color: #5eead4; margin-top: .15rem;
}
.pp-role.user { background: rgba(14, 165, 233, .16); color: #7dd3fc; }
.pp-nav { flex: 1; overflow-y: auto; padding: 0 .85rem 1rem; scrollbar-width: thin; scrollbar-color: #1e293b transparent; }
.pp-nav-label {
    font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    padding: 1rem .75rem .4rem; color: #475569;
}
.pp-link {
    display: flex; align-items: center; gap: .8rem; padding: .62rem .75rem; margin-bottom: 2px;
    border-radius: 10px; color: var(--pp-side-text); font-weight: 500; position: relative;
    transition: background .18s, color .18s, transform .18s var(--pp-ease);
}
.pp-link i.ico { width: 20px; text-align: center; font-size: 1rem; transition: color .18s, transform .25s var(--pp-ease); }
.pp-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.pp-link:hover i.ico { transform: scale(1.12); }
.pp-link.active { background: linear-gradient(90deg, rgba(37, 99, 235, .85), rgba(37, 99, 235, .45)); color: #fff; box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .9); }
.pp-link .chev { margin-left: auto; font-size: .7rem; transition: transform .25s var(--pp-ease); }
.pp-link[aria-expanded="true"] .chev { transform: rotate(90deg); }
.pp-sub { padding: .15rem 0 .35rem 2.15rem; }
.pp-sub a {
    display: block; padding: .42rem .75rem; border-radius: 8px; color: var(--pp-side-text); font-size: .86rem; position: relative;
}
.pp-sub a::before { content: ''; position: absolute; left: -.7rem; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: #334155; transform: translateY(-50%); transition: .18s; }
.pp-sub a:hover, .pp-sub a.active { color: #fff; }
.pp-sub a.active::before { background: var(--pp-accent); box-shadow: 0 0 0 4px rgba(20, 184, 166, .2); }
.pp-side-foot { padding: .9rem 1.4rem 1.1rem; font-size: .72rem; color: #475569; border-top: 1px solid rgba(255, 255, 255, .05); }

.pp-main { margin-left: var(--pp-side-w); min-height: 100vh; display: flex; flex-direction: column; }
.pp-topbar {
    position: sticky; top: 0; z-index: 1030; height: 68px; padding: 0 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    background: rgba(255, 255, 255, .82); backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--pp-line);
}
.pp-burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--pp-bg); color: var(--pp-ink); }
.pp-lab { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--pp-ink); min-width: 0; }
.pp-lab i { color: var(--pp-accent); }
.pp-lab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-kbd { font-size: .72rem; padding: .15rem .45rem; border: 1px solid var(--pp-line); border-bottom-width: 2px; border-radius: 6px; background: var(--pp-surface); color: var(--pp-muted); }
.pp-usermenu { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem .25rem .25rem; border-radius: 99px; border: 1px solid var(--pp-line); background: var(--pp-surface); color: var(--pp-ink); font-weight: 550; }
.pp-usermenu .pp-avatar { width: 34px; height: 34px; font-size: .85rem; }
.dropdown-menu { border: 1px solid var(--pp-line); border-radius: 12px; box-shadow: var(--pp-shadow); padding: .4rem; animation: pp-pop .18s var(--pp-ease); }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-weight: 500; }
.dropdown-item i { width: 1.4em; color: var(--pp-muted); }
.pp-content { padding: 1.5rem; flex: 1; }
.pp-footer { padding: 1rem 1.5rem; color: var(--pp-muted); font-size: .8rem; text-align: center; }
.pp-footer a { color: inherit; text-decoration: none; }
.pp-footer a:hover { color: var(--pp-brand); text-decoration: underline; }
.pp-backdrop { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); z-index: 1035; opacity: 0; transition: opacity .3s; }

@media (max-width: 991.98px) {
    .pp-sidebar { transform: translateX(-100%); box-shadow: none; }
    body.nav-open .pp-sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
    body.nav-open .pp-backdrop { display: block; opacity: 1; }
    .pp-main { margin-left: 0; }
    .pp-burger { display: grid; place-items: center; }
    .pp-topbar { padding: 0 1rem; }
    .pp-content { padding: 1rem; }
    .pp-hide-md { display: none !important; }
}

/* ---------- Page header ---------- */
.pp-page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pp-page-head .ttl { display: flex; align-items: center; gap: .9rem; }
.pp-page-head .ico {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; color: #fff;
    background: linear-gradient(135deg, var(--pp-brand), var(--pp-accent)); box-shadow: 0 10px 20px -10px var(--pp-brand);
}
.pp-page-head h1 { font-size: 1.35rem; margin: 0; }
.pp-page-head p { margin: 0; color: var(--pp-muted); font-size: .85rem; }

/* ---------- Cards ---------- */
.pp-card {
    background: var(--pp-card); border: 1px solid var(--pp-line); border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow-sm); padding: 1.35rem; margin-bottom: 1.25rem;
}
.pp-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pp-card-head h2 { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: .6rem; }
.pp-card-head h2 i { color: var(--pp-brand); }

.pp-stat {
    position: relative; overflow: hidden; background: var(--pp-card); border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius); padding: 1.2rem; display: flex; align-items: center; gap: 1rem; box-shadow: var(--pp-shadow-sm);
    transition: transform .3s var(--pp-ease), box-shadow .3s var(--pp-ease);
}
.pp-stat:hover { transform: translateY(-4px); box-shadow: var(--pp-shadow); }
.pp-stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--tone-soft); }
.pp-stat .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: var(--tone); flex: none; z-index: 1; box-shadow: 0 10px 18px -10px var(--tone); }
.pp-stat .num { font-size: 1.75rem; font-weight: 700; color: var(--pp-ink); line-height: 1.1; z-index: 1; }
.pp-stat .lbl { color: var(--pp-muted); font-size: .8rem; font-weight: 500; z-index: 1; }
.tone-blue   { --tone: #2563eb; --tone-soft: rgba(37, 99, 235, .09); }
.tone-teal   { --tone: #14b8a6; --tone-soft: rgba(20, 184, 166, .1); }
.tone-violet { --tone: #7c3aed; --tone-soft: rgba(124, 58, 237, .09); }
.tone-amber  { --tone: #f59e0b; --tone-soft: rgba(245, 158, 11, .11); }

.pp-hero {
    border-radius: 18px; padding: 1.6rem 1.7rem; color: #fff; position: relative; overflow: hidden; margin-bottom: 1.25rem;
    background: radial-gradient(900px 300px at 100% 0%, rgba(20, 184, 166, .55), transparent 60%), linear-gradient(120deg, #1e3a8a, #2563eb);
    box-shadow: 0 18px 40px -22px #1d4ed8;
}
.pp-hero h1 { color: #fff; font-size: 1.5rem; margin-bottom: .25rem; }
.pp-hero p { margin: 0; opacity: .85; }
.pp-hero .float-ico { position: absolute; right: 1.5rem; bottom: -1.2rem; font-size: 7rem; opacity: .12; animation: pp-float 6s ease-in-out infinite; }

.pp-quick { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-radius: 12px; border: 1px dashed var(--pp-line); color: var(--pp-ink); font-weight: 600; background: var(--pp-surface); transition: .25s var(--pp-ease); height: 100%; }
.pp-quick i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--pp-brand-50); color: var(--pp-brand); transition: .25s var(--pp-ease); }
.pp-quick small { display: block; font-weight: 450; color: var(--pp-muted); }
.pp-quick:hover { border-style: solid; border-color: var(--pp-brand); transform: translateY(-3px); box-shadow: var(--pp-shadow); color: var(--pp-ink); }
.pp-quick:hover i { background: var(--pp-brand); color: #fff; transform: rotate(-6deg) scale(1.06); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; vertical-align: middle; }
.table > thead th {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pp-muted); font-weight: 600;
    background: var(--pp-surface-2); border-bottom: 1px solid var(--pp-line); padding: .8rem 1rem; white-space: nowrap;
}
.table > thead th:first-child { border-top-left-radius: 10px; }
.table > thead th:last-child { border-top-right-radius: 10px; }
.table > tbody td { padding: .8rem 1rem; border-color: var(--pp-line-soft); }
.table-hover > tbody > tr { transition: background .15s; }
.table-hover > tbody > tr:hover { background: var(--pp-surface-2); --bs-table-hover-bg: var(--pp-surface-2); }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: var(--pp-surface-2); }
.row-in { animation: pp-fade-up .45s var(--pp-ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.pp-empty { text-align: center; padding: 2.5rem 1rem; color: var(--pp-muted); }
.pp-empty i { font-size: 2.4rem; display: block; margin-bottom: .6rem; color: #cbd5e1; }

.badge-soft { padding: .35rem .65rem; border-radius: 99px; font-weight: 600; font-size: .72rem; display: inline-flex; white-space: nowrap; align-items: center; gap: .35rem; }
.badge-soft.green  { background: #dcfce7; color: #15803d; }
.badge-soft.amber  { background: #fef3c7; color: #b45309; }
.badge-soft.blue   { background: #dbeafe; color: #1d4ed8; }
.badge-soft.rose   { background: #ffe4e6; color: #be123c; }
.badge-soft.slate  { background: var(--pp-surface-3); color: #475569; }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .45); overflow: hidden; }
.modal.fade .modal-dialog { transform: translateY(24px) scale(.97); transition: transform .35s var(--pp-ease), opacity .25s; }
.modal.show .modal-dialog { transform: none; }
.modal-header, .modal-footer { border-color: var(--pp-line); }
.modal-title { font-weight: 650; }
.pp-confirm-ico { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 1.6rem; background: #ffe4e6; color: var(--pp-danger); animation: pp-pop .4s var(--pp-ease); }

/* ---------- Toasts (partials/toasts.blade.php) ---------- */
#toast-container, #toast-container.toast-top-right { position: fixed; z-index: 99999; padding: 0; top: 1rem; right: 1.25rem; }
#toast-container > .toast { display: block; max-width: none; }
#toast-container .toast-close-button { background: transparent; border: 0; padding: 0; cursor: pointer; line-height: 1; }
#toast-container > .toast {
    --c: var(--pp-info);
    width: min(380px, calc(100vw - 2.5rem)); margin: 0 0 .75rem; padding: 1rem 2.4rem 1rem 4.3rem;
    background: var(--pp-surface) !important; background-image: none !important; color: var(--pp-text);
    border: 1px solid var(--pp-line); border-left: 4px solid var(--c); border-radius: 14px;
    box-shadow: 0 22px 44px -18px rgba(15, 23, 42, .35) !important; opacity: 1; position: relative; overflow: hidden;
    font-family: var(--bs-body-font-family); font-size: .85rem; animation: pp-toast-in .55s var(--pp-ease) both;
}
#toast-container > .toast:hover { box-shadow: 0 26px 50px -18px rgba(15, 23, 42, .45) !important; opacity: 1; }
#toast-container > div::before {
    font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem;
    color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); animation: pp-pop .5s .1s var(--pp-ease) both;
}
#toast-container > .toast.toast-success { --c: var(--pp-success); } #toast-container > .toast-success::before { content: '\f00c'; box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); animation: pp-pop .5s .1s var(--pp-ease) both, pp-ring 1.2s .3s ease-out 1; }
#toast-container > .toast.toast-error   { --c: var(--pp-danger); }  #toast-container > .toast-error::before   { content: '\f00d'; }
#toast-container > .toast.toast-warning { --c: var(--pp-warning); } #toast-container > .toast-warning::before { content: '\f071'; }
#toast-container > .toast.toast-info    { --c: var(--pp-info); }    #toast-container > .toast-info::before    { content: '\f129'; }
#toast-container .toast-title { font-weight: 650; color: var(--pp-ink); font-size: .92rem; line-height: 1.25; }
#toast-container .toast-message { color: var(--pp-muted); margin-top: .1rem; word-wrap: break-word; }
#toast-container .toast-close-button { position: absolute; right: .75rem; top: .55rem; color: #94a3b8; text-shadow: none; opacity: 1; font-size: 1.2rem; font-weight: 400; }
#toast-container .toast-close-button:hover { color: var(--pp-ink); }
#toast-container .toast-progress { height: 3px; background: var(--c); opacity: .55; bottom: 0; }
@media (max-width: 575.98px) { #toast-container { right: .75rem; left: .75rem; top: .75rem; } #toast-container > .toast { width: auto; } }

/* ---------- Misc ---------- */
.pp-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--pp-brand); color: #fff; box-shadow: 0 12px 22px -10px var(--pp-brand); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .3s var(--pp-ease); z-index: 1000; }
.pp-top.show { opacity: 1; transform: none; pointer-events: auto; }
.pp-top:hover { transform: translateY(-3px); }
#pp-preload { position: fixed; inset: 0; z-index: 3000; background: var(--pp-surface); display: grid; place-items: center; transition: opacity .4s, visibility .4s; }
#pp-preload.done { opacity: 0; visibility: hidden; }
#pp-preload .ring { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #e2e8f0; border-top-color: var(--pp-brand); animation: pp-spin .8s linear infinite; }
.pp-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 3100; background: linear-gradient(90deg, var(--pp-brand), var(--pp-accent)); transition: width .4s var(--pp-ease); }

.anim { animation: pp-fade-up .6s var(--pp-ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
/* "backwards", not "both": once it has faded in, a block keeps no transform. A kept transform made the Print menu in a
   table (.table-responsive) belong to the card, so phones (Safari / iPhone) cut it off below the table. Lift the block
   with an open menu above the blocks after it. */
.anim:has(.dropdown-menu.show), .row-in:has(.dropdown-menu.show) { position: relative; z-index: 1050; }

/* ---------- Auth pages ---------- */
.pp-auth { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; position: relative; overflow: hidden;
    background: radial-gradient(800px 500px at 10% 0%, rgba(37, 99, 235, .18), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(20, 184, 166, .2), transparent 60%), var(--pp-bg); }
.pp-auth-card { width: 100%; max-width: 940px; background: var(--pp-surface); border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .35); display: grid; grid-template-columns: 1fr 1fr; animation: pp-zoom-in .7s var(--pp-ease) both; }
.pp-auth-art { position: relative; color: #fff; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; min-height: 480px;
    background: linear-gradient(160deg, rgba(15, 23, 42, .55), rgba(30, 58, 138, .82)), url('../img/lab.jpg') center/cover;
    /* 70 KB WebP instead of the 172 KB JPEG where supported (browsers without image-set keep the line above) */
    background: linear-gradient(160deg, rgba(15, 23, 42, .55), rgba(30, 58, 138, .82)), image-set(url('../img/lab.webp') type('image/webp'), url('../img/lab.jpg') type('image/jpeg')) center/cover; }
.pp-auth-art h2 { color: #fff; font-size: 1.7rem; line-height: 1.2; }
.pp-auth-art ul { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.pp-auth-art li { margin-bottom: .6rem; display: flex; gap: .6rem; align-items: center; opacity: .92; }
.pp-auth-art li i { color: #5eead4; }
.pp-auth-form { padding: 2.5rem; align-self: center; }
.pp-auth-form h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.pp-auth-form .sub { color: var(--pp-muted); margin-bottom: 1.4rem; }
@media (max-width: 767.98px) {
    .pp-auth-card { grid-template-columns: 1fr; max-width: 460px; }
    .pp-auth-art { display: none; }
    .pp-auth-form { padding: 1.75rem; }
}

/* ---------- Motion ---------- */
@keyframes pp-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pp-zoom-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes pp-pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@keyframes pp-float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-14px) rotate(-4deg); } }
@keyframes pp-draw { to { stroke-dashoffset: 0; } }
@keyframes pp-ring { to { box-shadow: 0 0 0 16px rgba(22, 163, 74, 0); } }
@keyframes pp-bar { to { transform: scaleX(0); } }
@keyframes pp-toast-in { from { opacity: 0; transform: translateX(60px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pp-toast-out { to { opacity: 0; transform: translateX(60px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 575.98px) {
    .pp-toasts { top: .75rem; right: .75rem; left: .75rem; width: auto; }
    .pp-page-head h1 { font-size: 1.15rem; }
    .pp-stat .num { font-size: 1.45rem; }
    .pp-stat { padding: .9rem; gap: .65rem; } /* two tiles side by side: room for "Rs 525.00" */
    .pp-card { padding: 1rem; }
}

/* Make dense tables usable on phones */
@media (max-width: 767.98px) {
    .table-responsive { border-radius: 10px; }
    .table > tbody td, .table > thead th { padding: .65rem .75rem; }
}
/* Phones: wide tables scroll sideways instead of squeezing names to one word per line */
@media (max-width: 575.98px) {
    .table-responsive > .table:not(.pp-stack) { min-width: 600px; }
    .table-responsive > .table:not(.pp-stack) > tbody td.fw-semibold { min-width: 10rem; } /* names: at most two lines */
}

/* Activity log: on phones each change is one block (when, what, change, by) instead of a squeezed table */
.pp-activity > tbody td { vertical-align: top; }
@media (max-width: 767.98px) {
    .pp-activity > thead { display: none; }
    .pp-activity > tbody > tr { display: block; padding: .6rem .25rem; border-bottom: 1px solid var(--bs-border-color); }
    .pp-activity > tbody > tr > td { display: block; border: 0; padding: .15rem .5rem; }
    .pp-activity > tbody > tr > td:first-child { font-size: .8rem; color: var(--bs-secondary-color); }
}

/* Business reports: on phones each row is one block, the name on top and "label  value" lines under it */
.pp-fig-label { display: none; }
@media (max-width: 767.98px) {
    .pp-figures > thead { display: none; }
    .pp-figures > tbody > tr, .pp-figures > tfoot > tr { display: block; padding: .55rem .25rem; border-bottom: 1px solid var(--bs-border-color); }
    .pp-figures > tbody > tr > td, .pp-figures > tfoot > tr > td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .12rem .5rem; }
    .pp-figures > tbody > tr > td:first-child, .pp-figures > tfoot > tr > td:first-child { display: block; padding-bottom: .3rem; }
    .pp-figures .pp-fig-label { display: inline; color: var(--bs-secondary-color); font-weight: 400; white-space: normal; text-align: start; }
}

html[dir="rtl"] .pp-dir { transform: scaleX(-1); } /* previous / next arrows point the reading way */

/* ---------- Workflow stepper ---------- */
.pp-steps { display: flex; gap: .5rem; margin-bottom: 1.25rem; padding: 0; list-style: none; counter-reset: s; }
.pp-step { flex: 1; min-width: 0; }
.pp-step a, .pp-step span.s {
    display: flex; align-items: center; gap: .65rem; padding: .7rem .9rem; border-radius: 12px;
    background: var(--pp-surface); border: 1px solid var(--pp-line); color: var(--pp-muted); font-weight: 600; font-size: .85rem;
    transition: .25s var(--pp-ease);
}
.pp-step .n {
    width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .78rem;
    background: var(--pp-bg); color: var(--pp-muted); transition: .25s var(--pp-ease);
}
.pp-step .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-step.done .n { background: #dcfce7; color: var(--pp-success); }
.pp-step.done a { color: var(--pp-ink); }
.pp-step.active a, .pp-step.active span.s { border-color: var(--pp-brand); color: var(--pp-brand); background: var(--pp-brand-50); box-shadow: 0 8px 18px -12px var(--pp-brand); }
.pp-step.active .n { background: var(--pp-brand); color: #fff; animation: pp-pop .45s var(--pp-ease); }
.pp-step a:hover { transform: translateY(-2px); }
@media (max-width: 767.98px) {
    .pp-step .t { display: none; }
    .pp-step.active .t { display: block; }
    .pp-step { flex: 0 0 auto; }
    .pp-step.active { flex: 1; }
}

/* Sticky action bar (assign step) */
.pp-sticky-bar {
    position: sticky; bottom: 1rem; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: rgba(15, 23, 42, .94); color: #fff; border-radius: 16px; padding: .85rem 1.1rem;
    box-shadow: 0 20px 40px -18px rgba(15, 23, 42, .7); backdrop-filter: blur(8px);
}
.pp-sticky-bar .sum b { font-size: 1.15rem; }
.pp-pick { cursor: pointer; transition: background .15s; }
.pp-pick.picked { background: var(--pp-brand-50) !important; }
.pp-pick.assigned { opacity: .6; }
.form-check-input:checked { background-color: var(--pp-brand); border-color: var(--pp-brand); }
.form-check-input { width: 1.15rem; height: 1.15rem; cursor: pointer; }

/* Result entry */
/* ".pp-app" so these beat ".pp-app .form-control" (line ~808), which reset the result colours. */
.res-input.critical, .pp-app .res-input.critical { border: 2px solid #b91c1c; background: #fee2e2; color: #991b1b; font-weight: 700; }
.res-crit-note { color: #fca5a5; font-weight: 700; font-size: .85rem; } /* inside the dark sticky bar */
.res-input.low, .res-input.high, .pp-app .res-input.low, .pp-app .res-input.high { border-color: var(--pp-danger); background: #fff1f2; color: #be123c; font-weight: 600; }
.res-input.ok, .pp-app .res-input.ok { border-color: #86efac; background: #f0fdf4; }
/* Enter Results: comment under each test (printed under the test). */
.res-comment { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--pp-line); }
.res-comment .c-pick { width: auto; max-width: 100%; flex: 1 1 12rem; }
.res-comment textarea { field-sizing: content; min-height: 2.2rem; max-height: 10rem; }
/* Enter Results: the patient's last result under the box (Lab Profile switch). */
.res-prev { font-size: .78rem; color: var(--pp-muted); margin-top: .2rem; white-space: nowrap; }
.res-prev b { color: var(--pp-ink); font-weight: 600; }
.res-flag { font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.group-card > summary { list-style: none; cursor: pointer; }
.group-card > summary::-webkit-details-marker { display: none; }
.group-card[open] .chev-d { transform: rotate(180deg); }
.chev-d { transition: transform .25s var(--pp-ease); }
.pp-progress-mini { height: 6px; border-radius: 99px; background: var(--pp-line); overflow: hidden; min-width: 90px; }
.pp-progress-mini > i { display: block; height: 100%; background: linear-gradient(90deg, var(--pp-brand), var(--pp-accent)); transition: width .3s var(--pp-ease); }

/* ---------- Display scale: the UI renders like the browser is zoomed to 80% ----------
   Zoom is applied to the content blocks, never to <html>: viewport-sized overlays (modal backdrop,
   loader, toasts) then keep their true full-screen size.
   Staff pages (html.pp-app) no longer use it: they render with a 15px base on phones and tablets and 13.5px (like
   90% zoom) on computers (see "New look" and the last block of this file). */
html:not(.pp-app) :is(.modal-dialog, #toast-container), .pp-top, .pp-auth-card, .pp-lock-card { zoom: .8; }
html.pp-app .pp-top { zoom: 1; }
.modal-backdrop.show { opacity: .45; }
@supports not (zoom: 1) { html:not(.pp-app) { font-size: 80%; } }

/* ---------- Subscription banner & owner / finance extras ---------- */
.pp-sub-banner {
    display: flex; gap: .85rem; align-items: center; margin: 1rem 1.5rem 0; padding: .8rem 1rem; border-radius: 12px;
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e; animation: pp-fade-up .5s var(--pp-ease) both;
}
.pp-sub-banner > i { font-size: 1.2rem; color: var(--pp-warning); animation: pp-float 3s ease-in-out infinite; }
@media (max-width: 991.98px) { .pp-sub-banner { margin: .75rem 1rem 0; } }

.bar-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .55rem; font-size: .82rem; }
.bar-row .lbl { width: 90px; flex: none; color: var(--pp-muted); }
.bar-row .track { flex: 1; height: 9px; border-radius: 99px; background: var(--pp-bg); overflow: hidden; }
.bar-row .track > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pp-brand), var(--pp-accent)); animation: pp-grow .9s var(--pp-ease) both; transform-origin: left; }
.bar-row .val { width: 90px; text-align: right; font-weight: 600; color: var(--pp-ink); }
@keyframes pp-grow { from { transform: scaleX(0); } to { transform: none; } }

.chart-cols { display: flex; align-items: flex-end; gap: .6rem; height: 150px; }
.chart-cols .col-b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .35rem; }
.chart-cols .col-b i { width: 100%; max-width: 38px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--pp-accent), var(--pp-brand)); animation: pp-rise .8s var(--pp-ease) both; transform-origin: bottom; min-height: 3px; }
.chart-cols small { color: var(--pp-muted); font-size: .7rem; }
@keyframes pp-rise { from { transform: scaleY(0); } to { transform: none; } }

.pp-bill-line { display: flex; justify-content: space-between; gap: .75rem; padding: .35rem 0; font-size: .85rem; }
.pp-bill-line.total { border-top: 1px dashed var(--pp-line); margin-top: .35rem; padding-top: .6rem; font-weight: 700; color: var(--pp-ink); }
.pp-balance { border-radius: 12px; padding: .9rem 1rem; text-align: center; font-weight: 700; }
.pp-balance.paid { background: #dcfce7; color: #15803d; }
.pp-balance.due { background: #fff1f2; color: #be123c; }
.pp-balance small { display: block; font-weight: 500; opacity: .8; }
/* Take payment: how the patient paid (one tap), three per row; EasyPaisa / JazzCash / bank ask for the TID */
.pp-pay-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.pp-pay-method { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 54px;
    padding: .4rem .25rem; border: 1px solid var(--pp-line); border-radius: 12px; background: var(--pp-surface, #fff); color: var(--pp-text);
    font-size: .78rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.pp-pay-method i { flex-shrink: 0; font-size: 1rem; color: var(--pp-muted); }
.pp-pay-method:hover { border-color: var(--pp-brand); color: var(--pp-brand); }
.btn-check:checked + .pp-pay-method { border-color: var(--pp-brand); background: var(--pp-brand-50); color: var(--pp-brand-600); box-shadow: 0 0 0 2px var(--pp-brand) inset; }
.btn-check:checked + .pp-pay-method i { color: var(--pp-brand); }
.btn-check:focus-visible + .pp-pay-method { outline: 2px solid var(--pp-brand); outline-offset: 2px; }
.pp-pay-quick summary { cursor: pointer; list-style: none; }
.pp-pay-quick summary::-webkit-details-marker { display: none; }
.pp-pay-quick .pp-pay-form { max-width: 560px; }
.pp-pay-to { background: var(--pp-brand-50); color: var(--pp-ink); border-radius: 10px; padding: .45rem .65rem; }
html.pp-app[data-theme="night"] .btn-check:checked + .pp-pay-method,
html.pp-app[data-theme="night"] .pp-pay-to { background: rgba(37, 99, 235, .16); color: #bfdbfe; }

/* Expired / suspended page */
.pp-lock { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem;
    background: radial-gradient(700px 400px at 0% 0%, rgba(225, 29, 72, .12), transparent 60%), radial-gradient(700px 400px at 100% 100%, rgba(245, 158, 11, .16), transparent 60%), var(--pp-bg); }
.pp-lock-card { width: 100%; max-width: 520px; background: var(--pp-surface); border-radius: 22px; padding: 2.2rem; text-align: center; box-shadow: 0 40px 80px -30px rgba(15, 23, 42, .35); animation: pp-zoom-in .6s var(--pp-ease) both; }
.pp-lock-ico { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1.2rem; display: grid; place-items: center; font-size: 2rem; color: var(--pp-danger); background: #ffe4e6; animation: pp-pop .6s var(--pp-ease) both, pp-ring-r 2s 1s ease-out infinite; }
@keyframes pp-ring-r { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .35); } 100% { box-shadow: 0 0 0 22px rgba(225, 29, 72, 0); } }
.pp-lock .due { background: var(--pp-bg); border-radius: 14px; padding: 1rem; margin: 1.2rem 0; }
.pp-lock .due b { font-size: 1.7rem; color: var(--pp-ink); display: block; }


/* Action column that stays visible while a wide table scrolls sideways */
.table .sticky-act { position: sticky; right: 0; z-index: 2; background: var(--pp-surface); box-shadow: -10px 0 14px -12px rgba(15, 23, 42, .35); }
.table thead .sticky-act { background: var(--pp-surface-2); }
.table-hover > tbody > tr:hover > .sticky-act { background: var(--pp-surface-2); }
.table .sticky-act .btn { white-space: nowrap; }

/* ---------- Login tabs ---------- */
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .3rem; background: var(--pp-bg); border-radius: 12px; margin-bottom: 1.25rem; }
.login-tab { border: 0; background: transparent; padding: .6rem .5rem; border-radius: 9px; font-weight: 600; font-size: .86rem; color: var(--pp-muted); transition: .25s var(--pp-ease); }
.login-tab.active { background: var(--pp-surface); color: var(--pp-brand); box-shadow: var(--pp-shadow-sm); }
.login-pane { animation: pp-fade-up .4s var(--pp-ease) both; }

/* ---------- Patient portal ---------- */
.po-top { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--pp-line); zoom: .8; }
.po-top .in { max-width: 1280px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1.5rem; }
.po-brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; color: var(--pp-ink); letter-spacing: -.02em; }
.po-brand .sl-logo { height: 40px; }
@media (max-width: 575.98px) { .po-brand .sl-logo { height: 34px; } }
.po-nav { display: flex; gap: .3rem; margin-left: 1rem; }
.po-nav a { padding: .5rem .9rem; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--pp-muted); transition: .2s; }
.po-nav a:hover { background: var(--pp-bg); color: var(--pp-ink); } .po-nav a.active { background: var(--pp-brand-50); color: var(--pp-brand); }
.po-wrap { max-width: 1280px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; zoom: .8; min-height: calc(100vh / .8 - 70px); }
@media (max-width: 720px) { .po-top .in { flex-wrap: wrap; gap: .5rem 1rem; } .po-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; } .po-nav a { flex: 1; text-align: center; white-space: nowrap; } .po-hide { display: none; } }

.visit { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; border: 1px solid var(--pp-line); border-radius: 16px; background: var(--pp-surface); margin-bottom: .85rem; transition: transform .3s var(--pp-ease), box-shadow .3s var(--pp-ease), border-color .3s; }
.visit:hover { transform: translateY(-3px); box-shadow: var(--pp-shadow); border-color: #cbd5e1; }
.visit .ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.3rem; background: var(--pp-brand-50); color: var(--pp-brand); }
.visit.ok .ic { background: #dcfce7; color: #16a34a; } .visit.lock .ic { background: #fef3c7; color: #d97706; }
.visit .lab { font-weight: 700; color: var(--pp-ink); } .visit .when { font-size: .8rem; color: var(--pp-muted); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; } .chips span { background: var(--pp-bg); color: var(--pp-text); border-radius: 99px; padding: .15rem .65rem; font-size: .75rem; font-weight: 500; }
@media (max-width: 640px) { .visit { grid-template-columns: auto 1fr; } .visit .acts { grid-column: 1 / -1; } .visit .acts .btn { width: 100%; } }
/* Owner → Trials to follow up: several small buttons per lab, so they wrap side by side on phones. */
@media (max-width: 640px) { .trial-row .acts { justify-content: flex-start !important; } .trial-row .acts .btn { width: auto; } }
.lockbox { text-align: center; padding: 2.4rem 1rem; } .lockbox .big { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center; background: #fef3c7; color: #d97706; font-size: 1.8rem; animation: pp-pop .6s var(--pp-ease) both; }

/* ---------- Notification bell + trial banner ---------- */
.pp-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pp-line); background: var(--pp-surface); color: var(--pp-ink); display: grid; place-items: center; transition: .2s; }
.pp-bell:hover { background: var(--pp-bg); }
.pp-bell .dot { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--pp-danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; animation: pp-pop .5s var(--pp-ease) both; }
.pp-sub-banner.pp-trial { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.pp-sub-banner.pp-trial > i { color: var(--pp-brand); }
.pp-sub-banner.pp-grace-banner { background: #fef2f2; border-color: #fecaca; color: #991b1b; flex-wrap: wrap; }
.pp-sub-banner.pp-grace-banner > i { color: #dc2626; flex-shrink: 0; }
.pp-sub-banner.pp-profile-banner { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; flex-wrap: wrap; }
.pp-sub-banner.pp-profile-banner > i { color: var(--pp-brand); flex-shrink: 0; }
.pp-sub-banner.pp-profile-banner > div { min-width: 12rem; }
.pp-pay-to { display: flex; flex-wrap: wrap; gap: .5rem; }
.pp-pay-to > div { flex: 1 1 200px; border: 1px solid var(--pp-line); border-radius: 12px; padding: .6rem .8rem; background: var(--pp-surface); }
.pp-pay-to small { display: block; color: var(--pp-muted); }
.pp-pay-to b { font-size: .95rem; overflow-wrap: anywhere; }
.pp-plan-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.pp-plan-pick label { flex: 1 1 140px; border: 1px solid var(--pp-line); border-radius: 12px; padding: .55rem .75rem; cursor: pointer; }
.pp-plan-pick input:checked + span { color: var(--pp-brand); font-weight: 600; }
.notice-item { display: flex; gap: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--pp-line); border-radius: 14px; margin-bottom: .75rem; background: var(--pp-surface); }
.notice-item.new { border-color: #bfdbfe; background: #f8fbff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .06); }
.notice-item .ni { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--pp-brand-50); color: var(--pp-brand); }
.notice-item.t-warning .ni, .notice-item.t-stock .ni { background: #fef3c7; color: #d97706; } .notice-item.t-success .ni { background: #dcfce7; color: #16a34a; }
.notice-item.t-billing .ni { background: #fee2e2; color: #dc2626; }
.pp-bell-chat { display: flex; align-items: center; gap: .5rem; white-space: normal; }
.pp-bell-chat i { flex-shrink: 0; }
.pp-bell-chat .badge { flex-shrink: 0; margin-inline-start: auto; }

/* ---------- Chat ---------- */
.chat-shell { display: grid; grid-template-columns: 300px 1fr; background: var(--pp-surface); border: 1px solid var(--pp-line); border-radius: var(--pp-radius); box-shadow: var(--pp-shadow-sm); overflow: hidden; height: calc(100vh / .8 - 250px); min-height: 460px; }
.chat-list { border-right: 1px solid var(--pp-line); overflow-y: auto; background: var(--pp-surface-2); }
.chat-item { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; color: var(--pp-text); border-bottom: 1px solid var(--pp-surface-3); transition: background .15s; cursor: pointer; }
.chat-item:hover { background: var(--pp-surface-3); } .chat-item.active { background: var(--pp-brand-50); box-shadow: inset 3px 0 0 var(--pp-brand); }
.chat-item .ci, .chat-head .ci { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--pp-brand-50); color: var(--pp-brand); flex: none; }
.chat-item .cb { flex: 1; min-width: 0; } .chat-item b, .chat-head b { color: var(--pp-ink); display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item small, .chat-head small { color: var(--pp-muted); display: block; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; min-width: 0; background: linear-gradient(180deg, var(--pp-surface-2), var(--pp-surface-3)); }
.chat-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; background: var(--pp-surface); border-bottom: 1px solid var(--pp-line); }
.chat-feed { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; scroll-behavior: smooth; }
.chat-day { text-align: center; font-size: .72rem; color: var(--pp-muted); margin: .8rem 0; } .chat-day::before, .chat-day::after { content: ''; display: inline-block; width: 40px; height: 1px; background: var(--pp-line); vertical-align: middle; margin: 0 .6rem; }
.chat-msg { display: flex; margin-bottom: .45rem; animation: pp-fade-up .3s var(--pp-ease) both; } .chat-msg.mine { justify-content: flex-end; }
.bubble { max-width: min(520px, 82%); padding: .55rem .8rem; border-radius: 16px; background: var(--pp-surface); border: 1px solid var(--pp-line); font-size: .9rem; word-wrap: break-word; }
.chat-msg.mine .bubble { background: var(--pp-brand); color: #fff; border-color: var(--pp-brand); border-bottom-right-radius: 5px; } .chat-msg.theirs .bubble { border-bottom-left-radius: 5px; }
.bubble b { display: block; font-size: .74rem; color: var(--pp-brand); margin-bottom: .1rem; } .bubble p { margin: 0; white-space: pre-wrap; } .bubble small { display: block; text-align: right; opacity: .65; font-size: .66rem; margin-top: .15rem; }
.bubble img { max-width: 100%; max-height: 260px; border-radius: 10px; display: block; margin-bottom: .3rem; }
.chat-compose { display: flex; align-items: flex-end; gap: .5rem; padding: .7rem .9rem; background: var(--pp-surface); border-top: 1px solid var(--pp-line); flex-wrap: wrap; }
.chat-compose textarea { flex: 1; resize: none; border: 1px solid var(--pp-line); border-radius: 12px; padding: .55rem .8rem; min-height: 42px; max-height: 120px; font: inherit; }
.chat-compose textarea:focus { outline: 0; border-color: var(--pp-brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.chat-attach { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--pp-bg); color: var(--pp-muted); cursor: pointer; margin: 0; } .chat-attach:hover { color: var(--pp-brand); }
.chat-picname { width: 100%; font-size: .78rem; color: var(--pp-muted); }
@media (max-width: 760px) { .chat-shell { grid-template-columns: 1fr; height: auto; } .chat-list { max-height: 190px; border-right: 0; border-bottom: 1px solid var(--pp-line); } .chat-main { height: 60vh; } }

.forum-img { max-width: min(100%, 520px); max-height: 380px; border-radius: 12px; border: 1px solid var(--pp-line); display: block; margin-top: .25rem; }
.flex-none { flex: none; }

/* ---------- Language switcher ---------- */
.pp-lang { height: 40px; padding: 0 .85rem; border-radius: 99px; border: 1px solid var(--pp-line); background: var(--pp-surface); color: var(--pp-ink); font-weight: 600; font-size: .84rem; display: inline-flex; align-items: center; gap: .45rem; transition: .2s; }
.pp-lang:hover { background: var(--pp-bg); border-color: var(--pp-brand); color: var(--pp-brand); }

/* ---------- Urdu (right-to-left) ---------- */
html[dir="rtl"] body, html[dir="rtl"] .form-control, html[dir="rtl"] .form-select, html[dir="rtl"] .btn, html[dir="rtl"] textarea { font-family: 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif; }
html[dir="rtl"] body { font-size: 1rem; line-height: 1.7; }
html[dir="rtl"] .pp-sidebar { left: auto; right: 0; }
html[dir="rtl"] .pp-main { margin-left: 0; margin-right: var(--pp-side-w); }
html[dir="rtl"] .pp-link.active { background: linear-gradient(270deg, rgba(37, 99, 235, .85), rgba(37, 99, 235, .45)); }
html[dir="rtl"] .pp-link .chev { margin-left: 0; margin-right: auto; transform: scaleX(-1); }
html[dir="rtl"] .pp-link[aria-expanded="true"] .chev { transform: scaleX(-1) rotate(90deg); }
html[dir="rtl"] .pp-sub { padding: .15rem 2.15rem .35rem 0; }
html[dir="rtl"] .pp-sub a::before { left: auto; right: -.7rem; }
html[dir="rtl"] .input-icon > i { left: auto; right: 14px; }
html[dir="rtl"] .input-icon > .form-control { padding-left: .75rem; padding-right: 2.6rem; }
html[dir="rtl"] .pw-toggle { right: auto; left: .35rem; }
html[dir="rtl"] .pw-wrap > .pw-input { padding-left: 2.9rem; }
html[dir="rtl"] .form-floating.pw-wrap > .pw-input { padding-right: .75rem; }
html[dir="rtl"] .pp-stat::after, html[dir="rtl"] .pp-hero .float-ico { right: auto; left: -30px; }
html[dir="rtl"] .pp-hero .float-ico { left: 1.5rem; }
html[dir="rtl"] .pp-bell .dot { right: auto; left: -4px; }
html[dir="rtl"] .table > thead th, html[dir="rtl"] .table > tbody td { text-align: right; }
html[dir="rtl"] .table .text-end { text-align: left !important; }
html[dir="rtl"] .sticky-act { right: auto; left: 0; box-shadow: 10px 0 14px -12px rgba(15, 23, 42, .35); }
html[dir="rtl"] #toast-container.toast-top-right, html[dir="rtl"] #toast-container { right: auto; left: 1.25rem; }
html[dir="rtl"] #toast-container > .toast { padding: 1rem 4.3rem 1rem 2.4rem; border-left: 1px solid var(--pp-line); border-right: 4px solid var(--c); }
html[dir="rtl"] #toast-container > .toast::before { left: auto; right: 1rem; }
html[dir="rtl"] #toast-container .toast-close-button { right: auto; left: .75rem; }
html[dir="rtl"] .chat-list { border-right: 0; border-left: 1px solid var(--pp-line); }
html[dir="rtl"] .chat-item.active { box-shadow: inset -3px 0 0 var(--pp-brand); }
html[dir="rtl"] .bubble small { text-align: left; }
html[dir="rtl"] .pp-brand, html[dir="rtl"] .pp-usercard { direction: rtl; }
html[dir="rtl"] .pp-kbd { direction: ltr; display: inline-block; }
/* Key hints are for a keyboard: not on phones and touch-only tablets */
@media (max-width: 991.98px), (hover: none) { .pp-kbd { display: none !important; } }
.btn .pp-kbd { font-size: .68rem; padding: .05rem .35rem; margin-inline-start: .4rem; vertical-align: 1px; }
.btn-primary .pp-kbd, .btn-success .pp-kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); color: #fff; }
html[dir="rtl"] .pp-balance, html[dir="rtl"] .pp-bill-line { direction: rtl; }
/* English names, dates and numbers inside Urdu pages: each line takes the direction of its own first letter,
   so "19 Oct 2026, 12:00 AM" or "30 of 45 values entered" are not reordered into "Oct 2026, 12:00 AM 19". */
html[dir="rtl"] :is(td, th, p, li, dd, dt, h1, h2, h3, h4, h5, h6, label, small, .small, .lbl, .sum, .alert) { unicode-bidi: plaintext; }
html[dir="rtl"] :is(p, li, h1, h2, h3, h4, h5, h6, .lbl, .alert) { text-align: right; }
html[dir="rtl"] .res-input, html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="password"] { direction: ltr; text-align: left; }
@media (max-width: 991.98px) {
    html[dir="rtl"] .pp-sidebar { transform: translateX(100%); }
    html[dir="rtl"] body.nav-open .pp-sidebar { transform: none; }
    html[dir="rtl"] .pp-main { margin-right: 0; }
}

/* ---------- Community dropdown in the header ---------- */
.pp-community { position: relative; height: 40px; padding: 0 .95rem; border-radius: 99px; border: 1px solid var(--pp-line); background: var(--pp-surface); color: var(--pp-ink); font-weight: 600; font-size: .86rem; display: inline-flex; align-items: center; gap: .5rem; transition: .2s; }
.pp-community:hover, .pp-community[aria-expanded="true"] { background: var(--pp-brand-50); border-color: var(--pp-brand); color: var(--pp-brand); }
.pp-community > .fa-comments { color: var(--pp-brand); }
.pp-community .dot { position: absolute; top: -5px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--pp-danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
html[dir="rtl"] .pp-community .dot { right: auto; left: -3px; }

/* ===== SmartLAB logo (transparent PNG, solid colours: x-brand-logo / x-brand-mark) ===== */
.sl-logo-pair { display: inline-flex; max-width: 100%; flex-shrink: 0; }
.sl-logo { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; }
.sl-logo-pair .sl-d { display: none; }
html[data-theme="night"] .sl-logo-pair .sl-l { display: none; }
html[data-theme="night"] .sl-logo-pair .sl-d { display: block; }
.sl-icon { display: block; height: 40px; width: auto; flex-shrink: 0; }
.pp-brand .sl-logo { height: 44px; }
.pp-auth-art .sl-logo { height: 48px; }

/* ==========================================================================
   New look (staff and owner pages, html.pp-app): full-size text, floating glass sidebar and cards on a soft
   gradient, one accent colour per theme. Type scale at a 15px base: page title 24px, card title 17px, body 15px,
   small text 13px, nothing under 12px. Status colours (amber / blue / green / rose) never change with the theme.
   ========================================================================== */
html.pp-app { font-size: 15px; }
html.pp-app[dir="rtl"] { font-size: 16px; } /* Naskh letters look smaller than Latin ones at the same size */

/* ----- Themes: data-theme on <html>, picked in user menu → Dashboard look (App\Enums\DashboardTheme) ----- */
html.pp-app {
    --pp-side-w: 252px; --pp-gap: 16px;
    --pp-brand: #4f6ef7; --pp-brand-2: #7c5cf5; --pp-brand-600: #3f5ae0; --pp-accent: #19b7c4; --bs-primary-rgb: 79, 110, 247;
    --pp-brand-50: color-mix(in srgb, var(--pp-brand) 10%, var(--pp-surface));
    --pp-bg1: #dfe8ff; --pp-bg2: #efe4ff; --pp-bg3: #ffeedd; --pp-bg: #f4f6fc;
    --pp-surface: #ffffff; --pp-surface-2: #f7f9fd; --pp-surface-3: #eef2f9; --pp-line: #e4e9f3; --pp-line-soft: #edf1f8;
    --pp-glass: rgba(255, 255, 255, .8); --pp-glass-line: rgba(255, 255, 255, .95);
    --pp-ink: #16213e; --pp-text: #3b4763; --pp-muted: #6f7b96;
    --pp-shadow-sm: 0 10px 30px -20px rgba(40, 60, 120, .35); --pp-shadow: 0 18px 40px -20px rgba(40, 60, 120, .4);
    --pp-grad: linear-gradient(135deg, var(--pp-brand), var(--pp-brand-2));
}
html.pp-app[data-theme="emerald"] { --pp-brand: #0f9f77; --pp-brand-2: #14b8a6; --pp-brand-600: #0b8565; --pp-accent: #84cc16; --bs-primary-rgb: 15, 159, 119; --pp-bg1: #d7f5ea; --pp-bg2: #e3f7f1; --pp-bg3: #fff3d6; --pp-bg: #f2f8f6; }
html.pp-app[data-theme="royal"]   { --pp-brand: #6d4cf0; --pp-brand-2: #a855f7; --pp-brand-600: #5a3bd6; --pp-accent: #ec4899; --bs-primary-rgb: 109, 76, 240; --pp-bg1: #e9e2ff; --pp-bg2: #f6e2ff; --pp-bg3: #ffe4ef; --pp-bg: #f6f4fc; }
html.pp-app[data-theme="sunset"]  { --pp-brand: #e8496f; --pp-brand-2: #f97316; --pp-brand-600: #cf365c; --pp-accent: #f59e0b; --bs-primary-rgb: 232, 73, 111; --pp-bg1: #ffe1e7; --pp-bg2: #ffe9d6; --pp-bg3: #fff4cf; --pp-bg: #fcf6f5; }
html.pp-app[data-theme="classic"] { --pp-brand: #2563eb; --pp-brand-2: #2563eb; --pp-brand-600: #1d4ed8; --pp-accent: #14b8a6; --bs-primary-rgb: 37, 99, 235; --pp-bg1: #f4f6fa; --pp-bg2: #f4f6fa; --pp-bg3: #f4f6fa; --pp-bg: #f4f6fa;
    --pp-glass: #fff; --pp-glass-line: var(--pp-line); --pp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05); --pp-shadow: 0 12px 28px -16px rgba(15, 23, 42, .25); }
html.pp-app[data-theme="night"] {
    --pp-brand: #6d8bff; --pp-brand-2: #8b6cff; --pp-brand-600: #8aa2ff; --pp-accent: #22d3ee; --bs-primary-rgb: 109, 139, 255;
    --pp-bg1: #1b2550; --pp-bg2: #2a1f52; --pp-bg3: #102a3a; --pp-bg: #0d1324;
    --pp-surface: #161e36; --pp-surface-2: #1b2440; --pp-surface-3: #222c4b; --pp-line: #2a3555; --pp-line-soft: #232d4a;
    --pp-glass: rgba(22, 30, 54, .85); --pp-glass-line: rgba(255, 255, 255, .07);
    --pp-ink: #eef2ff; --pp-text: #c4cce3; --pp-muted: #8f9aba;
    --pp-shadow-sm: 0 10px 30px -20px rgba(0, 0, 0, .7); --pp-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
    --bs-body-bg: #0d1324; --bs-body-color: var(--pp-text); --bs-border-color: var(--pp-line); --bs-secondary-color: var(--pp-muted);
    --bs-emphasis-color: var(--pp-ink); --bs-heading-color: var(--pp-ink); --bs-tertiary-bg: var(--pp-surface-2); --bs-secondary-bg: var(--pp-surface-3);
    color-scheme: dark;
}
html.pp-app { --bs-primary: var(--pp-brand); --bs-link-color: var(--pp-brand); --bs-link-hover-color: var(--pp-brand-600); --bs-link-color-rgb: var(--bs-primary-rgb); --bs-border-color: var(--pp-line); }

/* ----- Page background and shell ----- */
html.pp-app body {
    font-size: 1rem; line-height: 1.55; color: var(--pp-text);
    background:
        radial-gradient(900px 600px at 0% 0%, var(--pp-bg1) 0%, transparent 60%),
        radial-gradient(900px 600px at 100% 0%, var(--pp-bg2) 0%, transparent 60%),
        radial-gradient(1000px 600px at 50% 110%, var(--pp-bg3) 0%, transparent 60%),
        var(--pp-bg);
}
.pp-app h1, .pp-app h2, .pp-app h3, .pp-app h4, .pp-app h5, .pp-app h6 { color: var(--pp-ink); }

.pp-app .pp-sidebar {
    inset: var(--pp-gap) auto var(--pp-gap) var(--pp-gap); height: auto; border-radius: 22px;
    background: var(--pp-glass); border: 1px solid var(--pp-glass-line); box-shadow: var(--pp-shadow-sm);
    backdrop-filter: saturate(160%) blur(16px); color: var(--pp-text);
}
html.pp-app[dir="rtl"] .pp-sidebar { inset: var(--pp-gap) var(--pp-gap) var(--pp-gap) auto; }
.pp-app .pp-main { margin-left: calc(var(--pp-side-w) + var(--pp-gap)); }
html.pp-app[dir="rtl"] .pp-main { margin-left: 0; margin-right: calc(var(--pp-side-w) + var(--pp-gap)); }
.pp-app .pp-brand { color: var(--pp-ink); padding: 1.3rem 1.25rem 1.1rem; }
.pp-app .pp-nav { padding: 0 .8rem 1rem; scrollbar-color: var(--pp-line) transparent; }
.pp-app .pp-nav-label { color: var(--pp-muted); opacity: .8; font-size: .75rem; letter-spacing: .08em; padding: 1.1rem .8rem .45rem; }
.pp-app .pp-link { color: var(--pp-text); font-size: 1rem; font-weight: 500; padding: .65rem .85rem; border-radius: 13px; gap: .8rem; }
.pp-app .pp-link i.ico { color: var(--pp-muted); font-size: 1.05rem; }
.pp-app .pp-link:hover { background: color-mix(in srgb, var(--pp-brand) 8%, transparent); color: var(--pp-ink); }
.pp-app .pp-link:hover i.ico { transform: none; color: var(--pp-brand); }
.pp-app .pp-link.active, html.pp-app[dir="rtl"] .pp-link.active { background: var(--pp-grad); color: #fff; font-weight: 600; box-shadow: 0 10px 20px -12px var(--pp-brand); }
.pp-app .pp-link.active i.ico, .pp-app .pp-link.active .chev { color: #fff; }
.pp-app .pp-link .chev { color: var(--pp-muted); }
.pp-app .pp-sub a { color: var(--pp-text); font-size: .95rem; padding: .45rem .8rem; border-radius: 10px; }
.pp-app .pp-sub a::before { background: var(--pp-line); }
.pp-app .pp-sub a:hover { color: var(--pp-ink); background: color-mix(in srgb, var(--pp-brand) 6%, transparent); }
.pp-app .pp-sub a.active { color: var(--pp-brand); font-weight: 600; }
.pp-app .pp-sub a.active::before { background: var(--pp-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pp-brand) 20%, transparent); }
.pp-app .pp-side-foot { color: var(--pp-muted); border-top-color: var(--pp-line-soft); font-size: .8rem; }
.pp-app .pp-role { background: color-mix(in srgb, #14b8a6 16%, transparent); color: #0f9488; font-size: .78rem; margin-top: .35rem; }
.pp-app .pp-role.user { background: color-mix(in srgb, #0ea5e9 16%, transparent); color: #0284c7; }

.pp-app .pp-topbar { height: 72px; margin: var(--pp-gap) var(--pp-gap) 0; padding: 0 1.25rem; border-radius: 20px; top: var(--pp-gap);
    background: var(--pp-glass); border: 1px solid var(--pp-glass-line); box-shadow: var(--pp-shadow-sm); }
.pp-app .pp-lab { font-size: 1rem; }
.pp-app .pp-lab i { color: var(--pp-brand); }
.pp-app :is(.pp-lang, .pp-community, .pp-usermenu, .pp-bell, .pp-burger) { background: var(--pp-surface); border-color: var(--pp-line); color: var(--pp-ink); }
.pp-app .pp-avatar { background: var(--pp-grad); }
.pp-app .pp-topbar :is(.btn, .pp-usermenu, .pp-community, .pp-lang) { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1439.98px) { .pp-app .pp-topbar .pp-kbd { display: none; } }
.pp-app .pp-burger { flex-shrink: 0; }
@media (max-width: 575.98px) {
    .pp-app .pp-topbar { gap: .5rem; }
    .pp-app .pp-topbar > .ms-auto { gap: .4rem !important; }
    .pp-app .pp-topbar :is(.pp-lang, .pp-community) { padding: 0 .6rem; }
    .pp-app .pp-usermenu { padding-inline-end: .35rem; }
}
.pp-app .pp-content { padding: 1.5rem var(--pp-gap) 1.5rem calc(var(--pp-gap) + .25rem); width: 100%; max-width: 1600px; margin: 0 auto; }
.pp-app .pp-footer { color: var(--pp-muted); }
@media (max-width: 991.98px) {
    .pp-app .pp-sidebar { inset: 0 auto 0 0; border-radius: 0 22px 22px 0; background: var(--pp-surface); }
    html.pp-app[dir="rtl"] .pp-sidebar { inset: 0 0 0 auto; border-radius: 22px 0 0 22px; }
    .pp-app .pp-main, html.pp-app[dir="rtl"] .pp-main { margin: 0; }
    .pp-app .pp-topbar { margin: .6rem .6rem 0; top: .6rem; padding: 0 .75rem; height: 62px; border-radius: 16px; }
    .pp-app .pp-content { padding: 1rem .75rem 1.5rem; }
}

/* ----- Shared pieces every page uses ----- */
.pp-app .pp-card, .pp-app .pp-stat { background: var(--pp-glass); border: 1px solid var(--pp-glass-line); border-radius: 20px; box-shadow: var(--pp-shadow-sm); }
.pp-app .pp-card { padding: 1.35rem 1.4rem; }
.pp-app .pp-card-head h2 { font-size: 1.125rem; }
.pp-app .pp-card-head h2 i { color: var(--pp-brand); }
.pp-app .pp-page-head h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.pp-app .pp-page-head p { font-size: .95rem; color: var(--pp-muted); }
.pp-app .pp-page-head .ico { background: var(--pp-grad); box-shadow: 0 10px 20px -10px var(--pp-brand); border-radius: 14px; }
.pp-app .pp-hero { background: radial-gradient(900px 300px at 100% 0%, color-mix(in srgb, var(--pp-accent) 55%, transparent), transparent 60%), var(--pp-grad); box-shadow: 0 18px 40px -22px var(--pp-brand); }

.pp-app .btn { border-radius: 12px; }
.pp-app .btn-sm { font-size: .875rem; border-radius: 9px; }
.pp-app .btn-primary { --bs-btn-bg: var(--pp-brand); --bs-btn-border-color: transparent; --bs-btn-hover-bg: var(--pp-brand-600); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: var(--pp-brand-600); --bs-btn-disabled-bg: var(--pp-brand);
    background-image: var(--pp-grad); box-shadow: 0 10px 20px -12px var(--pp-brand); }
.pp-app .btn-primary:hover { box-shadow: 0 12px 22px -12px var(--pp-brand); filter: brightness(1.05); }
.pp-app .btn-soft { background: var(--pp-brand-50); color: var(--pp-brand); }
.pp-app .btn-soft:hover { background: color-mix(in srgb, var(--pp-brand) 18%, var(--pp-surface)); color: var(--pp-brand-600); }
.pp-app .btn-outline-primary { --bs-btn-color: var(--pp-brand); --bs-btn-border-color: var(--pp-brand); --bs-btn-hover-bg: var(--pp-brand); --bs-btn-hover-border-color: var(--pp-brand); --bs-btn-active-bg: var(--pp-brand-600); }
.pp-app .text-primary { color: var(--pp-brand) !important; }
.pp-app .bg-primary { background-color: var(--pp-brand) !important; }
.pp-app .form-control, .pp-app .form-select { border-radius: 12px; background-color: var(--pp-surface); color: var(--pp-ink); border-color: var(--pp-line); }
.pp-app .form-control:focus, .pp-app .form-select:focus { border-color: var(--pp-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pp-brand) 16%, transparent); }
.pp-app .form-check-input:checked { background-color: var(--pp-brand); border-color: var(--pp-brand); }
.pp-app .form-label, .pp-app label { font-size: .9rem; }
.pp-app .form-floating > label { max-width: 100%; } /* long floating labels end in "…" instead of widening the page */
.pp-app .badge-soft { font-size: .8rem; padding: .3rem .7rem; }
.pp-app .table { --bs-table-color: var(--pp-text); }
.pp-app .table > thead th { font-size: .8rem; letter-spacing: .04em; background: color-mix(in srgb, var(--pp-brand) 5%, var(--pp-surface)); color: var(--pp-muted); border-bottom-color: var(--pp-line); }
.pp-app .table > tbody td { border-color: var(--pp-line-soft); }
.pp-app .table-hover > tbody > tr:hover { background: color-mix(in srgb, var(--pp-brand) 4%, transparent); --bs-table-hover-bg: transparent; }
.pp-app .nav-pills .nav-link.active { background: var(--pp-grad); }
.pp-app .nav-tabs .nav-link.active { color: var(--pp-brand); }
.pp-app .page-link { color: var(--pp-brand); }
.pp-app .active > .page-link, .pp-app .page-link.active { background: var(--pp-brand); border-color: var(--pp-brand); color: #fff; }
.pp-app .dropdown-menu { background: var(--pp-surface); border-color: var(--pp-line); }
.pp-app .dropdown-item { color: var(--pp-text); }
.pp-app .dropdown-item:hover, .pp-app .dropdown-item:focus { background: color-mix(in srgb, var(--pp-brand) 8%, transparent); color: var(--pp-ink); }
.pp-app .dropdown-item.active, .pp-app .dropdown-item:active { background: var(--pp-brand); color: #fff; }
.pp-app .modal-content { background: var(--pp-surface); border-radius: 22px; }
.pp-app .pp-progress, .pp-app .pp-top { background: var(--pp-grad); }

/* Number cards on other pages (owner overview, finance, ...): same soft colour cards as the Dashboard */
.pp-app .pp-stat { background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 9%, var(--pp-surface)), color-mix(in srgb, var(--tone) 17%, var(--pp-surface))); border-color: var(--pp-glass-line); }
.pp-app .pp-stat::after { display: none; }
.pp-app .pp-stat .ico { border-radius: 50%; }
html.pp-app[data-theme="classic"] .pp-stat { background: var(--pp-surface); border-color: var(--pp-line); }
.pp-app .table .btn { white-space: nowrap; }

/* ----- Night: Bootstrap and page bits that are white or dark by name ----- */
html.pp-app[data-theme="night"] .text-dark, html.pp-app[data-theme="night"] .link-dark { color: var(--pp-ink) !important; }
html.pp-app[data-theme="night"] .text-muted, html.pp-app[data-theme="night"] .text-secondary { color: var(--pp-muted) !important; }
html.pp-app[data-theme="night"] :is(.bg-white, .bg-light, .table-light, .card, .list-group-item) { background-color: var(--pp-surface-2) !important; color: var(--pp-text); --bs-table-bg: var(--pp-surface-2); --bs-table-color: var(--pp-text); }
html.pp-app[data-theme="night"] .btn-light { --bs-btn-bg: var(--pp-surface-3); --bs-btn-color: var(--pp-ink); --bs-btn-border-color: var(--pp-line); --bs-btn-hover-bg: #2b3659; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--pp-line); --bs-btn-active-bg: #2b3659; --bs-btn-active-color: #fff; }
html.pp-app[data-theme="night"] .btn-outline-secondary, html.pp-app[data-theme="night"] .btn-outline-dark { --bs-btn-color: var(--pp-text); --bs-btn-border-color: var(--pp-line); --bs-btn-hover-bg: var(--pp-surface-3); --bs-btn-hover-color: #fff; }
html.pp-app[data-theme="night"] .badge-soft.green { background: rgba(34, 197, 94, .16); color: #4ade80; }
html.pp-app[data-theme="night"] .badge-soft.amber { background: rgba(245, 158, 11, .16); color: #fbbf24; }
html.pp-app[data-theme="night"] .badge-soft.blue  { background: rgba(59, 130, 246, .18); color: #93c5fd; }
html.pp-app[data-theme="night"] .badge-soft.rose  { background: rgba(244, 63, 94, .16); color: #fb7185; }
html.pp-app[data-theme="night"] .badge-soft.slate { background: rgba(148, 163, 184, .14); color: #cbd5e1; }
html.pp-app[data-theme="night"] .res-input.ok { background: rgba(34, 197, 94, .1); border-color: rgba(74, 222, 128, .45); }
html.pp-app[data-theme="night"] .res-input.critical { background: rgba(244, 63, 94, .26); border-color: #fb7185; color: #fecdd3; }
html.pp-app[data-theme="night"] .res-input.low, html.pp-app[data-theme="night"] .res-input.high { background: rgba(244, 63, 94, .14); border-color: #fb7185; color: #fda4af; }
html.pp-app[data-theme="night"] .form-control[readonly], html.pp-app[data-theme="night"] .form-control:disabled { background-color: var(--pp-surface-3); color: var(--pp-muted); }
html.pp-app[data-theme="night"] .pp-kbd { background: var(--pp-surface-3); border-color: var(--pp-line); }
html.pp-app[data-theme="night"] :is(.pp-sub-banner, .dash-alert) { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); color: #fcd34d; }
html.pp-app[data-theme="night"] .dash-app { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .3); color: #bfdbfe; }
html.pp-app[data-theme="night"] .pp-empty i { color: #3b4668; }
html.pp-app[data-theme="night"] .modal-backdrop.show { opacity: .7; }
html.pp-app[data-theme="night"] img.pp-logo-preview, html.pp-app[data-theme="night"] .rs-thumb { background-color: #fff; }

/* ----- Dashboard look picker (layout/_theme_picker.blade.php) ----- */
.pp-theme-modal .modal-body { padding: 1.75rem 1.85rem 1.5rem; }
.pp-theme-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.pp-theme-sub { color: var(--pp-muted); margin: .25rem 0 1.25rem; }
.pp-theme-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 767.98px) { .pp-theme-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pp-theme-modal .modal-body { padding: 1.25rem; } }
.pp-theme-opt { position: relative; display: block; padding: .6rem; border: 2px solid var(--pp-line); border-radius: 16px; cursor: pointer; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.pp-theme-opt:hover { border-color: color-mix(in srgb, var(--pp-brand) 50%, var(--pp-line)); }
.pp-theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pp-theme-opt:has(input:checked) { border-color: var(--pp-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pp-brand) 16%, transparent); }
.pp-theme-opt:has(input:checked)::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 1rem; inset-inline-end: 1rem; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; color: #fff; background: var(--pp-brand); }
.pp-theme-opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--pp-brand) 40%, transparent); outline-offset: 2px; }
.pp-theme-opt b { display: block; margin-top: .55rem; color: var(--pp-ink); font-size: 1rem; }
.pp-theme-opt small { color: var(--pp-muted); font-size: .82rem; }
.pp-theme-mini { --a: #4f6ef7; --b: #7c5cf5; --bg: linear-gradient(135deg, #dfe8ff, #efe4ff); --side: #fff; --t1: #dbe7ff; --t2: #d3f5e6; --t3: #ffe5cc;
    display: grid; grid-template-columns: 30% 1fr; gap: 6px; height: 84px; padding: 6px; border-radius: 10px; background: var(--bg); direction: ltr; }
.pp-theme-mini i { display: block; border-radius: 6px; }
.pp-theme-mini > i { background: var(--side); }
.pp-theme-mini > span { display: grid; grid-template-rows: 16px 1fr; gap: 6px; }
.pp-theme-mini > span > i { background: linear-gradient(90deg, var(--a), var(--b)); }
.pp-theme-mini > span > span { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.pp-theme-mini > span > span > i:nth-child(1) { background: var(--t1); }
.pp-theme-mini > span > span > i:nth-child(2) { background: var(--t2); }
.pp-theme-mini > span > span > i:nth-child(3) { background: var(--t3); }
.pp-theme-mini[data-mini="emerald"] { --a: #0f9f77; --b: #14b8a6; --bg: linear-gradient(135deg, #d7f5ea, #fff3d6); --t1: #d3f5e6; --t2: #dbe7ff; }
.pp-theme-mini[data-mini="royal"]   { --a: #6d4cf0; --b: #a855f7; --bg: linear-gradient(135deg, #e9e2ff, #ffe4ef); --t1: #e6dbff; }
.pp-theme-mini[data-mini="sunset"]  { --a: #e8496f; --b: #f97316; --bg: linear-gradient(135deg, #ffe1e7, #fff4cf); --t1: #ffe1e7; }
.pp-theme-mini[data-mini="classic"] { --a: #2563eb; --b: #2563eb; --bg: #eef1f6; --t1: #fff; --t2: #fff; --t3: #fff; }
.pp-theme-mini[data-mini="night"]   { --a: #6d8bff; --b: #8b6cff; --bg: #0d1324; --side: #1a2340; --t1: #1d2d5c; --t2: #123d36; --t3: #47301c; }
.pp-theme-labdefault { display: flex; gap: .6rem; align-items: flex-start; margin: 1.1rem 0 0; padding-inline-start: 0; }
.pp-theme-labdefault .form-check-input { margin: .2rem 0 0; flex-shrink: 0; float: none; }
.pp-theme-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }

/* ---------- Dashboard (welcome.blade.php) ---------- */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.1rem; margin-bottom: 1.25rem; }
.dash-sky { font-size: 1.9rem; color: #f59e0b; flex-shrink: 0; }
.dash-head h1 { font-size: 1.65rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.dash-head p { margin: .1rem 0 0; color: var(--pp-muted); }
.dash-search { position: relative; flex: 1 1 280px; max-width: 420px; margin-inline-start: auto; }
.dash-search > i { position: absolute; inset-inline-start: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--pp-muted); pointer-events: none; }
.pp-app .dash-search .form-control { height: 48px; padding-inline-start: 2.8rem; border-radius: 99px; background: var(--pp-glass); border-color: var(--pp-glass-line); box-shadow: var(--pp-shadow-sm); }
.dash-new { height: 48px; display: inline-flex; align-items: center; padding: 0 1.4rem; white-space: nowrap; }
.pp-app .dash-new { border-radius: 99px; }
@media (max-width: 767.98px) {
    .dash-head h1 { font-size: 1.35rem; }
    .dash-sky { display: none; }
    .dash-head > div, .dash-search, .dash-new { flex: 1 1 100%; max-width: none; margin: 0; }
    .dash-new { justify-content: center; height: 44px; }
    .pp-app .dash-search .form-control { height: 44px; }
}

.dash-alert { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: .75rem 1.1rem; margin-bottom: 1.25rem; border-radius: 16px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.dash-alert > i { font-size: 1.15rem; color: #d97706; flex-shrink: 0; }
/* "Get your lab ready" card (new labs, admins) */
.dash-setup { margin-bottom: 1.25rem; padding: 1rem 1.1rem; border-radius: 16px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.dash-setup-head { display: flex; align-items: flex-start; gap: .75rem; justify-content: space-between; margin-bottom: .6rem; }
.dash-setup-head h2 { font-size: 1.05rem; margin: 0 0 .15rem; color: #1e3a8a; }
.dash-setup-head p { margin: 0; font-size: .88rem; }
.dash-setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.dash-setup-steps li { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .85rem; padding: .6rem .8rem; border-radius: 12px; background: var(--pp-surface); border: 1px solid #dbeafe; }
.dash-setup-steps li > i { font-size: 1.1rem; color: #93c5fd; flex-shrink: 0; }
.dash-setup-steps li.done > i { color: var(--pp-success); }
.dash-setup-steps li > div { min-width: 12rem; }
.dash-setup-steps li span:not(.badge-soft) { color: var(--pp-muted); font-size: .86rem; }
html.pp-app[data-theme="night"] .dash-setup { background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .3); color: #bfdbfe; }
html.pp-app[data-theme="night"] .dash-setup-head h2 { color: #dbeafe; }
html.pp-app[data-theme="night"] .dash-setup-steps li { border-color: var(--pp-line); }

/* First-visit tour (partials/tour, public/js/tour.js): above the side menu (1040) and its backdrop (1035). */
.pp-tour-bubble { position: fixed; z-index: 1065; width: min(22rem, calc(100vw - 1.5rem)); padding: 1rem 1.1rem; background: var(--pp-surface);
    border: 1px solid var(--pp-line); border-radius: 16px; box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .35); }
.pp-tour-bubble h2 { font-size: 1.05rem; font-weight: 700; margin: .1rem 0 .3rem; }
.pp-tour-bubble p { margin: 0; font-size: .9rem; color: var(--pp-muted); }
.pp-tour-bubble .pp-tour-count { font-size: .78rem; font-weight: 600; color: var(--pp-brand); }
.pp-tour-x { flex-shrink: 0; margin: -.35rem -.4rem 0 0; }
html[dir="rtl"] .pp-tour-x { margin: -.35rem 0 0 -.4rem; }
.pp-tour-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.pp-tour-actions .btn { min-height: 36px; }
/* Arrow towards the menu item (computer: the menu is on the start side). */
.pp-tour-bubble[data-side="start"]::before { content: ""; position: absolute; top: var(--arrow-y, 1.5rem); inset-inline-start: -7px; width: 12px; height: 12px;
    background: var(--pp-surface); border-inline-start: 1px solid var(--pp-line); border-bottom: 1px solid var(--pp-line); transform: rotate(45deg); }
html[dir="rtl"] .pp-tour-bubble[data-side="start"]::before { transform: rotate(-45deg); }
.pp-tour-bubble[data-side="center"] { top: 50%; left: 50%; transform: translate(-50%, -50%); }
/* Phones and tablets: the menu slides in and the bubble sits at the bottom or top of the screen, away from the item. */
.pp-tour-bubble[data-side="bottom"] { bottom: max(.75rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
.pp-tour-bubble[data-side="top"] { top: max(.75rem, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); }
.pp-tour-target { outline: 3px solid var(--pp-brand); outline-offset: 2px; border-radius: 10px; animation: pp-tour-pulse 1.6s ease-in-out infinite; }
@keyframes pp-tour-pulse { 50% { outline-color: rgba(59, 130, 246, .3); } }
@media (prefers-reduced-motion: reduce) { .pp-tour-target { animation: none; } }
.dash-app { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.dash-app > i { color: var(--pp-brand); }

/* Owner → App updates: on phones each version is one block, its buttons underneath */
@media (max-width: 767.98px) {
    .rel-table thead { display: none; }
    .rel-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; padding: .8rem 0; border-bottom: 1px solid var(--pp-line, #e2e8f0); }
    .rel-table td { display: block; border: 0; padding: 0; }
    .rel-table td.rel-actions { flex-basis: 100%; }
    .rel-table td.rel-actions > div { justify-content: flex-start !important; }
}

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.dash-card { margin: 0; }
@media (max-width: 1199.98px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }

/* Number cards: colour = what the number is about, the same in every theme */
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1399.98px) { .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-stat { --c: #4f8df9; --c1: #eaf1ff; --c2: #dbe7ff; position: relative; overflow: hidden; padding: 1rem 1.1rem 1rem; border-radius: 20px; color: var(--pp-ink);
    background: linear-gradient(160deg, var(--c1), var(--c2)); border: 1px solid var(--pp-glass-line); box-shadow: var(--pp-shadow-sm); }
.dash-stat.green  { --c: #22c08a; --c1: #e6fbf2; --c2: #d3f5e6; }
.dash-stat.violet { --c: #9b6bf7; --c1: #f2ebff; --c2: #e6dbff; }
.dash-stat.orange { --c: #ff9b45; --c1: #fff2e3; --c2: #ffe5cc; }
html.pp-app[data-theme="night"] .dash-stat        { --c1: #1d2d5c; --c2: #192548; }
html.pp-app[data-theme="night"] .dash-stat.green  { --c1: #123d36; --c2: #11302c; }
html.pp-app[data-theme="night"] .dash-stat.violet { --c1: #2e2260; --c2: #241c4b; }
html.pp-app[data-theme="night"] .dash-stat.orange { --c1: #47301c; --c2: #382617; }
html.pp-app[data-theme="classic"] .dash-stat { background: var(--pp-surface); border-color: var(--pp-line); }
.dash-stat-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.dash-stat-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 8px 16px -8px var(--c); flex-shrink: 0; }
.dash-spark { width: 96px; height: 40px; color: var(--c); flex-shrink: 1; min-width: 0; }
.dash-stat-lbl { margin-top: .75rem; font-weight: 500; color: var(--pp-text); }
.dash-stat-num { font-size: 1.85rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-stat-chg { font-size: .85rem; font-weight: 600; margin-top: .15rem; color: var(--pp-muted); }
.dash-stat-chg span { font-weight: 500; }
.dash-stat-chg.up { color: #16a36d; } .dash-stat-chg.down { color: #e5602f; }
.dash-stat-chg.up span, .dash-stat-chg.down span { color: var(--pp-muted); }
.dash-stat-chg.muted { font-weight: 500; }
.dash-stat-chg a { color: var(--pp-text); }
.dash-stat-chg a:hover { color: var(--c); }
html.pp-app[data-theme="night"] .dash-stat-chg.up { color: #4ade80; } html.pp-app[data-theme="night"] .dash-stat-chg.down { color: #fb923c; }

/* Card headings */
.dash-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .85rem; margin-bottom: .9rem; }
.dash-card-head h2 { font-size: 1.125rem; font-weight: 650; margin: 0; }
.dash-card-head p { font-size: .875rem; color: var(--pp-muted); margin: .1rem 0 0; }
.dash-card-ico { --c: var(--pp-brand); width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.dash-card-ico.violet { --c: #9b6bf7; } .dash-card-ico.amber { --c: #f08a24; }
.dash-more { margin-inline-start: auto; font-weight: 600; font-size: .9rem; color: var(--pp-brand); white-space: nowrap; }
.dash-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-inline-start: auto; font-size: .875rem; color: var(--pp-text); }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline-end: .45rem; }
.dash-legend .reg { background: var(--pp-brand); } .dash-legend .done { background: var(--pp-chart-b); }
html.pp-app { --pp-chart-b: #22c08a; } html.pp-app[data-theme="emerald"] { --pp-chart-b: #9b6bf7; } /* completed line: never the same colour as the theme */

/* Week chart */
.dash-chart { position: relative; height: 250px; direction: ltr; touch-action: pan-y; }
.dash-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dash-tip { position: absolute; pointer-events: none; padding: .45rem .7rem; border-radius: 10px; background: #1e2a4a; color: #fff; font-size: .82rem; line-height: 1.45; white-space: nowrap; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .5); }
.dash-tip b { display: block; font-weight: 700; }
.dash-tip span { display: flex; align-items: center; gap: .4rem; }
.dash-tip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
html.pp-app[data-theme="night"] .dash-tip { background: #33407a; }
@media (max-width: 575.98px) { .dash-chart { height: 210px; } }

.dash-bottom { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 1.25rem; align-items: start; }
@media (max-width: 991.98px) { .dash-bottom { grid-template-columns: minmax(0, 1fr); } }

/* Most requested tests */
.dash-donut { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.dash-ring { width: 150px; height: 150px; flex-shrink: 0; }
.dash-ring .big { font-size: 20px; font-weight: 700; fill: var(--pp-ink); }
.dash-ring .small { font-size: 10px; fill: var(--pp-muted); }
.dash-dl { list-style: none; margin: 0; padding: 0; flex: 1 1 160px; min-width: 0; }
.dash-dl li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; font-size: .92rem; }
.dash-dl li i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dash-dl li b { margin-inline-start: auto; color: var(--pp-ink); font-weight: 650; }

/* Waiting for you */
.dash-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .4rem; }
.dash-chips a { --c: var(--pp-brand); display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 99px; font-size: .85rem; font-weight: 500; white-space: nowrap;
    color: var(--pp-text); background: var(--pp-surface-3); border: 1px solid transparent; }
.dash-chips a b { font-weight: 700; color: var(--pp-ink); }
.dash-chips a.amber { --c: #e07b1c; } .dash-chips a.blue { --c: #3b6fe0; } .dash-chips a.green { --c: #14935f; }
.dash-chips a:hover { border-color: var(--c); }
.dash-chips a.on { color: #fff; background: var(--c); }
.dash-chips a.on b { color: #fff; }
.dash-queue { list-style: none; margin: 0; padding: 0; }
.dash-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: .4rem .85rem; padding: .7rem 0; border-top: 1px solid var(--pp-line-soft); }
.dash-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; background: var(--pp-surface-3); color: var(--pp-text); }
.dash-avatar.amber { background: #fff2e3; color: #e07b1c; } .dash-avatar.blue { background: #eaf1ff; color: #3b6fe0; } .dash-avatar.green { background: #e6fbf2; color: #14935f; }
html.pp-app[data-theme="night"] .dash-avatar.amber { background: rgba(255, 155, 69, .16); color: #fdba74; }
html.pp-app[data-theme="night"] .dash-avatar.blue  { background: rgba(79, 141, 249, .18); color: #93c5fd; }
html.pp-app[data-theme="night"] .dash-avatar.green { background: rgba(34, 192, 138, .16); color: #6ee7b7; }
.dash-name { font-weight: 600; color: var(--pp-ink); overflow-wrap: anywhere; }
.dash-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .8rem; font-size: .84rem; color: var(--pp-muted); }
.dash-meta .mrn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.pp-app .dash-go { --c: var(--pp-brand); color: #fff; background: var(--c); border: 0; font-weight: 600; white-space: nowrap; padding: .45rem .9rem; box-shadow: 0 8px 16px -10px var(--c); }
.pp-app .dash-go.amber { --c: #f08a24; } .pp-app .dash-go.blue { --c: #3b82f6; } .pp-app .dash-go.green { --c: #16a36d; }
.pp-app .dash-go:hover { color: #fff; filter: brightness(1.06); }
@media (max-width: 575.98px) {
    .dash-row { grid-template-columns: 38px minmax(0, 1fr); }
    .dash-go { grid-column: 2; justify-self: start; }
}

/* Recent activity */
.dash-act { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-top: 1px solid var(--pp-line-soft); }
.dash-act:first-of-type { border-top: 0; }
.dash-act-ico { --c: #4f8df9; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--c); flex-shrink: 0; box-shadow: 0 8px 16px -10px var(--c); }
.dash-act-ico.green { --c: #22c08a; } .dash-act-ico.teal { --c: #19b7c4; }
.dash-act b { display: block; font-size: .93rem; color: var(--pp-ink); font-weight: 600; }
.dash-act small { color: var(--pp-muted); font-size: .84rem; }
.dash-act-at { margin-inline-start: auto; align-self: flex-start; padding-top: .15rem; font-size: .78rem; color: var(--pp-muted); white-space: nowrap; }

/* Completed today: the coloured card of the approved design */
.dash-done-card { border-radius: 20px; padding: 1.35rem 1.4rem; color: #fff; position: relative; overflow: hidden;
    background: radial-gradient(260px 160px at 90% 100%, color-mix(in srgb, var(--pp-accent) 60%, transparent), transparent 70%), var(--pp-grad);
    box-shadow: 0 18px 36px -20px var(--pp-brand); }
html.pp-app[data-theme="classic"] .dash-done-card { background: #1e3a8a; }
.dash-done-card h2 { color: #fff; }
.dash-done-card .dash-card-head p, .dash-done-card .dash-meta { color: rgba(255, 255, 255, .8); }
.dash-done-card .dash-more { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.dash-done-card .dash-name { color: #fff; }
.dash-done { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.dash-done-card .btn-light { --bs-btn-bg: rgba(255, 255, 255, .92); --bs-btn-border-color: transparent; --bs-btn-color: #1e2a4a; }
.dash-done-empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.25rem 0 .5rem; color: rgba(255, 255, 255, .85); text-align: center; }
.dash-done-empty i { font-size: 2.2rem; opacity: .55; }

/* New patient form (owner, 1 Nov 2026): each field's name always sits small at the top of its box, and the value is
   typed below it, so an empty box never looks filled in. Same look as Bootstrap's raised label. */
.pp-labels-top .form-floating > .form-control:placeholder-shown { padding-top: 1.625rem; padding-bottom: .625rem; }
.pp-labels-top .form-floating > .form-control:placeholder-shown ~ label { color: rgba(var(--bs-body-color-rgb), .65); transform: scale(.85) translateY(-.5rem) translateX(.15rem); }
html[dir="rtl"] .pp-labels-top .form-floating > .form-control:placeholder-shown ~ label { transform: scale(.85) translateY(-.5rem) translateX(-.15rem); }
.pp-labels-top .form-floating > .form-control:placeholder-shown ~ label::after { position: absolute; inset: 1rem .375rem; z-index: -1; height: 1.5em; content: ""; background-color: var(--bs-body-bg); border-radius: var(--bs-border-radius); }
.pp-labels-top .form-floating > label { font-weight: 550; letter-spacing: .01em; }

/* ---------- Samples card and Sample receiving (partials/samples-card, samples/index) ---------- */
.pp-sample-line { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--pp-line-soft); flex-wrap: wrap; }
.pp-sample-line:first-of-type { border-top: 0; }
.pp-tube-dot { width: .9rem; height: .9rem; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.08); }
.pp-sample-main { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.pp-sample-state { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-inline-start: auto; }
@media (max-width: 575.98px) { .pp-sample-state { flex-basis: 100%; margin-inline-start: 1.65rem; } }
.pp-scan { max-width: 28rem; }
/* Repeat tests: due list and repeat periods */
@media (max-width: 575.98px) { .pp-due .pp-sample-state { margin-inline-start: 0; } .pp-period-row > label { flex-basis: 100%; } }
.pp-period-row > label { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.pp-scan .form-control { font-size: 1.1rem; }

/* ---------- Owner popups (partials/popup, Owner → Popup messages); same block in landing.css ---------- */
.pp-popup { padding: 0; border: 0; background: transparent; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: visible; }
.pp-popup::backdrop { background: rgba(15, 23, 42, .6); backdrop-filter: blur(3px); }
.pp-popup[open] { animation: pp-popup-in .35s cubic-bezier(.22, 1, .36, 1); }
@keyframes pp-popup-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.pp-popup-box { position: relative; background: #fff; color: #334155; border-radius: 20px; overflow: hidden auto; max-height: calc(100dvh - 32px); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45); text-align: start; font-family: inherit; }
.pp-popup-x { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.pp-popup-x:hover, .pp-popup-x:focus-visible { background: rgba(15, 23, 42, .8); }
.pp-popup-media:not(:has(img, video, iframe)) { display: none; }
.pp-popup-media img, .pp-popup-media video { display: block; width: 100%; max-height: 300px; object-fit: cover; background: #0f172a; }
.pp-popup-media video { object-fit: contain; }
.pp-popup-yt { position: relative; aspect-ratio: 16 / 9; background: #0f172a; }
.pp-popup-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pp-popup-body { padding: 22px 22px 24px; }
.pp-popup-media:not(:has(img, video, iframe)) + .pp-popup-body { padding-top: 26px; padding-inline-end: 56px; }
.pp-popup-offer { display: inline-flex; white-space: nowrap; align-items: center; padding: 5px 12px; border-radius: 99px; background: linear-gradient(135deg, #f59e0b, #e11d48); color: #fff; font-weight: 700; font-size: .8rem; margin-bottom: 10px; }
.pp-popup-title { font-size: 1.35rem; font-weight: 800; color: #0f172a; line-height: 1.25; margin: 0 0 8px; overflow-wrap: anywhere; }
.pp-popup-text { margin: 0; font-size: .95rem; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.pp-popup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pp-popup-actions:not(:has(a, span)) { display: none; }
.pp-popup-btn { flex: 1 1 140px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .95rem; text-decoration: none; text-align: center; border: 1.5px solid #cbd5e1; color: #0f172a; background: #fff; }
.pp-popup-btn:hover { border-color: #94a3b8; color: #0f172a; }
.pp-popup-btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.pp-popup-btn.primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
@media (max-width: 480px) { .pp-popup-body { padding: 18px 16px 20px; } .pp-popup-title { font-size: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .pp-popup[open] { animation: none; } }
.pp-popup-preview { background: rgba(15, 23, 42, .55); border-radius: 16px; padding: 16px; }
.pp-popup-preview .pp-popup-box { max-height: none; }
html.pp-app[data-theme="night"] .pp-popup-box { background: #0f172a; color: #cbd5e1; }
html.pp-app[data-theme="night"] .pp-popup-title { color: #f1f5f9; }
html.pp-app[data-theme="night"] .pp-popup-btn:not(.primary) { background: transparent; color: #e2e8f0; border-color: #334155; }

/* ---------- Display scale for lab pages on computers (kept last so it wins over the sizes above) ---------- */
/* Computers (owner, 1 Nov): looks like the browser at 90% zoom, at normal 100%. Everything sized in rem follows the
   base; the sidebar and top bar shrink with it. Phones and tablets keep the full size so text stays easy to read. */
@media (min-width: 992px) {
    html.pp-app { font-size: 13.5px; }
    html.pp-app[dir="rtl"] { font-size: 14.4px; }
    html.pp-app { --pp-side-w: 228px; --pp-gap: 14px; }
    html.pp-app .pp-topbar { height: 64px; }
}

/* ---------- Speed on computers (Nov 2026) ----------
   Frosted-glass blur on the big bars that stay on screen made scrolling slow on laptops (whole-screen repaint on
   every scroll, worst when the browser has no graphics acceleration). On wide screens the bars are solid instead. */
@media (min-width: 992px) {
    .pp-topbar, .po-top, .pp-app .pp-sidebar { backdrop-filter: none; }
    .pp-topbar { background: rgba(255, 255, 255, .97); }
    .po-top { background: rgba(255, 255, 255, .98); }
    .pp-app .pp-topbar { background: var(--pp-surface); }
}

/* Settings → Test layout and Test packages: one line per row, ▲▼ in front; on phones the options go under the name. */
.tl-rows { display: flex; flex-direction: column; gap: .4rem; }
.tl-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .5rem .6rem; border: 1px solid var(--pp-line); border-radius: 10px; background: var(--pp-surface); }
.tl-row.tl-head { background: var(--pp-surface-3); }
.tl-move { display: flex; gap: .25rem; flex-shrink: 0; }
.tl-move .btn { min-width: 2.2rem; }
.tl-name { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.tl-opts { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
@media (max-width: 575.98px) { .tl-opts { flex-basis: 100%; } .tl-compact .tl-opts { flex-basis: auto; } }
.tl-own summary { cursor: pointer; color: var(--pp-primary, #08797a); width: fit-content; }
.tl-own textarea { min-height: 2.4rem; }

/* ===== "Install SmartLAB Web" bar (partials/pwa-install) ===== */
.pwa-bar { position: fixed; z-index: 1090; inset-inline-start: 1rem; bottom: 1rem; width: min(440px, calc(100% - 2rem)); display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
    background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 16px; padding: .85rem 1rem; box-shadow: 0 24px 50px -20px rgba(15, 23, 42, .45); font-size: .92rem; line-height: 1.4; }
.pwa-bar[hidden] { display: none; }
.pwa-bar .pwa-ic { height: 40px; width: auto; flex-shrink: 0; }
.pwa-bar .pwa-tx { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.pwa-bar .pwa-tx span { color: #475569; font-size: .85rem; }
.pwa-bar .pwa-ios, .pwa-bar.ios .pwa-std, .pwa-bar.ios .pwa-go { display: none; }
.pwa-bar.ios .pwa-ios { display: inline; }
.pwa-bar .pwa-btns { display: flex; gap: .5rem; flex-wrap: wrap; margin-inline-start: auto; }
.pwa-bar button { font: inherit; font-weight: 600; border-radius: 10px; padding: .5rem .95rem; min-height: 40px; cursor: pointer; white-space: nowrap; }
.pwa-bar .pwa-go { background: #2563eb; color: #fff; border: 1px solid #2563eb; }
.pwa-bar .pwa-go:hover { background: #1d4ed8; }
.pwa-bar .pwa-no { background: transparent; color: #475569; border: 1px solid #e2e8f0; }
.pwa-bar button:focus-visible { outline: 3px solid rgba(37, 99, 235, .4); outline-offset: 2px; }
@media (max-width: 575.98px) { .pwa-bar { inset-inline: .75rem; bottom: .75rem; width: auto; } }

/* ---------- Owner → Website analytics ---------- */
.an-filter .an-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.an-bar .lbl { width: 46%; max-width: 260px; color: var(--pp-text); }
.an-bar .val { width: 64px; }
.an-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--pp-line-soft); }
.an-mini div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; } .an-mini span { font-size: .8rem; color: var(--pp-muted); } .an-mini b { font-size: 1.05rem; color: var(--pp-ink); }
@media (max-width: 767.98px) { .an-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-live > .flex-grow-1, .an-path > span, .an-steps li > span { min-width: 0; }
.an-live { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--pp-line-soft); } .an-live:last-child { border-bottom: 0; }
.an-dev { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--pp-bg); color: var(--pp-brand); }
.an-path { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; font-size: .85rem; border-bottom: 1px solid var(--pp-line-soft); min-width: 0; } .an-path:last-child { border-bottom: 0; }
.an-path bdi { min-width: 0; max-width: 40%; } .an-arrow { flex-shrink: 0; color: var(--pp-muted); }
[dir="rtl"] .an-arrow { transform: scaleX(-1); }
.an-page { max-width: 420px; } .an-src { max-width: 220px; }
.an-glance td, .an-glance th { padding-inline: .25rem; }
.an-dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0; font-size: .875rem; } .an-dl dt { color: var(--pp-muted); font-weight: 500; } .an-dl dd { margin: 0; min-width: 0; color: var(--pp-ink); }
.an-visit { padding: .9rem 0; border-bottom: 1px solid var(--pp-line-soft); } .an-visit:first-of-type { padding-top: 0; } .an-visit:last-child { border-bottom: 0; }
.an-steps { list-style: none; margin: 0; padding-inline-start: 1rem; border-inline-start: 2px solid var(--pp-line-soft); counter-reset: step; }
.an-steps li { display: flex; gap: .75rem; align-items: baseline; padding: .3rem 0; position: relative; min-width: 0; }
.an-steps li::before { counter-increment: step; content: counter(step); position: absolute; inset-inline-start: -1.6rem; top: .35rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--pp-brand); color: #fff; font-size: .65rem; display: grid; place-items: center; }
@media (max-width: 767.98px) { .an-when { min-width: 6.5rem; } }

/* ---------- Doctor page (/d/…): lab logo and name in the top bar ---------- */
.dp-brand { min-width: 0; }
.dp-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--pp-line); flex-shrink: 0; }
.dp-logo.ph { display: grid; place-items: center; color: #fff; background: var(--pp-brand); border: 0; }
.dp-lab { font-size: 1rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 22rem; }
@media (max-width: 575.98px) { .dp-lab { font-size: .9rem; max-width: 13rem; } }

/* Past results (visits side by side): the test name stays in view while the visit columns scroll inside the card;
   long names wrap so the values show on phones. */
.dr-results th:first-child, .dr-results td:first-child { position: sticky; left: 0; z-index: 1; background: var(--pp-surface); white-space: normal; }
[dir="rtl"] .dr-results th:first-child, [dir="rtl"] .dr-results td:first-child { left: auto; right: 0; }
.dr-results tr.table-light th:first-child { background: var(--bs-table-bg, #f8f9fa); }
.dr-results td:not(:first-child), .dr-results thead th:not(:first-child) { min-width: 5.5rem; }
.table-responsive > .table.dr-results { min-width: 0; } /* only as wide as its visits: one visit fits a phone */
.dr-results .dr-name { min-width: 8rem; max-width: 16rem; }
@media (max-width: 575.98px) { .dr-results .dr-name { max-width: 9.5rem; } }

/* Manage Tests → Your price: fits a phone (name, price box, buttons) with no sideways scroll */
@media (max-width: 575.98px) {
    .pp-prices > :not(caption) > * > * { padding-left: .35rem; padding-right: .35rem; }
    .pp-prices > tbody > tr > td:nth-child(3) { overflow-wrap: anywhere; font-size: .92em; } /* a very long test name breaks */
}

/* Lab Profile → Logo shape on reports: shape chips and the 200 px frame the logo is moved and zoomed in */
.lp-shape { position: relative; cursor: pointer; }
.lp-shape input { position: absolute; opacity: 0; pointer-events: none; }
.lp-shape span { display: inline-block; padding: .4rem .9rem; border: 2px solid var(--pp-line); border-radius: 999px; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.lp-shape input:checked + span { border-color: var(--pp-brand); background: color-mix(in srgb, var(--pp-brand) 8%, transparent); }
.lp-shape input:focus-visible + span { outline: 2px solid var(--pp-brand); outline-offset: 2px; }
.lp-crop-wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.lp-crop-wrap[hidden] { display: none; }
.lp-crop { position: relative; width: 200px; height: 200px; flex-shrink: 0; overflow: hidden; background: #fff; cursor: grab; touch-action: none;
    box-shadow: 0 0 0 2px var(--pp-brand), 0 8px 20px -10px rgba(15,23,42,.45); }
.lp-crop:focus-visible { outline: 3px solid color-mix(in srgb, var(--pp-brand) 45%, transparent); outline-offset: 3px; }
.lp-crop[data-shape="circle"] { border-radius: 50%; }
.lp-crop[data-shape="rounded"] { border-radius: 18%; }
.lp-crop img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; transform-origin: 0 0; }
[dir="rtl"] .lp-crop img { left: 0; right: auto; }

/* "Made with SmartLAB" line under the patient portal (owner, 18 Nov 2026) */
.po-wrap .made-with { text-align: center; font-size: .78rem; margin: 1.5rem 0 .5rem; }
.po-wrap .made-with a { color: var(--pp-muted, #64748b); text-decoration: none; }
.po-wrap .made-with a:hover { text-decoration: underline; }
