:root {
    --sentinel-bg-top: #06152d;
    --sentinel-bg-mid: #0b2245;
    --sentinel-bg-bottom: #0f3b82;
    --sentinel-glow-core: rgba(59, 130, 246, 0.34);
    --sentinel-glow-edge: rgba(96, 165, 250, 0.14);
    --sentinel-panel: rgba(8, 20, 43, 0.72);
    --sentinel-panel-strong: rgba(9, 22, 46, 0.82);
    --sentinel-panel-border: rgba(147, 197, 253, 0.18);
    --sentinel-panel-border-strong: rgba(147, 197, 253, 0.28);
    --sentinel-text: #f8fafc;
    --sentinel-text-muted: #bfdbfe;
    --sentinel-text-soft: rgba(219, 234, 254, 0.76);
    --sentinel-accent: #3b82f6;
    --sentinel-accent-strong: #1d4ed8;
    --sentinel-input: rgba(15, 23, 42, 0.68);
    --sentinel-shadow: 0 32px 80px rgba(2, 6, 23, 0.45);
    --sentinel-shadow-card: 0 22px 52px rgba(2, 6, 23, 0.34);
    --sentinel-radius-lg: 28px;
    --sentinel-radius-md: 22px;
    --sentinel-radius-sm: 16px;
}

/* Clean replacement topbar: hidden by default and enabled only on the EMR host. */
.bmc-clean-emr-topbar {
    display: none !important;
}

html.bmc-emr-host .legacy-sentinel-topbar,
body.bmc-emr-host .legacy-sentinel-topbar {
    display: none !important;
}

html.bmc-emr-host .bmc-clean-emr-topbar,
body.bmc-emr-host .bmc-clean-emr-topbar {
    box-sizing: border-box;
    display: flex !important;
    width: calc(100% - 24px);
    max-width: 1200px;
    margin: 12px auto 16px auto;
    padding: 12px 18px;
    border-radius: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: hidden;
}

.bmc-clean-topbar-brand,
.bmc-clean-topbar-controls,
.bmc-clean-topbar-meta {
    display: flex;
    align-items: center;
}

.bmc-clean-topbar-brand {
    gap: 10px;
    flex: 0 1 auto;
    min-width: 220px;
}

.bmc-clean-topbar-logo {
    display: block;
    width: 48px;
    max-height: 52px;
    object-fit: contain;
    flex: 0 0 auto;
}

.bmc-clean-topbar-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
}

.bmc-clean-topbar-copy strong {
    color: #f8fafc;
    font-size: 15px;
    letter-spacing: 0.06em;
}

.bmc-clean-topbar-copy span {
    color: #bfdbfe;
    font-size: 10px;
    font-weight: 700;
}

.bmc-clean-topbar-controls {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.bmc-clean-topbar-meta {
    gap: 4px;
    min-height: 32px;
    padding: 0 8px;
    border-left: 1px solid rgba(147, 197, 253, 0.18);
    color: #bfdbfe;
    font-size: 10px;
    white-space: nowrap;
}

.bmc-clean-topbar-meta strong {
    color: #f8fafc;
    font-size: 12px;
}

@media (max-width: 1024px) {
    html.bmc-emr-host .bmc-clean-emr-topbar,
    body.bmc-emr-host .bmc-clean-emr-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .bmc-clean-topbar-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    html.bmc-emr-host .bmc-clean-emr-topbar,
    body.bmc-emr-host .bmc-clean-emr-topbar {
        width: calc(100% - 12px);
        padding: 12px;
    }

    .bmc-clean-topbar-controls {
        width: 100%;
    }

    .bmc-clean-topbar-meta {
        border-left: 0;
        padding: 0 4px;
    }
}

html,
body,
.reg-wrapper {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 50% 0%, var(--sentinel-glow-core), transparent 32%),
        radial-gradient(circle at 85% 18%, var(--sentinel-glow-edge), transparent 24%),
        linear-gradient(160deg, var(--sentinel-bg-top) 0%, var(--sentinel-bg-mid) 45%, var(--sentinel-bg-bottom) 100%);
    color: var(--sentinel-text);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 140px 140px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
    opacity: 0.28;
}

