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

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+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;
}

/* ==============================================
   Receipt — thermal paper print styles (80mm)
   ============================================== */

/* Hidden on screen; shown only by @media print below */
.receipt-print-only {
    display: none;
}

/* Target 80mm thermal roll — browsers that support size will honour it */
@page {
    margin: 0;
    size: 80mm auto;
}

@media print {
    /* --- Suppress everything on the page --- */
    body * {
        visibility: hidden !important;
    }

    /* --- Make only the receipt visible --- */
    .receipt-print-only,
    .receipt-print-only * {
        visibility: visible !important;
    }

    .receipt-print-only {
        display: block !important;
        position: absolute;
        inset: 0;
        margin: 0;
        padding: 4mm 5mm 10mm;
        font-family: 'Courier New', Courier, monospace;
        font-size: 8.5pt;
        line-height: 1.35;
        color: #000;
        background: #fff;
        width: 80mm;
    }

    /* Reset any MudBlazor or Bootstrap box-shadows / colours inside the receipt */
    .receipt-print-only * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* ── Surat Jalan overrides (A5 professional layout) ──────────────────────
       The base rule locks width to 80mm and uses Courier New for thermal paper.
       These overrides switch to a proportional font and let the content fill
       the full A5 content area (paper minus @page margins injected by print.js).
    ──────────────────────────────────────────────────────────────────────────── */
    .receipt-print-only.is-surat-jalan {
        font-family: Arial, Helvetica, sans-serif !important;
        font-size:   10pt !important;
        line-height: 1.5 !important;
        padding:     0    !important;
        width:       auto !important;
    }
}

/* ==============================================
   App Shell — Collapsible Sidebar Layout
   ============================================== */

:root {
    --sidebar-width: 240px;
    --sidebar-icon-width: 64px;
    --sidebar-bg: #1e293b;
    --topbar-height: 56px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width .25s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

html.sidebar-collapsed .sidebar {
    width: var(--sidebar-icon-width);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f1f5f9;
    font-size: 1.05rem;
    font-weight: 700;
    overflow: hidden;
    min-width: 0;
}

.brand:hover { color: #fff; text-decoration: none; }

.brand-icon {
    font-size: 1.2rem;
    width: 40px;
    min-width: 40px;
    text-align: center;
    color: #60a5fa;
}

.brand-name {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .15s ease .1s, max-width .25s cubic-bezier(.4,0,.2,1);
    max-width: 200px;
}

html.sidebar-collapsed .brand-name {
    opacity: 0;
    max-width: 0;
    transition: opacity .1s ease, max-width .25s cubic-bezier(.4,0,.2,1);
}

.nav-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

/* ---- Nav items ---- */

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-section {
    height: 28px;
    padding: 12px 12px 2px 16px;
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(148,163,184,.5);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .15s ease .1s, height .25s cubic-bezier(.4,0,.2,1), padding .25s;
}

html.sidebar-collapsed .nav-section {
    opacity: 0;
    height: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    transition: opacity .1s ease, height .25s cubic-bezier(.4,0,.2,1), padding .25s;
}

.sidebar-link {
    display: flex;
    align-items: center;
    height: 40px;
    margin: 1px 8px;
    padding: 0;
    border-radius: 8px;
    text-decoration: none;
    color: #94a3b8;
    font-size: .875rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.07);
    color: #e2e8f0;
    text-decoration: none;
}

.sidebar-link.active {
    background: rgba(59,130,246,.2);
    color: #60a5fa;
}

.sidebar-link-icon {
    width: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    margin-left: 4px;
}

.sidebar-link-text {
    overflow: hidden;
    transition: opacity .15s ease .1s;
}

html.sidebar-collapsed .sidebar-link-text {
    opacity: 0;
    transition: opacity .1s ease;
}

/* ---- Main wrapper ---- */

.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s cubic-bezier(.4,0,.2,1);
    background: #f8fafc;
    min-height: 100vh;
}

html.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-icon-width);
}

/* ---- Topbar ---- */

.topbar {
    height: var(--topbar-height);
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 500;
    flex-shrink: 0;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #64748b;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.sidebar-toggle-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    font-size: .85rem;
    color: #64748b;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: .8125rem;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}

.btn-logout:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* ---- Page content ---- */

.page-content {
    flex: 1;
    padding: 24px;
}