/* Self-hosted Thai font (no external CDN — works on offline/locked-down branch
   PCs). Same family the receipts embed in DrugPos.Reporting. */
@font-face {
    font-family: 'Noto Sans Thai';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/NotoSansThai-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Noto Sans Thai';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/NotoSansThai-Bold.ttf') format('truetype');
}

html, body {
    font-family: 'Roboto', 'Noto Sans Thai', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Ensure MudBlazor components use a Thai-capable font stack. MudBlazor drives
   its text via these CSS variables (default Roboto only, which lacks Thai
   glyphs); appending 'Noto Sans Thai' fixes tofu on machines without a Thai
   system font. Icon fonts (Material Icons) are unaffected — they set their own
   font-family on .mud-icon-root. */
/* MudThemeProvider injects its own :root typography vars at runtime (in <body>,
   after this stylesheet), so !important is required for these overrides to win.
   Default MudBlazor family is Roboto only — appending 'Noto Sans Thai' supplies
   Thai glyphs. */
:root {
    --mud-typography-default-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-h1-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-h2-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-h3-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-h4-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-h5-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-h6-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-subtitle1-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-subtitle2-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-body1-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-body2-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-button-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-caption-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-overline-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
    --mud-typography-input-family: 'Roboto', 'Noto Sans Thai', sans-serif !important;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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 #258cfb;
}

.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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MS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3.7rem;
    color: white;
}

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

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

/* --- Login page --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f7;
}

.login-card {
    width: 340px;
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: #1b6ec2;
}

.login-subtitle {
    text-align: center;
    color: #667085;
    margin-bottom: 1.25rem;
}

.login-label {
    font-size: .85rem;
    color: #344054;
    margin: .5rem 0 .25rem;
}

.login-input {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 1rem;
}

.login-input:focus {
    outline: none;
    border-color: #1b6ec2;
    box-shadow: 0 0 0 3px rgba(27,110,194,.15);
}

.login-button {
    margin-top: 1.25rem;
    padding: .6rem;
    border: none;
    border-radius: 6px;
    background: #1b6ec2;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.login-button:hover { background: #1861ac; }

.login-error {
    background: #fdecea;
    color: #b42318;
    border: 1px solid #fda29b;
    border-radius: 6px;
    padding: .5rem .7rem;
    font-size: .9rem;
    margin-bottom: .5rem;
}