.reg-wrapper {
    min-height: 100vh;
    padding: 40px 24px;
}

.reg-wrapper > div[ng-app="bahmni.home"] {
    width: 100%;
    position: relative;
    z-index: 1;
}

#view-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.clint-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.implementor-logo {
    width: min(360px, 80vw);
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 24px 48px rgba(2, 6, 23, 0.35));
}

.title_text {
    color: var(--sentinel-text);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-align: center;
    text-transform: uppercase;
}

.login,
.sentinel-surface,
.sentinel-panel,
.sentinel-app-card {
    border: 1px solid var(--sentinel-panel-border);
    box-shadow: var(--sentinel-shadow);
}

.login {
    width: min(460px, 100%);
    background: var(--sentinel-panel);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 24px;
    overflow: hidden;
}

.emr-login-text {
    padding: 28px 32px 8px;
    color: var(--sentinel-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-align: center;
    text-transform: uppercase;
}

.reg-header {
    background: transparent;
    color: var(--sentinel-text);
    border-bottom: 1px solid rgba(147, 197, 253, 0.14);
    padding: 18px 32px;
}

.reg-header .left,
.reg-header .right,
.reg-header div,
.reg-header span,
.reg-header a,
.reg-header li {
    color: var(--sentinel-text);
}

.locale-wrapper,
.sentinel-change-location {
    display: flex;
    align-items: center;
    gap: 10px;
}

.locale-text {
    color: var(--sentinel-text-muted);
}

.login-body {
    padding: 24px 32px 32px;
}

.field-attribute label,
.warning-message,
.warning-message p {
    color: var(--sentinel-text);
}

.field-value input,
.field-value select,
.sentinel-change-location select,
.locale-wrapper select {
    width: 100%;
    min-height: 48px;
    background: var(--sentinel-input);
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 14px;
    color: var(--sentinel-text);
    padding: 0 14px;
}

.field-value input::placeholder {
    color: rgba(191, 219, 254, 0.68);
}

.form-footer .confirm,
.otp-button {
    background: linear-gradient(180deg, var(--sentinel-accent) 0%, var(--sentinel-accent-strong) 100%);
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-height: 48px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.form-footer .confirm:hover,
.otp-button:hover {
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
    transform: translateY(-1px);
}

.note.error {
    background: rgba(127, 29, 29, 0.4);
    border: 1px solid rgba(252, 165, 165, 0.35);
    color: #fee2e2;
    border-radius: 14px;
}

.power-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--sentinel-text-muted);
    font-size: 13px;
}

.power-by a {
    color: #dbeafe;
    text-decoration: none;
}

.sentinel-login-page {
    width: 100%;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sentinel-login-page::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(920px, 78vw);
    height: min(620px, 70vh);
    transform: translate(-50%, -52%);
    pointer-events: none;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, rgba(59, 130, 246, 0.08) 40%, transparent 74%);
    filter: blur(22px);
    opacity: 0.95;
}

.sentinel-login-container {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 0.9fr);
    gap: 28px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.sentinel-login-brand,
.sentinel-login-card {
    background: var(--sentinel-panel);
    border: 1px solid var(--sentinel-panel-border);
    box-shadow: var(--sentinel-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.sentinel-login-brand::before,
.sentinel-login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 30%, transparent 74%, rgba(96, 165, 250, 0.1));
}

.sentinel-login-brand::after,
.sentinel-login-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.34), rgba(59, 130, 246, 0) 28%);
}

.sentinel-login-brand {
    border-radius: var(--sentinel-radius-lg);
    padding: 40px 36px;
    display: grid;
    gap: 22px;
    align-content: center;
    min-height: 540px;
}

