@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Variable.ttf') format('truetype');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans Khmer';
    src: url('../fonts/NotoSansKhmer-Variable.ttf') format('truetype');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

html, body {
    font-family: 'Inter', 'Noto Sans Khmer', Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    text-rendering: optimizeLegibility;
}

:root {
    --vencci-gold: #745b00;
    --vencci-gold-light: #d6ad37;
    --vencci-brown: #3b2a10;
    --vencci-cream: #fffaf0;
    --mud-palette-primary: var(--vencci-gold) !important;
}
.font-khmer {
    font-family: 'Noto Sans Khmer', 'Inter', Arial, sans-serif !important;
    font-size: 15px;
}

.mud-typography,
.mud-button-root,
.mud-input,
.mud-input-control,
.mud-table,
.mud-navmenu,
.mud-dialog,
input,
select,
textarea,
button {
    font-family: 'Inter', 'Noto Sans Khmer', Arial, sans-serif !important;
    font-optical-sizing: auto;
}

h1, h2, h3, h4, h5, h6,
.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    font-weight: 600;
    letter-spacing: -0.015em;
}

.mud-button-root,
.mud-nav-link,
.mud-table-head .mud-table-cell {
    font-weight: 500;
}
h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}
.numeric-align-right input {
    text-align: right;
}
.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;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

code {
    color: #c02d76;
}

.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;
}
.login-container {
    /* No height for xs screens */
}

/* Apply 90vh only for md and up (?768px) */
@media (min-width: 768px) {
    .login-container {
        height: 90vh;
    }
}

.mud-theme-error {
    color: white !important;
    background-color: #F18A00 !important;
}

.fixed-last-column {
    position: sticky;
    right: 0;
    background: white; /* Or match your table background */
    z-index: 1;
    white-space: nowrap;
}
.fixed-first-column {
    position: sticky;
    left: 0;
    background: white; /* match your table background */
    z-index: 2;
    box-shadow: 2px 0 5px -2px rgba(0, 0, 0, 0.1); /* optional: visual border */
    white-space: nowrap;
}
.custom-input .mud-input-root.mud-input-focused {
    --mud-palette-primary: var(--vencci-gold);
    color: var(--vencci-gold);
    border-color: var(--vencci-gold);
}


.no-wrap-table td,
.no-wrap-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-header-primary {
    color: white;
    font-size: smaller;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: uppercase;
    background-color: #ebebeba1;
    text-align: start;
}

.mud-dialog .mud-dialog-title,
.mud-dialog-title-blue {
    min-height: 82px;
    height: auto;
    padding: 22px 24px 18px !important;
    display: flex;
    align-items: center;
    color: #322214 !important;
    background: #fff !important;
    border-bottom: 1px solid #e8e1de;
}

.mud-dialog .mud-dialog-title h6,
.mud-dialog .mud-dialog-title .mud-typography-h6,
.mud-dialog-title-blue h6 {
    color: #322214 !important;
    font-family: 'Hanken Grotesk', 'Inter', sans-serif;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
}

.mud-dialog .mud-dialog-title .mud-button-close,
.mud-dialog .mud-dialog-title .mud-icon-button {
    margin-left: auto;
    color: #4e453e !important;
    border-radius: 50%;
}

.mud-dialog .mud-dialog-title .mud-button-close:hover,
.mud-dialog .mud-dialog-title .mud-icon-button:hover {
    color: #322214 !important;
    background: #f3ecea !important;
}
.mud-blur {
    backdrop-filter: blur(10px);
}

.vencci-appbar {
    background: #f9f2ef !important;
    color: #322214 !important;
    border-bottom: 1px solid #e8e1de;
    height: 64px !important;
    padding: 0 12px !important;
}

.vencci-nav-brand {
    width: auto;
    min-height: 66px;
    margin: 8px 4px 6px;
    padding: 8px 12px !important;
    gap: 11px;
    box-sizing: border-box;
    border-radius: 12px;
    background: rgba(255, 248, 231, 0.035);
    color: #fff8e7;
    letter-spacing: 0.07em;
}

.vencci-brand-link,
.vencci-brand-link:hover,
.vencci-brand-link:focus {
    display: block;
    color: inherit !important;
    text-decoration: none !important;
}

.vencci-nav-brand img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 10px;
    object-fit: contain;
}

.vencci-nav-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.vencci-nav-brand strong {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.1;
}

.vencci-nav-brand small {
    margin-top: 5px;
    color: #d9bc70;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
}

.vencci-sidebar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    background: linear-gradient(180deg, #30230f 0%, #1f180d 100%) !important;
    border-right: 1px solid rgba(214, 173, 55, 0.22);
    box-shadow: 4px 0 18px rgba(37, 26, 8, 0.12);
    color: #f8eed7;
}

.vencci-menu {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 10px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Inter', 'Noto Sans Khmer', Arial, sans-serif !important;
}

.vencci-menu .mud-nav-link,
.vencci-menu .mud-nav-group,
.vencci-menu .mud-collapse-container {
    max-width: 100%;
    box-sizing: border-box;
}

