/* ==========================================================
   StaerAI ERP - Tema principala
   ========================================================== */

/* --- General --- */
@viewport {
    width: device-width;
    zoom: 1.0;
}
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    width: 100%;
}

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;
}

h1:focus {
    outline: none;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* --- Validare formulare --- */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* --- Layout principal --- */

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Blazor error UI --- */

.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."
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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;
}

/* --- Tab bar (bara principala de taburi) --- */

.tab-bar {
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    /* width: 90%;
    padding-left: 10px; */
}

.tab-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.tab-bar-tabs {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.tab-bar-auth {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-picker {
    width: 140px;
}

.tab-logo {
    max-height: 18px;
    width: auto;
    vertical-align: middle;
    user-select: none;
}

.tab-title {
    user-select: none;
}

.tab-close {
    margin-left: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.5;
    font-weight: bold;
}

.tab-close:hover {
    opacity: 1;
    color: #dc3545;
}

/* --- Tab content area --- */

.tab-content {
    flex: 1;
    overflow: auto;
}

.tab-pane {
    padding: 1rem;
}

.tab-pane.active {
    display: block;
}

.pdf-frame {
    width: 100%;
    height: calc(100vh - 4rem);
    border: none;
}

/* --- Report viewer --- */

.report-viewer-container {
    height: calc(100vh - 10rem);
    width: 100%;
}

.sdv-report-viewer {
    height: calc(100vh - 8rem);
    width: 100%;
}

/* Toolbar selectie parametri raport (luna/an etc.) */
.sdv-report-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--dx-color-bg-layer-alt, #f5f5f5);
    border-bottom: 1px solid var(--dx-color-border, #ddd);
    flex-wrap: wrap;
}
.sdv-report-toolbar-label { font-weight: 500; white-space: nowrap; }
.sdv-report-toolbar-combo  { width: 160px; }
.sdv-report-toolbar-spin   { width: 90px; }

/* --- Report designer --- */

.report-designer-container {
    height: calc(100vh - 6rem);
    width: 100%;
}

/* --- Document Edit Form --- */

.doc-edit-form {
    padding: 0.5rem;
}

.doc-lines-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* --- Contabilitate grid --- */

.contab-grid td.dxbl-grid-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- DynamicForm/Grid: grid-ul sa nu depaseasca viewport --- */

.dynamic-grid {
    height: calc(100vh - 7rem);
}

/* Grid compact — randuri mai mici */
.dynamic-grid .dxbl-grid-table td {
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Rand selectat — highlight vizibil */
.dynamic-grid .dxbl-grid-selected-row td {
    background-color: #cce5ff !important;
}

/* Cell Selection — selectie celule tip Excel */
td.cell-selected {
    background-color: #b3d9ff !important;
}

/* --- Grid toolbar: search box inline --- */
.staer-grid-search {
    min-width: 200px;
}

/* --- DynamicFormPage: container full-height cu flexbox --- */

.dfp-fullheight {
    height: calc(100vh - 4rem);
}

/* --- Master-Detail: sub-grid compact --- */

.detail-grid {
    max-height: 300px;
    font-size: 0.875rem;
}

/* --- Formula calcul: sectiunea din dreapta se intinde pe toata inaltimea --- */

/* Grupul care contine formula devine flex-column si ocupa tot spatiul */
dxbl-form-layout-group:has(.field-formula) {
    display: flex;
    flex-direction: column;
}

/* Fiecare nivel intermediar (DxGroupControl card) se intinde */
dxbl-form-layout-group:has(.field-formula) > * {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Body-ul grupului se intinde */
dxbl-form-layout-group:has(.field-formula) .dxbl-fl-group-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Item-ul FormLayout se intinde */
.field-formula {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Wrapper-ul editorului se intinde */
.field-formula > :last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Textarea-ul: 12 randuri inaltime */
.field-formula textarea {
    height: calc(12 * 1.5em) !important;
}

/* --- SplitDocViewer: Split Layout (form + document viewer) --- */

.sdv-split-layout {
    display: grid !important;
    grid-template-columns: 1fr 720px;
    gap: 0.5rem;
    height: calc(100vh - 7rem);
    min-height: 400px;
    width: 100%;
    box-sizing: border-box;
}

.sdv-form-panel {
    overflow-y: auto;
    min-width: 0;
}
.sdv-form-panel .dxbl-fl{
    width: 98%;
}
/*.sal-detail-section {
    border-top: 1px solid #dee2e6;
    margin-top: 0.5rem;
    padding-top: 0.25rem;
}*/
.sal-detail-header {
    font-weight: 600;
    font-size: 0.85rem;
    color: #053564;
    padding: 0.25rem 0.5rem;
    background: #f0f0f0;
    border-radius: 3px;
}
/* DynamicForm compact (dfr-form) — form fara spatii extra */
.dfr-form .dxbl-fl-item { margin-left: 1px !important; padding: 0px !important;border-radius:0px}
.dfr-form .dxbl-fl-item .dxbl-fl-cpt { padding: 0 !important; margin-top: 0 !important; }
.dfr-form {margin-left: 8px; padding-bottom:1px !important;  }
/* FormEdit template — form inline sub grid */
.dfr-inline-form { border-top: 2px solid #1777d8; padding-top: 0.5rem; }
.sdv-viewer-panel {
    width: 720px;
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
    overflow: hidden;
}

.sdv-viewer-header {
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
}

.sdv-viewer-grid {
    flex: 0 0 200px;
    overflow-y: auto;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
}

.sdv-viewer-iframe {
    flex: 1;
    border: none;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.sdv-viewer-image-wrap {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 0.5rem;
}

.sdv-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sdv-viewer-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Mobil */
@media (max-width: 1001px) {
    /* SplitDocViewer: ascunde viewer panel, form ocupa tot */
    .sdv-viewer-panel { display: none; }
    .sdv-split-layout {
        display: flex !important;
        flex-direction: column;
        grid-template-columns: unset;
        height: auto;
    }
    .sdv-form-panel { width: 100%; min-width: unset; }

    /* Tab bar: previne overflow pe dreapta */
    .tab-bar-inner { padding: 0 0.5rem; }
    .tab-pane { padding: 0.5rem; }
}

/* FileManager toolbar: ascunde textele cand spatiul e mic, pastreaza doar iconitele */
.dxbl-splitter-pane .dx-filemanager-toolbar .dx-button-text {
    display: none;
}
.dxbl-splitter-pane .dx-filemanager-toolbar .dx-button .dx-icon {
    margin: 0;
}

.dashboard-content .card-body .list-group {
    --bs-list-group-item-padding-x: 0.5rem !important;
    --bs-list-group-item-padding-y: 0.15rem !important;
}

/* --- Calendar (DxScheduler) --- */
.cal-tooltip { max-width: 360px; }
.cal-tooltip-desc { font-size: 0.85em; line-height: 1.4; }
.cal-desc-editor { padding: 4px 0; }
.cal-desc-preview {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9em;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
}
/* Scoate background-ul verde din campurile formularului scheduler */
.dxbl-sc-appointment-edit-form .dxbl-fl-ctrl {
    background: transparent !important;
}
.cal-apptype-filter { max-width: 200px; }

/* Calendar sidebar surse */
.cal-sidebar {
    height: 100%;
    overflow-y: auto;
    background: #fafafa;
    border-right: 1px solid #e5e7eb;
}
.cal-source-item {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}
.cal-source-item:hover { background: #eef2ff; }
.cal-source-item input { cursor: pointer; }

.cal-scheduler-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Bara echipe chips — plasata absolute in zona toolbar-ului nativ (dreapta sus) */
.cal-echipa-bar {
    position: absolute;
    top: 6px;
    right: 150px; /* lasa loc pt "Work Week" dropdown */
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: calc(100% - 560px);
    justify-content: flex-end;
}
.cal-echipa-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 0.78em;
    cursor: pointer;
    background: #fff;
    user-select: none;
    transition: all 0.15s;
}
.cal-echipa-chip input { margin: 0; pointer-events: none; }
.cal-echipa-chip:hover { filter: brightness(0.95); }

/* Ascunde dropdown-ul nativ "Resurse" (inlocuit cu chips) */
.dxbl-sc-toolbar-resources,
.dxbl-sc-resource-navigator { display: none !important; }

.cal-move-banner {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9em;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 100;
    max-width: 600px;
}
.cal-move-banner i { color: #b45309; }

/* System notice — toast + popup push */
.sys-notice-toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9800;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    animation: sys-notice-slide 0.3s ease-out;
}
.sys-notice-info { background: #e3f2fd; border-left: 4px solid #1976D2; color: #0d47a1; }
.sys-notice-success { background: #e8f5e9; border-left: 4px solid #388E3C; color: #1b5e20; }
.sys-notice-warning { background: #fff3e0; border-left: 4px solid #f57c00; color: #e65100; }
.sys-notice-urgent { background: #ffebee; border-left: 4px solid #d32f2f; color: #b71c1c; }
.sys-notice-countdown { background: #fff3e0; border-left: 4px solid #f57c00; color: #e65100; }

.sys-notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.sys-notice-header i { font-size: 1.2em; }
.sys-notice-body { font-size: 0.9em; line-height: 1.5; }
.sys-notice-footer { font-size: 0.75em; opacity: 0.7; margin-top: 8px; text-align: right; }

.sys-notice-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sys-notice-fade 0.25s ease-out;
}
.sys-notice-popup {
    min-width: 400px;
    max-width: 560px;
    padding: 20px 24px;
    border-radius: 10px;
    background: #fff;
    border-left: 6px solid #d32f2f;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    animation: sys-notice-pop 0.3s ease-out;
}
.sys-notice-popup.sys-notice-urgent { border-left-color: #d32f2f; }
.sys-notice-popup.sys-notice-countdown { border-left-color: #f57c00; }
.sys-notice-popup .sys-notice-header { font-size: 1.1em; color: #222; }
.sys-notice-popup .sys-notice-body { color: #444; font-size: 1em; position: relative; }
.sys-notice-countdown-num, .sys-notice-popup .sys-notice-countdown {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin: 16px 0;
    color: #d32f2f;
}

/* Countdown float — no backdrop, top-center floating, clickthrough allowed */
.sys-notice-float {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9700;
    min-width: 340px;
    max-width: 500px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #fff3e0;
    border: 2px solid #f57c00;
    box-shadow: 0 6px 24px rgba(245,124,0,0.35);
    animation: sys-notice-pop 0.3s ease-out;
}
.sys-notice-float .sys-notice-header { font-size: 1em; color: #e65100; }
.sys-notice-float .sys-notice-body { color: #333; font-size: 0.95em; }
.sys-notice-float .sys-notice-countdown-num {
    font-size: 2em;
    margin: 10px 0 4px;
}
.sys-notice-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

@keyframes sys-notice-slide {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes sys-notice-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes sys-notice-pop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.cal-produse {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 6px 8px;
    max-height: 160px;
    overflow-y: auto;
}
.cal-produse pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    line-height: 1.3;
}

.cal-gest-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px;
    background: #fff;
}

.cal-legend { font-size: 0.78em; line-height: 1.5; }
.cal-legend > div { display: flex; align-items: center; }
.cal-legend-box {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 6px;
    border: 1px solid rgba(0,0,0,0.15);
}

/* =============================================
   POS — Vanzare rapida (touch-friendly)
   Prefix: pos-
   ============================================= */
.pos-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 120px);
    font-family: 'Segoe UI', sans-serif;
}

/* Top bar */
.pos-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #262f7d;
    color: #fff;
    padding: 8px 16px;
    flex-shrink: 0;
}
.pos-topbar-left, .pos-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.pos-logo {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.pos-info { font-size: 0.9rem; opacity: 0.9; }
.pos-clock { font-size: 1.1rem; font-weight: 600; }
.pos-status {
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
}
.pos-status-ok { background: #2e7d32; }
.pos-status-err { background: #c62828; }

/* Main area */
.pos-main {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}

/* Cart panel (stanga) */
.pos-cart-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #e0e0e0;
    min-width: 0;
}
.pos-search-bar {
    padding: 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}
.pos-search-input { font-size: 1.1rem !important; }

/* Search results dropdown */
.pos-search-results {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 0 8px;
    max-height: 250px;
    overflow-y: auto;
    width: calc(100% - 16px);
}
.pos-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
}
.pos-search-item:hover { background: #e3f2fd; }
.pos-search-item-name { flex: 1; font-weight: 500; }
.pos-search-item-price { font-weight: 700; color: #262f7d; white-space: nowrap; }
.pos-search-item-code { font-size: 0.8rem; color: #888; white-space: nowrap; }

/* Cart grid */
.pos-cart-grid {
    flex: 1;
    overflow: auto;
    padding: 4px;
}
.pos-cell { font-size: 0.95rem !important; padding: 6px 8px !important; }

/* Pay panel (dreapta) */
.pos-pay-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    max-width: 380px;
    min-width: 300px;
    background: #fafafa;
}

/* Totaluri */
.pos-totals {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}
.pos-total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 1rem;
}
.pos-discount-row { color: #c62828; }
.pos-grand-total {
    font-size: 1.8rem;
    font-weight: 800;
    color: #262f7d;
    border-top: 2px solid #262f7d;
    padding-top: 10px;
    margin-top: 6px;
}
.pos-items-count { font-size: 0.85rem; color: #888; }

/* Butoane plata */
.pos-pay-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    flex: 1;
}
.pos-btn {
    min-height: 56px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}
.pos-btn-cash { }
.pos-btn-card { }
.pos-btn-invoice { }
.pos-btn-cancel { opacity: 0.85; }

/* Quick actions */
.pos-quick-actions {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    border-top: 1px solid #e0e0e0;
}
.pos-btn-quick { flex: 1; font-size: 0.85rem !important; }

/* Status bar */
.pos-statusbar {
    padding: 6px 16px;
    font-size: 0.9rem;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    min-height: 32px;
    display: flex;
    align-items: center;
}
.pos-statusbar.pos-status-ok { background: #e8f5e9; color: #2e7d32; }
.pos-statusbar.pos-status-err { background: #ffebee; color: #c62828; }

/* Responsive — sub 900px se stivuiesc */
@media (max-width: 900px) {
    .pos-main { flex-direction: column; }
    .pos-cart-panel { border-right: none; border-bottom: 2px solid #e0e0e0; }
    .pos-pay-panel { max-width: 100%; }
}

/* --- DateTimeEdit: time picker mai mare, patrat --- */
.dxbl-date-time-edit .dxbl-scroll-picker {
    min-height: 280px;
}
.dxbl-date-time-edit .dxbl-scroll-picker-column {
    font-size: 1.2em;
    min-width: 70px;
}
.dxbl-date-time-edit .dxbl-calendar {
    min-height: 280px;
}



/* Configurator button — compact, fara cursor pointer pe hover (consistent cu Print/Corectie) */
.cfg-icon-btn { padding: 1px 6px; line-height: 1; cursor: default; }

/* Form partener (PF/PJ) cu 3 coloane + ANAF lookup. CSS global, nu scoped. */
/* Forteaza fundal alb si text inchis indiferent de tema (popup peste tema dark) */
.pf-host-popup .modal-content,
.pf-host-popup .modal-body { background: #fff !important; color: #222 !important; }
.pf-form { display: flex; flex-direction: column; gap: 12px; padding: 12px; min-width: 900px;
           background: #fff; color: #222; }
.pf-form label, .adr-editor label, .ct-editor label { color: #555 !important; }
.pf-header { display: flex; gap: 24px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #e0e0e0; flex-wrap: wrap; }
.pf-tip-toggle { flex: 0 0 auto; }
.pf-cif-search { display: flex; gap: 8px; align-items: center; }
.pf-cif-search label { font-weight: 600; color: #262f7d; min-width: 80px; }
.pf-cif-input { width: 180px; }
.pf-spinner { font-size: 18px; }

.pf-msg { padding: 8px 12px; border-radius: 4px; font-size: 14px; }
.pf-msg-ok { background: #e7f5ec; color: #1d6f3a; border: 1px solid #b6dcc1; }
.pf-msg-err { background: #fdecec; color: #a8241a; border: 1px solid #f0c0bc; }
.pf-restricted-banner { padding: 6px 10px; border-radius: 4px; font-size: 13px;
                        background: #fff3cd; color: #856404; border: 1px solid #ffeeba; flex: 1 1 auto; }

.pf-body { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.pf-col { display: flex; flex-direction: column; gap: 8px; }
.pf-section-title { font-weight: 600; color: #262f7d; padding: 4px 0; border-bottom: 1px solid #e0e0e0; margin-bottom: 4px; }
.pf-field { display: flex; flex-direction: column; gap: 2px; }
.pf-field label { font-size: 12px; color: #555; }
.pf-livr-toggle { margin-right: 6px; }

.pf-footer { display: flex; gap: 8px; justify-content: flex-end; padding-top: 8px; border-top: 1px solid #e0e0e0; }

/* AdresaEditor */
.adr-editor { display: flex; flex-direction: column; gap: 6px; }
.adr-section-title { font-weight: 600; color: #262f7d; padding: 4px 0; border-bottom: 1px solid #e0e0e0; }
.adr-row { display: flex; gap: 8px; }
.adr-field { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.adr-field label { font-size: 12px; color: #555; }
.adr-field.adr-nr { max-width: 100px; }
.adr-tara { max-width: 220px; }

/* ContactEditor */
.ct-editor { display: flex; flex-direction: column; gap: 6px; }
.ct-section-title { font-weight: 600; color: #262f7d; padding: 4px 0; border-bottom: 1px solid #e0e0e0; }
.ct-row { display: flex; gap: 8px; }
.ct-field { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

/* MagComenzi static page — header + form sections */
.mc-header { display: flex; align-items: center; justify-content: space-between;
             padding: 8px 12px; border-bottom: 1px solid #e0e0e0; background: #fafbfc; margin-bottom: 12px; }
.mc-title { margin: 0; font-size: 1.25rem; color: #262f7d; }
.mc-header-actions { display: flex; gap: 8px; }
.mc-fs { border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; }
.mc-fs > legend { font-size: 0.95rem; font-weight: 600; color: #262f7d; padding: 0 6px; width: auto; margin-bottom: 0; }
.mc-fs.mc-fs-collapsed { padding-top: 4px; padding-bottom: 4px; }
.mc-fs.mc-fs-collapsed > *:not(legend) { display: none; }
.mc-readonly-badge { padding: 4px 10px; border-radius: 4px; font-size: 0.85rem;
                     background: #fff3cd; color: #856404; border: 1px solid #ffeeba;
                     display: inline-flex; align-items: center; gap: 6px; }
.mc-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.mc-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-field > label { font-size: 12px; color: #555; }
.mc-msg { padding: 8px 12px; border-radius: 4px; font-size: 14px; margin-bottom: 8px; }
.mc-msg-ok { background: #e7f5ec; color: #1d6f3a; border: 1px solid #b6dcc1; }
.mc-msg-err { background: #fdecec; color: #a8241a; border: 1px solid #f0c0bc; }
.mc-side-empty { padding: 24px; color: #777; font-style: italic; text-align: center; }

/* Popup Livrare: grid produse cu header pe 2 nivele (master + sub-grupe Stoc / Livrare) */
.livrare-grid { font-size: 0.85rem; }
.livrare-grid-header-master th { background: #f0f3ff; vertical-align: middle; }
.livrare-grid-header-sub th { background: #fafbff; font-size: 0.78rem; color: #555; }
.livrare-grp-stoc { background: #e8f5e9 !important; color: #1b5e20; }
.livrare-grp-livr { background: #fff3e0 !important; color: #b25400; }
.livrare-row-ok { background-color: #f0fff4; }
.livrare-row-ok:hover { background-color: #e3fae6; }
.livrare-row-partial { background-color: #fff8e1; }
.livrare-row-nostock { background-color: #fef0f0; opacity: 0.75; }
.livrare-row-nostock .stoc-zero { color: #c62828; font-weight: 500; }
.stoc-pozitiv { color: #1b5e20; font-weight: 500; }
.stoc-zero { color: #999; }
.livrare-qty { width: 80px !important; }
.readonly-input input { background: #f5f5f5 !important; cursor: default; }

/* SplitChatFiles inline split — duplicat din DynamicFormPage.razor pt a fi disponibil
   si in pagini scaffold-uite (ex: MagComenzi.razor) care nu randeaza DynamicFormPage. */
html:has(.scf-inline-split), body:has(.scf-inline-split) { overflow: hidden !important; }
.scf-inline-split { position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
                    display: grid; grid-template-columns: minmax(0,1fr) 6px var(--scf-chat-w, 50%);
                    overflow: hidden; background: #fff; z-index: 10; }
.scf-inline-split > * { min-width: 0; min-height: 0; }
.scf-inline-split .scf-popup-form { overflow: auto; padding: 4px 12px; }
.scf-inline-split .scf-popup-chat { overflow: hidden; display: flex; flex-direction: column; }
.scf-splitter { background: #e0e0e0; cursor: col-resize; user-select: none;
                border-left: 1px solid #ccc; border-right: 1px solid #ccc; }
.scf-splitter:hover { background: #b0c4de; }

/* PartenerPicker — combo cautare + buton + adauga + creion edit */
.pp-row { display: flex; gap: 4px; align-items: stretch; }
.pp-combo { flex: 1; min-width: 0; }
.pp-btn { flex: 0 0 auto; min-width: 36px; }
.pp-locked-msg { font-size: 12px; color: #a8241a; padding-top: 2px; }
.pp-item { display: flex; flex-direction: column; gap: 2px; padding: 2px 0; }
.pp-item-name { font-weight: 500; }
.pp-item-meta { font-size: 11px; color: #777; display: flex; gap: 8px; }
.pp-item-cif { font-family: monospace; }
.pp-item-tip { padding: 0 4px; background: #eef0f8; color: #262f7d; border-radius: 3px; font-weight: 600; }
.ct-field label { font-size: 12px; color: #555; }
