html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #111827;
}

.erp-shell {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.erp-sidebar {
    width: 280px;
    min-width: 280px;
    background: #101828;
    color: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.erp-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
    color: #fff;
    text-decoration: none;
}

    .erp-logo:hover {
        color: #fff;
    }

.erp-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .32);
}

.erp-logo-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.1;
}

.erp-logo-subtitle {
    font-size: 12px;
    opacity: .62;
    margin-top: 3px;
}

.erp-menu {
    flex: 1;
}

.erp-menu-section {
    margin-top: 24px;
    margin-bottom: 10px;
    font-size: 11px;
    letter-spacing: 2px;
    opacity: .55;
    font-weight: 800;
}

.erp-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,.86);
    text-decoration: none;
    margin-bottom: 4px;
    transition: background .15s ease, transform .15s ease, color .15s ease;
    cursor: pointer;
    position: relative;
}

    .erp-menu-item:hover {
        background: rgba(255,255,255,.07);
        color: #fff;
        transform: translateX(3px);
    }

    .erp-menu-item.active {
        background: #2563eb;
        color: #fff;
        box-shadow: 0 8px 18px rgba(37,99,235,.26);
    }

    .erp-menu-item.disabled {
        opacity: .65;
    }

.erp-menu-icon {
    width: 22px;
    display: inline-flex;
    justify-content: center;
    font-size: 17px;
}

.erp-menu-badge {
    margin-left: auto;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.75);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.erp-sidebar-footer {
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 16px;
}

.erp-sidebar-footer-title {
    font-size: 13px;
    font-weight: 700;
}

.erp-sidebar-footer-subtitle {
    font-size: 12px;
    opacity: .55;
    margin-top: 2px;
}

.erp-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.erp-topbar {
    height: 76px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 1px 3px rgba(16,24,40,.04);
}

.erp-top-title {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
    color: #64748b;
}

.erp-top-subtitle {
    font-size: 22px;
    font-weight: 800;
    margin-top: 2px;
    color: #111827;
}

.erp-top-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.erp-top-actions {
    display: flex;
    gap: 10px;
}

    /* Velikost 40 × 40 velja samo za gumbe z ikonami neposredno v zgornji vrstici.
   Gumbi znotraj dropdown menijev (npr. "Počisti vse") ohranijo Bootstrap mere. */
    .erp-top-actions > .dropdown > .erp-icon-button {
        width: 40px;
        height: 40px;
        border: 1px solid #e5e7eb;
        background: #fff;
        border-radius: 12px;
        cursor: pointer;
        color: #334155;
    }

        .erp-top-actions > .dropdown > .erp-icon-button:hover {
            background: #f8fafc;
            border-color: #cbd5e1;
        }

