/* EMR page (/Erecords/)
   Same patterns as Calendar, Online Booking, Client Management and Telemedicine. */

.emr-page {
    --emr-ink: #111827;
    --emr-text: #58616f;
    --emr-muted: #7b8492;
    --emr-border: #e8edef;
    --emr-teal: #137f8c;
    --emr-gold: #d99a2b;
    background: #ffffff;
    color: var(--emr-ink);
    float: left;
    overflow: hidden;
    width: 100%;
}

header {
    background-color: #001d33;
}

.emr-page * {
    box-sizing: border-box;
}

.emr-page ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.emr-page figure {
    margin: 0;
}

.emr-container {
    margin: 0 auto;
    max-width: 1210px;
    padding: 0 24px;
    width: 100%;
}

.emr-section {
    padding: 72px 0;
}

.emr-nowrap {
    white-space: nowrap;
}

/* Type */
.emr-page h1,
.emr-page h2,
.emr-page h3 {
    color: var(--emr-ink);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.emr-page h1 {
    font-size: 56px;
    line-height: 1.05;
}

.emr-page h2 {
    font-size: 38px;
    line-height: 1.16;
    text-wrap: balance;
}

.emr-page p {
    color: var(--emr-text);
    font-size: 17px;
    line-height: 1.58;
    margin: 0;
}

.emr-eyebrow {
    color: #58616f !important;
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1.4 !important;
    margin: 0 0 12px !important;
}

/* Hero */
.emr-hero {
    background:
        radial-gradient(circle at 10% 28%, rgba(167, 234, 242, 0.55), transparent 28%),
        radial-gradient(circle at 88% 34%, rgba(255, 205, 116, 0.34), transparent 30%),
        linear-gradient(145deg, #f4fbfc 0%, #ffffff 50%, #fff8ec 100%);
    padding: 126px 0 72px;
    position: relative;
}

.emr-hero::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
    bottom: 0;
    content: "";
    height: 120px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.emr-hero > .emr-container {
    position: relative;
    z-index: 1;
}

.emr-hero-grid {
    align-items: center;
    display: grid;
    gap: 56px;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.emr-hero-copy {
    min-width: 0;
}

.emr-page .emr-lede {
    margin-top: 22px;
    max-width: 36em;
}

/* Framed landscape photo + floating cards */
.emr-visual {
    min-width: 0;
    position: relative;
}

.emr-frame {
    aspect-ratio: 3 / 2;
    background: #ffffff;
    border: 6px solid #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(42, 64, 82, 0.1);
    overflow: hidden;
    padding: 10px;
    width: 100%;
}

.emr-frame img {
    border-radius: 12px;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

/* Hero photo is 16:9; shift the 3:2 crop right so the laptop stays whole */
.emr-hero .emr-frame img {
    object-position: 62% center;
}

.emr-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(17, 24, 39, 0.04),
        0 18px 36px -12px rgba(30, 60, 80, 0.28);
    display: flex;
    font-family: 'Roboto', sans-serif;
    gap: 12px;
    padding: 12px 16px 12px 12px;
    position: absolute;
    z-index: 2;
}

.emr-card-tr { right: -26px; top: -22px; }
.emr-card-bl { bottom: -24px; left: -20px; }

.emr-card-icon {
    align-items: center;
    background: #e3f4f6;
    border-radius: 10px;
    color: var(--emr-teal);
    display: inline-flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
}

.emr-card-icon-gold {
    background: #fdf3df;
    color: #c27a12;
}

.emr-card-icon svg,
.emr-icon svg {
    display: block;
}

.emr-card-body {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.emr-card-body strong {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.emr-card-body small {
    color: #7b8492;
    font-size: 12px;
}

/* Split sections */
.emr-split {
    align-items: center;
    display: grid;
    gap: 64px;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.emr-split-reverse {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.emr-copy {
    min-width: 0;
}

.emr-copy > p {
    margin-top: 20px;
    max-width: 36em;
}

/* Copy on a white card with the brand gradient edge */
.emr-edge-card {
    background: #ffffff;
    border-radius: 6px 20px 20px 6px;
    box-shadow: 0 14px 34px rgba(30, 43, 56, 0.07);
    padding: 40px 40px 38px 44px;
    position: relative;
}

.emr-edge-card::before {
    background: linear-gradient(180deg, #29b8c7 0%, #78bd42 50%, #f2b41e 100%);
    border-radius: 4px;
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.emr-page .emr-chips-label {
    color: var(--emr-ink);
    font-size: 15px;
    font-weight: 600;
    margin-top: 26px;
}

.emr-page .emr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.emr-chips li {
    background: #f1f9fa;
    border: 1px solid #d4ecef;
    border-radius: 999px;
    color: #0f6773;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    padding: 8px 16px;
}

/* Thin teal checks (shared pattern) */
.emr-page .emr-checks {
    display: grid;
    gap: 14px;
}

.emr-page .emr-checks-2col {
    gap: 16px 48px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 auto;
    max-width: 920px;
}

.emr-checks li {
    color: var(--emr-ink);
    font-size: 17px;
    line-height: 1.5;
    padding-left: 28px;
    position: relative;
}

.emr-checks li::before {
    border: solid var(--emr-teal);
    border-width: 0 1.75px 1.75px 0;
    content: "";
    height: 11px;
    left: 5px;
    position: absolute;
    top: 0.32em;
    transform: rotate(45deg);
    width: 5.5px;
}

/* Final CTA (shared panel) */
.emr-final-cta {
    padding: 24px 0 40px;
}

.emr-cta-panel {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(242, 180, 30, 0.22), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(41, 184, 199, 0.22), transparent 55%),
        linear-gradient(135deg, #fffaf2 0%, #f1fbfc 100%);
    border: 1px solid #e6edf2;
    border-radius: 28px;
    margin: 0 auto;
    max-width: 1000px;
    padding: 80px 64px;
    text-align: center;
}

.emr-page .emr-cta-eyebrow {
    color: #b0620f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.emr-page .emr-cta-panel h2 {
    font-size: 44px;
    line-height: 1.2;
    margin: 0 0 14px;
}

.emr-page .emr-cta-lead {
    color: var(--emr-ink);
    font-size: 18px;
    font-weight: 500;
    line-height: 30px;
    margin: 0 auto;
    max-width: 640px;
}

.emr-cta-btn {
    align-items: center;
    background: linear-gradient(90deg, #e35d24 0%, #f2b41e 100%);
    border-radius: 999px;
    box-shadow: 0 14px 28px -12px rgba(227, 93, 36, 0.55);
    color: #ffffff;
    display: inline-flex;
    font-size: 16px;
    font-weight: 700;
    justify-content: center;
    line-height: 1.2;
    margin-top: 28px;
    min-height: 56px;
    padding: 16px 34px;
    text-decoration: none;
    transition: box-shadow 160ms ease;
}

.emr-cta-btn:hover,
.emr-cta-btn:focus {
    box-shadow: 0 18px 32px -12px rgba(227, 93, 36, 0.65);
    color: #ffffff;
    text-decoration: none;
}

.emr-cta-btn:focus-visible {
    box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px rgba(19, 127, 140, 0.55);
    outline: none;
}

/* Responsive */
@media (max-width: 1199px) {
    .emr-page h1 {
        font-size: 50px;
    }

    .emr-hero-grid,
    .emr-split {
        gap: 44px;
    }

    .emr-card-tr { right: -12px; }

    .emr-card-bl { left: -12px; }
}

@media (max-width: 991px) {
    .emr-hero {
        padding: 112px 0 64px;
    }

    .emr-hero-grid,
    .emr-split,
    .emr-split-reverse {
        grid-template-columns: 1fr;
    }

    .emr-hero-copy {
        text-align: center;
    }

    .emr-page .emr-lede {
        margin-left: auto;
        margin-right: auto;
    }

    .emr-visual {
        margin: 24px auto 0;
        max-width: 640px;
        width: 100%;
    }

    .emr-copy {
        margin: 0 auto;
        max-width: 640px;
        width: 100%;
    }

    .emr-records .emr-copy,
    .emr-custom .emr-copy {
        order: -1;
    }

    .emr-section {
        padding: 62px 0;
    }

    .emr-cta-panel {
        padding: 64px 48px;
    }

    .emr-page .emr-cta-panel h2 {
        font-size: 34px;
    }
}

@media (max-width: 767px) {
    .emr-container {
        padding: 0 18px;
    }

    .emr-page h1 {
        font-size: 40px;
    }

    .emr-page h2 {
        font-size: 31px;
    }

    .emr-page p {
        font-size: 16px;
    }

    .emr-page .emr-checks-2col,
    .emr-director-grid,
    .emr-library-panel {
        grid-template-columns: 1fr;
    }
}

/* Phones: cards stack above and below the photo */
@media (max-width: 575px) {
    .emr-hero {
        padding: 96px 0 40px;
    }

    .emr-page h1 {
        font-size: 34px;
    }

    .emr-page h2 {
        font-size: 28px;
    }

    .emr-section {
        padding: 52px 0;
    }

    .emr-visual {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .emr-card {
        inset: auto;
        margin: 0 auto;
        max-width: 300px;
        position: relative;
        width: 100%;
    }

    .emr-card-tr { order: 1; }

    .emr-frame { order: 2; }

    .emr-card-bl { order: 3; }

    .emr-edge-card {
        padding: 28px 22px 26px 26px;
    }

    .emr-nowrap {
        white-space: normal;
    }

    .emr-final-cta {
        padding: 10px 0 24px;
    }

    .emr-cta-panel {
        border-radius: 22px;
        padding: 48px 22px;
    }

    .emr-page .emr-cta-panel h2 {
        font-size: 28px;
    }
}

/* Section heading */
.emr-heading {
    margin: 0 auto 40px;
    max-width: 840px;
    text-align: center;
}

.emr-heading p {
    margin: 16px auto 0;
    max-width: 46em;
}

/* Thin teal checks: two columns */
.emr-page .emr-checks-2col {
    gap: 12px 32px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
}

/* Check cards (Customizable Forms) */
.emr-page .emr-check-cards {
    display: grid;
    gap: 12px;
    margin-top: 26px;
    max-width: 480px;
}

.emr-check-cards li {
    background: #ffffff;
    border: 1px solid var(--emr-border);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(30, 43, 56, 0.05);
    color: var(--emr-ink);
    font-size: 16.5px;
    line-height: 1.4;
    padding: 15px 18px 15px 48px;
    position: relative;
}

.emr-check-cards li::before {
    border: solid var(--emr-teal);
    border-width: 0 1.75px 1.75px 0;
    content: "";
    height: 11px;
    left: 22px;
    position: absolute;
    top: 50%;
    transform: translateY(-65%) rotate(45deg);
    width: 5.5px;
}

/* 500+ forms panel */
.emr-library-panel {
    align-items: center;
    background: #f8f6f2;
    border-radius: 24px;
    display: grid;
    gap: 48px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 52px 52px;
}

.emr-library-copy > p {
    margin-top: 18px;
}

.emr-page .emr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.emr-pills li {
    background: #ffffff;
    border: 1px solid #d4ecef;
    border-radius: 999px;
    color: #0f6773;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    padding: 9px 16px;
}

/* App UI cards built in HTML (sample data) */
.emr-ui {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.07);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(17, 24, 39, 0.04),
        0 22px 44px -18px rgba(30, 60, 80, 0.3);
    font-family: 'Roboto', sans-serif;
    min-width: 0;
    overflow: hidden;
}

.emr-ui-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 18px 12px;
}

.emr-ui-head strong {
    color: #111827;
    font-size: 14.5px;
}

.emr-ui-search {
    border: 1px solid #e3e8ec;
    border-radius: 999px;
    color: #9aa3ae;
    font-size: 12px;
    padding: 5px 12px;
}

.emr-ui-status {
    background: #eef8e6;
    border-radius: 999px;
    color: #3d7f20;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
}

.emr-ui-cols,
.emr-ui-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 1.3fr 1.1fr 88px;
    padding: 9px 18px;
}

.emr-ui-cols {
    background: #9b3c6f;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.emr-ui-row {
    border-top: 1px solid #eef1f3;
    color: #1f2937;
    font-size: 13px;
}

.emr-ui-row span:nth-child(2) {
    color: #6b7280;
}

.emr-ui-row span:last-child {
    justify-self: end;
}

.emr-ui-add {
    border: 1px solid #c9e4e8;
    border-radius: 6px;
    color: var(--emr-teal);
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
}

.emr-ui-tag {
    background: #fdf3df;
    border-radius: 999px;
    color: #9a5f0c;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    white-space: nowrap;
}

.emr-ui-foot {
    border-top: 1px solid #eef1f3;
    color: #9aa3ae;
    font-size: 11.5px;
    padding: 10px 18px;
}

/* Signature record */
.emr-ui-sign {
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
}

.emr-sign-body {
    border-top: 1px solid #eef1f3;
    padding: 16px 18px 18px;
}

.emr-sign-grid {
    display: grid;
    gap: 6px 10px;
    grid-template-columns: 1fr 1fr 60px;
    margin-bottom: 14px;
}

.emr-sign-grid span {
    color: #7b8492;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.emr-sign-grid b {
    background: #f6f8f9;
    border-radius: 6px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 10px;
}

.emr-sign-line {
    align-items: end;
    border-bottom: 1px solid #e3e8ec;
    display: grid;
    gap: 0 12px;
    grid-template-columns: auto 1fr auto;
    padding: 6px 0 8px;
}

.emr-sign-line svg {
    grid-row: 1 / span 2;
}

.emr-sign-line span {
    color: #7b8492;
    font-size: 11.5px;
}

.emr-sign-line em {
    color: #6b7280;
    font-size: 12px;
    font-style: normal;
}

.emr-ui-save {
    background: var(--emr-teal);
    border-radius: 8px;
    color: #ffffff;
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    margin-top: 16px;
    padding: 8px 16px;
}

/* Medical Director Dashboard */
.emr-director-grid {
    align-items: center;
    display: grid;
    gap: 56px;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
}

.emr-ui-wrap {
    min-width: 0;
    position: relative;
}

.emr-ui-tabs {
    display: flex;
    gap: 6px;
}

.emr-ui-tabs b,
.emr-ui-tabs i {
    border-radius: 999px;
    font-size: 11.5px;
    font-style: normal;
    padding: 4px 10px;
}

.emr-ui-tabs b {
    background: #e3f4f6;
    color: #0f6773;
}

.emr-ui-tabs i {
    color: #7b8492;
}

.emr-ui-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 18px 14px;
}

.emr-ui-stats span {
    border: 1px solid #e3e8ec;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
}

.emr-ui-stats small {
    color: #7b8492;
    font-size: 11px;
}

.emr-ui-stats b {
    color: #111827;
    font-size: 20px;
}


.emr-page .emr-director-list {
    gap: 14px;
}

/* Security */
.emr-security {
    padding-top: 40px;
}

.emr-page .emr-security-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.emr-security-grid li {
    background: #ffffff;
    border: 1px solid var(--emr-border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(30, 43, 56, 0.05);
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    gap: 6px;
    padding: 24px 22px;
}

.emr-security-grid .emr-icon {
    align-items: center;
    background: #fdf6e8;
    border-radius: 12px;
    color: var(--emr-gold);
    display: inline-flex;
    height: 46px;
    justify-content: center;
    margin-bottom: 10px;
    width: 46px;
}

.emr-security-grid .emr-icon svg {
    display: block;
}

.emr-security-grid strong {
    color: var(--emr-ink);
    font-size: 17px;
}

.emr-security-grid li > span:last-child {
    color: var(--emr-text);
    font-size: 14.5px;
    line-height: 1.45;
}

@media (max-width: 991px) {
    .emr-director-grid {
        gap: 36px;
        grid-template-columns: 1fr;
    }

    .emr-library-panel {
        grid-template-columns: 1fr;
        padding: 40px 28px;
    }

    .emr-page .emr-security-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emr-page .emr-check-cards {
        max-width: none;
    }
}

@media (max-width: 575px) {

    .emr-ui-cols,
    .emr-ui-row {
        grid-template-columns: 1.2fr 1fr 78px;
        padding: 8px 12px;
    }

    .emr-ui-row {
        font-size: 12px;
    }

    .emr-ui-head {
        flex-wrap: wrap;
    }

    .emr-ui-stats {
        padding: 0 12px 12px;
    }

    .emr-library-panel {
        padding: 30px 18px;
    }

    .emr-page .emr-security-grid {
        gap: 12px;
    }

    .emr-security-grid li {
        padding: 18px 14px;
    }

    .emr-security-grid strong {
        font-size: 15px;
    }

    .emr-security-grid li > span:last-child {
        font-size: 13px;
    }

    .emr-sign-line svg {
        width: 110px;
    }
}

@media (max-width: 767px) {
    .emr-page .emr-checks-2col {
        grid-template-columns: 1fr;
    }
}

/* Keep "Made Simple" together in the hero H1 at every width */
.emr-hero h1 .emr-nowrap {
    white-space: nowrap;
}

/* Forms library: pills in an even two-column grid */
.emr-page .emr-library .emr-pills {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.emr-library .emr-pills li {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 44px;
    text-align: center;
}

.emr-library h2 .emr-nowrap {
    white-space: nowrap;
}

@media (max-width: 575px) {
    .emr-page .emr-library .emr-pills {
        grid-template-columns: 1fr;
    }

    .emr-library .emr-pills li {
        justify-content: flex-start;
        text-align: left;
    }

    /* Forms library mock: drop the Form type column on phones */
    .emr-ui-library .emr-ui-cols,
    .emr-ui-library .emr-ui-row {
        grid-template-columns: 1fr auto;
    }

    .emr-ui-library .emr-ui-cols span:nth-child(2),
    .emr-ui-library .emr-ui-row span:nth-child(2) {
        display: none;
    }
}

/* Kai Form Creator */
.emr-link {
    align-items: center;
    color: var(--emr-teal) !important;
    display: inline-flex;
    font-size: 16px;
    font-weight: 700;
    gap: 6px;
    margin-top: 14px;
    text-decoration: none !important;
}

.emr-link:hover {
    color: #0f6773 !important;
    text-decoration: underline !important;
}

.emr-link:focus-visible {
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(19, 127, 140, 0.45);
    outline: none;
}

.emr-custom .emr-link {
    margin-top: 22px;
}

/* Kai AI Form Builder mock (modeled on the real screen; sample data) */
.emr-builder-visual {
    padding: 0 0 30px 28px;
}

.emr-builder .emr-ui-head {
    background: #f4f7fa;
    border-bottom: 1px solid #e6ebef;
    padding: 14px 18px;
}

.emr-builder-x {
    color: #4b5563;
    font-size: 20px;
    line-height: 1;
}

.emr-builder-body {
    display: grid;
    gap: 12px;
    padding: 16px 18px 18px;
}

.emr-builder-toggle {
    background: #f3f5f8;
    border: 1px solid #e3e8ec;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    text-align: center;
}

.emr-builder-toggle b,
.emr-builder-toggle i {
    border-radius: 7px;
    font-size: 12.5px;
    font-style: normal;
    padding: 7px;
}

.emr-builder-toggle b {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
    color: #111827;
}

.emr-builder-toggle i {
    color: #6b7280;
    font-weight: 600;
}

.emr-builder-field {
    display: grid;
    gap: 5px;
}

.emr-builder small {
    color: #374151;
    font-size: 11.5px;
    font-weight: 700;
}

.emr-builder-input {
    border: 1px solid #d6dce2;
    border-radius: 8px;
    color: #1f2937;
    font-size: 12.5px;
    padding: 8px 10px;
    position: relative;
}

.emr-builder-select::after {
    border: solid #6b7280;
    border-width: 0 1.5px 1.5px 0;
    content: "";
    height: 6px;
    position: absolute;
    right: 12px;
    top: 10px;
    transform: rotate(45deg);
    width: 6px;
}

.emr-builder-area {
    color: #4b5563;
    min-height: 54px;
}

.emr-builder-switch {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.emr-builder-on {
    background: #137f8c;
    border-radius: 999px;
    height: 20px;
    position: relative;
    width: 36px;
}

.emr-builder-on::after {
    background: #ffffff;
    border-radius: 50%;
    content: "";
    height: 16px;
    position: absolute;
    right: 2px;
    top: 2px;
    width: 16px;
}

.emr-builder-file {
    align-items: center;
    background: #f7fafb;
    border: 1px dashed #c9dfe3;
    border-radius: 8px;
    color: #374151;
    display: flex;
    font-size: 12px;
    gap: 8px;
    margin-top: -4px;
    padding: 7px 10px;
}

.emr-builder-file span {
    background: #9b3c6f;
    border-radius: 4px;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 5px;
}

.emr-builder-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 2px;
}

.emr-builder-actions span {
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 16px;
}

.emr-builder-cancel {
    border: 1px solid #1f2937;
    color: #1f2937;
}

.emr-builder-create {
    background: #111827;
    color: #ffffff;
}

.emr-builder-visual .emr-card-bl {
    bottom: 0;
    left: 0;
}

@media (max-width: 575px) {
    .emr-builder-visual {
        padding: 0;
    }
}

/* Electronic Client Records: plain white card (no gradient edge) */
.emr-plain-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(30, 43, 56, 0.07);
    padding: 40px;
}

/* "Everything in one secure record": plain text list with dot separators, not pills */
.emr-page .emr-dotlist {
    display: grid;
    gap: 8px 18px;
    grid-template-columns: repeat(3, max-content);
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.emr-dotlist li {
    color: #374151;
    font-size: 15px;
    line-height: 1.4;
    padding-left: 15px;
    position: relative;
}

.emr-dotlist li::before {
    background: #d99a2b;
    border-radius: 50%;
    content: "";
    height: 6px;
    left: 0;
    position: absolute;
    top: 0.55em;
    width: 6px;
}

@media (max-width: 575px) {
    .emr-page .emr-dotlist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 500+ forms: checklist instead of pill boxes */
.emr-page .emr-forms-list {
    gap: 12px 20px;
    grid-template-columns: max-content max-content;
    margin-top: 22px;
}

.emr-forms-list li {
    font-size: 15.5px;
    white-space: nowrap;
}

/* Not enough room for two single-line columns: one column */
@media (min-width: 992px) and (max-width: 1199px) {
    .emr-page .emr-forms-list {
        grid-template-columns: 1fr;
    }
}

.emr-keep {
    white-space: nowrap;
}

@media (max-width: 575px) {
    .emr-plain-card {
        padding: 28px 22px;
    }

    .emr-page .emr-forms-list {
        grid-template-columns: 1fr;
    }

    /* Hero and Client Records cards: compact, half on the frame edge, inset from the screen edges */
    .emr-visual:not(.emr-builder-visual) {
        display: block;
        padding: 34px 0 34px;
        position: relative;
    }

    .emr-visual:not(.emr-builder-visual) .emr-card {
        gap: 10px;
        inset: auto;
        margin: 0;
        max-width: none;
        padding: 9px 14px 9px 9px;
        position: absolute;
        width: auto;
    }

    .emr-visual:not(.emr-builder-visual) .emr-card-tr {
        right: 10px;
        top: 0;
    }

    .emr-visual:not(.emr-builder-visual) .emr-card-bl {
        bottom: 0;
        left: 10px;
    }

    .emr-visual:not(.emr-builder-visual) .emr-card-icon {
        flex: 0 0 34px;
        height: 34px;
        width: 34px;
    }

    .emr-visual:not(.emr-builder-visual) .emr-card-body strong {
        font-size: 13px;
    }

    .emr-visual:not(.emr-builder-visual) .emr-card-body small {
        font-size: 11px;
        white-space: nowrap;
    }

    /* Security cards: one per row, icon beside the title */
    .emr-page .emr-security-grid {
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .emr-security-grid li {
        column-gap: 14px;
        display: grid;
        grid-template-columns: 46px 1fr;
        padding: 16px 18px;
    }

    .emr-security-grid .emr-icon {
        grid-row: 1 / span 2;
        margin: 0;
    }
}

/* Kai Form Creator: mockup on the right on desktop so sections alternate */
@media (min-width: 992px) {
    .emr-custom .emr-split {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    .emr-custom .emr-builder-visual {
        order: 2;
    }
}

/* Automated Forms: E-Record Dashboard mock (80/20, sample data) */
.emr-auto-visual { padding: 30px 26px 0 0; }
.emr-auto-visual .emr-card-tr { right: 0; top: 0; }
.emd .emr-ui-head { background: #f4f7fa; border-bottom: 1px solid #e6ebef; padding: 12px 16px; }
.emd-body { padding: 12px 14px 14px; }
.emd-stats { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.emd-stats span { border: 1px solid #eef1f3; border-radius: 10px; display: flex; flex-direction: column; line-height: 1.3; padding: 8px 11px; }
.emd-stats small { color: #7b8492; font-size: 10.5px; }
.emd-stats b { color: #111827; font-size: 18px; }
.emd-table { border: 1px solid #eef1f3; border-radius: 10px; margin-top: 10px; overflow: hidden; }
.emd-cols, .emd-row { align-items: center; display: grid; gap: 8px; grid-template-columns: 0.95fr 1.45fr 0.8fr 76px; padding: 7px 11px; }
.emd-cols { background: #9b3c6f; color: #ffffff; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.emd-row { border-top: 1px solid #f0f2f4; color: #374151; font-size: 11.5px; }
.emd-cols + .emd-row { border-top: 0; }
.emd-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emd-client { color: #111827; font-weight: 600; }
.emd-form { align-items: center; display: flex; gap: 6px; }
.emd-auto { align-items: center; color: #b7791f; display: inline-flex; flex: 0 0 auto; font-size: 9.5px; font-style: normal; font-weight: 700; gap: 2px; }
.emd-via { color: #6b7280; }
.emd-st { border-radius: 999px; display: inline-block; font-size: 10px; font-style: normal; font-weight: 700; padding: 2px 8px; }
.emd-sig { background: #eef8e6; color: #3d7f20; }
.emd-done { background: #e3f4f6; color: #0f6773; }
.emd-sent { background: #eef1f5; color: #4b5563; }
.emd-pend { background: #fdf3df; color: #a8650f; }
.emd-log { margin-top: 10px; }
.emr-page .emd-log-title { color: #7b8492; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; margin: 0 0 4px; text-transform: uppercase; }
.emr-page .emd-log ul { list-style: none; margin: 0; padding: 0; }
.emd-log li { border-left: 2px solid #e3e8ec; color: #374151; display: flex; font-size: 11px; gap: 10px; line-height: 1.35; padding: 4px 0 4px 10px; }
.emd-log li:first-child { border-left-color: #9b3c6f; }
.emd-log time { color: #9aa3ae; flex: 0 0 52px; }

@media (max-width: 575px) {
    .emr-page .emr-auto-visual { padding: 0; }
    .emr-page .emr-auto-visual .emr-card { margin: 14px auto 0; position: relative; inset: auto; width: max-content; max-width: 100%; }
    .emd-body { padding: 10px; }
    .emd-cols, .emd-row { grid-template-columns: 0.9fr 1.3fr 66px; }
    .emd-cols span:nth-child(3), .emd-row span:nth-child(3) { display: none; }
    .emd-auto { display: none; }
}


@media (min-width: 992px) and (max-width: 1299px) {
    .emd .emd-auto { font-size: 0; gap: 0; }
}
