@font-face {
    font-family: 'Barlow';
    src: url('fonts/Barlow-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html, body {
    font-family: 'Barlow', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

:root {
    --bt-primary: #13383C;
    --bt-orange: #f5821f;
    --bt-badge-red: #e5335f;
    --bt-lime: #B7CE24;
    /* Fluid "phone card" width for tablet/desktop: grows with the viewport
       instead of snapping straight to a fixed cap past the mobile breakpoint. */
    --bt-card-width: min(640px, 94vw);
}

/* Shared "app row" card used by the Overview/Input/Output/Alerts screens. */
.bt-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.bt-row-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #e2effa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.bt-row-body {
    flex: 1;
    min-width: 0;
}

.bt-row-label {
    font-size: 0.75rem;
    color: #9a9a9a;
    text-transform: capitalize;
}

.bt-row-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
}

.bt-row-chevron {
    color: var(--bt-orange);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.bt-scale-pills {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.25rem 0;
}

.bt-scale-pill {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

    .bt-scale-pill.active {
        border-color: #333;
        box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
        filter: saturate(0.45) brightness(1.15);
    }

.bt-page-arrow {
    background: none;
    border: none;
    color: var(--bt-orange);
    font-size: 1.6rem;
    line-height: 1;
    padding: 0.5rem;
    cursor: pointer;
}

    .bt-page-arrow:disabled {
        opacity: 0.3;
        cursor: default;
    }

.bt-brand-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--bt-primary);
}

.bt-brand-footer img.bt-brand-logo {
    height: 1.6rem;
    width: auto;
}

.bt-brand-footer .bt-brand-model {
    font-size: 0.75rem;
    color: #9a9a9a;
    font-style: normal;
}

.bt-output-price {
    margin-left: 0.4rem;
    font-size: 0.8em;
    color: #6a6a6a;
    font-weight: 400;
}

.bt-qr-video {
    width: 100%;
    max-width: 360px;
    border-radius: 0.5rem;
    background: #000;
}

.bt-stat-line {
    text-align: center;
    color: #5c2323;
    font-weight: 600;
    padding: 0.6rem 0;
    border-bottom: 1px solid #d8d0d0;
}

.bt-chart-title {
    text-align: center;
    color: #5c2323;
    font-weight: 700;
    margin: 0.5rem 0 1rem;
}

.bt-chart-amount {
    text-align: center;
    color: #5c2323;
    font-weight: 700;
    font-size: 1.3rem;
    margin: -0.75rem 0 1rem;
}

.bt-chart-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bt-chart {
    display: flex;
    height: 220px;
    margin-bottom: 1rem;
    flex: 1;
    min-width: 0;
}

.bt-chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #444;
    padding-right: 0.5rem;
    text-align: right;
    white-space: nowrap;
}

.bt-chart-plot {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #333;
    border-bottom: 1px solid #333;
}

    .bt-chart-plot svg {
        width: 100%;
        flex: 1;
        min-height: 0;
    }

.bt-chart-xaxis {
    display: flex;
    flex-shrink: 0;
    font-size: 0.65rem;
    color: #666;
    margin-top: 0.25rem;
}

    .bt-chart-xaxis span {
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .bt-chart-xaxis span:first-child {
        text-align: left;
    }

    .bt-chart-xaxis span:last-child {
        text-align: right;
    }

.bt-period-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5c2323;
}

.bt-period-subtitle {
    font-size: 0.85rem;
    color: #a05a5a;
}

.bt-output-group {
    background: #fff;
    border-radius: 0.6rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.bt-doc-viewer {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.5rem 1rem;
    margin: -0.5rem 0 0.75rem;
}

.bt-doc-frame {
    width: 100%;
    height: 70vh;
    border: 1px solid #e2e2e2;
    border-radius: 0.4rem;
}

.bt-output-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #eaf3fb;
    border-radius: 0.6rem;
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.bt-output-group .bt-output-row:last-child {
    margin-bottom: 0;
}

.bt-output-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.bt-output-body {
    flex: 1;
}

.bt-output-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
}

.bt-output-unit {
    font-size: 0.85rem;
    font-weight: 400;
    color: #9a9a9a;
    margin-left: 0.3rem;
}

