:root {
    --lis-ink: #061a44;
    --lis-muted: #64718a;
    --lis-line: #e4e9f2;
    --lis-bg: #f7f8fb;
    --lis-primary: #3f63e6;
    --lis-success: #13b91a;
    --lis-danger: #ef2556;
    --lis-warning: #eab308;
}

body {
    color: var(--lis-ink);
    background: var(--lis-bg);
    letter-spacing: 0;
}

.lis-shell .navbar-header {
    border-bottom: 1px solid var(--lis-line);
    box-shadow: none;
}

.lis-topbar .page-container {
    min-height: 68px;
}

.lis-global-search {
    position: relative;
    width: min(560px, 42vw);
}

.lis-global-search .form-control {
    height: 52px;
    border-color: var(--lis-line);
    font-size: 18px;
}

.lis-search-panel {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 1055;
    width: 100%;
    min-height: 58px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--lis-line);
    border-radius: 7px;
    box-shadow: 0 16px 40px rgb(15 23 42 / 12%);
}

.lis-global-search:focus-within .lis-search-panel,
.lis-search-panel.is-open {
    display: block;
}

.lis-search-tabs {
    gap: 8px;
    padding-bottom: 0;
}

.lis-search-tabs button {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 5px;
    color: var(--lis-primary);
    border: 1px solid var(--lis-primary);
    background: #fff;
    font-weight: 700;
}

.lis-search-tabs button.active {
    color: #fff;
    background: var(--lis-primary);
}

.lis-search-results {
    display: none;
    margin-top: 12px;
    border-top: 1px solid var(--lis-line);
    padding-top: 10px;
    max-height: 360px;
    overflow: auto;
}

.lis-search-panel.has-query .lis-search-results {
    display: block;
}

.lis-search-loader {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    color: var(--lis-muted);
    border-top: 1px solid var(--lis-line);
}

.lis-search-loader span {
    width: 15px;
    height: 15px;
    border: 2px solid #cdd5ff;
    border-top-color: var(--lis-primary);
    border-radius: 50%;
    animation: lis-spin 0.7s linear infinite;
}

@keyframes lis-spin {
    to { transform: rotate(360deg); }
}

.lis-search-result {
    display: block;
    padding: 10px 12px;
    color: var(--lis-ink);
    border-radius: 6px;
}

.lis-search-result:hover {
    background: #f4f6ff;
}

.lis-search-result span {
    display: block;
    margin-top: 4px;
    color: var(--lis-muted);
}

.lis-search-empty {
    display: none;
    padding: 12px;
    color: var(--lis-muted);
}

.lis-search-empty.d-block {
    display: block;
}

.lis-result-preview {
    min-height: 180px;
    padding: 16px;
    border: 1px solid var(--lis-line);
    border-radius: 6px;
    background: #f8fafc;
    white-space: pre-wrap;
}

.lis-result-context {
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid var(--lis-line);
    border-radius: 6px;
    background: #f8fafc;
}

.lis-result-context span {
    display: block;
    margin-bottom: 4px;
    color: var(--lis-muted);
    font-size: 12px;
}

.lis-result-context strong {
    color: var(--lis-ink);
}

.lis-paillasse-matrix {
    min-width: 980px;
}

.lis-paillasse-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    vertical-align: middle;
}

.lis-paillasse-layout {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--lis-line);
    border-radius: 6px;
    background: #fff;
}

.lis-paillasse-layout .btn {
    border-radius: 4px;
}

.lis-result-group + .lis-result-group {
    margin-top: 24px;
}

.lis-timeline {
    position: relative;
    display: grid;
    gap: 16px;
    padding-left: 18px;
}

.lis-timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--lis-line);
}

.lis-timeline-item {
    position: relative;
}

.lis-timeline-marker {
    position: absolute;
    left: -17px;
    top: 10px;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--lis-primary);
    box-shadow: 0 0 0 1px var(--lis-primary);
}

.lis-timeline-card {
    padding: 14px 16px;
    border: 1px solid var(--lis-line);
    border-radius: 6px;
    background: #fff;
}

.timeline-date {
    width: 112px;
}

.lis-activity-row .border-circle::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--lis-primary);
    box-shadow: 0 0 0 1px var(--lis-primary);
}

.lis-activity-row:first-child .border-circle {
    padding-top: 0 !important;
}

.lis-activity-row:last-child .border-circle {
    padding-bottom: 0 !important;
}

.lis-date-chip {
    width: auto;
    min-width: 140px;
    justify-content: center;
}

.lis-flag {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.lis-brand-area {
    min-width: 300px;
}

.lis-sidebar {
    border-right: 1px solid var(--lis-line);
}

.lis-sidebar .sidebar-logo {
    height: 84px;
    padding: 22px 24px 12px;
}

.lis-structure-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 20px 18px;
    padding: 12px 14px;
    min-height: 62px;
    border: 1px solid var(--lis-line);
    border-radius: 5px;
    color: var(--lis-ink);
    font-size: 18px;
    background: #fff;
}

.lis-structure-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #16a34a;
    background: #eefcf2;
}

.lis-sidebar .sidebar-menu > ul > li > a,
.lis-sidebar .sidebar-menu ul li a {
    border-radius: 5px;
    color: var(--lis-ink);
}

.lis-sidebar .sidebar-menu ul li a.active,
.lis-sidebar .sidebar-menu ul li a:hover {
    color: var(--lis-primary);
    background: #eef2ff;
}

.lis-sidebar .menu-title {
    color: #98a2b3;
    font-weight: 700;
}