.sentinel-login-logo {
    width: min(280px, 72%);
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 24px 48px rgba(2, 6, 23, 0.35));
    position: relative;
    z-index: 1;
}

.sentinel-login-brand-copy {
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.sentinel-login-brand-description {
    margin: 6px 0 0;
    max-width: 26ch;
    color: var(--sentinel-text-soft);
    font-size: 18px;
    line-height: 1.65;
}

.sentinel-login-card {
    border-radius: var(--sentinel-radius-lg);
    padding: 30px;
    display: grid;
    gap: 26px;
}

.sentinel-login-card-head,
.sentinel-login-form,
.sentinel-login-warning,
.sentinel-login-bottom-logos,
.sentinel-login-footer {
    position: relative;
    z-index: 1;
}

.sentinel-login-card-head {
    display: grid;
    gap: 20px;
}

.sentinel-login-card-head h1 {
    margin: 8px 0 0;
    color: var(--sentinel-text);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.sentinel-login-card-head p {
    margin: 10px 0 0;
    color: var(--sentinel-text-soft);
    line-height: 1.6;
}

.sentinel-login-locale {
    display: grid;
    gap: 8px;
}

.sentinel-login-locale select,
.sentinel-form-field input,
.sentinel-form-field select {
    width: 100%;
    min-height: 54px;
    background: var(--sentinel-input);
    border: 1px solid rgba(147, 197, 253, 0.18);
    border-radius: 14px;
    color: var(--sentinel-text);
    padding: 0 16px;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.sentinel-login-locale select:focus,
.sentinel-form-field input:focus,
.sentinel-form-field select:focus {
    outline: none;
    border-color: rgba(147, 197, 253, 0.42);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
    background: rgba(15, 23, 42, 0.82);
}

.sentinel-form-field input::placeholder {
    color: rgba(191, 219, 254, 0.68);
}

.sentinel-login-form {
    display: grid;
    gap: 18px;
}

.sentinel-login-alerts {
    display: grid;
    gap: 12px;
}

.sentinel-form-field {
    display: grid;
    gap: 8px;
}

.sentinel-form-field label {
    color: var(--sentinel-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sentinel-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 6px;
}

.sentinel-form-actions-split {
    justify-content: space-between;
}

.sentinel-primary-action,
.sentinel-secondary-action {
    min-height: 52px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sentinel-primary-action {
    min-width: 180px;
}

.sentinel-secondary-action {
    background: rgba(15, 23, 42, 0.54);
    border: 1px solid rgba(147, 197, 253, 0.22);
    color: var(--sentinel-text);
}

.sentinel-secondary-action:hover {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.36);
    box-shadow: 0 16px 28px rgba(2, 6, 23, 0.2);
}

.sentinel-login-warning {
    width: min(520px, 100%);
    margin: 0 auto;
    text-align: center;
}

.sentinel-login-warning span,
.sentinel-login-warning p {
    display: block;
}

.sentinel-login-bottom-logos {
    display: flex;
    justify-content: center;
}

.sentinel-login-footer {
    width: 100%;
}

.sentinel-dashboard {
    width: min(1240px, 100%);
    position: relative;
    color: #0f172a;
}

.sentinel-dashboard::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    width: min(780px, 72vw);
    height: 360px;
    transform: translateX(-50%);
    pointer-events: none;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.22) 0%, rgba(59, 130, 246, 0.10) 38%, transparent 72%);
    filter: blur(18px);
    opacity: 0.95;
}

.sentinel-surface {
    background: var(--sentinel-panel);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.sentinel-dashboard-shell {
    display: grid;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.sentinel-topbar {
    width: 100%;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 18px;
    padding: 16px 18px;
}

.sentinel-topbar-brand {
    display: flex;
    min-width: 240px;
}

.sentinel-brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sentinel-topbar-logo {
    width: 58px;
    height: auto;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 18px 36px rgba(2, 6, 23, 0.28));
}

.sentinel-brand-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sentinel-wordmark {
    color: var(--sentinel-text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
}

.sentinel-brand-text .sentinel-shell-badge {
    color: #bfdbfe;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.sentinel-shell-badge,
.sentinel-section-kicker,
.sentinel-app-tag,
.sentinel-control-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--sentinel-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.sentinel-dashboard-copy h1,
.sentinel-modules-header h2,
.sentinel-module-section-header h3 {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.15;
}

.sentinel-dashboard-copy p,
.sentinel-modules-header p,
.sentinel-app-description {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.sentinel-topbar-controls {
    float: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
    position: relative;
}

.sentinel-topbar-meta {
    display: grid;
    gap: 3px;
    padding: 0 12px;
    min-height: 38px;
    justify-content: center;
    border-left: 1px solid rgba(147, 197, 253, 0.18);
}

.sentinel-meta-label {
    color: #bfdbfe;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sentinel-meta-value {
    color: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.sentinel-header-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 10px;
    color: #eff6ff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sentinel-header-action:hover,
.sentinel-header-action:focus {
    background: rgba(30, 64, 175, 0.42);
    border-color: rgba(147, 197, 253, 0.36);
    color: #fff;
    transform: translateY(-1px);
}

.sentinel-header-action i {
    color: #93c5fd;
    font-size: 13px;
}

.sentinel-panel {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.sentinel-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent 28%, transparent 72%, rgba(96, 165, 250, 0.10));
}

.sentinel-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.34), rgba(59, 130, 246, 0) 28%);
    height: 1px;
    opacity: 0.9;
}

.sentinel-dashboard-overview {
    padding: 28px 30px;
    background: #f8fafc;
    border-color: rgba(203, 213, 225, 0.84);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
}

.sentinel-dashboard-copy,
.sentinel-modules-header,
.sentinel-module-section,
.sentinel-app-card {
    position: relative;
    z-index: 1;
}

.sentinel-dashboard-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 760px;
}

.sentinel-dashboard-copy h1 {
    font-size: 30px;
    letter-spacing: 0;
}

.sentinel-overview-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
}

