@font-face {
    font-family: var(--app-font, 'Inter');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter/inter-var-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: var(--app-font, 'Inter');
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter/inter-var-latin-italic.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: var(--app-font, 'Inter');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter/inter-var-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: var(--app-font, 'Inter');
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter/inter-var-latin-ext-italic.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bs-font-sans-serif: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /*
     * Shared admin design system -- the numeric color scale used by the admin
     * shell (top navbar + sidebar) and the platform-identity / footer-editor
     * pages. One blue, one green, one teal, one orange, brown as a rare accent,
     * plus a neutral ink scale. Every colored element on those surfaces should
     * reference one of these tokens rather than a one-off hex value.
     */
    --blue-900: #0B2545;
    --blue-700: #1D4ED8;
    --blue-600: #2563EB;
    --blue-500: #3B82F6;
    --blue-100: #DBEAFE;
    --blue-50: #EFF6FF;

    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10B981;
    --green-100: #D1FAE5;
    --green-50: #ECFDF5;

    --teal-700: #0F766E;
    --teal-600: #0D8177;
    --teal-500: #15998C;
    --teal-100: #D0F5F0;
    --teal-50: #ECFDFA;
    --brand-teal: #0F766E;
    --brand-teal-hover: #115E59;
    --brand-paper: #F8FAF6;

    --orange-700: #C2410C;
    --orange-600: #EA580C;
    --orange-500: #F97316;
    --orange-100: #FFEDD5;
    --orange-50: #FFF7ED;

    --brown-700: #78350F;
    --brown-500: #92643B;
    --brown-100: #F0E4D7;

    --ink-900: #111827;
    --ink-700: #374151;
    --ink-500: #6B7280;
    --ink-300: #D1D5DB;
    --ink-100: #F3F4F6;
}

html, body {
    font-family: var(--app-font, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif);
}

a, .btn-link {
    color: var(--brand-teal);
}

.btn-primary {
    color: #fff;
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
}

.btn-primary:hover, .btn-primary:active {
    background-color: var(--brand-teal-hover);
    border-color: var(--brand-teal-hover);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #78b6ac;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5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IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/*
 * The workspace sidebar (MudDrawer) renders its own root <aside> from
 * inside MudBlazor, so component CSS isolation in MainLayout.razor.css can
 * never reach it directly (no scoped ancestor exists above it). This one
 * rule lives here, globally, so the navy gradient background actually
 * applies; the rest of the sidebar's styling reaches into MudNavLink/
 * MudNavGroup internals from MainLayout.razor.css via `.drawer-content
 * ::deep …`, anchored on a div this app itself renders.
 */
.platform-drawer {
    --text-primary: #f5f8fc;
    --text-secondary: #c8d5e3;
    --text-muted: #8fa6bb;
    --drawer-border: rgba(189, 211, 230, .18);
    --drawer-hover: rgba(255, 255, 255, .065);

    border-right: 0;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, .22), transparent 28%),
        var(--blue-900, #0B2545);
    box-shadow: 10px 0 34px rgba(4, 18, 35, .13);
}

/*
 * The sidebar is now an overlay drawer at every breakpoint (never pushes
 * page content). On narrow phones the default 320px width would cover the
 * whole viewport, so it's capped to leave a visible strip of the page
 * showing -- this has to live here rather than in MainLayout.razor.css
 * for the same CSS-isolation-gap reason as the base rule above.
 */
@media (max-width: 599.98px) {
    .platform-drawer {
        width: min(86vw, 340px) !important;
    }
}

/*
 * FillwareReports.razor's root element is a <MudStack Class="reports-shell">,
 * which renders MudStack's own root <div> — same CSS-isolation gap as
 * .platform-drawer above, so the shared navy/orange design tokens have to
 * live here instead of in FillwareReports.razor.css.
 */
.reports-shell {
    --navy-950: #0a1f36;
    --navy-900: #102c4c;
    --blue-600: #2f80ed;
    --blue-100: #eaf3ff;
    --orange-500: #f28c28;
    --orange-100: #fff2e6;
    --teal-600: #168552;
    --grey-50: #f8fafc;
    --grey-100: #f2f5f8;
    --grey-200: #e2e8f0;
    --grey-300: #cbd5e1;
    --grey-500: #718096;
    --grey-700: #475569;
    --grey-900: #1f2937;
    --shadow: 0 14px 34px rgba(15, 47, 87, .07);

    color: var(--grey-900);
}

/*
 * MudMenu renders its popover content into MudPopoverProvider's own portal,
 * which sits outside MainLayout's DOM subtree -- component CSS isolation
 * can never reach it, the same isolation gap documented above for
 * .platform-drawer. PopoverClass="platform-nav-popover" on the Notifications
 * and Help MudMenus in MainLayout.razor is what lets this rule target only
 * those two menus instead of every MudMenu in the app.
 */
.platform-nav-popover .mud-list-item-icon {
    color: var(--blue-500, #3B82F6) !important;
}

/* App-wide toggle convention: every MudSwitch reads green when on, grey when off. */
.mud-switch-base.mud-checked {
    color: var(--mud-palette-success) !important;
}

.mud-switch-base.mud-checked + .mud-switch-track {
    background-color: var(--mud-palette-success) !important;
    opacity: .6 !important;
}

.mud-switch-base:not(.mud-checked) + .mud-switch-track {
    background-color: var(--mud-palette-grey-light) !important;
    opacity: 1 !important;
}
/*
 * Missed Dose Dates calendar (Assign to Patient dialog). The picker
 * deliberately holds no value of its own -- every click toggles a date in
 * the dialog's own list -- so MudBlazor never draws its usual selected-day
 * marker. AdditionalDateClassesFunc stamps .missed-dose-selected onto each
 * already-picked day, and this is what actually makes it read as selected.
 * It lives here rather than in component CSS isolation because MudDatePicker
 * renders the day buttons itself, outside the dialog's scoped-CSS subtree.
 */
.missed-dose-picker .missed-dose-selected .mud-button-root,
.missed-dose-picker button.missed-dose-selected {
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600;
}

.missed-dose-picker .missed-dose-selected .mud-button-root:hover,
.missed-dose-picker button.missed-dose-selected:hover {
    background-color: var(--mud-palette-primary-darken) !important;
}
