:root {
    --udc-ink: #1c0950;
    --udc-teal: #001f66;
    --udc-teal-dark: #00164c;
    --udc-pink: #f7345e;
    --udc-gold: #fad776;
    --udc-mist: #f5f5fa;
    --udc-line: #e8e5f0;
    --udc-shadow: 0 1rem 2.5rem rgb(28 9 80 / 9%);
}

body {
    background:
        radial-gradient(ellipse at 8% 0%, rgb(230 226 244 / 62%), transparent 34rem),
        var(--udc-mist);
    color: #302d3b;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
}

main.container,
.card,
.card-body,
.row > *,
.navbar .container,
.navbar-collapse {
    min-width: 0;
}

.form-control,
.form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.app-navbar {
    background: #fff;
    border-bottom: 1px solid rgb(28 9 80 / 8%);
    box-shadow: 0 .3rem 1.2rem rgb(28 9 80 / 7%);
}

.app-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    padding-top: .35rem;
    padding-bottom: .35rem;
}

.app-navbar .navbar-brand img {
    display: block;
    width: clamp(150px, 17vw, 207px);
    height: auto;
}

.app-navbar .nav-link {
    border-radius: .5rem;
    margin: .15rem .1rem;
    padding-right: .75rem;
    padding-left: .75rem;
    color: #302d3b;
    font-weight: 600;
    transition: background-color .18s ease, color .18s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus-visible {
    background: #f4f1fb;
    color: var(--udc-ink);
}

.btn-primary {
    --bs-btn-bg: var(--udc-teal);
    --bs-btn-border-color: var(--udc-teal);
    --bs-btn-hover-bg: var(--udc-teal-dark);
    --bs-btn-hover-border-color: var(--udc-teal-dark);
    --bs-btn-active-bg: #00123f;
    --bs-btn-active-border-color: #00123f;
}

.btn {
    border-radius: .65rem;
    font-weight: 600;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
a:focus-visible {
    outline: 3px solid rgb(247 52 94 / 28%);
    outline-offset: 2px;
}

.eyebrow {
    color: var(--udc-pink);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--udc-ink);
    font-family: "Rubik", "Inter", "Segoe UI", Arial, sans-serif;
    letter-spacing: -.025em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    overflow-wrap: anywhere;
}

button,
input,
select,
textarea {
    font: inherit;
}

.content-card {
    overflow: hidden;
    overflow-wrap: anywhere;
    border: 1px solid rgb(232 229 240 / 90%);
    border-radius: 1rem;
    background-color: #fff;
    box-shadow: 0 .35rem 1.3rem rgb(28 9 80 / 5%);
    transition: box-shadow .18s ease, transform .18s ease;
}

.content-card:hover {
    box-shadow: 0 .65rem 1.7rem rgb(28 9 80 / 9%);
}

.content-card > .card-header {
    background: linear-gradient(110deg, #f8f6fc, #fff);
    border-bottom-color: var(--udc-line);
    color: var(--udc-ink);
    padding: 1rem 1.25rem;
}

.content-card .table {
    --bs-table-hover-bg: #faf8fd;
    margin-bottom: 0;
}

.content-card .table thead th {
    background: #f8f6fb;
    border-bottom: 1px solid var(--udc-line);
    color: #625a73;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.content-card .table > :not(caption) > * > * {
    padding: .9rem 1rem;
    border-bottom-color: #f0edf5;
}

.content-card .table tbody tr:last-child > * {
    border-bottom-width: 0;
}

.record-sheet {
    border: 1px solid #d7d0e3;
    border-radius: 1rem;
    background: rgb(255 255 255 / 62%);
    padding: 1rem;
    box-shadow: 0 .3rem 1rem rgb(28 9 80 / 4%);
}

.record-sheet > :last-child {
    margin-bottom: 0 !important;
}

.required-mark {
    color: #b42318;
}

.record-value {
    min-height: 1.5rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bowel-chart {
    display: block;
    width: 100%;
    height: auto;
}

.record-branding {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-inline: 1rem;
    margin-bottom: 1rem;
}

.record-branding-logo {
    display: block;
    width: min(42%, 207px);
    max-height: 72px;
    object-fit: contain;
    object-position: left top;
}

.record-branding-client,
.record-branding-placeholder {
    display: block;
    width: 112px;
    height: 128px;
    flex: 0 0 auto;
    border: 1px solid #d7d0e3;
    object-fit: cover;
    object-position: center;
}

.record-branding-placeholder {
    display: grid;
    place-items: center;
    padding: .5rem;
    color: #625a73;
    font-size: .75rem;
    text-align: center;
}

.client-photo-preview {
    display: block;
    width: 64px;
    height: 72px;
    flex: 0 0 auto;
    border: 1px solid #d7d0e3;
    object-fit: cover;
}

.client-photo-empty {
    display: grid;
    place-items: center;
    color: #625a73;
    font-size: .7rem;
    text-align: center;
}

.form-control,
.form-select {
    border-color: #ddd9e8;
    border-radius: .65rem;
    min-height: 2.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #ed8ba0;
    box-shadow: 0 0 0 .22rem rgb(247 52 94 / 13%);
}

.form-label {
    color: #383246;
    font-size: .92rem;
    font-weight: 600;
}

.alert {
    border-radius: .75rem;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 8% 8%, rgb(224 218 245 / 80%), transparent 34rem),
        radial-gradient(ellipse at 92% 92%, rgb(255 226 231 / 58%), transparent 32rem),
        #f6f5fa;
}

.login-layout {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.login-card {
    display: grid;
    width: min(100%, 66rem);
    min-height: 37rem;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    align-self: center;
    overflow: hidden;
    border: 1px solid rgb(232 229 240 / 90%);
    border-radius: 1.4rem;
    background: #fff;
    box-shadow: 0 1.5rem 4rem rgb(28 9 80 / 15%);
}

.login-welcome {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(2rem, 4vw, 3.25rem);
    background:
        radial-gradient(circle at 88% 14%, rgb(255 255 255 / 13%), transparent 14rem),
        linear-gradient(150deg, #1c0950, #26136a 68%, #36247d);
    color: #fff;
    isolation: isolate;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    border-radius: .75rem;
    background: #fff;
    padding: .35rem .7rem;
}

.login-brand img {
    display: block;
    width: clamp(150px, 18vw, 207px);
    height: auto;
}

.login-welcome-copy,
.login-highlights {
    position: relative;
    z-index: 1;
}

.login-kicker {
    margin-bottom: .85rem;
    color: #ffb6c4;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.login-welcome h1 {
    max-width: 24rem;
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 650;
    line-height: 1.12;
}

.login-intro {
    max-width: 25rem;
    margin: 0;
    color: rgb(255 255 255 / 79%);
    font-size: 1rem;
    line-height: 1.7;
}

.login-highlights {
    display: grid;
    gap: .85rem;
    margin-top: 2.5rem;
}

.login-highlights > div {
    display: flex;
    align-items: center;
    gap: .8rem;
    color: rgb(255 255 255 / 91%);
    font-size: .9rem;
}

.login-highlight-icon {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 23%);
    border-radius: .65rem;
    background: rgb(255 255 255 / 9%);
    color: #ffe9a8;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.login-decoration {
    position: absolute;
    z-index: 0;
    display: block;
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: 50%;
    pointer-events: none;
}

.login-decoration-one {
    top: 17%;
    right: -9rem;
    width: 22rem;
    height: 22rem;
    box-shadow: 0 0 0 2.4rem rgb(255 255 255 / 3%), 0 0 0 4.8rem rgb(255 255 255 / 2%);
}

.login-decoration-two {
    right: 12%;
    bottom: -10rem;
    width: 19rem;
    height: 19rem;
    background: rgb(255 255 255 / 3%);
}

.login-panel {
    display: grid;
    min-width: 0;
    place-items: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.login-form-wrap {
    width: min(100%, 25rem);
}

.login-heading {
    margin-bottom: .55rem;
    font-weight: 700;
}

.login-subtitle {
    margin-bottom: 2rem;
    color: #687d7a;
    line-height: 1.6;
}

.login-panel .form-control {
    min-height: 3rem;
    padding: .75rem .9rem;
}

.login-panel .form-control::placeholder {
    color: #9aa9a6;
}

.login-submit {
    --bs-btn-bg: var(--udc-pink);
    --bs-btn-border-color: var(--udc-pink);
    --bs-btn-hover-bg: #dc244c;
    --bs-btn-hover-border-color: #dc244c;
    display: flex;
    min-height: 3.1rem;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    box-shadow: 0 .45rem 1rem rgb(247 52 94 / 22%);
}

.login-submit span {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform .16s ease;
}

.login-submit:hover span {
    transform: translateX(3px);
}

.login-help {
    margin: 1.5rem 0 0;
    color: #748582;
    font-size: .86rem;
    line-height: 1.5;
    text-align: center;
}

.navbar-account .navbar-text {
    color: #4a4358;
}

.navbar-account .btn-outline-primary {
    --bs-btn-color: var(--udc-ink);
    --bs-btn-border-color: #d8d1e6;
    --bs-btn-hover-bg: var(--udc-ink);
    --bs-btn-hover-border-color: var(--udc-ink);
    --bs-btn-hover-color: #fff;
}

.login-footer {
    align-self: center;
    margin: 1.25rem 0 0;
    color: #6b817d;
    font-size: .82rem;
    text-align: center;
}

.record-filter-select {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-actions .btn {
    min-height: 2.75rem;
}

.navbar-user-name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagination {
    flex-wrap: wrap;
    gap: .25rem;
}

.client-edit-form {
    min-width: 14rem;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.table-responsive:focus-visible {
    outline: 3px solid rgb(247 52 94 / 40%);
    outline-offset: -3px;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
        border: 1px solid #555;
        padding: 5mm;
    }

    body {
        background: #fff;
        color: #111;
        font-size: 10pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print,
    nav {
        display: none !important;
    }

    .d-print-flex {
        display: flex !important;
    }

    main.container {
        max-width: none !important;
        padding: 0 !important;
    }

    .print-record-next {
        break-before: page;
        page-break-before: always;
    }

    .record-sheet {
        border: 0;
        border-radius: 0;
        background: #fff;
        padding: 0;
        box-shadow: none;
    }

    .content-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid-page;
        page-break-inside: avoid;
        margin-bottom: .5rem !important;
    }

    .card-body,
    .card-header {
        padding: .5rem !important;
    }

    .card-header {
        background: #f3f1f8 !important;
    }

    .record-value {
        color: #111;
    }

    .record-branding-logo {
        width: 55mm;
        max-height: 25mm;
        object-fit: contain;
    }

    .record-branding {
        padding-inline: 8mm;
    }

    .record-branding-client,
    .record-branding-placeholder {
        width: 28mm;
        height: 32mm;
    }

    .print-record {
        break-inside: auto;
    }
}

@media screen and (max-width: 1199.98px) {
    .navbar-collapse {
        padding-top: .5rem;
    }

    .navbar-account {
        justify-content: space-between;
        flex-wrap: wrap;
        padding: .5rem 0;
    }
}

@media screen and (max-width: 575.98px) {
    .container {
        --bs-gutter-x: 1.25rem;
    }

    main.container {
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
    }

    .card-body {
        padding: 1rem;
    }

    .content-card > .card-header {
        padding: .85rem 1rem;
    }

    .navbar-user-name {
        max-width: min(65vw, 14rem);
    }

    .record-filters .card-body {
        padding: .85rem;
    }

    .filter-actions .btn {
        flex: 1 1 0;
    }

}

@media screen and (max-width: 767.98px) {
    .app-navbar .navbar-brand img {
        width: clamp(145px, 48vw, 185px);
    }

    .record-branding {
        gap: clamp(.5rem, 3vw, 1.25rem);
        padding-inline: clamp(.5rem, 4vw, 1rem);
    }

    .record-branding-logo {
        width: min(58%, 180px);
        min-width: 0;
        flex: 0 1 58%;
    }

    .record-branding-client,
    .record-branding-placeholder {
        width: clamp(64px, 22vw, 96px);
        height: clamp(76px, 29vw, 112px);
    }

    .login-layout {
        justify-content: flex-start;
        padding-top: 1rem;
        padding-bottom: 1.25rem;
    }

    .login-card {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        border-radius: 1.1rem;
    }

    .login-welcome {
        gap: 2.4rem;
        padding: 1.5rem;
    }

    .login-welcome h1 {
        max-width: 32rem;
        font-size: clamp(1.75rem, 7vw, 2.35rem);
    }

    .login-intro {
        max-width: 34rem;
        font-size: .94rem;
    }

    .login-highlights {
        grid-template-columns: 1fr;
        gap: .65rem;
        margin-top: 0;
    }

    .login-panel {
        padding: 2rem 1.5rem;
    }

    .login-subtitle {
        margin-bottom: 1.5rem;
    }

    .login-help {
        margin-top: 1.2rem;
    }
}

@media screen and (max-width: 359.98px) {
    .login-welcome,
    .login-panel {
        padding-right: 1.15rem;
        padding-left: 1.15rem;
    }
}

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