/* Gumb za čiščenje obvestil naj se ne krči in naj ostane v eni vrstici. */
[data-erp-clear-notifications] {
    width: auto;
    height: auto;
    min-height: 32px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.erp-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.erp-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.erp-user-name {
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.erp-user-role {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

.erp-content {
    flex: 1;
    padding: 28px;
}

.erp-page {
    max-width: 1600px;
    margin: 0 auto;
}

.erp-footer {
    height: 48px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.erp-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

    .erp-card + .erp-card {
        margin-top: 18px;
    }

.erp-card-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.erp-card-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}

.erp-table {
    margin-top: 16px;
}

    .erp-table th {
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #667085;
        border-bottom: 1px solid #e5e7eb;
        white-space: nowrap;
    }

    .erp-table td {
        padding: 16px 12px;
        vertical-align: middle;
    }

    .erp-table tbody tr:hover {
        background: #f8fafc;
    }

.erp-badge-issued,
.erp-badge-correction,
.erp-badge-draft,
.erp-badge-cancelled {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.erp-badge-issued {
    background: #dcfce7;
    color: #15803d;
}

.erp-badge-correction {
    background: #fef3c7;
    color: #b45309;
}

.erp-badge-draft {
    background: #e0f2fe;
    color: #0369a1;
}

.erp-badge-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.erp-kpi {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    height: 100%;
}

.erp-kpi-label {
    font-size: 12px;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.erp-kpi-value {
    font-size: 28px;
    font-weight: 800;
    margin-top: 8px;
}

.erp-kpi-change {
    font-size: 13px;
    color: #16a34a;
    margin-top: 6px;
}

.erp-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.erp-page-title {
    font-size: 28px;
    font-weight: 850;
    margin: 0;
}

.erp-page-subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.erp-page-actions {
    display: flex;
    gap: 10px;
}



.erp-kpi-note {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
}

.erp-filter {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.035);
}

.erp-muted-small {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.erp-table-tools {
    white-space: nowrap;
}

.erp-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef4ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.erp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.erp-pagination-info {
    color: #64748b;
    font-size: 13px;
}

.erp-pagination .pagination {
    gap: 4px;
}

.erp-pagination .page-link {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    color: #334155;
    font-weight: 600;
    min-width: 38px;
    text-align: center;
}

.erp-pagination .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.erp-pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
}

.erp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.erp-active-filter {
    background: #eef4ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

.erp-empty-state {
    padding: 56px 24px;
    text-align: center;
}

.erp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #eef4ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
}

.erp-empty-title {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}

.erp-empty-text {
    color: #64748b;
    margin-top: 6px;
}

.erp-bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.erp-bulk-counter {
    font-weight: 700;
    color: #334155;
}

.erp-sort-link {
    color: #667085;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .erp-sort-link:hover {
        color: #2563eb;
    }

.erp-view-toolbar {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

/* =========================================================
   ERP V2 - Document Header
   Shared by invoices, quotes, credit notes, orders, etc.
   ========================================================= */

.erp-document-header {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.erp-document-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

    .erp-document-back:hover {
        color: #2563eb;
    }

.erp-document-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #64748b;
}

.erp-document-title {
    margin: 2px 0 0;
    font-size: 42px;
    font-weight: 850;
    line-height: 1.08;
    color: #111827;
}

.erp-document-subtitle {
    margin-top: 8px;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
}

.erp-document-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.erp-document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-end;
}

@media (max-width: 1199.98px) {
    .erp-document-title {
        font-size: 34px;
    }

    .erp-document-actions {
        justify-content: flex-start;
    }
}

.erp-document-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #f59e0b;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    overflow: hidden;
}

.erp-document-banner-content {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.erp-document-banner-success {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

    .erp-document-banner-success .erp-document-banner-title {
        color: #166534;
    }

.erp-document-banner-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.erp-document-banner-danger {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.erp-document-banner-info {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.erp-document-banner-title {
    font-weight: 850;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-size: 13px;
}

.erp-document-banner button {
    flex-shrink: 0;
}

.erp-document-banner-text {
    margin-top: 4px;
    color: #475569;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .erp-document-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   ERP V2 - Document Summary Card
   ========================================================= */

.erp-document-summary-card {
    height: 100%;
}

.erp-document-summary-list {
    margin-top: 18px;
}

.erp-document-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

    .erp-document-summary-item:last-child {
        border-bottom: 0;
    }

.erp-document-summary-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.erp-document-summary-value {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
}

.erp-document-summary-item.is-emphasized {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

    .erp-document-summary-item.is-emphasized .erp-document-summary-value {
        font-size: 22px;
        color: #15803d;
    }

/* =========================================================
   ERP V2 - Document Party Card
   ========================================================= */

.erp-document-party-card {
    height: 100%;
}

.erp-document-party-name {
    margin-top: 18px;
    font-size: 20px;
    font-weight: 850;
    color: #111827;
}

.erp-document-party-fields {
    margin-top: 16px;
}

.erp-document-party-field {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eef2f7;
}

    .erp-document-party-field:last-child {
        border-bottom: 0;
    }

.erp-document-party-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.erp-document-party-value {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .erp-document-party-field {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* =========================================================
   ERP V2 - Lines Card
   ========================================================= */

.erp-section-title {
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #64748b;
    margin: 22px 0 10px;
}

.erp-lines-card {
    padding: 0;
    overflow: hidden;
}

.erp-lines-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.erp-lines-table {
    margin-top: 0;
}

    .erp-lines-table th {
        background: #f8fafc;
        padding: 12px 14px;
    }

    .erp-lines-table td {
        padding: 12px 14px;
    }

    .erp-lines-table .form-control-sm {
        border-radius: 10px;
    }

@media (max-width: 767.98px) {
    .erp-lines-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.erp-history-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.erp-history-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.erp-history-date {
    min-width: 90px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.erp-history-text {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.erp-document-notes-card {
    height: 100%;
}

.erp-document-notes-text {
    margin-top: 18px;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

/* =========================================================
   ERP V2 - Sticky Actions
   ========================================================= */

.erp-document-sticky-actions {
    position: sticky;
    bottom: 16px;
    z-index: 1050;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 14px 18px;
    background: rgba(255,255,255,.96);
    border: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(15,23,42,.08);
    backdrop-filter: blur(8px);
}

.erp-document-sticky-info {
    font-weight: 850;
    color: #111827;
}

.erp-document-sticky-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .erp-document-sticky-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .erp-document-sticky-buttons {
        justify-content: stretch;
    }

        .erp-document-sticky-buttons .btn {
            flex: 1 1 auto;
        }
}

/* =========================================================
   ERP V2 - Document form cards
   ========================================================= */

.erp-document-form-card {
    padding: 22px;
}

.erp-document-number-box {
    min-width: 220px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
    align-self: flex-start;
}

.erp-document-number-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #64748b;
}

.erp-document-number-value {
    margin-top: 4px;
    font-size: 18px;
    font-weight: 850;
    color: #111827;
}

.erp-form-grid {
    display: grid;
    gap: 14px;
}

.erp-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-form-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-form-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.erp-form-grid-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.erp-span-2 {
    grid-column: span 2;
}

.erp-span-4 {
    grid-column: span 4;
}

.erp-span-6 {
    grid-column: span 6;
}

.erp-field .form-label {
    font-size: 12px;
    font-weight: 800;
    color: #475467;
    margin-bottom: 6px;
}

.erp-field .form-control,
.erp-field .form-select {
    border-radius: 12px;
    border-color: #d0d5dd;
}

    .erp-field .form-control:focus,
    .erp-field .form-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
    }

.erp-field .input-group-text {
    border-radius: 0 12px 12px 0;
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
}

@media (max-width: 1199.98px) {
    .erp-form-grid-5,
    .erp-form-grid-4,
    .erp-form-grid-2,
    .erp-form-grid-12 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .erp-span-2,
    .erp-span-4,
    .erp-span-6 {
        grid-column: span 2;
    }
}

@media (max-width: 767.98px) {
    .erp-form-grid-5,
    .erp-form-grid-4,
    .erp-form-grid-2,
    .erp-form-grid-12 {
        grid-template-columns: 1fr;
    }

    .erp-span-2,
    .erp-span-4,
    .erp-span-6 {
        grid-column: span 1;
    }

    .erp-document-number-box {
        min-width: 0;
    }
}

/* =========================================================
   ERP V2 - Add line card
   ========================================================= */

.erp-add-line-card {
    padding: 22px;
}

    .erp-add-line-card .erp-card-subtitle {
        margin-bottom: 20px;
    }

    .erp-add-line-card .form-label {
        font-size: 12px;
        font-weight: 800;
        color: #475467;
        margin-bottom: 6px;
    }

    .erp-add-line-card .form-control,
    .erp-add-line-card .form-select {
        border-radius: 12px;
        border-color: #d0d5dd;
    }

        .erp-add-line-card .form-control:focus,
        .erp-add-line-card .form-select:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
        }

.erp-add-line-submit {
    min-height: 42px;
    border-radius: 12px;
    font-weight: 750;
}

.erp-document-sticky-info .btn {
    white-space: nowrap;
}

.erp-add-line-offcanvas {
    width: min(760px, 100vw);
}


    .erp-add-line-offcanvas .erp-add-line-panel {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 18px;
        padding: 20px;
    }

/* =========================================================
   ERP V2.1 - Smart Lookup mode
   ========================================================= */

.bauimex-lookup-smart .bauimex-lookup-search {
    margin-bottom: 8px !important;
}

.bauimex-lookup-smart .bauimex-lookup-results-smart {
    min-height: 320px;
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    padding: 8px;
    font-size: 14px;
    background: #fff;
}

.bauimex-lookup-smart .bauimex-lookup-selected {
    border-radius: 14px !important;
    border-color: #bfdbfe !important;
    background: #eff6ff !important;
}

.bauimex-lookup-smart .bauimex-lookup-selected-text {
    font-size: 15px !important;
    line-height: 1.35;
}

.bauimex-lookup-smart .bauimex-lookup-count {
    margin-top: 8px;
}

body:has(.erp-add-line-offcanvas.show) .erp-document-sticky-actions {
    display: none;
}

.bauimex-lookup-result {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .bauimex-lookup-result:hover {
        background: #f8fbff;
        border-color: #dbeafe;
    }

    .bauimex-lookup-result.is-active {
        background: #eff6ff;
        border-color: #60a5fa;
        box-shadow: 0 0 0 2px rgba(37,99,235,.15);
    }

.bauimex-lookup-result-code {
    color: #2563eb;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .3px;
    white-space: nowrap;
    margin-right: .5rem;
}

.bauimex-lookup-result-title {
    font-weight: 700;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    display: block;
    overflow: visible;
}

.bauimex-lookup-result-meta {
    color: #64748b;
    line-height: 1.35;
    font-size: .9rem;
    font-weight: 600;
    min-width: 0;
}

.bauimex-lookup-result-price {
    color: #15803d;
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    margin-left: auto;
}

.bauimex-lookup-result-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .45rem;
}

.bauimex-lookup-selected-card {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.bauimex-lookup-selected-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
}

.bauimex-lookup-selected-code {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    margin-right: .5rem;
    white-space: nowrap;
}

.bauimex-lookup-selected-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bauimex-lookup-selected-meta {
    color: #64748b;
    font-size: .9rem;
    font-weight: 600;
}

.bauimex-lookup-selected-price {
    color: #15803d;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}

.erp-add-line-offcanvas .offcanvas-body {
    padding-bottom: 96px;
}

.erp-line-item-title {
    font-weight: 700;
    color: #111827;
    line-height: 1.45;
}

.erp-line-item-code {
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    margin-right: .5rem;
    white-space: nowrap;
}
/* Shared document selectors */
.erp-document-lookup-button {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: #fff;
    padding: .65rem .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-weight: 600;
}

    .erp-document-lookup-button:hover:not(:disabled) {
        border-color: #2563eb;
        background: #eff6ff;
    }

    .erp-document-lookup-button:disabled {
        background: var(--bs-secondary-bg);
        color: var(--bs-secondary-color);
        cursor: not-allowed;
    }

/* Customer and price-list selectors intentionally use the same dimensions and
   blue selection treatment as the item selector. */
.erp-document-lookup-offcanvas {
    width: min(760px, 100vw);
}

    .erp-document-lookup-offcanvas .offcanvas-body {
        padding-bottom: 96px;
    }

    .erp-document-lookup-offcanvas .bauimex-lookup-selected {
        border-color: #60a5fa !important;
        background: #eff6ff !important;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
    }

body:has(.erp-document-lookup-offcanvas.show) .erp-document-sticky-actions {
    display: none;
}


/* Unified Create/Edit shell for legacy Business modules.
   Keeps existing forms and controllers intact while matching the ERP document visual language. */
.erp-crud-page {
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 6rem;
}

    .erp-crud-page .page-title-box {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1rem;
        padding: 0;
    }

        .erp-crud-page .page-title-box .page-title {
            margin: 0;
            font-size: 1.55rem;
            font-weight: 750;
            letter-spacing: -.02em;
            color: #101828;
        }

        .erp-crud-page .page-title-box .page-title-right,
        .erp-crud-page .page-title-box .breadcrumb {
            display: none;
        }

    .erp-crud-page > .row > .col-12 > .card,
    .erp-crud-page .card {
        border: 1px solid #e4e7ec;
        border-radius: 14px;
        box-shadow: 0 1px 2px rgba(16,24,40,.04);
        background: #fff;
    }

    .erp-crud-page .card-body {
        padding: 1.25rem;
    }

    .erp-crud-page .form-label {
        font-weight: 650;
        color: #344054;
    }

    .erp-crud-page .form-control,
    .erp-crud-page .form-select {
        min-height: 42px;
        border-color: #d0d5dd;
        border-radius: 9px;
    }

    .erp-crud-page textarea.form-control {
        min-height: 96px;
    }

    .erp-crud-page .btn-primary {
        background: #2563eb;
        border-color: #2563eb;
    }

    .erp-crud-page form > .mb-3:last-child,
    .erp-crud-page form > .d-flex:last-child {
        position: sticky;
        bottom: 0;
        z-index: 20;
        margin: 1.25rem -1.25rem -1.25rem !important;
        padding: .85rem 1.25rem;
        border-top: 1px solid #e4e7ec;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(8px);
    }

.quote-edit-page,
.purchase-order-edit-page {
    padding-bottom: 6rem;
}
/* =========================================================
   ERP Document edit status - shared CREATE/EDIT header block
   ========================================================= */
.erp-document-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 250px;
}

.erp-document-edit-status {
    min-width: 250px;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    background: #f8fafc;
    text-align: left;
}

.erp-document-edit-status-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.erp-document-edit-status-value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
}

.erp-edit-status-allowed {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

    .erp-edit-status-allowed .erp-document-edit-status-value {
        color: #15803d;
    }

.erp-edit-status-correction {
    border-color: #fde68a;
    background: #fffbeb;
}

    .erp-edit-status-correction .erp-document-edit-status-value {
        color: #b45309;
    }

.erp-edit-status-locked {
    border-color: #fecaca;
    background: #fef2f2;
}

    .erp-edit-status-locked .erp-document-edit-status-value {
        color: #b91c1c;
    }

.erp-edit-status-cancelled {
    border-color: #d1d5db;
    background: #f3f4f6;
}

    .erp-edit-status-cancelled .erp-document-edit-status-value {
        color: #4b5563;
    }

@media (max-width: 1199.98px) {
    .erp-document-header-right {
        align-items: flex-start;
        min-width: 0;
        width: 100%;
    }

    .erp-document-edit-status {
        min-width: 0;
        width: 100%;
    }
}

/* =========================================================
   ERP Date Field - sl-SI (dd.MM.yyyy)
   ========================================================= */
.erp-date-field {
    position: relative;
    width: 100%;
}

.erp-date-display {
    padding-right: 2.75rem;
    font-variant-numeric: tabular-nums;
}

.erp-date-native {
    position: absolute;
    right: .75rem;
    top: 50%;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
}

.erp-date-button {
    position: absolute;
    top: 50%;
    right: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: #667085;
    transform: translateY(-50%);
}

    .erp-date-button:hover:not(:disabled),
    .erp-date-button:focus-visible {
        color: #101828;
        background: #f2f4f7;
    }

    .erp-date-button:focus-visible {
        outline: 2px solid rgba(13, 110, 253, .25);
        outline-offset: 2px;
    }

    .erp-date-button:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

.erp-date-display.is-invalid {
    padding-right: 4.5rem;
}

/* Administration / Identity */
.permission-check {
    display: flex;
    gap: .75rem;
    padding: .85rem 1rem .85rem 2.65rem;
    min-height: 64px;
    border: 1px solid var(--bs-border-color);
    border-radius: .65rem;
    background: var(--bs-body-bg);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .permission-check:hover {
        border-color: var(--bs-primary);
        box-shadow: 0 0 0 .15rem rgba(13,110,253,.08);
    }

    .permission-check .form-check-input {
        margin-left: -1.65rem;
        margin-top: .2rem;
    }

    .permission-check .form-check-label {
        display: flex;
        flex-direction: column;
        line-height: 1.25;
    }

    .permission-check small {
        color: var(--bs-secondary-color);
        margin-top: .25rem;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: .73rem;
    }

.permission-group:last-child {
    margin-bottom: 0 !important;
}

/* Topbar actions and account menus */
.erp-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    transition: .16s ease;
}

    .erp-icon-button:hover, .erp-icon-button[aria-expanded="true"] {
        color: #1d4ed8;
        border-color: #bfdbfe;
        background: #eff6ff;
        transform: translateY(-1px);
    }

.erp-action-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef4444;
    box-sizing: content-box;
}

.erp-user-button {
    border: 0;
    background: transparent;
    padding: 6px 8px;
    border-radius: 14px;
    text-align: left;
    transition: .16s ease;
}

    .erp-user-button:hover, .erp-user-button[aria-expanded="true"] {
        background: #f8fafc;
    }

.erp-user-chevron {
    color: #94a3b8;
    font-size: .75rem;
    margin-left: 2px;
}

.erp-top-dropdown {
    width: 310px;
    padding: 8px;
    margin-top: 10px !important;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15,23,42,.14);
}

    .erp-top-dropdown .dropdown-item {
        border-radius: 10px;
        padding: .68rem .75rem;
        color: #334155;
    }

        .erp-top-dropdown .dropdown-item:hover {
            background: #f1f5f9;
            color: #0f172a;
        }

.erp-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px 12px;
}

.erp-dropdown-title {
    font-weight: 800;
    color: #0f172a;
}

.erp-dropdown-subtitle {
    margin-top: 2px;
    font-size: .76rem;
    color: #64748b;
    line-height: 1.35;
}

.erp-notification-item {
    display: flex;
    gap: 11px;
    margin: 0 2px 6px;
    padding: 11px;
    border-radius: 12px;
    background: #f8fafc;
}

.erp-notification-icon {
    flex: 0 0 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e0e7ff;
    color: #4338ca;
}

.erp-dropdown-footer {
    margin-top: 4px;
    border-top: 1px solid #eef2f7;
    padding-top: .8rem !important;
}

.erp-user-menu-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
}

.erp-user-menu {
    width: 280px;
}

/* Lighting module */
.lighting-grid .erp-card {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .lighting-grid .erp-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(15,23,42,.08);
    }

.lighting-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .7rem;
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .erp-topbar {
        padding: 0 16px;
    }

    .erp-top-title {
        display: none;
    }

    .erp-top-subtitle {
        font-size: 18px;
    }

    .erp-user-text, .erp-user-chevron {
        display: none;
    }

    .erp-top-right {
        gap: 8px;
    }

    .erp-top-actions {
        gap: 6px;
    }

    .erp-top-dropdown {
        width: min(310px, calc(100vw - 24px));
    }
}

/* Identity / uporabniški račun */
.erp-user-menu-section-label {
    padding: .35rem .75rem .25rem;
    color: #94a3b8;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
}

.erp-user-menu .dropdown-item i {
    width: 1.15rem;
    text-align: center;
    color: #64748b;
}

.erp-user-menu .dropdown-item:hover i {
    color: #1d4ed8;
}

.identity-manage-page {
    max-width: 1180px;
    margin: 0 auto;
}

.identity-manage-header {
    align-items: flex-start;
}

.identity-manage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .55rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.identity-manage-nav__item {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 42px;
    padding: .62rem .85rem;
    border-radius: 11px;
    color: #64748b;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
    transition: .16s ease;
}

    .identity-manage-nav__item:hover {
        color: #0f172a;
        background: #f1f5f9;
    }

    .identity-manage-nav__item.active {
        color: #1d4ed8;
        background: #eff6ff;
        box-shadow: inset 0 0 0 1px #dbeafe;
    }

    .identity-manage-nav__item i {
        font-size: 1rem;
    }

.identity-profile-summary, .identity-security-aside {
    padding: 2rem;
    text-align: center;
}

.identity-profile-avatar {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 1rem;
    border-radius: 24px;
    color: #1d4ed8;
    background: linear-gradient(145deg,#eff6ff,#dbeafe);
    font-size: 2rem;
    font-weight: 850;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.identity-profile-summary h2, .identity-security-aside h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.identity-profile-username {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .45rem;
    margin-top: .4rem;
    color: #64748b;
    font-size: .88rem;
}

.identity-profile-state {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 1.25rem;
    padding: .42rem .7rem;
    border-radius: 999px;
    color: #166534;
    background: #f0fdf4;
    font-size: .78rem;
    font-weight: 750;
}

    .identity-profile-state span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #22c55e;
    }

.identity-profile-note {
    display: flex;
    gap: .6rem;
    margin-top: 1.4rem;
    padding: 1rem;
    border-radius: 12px;
    color: #64748b;
    background: #f8fafc;
    text-align: left;
    font-size: .82rem;
    line-height: 1.5;
}

.identity-account-card {
    padding: 0;
    overflow: hidden;
}

.identity-account-card__header {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fbfdff;
}

    .identity-account-card__header h2 {
        margin: 0;
        color: #0f172a;
        font-size: 1.05rem;
    }

    .identity-account-card__header p {
        margin: .2rem 0 0;
        color: #64748b;
        font-size: .84rem;
    }

.identity-account-card__icon, .identity-security-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 1.05rem;
}

.identity-account-card form {
    padding: 1.5rem;
}

.identity-account-card .form-label {
    color: #334155;
    font-size: .84rem;
    font-weight: 750;
}

.identity-account-card .input-group-text {
    min-width: 43px;
    justify-content: center;
    color: #64748b;
    background: #f8fafc;
    border-color: #dbe2ea;
}

.identity-account-card .form-control {
    min-height: 44px;
    border-color: #dbe2ea;
}

    .identity-account-card .form-control:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 .2rem rgba(59,130,246,.12);
    }

.identity-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #edf2f7;
}

.identity-security-aside {
    text-align: left;
}

.identity-security-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.identity-security-aside p {
    margin: .6rem 0 0;
    color: #64748b;
    line-height: 1.6;
}

.identity-security-tip {
    display: flex;
    gap: .65rem;
    margin-top: 1.3rem;
    padding: 1rem;
    border-radius: 12px;
    color: #475569;
    background: #fffbeb;
    font-size: .84rem;
}

@media (max-width:767.98px) {
    .identity-manage-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .identity-manage-nav__item {
        padding: .6rem .7rem;
    }

    .identity-form-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   Identity standalone pages (Login, Lockout, Confirm, etc.)
   Scoped to body.identity-page to avoid affecting ERP pages.
   ========================================================= */

body.identity-page {
    --id-bg: #f4f6f8;
    --id-panel: #ffffff;
    --id-text: #17202a;
    --id-muted: #667085;
    --id-border: #d8dee6;
    --id-primary: #243b53;
    --id-primary-hover: #172b3f;
    --id-accent: #d9a441;
    --id-danger: #b42318;
    --id-focus: rgba(36, 59, 83, .18);
    --id-shadow: 0 24px 70px rgba(15, 23, 42, .12);
    margin: 0;
    min-height: 100vh;
    color: var(--id-text);
    background: var(--id-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

    body.identity-page *,
    body.identity-page *::before,
    body.identity-page *::after {
        box-sizing: border-box;
    }

    body.identity-page .identity-shell {
        min-height: 100vh;
        display: grid;
        grid-template-columns: minmax(320px, 42%) 1fr;
    }

    body.identity-page .identity-brand {
        position: relative;
        display: flex;
        align-items: flex-end;
        overflow: hidden;
        padding: clamp(2rem, 5vw, 5rem);
        color: #fff;
        background: linear-gradient(145deg, #132536 0%, #243b53 58%, #334e68 100%);
    }

        body.identity-page .identity-brand::before,
        body.identity-page .identity-brand::after {
            content: "";
            position: absolute;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,.11);
        }

        body.identity-page .identity-brand::before {
            width: 440px;
            height: 440px;
            right: -180px;
            top: -130px;
        }

        body.identity-page .identity-brand::after {
            width: 280px;
            height: 280px;
            right: -80px;
            top: -40px;
        }

    body.identity-page .identity-brand__content {
        position: relative;
        z-index: 1;
        max-width: 540px;
    }

    body.identity-page .identity-mark {
        display: grid;
        place-items: center;
        width: 52px;
        height: 52px;
        margin-bottom: 2rem;
        border: 1px solid rgba(255,255,255,.45);
        border-radius: 14px;
        font-size: 1.45rem;
        font-weight: 800;
        background: rgba(255,255,255,.08);
    }

    body.identity-page .identity-eyebrow {
        margin: 0 0 .7rem;
        color: #d7e1ea;
        font-size: .78rem;
        font-weight: 750;
        letter-spacing: .14em;
        text-transform: uppercase;
    }

    body.identity-page .identity-brand h1 {
        margin: 0;
        max-width: 500px;
        font-size: clamp(2rem, 4vw, 3.6rem);
        line-height: 1.07;
        letter-spacing: -.035em;
    }

    body.identity-page .identity-brand p:not(.identity-eyebrow) {
        max-width: 500px;
        margin: 1.25rem 0 0;
        color: #d7e1ea;
        font-size: 1.05rem;
        line-height: 1.7;
    }

    body.identity-page .identity-security-note {
        display: inline-flex;
        gap: .6rem;
        align-items: center;
        margin-top: 2rem;
        color: #e9eff5;
        font-size: .86rem;
    }

        body.identity-page .identity-security-note span {
            color: var(--id-accent);
        }

    body.identity-page .identity-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }

    body.identity-page .identity-card {
        width: min(100%, 460px);
        padding: clamp(1.6rem, 4vw, 2.6rem);
        border: 1px solid rgba(216,222,230,.9);
        border-radius: 18px;
        background: var(--id-panel);
        box-shadow: var(--id-shadow);
    }

    body.identity-page .identity-header {
        margin-bottom: 1.8rem;
    }

        body.identity-page .identity-header h2,
        body.identity-page .identity-card > h1 {
            margin: 0;
            font-size: 1.75rem;
            line-height: 1.25;
            letter-spacing: -.025em;
        }

        body.identity-page .identity-header p,
        body.identity-page .identity-card > h4,
        body.identity-page .identity-card > p {
            margin: .65rem 0 0;
            color: var(--id-muted);
            font-size: .95rem;
            line-height: 1.6;
            font-weight: 400;
        }

    body.identity-page .identity-field,
    body.identity-page .form-group {
        margin-bottom: 1.15rem;
    }

        body.identity-page .identity-label,
        body.identity-page .form-group label {
            display: block;
            margin-bottom: .45rem;
            font-size: .88rem;
            font-weight: 700;
        }

    body.identity-page .identity-input,
    body.identity-page .form-control {
        width: 100%;
        min-height: 46px;
        padding: .72rem .85rem;
        color: var(--id-text);
        border: 1px solid var(--id-border);
        border-radius: 10px;
        background: #fff;
        font: inherit;
        transition: border-color .16s, box-shadow .16s;
    }

        body.identity-page .identity-input:focus,
        body.identity-page .form-control:focus {
            outline: 0;
            border-color: #71869a;
            box-shadow: 0 0 0 4px var(--id-focus);
        }

    body.identity-page .identity-password {
        position: relative;
    }

        body.identity-page .identity-password .identity-input {
            padding-right: 3.2rem;
        }

    body.identity-page .identity-password-toggle {
        position: absolute;
        top: 50%;
        right: .45rem;
        transform: translateY(-50%);
        min-width: 2.4rem;
        min-height: 2.4rem;
        border: 0;
        border-radius: 8px;
        color: var(--id-muted);
        background: transparent;
        cursor: pointer;
    }

        body.identity-page .identity-password-toggle:hover {
            background: #f1f4f7;
            color: var(--id-text);
        }

    body.identity-page .identity-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin: .25rem 0 1.4rem;
    }

    body.identity-page .identity-check {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        color: #475467;
        font-size: .88rem;
    }

        body.identity-page .identity-check input {
            width: 1rem;
            height: 1rem;
            accent-color: var(--id-primary);
        }

    body.identity-page .identity-link {
        color: var(--id-primary);
        font-size: .88rem;
        font-weight: 700;
        text-decoration: none;
    }

        body.identity-page .identity-link:hover {
            text-decoration: underline;
        }

    body.identity-page .identity-button,
    body.identity-page .btn-primary {
        display: inline-flex;
        width: 100%;
        min-height: 47px;
        align-items: center;
        justify-content: center;
        padding: .75rem 1rem;
        border: 1px solid var(--id-primary);
        border-radius: 10px;
        color: #fff;
        background: var(--id-primary);
        font: inherit;
        font-weight: 750;
        cursor: pointer;
        transition: background .16s, transform .08s;
    }

        body.identity-page .identity-button:hover,
        body.identity-page .btn-primary:hover {
            color: #fff;
            background: var(--id-primary-hover);
        }

        body.identity-page .identity-button:active,
        body.identity-page .btn-primary:active {
            transform: translateY(1px);
        }

    body.identity-page .identity-validation,
    body.identity-page .text-danger,
    body.identity-page .validation-summary-errors {
        color: var(--id-danger);
        font-size: .84rem;
    }

    body.identity-page .validation-summary-valid {
        display: none;
    }

    body.identity-page .validation-summary-errors ul {
        margin: 0 0 1rem;
        padding: .75rem 1rem .75rem 2rem;
        border-radius: 9px;
        background: #fff4f2;
    }

    body.identity-page .identity-meta {
        margin-top: 1.35rem;
        padding-top: 1.2rem;
        border-top: 1px solid #edf0f3;
        color: var(--id-muted);
        font-size: .82rem;
        line-height: 1.55;
    }

    body.identity-page .identity-footer {
        margin-top: 1.2rem;
        color: #7a8695;
        font-size: .8rem;
    }

    body.identity-page hr {
        border: 0;
        border-top: 1px solid #edf0f3;
    }

    body.identity-page .row {
        display: block;
    }

    body.identity-page .col-md-4,
    body.identity-page .col-md-6 {
        width: 100%;
    }

    /* Identity status pages */
    body.identity-page .identity-state {
        text-align: left;
    }

    body.identity-page .identity-state__icon {
        display: grid;
        place-items: center;
        width: 48px;
        height: 48px;
        margin-bottom: 1.25rem;
        border-radius: 14px;
        font-size: 1.35rem;
        font-weight: 800;
        color: #8a4b08;
        background: #fff4df;
        border: 1px solid #f2d19a;
    }

    body.identity-page .identity-eyebrow--dark {
        color: #667085;
    }

    body.identity-page .identity-alert {
        margin: 1.2rem 0;
        padding: .9rem 1rem;
        border-radius: 10px;
        font-size: .9rem;
        line-height: 1.55;
    }

    body.identity-page .identity-alert--info {
        color: #344054;
        background: #f8fafc;
        border: 1px solid #e4e7ec;
    }

    body.identity-page .identity-actions {
        margin-top: 1.25rem;
    }

@media (max-width: 850px) {
    body.identity-page .identity-shell {
        grid-template-columns: 1fr;
    }

    body.identity-page .identity-brand {
        min-height: 230px;
        align-items: center;
        padding: 2rem;
    }

        body.identity-page .identity-brand h1 {
            font-size: 2rem;
        }

        body.identity-page .identity-brand p:not(.identity-eyebrow),
        body.identity-page .identity-security-note {
            display: none;
        }

    body.identity-page .identity-mark {
        margin-bottom: 1rem;
    }

    body.identity-page .identity-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    body.identity-page .identity-brand {
        min-height: 180px;
    }

    body.identity-page .identity-card {
        padding: 1.35rem;
        border-radius: 14px;
    }

    body.identity-page .identity-row {
        align-items: flex-start;
        flex-direction: column;
        gap: .75rem;
    }
}

.erp-kpi-lines {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.erp-kpi-line {
    display: grid;
    grid-template-columns: minmax(6rem, 1.4fr) auto auto;
    align-items: center;
    column-gap: 0.75rem;
    font-size: 0.84rem;
    line-height: 1.25;
}

.erp-kpi-line-left {
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
}

.erp-kpi-line-center {
    color: var(--bs-secondary-color);
    white-space: nowrap;
}

.erp-kpi-line-right {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .erp-kpi-line {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .erp-kpi-line-center {
        display: none;
    }
}
/* SmartHome HVAC / Safety */
.smarthome-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem;margin-top:1.25rem}.smarthome-module-card{display:flex;align-items:flex-start;gap:1rem;padding:1.25rem;border:1px solid var(--erp-border,#dfe4ea);border-radius:16px;background:#fff;color:inherit;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.smarthome-module-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(15,23,42,.08);border-color:#b8c4d4;color:inherit}.smarthome-module-icon{display:grid;place-items:center;flex:0 0 46px;height:46px;border-radius:13px;background:#eef4ff;font-size:1.35rem;color:#2459a9}.smarthome-module-body{display:flex;min-width:0;flex:1;flex-direction:column}.smarthome-module-title{font-size:1.05rem;font-weight:700;color:#172033}.smarthome-module-description{margin-top:.35rem;color:#667085;line-height:1.45}.smarthome-module-meta{margin-top:.75rem;font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#667085}.smarthome-module-arrow{align-self:center;color:#667085}.smarthome-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:.85rem}.smarthome-status-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.smarthome-status-name{font-weight:600;color:#344054}.smarthome-status-location{display:block;margin-top:.2rem;font-size:.82rem;color:#667085}.smarthome-state{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap;border-radius:999px;padding:.35rem .65rem;font-size:.78rem;font-weight:700}.smarthome-state.is-ok{background:#eaf8ef;color:#18794e}.smarthome-state.is-alert{background:#fff1f0;color:#b42318}.smarthome-control-card{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:1.25rem}.smarthome-control-card h2{font-size:1.05rem;margin:0 0 1rem}.smarthome-section-title{font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:#667085;margin:1.5rem 0 .75rem}
