/* Phase 1 visual layer: light desk, teal chrome, green actions.
   Loaded after corporate-shell.css. Screen-only so print stays unchanged. */

body.mc-corporate.mc-phase1 {
    color-scheme: light;
    background: #eef3f9 !important;
    color: #142c49 !important;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

body.mc-corporate.mc-phase1 .mc-topbar {
    background: linear-gradient(100deg, #082f3d, #064858) !important;
    color: #fff !important;
    border-bottom: 0 !important;
    min-height: 56px;
}

body.mc-corporate.mc-phase1 .mc-topbar a,
body.mc-corporate.mc-phase1 .mc-topbar button,
body.mc-corporate.mc-phase1 .mc-topbar span,
body.mc-corporate.mc-phase1 .mc-topbar__btn {
    color: #fff !important;
}

body.mc-corporate.mc-phase1 .mc-content,
body.mc-corporate.mc-phase1 .mc-layout,
html.lab-compact-html body.mc-corporate.mc-phase1 .mc-content,
body.mc-corporate.mc-phase1.lab-ws-factory .mc-content,
body.mc-corporate.mc-phase1.er-ws-page .mc-content,
body.mc-corporate.mc-phase1.er-compact-page .mc-content {
    background: #eef3f9 !important;
    color: #142c49 !important;
}

body.mc-corporate.mc-phase1 .rx,
body.mc-corporate.mc-phase1 .pf-wrap {
    color: #142c49;
}

body.mc-corporate.mc-phase1 .rx-panel,
body.mc-corporate.mc-phase1 .rx-card,
body.mc-corporate.mc-phase1 .rx-visit,
body.mc-corporate.mc-phase1 .rx-handoffs,
body.mc-corporate.mc-phase1 .rx-kpi,
body.mc-corporate.mc-phase1 .pf-hero,
body.mc-corporate.mc-phase1 .pf-section,
body.mc-corporate.mc-phase1 .pf-pane,
body.mc-corporate.mc-phase1 .pf-money-strip {
    background: #fff !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 13px !important;
    box-shadow: 0 1px 2px rgba(20, 44, 73, 0.04);
}

body.mc-corporate.mc-phase1 .rx-btn--primary,
body.mc-corporate.mc-phase1 .rx-btn--pay,
body.mc-corporate.mc-phase1 .rx-btn--ok,
body.mc-corporate.mc-phase1 .pf-btn--primary,
body.mc-corporate.mc-phase1 .pf-transfer__cta {
    background: linear-gradient(#2c9b55, #167c40) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
}

body.mc-corporate.mc-phase1 .rx-btn--lab,
body.mc-corporate.mc-phase1 .rx-btn--xray,
body.mc-corporate.mc-phase1 .rx-btn--er,
body.mc-corporate.mc-phase1 .rx-btn--proc {
    background: #e8f2ff !important;
    color: #073746 !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 8px !important;
}

body.mc-corporate.mc-phase1 .rx-filter.is-on,
body.mc-corporate.mc-phase1 .pf-tabs__btn.is-on {
    background: #0b4656 !important;
    color: #fff !important;
    border-color: #0b4656 !important;
}

body.mc-corporate.mc-phase1 .pf-tabs__btn,
body.mc-corporate.mc-phase1 .rx-filter {
    border-radius: 8px !important;
    border: 1px solid #d7e1ec !important;
    background: #f2f7fc !important;
    color: #142c49 !important;
}

body.mc-corporate.mc-phase1 .pf-eyebrow {
    margin: 0 0 4px;
    color: #61758b;
    font-size: 12px;
    font-weight: 700;
}

body.mc-corporate.mc-phase1 .pf-money-strip__item.is-due strong {
    color: #b51f28;
}

body.mc-corporate.mc-phase1 .pf-money-strip__item.is-credit strong {
    color: #16834a;
}

.p1-fileback {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
    background: rgba(18, 51, 75, 0.4);
}

.p1-fileback[hidden] {
    display: none !important;
}

.p1-filesheet {
    width: min(920px, 94vw);
    min-width: 340px;
    max-height: 76vh;
    background: #fff;
    border: 1px solid #d7e1ec;
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(7, 55, 70, 0.22);
}

.p1-filesheet__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(100deg, #082f3d, #064858);
    color: #fff;
}

.p1-filesheet__bar strong {
    font-size: 16px;
}

.p1-filesheet__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.p1-filesheet__actions a,
.p1-filesheet__actions button {
    background: #fff;
    color: #073746;
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.p1-filesheet iframe {
    flex: 1;
    width: 100%;
    min-height: 42vh;
    max-height: 64vh;
    border: 0;
    background: #fff;
}

body.mc-corporate.mc-phase1-embed .mc-topbar,
body.mc-corporate.mc-phase1-embed .mc-sidebar,
body.mc-corporate.mc-phase1-embed .mc-sidebar-overlay,
body.mc-corporate.mc-phase1-embed .mc-mobile-bar {
    display: none !important;
}

body.mc-corporate.mc-phase1-embed .mc-layout {
    margin: 0 !important;
}

body.mc-corporate.mc-phase1-embed,
body.mc-corporate.mc-phase1-embed .mc-content,
body.mc-corporate.mc-phase1-embed .mc-layout {
    background: #fff !important;
}

body.mc-corporate.mc-phase1-embed .ub-shell__links {
    display: none;
}

.p1-desk {
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.25fr);
    gap: 8px;
    align-items: start;
}

.p1-filecard,
.p1-queuecol .rx-panel,
.p1-queuecol .rx-toolbar {
    background: #fff;
    border: 1px solid #d7e1ec;
    border-radius: 13px;
}

.p1-filecard { padding: 10px; }
.p1-filecard__title { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 17px; }
.p1-filecard__empty { color: #61758b; margin: 8px 0; }
.p1-patient { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid #e3ebf5; border-radius: 10px; background: #f6faff; }
.p1-patient__name { font-size: 19px; font-weight: 800; }
.p1-patient__meta, .p1-tabs, .p1-sideactions, .p1-featuregrid { display: flex; flex-wrap: wrap; gap: 6px; }
.p1-pill { padding: 5px 8px; border-radius: 8px; background: #eaf3ff; color: #244a70; font-size: 11px; font-weight: 700; }
.p1-tabs { margin: 8px 0; }
.p1-tab, .p1-feature {
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #f1f5fa;
    color: #203b58;
    font-weight: 800;
    padding: 8px 10px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.p1-tab.is-on { background: #0b4656; color: #fff; border-color: #0b4656; }
.p1-filebody { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 8px; }
.p1-sideactions { display: flex; flex-direction: column; gap: 6px; }
.p1-pane { grid-column: 2; grid-row: 1; border: 1px solid #dce6f0; border-radius: 10px; padding: 8px; background: #fff; }
.p1-line, .p1-money { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #e7edf4; }
.p1-money.is-due { background: #ffeded; color: #a52a2a; }
.p1-money.is-ok { background: #e5f7eb; color: #146c3a; }
.p1-money.is-left { background: #fff2df; color: #96520b; }
.p1-note { color: #61758b; font-size: 12px; }
.p1-features { margin-top: 8px; }
.p1-features h2, .p1-features h3 { margin: 0 0 7px; font-size: 14px; }
.p1-featuregrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.p1-feature span { display: block; font-weight: 400; margin-top: 3px; font-size: 11px; }
.p1-feature--lab { background: #e9f7ec; color: #176c39; }
.p1-feature--xray { background: #e5f0ff; color: #174e83; }
.p1-feature--er { background: #fff0ef; color: #a52a2a; }
.p1-feature--svc { background: #eee8ff; color: #6444a1; }
.p1-feature--sonar { background: #e7f2f6; color: #194e61; }
.rx-visit.is-p1-selected { outline: 2px solid #0d8590; }

body.mc-corporate.mc-phase1 .dept-queues,
body.mc-corporate.mc-phase1 .rx-deptq,
body.mc-corporate.mc-phase1 .rx-handoffs {
    background: #fff !important;
    border: 1px solid #dce6f0 !important;
    border-radius: 10px !important;
}

@media screen and (max-width: 980px) {
    .p1-fileback {
        padding: 8px;
    }

    .p1-filesheet iframe {
        min-height: 70vh;
    }

    .p1-desk,
    .p1-filebody {
        grid-template-columns: 1fr;
    }

    .p1-pane {
        grid-column: auto;
        grid-row: auto;
    }
}

@media screen and (max-width: 560px) {
    .p1-filesheet__bar {
        flex-wrap: wrap;
    }
}

/* Shared staff shell: same light desk on every page that uses base.html. */

body.mc-corporate.mc-phase1 .mc-home-hero,
body.mc-corporate.mc-phase1 .mc-role-home,
body.mc-corporate.mc-phase1 .mc-portal,
body.mc-corporate.mc-phase1 .adm-top,
body.mc-corporate.mc-phase1 .adm-pay-tot,
body.mc-corporate.mc-phase1 .store-admin__panel,
body.mc-corporate.mc-phase1 .lab-ws-shell,
body.mc-corporate.mc-phase1 .sonar-side,
body.mc-corporate.mc-phase1 .sonar-stage,
body.mc-corporate.mc-phase1 .xray-page .header,
body.mc-corporate.mc-phase1 .xray-page .stat-card,
body.mc-corporate.mc-phase1 .doc-dash-head,
body.mc-corporate.mc-phase1 .er-c-top {
    background: #fff !important;
    color: #142c49 !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 13px !important;
    box-shadow: 0 1px 2px rgba(20, 44, 73, 0.04) !important;
}

body.mc-corporate.mc-phase1 .mc-home-hero h1,
body.mc-corporate.mc-phase1 .mc-home-welcome,
body.mc-corporate.mc-phase1 .mc-role-home-title,
body.mc-corporate.mc-phase1 .mc-role-home-badge,
body.mc-corporate.mc-phase1 .adm-top h1,
body.mc-corporate.mc-phase1 .lab-ws-brand,
body.mc-corporate.mc-phase1 .lab-ws-hero-copy,
body.mc-corporate.mc-phase1 .sonar-top h1,
body.mc-corporate.mc-phase1 .xray-page .header h1,
body.mc-corporate.mc-phase1 .doc-dash-head h1,
body.mc-corporate.mc-phase1 .doc-dash-head p,
body.mc-corporate.mc-phase1 .doc-dash-head a,
body.mc-corporate.mc-phase1 .er-c-top h1 {
    color: #082f3d !important;
}

body.mc-corporate.mc-phase1 .mc-home-hero .en,
body.mc-corporate.mc-phase1 .mc-home-hero .tagline,
body.mc-corporate.mc-phase1 .sonar-top p,
body.mc-corporate.mc-phase1 .xray-page .header-meta {
    color: #61758b !important;
}

body.mc-corporate.mc-phase1 .mc-card-link {
    background: #fff !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 13px !important;
    color: #142c49 !important;
}

body.mc-corporate.mc-phase1 .mc-card-link--primary,
body.mc-corporate.mc-phase1 .mc-content .mc-btn,
body.mc-corporate.mc-phase1 .lab-ws-btn--primary,
body.mc-corporate.mc-phase1 .lab-ws .adm-btn-green,
body.mc-corporate.mc-phase1 .sonar-actions button:not(.is-quiet),
body.mc-corporate.mc-phase1 .sonar-actions a:not(.is-quiet),
body.mc-corporate.mc-phase1 .xray-page .btn:not(.btn-orange):not(.btn-purple):not(.btn-teal),
body.mc-corporate.mc-phase1 .er-c-add,
body.mc-corporate.mc-phase1 .ops-btn--lab,
body.mc-corporate.mc-phase1 .store-admin__btn:not(.store-admin__btn--gray),
body.mc-corporate.mc-phase1 .p1-unlock-submit,
body.mc-corporate.mc-phase1 .p1-unlock-continue {
    background: linear-gradient(#2c9b55, #167c40) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
}

body.mc-corporate.mc-phase1 .mc-card-link--primary .mc-card-title,
body.mc-corporate.mc-phase1 .mc-card-link--primary .mc-card-subtitle {
    color: #fff !important;
}

body.mc-corporate.mc-phase1 .xray-page thead th,
body.mc-corporate.mc-phase1 .er-c-tab.is-active {
    background: #0b4656 !important;
    color: #fff !important;
    border-color: #0b4656 !important;
}

body.mc-corporate.mc-phase1 .er-c-chip {
    background: #0b4656 !important;
    color: #fff !important;
}

body.mc-corporate.mc-phase1 .er-c-chip--alert {
    background: #9f1239 !important;
    color: #fff !important;
}

body.mc-corporate.mc-phase1 .p1-unlock-hero {
    background: linear-gradient(100deg, #082f3d, #064858);
    color: #fff;
    padding: 22px 24px;
    border-radius: 13px;
    margin-bottom: 16px;
}

body.mc-corporate.mc-phase1 .p1-unlock-hero h1,
body.mc-corporate.mc-phase1 .p1-unlock-hero p {
    color: #fff !important;
}

body.mc-corporate.mc-phase1 .p1-unlock-card {
    background: #fff;
    border: 1px solid #d7e1ec;
    border-radius: 13px;
    padding: 20px;
}

body.mc-corporate.mc-phase1 .p1-unlock-submit {
    width: 100%;
    padding: 16px;
    min-height: 54px;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
}

body.mc-corporate.mc-phase1 .p1-unlock-continue {
    display: inline-block;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 700;
}

body.p1-login {
    margin: 0;
    min-height: 100vh;
    background: #eef3f9;
    color: #142c49;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    padding: 24px;
}

body.p1-login .p1-login-card {
    background: #fff;
    max-width: 420px;
    margin: 40px auto;
    padding: 8px 20px 20px;
    border: 1px solid #d7e1ec;
    border-top: 8px solid #064858;
    border-radius: 13px;
    box-shadow: 0 1px 2px rgba(20, 44, 73, 0.04);
}

body.p1-login .login-brand { text-align: center; margin-bottom: 16px; }
body.p1-login .login-brand h1 { color: #082f3d; margin: 0 0 4px; font-size: 18px; font-weight: 800; }
body.p1-login .login-brand .en,
body.p1-login .login-brand .sub { color: #61758b; font-size: 13px; margin-bottom: 6px; }
body.p1-login .error {
    background: #ffeded;
    color: #b51f28;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 700;
}
body.p1-login button[type="submit"] {
    width: 100%;
    min-height: 44px;
    background: linear-gradient(#2c9b55, #167c40);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}
body.p1-login .public-links {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #d7e1ec;
    text-align: center;
    font-size: 13px;
}
body.p1-login .public-links a { color: #0b4656; text-decoration: none; margin: 0 6px; }

@media screen and (max-width: 480px) {
    body.p1-login { padding: 16px; }
    body.p1-login .p1-login-card { margin: 20px auto; }
}

/* Reception desk is the screen. The old corporate rules use !important,
   so these selectors have to win on the same properties. */
body.mc-corporate.mc-phase1 .mc-content:has(.rx) {
    background: #eef3f9 !important;
}

body.mc-corporate.mc-phase1 .rx {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: none !important;
    margin: 0 !important;
}

body.mc-corporate.mc-phase1 .rx-head,
body.mc-corporate.mc-phase1 .rx-live-strip {
    order: 0;
}

body.mc-corporate.mc-phase1 .rx-workspace-tabs { order: 1; }
body.mc-corporate.mc-phase1 .p1-desk { order: 2; }
body.mc-corporate.mc-phase1 .rx-panel--expenses { order: 3; }

body.mc-corporate.mc-phase1 .rx-kpis,
body.mc-corporate.mc-phase1 .rx-l2l-notice,
body.mc-corporate.mc-phase1 .rx-panel--warn,
body.mc-corporate.mc-phase1 #rx-handoffs-root,
body.mc-corporate.mc-phase1 #dept-queues-root {
    order: 4;
}

body.mc-corporate.mc-phase1 .rx-head,
body.mc-corporate.mc-phase1 .rx-live-strip,
body.mc-corporate.mc-phase1 .rx-kpi,
body.mc-corporate.mc-phase1 .rx-panel,
body.mc-corporate.mc-phase1 .rx-visit,
body.mc-corporate.mc-phase1 .rx-toolbar,
body.mc-corporate.mc-phase1 .rx-l2l-notice,
body.mc-corporate.mc-phase1 .rx-handoffs,
body.mc-corporate.mc-phase1 .rx-deptq,
body.mc-corporate.mc-phase1 .p1-filecard {
    background: #fff !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 13px !important;
    box-shadow: 0 1px 2px rgba(20, 44, 73, 0.04) !important;
}

body.mc-corporate.mc-phase1 .rx-head h1,
body.mc-corporate.mc-phase1 .rx-panel__head h2 {
    color: #082f3d !important;
}

body.mc-corporate.mc-phase1 .rx-live-strip {
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
}

body.mc-corporate.mc-phase1 .rx-workspace-tabs__btn {
    background: #fff !important;
    color: #142c49 !important;
    border: 1px solid #d7e1ec !important;
    border-radius: 8px !important;
}

body.mc-corporate.mc-phase1 .rx-workspace-tabs__btn.is-on {
    background: #0b4656 !important;
    color: #fff !important;
    border-color: #0b4656 !important;
}

body.mc-corporate.mc-phase1 .rx-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
