html {
    font-size: 16px;
    position: relative;
}

@media (min-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* NexLink-friendly timeline styling */
.timeline-container {
    width: 100%;
}

.timeline {
    background: linear-gradient(90deg, rgba(63, 94, 251, 0.35), rgba(252, 70, 107, 0.35));
    height: 8px;
    border-radius: 999px;
    position: relative;
}

.timeline-bullet {
    color: var(--bs-white);
    background-color: var(--bs-primary);
    border-radius: 999px;
    padding: 6px;
    text-align: center;
    position: absolute;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 2px solid var(--bs-body-bg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-bullet h7 {
    font-size: 14px;
    margin: 0;
}

.timeline-bullet:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

#current_state {
    background-color: var(--bs-success);
}

/* Ensure primary links look enabled when not disabled */
a.btn.btn-primary:not(.disabled):not([aria-disabled="true"]) {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

.btn-next {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

.btn-next.disabled,
.btn-next[aria-disabled="true"] {
    opacity: 0.65;
    pointer-events: none;
    filter: grayscale(0.05);
}

/* Form UX helpers */
.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 8px;
    font-weight: 600;
}

.form-section-title .badge {
    font-weight: 600;
}

.form-hint {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 992px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Progress timeline */
.tw-progress {
    position: relative;
    padding: 24px 0 34px;
}

.tw-progress-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(99, 91, 255, 0.2), rgba(99, 91, 255, 0.05));
    border: 1px solid rgba(99, 91, 255, 0.2);
}

.tw-progress-fill {
    position: absolute;
    top: 24px;
    right: 0;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #635BFF, #4F46E5);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.25);
}

.tw-step {
    position: absolute;
    top: 6px;
    transform: translateX(50%);
    display: grid;
    justify-items: center;
    gap: 6px;
    min-width: 110px;
}

.tw-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #E9ECFF;
    color: #4338CA;
    border: 2px solid #C7D2FE;
    display: grid;
    place-items: center;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.15);
}

.tw-step-label {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    text-align: center;
}

.tw-step.is-active .tw-step-dot {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.tw-step.is-active .tw-step-label {
    color: #111827;
    font-weight: 600;
}

/* Remove sidebar offset when sidebar is removed */
.app-wrapper {
    margin-right: 0 !important;
}

/* Lab tests page styling */
.labtests-page {
    background: radial-gradient(1200px 420px at 90% -10%, rgba(79, 70, 229, 0.18), transparent),
                radial-gradient(900px 380px at 10% 0%, rgba(16, 185, 129, 0.14), transparent),
                #f8fafc;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.labtests-page h2,
.labtests-page h4 {
    color: #0f172a;
}

.labtests-page .form-label {
    color: #334155;
}

.labtests-page .labTest_input {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px;
}

.labtests-page .input-group .labTest_input:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.labtests-page .input-group .labTest_input:last-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