.sentinel-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    color: #075985;
    font-size: 12px;
    font-weight: 600;
}

.sentinel-session-strip {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border: 1px solid rgba(203, 213, 225, 0.76);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.sentinel-session-item {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.sentinel-session-item span {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sentinel-session-item strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
}

.sentinel-modules-panel {
    padding: 24px;
    background: rgba(248, 250, 252, 0.96);
    border-color: rgba(203, 213, 225, 0.82);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
}

.sentinel-modules-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.sentinel-modules-header h2 {
    font-size: 22px;
}

.sentinel-modules-header p {
    margin-top: 6px;
    font-size: 13px;
}

.sentinel-module-section {
    display: grid;
    gap: 12px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.sentinel-module-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.sentinel-module-section-header h3 {
    font-size: 15px;
    color: #334155;
}

.sentinel-app-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.sentinel-app-grid li {
    margin: 0;
}

.sentinel-app-card {
    position: relative;
    min-height: 156px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 14px;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.sentinel-app-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(90deg, #0284c7, #14b8a6 46%, rgba(20, 184, 166, 0));
    height: 3px;
    opacity: 0.9;
}

.sentinel-app-card:hover,
.sentinel-app-card:focus {
    transform: translateY(-3px);
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.13);
}

.sentinel-app-card-body {
    display: grid;
    gap: 7px;
}

.sentinel-app-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfeff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.sentinel-app-card i {
    color: #0284c7;
    font-size: 17px;
}

.sentinel-app-title {
    display: block;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.25;
}

.sentinel-app-description {
    display: block;
    min-height: 42px;
    font-size: 12px;
}

.sentinel-app-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sentinel-app-action i {
    color: #0369a1;
    font-size: 12px;
    transition: transform 0.18s ease;
}

.sentinel-app-card:hover .sentinel-app-action i,
.sentinel-app-card:focus .sentinel-app-action i {
    transform: translateX(4px);
}

@media (max-width: 1024px) {
    .sentinel-login-container {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .sentinel-login-brand {
        min-height: 0;
        padding: 32px 30px;
    }

    .sentinel-topbar {
        align-items: flex-start;
        display: grid;
        grid-template-columns: 1fr;
    }

    .sentinel-topbar-controls {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .sentinel-modules-header {
        flex-direction: column;
    }

    .sentinel-app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .reg-wrapper {
        padding: 24px 16px;
    }

    .sentinel-login-page {
        min-height: auto;
    }

    .sentinel-login-container {
        gap: 18px;
    }

    .sentinel-login-brand,
    .sentinel-login-card {
        border-radius: 20px;
    }

    .sentinel-login-brand,
    .sentinel-login-card {
        padding: 22px 20px;
    }

    .sentinel-login-logo {
        width: min(220px, 66vw);
    }

    .sentinel-login-brand-description {
        max-width: none;
        font-size: 16px;
    }

    .sentinel-login-card-head h1 {
        font-size: 28px;
    }

    .sentinel-form-actions,
    .sentinel-form-actions-split {
        flex-direction: column;
        justify-content: stretch;
    }

    .sentinel-primary-action,
    .sentinel-secondary-action {
        width: 100%;
    }

    .login,
    .sentinel-topbar,
    .sentinel-panel,
    .sentinel-app-card {
        border-radius: 20px;
    }

    .reg-header,
    .login-body,
    .emr-login-text {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sentinel-topbar,
    .sentinel-dashboard-overview,
    .sentinel-modules-panel {
        padding: 20px;
    }

    .sentinel-brand-lockup {
        flex-direction: column;
        gap: 14px;
    }

    .sentinel-topbar-logo {
        width: 58px;
    }

    .sentinel-wordmark {
        font-size: 18px;
        letter-spacing: 0;
    }

    .sentinel-topbar-controls {
        width: 100%;
    }

    .sentinel-topbar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sentinel-topbar-meta {
        border-left: 0;
        border-top: 1px solid rgba(147, 197, 253, 0.18);
        padding: 10px 0 0;
    }

    .sentinel-header-action {
        width: 100%;
    }

    .sentinel-dashboard-copy h1 {
        font-size: 26px;
    }

    .sentinel-app-description {
        min-height: 0;
    }

    .sentinel-app-card {
        min-height: 0;
    }

    .sentinel-app-grid {
        grid-template-columns: 1fr;
    }

    .title_text,
    .sentinel-section-kicker,
    .sentinel-shell-badge,
    .emr-login-text {
        letter-spacing: 0.12em;
    }

    .power-by {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

/* BMC login branding override. Scoped to Bahmni home login only. */
.bmc-login-page .bmc-login-logo {
    width: clamp(120px, 34vw, 180px);
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

.bmc-login-page .bmc-wordmark {
    color: var(--sentinel-text);
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1.15;
    text-transform: uppercase;
}

.bmc-login-page .bmc-shell-badge {
    color: var(--sentinel-accent-strong);
    font-size: clamp(14px, 2.4vw, 18px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bmc-login-page .bmc-login-brand-description {
    max-width: 30ch;
}

@media screen and (max-width: 720px) {
    .bmc-login-page .bmc-login-logo {
        width: clamp(120px, 42vw, 160px);
    }

    .bmc-login-page .bmc-wordmark {
        letter-spacing: 0.08em;
        text-align: center;
    }
}

/* BMC EMR login branding. Scoped to the Bahmni EMR login and location pages only. */
.bmc-emr-login-page {
    min-height: 100vh;
}

.bmc-emr-login-page .emr-login-container {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1fr);
    gap: 28px;
    align-items: stretch;
}

.bmc-emr-login-branding {
    border-radius: var(--sentinel-radius-lg);
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 420px;
    text-align: center;
    background: rgba(8, 20, 43, 0.72);
    border: 1px solid rgba(147, 197, 253, 0.18);
    box-shadow: var(--sentinel-shadow);
}

.bmc-emr-login-logo {
    display: block;
    width: clamp(120px, 20vw, 160px);
    max-width: 160px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 8px;
}

.bmc-emr-login-title {
    margin: 0;
    color: var(--sentinel-text);
    font-size: clamp(23px, 3.4vw, 34px);
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.15;
}

.bmc-emr-login-tagline,
.bmc-emr-login-system,
.bmc-emr-login-description {
    margin: 0;
}

.bmc-emr-login-tagline {
    color: var(--sentinel-text-muted);
    font-size: 17px;
    font-weight: 700;
}

.bmc-emr-login-system {
    margin-top: 8px;
    color: #93c5fd;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bmc-emr-login-description {
    max-width: 32ch;
    color: var(--sentinel-text-soft);
    font-size: 16px;
    line-height: 1.55;
}

.bmc-emr-login-page .bmc-emr-login-card {
    align-self: center;
}

@media screen and (max-width: 860px) {
    .bmc-emr-login-page .emr-login-container {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .bmc-emr-login-branding {
        min-height: auto;
        padding: 28px 22px;
    }
}
.bmc-login-logo {
  display: block;
  max-width: 140px;
  max-height: 140px;
  width: auto;
  height: auto;
  margin: 0 auto 12px auto;
  object-fit: contain;
}

.bmc-emr-login-active .sentinel-login-hero,
.bmc-emr-login-active .sentinel-login-brand,
.bmc-emr-login-active .sentinel-login-card-head h1,
.bmc-emr-login-active .sentinel-login-card-head p {
    display: none !important;
}

/* Authenticated home branding is selected before Angular renders the dashboard. */
.bmc-emr-home-only {
    display: none !important;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-home-only,
body.bmc-emr-host .sentinel-dashboard .sentinel-home-only {
    display: none !important;
}

html.bmc-emr-host .sentinel-dashboard .bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard .bmc-emr-home-only {
    display: initial !important;
}

html.bmc-emr-host .sentinel-dashboard img.bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard img.bmc-emr-home-only {
    display: block !important;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-brand-text .bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard .sentinel-brand-text .bmc-emr-home-only {
    display: block !important;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-overview-pills .bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard .sentinel-overview-pills .bmc-emr-home-only {
    display: inline-flex !important;
}

html.bmc-emr-host .sentinel-dashboard .bmc-home-tagline,
body.bmc-emr-host .sentinel-dashboard .bmc-home-tagline {
    color: var(--sentinel-text-muted);
    font-size: 12px;
    font-weight: 700;
}


/* Final EMR dashboard cleanup. Sentinel host keeps the default Sentinel elements. */
body.bmc-emr-host .sentinel-home-only,
html.bmc-emr-host .sentinel-home-only {
    display: none !important;
}

body.bmc-emr-host .bmc-emr-home-only,
html.bmc-emr-host .bmc-emr-home-only {
    display: block !important;
}

body.bmc-emr-host .sentinel-overview-pills .bmc-emr-home-only,
html.bmc-emr-host .sentinel-overview-pills .bmc-emr-home-only {
    display: inline-flex !important;
}

body.bmc-emr-host img.bmc-emr-home-only,
html.bmc-emr-host img.bmc-emr-home-only {
    display: block !important;
}

/* Compact authenticated BMC topbar. Scoped to the EMR hostname only. */
html.bmc-emr-host .sentinel-dashboard .sentinel-topbar,
body.bmc-emr-host .sentinel-dashboard .sentinel-topbar,
html.bmc-emr-host .sentinel-dashboard .sentinel-dashboard-shell,
body.bmc-emr-host .sentinel-dashboard .sentinel-dashboard-shell {
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-topbar,
body.bmc-emr-host .sentinel-dashboard .sentinel-topbar {
    border-radius: 14px;
    padding: 12px 18px;
    gap: 14px;
    overflow: hidden;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-brand,
body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-brand {
    min-width: 220px;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-brand-lockup,
body.bmc-emr-host .sentinel-dashboard .sentinel-brand-lockup {
    gap: 10px;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-logo.bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-logo.bmc-emr-home-only {
    width: 48px;
    max-height: 52px;
    object-fit: contain;
    filter: none;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-wordmark.bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard .sentinel-wordmark.bmc-emr-home-only {
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: 0.06em;
}

html.bmc-emr-host .sentinel-dashboard .bmc-home-tagline,
body.bmc-emr-host .sentinel-dashboard .bmc-home-tagline,
html.bmc-emr-host .sentinel-dashboard .sentinel-shell-badge.bmc-emr-home-only,
body.bmc-emr-host .sentinel-dashboard .sentinel-shell-badge.bmc-emr-home-only {
    font-size: 10px;
    line-height: 1.15;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-controls,
body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-controls {
    gap: 7px;
    min-width: 0;
    max-width: 100%;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-meta,
body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 0 8px;
    white-space: nowrap;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-meta-label::after,
body.bmc-emr-host .sentinel-dashboard .sentinel-meta-label::after {
    content: ":";
}

html.bmc-emr-host .sentinel-dashboard .sentinel-header-action,
body.bmc-emr-host .sentinel-dashboard .sentinel-header-action {
    min-height: 32px;
    padding: 0 9px;
    white-space: nowrap;
}

html.bmc-emr-host .sentinel-dashboard .sentinel-header-action-logout::before,
body.bmc-emr-host .sentinel-dashboard .sentinel-header-action-logout::before {
    content: "|";
    margin-right: 2px;
    color: #93c5fd;
}

@media (max-width: 1024px) {
    html.bmc-emr-host .sentinel-dashboard .sentinel-topbar,
    body.bmc-emr-host .sentinel-dashboard .sentinel-topbar {
        align-items: stretch;
    }

    html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-controls,
    body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-controls {
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    html.bmc-emr-host .sentinel-dashboard .sentinel-topbar,
    body.bmc-emr-host .sentinel-dashboard .sentinel-topbar,
    html.bmc-emr-host .sentinel-dashboard .sentinel-dashboard-shell,
    body.bmc-emr-host .sentinel-dashboard .sentinel-dashboard-shell {
        width: calc(100% - 12px);
    }

    html.bmc-emr-host .sentinel-dashboard .sentinel-brand-lockup,
    body.bmc-emr-host .sentinel-dashboard .sentinel-brand-lockup {
        flex-direction: row;
        align-items: center;
    }

    html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-controls,
    body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-controls {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    html.bmc-emr-host .sentinel-dashboard .sentinel-topbar-meta,
    body.bmc-emr-host .sentinel-dashboard .sentinel-topbar-meta {
        border-top: 0;
        padding: 0 6px;
    }

    html.bmc-emr-host .sentinel-dashboard .sentinel-header-action,
    body.bmc-emr-host .sentinel-dashboard .sentinel-header-action {
        width: auto;
    }
}

/* Final precedence for the structural replacement topbar. */
.sentinel-dashboard .bmc-clean-emr-topbar {
    display: none !important;
}

html.bmc-emr-host .sentinel-dashboard .legacy-sentinel-topbar,
body.bmc-emr-host .sentinel-dashboard .legacy-sentinel-topbar {
    display: none !important;
}

html.bmc-emr-host .sentinel-dashboard .bmc-clean-emr-topbar,
body.bmc-emr-host .sentinel-dashboard .bmc-clean-emr-topbar {
    display: flex !important;
}