.lis-page-wrapper .content {
    padding-top: 34px;
}

.lis-floating-settings {
    position: fixed;
    right: 0;
    top: 38%;
    z-index: 1040;
    width: 48px;
    height: 44px;
    border-radius: 5px 0 0 5px;
}

.lis-notif-icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.lis-notification-toggle {
    position: relative;
    overflow: visible;
}

.lis-notification-toggle.has-unread i {
    color: var(--lis-danger);
    animation: lis-notification-blink 0.9s ease-in-out infinite;
}

.lis-notification-badge {
    position: absolute;
    top: -4px;
    right: -7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    color: #fff;
    background: var(--lis-danger);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.lis-notification-badge.d-none {
    display: none !important;
}

.lis-worklist-refreshing {
    opacity: 0.62;
    transition: opacity 0.18s ease;
}

.lis-worklist-updated {
    animation: lis-worklist-flash 1.4s ease;
}

.lis-alert-permission {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2050;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid var(--lis-line);
    border-radius: 7px;
    background: #fff;
}

.lis-alert-permission strong,
.lis-alert-permission span {
    display: block;
}

.lis-alert-permission strong {
    color: var(--lis-ink);
    font-size: 14px;
}

.lis-alert-permission span {
    margin-top: 3px;
    color: var(--lis-muted);
    font-size: 13px;
    line-height: 1.35;
}

.lis-alert-permission .btn {
    flex: 0 0 auto;
}

@keyframes lis-notification-blink {
    0%, 100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    35% {
        opacity: 0.3;
        transform: rotate(-12deg) scale(1.05);
    }
    70% {
        opacity: 1;
        transform: rotate(12deg) scale(1.05);
    }
}

@keyframes lis-worklist-flash {
    0% { box-shadow: inset 4px 0 0 var(--lis-success); }
    100% { box-shadow: inset 4px 0 0 transparent; }
}

.lis-tabs {
    gap: 22px;
    border: 0;
}

.lis-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    padding: 10px 22px;
    color: var(--lis-ink);
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 500;
    background: transparent;
}

.lis-tabs .nav-link.active {
    border-color: #b9c2d6;
    background: #fff;
}

.lis-tabs .badge {
    border-radius: 999px;
    min-width: 26px;
    height: 26px;
    padding: 6px 8px;
}

.lis-filter-card,
.lis-table-card,
.lis-detail-card,
.lis-summary-card {
    border: 1px solid var(--lis-line);
    border-radius: 6px;
    box-shadow: none;
}

.lis-filter-card {
    padding: 28px 26px;
}

.lis-table-card .card-header {
    padding: 20px 24px;
    background: #fff;
}

.lis-table-card .card-body {
    padding: 22px 24px;
}

.lis-table-card table thead th {
    padding: 18px 26px;
    color: var(--lis-ink);
    background: #eef1f7;
    border-bottom: 0;
    white-space: nowrap;
}

.lis-table-card table tbody td {
    padding: 16px 26px;
    vertical-align: middle;
    border-color: var(--lis-line);
}

.lis-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #edf1f7;
}

.lis-action-danger {
    color: var(--lis-danger);
}

.lis-progress {
    width: 108px;
    height: 24px;
    border-radius: 5px;
    background: #e3e7ef;
}

.lis-progress .progress-bar {
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.lis-stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 110px;
    padding: 26px 36px;
}

.lis-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 6px;
    font-size: 28px;
}

.lis-patient-panel {
    padding: 24px;
}

.lis-cube {
    width: 100px;
    height: 100px;
    border: 1px dashed var(--lis-line);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
}

.lis-vertical-list dt {
    color: var(--lis-ink);
    font-weight: 700;
}

.lis-vertical-list dd {
    margin-bottom: 18px;
    color: #475569;
}

.lis-auth-copy h1 {
    line-height: 1.18;
}

.lis-auth-logo {
    max-width: 190px;
}

.lis-auth-card {
    border-radius: 7px;
}

.lis-tube-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);
}

.tube-edta { background: #7c3aed; }
.tube-sec { background: #ef4444; }
.tube-citrate { background: #2563eb; }
.tube-heparine { background: #16a34a; }

.lis-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    min-width: 280px;
    border-radius: 6px;
}

.lis-order-form {
    padding-bottom: 86px;
}

.lis-test-choice {
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.lis-test-choice:has(.form-check-input:checked) {
    border-color: var(--lis-primary) !important;
    background: #f4f6ff;
}

.lis-selected-tests {
    max-height: 420px;
    overflow: auto;
}

.lis-dropzone .form-control {
    max-width: 100%;
}

.lis-form-actions-sticky {
    position: fixed;
    left: 276px;
    right: 0;
    bottom: 0;
    z-index: 1020;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--lis-line);
    box-shadow: 0 -10px 26px rgb(15 23 42 / 8%);
    backdrop-filter: blur(8px);
}

.mini-sidebar .lis-form-actions-sticky {
    left: 72px;
}

@media (max-width: 1199px) {
    .lis-brand-area {
        min-width: auto;
    }
    .lis-global-search {
        width: min(480px, 38vw);
    }
}

@media (max-width: 767px) {
    .lis-page-wrapper .content {
        padding: 22px 14px 0;
    }
    .lis-filter-card {
        padding: 18px;
    }
    .lis-tabs {
        gap: 8px;
    }
    .lis-tabs .nav-link {
        width: 100%;
        justify-content: space-between;
    }
    .lis-form-actions-sticky {
        left: 0;
        padding-right: 14px;
        padding-left: 14px;
    }
}