.bt-output-label {
    font-size: 0.8rem;
    color: #888;
}

.bt-output-badge {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--bt-badge-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bt-alert-row {
    border-radius: 0.6rem;
    overflow: hidden;
    margin-bottom: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.bt-alert-date {
    background: var(--bt-lime);
    color: #1f3a0a;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    text-align: right;
}

.bt-alert-body {
    background: #fff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

.bt-alert-icon {
    color: var(--bt-lime);
    flex-shrink: 0;
}

    .bt-alert-icon svg {
        width: 1.75rem;
        height: 1.75rem;
    }

.bt-alert-message {
    color: #555;
    font-size: 0.9rem;
}

/* Shared "list-style" chrome (hamburger header, no bottom nav) used by
   /transformers and other top-level pages reached from the drawer menu. */
.tl-root {
    min-height: 100vh;
    background: #eeeef1;
}

.tl-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--bt-primary, #13383C);
    color: #fff;
    padding: 0.9rem 1.1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tl-hamburger {
    background: none;
    border: none;
    color: #fff;
    padding: 0;
    display: flex;
    cursor: pointer;
}

    .tl-hamburger svg {
        width: 1.4rem;
        height: 1.4rem;
    }

.tl-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.bt-header-logo {
    height: 1.5rem;
    width: auto;
    margin-left: auto;
}

.tl-body {
    position: relative;
    padding: 1rem;
    min-height: calc(100vh - 3.5rem);
}

.tl-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bt-primary, #13383C);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0.6rem;
    padding: 1rem 1.1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

    .tl-row:hover {
        filter: brightness(1.1);
        color: #fff;
    }

.tl-row-icon {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
}

.tl-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--bt-primary, #13383C);
    color: #B7CE24;
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.tl-fab::before {
    content: "+";
    display: block;
    transform: translateY(-0.06em);
}

    .tl-fab:hover {
        color: #B7CE24;
        filter: brightness(1.1);
    }

@media (min-width: 641px) {
    .tl-header {
        max-width: var(--bt-card-width);
        margin: 0 auto;
        border-left: 1px solid rgba(255,255,255,0.15);
        border-right: 1px solid rgba(255,255,255,0.15);
    }

    .tl-body {
        max-width: var(--bt-card-width);
        margin: 0 auto;
    }

    .tl-fab {
        right: calc(50% - (var(--bt-card-width) / 2) + 1.25rem);
    }
}

/* Auth pages (login/register/reset) reached before a drawer menu makes sense. */
.auth-root {
    min-height: 100vh;
    background: #eeeef1;
}

.auth-header {
    background: var(--bt-primary, #13383C);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-logo {
    width: 6rem;
    height: 6rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

.auth-logo-white {
    width: 8rem;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

.auth-card {
    background: #fff;
    padding: 1.5rem 1.25rem 2rem;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.25rem;
}

@media (min-width: 641px) {
    .auth-header,
    .auth-card {
        max-width: var(--bt-card-width);
        margin: 0 auto;
        width: 100%;
    }

    .auth-card {
        min-height: calc(100vh - 10.5rem);
        box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
    }
}

.auth-version {
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: #9a9a9a;
}

.nm-version {
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: #9a9a9a;
}

.splash {
    position: relative;
    min-height: 100vh;
    background: var(--bt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-logo-img {
    width: 10rem;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

a, .btn-link {
    color: var(--bt-primary, #13383C);
}

.btn-primary {
    color: #fff;
    background-color: var(--bt-primary, #13383C);
    border-color: var(--bt-primary, #13383C);
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background-color: var(--bt-primary, #13383C);
        border-color: var(--bt-primary, #13383C);
        filter: brightness(1.1);
    }

.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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}

.bt-scale-content {
    position: relative;
    min-height: 4rem;
}

.bt-scale-content.bt-loading > *:not(.bt-loading-overlay) {
    opacity: 0.35;
    pointer-events: none;
}

.bt-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.bt-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--bt-orange);
    border-radius: 50%;
    animation: bt-spin 0.7s linear infinite;
}

@keyframes bt-spin {
    to { transform: rotate(360deg); }
}
