@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --oc-purple: #413C7B;
    --oc-text: #19255B;
    --oc-yellow: #FFB500;
    --oc-red: #C8364D;
    --oc-border: #E6E8F0;
    --oc-soft: #F8F8FC;
    --oc-muted: #6B7280;
}

html,
body,
.portal,
.container,
.container-fluid,
.crmEntityFormView,
.entity-form,
.webform,
.form-control,
input,
select,
textarea,
button,
.btn,
label,
.nav,
.navbar {
    font-family: 'Poppins', Arial, sans-serif !important;
    color: var(--oc-text);
    font-weight: 400;
}

body {
    background: #FFFFFF !important;
    font-size: 14px;
    line-height: 1.55;
}

/* Header */
.navbar,
.navbar-static-top,
.navbar-inverse,
.navbar-default {
    background: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 1px 0 rgba(25, 37, 91, 0.08);
    min-height: 72px;
}

.navbar a,
.navbar-nav > li > a,
.navbar-brand {
    color: var(--oc-purple) !important;
    font-weight: 500 !important;
}

.navbar a:hover,
.navbar-nav > li > a:hover {
    color: var(--oc-text) !important;
}

/* Remove strong coloured strips where possible */
.page-heading,
.breadcrumb,
.navbar + div,
.navbar-static-top + div {
    border: none !important;
}

/* Layout */
.container,
.container-fluid {
    max-width: 1040px;
}

/* Main form card */
.crmEntityFormView,
#EntityFormPanel {
    background: #FFFFFF !important;
    border: 1px solid var(--oc-border) !important;
    border-radius: 18px;
    padding: 34px 40px;
    box-shadow: 0 18px 45px rgba(25, 37, 91, 0.08);
    margin-top: 28px;
    margin-bottom: 48px;
}

/* Headings */
fieldset legend,
.section-title,
h1,
h2,
h3,
.crmEntityFormView h2,
.crmEntityFormView .tab-title {
    color: var(--oc-text) !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em;
}

fieldset legend {
    border: none !important;
    font-size: 24px !important;
    margin: 28px 0 18px;
    padding: 0;
}

fieldset:first-of-type legend {
    margin-top: 0;
}

fieldset legend:after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    background: var(--oc-yellow);
    border-radius: 3px;
    margin-top: 8px;
}

/* Labels */
.control-label,
label {
    color: var(--oc-text) !important;
    font-weight: 500 !important;
    font-size: 13px;
    margin-bottom: 7px;
}

span.required,
.required label:after,
.required .control-label:after,
label.required:after {
    color: var(--oc-red) !important;
}

/* Fields */
.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    border: 1px solid #D9DCE8 !important;
    border-radius: 10px !important;
    min-height: 44px;
    padding: 10px 14px !important;
    color: var(--oc-text) !important;
    background-color: #FFFFFF !important;
    box-shadow: none !important;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--oc-purple) !important;
    box-shadow: 0 0 0 3px rgba(65, 60, 123, 0.14) !important;
    outline: none !important;
}

::placeholder {
    color: #9AA0B5 !important;
}

/* Form spacing */
.form-group,
.crmEntityFormView .cell,
.crmEntityFormView td {
    margin-bottom: 18px;
}

/* Radio and checkbox */
input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--oc-purple);
    margin-right: 8px;
}

.radio label,
.checkbox label {
    color: var(--oc-text) !important;
    font-weight: 400 !important;
    padding-left: 4px;
    margin-bottom: 8px;
}

/* Step tabs */
.nav-tabs,
.crmEntityFormView .nav-tabs,
ul.nav.nav-tabs {
    border: none !important;
    background: var(--oc-soft);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 24px;
}

.nav-tabs > li > a,
.crmEntityFormView .nav-tabs > li > a {
    border: none !important;
    border-radius: 10px !important;
    color: var(--oc-text) !important;
    font-weight: 500;
    padding: 11px 18px;
    background: transparent !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus,
.crmEntityFormView .nav-tabs > li.active > a {
    background: var(--oc-purple) !important;
    color: #FFFFFF !important;
    border: none !important;
}

/* Buttons */
.btn-primary,
button[type="submit"],
input[type="submit"],
.actions .btn-primary,
.webform-next,
.next,
.submit-btn {
    background: var(--oc-purple) !important;
    border: 1px solid var(--oc-purple) !important;
    color: #FFFFFF !important;
    border-radius: 9px !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(65, 60, 123, 0.22);
    transition: all 0.18s ease;
}

.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.actions .btn-primary:hover,
.webform-next:hover,
.next:hover {
    background: #353069 !important;
    border-color: #353069 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(65, 60, 123, 0.28);
}

.btn-default,
.btn-secondary,
.webform-previous,
.previous {
    background: #FFFFFF !important;
    border: 1px solid var(--oc-purple) !important;
    color: var(--oc-purple) !important;
    border-radius: 9px !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
}

.btn-default:hover,
.btn-secondary:hover,
.webform-previous:hover,
.previous:hover {
    background: #F6F5FC !important;
}

/* Validation */
.validation-summary-errors,
.alert-danger,
.error,
.field-validation-error {
    color: var(--oc-red) !important;
    border-color: rgba(200, 54, 77, 0.25) !important;
    background: rgba(200, 54, 77, 0.06) !important;
    border-radius: 12px;
}

/* Help text */
.description,
.help-block,
.form-text,
small {
    color: var(--oc-muted) !important;
    font-weight: 400;
}

a {
    color: var(--oc-purple);
}

a:hover {
    color: var(--oc-text);
}

/* Mobile */
@media (max-width: 768px) {
    .crmEntityFormView,
    #EntityFormPanel {
        padding: 24px 18px;
        border-radius: 14px;
        box-shadow: none;
    }

    fieldset legend {
        font-size: 21px !important;
    }

    .nav-tabs > li,
    .crmEntityFormView .nav-tabs > li {
        float: none;
        display: block;
        width: 100%;
    }

    .nav-tabs > li > a {
        text-align: center;
    }
}

/* --------------------------------------------------
   1 Clinical refinements
   -------------------------------------------------- */

/* 1. Remove leftover navigation separators, e.g. the small line after Home */
.navbar .divider-vertical,
.navbar-nav .divider-vertical,
.menu-bar .divider-vertical,
.weblinks .divider-vertical {
    display: none !important;
    border: none !important;
    width: 0 !important;
    margin: 0 !important;
}

/* 2. Slightly enlarge logo across pages */
.navbar-brand img,
.navbar .navbar-brand img,
.navbar-header .navbar-brand img {
    max-height: 54px !important;
    height: 54px !important;
    width: auto !important;
}

/* Keep the logo vertically aligned after increasing size */
.navbar-brand,
.navbar-header .navbar-brand {
    min-height: 78px !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* 3. More breathing room between radio-question labels and answers */
.crmEntityFormView .control-label + .control,
.crmEntityFormView label + .control,
.crmEntityFormView .radio,
.crmEntityFormView .checkbox {
    margin-top: 8px !important;
}

/* Improve spacing within radio-button groups */
.crmEntityFormView input[type="radio"] {
    margin-top: 2px !important;
    margin-right: 9px !important;
}

.crmEntityFormView .radio label,
.crmEntityFormView span.radio label,
.crmEntityFormView table.picklist label,
.crmEntityFormView .picklist label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
}

/* Add space below the whole radio group before the next question */
.crmEntityFormView .picklist,
.crmEntityFormView table.picklist,
.crmEntityFormView .radio-list,
.crmEntityFormView .boolean-radio {
    margin-top: 8px !important;
    margin-bottom: 18px !important;
}