.vencci-menu-label {
    padding: 6px 12px 5px;
    color: #aa9360;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.vencci-menu-divider {
    border-color: rgba(214, 173, 55, 0.24) !important;
}

.vencci-menu .mud-nav-link,
.vencci-menu .mud-nav-group .mud-nav-link,
.vencci-menu .mud-nav-group > button {
    display: flex !important;
    align-items: center !important;
    min-height: 42px;
    height: auto;
    margin: 2px 0;
    padding: 8px 12px !important;
    border-radius: 9px;
    position: relative;
    color: #eadfc7 !important;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    line-height: 1.2;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.vencci-menu .mud-nav-link .mud-nav-link-text,
.vencci-menu .mud-nav-group > button .mud-nav-link-text {
    display: flex;
    align-items: center;
    min-height: 24px;
    margin: 0;
    padding: 0;
    line-height: 1.25;
}

.vencci-menu .mud-nav-link .mud-icon-root,
.vencci-menu .mud-nav-group > button .mud-icon-root,
.vencci-menu .mud-nav-link-expand-icon {
    color: #c8ad6b !important;
    fill: #c8ad6b !important;
}

.vencci-menu .mud-nav-link-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-inline-end: 11px !important;
}

.vencci-menu .mud-nav-link-expand-icon {
    align-self: center;
    margin-inline-start: auto;
}

.vencci-menu .mud-nav-link:hover,
.vencci-menu .mud-nav-group > button:hover {
    background: rgba(255, 248, 231, 0.08) !important;
    color: #ffffff !important;
    transform: translateX(2px);
}

.vencci-menu .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background: linear-gradient(90deg, #b8860b, #d2a735) !important;
    border: 1px solid rgba(239, 207, 117, 0.7);
    box-shadow: 0 5px 16px rgba(184, 134, 11, 0.25);
    color: #1c1408 !important;
    font-weight: 600 !important;
}

.vencci-menu .mud-nav-link.active .mud-icon-root,
.vencci-menu .mud-nav-link.active .mud-nav-link-text {
    color: #1c1408 !important;
    fill: #1c1408 !important;
}

.vencci-menu .vencci-group-selected > .mud-nav-link,
.vencci-menu .vencci-group-selected > button {
    background: rgba(214, 173, 55, 0.14) !important;
    color: #f2cf70 !important;
    font-weight: 600 !important;
}

.vencci-menu .vencci-group-selected > .mud-nav-link .mud-icon-root,
.vencci-menu .vencci-group-selected > .mud-nav-link .mud-nav-link-expand-icon,
.vencci-menu .vencci-group-selected > button .mud-icon-root {
    color: #e2bd58 !important;
    fill: #e2bd58 !important;
}

.vencci-menu .mud-collapse-container .mud-nav-link {
    min-height: 38px;
    height: auto;
    margin: 2px 0;
    padding: 7px 12px 7px 18px !important;
    font-size: 0.82rem;
}

.vencci-menu .mud-collapse-container {
    padding: 2px 0 4px 8px;
}

.vencci-menu .mud-collapse-container .mud-nav-link-text {
    min-height: 22px;
}

.vencci-user-card {
    margin: 8px;
    border: 1px solid rgba(214, 173, 55, 0.28);
    border-radius: 12px !important;
    background: rgba(255, 248, 231, 0.06) !important;
    color: #f8eed7 !important;
    transition: background-color 160ms ease;
}

.vencci-user-card:hover {
    background: rgba(255, 248, 231, 0.10) !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);
}

.vencci-login-bg {
    background: radial-gradient(circle at top, #fffdf7 0%, #f8ecd0 48%, #dfc06e 100%);
}

.vencci-login-logo {
    width: 190px;
    height: 190px;
    overflow: hidden;
    background: var(--vencci-cream) !important;
    border: 2px solid rgba(214, 173, 55, 0.75);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.vencci-login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mud-button-filled.mud-button-filled-primary {
    background-color: var(--vencci-gold) !important;
    color: #fff !important;
}

.mud-fab-primary:not(.mud-disabled) {
    background-color: var(--vencci-gold) !important;
    color: #fff !important;
}

.mud-icon-button-color-primary:not(.mud-disabled),
.mud-button-text-primary:not(.mud-disabled),
.mud-button-outlined-primary:not(.mud-disabled) {
    color: var(--vencci-gold) !important;
}


html, body {
    height: 100%;
    margin: 0;
}

.mud-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mud-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page-body-container {
    flex: 1;
}

.mud-main-content.pos-index-main {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.pos-index-body {
    min-height: 0;
    overflow: hidden;
}

.pos-index-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    overflow: hidden;
}

.pos-index-main .app-footer {
    flex: 0 0 40px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #666;
    min-height: 40px;
}

@media print {
    body * {
        visibility: hidden;
    }

    #printable-invoice, #printable-invoice * {
        visibility: visible;
    }

    #printable-invoice {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        max-width: 80mm;
        font-family: 'Courier New', monospace;
    }
}
