.emna-clients-page {
    color: #223047;
    padding-top: 14px;
}

.emna-clients-command {
    align-items: stretch;
    background: linear-gradient(135deg, #d7edf7 0%, #c6e5ee 55%, #a9d6dc 100%);
    border: 1px solid #aacddd;
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 300px;
    margin-bottom: 16px;
    padding: 24px;
}

.emna-garage-page-v2 .emna-garage-kpis {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.emna-clients-command span,
.emna-client-card-head span,
.emna-client-edit-head span {
    color: #5f6f86;
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.emna-clients-command > div > span,
.emna-client-edit-head > div > span {
    color: #1f6f78;
}

.emna-clients-command h2 {
    color: #14213d;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.16;
    margin: 8px 0;
}

.emna-clients-command p,
.emna-client-edit-head p {
    color: #344054;
    font-weight: 700;
    line-height: 1.5;
    margin: 0;
}

.emna-clients-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.emna-clients-command aside {
    display: grid;
    gap: 10px;
}

.emna-clients-command aside div {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(135, 185, 205, .7);
    border-radius: 8px;
    padding: 14px;
}

.emna-clients-command aside strong {
    color: #14213d;
    display: block;
    font-size: 28px;
    font-weight: 900;
    margin-top: 4px;
}

.emna-clients-page .emna-directory-table tbody tr.active td {
    background: #eef8fa;
    border-color: #cde8eb;
}

.emna-clients-page .emna-directory-table .btn,
.emna-clients-page .emna-clients-actions .btn {
    border-radius: 6px;
    box-shadow: none;
    font-weight: 800;
}

.emna-clients-page .emna-directory-table .badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 950;
    justify-content: center;
    min-width: 48px;
    padding: 7px 12px;
}

.emna-clients-page .emna-directory-table .badge.bg-info-transparent {
    background: #e7f7fb !important;
    border: 1px solid #a9dbe8 !important;
    color: #087f9b !important;
}

.emna-clients-page .emna-directory-table .badge.bg-primary-transparent {
    background: #eaf1ff !important;
    border: 1px solid #b7ccff !important;
    color: #155eef !important;
}

.emna-clients-list-card {
    transition: margin .22s ease, transform .22s ease;
}

.emna-clients-list-card .card-header,
.emna-clients-list-card .card-body,
.emna-clients-list-card .emna-directory-toolbar,
.emna-clients-list-card .table-responsive {
    transition: padding .22s ease, margin .22s ease, max-height .24s ease, opacity .18s ease;
}

.emna-clients-list-card.is-editing {
    margin-bottom: 10px;
}

.emna-clients-list-card.is-editing .card-header {
    padding-bottom: 10px;
    padding-top: 10px;
}

.emna-clients-list-card.is-editing .card-body {
    padding-bottom: 12px;
    padding-top: 10px;
}

.emna-clients-list-card.is-editing .emna-directory-toolbar {
    justify-content: flex-start;
    margin-bottom: 8px;
}

.emna-clients-list-card.is-editing .table-responsive {
    border: 1px solid #d5edf2;
    border-radius: 8px;
    background: rgba(255, 255, 255, .36);
    max-height: 176px;
    overflow: hidden;
    padding: 10px;
}

.emna-clients-list-card.is-editing .emna-directory-table thead th {
    padding-bottom: 11px !important;
    padding-top: 11px !important;
}

.emna-clients-list-card.is-editing .emna-directory-table tbody td {
    background: #f8fcfd;
    border-bottom: 1px solid #cde8eb !important;
    border-top: 1px solid #cde8eb !important;
    padding-bottom: 18px !important;
    padding-top: 18px !important;
}

.emna-clients-list-card.is-editing .emna-directory-table tbody tr.active td:first-child {
    border-left: 4px solid #1f6f78;
    border-radius: 8px 0 0 8px;
}

.emna-clients-list-card.is-editing .emna-directory-table tbody tr.active td:last-child {
    border-radius: 0 8px 8px 0;
}

.emna-clients-list-card.is-editing .emna-directory-table tbody td strong {
    font-size: 15px;
}

.emna-clients-list-card.is-editing .emna-directory-table tbody td small {
    display: block;
    margin-top: 5px;
}

.emna-clients-list-card.is-editing .emna-directory-table .badge {
    min-width: 64px;
    padding: 8px 14px;
}

.emna-client-edit-state {
    align-items: center;
    background: #ecfdf3;
    border: 1px solid #c7ebd5;
    border-radius: 999px;
    color: #067647;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    gap: 6px;
    padding: 9px 12px;
    white-space: nowrap;
}

.emna-vehicles-directory-card {
    transition: margin .22s ease, transform .22s ease;
}

.emna-vehicles-directory-card.is-history-open {
    margin-bottom: 10px;
}

.emna-vehicles-directory-card.is-history-open .card-header {
    padding-bottom: 9px;
    padding-top: 9px;
}

.emna-vehicles-directory-card.is-history-open .card-body {
    padding-bottom: 10px;
    padding-top: 10px;
}

.emna-vehicles-directory-card.is-history-open .emna-directory-toolbar {
    margin-bottom: 8px;
}

.emna-vehicles-directory-card.is-history-open .emna-vehicles-directory-table-wrap {
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    max-height: 190px;
    overflow: auto;
}

.emna-vehicles-directory-card.is-history-open .emna-directory-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.emna-vehicles-directory-card.is-history-open .emna-directory-table tbody td {
    padding-bottom: 8px !important;
    padding-top: 8px !important;
}

.emna-vehicles-directory-card.is-history-open .emna-directory-table small,
.emna-vehicles-directory-card.is-history-open .emna-directory-table td:nth-child(3),
.emna-vehicles-directory-card.is-history-open .emna-directory-table td:nth-child(4) {
    font-size: 12px;
}

.emna-vehicles-directory-card.is-single-result .card-header {
    padding-bottom: 12px;
    padding-top: 12px;
}

.emna-vehicles-directory-card.is-single-result .card-body {
    padding-bottom: 16px;
    padding-top: 14px;
}

.emna-vehicles-directory-card.is-single-result .emna-directory-toolbar {
    margin-bottom: 12px;
}

.emna-vehicles-directory-card.is-single-result .emna-vehicles-directory-table-wrap {
    max-height: none;
    min-height: 132px;
    overflow: visible;
}

.emna-vehicles-directory-card.is-single-result .emna-directory-table tbody td {
    padding-bottom: 18px !important;
    padding-top: 18px !important;
}

.emna-vehicles-directory-card.is-single-result .emna-directory-table tbody tr.active td:first-child {
    border-left: 4px solid #1f6f78;
}

.emna-vehicles-directory-card.is-single-result .emna-directory-table small {
    margin-top: 5px;
}

.emna-clients-hint {
    align-items: center;
    color: #667085;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
}

.emna-client-edit-panel {
    background: #fff;
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    box-shadow: none;
    margin-top: 16px;
    padding: 18px;
}

.emna-client-edit-panel.empty {
    background: #f8fafc;
}

.emna-client-modal-backdrop {
    align-items: center;
    background: rgba(10, 20, 40, .62);
    display: flex;
    inset: 0;
    justify-content: center;
    overflow-y: auto;
    padding: 22px;
    position: fixed;
    z-index: 2200;
}

.main-content .emna-clients-page .emna-client-modal.emna-client-edit-panel {
    background: #fff !important;
    border: 1px solid #dfe7f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 70px rgba(16, 35, 60, .24) !important;
    margin: 0;
    margin-top: 0;
    max-height: calc(100vh - 44px);
    max-width: 980px;
    overflow-y: auto;
    padding: 22px;
    width: 100%;
}

.main-content .emna-suppliers-page .emna-supplier-edit-modal {
    max-height: calc(100vh - 48px);
    max-width: 760px;
    width: 100%;
}

.main-content .emna-client-modal .emna-client-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.main-content .emna-client-modal .emna-client-card-head {
    display: none;
}

.main-content .emna-client-modal .emna-client-vehicles-card {
    background: #f8fafc !important;
    border: 1px solid #e5ebf2 !important;
    border-radius: 12px !important;
    padding: 16px !important;
}

button.emna-modal-close {
    align-items: center;
    background: #f4f7fa !important;
    border: 1px solid #dce4ed !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #53657a !important;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    padding: 0 !important;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
    width: 38px;
}

button.emna-modal-close:hover,
button.emna-modal-close:focus-visible {
    background: #eaf2f8 !important;
    border-color: #bdcedf !important;
    color: #23425f !important;
    outline: 0;
}

button.emna-modal-close .fe {
    height: 17px;
    width: 17px;
}

.emna-client-edit-head,
.emna-client-card-head {
    align-items: flex-start;
    border-bottom: 1px solid #edf1f6;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
}

.emna-client-edit-head h3,
.emna-client-card-head h4 {
    color: #14213d;
    font-weight: 900;
    letter-spacing: 0;
    margin: 3px 0 0;
}

.emna-client-card-head > i {
    align-items: center;
    background: #eef8fa;
    border: 1px solid #cde8eb;
    border-radius: 8px;
    color: #1f6f78;
    display: flex;
    font-size: 18px;
    height: 42px;
    justify-content: center;
    min-width: 42px;
}

.emna-client-edit-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-bottom: 14px;
}

.emna-client-card,
.emna-client-vehicle-row {
    background: #fff;
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    box-shadow: none;
    padding: 16px;
}

.emna-client-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.emna-client-form-grid .wide {
    grid-column: 1 / -1;
}

.emna-client-form-grid .form-label {
    color: #5f6f86;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.emna-client-form-grid .form-control {
    border-color: #d8e3ef;
    border-radius: 6px;
    box-shadow: none !important;
    color: #14213d;
    font-weight: 700;
    min-height: 42px;
}

.emna-client-form-grid .form-control:focus {
    border-color: #7ab7cc;
    box-shadow: none !important;
}

.emna-vehicle-lookup {
    display: grid;
    gap: 8px;
}

.emna-vehicle-suggestions {
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    display: grid;
    gap: 7px;
    padding: 9px;
}

.emna-vehicle-suggestions-head {
    align-items: center;
    background: #eef8fa;
    border: 1px solid #cde8eb;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: space-between;
    padding: 9px 11px;
}

.emna-vehicle-suggestions-head strong {
    color: #14213d;
    font-size: 12px;
    font-weight: 800;
}

.emna-vehicle-suggestions-head span {
    color: #5f6f86;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.emna-vehicle-suggestion-option {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    color: #14213d;
    display: grid;
    gap: 9px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    min-height: 42px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.emna-vehicle-suggestion-option:hover {
    background: #f0f9fa;
    border-color: #17a2b8;
}

.emna-vehicle-suggestion-option > .fe {
    color: #17a2b8;
}

.emna-vehicle-suggestion-option strong {
    font-size: 12px;
}

.emna-vehicle-suggestion-option em {
    background: #fff;
    border: 1px solid #cde8eb;
    border-radius: 999px;
    color: #52627b;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    padding: 5px 9px;
}

.emna-vehicle-suggestion-empty {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5eaf3;
    border-radius: 8px;
    color: #667085;
    display: flex;
    font-size: 12px;
    gap: 8px;
    padding: 10px;
}

.emna-vehicle-suggestion-empty .fe {
    color: #17a2b8;
    flex: 0 0 auto;
}

.emna-client-vehicles-card {
    margin-top: 0;
}

.emna-client-vehicles-list {
    display: grid;
    gap: 12px;
}

.emna-client-vehicle-row {
    background: #f8fafc;
}

.emna-client-vehicle-title {
    align-items: center;
    background: #eef8fa;
    border: 1px solid #cde8eb;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 10px 12px;
}

.emna-client-vehicle-title strong {
    color: #14213d;
    font-size: 16px;
    font-weight: 900;
}

.emna-client-vehicle-title span {
    color: #667085;
    font-weight: 800;
}

.emna-clients-empty {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cdd8e5;
    border-radius: 8px;
    color: #667085;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 30px;
    text-align: center;
}

.emna-clients-empty i,
.emna-clients-empty strong {
    color: #1f6f78;
}

.emna-clients-empty strong {
    font-size: 16px;
    font-weight: 900;
}

.emna-clients-empty.compact {
    padding: 18px;
}

.emna-structured-empty {
    align-items: center;
    background: #f0f8fc;
    border: 1px solid #c8e8ef;
    border-radius: 8px;
    color: #667085;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    text-align: center;
    width: 100%;
}

.emna-structured-empty > .fe {
    color: #1f6f78;
    font-size: 20px;
}

.emna-structured-empty > span {
    color: #5f6f86;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.emna-structured-empty > strong {
    color: #1f6f78;
    font-size: 15px;
    font-weight: 900;
}

.emna-structured-empty > p {
    color: #667085;
    font-size: 13px;
    margin: 0;
    max-width: 680px;
}

.emna-structured-empty-actions {
    margin-top: 5px;
}

.emna-structured-empty-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.emna-vehicle-history-panel {
    background: #f9fcff;
    padding: 0;
}

.emna-vehicle-history-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #d7edf7 0%, #c6e5ee 55%, #a9d6dc 100%);
    border-bottom: 1px solid #aacddd;
    border-radius: 8px 8px 0 0;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 300px;
    margin-bottom: 16px;
    padding: 22px;
}

.emna-vehicle-history-hero > div > span,
.emna-vehicle-history-hero aside span {
    color: #1f6f78;
    display: block;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.emna-vehicle-history-hero h3 {
    color: #14213d;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: 0;
    margin: 8px 0 4px;
}

.emna-vehicle-history-hero p {
    color: #344054;
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

.emna-vehicle-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.emna-vehicle-history-tags strong {
    align-items: center;
    background: rgba(255, 255, 255, .76);
    border: 1px solid rgba(135, 185, 205, .7);
    border-radius: 999px;
    color: #14213d;
    display: inline-flex;
    gap: 7px;
    font-size: 12px;
    font-weight: 900;
    padding: 8px 11px;
}

.emna-vehicle-history-tags i {
    color: #1f6f78;
}

.emna-vehicle-history-hero aside {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(135, 185, 205, .7);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.emna-vehicle-history-hero aside div {
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(135, 185, 205, .55);
    border-radius: 8px;
    padding: 10px;
}

.emna-vehicle-history-hero aside strong {
    color: #14213d;
    display: block;
    font-size: 18px;
    font-weight: 950;
    margin-top: 3px;
}

.emna-vehicle-history-close {
    align-items: center;
    background: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 6px;
    box-shadow: none !important;
    color: #fff;
    display: inline-flex;
    font-weight: 950;
    gap: 8px;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    width: 100%;
}

.emna-vehicle-history-close:hover,
.emna-vehicle-history-close:focus {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.emna-vehicle-history-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 0 16px;
}

.emna-vehicle-history-stats button {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dfe8f2;
    border-top: 4px solid #2d7aa6;
    border-radius: 8px;
    box-shadow: none;
    color: inherit;
    display: grid;
    gap: 5px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding: 12px;
    text-align: left;
}

.emna-vehicle-history-stats button:hover,
.emna-vehicle-history-stats button.active {
    background: #eef8fa;
    border-color: #9fcbd7;
    border-top-color: #087f5b;
}

.emna-vehicle-history-stats i {
    align-items: center;
    background: #eef8fa;
    border: 1px solid #cde8eb;
    border-radius: 8px;
    color: #1f6f78;
    display: flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.emna-vehicle-history-stats span {
    color: #5f6f86;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.emna-vehicle-history-stats strong {
    color: #14213d;
    font-size: 28px;
    font-weight: 950;
}

.emna-vehicle-history-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
    padding: 0 16px 16px;
}

.emna-vehicle-history-detail {
    grid-template-columns: minmax(0, 1fr);
}

.emna-vehicle-history-list {
    display: grid;
    gap: 10px;
}

.emna-vehicle-history-timeline {
    position: relative;
}

.emna-vehicle-history-timeline::before {
    background: #cde8eb;
    bottom: 12px;
    content: "";
    left: 24px;
    position: absolute;
    top: 12px;
    width: 2px;
}

.emna-vehicle-history-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 12px;
    position: relative;
}

.emna-vehicle-history-item.warning {
    background: #fff8e6;
    border-color: #ffe1a6;
}

.emna-vehicle-history-item.document {
    background: #eef8fa;
    border-color: #cde8eb;
    grid-template-columns: 36px minmax(0, 1fr) auto auto;
}

.emna-vehicle-history-marker {
    align-items: center;
    background: #fff;
    border: 1px solid #cde8eb;
    border-radius: 8px;
    color: #1f6f78;
    display: flex;
    height: 36px;
    justify-content: center;
    position: relative;
    width: 36px;
    z-index: 1;
}

.emna-vehicle-history-item.warning .emna-vehicle-history-marker {
    border-color: #ffe1a6;
    color: #9a6700;
}

.emna-vehicle-history-item strong {
    color: #14213d;
    display: block;
    font-weight: 950;
}

.emna-vehicle-history-item small {
    color: #667085;
    display: block;
    font-weight: 800;
    margin-top: 3px;
}

.emna-vehicle-history-item p {
    color: #344054;
    font-weight: 700;
    line-height: 1.4;
    margin: 6px 0 0;
}

.emna-vehicle-history-item b {
    background: #fff;
    border: 1px solid #cde8eb;
    border-radius: 999px;
    color: #087f5b;
    font-weight: 950;
    padding: 7px 10px;
    white-space: nowrap;
}

.emna-vehicle-history-doc-action {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    min-height: 32px;
    white-space: nowrap;
}

.dark-theme .emna-clients-page {
    color: #dbe4f0;
}

.dark-theme .emna-clients-command {
    background: linear-gradient(135deg, #111827 0%, #1f2940 58%, #12343b 100%);
    border-color: rgba(255, 255, 255, .1);
}

.dark-theme .emna-vehicle-history-panel {
    background: var(--dark-theme);
}

.dark-theme .emna-vehicle-history-hero {
    background: linear-gradient(135deg, #111827 0%, #1f2940 58%, #12343b 100%);
    border-color: rgba(255, 255, 255, .1);
}

.dark-theme .emna-clients-command h2,
.dark-theme .emna-clients-command aside strong,
.dark-theme .emna-client-edit-head h3,
.dark-theme .emna-client-card-head h4,
.dark-theme .emna-client-vehicle-title strong,
.dark-theme .emna-vehicle-history-hero h3,
.dark-theme .emna-vehicle-history-hero aside strong,
.dark-theme .emna-vehicle-history-tags strong,
.dark-theme .emna-vehicle-history-stats strong,
.dark-theme .emna-vehicle-history-item strong {
    color: #fff;
}

.dark-theme .emna-clients-command p,
.dark-theme .emna-client-edit-head p,
.dark-theme .emna-client-vehicle-title span,
.dark-theme .emna-clients-hint,
.dark-theme .emna-vehicle-history-hero p,
.dark-theme .emna-vehicle-history-item p,
.dark-theme .emna-vehicle-history-item small {
    color: #b6c2d6;
}

.dark-theme .emna-clients-command aside div,
.dark-theme .emna-client-edit-panel,
.dark-theme .emna-client-card,
.dark-theme .emna-vehicle-history-hero aside,
.dark-theme .emna-vehicle-history-hero aside div,
.dark-theme .emna-vehicle-history-tags strong {
    background: var(--dark-theme);
    border-color: rgba(255, 255, 255, .1);
}

.dark-theme .main-content .emna-client-modal.emna-client-edit-panel {
    background: var(--dark-theme) !important;
    border-color: rgba(255, 255, 255, .12) !important;
}

.dark-theme .main-content .emna-client-modal .emna-client-vehicles-card {
    background: var(--dark-body) !important;
    border-color: rgba(255, 255, 255, .1) !important;
}

.dark-theme .main-content .emna-client-modal .emna-client-vehicles-card .emna-client-card-head {
    border-color: rgba(255, 255, 255, .12);
}

.dark-theme button.emna-modal-close {
    background: var(--dark-body) !important;
    border-color: rgba(255, 255, 255, .16) !important;
    color: #dbe4f0 !important;
}

.dark-theme button.emna-modal-close:hover,
.dark-theme button.emna-modal-close:focus-visible {
    background: #2b3a4e !important;
    color: #fff !important;
}

.dark-theme .emna-client-vehicle-row,
.dark-theme .emna-client-vehicle-title,
.dark-theme .emna-clients-empty,
.dark-theme .emna-structured-empty,
.dark-theme .emna-client-card-head > i,
.dark-theme .emna-vehicle-history-stats button,
.dark-theme .emna-vehicle-history-stats i,
.dark-theme .emna-vehicle-history-marker,
.dark-theme .emna-vehicle-history-item,
.dark-theme .emna-vehicle-history-item.document,
.dark-theme .emna-vehicle-history-item b {
    background: var(--dark-body);
    border-color: rgba(255, 255, 255, .1);
}

.dark-theme .emna-structured-empty > span,
.dark-theme .emna-structured-empty > p {
    color: #aab5c4;
}

.dark-theme .emna-structured-empty > strong {
    color: #8bd3dc;
}

.dark-theme .emna-vehicle-history-timeline::before {
    background: rgba(255, 255, 255, .12);
}

.dark-theme .emna-client-form-grid .form-control {
    background: var(--dark-body);
    border-color: rgba(255, 255, 255, .12);
    color: #fff;
}

.dark-theme .emna-vehicle-suggestions {
    background: var(--dark-theme);
    border-color: rgba(255, 255, 255, .12);
}

.dark-theme .emna-vehicle-suggestions-head {
    background: var(--dark-body);
    border-color: rgba(255, 255, 255, .12);
}

.dark-theme .emna-vehicle-suggestions-head strong,
.dark-theme .emna-vehicle-suggestion-option {
    color: #f3f7fb;
}

.dark-theme .emna-vehicle-suggestions-head span,
.dark-theme .emna-vehicle-suggestion-empty {
    color: #b7c5d5;
}

.dark-theme .emna-vehicle-suggestion-option,
.dark-theme .emna-vehicle-suggestion-empty {
    background: var(--dark-body);
    border-color: rgba(255, 255, 255, .12);
}

.dark-theme .emna-vehicle-suggestion-option em {
    background: var(--dark-theme);
    border-color: rgba(255, 255, 255, .16);
    color: #dbe4f0;
}

.dark-theme .emna-clients-list-card.is-editing .table-responsive {
    border-color: rgba(255, 255, 255, .12);
}

.dark-theme .emna-clients-page .emna-directory-table .badge.bg-info-transparent {
    background: rgba(14, 165, 233, .18) !important;
    border-color: rgba(125, 211, 252, .32) !important;
    color: #7dd3fc !important;
}

.dark-theme .emna-clients-page .emna-directory-table .badge.bg-primary-transparent {
    background: rgba(37, 99, 235, .2) !important;
    border-color: rgba(147, 197, 253, .34) !important;
    color: #bfdbfe !important;
}

.dark-theme .emna-client-edit-state {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(74, 222, 128, .28);
    color: #a8f2c9;
}

@media (max-width: 1200px) {
    .emna-clients-command,
    .emna-client-edit-grid,
    .emna-vehicle-history-hero,
    .emna-vehicle-history-grid,
    .emna-vehicle-history-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .emna-clients-command,
    .emna-client-edit-panel,
    .emna-client-card {
        padding: 16px;
    }

    .emna-clients-command h2 {
        font-size: 23px;
    }

    .emna-client-form-grid {
        grid-template-columns: 1fr;
    }

    .emna-client-edit-head,
    .emna-client-card-head,
    .emna-client-vehicle-title {
        align-items: stretch;
        flex-direction: column;
    }

    .emna-client-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .emna-client-modal {
        border-radius: 14px 14px 0 0;
        max-height: 94vh;
        padding: 17px;
    }

    .main-content .emna-suppliers-page .emna-supplier-edit-modal {
        max-height: 94vh;
    }
}

.emna-supplier-purchases-backdrop {
    align-items: center;
    background: rgba(11, 25, 42, .68);
    display: flex;
    inset: 0;
    justify-content: center;
    overflow-y: auto;
    padding: 22px;
    position: fixed;
    z-index: 1320;
}

.emna-supplier-purchases-modal {
    background: #f7fafc;
    border: 1px solid #d5e1eb;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(3, 18, 35, .34);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 44px);
    max-width: 1120px;
    overflow: hidden;
    width: 100%;
}

.emna-supplier-purchases-head {
    align-items: center;
    background: linear-gradient(120deg, #eff7ff, #f4fbf8);
    border-bottom: 1px solid #dce7ef;
    display: flex;
    flex: 0 0 auto;
    gap: 14px;
    padding: 20px 24px;
}

.emna-supplier-purchases-head-icon {
    align-items: center;
    background: #e0edff;
    border: 1px solid #c6d9f8;
    border-radius: 13px;
    color: #2862bc;
    display: inline-flex;
    flex: 0 0 46px;
    height: 46px;
    justify-content: center;
}

.emna-supplier-purchases-head-icon .fe { height: 21px; width: 21px; }
.emna-supplier-purchases-heading { flex: 1; min-width: 0; }
.emna-supplier-purchases-heading > span { color: #61788f; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.emna-supplier-purchases-heading h2 { color: #142a40; font-size: 21px; font-weight: 900; margin: 2px 0 0; }
.emna-supplier-purchases-heading p { color: #607489; font-size: 12px; margin: 4px 0 0; overflow-wrap: anywhere; }

.emna-supplier-purchases-close {
    align-items: center;
    background: #fff;
    border: 1px solid #d4e0ea;
    border-radius: 9px;
    color: #587087;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.emna-supplier-purchases-body { min-height: 0; overflow: auto; padding: 20px 24px; }
.emna-supplier-purchases-intro { color: #607489; font-size: 12px; margin: 0 0 14px; }
.emna-supplier-purchase-list { display: grid; gap: 12px; }
.emna-supplier-purchase-card { background: #fff; border: 1px solid #d8e4ec; border-radius: 13px; overflow: hidden; }
.emna-supplier-purchase-card-head { align-items: center; background: #f4f8fb; border-bottom: 1px solid #e3ebf1; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 15px; }
.emna-supplier-purchase-card-head > div:first-child { display: grid; gap: 3px; margin-right: auto; }
.emna-supplier-purchase-number { color: #183858; font-size: 14px; font-weight: 900; }
.emna-supplier-purchase-card-head small { color: #75879a; font-size: 11px; }
.emna-supplier-purchase-badges { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.emna-supplier-purchase-status,
.emna-supplier-payment-status { background: #edf4fa; border: 1px solid #d7e4ef; border-radius: 99px; color: #476178; font-size: 10px; font-weight: 850; padding: 5px 9px; }
.emna-supplier-payment-status.payee { background: #e8f8ef; border-color: #bce8cd; color: #087546; }
.emna-supplier-payment-status.partiel { background: #fff6df; border-color: #f1dda0; color: #96600a; }
.emna-supplier-payment-status.impayee { background: #fff0ef; border-color: #f2ceca; color: #a1342d; }
.emna-supplier-purchase-print { border-radius: 7px; font-size: 11px; font-weight: 800; }
.emna-supplier-purchase-context { display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 10px 15px; }
.emna-supplier-purchase-context span { align-items: center; color: #607489; display: inline-flex; font-size: 11px; gap: 5px; }
.emna-supplier-purchase-context a { color: #1769aa; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.emna-supplier-purchase-context .fe { color: #8297aa; height: 13px; width: 13px; }
.emna-supplier-purchase-lines-wrap { margin: 0 15px; }
.emna-supplier-purchase-lines { box-sizing: border-box; font-size: 11px; min-width: 0; table-layout: fixed; width: 100%; }
.emna-supplier-purchase-lines th:first-child,
.emna-supplier-purchase-lines td:first-child { width: 38%; }
.emna-supplier-purchase-lines th:nth-child(2),
.emna-supplier-purchase-lines td:nth-child(2) { width: 20%; }
.emna-supplier-purchase-lines th:nth-child(3),
.emna-supplier-purchase-lines td:nth-child(3) { width: 8%; }
.emna-supplier-purchase-lines th:nth-child(4),
.emna-supplier-purchase-lines td:nth-child(4) { width: 16%; }
.emna-supplier-purchase-lines th:last-child,
.emna-supplier-purchase-lines td:last-child { min-width: 0; width: 18%; white-space: nowrap; }
.emna-supplier-purchase-lines th:last-child { color: #315b7b; font-size: 10px; }
.emna-supplier-purchase-lines th:last-child,
.emna-supplier-purchase-lines td:last-child { padding-right: 28px; }
.emna-supplier-purchase-lines td:last-child { background: #f2f8fd; }
.emna-supplier-purchase-lines td:first-child strong { overflow-wrap: anywhere; }
.emna-supplier-purchase-lines th { background: #f2f6f9; color: #677e93; font-size: 9px; letter-spacing: .04em; padding: 7px 9px; text-transform: uppercase; white-space: nowrap; }
.emna-supplier-purchase-lines td { color: #3a5065; padding: 8px 9px; vertical-align: middle; }
.emna-supplier-purchase-lines td:first-child strong { color: #20394f; display: block; }
.emna-supplier-purchase-lines td:first-child small { color: #8292a2; display: block; font-size: 10px; margin-top: 2px; }
.emna-supplier-purchase-lines td:last-child strong { color: #183858; font-size: 12px; white-space: nowrap; }
.emna-supplier-line-vendor { background: #f2f5f8; border-radius: 99px; color: #64778a; display: inline-block; font-size: 10px; font-weight: 750; max-width: 200px; overflow: hidden; padding: 4px 8px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.emna-supplier-line-vendor.is-current { background: #e8f4ff; color: #1e5c9d; }
.emna-supplier-purchase-financials { align-items: center; background: #f8fafc; border-top: 1px solid #ebf0f4; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: flex-end; margin-top: 8px; padding: 10px 15px; }
.emna-supplier-purchase-financials span { color: #708195; font-size: 10px; text-transform: uppercase; }
.emna-supplier-purchase-financials strong { color: #243e55; display: block; font-size: 13px; margin-top: 2px; text-align: right; }
.emna-supplier-payment-history { border-top: 1px solid #ebf0f4; }
.emna-supplier-payment-history summary { align-items: center; color: #315a7a; cursor: pointer; display: flex; font-size: 11px; font-weight: 850; gap: 7px; list-style: none; padding: 11px 15px; }
.emna-supplier-payment-history summary::-webkit-details-marker { display: none; }
.emna-supplier-payment-history summary .fe { height: 14px; width: 14px; }
.emna-supplier-payment-history .table { font-size: 10px; margin: 0; }
.emna-supplier-payment-history th { background: #f5f8fa; color: #728499; font-size: 9px; padding: 7px 9px; text-transform: uppercase; }
.emna-supplier-payment-history td { color: #536a7f; padding: 7px 9px; }
.emna-supplier-purchases-empty { align-items: center; background: #fff; border: 1px dashed #bfd0dd; border-radius: 13px; color: #65798d; display: flex; flex-direction: column; gap: 7px; padding: 32px 20px; text-align: center; }
.emna-supplier-purchases-empty > .fe { color: #6d91af; height: 28px; width: 28px; }
.emna-supplier-purchases-empty strong { color: #29465f; font-size: 15px; }
.emna-supplier-purchases-empty span { font-size: 11px; }
.emna-supplier-purchases-footer { align-items: center; background: #fff; border-top: 1px solid #dce6ee; display: flex; flex: 0 0 auto; gap: 16px; justify-content: space-between; padding: 12px 24px; }
.emna-supplier-purchases-footer > span { color: #77899a; font-size: 10px; line-height: 1.45; max-width: 760px; }

.dark-theme .emna-supplier-purchases-modal { background: #162a39; border-color: #365062; }
.dark-theme .emna-supplier-purchases-head { background: linear-gradient(120deg, #1a3448, #1d3c3a); border-color: #365062; }
.dark-theme .emna-supplier-purchases-heading h2,
.dark-theme .emna-supplier-purchase-number,
.dark-theme .emna-supplier-purchase-lines td:first-child strong,
.dark-theme .emna-supplier-purchase-financials strong,
.dark-theme .emna-supplier-purchases-empty strong { color: #e5eef5; }
.dark-theme .emna-supplier-purchases-heading > span,
.dark-theme .emna-supplier-purchases-heading p,
.dark-theme .emna-supplier-purchases-intro,
.dark-theme .emna-supplier-purchase-card-head small,
.dark-theme .emna-supplier-purchase-context span,
.dark-theme .emna-supplier-purchase-financials span,
.dark-theme .emna-supplier-purchases-footer > span { color: #a9bbca; }
.dark-theme .emna-supplier-purchase-card,
.dark-theme .emna-supplier-purchases-empty { background: #1d3546; border-color: #365062; }
.dark-theme .emna-supplier-purchase-card-head,
.dark-theme .emna-supplier-purchase-lines th,
.dark-theme .emna-supplier-purchase-history th,
.dark-theme .emna-supplier-purchase-financials,
.dark-theme .emna-supplier-purchases-footer { background: #1a3040; border-color: #365062; }
.dark-theme .emna-supplier-purchase-lines td,
.dark-theme .emna-supplier-payment-history td { color: #c1d0dc; }
.dark-theme .emna-supplier-purchase-lines th:last-child { color: #b7d6ef; }
.dark-theme .emna-supplier-purchase-lines td:last-child { background: #20394a; }
.dark-theme .emna-supplier-purchase-lines td:last-child strong { color: #e5eef5; }
.dark-theme .emna-supplier-line-vendor { background: #2b4050; color: #cad6df; }
.dark-theme .emna-supplier-line-vendor.is-current { background: #244665; color: #bfdbfe; }
.dark-theme .emna-supplier-purchase-context a { color: #8fcaff; }
.dark-theme .emna-supplier-payment-history { border-color: #365062; }
.dark-theme .emna-supplier-payment-history summary { color: #a8cff0; }
.dark-theme .emna-supplier-purchases-close { background: #203747; border-color: #365062; color: #cbd5e1; }

@media (max-width: 768px) {
    .emna-supplier-purchases-backdrop { align-items: stretch; padding: 0; }
    .emna-supplier-purchases-modal { border-radius: 0; max-height: 100vh; }
    .emna-supplier-purchases-head { padding: 15px; }
    .emna-supplier-purchases-body { padding: 14px; }
    .emna-supplier-purchase-card-head { align-items: flex-start; }
    .emna-supplier-purchase-lines { min-width: 760px; }
    .emna-supplier-purchases-footer { align-items: stretch; flex-direction: column; padding: 12px 15px; }
}

@media (max-width: 480px) {
    .emna-supplier-purchase-badges { width: 100%; }
    .emna-supplier-purchase-print { margin-left: auto; }
    .emna-supplier-purchase-financials { justify-content: flex-start; }
}
