/* IncaOnline Components */

/* === ACTION BAR === */
.io-action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--io-bg-white);
    border: 1px solid var(--io-border);
    border-radius: var(--io-border-radius);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.io-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.35rem 0.65rem;
    border: none;
    background: none;
    color: var(--io-text-dark);
    font-size: 0.6875rem;
    cursor: pointer;
    border-radius: var(--io-border-radius);
    transition: var(--io-transition);
    text-decoration: none;
}

.io-action-btn:hover {
    background-color: #dbe4fd;
    color: var(--io-primary);
}

.io-action-btn i {
    font-size: 1.1rem;
}

.io-action-divider {
    width: 1px;
    height: 30px;
    background-color: var(--io-border);
    margin: 0 0.25rem;
}

/* === CARDS === */
.io-card {
    background-color: var(--io-bg-white);
    border: 1px solid var(--io-border);
    border-radius: var(--io-border-radius);
    box-shadow: var(--io-shadow-sm);
}

.io-card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--io-border);
    font-weight: 600;
    font-size: 0.875rem;
}

.io-card-body {
    padding: 1rem;
}

/* === FORM CONTROLS === */
.io-form-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--io-text-muted);
    margin-bottom: 0.25rem;
}

.form-control, .form-select {
    font-size: 0.8125rem;
    border-color: var(--io-border);
}

.form-control:focus, .form-select:focus {
    border-color: var(--io-primary);
    box-shadow: 0 0 0 0.2rem rgba(92, 39, 229, 0.15);
}

/* === DASHBOARD TAB NAVIGATION === */
.io-dash-tabs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--io-border);
}

.io-dash-tabs .nav-link {
    position: relative;
    padding: 0.6rem 1rem;
    border: none;
    background: none;
    color: #999;
    font-size: 1.5rem;
    transition: var(--io-transition);
    border-bottom: 4px solid transparent;
    margin-bottom: -0.55rem;
}

.io-dash-tabs .nav-link:hover {
    color: #555;
}

.io-dash-tabs .nav-link.active {
    color: var(--io-primary);
    border-bottom-color: var(--io-primary);
}

.io-dash-tabs .nav-link .badge-dot {
    position: absolute;
    top: 6px;
    right: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #dc3545;
    border: 2px solid #fff;
}

/* === COLORED WIDGET SECTIONS === */
.io-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--io-text-dark);
    margin-bottom: 0.5rem;
}

.io-widget-section {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.io-widget-section.section-basedata   { background: var(--io-basedata); }
.io-widget-section.section-invoicing  { background: var(--io-invoicing); }
.io-widget-section.section-employee   { background: var(--io-employee); }
.io-widget-section.section-modules    { background: var(--io-modules); }

.io-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
}

/* Individual widget cards */
.io-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.65rem 0.75rem;
    border-radius: 9px;
    text-decoration: none;
    color: #192124;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.25s, color 0.25s, filter 0.25s;
    min-height: 68px;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.45));
}

.io-widget:hover {
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.55));
}

.io-widget i {
    font-size: 1.4rem;
    margin-bottom: 1px;
}

/* Module section: 6-column organized grid */
.section-modules .io-widget-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
}

/* Per-section card colors & hover */
.section-basedata .io-widget  { background: var(--io-basedata-card); }
.section-basedata .io-widget:hover  { background: var(--io-basedata-hover); color: var(--io-basedata-card); }

.section-invoicing .io-widget { background: var(--io-invoicing-card); }
.section-invoicing .io-widget:hover { background: var(--io-invoicing-hover); color: var(--io-invoicing-card); }

.section-employee .io-widget  { background: var(--io-employee-card); }
.section-employee .io-widget:hover  { background: var(--io-employee-hover); color: var(--io-employee-card); }

.section-modules .io-widget   { background: var(--io-modules-card); }
.section-modules .io-widget:hover   { background: var(--io-modules-hover); color: var(--io-modules-card); }

/* Section min-height for consistency */
.io-widget-section.io-section-tall {
    min-height: 300px;
}

/* === BOTTOM ACTION BAR === */
.io-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.io-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    border-radius: 9px;
    text-decoration: none;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    transition: background 0.25s, color 0.25s, filter 0.25s;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.45));
    min-height: 72px;
    cursor: pointer;
    border: none;
}

.io-quick-action i { font-size: 1.4rem; }

.io-quick-action.qa-red      { background: #dc3545; }
.io-quick-action.qa-blue     { background: #326dc7; }
.io-quick-action.qa-dark     { background: #2d3436; }
.io-quick-action.qa-green    { background: var(--io-modules); }

.io-quick-action:hover {
    background: var(--io-bg-white) !important;
    color: var(--io-text-dark);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* === BIRTHDAY WIDGET === */
.io-birthday-card {
    background: var(--io-bg-white);
    border-radius: 12px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
    overflow: hidden;
}

.io-birthday-header {
    position: relative;
    padding: 1.25rem 1rem 0.75rem;
    border-bottom: 1px solid var(--io-border);
}

.io-birthday-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(92,39,229,0.06) 0%, rgba(255,215,0,0.08) 100%);
    z-index: 0;
}

.io-birthday-header > * { position: relative; z-index: 1; }

.io-birthday-header h6 {
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.io-birthday-header small {
    color: var(--io-text-muted);
    font-size: 0.75rem;
}

.io-birthday-body {
    padding: 0.75rem 1rem;
    max-height: 380px;
    overflow-y: auto;
}

.io-birthday-body table {
    font-size: 0.78rem;
    margin-bottom: 0;
}

.io-birthday-body th {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    font-weight: 600;
    color: var(--io-text-muted);
}

.io-birthday-footer {
    padding: 0.75rem 1rem 1rem;
}

.io-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--io-primary);
    color: #fff;
    border: 1px solid var(--io-primary);
    border-radius: var(--io-border-radius);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--io-transition);
}

.io-btn-whatsapp:hover {
    background: #fff;
    color: var(--io-primary);
}

/* Garage logo area */
.io-garage-logo {
    text-align: right;
    margin-top: 1.5rem;
    opacity: 0.7;
}

.io-garage-logo img {
    max-width: 160px;
    height: auto;
}

/* === MODULE GROUP HEADER (legacy compat) === */
.io-module-group {
    margin-bottom: 1.5rem;
}

.io-module-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--io-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.io-module-title i {
    color: var(--io-primary);
}

/* === TABLES === */
.io-table {
    font-size: 0.8125rem;
}

.io-table thead th {
    background-color: var(--io-bg-offwhite);
    border-bottom: 2px solid var(--io-border);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    padding: 0.5rem;
}

.io-table tbody td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--io-border);
    vertical-align: middle;
}

/* === BADGES & STATUS === */
.io-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10rem;
}

/* === LOGIN PAGE === */
.io-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, var(--io-primary) 100%);
    padding: 1rem;
}

.io-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--io-bg-white);
    border-radius: 0.75rem;
    box-shadow: var(--io-shadow-lg);
    padding: 2.5rem;
}

.io-auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.io-auth-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--io-primary);
    margin-top: 0.75rem;
}

.io-auth-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--io-text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.io-auth-input {
    position: relative;
    margin-bottom: 1rem;
}

.io-auth-input i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--io-text-muted);
}

.io-auth-input .form-control {
    padding-left: 2.25rem;
    height: 44px;
}

.io-btn-primary {
    background-color: var(--io-primary);
    border-color: var(--io-primary);
    color: var(--io-text-white);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: var(--io-border-radius);
    transition: var(--io-transition);
    width: 100%;
    height: 44px;
}

.io-btn-primary:hover {
    background-color: var(--io-primary-hover);
    border-color: var(--io-primary-hover);
    color: var(--io-text-white);
}

/* ================================================================
   INVOICE MODULE
   ================================================================ */

/* Invoice Toolbar */
.io-invoice-toolbar {
    background: #fff;
    border-radius: 0;
    position: relative;
    z-index: 1030;
}

.io-action-group {
    display: flex;
    align-items: stretch;
    gap: 1px;
    border-right: 1px solid #e0e0e0;
    padding-right: 8px;
    margin-right: 4px;
}

.io-action-group:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.io-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 10px;
    font-size: 0.68rem;
    font-weight: 500;
    color: #444;
    background: none;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    min-width: 56px;
}

.io-action-btn:hover:not(:disabled) {
    background: #DBE4FD;
    color: var(--io-primary);
    box-shadow: inset 20px 20px 20px rgba(0,0,0,0.03);
}

.io-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.io-action-btn i {
    font-size: 1.05rem;
}

.io-action-btn.text-danger:hover:not(:disabled) {
    background: #fff5f5;
}

/* Info Bar — 3-section layout (left / center / right) */
.io-info-bar {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 6px;
    gap: 1.5rem;
    margin-bottom: 0.4rem;
    min-height: 62px;
}

/* Left: name + city + label + number stacked */
.io-info-left {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 150px;
}

/* Center: vehicle / type info — grows to fill space */
.io-info-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #495057;
}

/* Right: stats side by side horizontally, separated by a left border */
.io-info-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding-left: 1rem;
    border-left: 1px solid #e9ecef;
}

.io-info-stat-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

.io-info-stat-line small {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.io-info-stat-line strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: #212529;
}

/* Utility text classes */
.io-info-name {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.io-info-city {
    font-size: 0.72rem;
    color: #6c757d;
}

.io-info-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-top: 0.25rem;
}

.io-info-number {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

[data-theme="dark"] .io-info-bar {
    background: #1e1e2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .io-info-right {
    border-left-color: #343a40;
}

[data-theme="dark"] .io-info-name,
[data-theme="dark"] .io-info-stat-line strong {
    color: #e9ecef;
}

[data-theme="dark"] .io-info-city,
[data-theme="dark"] .io-info-label,
[data-theme="dark"] .io-info-stat-line small {
    color: #adb5bd;
}

/* Vehicle Ribbon — colored info bar matching old project */
.io-vehicle-ribbon {
    background: linear-gradient(135deg, #5c27e5, #7c4dff);
    border-radius: 5px;
    margin-bottom: 0.35rem;
    box-shadow: 0 2px 8px rgba(92,39,229,0.25);
    min-height: 48px;
    flex-wrap: wrap;
}

.io-vehicle-ribbon small,
.io-vehicle-ribbon strong,
.io-vehicle-ribbon .io-ribbon-badge {
    color: #ffffff;
}

.io-vehicle-ribbon small {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.io-vehicle-ribbon strong {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
}

.io-ribbon-section {
    white-space: nowrap;
}

.io-ribbon-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.io-ribbon-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.io-vehicle-ribbon-empty {
    background: #e9ecef;
    box-shadow: none;
}

.io-vehicle-ribbon-empty small {
    color: #6c757d;
    opacity: 1;
    text-transform: none;
    font-weight: 400;
}

[data-theme="dark"] .io-vehicle-ribbon {
    background: linear-gradient(135deg, #3a0ca3, #5c27e5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

[data-theme="dark"] .io-vehicle-ribbon-empty {
    background: #2a2a3a;
}

[data-theme="dark"] .io-vehicle-ribbon-empty small {
    color: #adb5bd;
}

/* Invoice Grid */
.io-grid-container {
    max-height: 35vh;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.io-invoice-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
    min-width: 1160px;
}

.io-invoice-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}

.io-invoice-grid thead th:hover {
    background: #e9ecef;
}

.io-invoice-grid tfoot {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.io-invoice-grid tfoot tr {
    background-color: #f8f9fa !important;
}

.io-invoice-grid td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.2rem 0.25rem !important;
    vertical-align: middle;
}

.io-invoice-grid .io-grid-row {
    cursor: pointer;
}

.io-invoice-grid .io-grid-row:hover {
    background-color: #f5f5f5 !important;
}

.io-invoice-grid .io-grid-row.selected,
.table-hover > :not(caption) > tr.io-grid-row.selected > * {
    background-color: #fde3e3 !important;
}

.io-invoice-grid .io-grid-row.selected:hover,
.table-hover > :not(caption) > tr.io-grid-row.selected:hover > * {
    background-color: #f8d0d0 !important;
}

/* ============================================================================
   Global data-grid baseline — unify EVERY converted grid to the itemGrid
   (io-invoice-grid) density: small font + tight cell "gap" (padding).
   Matches both the shared .dataTable-table class and any grid table carrying
   an id="datatables_*" (covers plain .table / .table-bordered pickers too).
   font-size lives on the table (inherited), so module-specific cell fonts
   still win; padding uses !important to beat Bootstrap's .table/.table-sm
   cell padding. Colours/borders/backgrounds are left to each module.
   ============================================================================ */
.dataTable-table,
table[id^="datatables_"] {
    font-size: 0.7rem;
}
.dataTable-table thead th,
table[id^="datatables_"] thead th {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.25rem 0.25rem !important;
}
.dataTable-table tbody td,
table[id^="datatables_"] tbody td {
    padding: 0.2rem 0.25rem !important;
    vertical-align: middle;
}

/* Deduction row selection */
.io-deduction-row { cursor: pointer; }
.io-deduction-row:hover { background-color: #f5f5f5 !important; }
.io-deduction-row.io-row-selected,
.table-hover > :not(caption) > tr.io-deduction-row.io-row-selected > * {
    background-color: #ede9fc !important;
}

/* Customer Overview: Bottom Vehicle Grid */
.io-vehicle-bottom-section {
    border-top: 2px solid #ccc;
    margin-top: 0;
}

.io-vehicle-bottom-header {
    background: #f8f9fa;
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #ddd;
}

.io-vehicle-bottom-grid {
    max-height: 20vh;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-top: 0;
}


/* Status Badges */
.io-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.67rem;
    font-weight: 600;
    white-space: nowrap;
}

.io-status-created    { background: #317EFF; color: #fff; }
.io-status-inprogress { background: #FF3138; color: #fff; }
.io-status-pending    { background: #ed8936; color: #fff; }
.io-status-completed  { background: #00BB51; color: #fff; }
.io-status-printed    { background: #4D4D4D; color: #fff; }

/* Grid Status Dots (Creditor) */
.io-status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.15);
}

/* Type Badges (E=Einfache, S=Sammelrechnung, G=Gutschrift) */
.io-type-badge {
    display: inline-block;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
}
.io-type-simple     { background: #28c76f; }
.io-type-collective { background: #317EFF; }
.io-type-credit     { background: #868e96; }

/* Legend Bar */
.io-legend-bar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    color: #666;
    border-top: 1px solid #dee2e6;
    background: #fafbfc;
}
.io-legend-bar .io-status-dot {
    width: 10px;
    height: 10px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Invoice Tabs */
.io-invoice-tabs {
    border-bottom: 2px solid #dee2e6;
}

.io-invoice-tabs .nav-link {
    font-size: 0.78rem;
    padding: 0.45rem 0.9rem;
    color: #555;
    font-weight: 500;
}

.io-invoice-tabs .nav-link.active {
    color: var(--io-primary);
    font-weight: 600;
    border-bottom-color: var(--io-primary);
}

.io-invoice-tabs .nav-link i {
    font-size: 0.85rem;
}

/* Filter Panel */
.io-filter-panel {
    background: #fafbfc;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.io-filter-panel .form-label {
    font-size: 0.7rem;
    color: #666;
}

.io-filter-panel .form-control,
.io-filter-panel .form-select {
    font-size: 0.76rem;
}

.io-extra-filters {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.io-extra-filters.open {
    max-height: 400px;
    padding-top: 0.5rem;
}

/* Invoice Page Container */
.io-invoice-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Detail Row (article tab items) */
.io-detail-row {
    transition: opacity 0.3s ease, background-color 0.15s ease;
    cursor: pointer;
}

.io-detail-row.selected,
.table-hover .io-detail-row.selected,
.table-hover .io-detail-row.selected > td {
    background-color: #e8f0fe !important;
}

.io-detail-row.editing,
.table-hover .io-detail-row.editing,
.table-hover .io-detail-row.editing > td {
    background-color: #fffde7 !important;
}

.io-detail-row.editing td {
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Article Group Header (collapsible) */
.io-group-header {
    cursor: pointer;
    background: #f0eff5 !important;
}

.io-group-header:hover {
    background: #e8e6f0 !important;
}

.io-group-header td {
    padding: 4px 8px !important;
    border-bottom: 1px solid #d5d3de;
}

.io-group-toggle {
    background: none;
    border: none;
    padding: 0 4px;
    cursor: pointer;
    color: #666;
    font-size: 0.75rem;
    vertical-align: middle;
}

.io-group-toggle:hover {
    color: var(--io-primary, #5c27e5);
}

.io-group-name {
    font-weight: 600;
    font-size: 0.75rem;
    color: #444;
    margin-left: 2px;
}

.io-group-count {
    font-size: 0.68rem;
    color: #999;
    margin-left: 4px;
}

[data-bs-theme="dark"] .io-group-header {
    background: #2a2a3e !important;
}

[data-bs-theme="dark"] .io-group-header:hover {
    background: #333350 !important;
}

[data-bs-theme="dark"] .io-group-header td {
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .io-group-name {
    color: #ccc;
}

.io-inline-edit {
    padding: 0.15rem 0.35rem !important;
    font-size: 0.8rem !important;
    min-width: 60px;
}

.io-inline-edit:focus {
    box-shadow: 0 0 0 2px rgba(92, 39, 229, 0.25);
    border-color: #5c27e5;
}

[data-bs-theme="dark"] .io-detail-row.selected,
[data-bs-theme="dark"] .table-hover .io-detail-row.selected,
[data-bs-theme="dark"] .table-hover .io-detail-row.selected > td {
    background-color: rgba(92, 39, 229, 0.15) !important;
}

[data-bs-theme="dark"] .io-detail-row.editing,
[data-bs-theme="dark"] .table-hover .io-detail-row.editing,
[data-bs-theme="dark"] .table-hover .io-detail-row.editing > td {
    background-color: rgba(255, 253, 231, 0.08) !important;
}

/* Sammelauftrag action bar */
.io-sammel-bar {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    background: #eef4ff;
    border-top: 1px solid #c7d9f8;
    font-size: 0.8rem;
}
.io-sammel-bar-count {
    font-weight: 600;
    color: #1d4ed8;
}
.io-sammel-check-cell {
    padding: 0 4px !important;
    vertical-align: middle;
}

/* Pagination */
.io-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.5rem;
    font-size: 0.76rem;
    background: #f3f3f3;
    border-top: 1px solid #e2e8f0;
}

.io-pagination .io-page-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.io-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #333;
    font-size: 0.74rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.io-page-btn:hover:not(.active):not(:disabled) {
    background: #d9d9d9;
}

.io-page-btn.active {
    background: #d9d9d9;
    font-weight: 700;
    cursor: default;
}

.io-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.io-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 28px;
    color: #999;
    font-size: 0.74rem;
}

/* === DETAIL PANEL (sliding right) === */
.io-detail-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -900px;
    width: 900px;
    z-index: 1050;
    background: var(--io-sidebar-bg);
    filter: drop-shadow(0px 0px 3px rgba(0,0,0,0.55));
    border-radius: 5px 0 0 5px;
    transition: right 0.3s ease;
    overflow: visible;
}

.io-detail-panel-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 14px;
}

.io-detail-panel.active {
    right: 0;
}

.io-detail-panel-toggle {
    position: absolute;
    top: 50%;
    left: -19px;
    transform: translateY(-50%);
    padding: 25px 2px;
    background: var(--io-primary);
    color: #fff;
    border: none;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 14px;
    cursor: pointer;
    transition: left 0.3s, border-radius 0.3s, background 0.2s;
    z-index: 2;
}

.io-detail-panel.active .io-detail-panel-toggle {
    left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.io-detail-panel-toggle:hover {
    background: var(--io-primary-hover);
}

.io-detail-panel-toggle i {
    display: inline-block;
    transition: transform 0.3s;
}

.io-detail-panel.active .io-detail-panel-toggle i {
    transform: rotate(180deg);
}

.io-detail-panel-body {
    padding: 0.75rem 0.5rem 0.3rem 1.4rem;
}

/* Panel section containers */
.io-panel-section {
    margin-bottom: 2px;
}

.io-panel-title {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--io-primary);
    margin: 0 0 1px 0;
    padding: 1px 4px;
}

.io-panel-content {
    padding: 2px 4px 4px;
}

/* Labels in panel grid rows */
.io-panel-content label {
    font-size: 0.72rem;
    color: #444;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Read-only value boxes (look like inputs) */
.io-panel-val {
    display: block;
    font-size: 0.72rem;
    border: 1px solid #ced4da;
    background: #fff;
    padding: 1px 6px;
    min-height: 24px;
    line-height: 22px;
    border-radius: 3px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Form controls inside panel — compact sizing */
.io-detail-panel-body .form-control-sm {
    font-size: 0.72rem;
    padding: 1px 6px;
    height: 24px;
    border-radius: 3px;
}

.io-detail-panel-body .form-select-sm {
    font-size: 0.72rem;
    padding: 1px 6px;
    padding-right: 24px;
    height: 24px;
    border-radius: 3px;
}

/* Focus state for panel form controls */
.io-detail-panel-body .form-control-sm:focus,
.io-detail-panel-body .form-select-sm:focus {
    border-color: var(--io-primary);
    box-shadow: 0 0 0 2px rgba(92,39,229,0.1);
}

/* Auto-save visual feedback */
.io-field-save.is-saving {
    color: #999;
}

.io-field-save.is-saved {
    border-color: #00BB51 !important;
    box-shadow: 0 0 0 2px rgba(0,187,81,0.1) !important;
}

/* Checkboxes */
.io-detail-check {
    width: 13px;
    height: 13px;
    accent-color: var(--io-primary);
    cursor: pointer;
    margin: 0;
}

.io-detail-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    font-size: 0.72rem;
    color: #555;
}

.io-detail-checks label {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    white-space: nowrap;
}

/* Save indicator */
.io-save-indicator {
    font-size: 0.65rem;
    color: #00BB51;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.3s;
}

.io-save-indicator.visible {
    opacity: 1;
}

/* Extra-small buttons for detail panel */
.io-btn-xs {
    font-size: 0.65rem;
    padding: 1px 8px;
    line-height: 1.4;
    border-radius: 3px;
}

/* === CREATE MODAL — Selected Row Highlight === */
#createCustomerResults tr.selected,
#createVehicleResults tr.selected {
    background-color: #ede9fc !important;
}

#createCustomerResults tr.selected td,
#createVehicleResults tr.selected td {
    font-weight: 600;
}

#createCustomerResults tr:hover,
#createVehicleResults tr:hover {
    background-color: #f5f5f5;
}

#createCustomerResults tr.selected:hover,
#createVehicleResults tr.selected:hover {
    background-color: #e0d9f7 !important;
}

/* === CREATE MODAL — Detail Cards === */
.io-create-detail-card {
    background: #f0ebfc;
    border: 1px solid #d9cffa;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    font-size: 0.74rem;
}

.io-create-detail-card .text-muted {
    font-size: 0.68rem;
    display: block;
    margin-bottom: 1px;
}

/* Row Flash Animation (new row highlight) */
.io-row-flash {
    background-color: transparent;
    transition: background-color 1s ease;
}

.io-row-flash-active {
    background-color: #d1fae5 !important;
}

[data-bs-theme="dark"] .io-row-flash-active {
    background-color: #064e3b !important;
}

/* === CONFIRM DIALOG === */
.io-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    transition: background 0.2s ease, backdrop-filter 0.2s ease;
}
.io-confirm-overlay.visible {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}
.io-confirm-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    min-width: 340px;
    max-width: 420px;
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    overflow: hidden;
}
.io-confirm-overlay.visible .io-confirm-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.io-confirm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--io-text-dark, #36393e);
}
.io-confirm-header i {
    font-size: 1.3rem;
}
.io-confirm-body {
    padding: 12px 20px 20px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}
.io-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 20px 16px;
}
.io-confirm-footer .btn {
    min-width: 100px;
    font-weight: 500;
    border-radius: 6px;
}

/* Booking text popup items */
.io-bt-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.84rem;
    transition: background 0.12s;
}
.io-bt-item:hover {
    background: #f0ebff;
    color: #5c27e5;
}
.ss2-plz-selected td,
.ss2-plz-selected:hover td {
    background: #5c27e5 !important;
    color: #fff !important;
}
.io-bt-list {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 4px;
}

/* Dark mode */
[data-bs-theme="dark"] .io-confirm-dialog {
    background: #1e293b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
[data-bs-theme="dark"] .io-confirm-header {
    color: #e2e8f0;
}
[data-bs-theme="dark"] .io-confirm-body {
    color: #94a3b8;
}

/* === CONTEXT MENU === */
.io-ctx-trigger {
    cursor: pointer;
    text-align: center;
    color: #999;
    transition: color 0.15s;
}
.io-ctx-trigger:hover {
    color: var(--io-primary, #5c27e5);
}

.io-context-menu {
    position: fixed;
    z-index: 1200;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    min-width: 210px;
    padding: 4px 0;
    font-size: 0.82rem;
    user-select: none;
}
.io-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    cursor: pointer;
    color: #374151;
    white-space: nowrap;
    transition: background 0.1s;
}
.io-ctx-item:hover {
    background: var(--io-primary-light, #f0ebfc);
}
.io-ctx-item.active {
    color: var(--io-primary, #5c27e5);
    font-weight: 600;
}
.io-ctx-item.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}
.io-ctx-item i:first-child {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.io-ctx-danger {
    color: #dc3545;
}
.io-ctx-danger:hover {
    background: #fff5f5;
}
.io-ctx-sep {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 10px;
}

/* Submenu */
.io-ctx-parent {
    position: relative;
}
.io-ctx-has-sub {
    justify-content: flex-start;
}
.io-ctx-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.5;
}
.io-ctx-sub {
    display: none;
    position: absolute;
    left: 100%;
    top: -4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    padding: 4px 0;
}
.io-ctx-parent:hover > .io-ctx-sub,
.io-ctx-parent.open > .io-ctx-sub {
    display: block;
}

/* Work type checkmarks (hidden by default) */
.io-ctx-check {
    visibility: hidden;
    font-size: 0.85rem;
}
.io-ctx-item.checked .io-ctx-check {
    visibility: visible;
    color: var(--io-primary, #5c27e5);
}

/* Dark mode */
[data-bs-theme="dark"] .io-context-menu,
[data-bs-theme="dark"] .io-ctx-sub {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}
[data-bs-theme="dark"] .io-ctx-item {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .io-ctx-item:hover {
    background: #334155;
}
[data-bs-theme="dark"] .io-ctx-danger {
    color: #f87171;
}
[data-bs-theme="dark"] .io-ctx-danger:hover {
    background: #3b1c1c;
}
[data-bs-theme="dark"] .io-ctx-sep {
    background: #334155;
}
[data-bs-theme="dark"] .io-ctx-trigger:hover {
    color: #a78bfa;
}

/* ============================================================
   INTERFACE TABS (SilverDAT3, ESA, HBase3, D-Net, Partslink24)
   ============================================================ */

.io-interface-tab {
    min-height: 180px;
}

.io-interface-actions {
    min-width: 200px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.io-interface-header {
    font-size: 0.82rem;
    padding: 6px 10px;
    background: var(--bs-light, #f8f9fa);
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.io-interface-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.io-interface-btn:hover:not(:disabled) {
    background: #f0f4ff;
    border-color: #5c27e5;
    color: #5c27e5;
}

.io-interface-btn:active:not(:disabled) {
    background: #e8e0ff;
}

.io-interface-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.io-interface-btn i {
    font-size: 0.9rem;
    min-width: 18px;
}

.io-interface-info {
    min-width: 0;
}

.io-interface-info .card {
    height: 100%;
}

/* Scrollable tabs when many tabs are present */
.io-invoice-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -ms-overflow-style: none;
}

.io-invoice-tabs::-webkit-scrollbar {
    height: 3px;
}

.io-invoice-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.io-invoice-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.io-invoice-tabs .nav-item {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Dark mode for interface tabs */
[data-bs-theme="dark"] .io-interface-header {
    background: #1e293b;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .io-interface-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .io-interface-btn:hover:not(:disabled) {
    background: #2d3a52;
    border-color: #7c5cf0;
    color: #a78bfa;
}

[data-bs-theme="dark"] .io-interface-btn:active:not(:disabled) {
    background: #3b2d6e;
}

[data-bs-theme="dark"] .io-interface-info .card {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .io-interface-info .card-title {
    color: #e2e8f0;
}

/* ============================================================
   FREE ARTICLE MODAL — Two-column professional layout
   ============================================================ */

.io-free-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5c27e5;
    padding: 5px 10px;
    background: linear-gradient(135deg, #f0eaff 0%, #f8f9fa 100%);
    border-radius: 5px;
    border-left: 3px solid #5c27e5;
}

/* Language toggle buttons */
.btn-xs {
    padding: 1px 6px;
    font-size: 0.65rem;
    line-height: 1.4;
}

.io-lang-btn.active {
    background-color: #5c27e5 !important;
    border-color: #5c27e5 !important;
    color: #fff !important;
}

/* Calculation summary panel */
.io-free-calc-panel {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.io-free-calc-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #5c27e5;
    padding: 6px 12px;
    background: #f0eaff;
    border-bottom: 1px solid #e9ecef;
}

.io-free-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.78rem;
    border-bottom: 1px solid #f0f0f0;
}

.io-free-calc-row:last-child {
    border-bottom: none;
}

.io-free-calc-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: right;
}

.io-free-calc-total {
    background: #fff;
    font-weight: 600;
    border-top: 2px solid #5c27e5;
}

.io-free-calc-total .io-free-calc-value {
    color: #5c27e5;
    font-size: 0.88rem;
}

/* Dark mode — Free article modal */
[data-bs-theme="dark"] .io-free-section-title {
    background: linear-gradient(135deg, #2d1f5e 0%, #1e293b 100%);
    color: #a78bfa;
    border-left-color: #7c5cf0;
}

[data-bs-theme="dark"] .io-free-calc-panel {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .io-free-calc-title {
    background: #2d1f5e;
    color: #a78bfa;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .io-free-calc-row {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .io-free-calc-total {
    background: #0f172a;
    border-top-color: #7c5cf0;
}

[data-bs-theme="dark"] .io-free-calc-total .io-free-calc-value {
    color: #a78bfa;
}

[data-bs-theme="dark"] .io-lang-btn.active {
    background-color: #7c5cf0 !important;
    border-color: #7c5cf0 !important;
}

/* ============================================================
   SEARCHABLE SELECT DROPDOWN (io-search-select)
   ============================================================ */

.io-search-select {
    position: relative;
}

.io-ss-input {
    cursor: pointer;
}

.io-ss-dropdown {
    display: none;
    position: fixed;
    z-index: 1070;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 220px;
    overflow: hidden;
    flex-direction: column;
}

.io-search-select.open .io-ss-dropdown {
    display: flex;
}

.io-search-select.dropup .io-ss-dropdown,
.io-ss-dropdown.is-dropup {
    border-top: 1px solid #ced4da;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.io-ss-filter {
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 5px 8px;
    font-size: 0.75rem;
    outline: none;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

.io-ss-filter:focus {
    background: #fff;
    border-bottom-color: #5c27e5;
}

.io-ss-list {
    overflow-y: auto;
    max-height: 180px;
    scrollbar-width: thin;
}

.io-ss-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    gap: 8px;
}

.io-ss-item:last-child {
    border-bottom: none;
}

.io-ss-item:hover {
    background: #f0eaff;
}

.io-ss-item.selected {
    background: #ede7fb;
    font-weight: 600;
}

.io-ss-code {
    font-weight: 600;
    min-width: 50px;
    color: #5c27e5;
    font-variant-numeric: tabular-nums;
}

.io-ss-desc {
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.io-ss-empty {
    padding: 8px;
    text-align: center;
    color: #999;
    font-size: 0.72rem;
}

/* Dark mode — Searchable Select */
[data-bs-theme="dark"] .io-ss-dropdown {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .io-ss-filter {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .io-ss-filter:focus {
    background: #1e293b;
    border-bottom-color: #7c5cf0;
}

[data-bs-theme="dark"] .io-ss-item {
    border-bottom-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .io-ss-item:hover {
    background: #2d1f5e;
}

[data-bs-theme="dark"] .io-ss-item.selected {
    background: #3b2d6e;
}

[data-bs-theme="dark"] .io-ss-code {
    color: #a78bfa;
}

[data-bs-theme="dark"] .io-ss-desc {
    color: #94a3b8;
}

/* Invoice Page Container */
.io-debitor-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}
/* Debitor Tabs */
.io-debitor-tabs {
    border-bottom: 2px solid #dee2e6;
}

.io-debitor-tabs .nav-link {
    font-size: 0.78rem;
    padding: 0.45rem 0.9rem;
    color: #555;
    font-weight: 500;
}

.io-debitor-tabs .nav-link.active {
    color: var(--io-primary);
    font-weight: 600;
    border-bottom-color: var(--io-primary);
}

.io-debitor-tabs .nav-link i {
    font-size: 0.85rem;
}

/* ============================================================
   BOTTOM DETAIL GRID (Artikel / Auftragszeit below main grid)
   ============================================================ */

.io-bottom-detail {
    border-top: 2px solid #dee2e6;
    margin-top: 4px;
    background: #fff;
}

.io-bottom-detail-header {
    background: #f8f9fa;
    padding: 0 4px;
}

.io-bottom-tabs {
    border-bottom: 1px solid #dee2e6;
}

.io-bottom-tabs .nav-link {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    color: #666;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
}

.io-bottom-tabs .nav-link.active {
    color: var(--io-primary, #5c27e5);
    font-weight: 600;
    border-bottom-color: var(--io-primary, #5c27e5);
    background: transparent;
}

.io-bottom-tabs .nav-link i {
    font-size: 0.78rem;
}

.io-bottom-tab-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.io-btm-grid-wrap {
    max-height: 170px;
    overflow-y: auto;
    overflow-x: auto;
}

.io-btm-table {
    font-size: 0.7rem !important;
}

.io-btm-table th {
    font-size: 0.65rem !important;
    padding: 3px 6px !important;
    white-space: nowrap;
}

.io-btm-table td {
    padding: 2px 6px !important;
    white-space: nowrap;
}

.io-btm-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 3px 10px;
    font-size: 0.7rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    gap: 4px;
}

/* Dark mode — Bottom detail grid */
[data-bs-theme="dark"] .io-bottom-detail {
    border-top-color: #444;
    background: #1e1e2f;
}

[data-bs-theme="dark"] .io-bottom-detail-header {
    background: #252538;
}

[data-bs-theme="dark"] .io-bottom-tabs {
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .io-bottom-tabs .nav-link {
    color: #999;
}

[data-bs-theme="dark"] .io-bottom-tabs .nav-link.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

[data-bs-theme="dark"] .io-btm-summary {
    background: #252538;
    border-top-color: #444;
}

/* ============================================================
   REMARKS TAB + TEXT BLOCKS MODAL
   ============================================================ */

.io-remarks-container {
    padding: 16px;
}

.io-remark-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.io-remark-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.io-remark-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.io-remark-tb-btn {
    font-size: 0.7rem;
    padding: 2px 8px;
}

.io-remark-textarea {
    border: none;
    border-radius: 0;
    font-size: 0.8rem;
    resize: vertical;
    min-height: 120px;
}

.io-remark-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(92, 39, 229, 0.15);
}

.io-remark-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

/* Text Blocks Modal */
.io-tb-search {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfc;
}

.io-tb-grid-wrap {
    max-height: 220px;
    overflow-y: auto;
    border-bottom: 1px solid #e9ecef;
}

.io-tb-table {
    font-size: 0.75rem !important;
}

.io-tb-table th {
    font-size: 0.68rem !important;
    padding: 4px 8px !important;
}

.io-tb-table td {
    padding: 4px 8px !important;
}

.io-tb-text-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.io-tb-row {
    cursor: pointer;
}

.io-tb-row:hover {
    background: #f5f5f5;
}

.io-tb-row.selected {
    background: #ede9fc !important;
}

.io-tb-preview {
    padding: 10px 12px;
    background: #fafbfc;
}

.io-tb-preview-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.io-tb-preview-text {
    font-size: 0.78rem;
    color: #333;
    white-space: pre-wrap;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.5;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* Dark mode — Remarks & Text Blocks */
[data-bs-theme="dark"] .io-remark-card {
    background: #1e1e2f;
    border-color: #444;
}

[data-bs-theme="dark"] .io-remark-header {
    background: #252538;
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .io-remark-label {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .io-tb-search {
    background: #1a1a2e;
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .io-tb-row.selected {
    background: #2d1f5e !important;
}

[data-bs-theme="dark"] .io-tb-preview {
    background: #1a1a2e;
}

[data-bs-theme="dark"] .io-tb-preview-text {
    background: #1e1e2f;
    border-color: #444;
    color: #e0e0e0;
}

/* ============================================================
   DOCUMENTS TAB (drag & drop upload + file cards)
   ============================================================ */

.io-doc-dropzone {
    border: 2px dashed #d0d5dd;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: #fafbfc;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 16px;
    cursor: pointer;
}
.io-doc-dropzone.dragover {
    border-color: var(--io-primary, #5c27e5);
    background: #f0eaff;
}
.io-doc-dropzone-icon {
    font-size: 2rem;
    color: #98a2b3;
    margin-bottom: 6px;
}
.io-doc-dropzone.dragover .io-doc-dropzone-icon { color: var(--io-primary, #5c27e5); }
.io-doc-dropzone-text { font-size: 0.82rem; color: #475467; }
.io-doc-browse {
    color: var(--io-primary, #5c27e5);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}
.io-doc-dropzone-hint { font-size: 0.72rem; color: #98a2b3; margin-top: 4px; }
.io-doc-dropzone-progress { display: flex; align-items: center; justify-content: center; padding: 12px; }

.io-doc-empty {
    text-align: center;
    color: #98a2b3;
    padding: 40px 0;
}
.io-doc-empty i { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.io-doc-empty p { margin: 0; font-size: 0.82rem; }

.io-doc-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.io-doc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.io-doc-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 8px rgba(92, 39, 229, 0.08);
}
.io-doc-card-icon { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; }
.io-doc-card-body { flex: 1; min-width: 0; }
.io-doc-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1d2939;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.io-doc-card-meta { font-size: 0.7rem; color: #98a2b3; margin-top: 1px; }
.io-doc-card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.io-doc-card-actions .btn { padding: 2px 6px; font-size: 0.75rem; }

[data-bs-theme="dark"] .io-doc-dropzone { background: #1a1a2e; border-color: #444; }
[data-bs-theme="dark"] .io-doc-dropzone.dragover { background: #2a1a4e; border-color: #7c5cf0; }
[data-bs-theme="dark"] .io-doc-card { background: #1e1e2f; border-color: #333; }
[data-bs-theme="dark"] .io-doc-card-title { color: #e0e0e0; }

/* ===================================================================
   SETTINGS PAGE
   =================================================================== */

.io-settings-page {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
}

/* ─── Settings Sidebar Nav ─────────────────────────────── */

.io-settings-nav {
    width: 240px;
    min-width: 240px;
    background: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.io-settings-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}
.io-settings-search i { color: #9ca3af; font-size: 0.8rem; }
.io-settings-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    width: 100%;
    color: #374151;
}

.io-settings-menu {
    list-style: none;
    padding: 6px 0;
    margin: 0;
    flex: 1;
}

/* Group header button */
.io-set-group-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: none;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-align: left;
}
.io-set-group-btn:hover { background: #e5e7eb; }
.io-set-group-btn > i:first-child { font-size: 0.85rem; color: #6b7280; width: 18px; text-align: center; }
.io-set-group-btn > span { flex: 1; }
.io-set-arrow {
    font-size: 0.6rem;
    color: #9ca3af;
    transition: transform 0.2s;
}
.io-set-group.open > .io-set-group-btn .io-set-arrow { transform: rotate(90deg); }

/* Sub items */
.io-set-sub {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}
.io-set-group.open > .io-set-sub { display: block; }

.io-set-sub a {
    display: block;
    padding: 5px 14px 5px 40px;
    font-size: 0.76rem;
    color: #6b7280;
    text-decoration: none;
    border-left: 2px solid transparent;
}
.io-set-sub a:hover { color: #374151; background: #e5e7eb; }
.io-set-sub a.active {
    color: #5c27e5;
    font-weight: 600;
    background: #ede9fe;
    border-left-color: #5c27e5;
}

/* Nested sub-group (e.g. Module > Werkstattplanung) */
.io-set-subgroup { list-style: none; }
.io-set-subgroup-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: none;
    padding: 5px 14px 5px 40px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    text-align: left;
}
.io-set-subgroup-btn:hover { color: #374151; background: #e5e7eb; }
.io-set-subgroup-btn > i:first-child { font-size: 0.8rem; color: #6b7280; width: 16px; text-align: center; }
.io-set-subgroup-btn > span { flex: 1; }
.io-set-subgroup.open > .io-set-subgroup-btn .io-set-arrow { transform: rotate(90deg); }

.io-set-subsub {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}
.io-set-subgroup.open > .io-set-subsub { display: block; }
.io-set-subsub a {
    display: block;
    padding: 5px 14px 5px 58px;
    font-size: 0.76rem;
    color: #6b7280;
    text-decoration: none;
    border-left: 2px solid transparent;
}
.io-set-subsub a:hover { color: #374151; background: #e5e7eb; }
.io-set-subsub a.active {
    color: #5c27e5;
    font-weight: 600;
    background: #ede9fe;
    border-left-color: #5c27e5;
}
[data-bs-theme="dark"] .io-set-subgroup-btn { color: #9ca3af; }
[data-bs-theme="dark"] .io-set-subgroup-btn:hover { color: #e0e0e0; background: #2a2a3e; }
[data-bs-theme="dark"] .io-set-subsub a { color: #9ca3af; }
[data-bs-theme="dark"] .io-set-subsub a:hover { color: #e0e0e0; background: #2a2a3e; }

/* ─── Settings Content Area ────────────────────────────── */

.io-settings-content {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

/* ─── Settings Landing — Quick Access Cards ───────────── */

.io-set-landing {
    padding: 28px;
}

.io-set-landing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.io-set-landing-sub {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 24px;
}

.io-set-shortcut-group {
    margin-bottom: 18px;
}

.io-set-shortcut-group h6 {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 8px;
}

.io-set-shortcut-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.io-set-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    min-width: 100px;
    min-height: 72px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.15));
}

.io-set-shortcut i {
    font-size: 1.35rem;
}

.io-set-shortcut:hover {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
    transform: translateY(-2px);
}

.io-set-shortcut.sc-basedata {
    background: var(--io-basedata-card);
    color: #192124;
}
.io-set-shortcut.sc-basedata:hover {
    background: var(--io-basedata-hover);
    color: var(--io-basedata-card);
}

.io-set-shortcut.sc-invoicing {
    background: var(--io-invoicing-card);
    color: #292415;
}
.io-set-shortcut.sc-invoicing:hover {
    background: var(--io-invoicing-hover);
    color: var(--io-invoicing-card);
}

.io-set-shortcut.sc-employee {
    background: var(--io-employee-card);
    color: #210f0f;
}
.io-set-shortcut.sc-employee:hover {
    background: var(--io-employee-hover);
    color: var(--io-employee-card);
}

.io-set-shortcut.sc-system {
    background: var(--io-modules-card);
    color: #18261b;
}
.io-set-shortcut.sc-system:hover {
    background: var(--io-modules-hover);
    color: var(--io-modules-card);
}

.io-set-shortcut.sc-interface {
    background: #b0bec5;
    color: #263238;
}
.io-set-shortcut.sc-interface:hover {
    background: #37474f;
    color: #b0bec5;
}

/* Settings — Bank table */
.io-set-bank-table {
    font-size: 0.8rem;
}
.io-set-bank-table thead th {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.io-set-bank-table tbody tr {
    cursor: pointer;
}
.io-set-bank-table tbody tr:hover {
    background: #f3f4f6;
}

/* ─── Settings Home Link ──────────────────────────────── */

.io-set-home {
    padding: 0 8px;
    margin-bottom: 6px;
}

.io-set-home a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--io-primary);
    text-decoration: none;
    border-radius: var(--io-border-radius);
    transition: background 0.2s;
}

.io-set-home a:hover {
    background: var(--io-primary-light);
}

.io-settings-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 40px;
    justify-content: center;
    color: #6b7280;
    font-size: 0.82rem;
}

/* ─── Settings Panel (loaded partial) ──────────────────── */

.io-set-panel { padding: 20px 28px 28px; }
.io-set-header { margin-bottom: 20px; }
.io-set-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.io-set-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 2px;
}

.io-set-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5c27e5;
    border-bottom: 1px solid #ede9fe;
    padding-bottom: 4px;
    margin-bottom: 10px;
    margin-top: 18px;
}

.io-set-form .form-control-sm,
.io-set-form .form-select-sm { font-size: 0.78rem; }

.io-set-form .form-check-label { font-size: 0.78rem; }

.io-set-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}
.io-set-save-btn { min-width: 110px; }

.io-set-account-grid { max-width: 600px; }

/* ─── Dark Mode ────────────────────────────────────────── */

[data-bs-theme="dark"] .io-settings-nav {
    background: #1a1a2e;
    border-right-color: #333;
}
[data-bs-theme="dark"] .io-settings-search { border-bottom-color: #333; }
[data-bs-theme="dark"] .io-settings-search input { color: #e0e0e0; }
[data-bs-theme="dark"] .io-set-group-btn { color: #d1d5db; }
[data-bs-theme="dark"] .io-set-group-btn:hover { background: #2a2a3e; }
[data-bs-theme="dark"] .io-set-sub a { color: #9ca3af; }
[data-bs-theme="dark"] .io-set-sub a:hover { color: #e0e0e0; background: #2a2a3e; }
[data-bs-theme="dark"] .io-set-sub a.active {
    color: #a78bfa;
    background: #2a1a4e;
    border-left-color: #7c5cf0;
}
[data-bs-theme="dark"] .io-settings-content { background: #121220; }
[data-bs-theme="dark"] .io-set-landing-title { color: #e5e7eb; }
[data-bs-theme="dark"] .io-set-shortcut-group h6 { color: #9ca3af; }
[data-bs-theme="dark"] .io-set-header h5 { color: #e5e7eb; }
[data-bs-theme="dark"] .io-set-section-title { color: #a78bfa; border-bottom-color: #333; }
[data-bs-theme="dark"] .io-set-actions { border-top-color: #333; }

.io-debitor-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-debitor-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}

.io-debitor-grid thead th:hover {
    background: #e9ecef;
}

.io-debitor-grid td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.2rem 0.25rem;
    vertical-align: middle;
}

.io-debitor-grid .io-grid-row {
    cursor: pointer;
}

.io-debitor-grid .io-grid-row:hover {
    background-color: #f5f5f5 !important;
}

.io-debitor-grid .io-grid-row.selected,
.table-hover > :not(caption) > tr.io-grid-row.selected > * {
    background-color: #fde3e3 !important;
}

.io-debitor-grid .io-grid-row.selected:hover,
.table-hover > :not(caption) > tr.io-grid-row.selected:hover > * {
    background-color: #f8d0d0 !important;
}

.io-debitor-paymetgrid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

    .io-debitor-paymetgrid .io-grid-DebitorPaymentrow 
    {
        cursor: pointer;
    }

 .io-debitor-paymetgrid .io-grid-DebitorPaymentrow:hover {
            background-color: #f5f5f5 !important;
        }

        .io-debitor-paymetgrid .io-grid-DebitorPaymentrow.selected,
        .table-hover > :not(caption) > tr.io-grid-DebitorPaymentrow.selected > * {
            background-color: #fde3e3 !important;
        }

            .io-debitor-paymetgrid .io-grid-DebitorPaymentrow.selected:hover,
            .table-hover > :not(caption) > tr.io-grid-DebitorPaymentrow.selected:hover > * {
                background-color: #f8d0d0 !important;
            }

/* ============================================================
   ITEMMASTER PAGE — MODERN ENHANCEMENTS
   ============================================================ */

/* Main Page Container */
.io-itemmaster-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f8f9fa;
}

/* Info Bar — Display Item Details */
.media-display {
    background: var(--io-primary);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(92, 39, 229, 0.12);
    margin: 0.75rem;
}

.media-display-single {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-right: 1px solid rgba(255,255,255,0.15);
    min-width: 0;
    overflow: hidden;
}

.media-display-single:last-child {
    border-right: none;
}

.media-display-single small {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-display-single h5 {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
}

/* Toolbar */
.io-itemmaster-toolbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Tabs */
.io-itemmaster-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    background: #fff;
    padding: 0 1rem;
    margin: 0;
}

.io-itemmaster-tabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.25s ease;
    margin-bottom: -2px;
    position: relative;
}

.io-itemmaster-tabs .nav-link:hover {
    color: var(--io-primary);
    background: rgba(92,39,229,0.03);
}

.io-itemmaster-tabs .nav-link.active {
    color: var(--io-primary);
    border-bottom-color: var(--io-primary);
    font-weight: 600;
}

/* Filter Group Input */
.Filtergroup {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 6px;
    overflow: hidden;
}

.Filtergroup .input-group-text {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

.Filtergroup .form-control {
    border-color: #e5e7eb;
    font-size: 0.875rem;
}

.Filtergroup .form-control:focus {
    border-color: var(--io-primary);
    box-shadow: 0 0 0 0.2rem rgba(92,39,229,0.1);
}

/* Tab Wrapper */
.tab-wrapper {
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
}

/* Tab Content */
.tab-content {
    background: #fff;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tab-pane {
    animation: fadeIn 0.25s ease-in-out;
}

/* Page-level tab-content: no padding/margin/shadow (full-width layout) */
.io-invoice-page > .tab-content,
.io-debitor-page > .tab-content,
.io-credit-page > .tab-content {
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Grid Container */
#itemGrid {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Sub-tabs */
#detailSubTabs {
    /* border-bottom: 1px solid #e5e7eb; */
    /* background: #f8f9fa; */
    /* padding: 0 1rem; */
}

#detailSubTabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#detailSubTabs .nav-link:hover {
    color: var(--io-primary);
}

#detailSubTabs .nav-link.active {
    color: #5c27e5;
    border-bottom-color: #5c27e5;
    font-weight: 600;
}

/* Form Fields in Detail Panel */
.io-itemmaster-form-group {
    margin-bottom: 1.25rem;
}

.io-itemmaster-form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    text-transform: capitalize;
}

.io-itemmaster-form-group input,
.io-itemmaster-form-group select,
.io-itemmaster-form-group textarea {
    font-size: 0.8125rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.io-itemmaster-form-group input:focus,
.io-itemmaster-form-group select:focus,
.io-itemmaster-form-group textarea:focus {
    border-color: var(--io-primary);
    box-shadow: 0 0 0 3px rgba(92,39,229,0.08);
}

/* Modal Enhancements */
.modal-content {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.modal-header h6 {
    font-weight: 600;
    color: #1f2937;
}


.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

/* ─── Vorlage Modal ─────────────────────────────────────────────────────── */
.io-vorlage-header-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #5c27e5 0%, #7c4dff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.io-vorlage-toolbar {
    background: #fafafa;
}

.io-vorlage-left {
    width: 280px;
    min-width: 240px;
    max-width: 280px;
}

.io-vorlage-panel-header {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    background: #f8f9fa;
    flex-shrink: 0;
}

/* Template list rows */
#tbodyVorlageList .vorlage-row td {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    vertical-align: middle;
}
#tbodyVorlageList .vorlage-row .vorlage-row-num {
    font-size: 0.72rem;
    color: #9ca3af;
    width: 28px;
    display: inline-block;
}
#tbodyVorlageList .vorlage-row .vorlage-row-name {
    font-size: 0.825rem;
}
#tbodyVorlageList .vorlage-row:hover td {
    background-color: #f5f0ff;
}
#tbodyVorlageList .vorlage-row.io-selected td {
    background-color: #ede8ff;
    color: #3d1db5;
    font-weight: 500;
}
#tbodyVorlageList .vorlage-row.io-selected:hover td {
    background-color: #e0d9ff;
}
#tbodyVorlageList .vorlage-row.io-selected .vorlage-row-num {
    color: #7c4dff;
}

/* Items grid rows — no table-hover, so we control all states here */
#tbodyVorlageItems tr.vorlage-item-row {
    cursor: pointer;
}
#tbodyVorlageItems tr.vorlage-item-row td {
    vertical-align: middle;
}
#tbodyVorlageItems tr.vorlage-item-row:hover td {
    background-color: #f0f4ff;
}
#tbodyVorlageItems tr.vorlage-item-row.io-selected td {
    background-color: #dde7ff;
}
#tbodyVorlageItems tr.vorlage-item-row.io-selected:hover td {
    background-color: #c8d8ff;
}
#tbodyVorlageItems tr.vorlage-item-row .vorlage-item-remove {
    opacity: 0;
    transition: opacity 0.15s;
}
#tbodyVorlageItems tr.vorlage-item-row:hover .vorlage-item-remove,
#tbodyVorlageItems tr.vorlage-item-row.io-selected .vorlage-item-remove {
    opacity: 1;
}

/* Action Buttons */
.io-action-btn {
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.io-action-btn:hover:not(:disabled) {
    background: rgba(92,39,229,0.08);
    color: var(--io-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(92,39,229,0.12);
}

.io-action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.io-action-btn i {
    font-size: 1.125rem;
    display: inline-block;
}

/* Detail Panel Section — compact override (matches old sidebar) */

/* Responsive Enhancements */
@media (max-width: 768px) {
    .media-display {
        flex-direction: column;
        height: auto;
    }

    .media-display-single {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 0.6rem 1rem;
    }

    .media-display-single:last-child {
        border-bottom: none;
    }

    .io-itemmaster-tabs {
        gap: 0.25rem;
        overflow-x: auto;
        padding: 0 0.5rem;
    }

    .Filtergroup {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.io-debitor-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-debitor-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}

.io-debitor-credit-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-debitor-credit-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}
.io-debitor-advance-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-debitor-advance-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}

/* Debitoren QR-Import Master-Child Grid */
.center-cell {
    text-align: center !important;
    vertical-align: middle !important;
}

.qr-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #ddd;
    background: #fff;
}

.qr-toolbar select {
    height: 34px;
    min-width: 150px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0 10px;
}

.filter-btn {
    height: 34px;
    width: 38px;
    border: 0;
    background: #e5e5e5;
    border-radius: 5px;
}

.book-btn {
    margin-left: auto;
    border: 0;
    background: #fff;
    padding: 6px 12px;
    font-size: 18px;
    box-shadow: 0 0 8px #ddd;
    border-radius: 4px;
}

.qr-grid-wrapper {
    border: 1px solid #ccc;
    overflow-x: auto;
}

.qr-grid,
.child-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.qr-grid th,
.qr-grid td,
.child-grid th,
.child-grid td {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.70rem;
    /*font-weight: 600;*/
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: black;
}

.qr-grid th,
.child-grid th {
    background: #fff;
    font-weight: bold;
    color: #000;
}

.master-row {
    background: #fff;
}

/* Camt53Grid / MonthlyTransactionGrid: keep the leading action (⋮) and expand (＋)
   columns tight — under table-layout:fixed they otherwise split space evenly and look bloated. */
.qr-grid th:nth-child(1),
.qr-grid td:nth-child(1),
.qr-grid th:nth-child(2),
.qr-grid td:nth-child(2) {
    width: 30px;
    text-align: center;
    padding-left: 2px;
    padding-right: 2px;
}

    .qr-grid td.io-ctx-trigger {
        cursor: pointer;
        color: #6b7280;
    }

        .qr-grid td.io-ctx-trigger:hover {
            color: #4f46e5;
        }

.menu-cell {
    text-align: center;
    font-size: 20px;
    width: 30px;
}

.qr-expand-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #b8c2cc;
    border-radius: 6px;
    background: linear-gradient(#ffffff, #eef2f7);
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.qr-expand-btn:hover {
    background: #e8f0ff;
    border-color: #4f46e5;
    color: #4f46e5;
}

.qr-expand-btn.open {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.status-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #b5a600;
    border-radius: 50%;
}

.child-row td {
    padding: 0;
}

.child-grid-wrapper {
    max-height: 380px;
    overflow: auto;
}

.child-grid tbody tr {
    background: #fff;
    color: #555;
}

.child-grid th {
    background: #fff;
    color: #444;
}

.d-none {
    display: none;
}
.qr-expand-btn.open {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.qr-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qr-check input {
    display: none;
}

.qr-check span {
    width: 18px;
    height: 18px;
    border: 1px solid #b8c2cc;
    border-radius: 4px;
    background: #fff;
    display: inline-block;
    position: relative;
}

.qr-check input:checked + span {
    background: #22c55e;
    border-color: #22c55e;
}

.qr-check input:checked + span::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    left: 3px;
    top: -2px;
}
.chk-col {
    width: 55px;
    text-align: center;
}

.expand-col {
    width: 50px;
}

.status-col {
    width: 42px;
}

/*Advance Payment CSS*/
.io-advancepayment-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-advancepayment-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}
.ap-info-section {
    /*margin: 12px 16px 0 16px;*/
    padding: 6px 8px;
    background: linear-gradient(135deg, #ffffff, #f7f9fc);
    border: 1px solid #dce3ec;
    border-radius: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.ap-selected-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 10px;
    padding: 12px 18px;
    min-width: 620px;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
}

.ap-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef4ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.ap-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.ap-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: #4b5563;
}

    .ap-sub span {
        border-right: 1px solid #d1d5db;
        padding-right: 12px;
    }

        .ap-sub span:last-child {
            border-right: 0;
        }

.ap-amount-box {
    margin-left: auto;
    text-align: right;
    padding-left: 18px;
    border-left: 1px solid #e5e7eb;
}

    .ap-amount-box span {
        display: block;
        font-size: 12px;
        color: #6b7280;
    }

    .ap-amount-box strong {
        font-size: 18px;
        color: #111827;
    }

.ap-search-box {
    width: 300px;
    height: 42px;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

    .ap-search-box i {
        width: 44px;
        text-align: center;
        font-size: 18px;
        color: #2563eb;
        border-right: 1px solid #e5e7eb;
    }

    .ap-search-box input {
        border: 0;
        outline: none;
        width: 100%;
        padding: 0 12px;
        font-size: 14px;
    }
.io-ap-used-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-ap-used-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}
.io-select-customer-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-select-customer-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}

/* === Vehicle Grid — Selected Row === */
#vehicleGrid tr.selected,
#vehicleGrid tr.selected > td {
    background-color: #cce5ff !important;
}
#vehicleGrid tr.selected:hover,
#vehicleGrid tr.selected:hover > td {
    background-color: #b8daff !important;
}
/* =========================================================================
   Responsive toolbar overflow ("Mehr") — priority+ menu, common to any page
   with the #links / #moreMenu / #overflowMenu toolbar markup (ported from the
   old _Layout). Overflowing .action-group-single items are moved into
   #overflowMenu; #more-label toggles it. .dactive = hidden.
   ========================================================================= */
#moreMenu, .io-more-menu { position: relative; display: none; align-items: center; flex: 0 0 auto; margin-left: 6px; }

/* the "Mehr" toggle — a brand-gradient pill with a grid-dots glyph */
#more-label, .io-more-label {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; white-space: nowrap; cursor: pointer;
    font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: #fff !important;
    background: linear-gradient(120deg, var(--io-primary, #5c27e5), #7d52ee);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(92, 39, 229, .35);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
#more-label::before, .io-more-label::before {
    content: ""; width: 15px; height: 15px; flex: 0 0 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Ccircle cx='3' cy='3' r='1.6'/%3E%3Ccircle cx='8' cy='3' r='1.6'/%3E%3Ccircle cx='13' cy='3' r='1.6'/%3E%3Ccircle cx='3' cy='8' r='1.6'/%3E%3Ccircle cx='8' cy='8' r='1.6'/%3E%3Ccircle cx='13' cy='8' r='1.6'/%3E%3Ccircle cx='3' cy='13' r='1.6'/%3E%3Ccircle cx='8' cy='13' r='1.6'/%3E%3Ccircle cx='13' cy='13' r='1.6'/%3E%3C/svg%3E") center/contain no-repeat;
}
#more-label:hover, .io-more-label:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(92, 39, 229, .45); filter: brightness(1.05); }
#more-label:active, .io-more-label:active { transform: translateY(0); box-shadow: 0 5px 12px rgba(92, 39, 229, .4); }

/* !important overrides the itemmaster-legacy.css stub (loads later, sets base display:none) */
#overflowMenu, .io-more-overflow {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: #fff; padding: 10px; border: 1px solid var(--io-border, #e2e8f0);
    border-radius: 16px; box-shadow: 0 20px 44px rgba(15, 23, 42, .22); z-index: 1055;
    display: flex !important; flex-wrap: wrap; gap: 8px; min-width: 240px; max-width: 480px;
    transform-origin: top right; animation: io-ovf-pop .16s cubic-bezier(.2, .8, .3, 1.2);
}
#overflowMenu.dactive, .io-more-overflow.dactive { display: none !important; }
/* little caret pointing up at the toggle */
#overflowMenu::before, .io-more-overflow::before {
    content: ""; position: absolute; top: -7px; right: 16px; width: 13px; height: 13px;
    background: #fff; border-left: 1px solid var(--io-border, #e2e8f0); border-top: 1px solid var(--io-border, #e2e8f0);
    transform: rotate(45deg); border-radius: 3px 0 0 0;
}
@keyframes io-ovf-pop { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
#overflowMenu .action-group-single, .io-more-overflow .action-group-single {
    border: 1px solid var(--io-border, #e2e8f0) !important; border-radius: 12px;
    background: var(--io-surface, #f8fafc); transition: border-color .15s, box-shadow .15s, transform .15s;
}
#overflowMenu .action-group-single:hover, .io-more-overflow .action-group-single:hover {
    border-color: var(--io-primary, #5c27e5) !important; background: #fff;
    box-shadow: 0 6px 16px rgba(92, 39, 229, .16); transform: translateY(-1px);
}
#overflowMenu .action-link:hover, .io-more-overflow .action-link:hover { background: var(--io-primary-light, #f0ebfc); color: var(--io-primary, #5c27e5); border-radius: 10px; }

.ap-hero {
    display: grid;
    grid-template-columns: 1fr 150px 360px;
    align-items: center;
    gap: 24px;
    padding: 16px 22px;
    background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #d8e0ea;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
}

.ap-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ap-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #eef4ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.ap-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.ap-meta {
    display: flex;
    gap: 18px;
    color: #475569;
    font-size: 14px;
}

    .ap-meta span {
        border-right: 1px solid #d1d5db;
        padding-right: 18px;
    }

        .ap-meta span:last-child {
            border-right: 0;
        }

.ap-amount-mini {
    border-left: 1px solid #d8e0ea;
    padding-left: 24px;
}

    .ap-amount-mini span {
        display: block;
        color: #64748b;
        font-size: 13px;
    }

    .ap-amount-mini strong {
        font-size: 24px;
        color: #0f172a;
    }

.ap-search-modern {
    height: 44px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

    .ap-search-modern i {
        width: 46px;
        text-align: center;
        color: #2563eb;
        font-size: 18px;
    }

    .ap-search-modern input {
        border: 0;
        outline: 0;
        flex: 1;
        height: 100%;
        font-size: 14px;
    }

    .ap-search-modern button {
        width: 46px;
        height: 100%;
        border: 0;
        border-left: 1px solid #e5e7eb;
        background: #f8fafc;
        color: #334155;
    }

        .ap-search-modern button:hover {
            background: #eef4ff;
            color: #2563eb;
        }

.ap-filter-panel {
    margin: 0;
    padding: 10px 20px;
    min-height: 72px;
    background: #f8fafc;
    border-bottom: 1px solid #d8e0ea;
    display: flex;
    gap: 32px;
}
.customer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    border-bottom: 1px solid #dfe5ec;
    background: white;
}

.customer-summary {
    display: flex;
    align-items: center;
}

.customer-avatar {
    width: 44px;
    height: 44px;
    margin-right: 14px;
    font-size: 22px;   
    border-radius: 50%;
    background: #eef4ff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2563eb;
    margin-right: 18px;
}

.customer-details h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.customer-meta {
    margin-top: 4px;
    display: flex;
    gap: 18px;
}

    .customer-meta small {
        font-size: 12px;
        color: #7a7a7a;
    }
    .customer-meta b {
        font-size: 13px;
        font-weight: 600;
    }

.customer-amount {
    margin-left: 28px;
    padding-left: 22px;
    border-left: 1px solid #ddd;
}

    .customer-amount small {
        display: block;
        font-size: 12px;
        color: #7a7a7a;
        margin-bottom: 2px;
    }

    .customer-amount div {
        font-size: 18px;
        font-weight: 700;
        color: #0f172a;
    }

.ap-search-modern {
    width: 330px;
    height: 40px;
}
    .ap-search-modern input {
        font-size: 14px;
    }

.io-ap-used-grid .io-grid-row {
    cursor: pointer;
}

.io-ap-used-grid .io-grid-row:hover {
    background-color: #f5f5f5 !important;
}

.io-ap-used-grid .io-grid-row.selected,
.table-hover > :not(caption) > tr.io-grid-row.selected > * {
    background-color: #fde3e3 !important;
}

.io-ap-used-grid .io-grid-row.selected:hover,
.table-hover > :not(caption) > tr.io-grid-row.selected:hover > * {
    background-color: #f8d0d0 !important;
}

/*AP Deleted Grid*/
.io-ap-deleted-grid {
    font-size: 0.7rem;
    table-layout: fixed;
    width: 100%;
}

.io-ap-deleted-grid thead th {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.25rem;
    user-select: none;
    border-bottom: 2px solid #ccc;
    letter-spacing: 0.02em;
    color: #555;
}
.io-ap-deleted-grid .io-grid-row {
    cursor: pointer;
}

.io-ap-deleted-grid .io-grid-row:hover {
    background-color: #f5f5f5 !important;
}

.io-ap-deleted-grid .io-grid-row.selected,
.table-hover > :not(caption) > tr.io-grid-row.selected > * {
    background-color: #fde3e3 !important;
}

.io-ap-deleted-grid .io-grid-row.selected:hover,
.table-hover > :not(caption) > tr.io-grid-row.selected:hover > * {
    background-color: #f8d0d0 !important;
}

#btnRestore {
    background: #16a34a;
    border: none;
}

#btnRestore:hover {
    background: #15803d;
}

#btnPermanentDelete {
    background: #dc3545;
    border: none;
}

#btnPermanentDelete:hover {
    background: #b91c1c;
}

.deleted-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 10px 20px 16px;
}

.deleted-search {
    width: 360px;
}

.deleted-actions {
    display: flex;
    gap: 12px;
}

.btn-action {
    height: 42px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: .2s;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

.btn-action i {
    font-size: 17px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

.deleted-search .input-group {
    height: 42px;
}

.deleted-search .form-control {
    border-left: none;
    box-shadow: none;
}

.deleted-search .input-group-text {
    background: #fff;
    border-right: none;
}

.deleted-search .bi-search {
    color: #0d6efd;
    font-size: 18px;
}

.cam-child-row > td {
    padding: 0 !important;
}

.cam-child-wrap {
    width: 100%;
    overflow-x: auto;
}

.cam-child-grid {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

    .cam-child-grid th,
    .cam-child-grid td {
        border: 1px solid #c7c7c7;
        padding: 5px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        /* optional column widths */
        .cam-child-grid th:nth-child(1),
        .cam-child-grid td:nth-child(1) {
            width: 18%;
        }

        .cam-child-grid th:nth-child(2),
        .cam-child-grid td:nth-child(2) {
            width: 24%;
        }

        .cam-child-grid th:nth-child(3),
        .cam-child-grid td:nth-child(3) {
            width: 9%;
        }

        .cam-child-grid th:nth-child(4),
        .cam-child-grid td:nth-child(4) {
            width: 9%;
        }

        .cam-child-grid th:nth-child(5),
        .cam-child-grid td:nth-child(5) {
            width: 30%;
        }

        .cam-child-grid th:nth-child(6),
        .cam-child-grid td:nth-child(6) {
            width: 30%;
        }

        .cam-child-grid th:nth-child(7),
        .cam-child-grid td:nth-child(7) {
            width: 12%;
        }

        .cam-child-grid th:nth-child(8),
        .cam-child-grid td:nth-child(8),
        .cam-child-grid th:nth-child(9),
        .cam-child-grid td:nth-child(9) {
            width: 12%;
            text-align: right;
        }

.cam-child-grid {
    width: 100%;
    table-layout: fixed;
}

/* =========================================================
   Invoice overview master/child grid alignment
   ========================================================= */

.io-invoice-master-grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 0;
}

    /* Master grid column widths */
    .io-invoice-master-grid col.col-expand {
        width: 56px;
    }

    .io-invoice-master-grid col.col-invoice-number {
        width: 12%;
    }

    .io-invoice-master-grid col.col-customer-name {
        width: 22%;
    }

    .io-invoice-master-grid col.col-first-name {
        width: 14%;
    }

    .io-invoice-master-grid col.col-vehicle {
        width: 16%;
    }

    .io-invoice-master-grid col.col-license-plate {
        width: 12%;
    }

    .io-invoice-master-grid col.col-chassis-number {
        width: 14%;
    }

    .io-invoice-master-grid col.col-type-certificate {
        width: 11%;
    }

    .io-invoice-master-grid col.col-created-date {
        width: 12%;
    }

    /* Shared master cells */
    .io-invoice-master-grid > thead > tr > th,
    .io-invoice-master-grid > tbody > tr.io-grid-row > td {
        padding: 6px 8px;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Expand/collapse button column */
    .io-invoice-master-grid .io-expand-column {
        padding-left: 8px;
        padding-right: 8px;
        text-align: center;
    }

    /* Detail row must occupy the complete width */
    .io-invoice-master-grid .io-child-row > td {
        padding: 0;
        border: 0;
    }

    /*
   Reserve the same space as the expand/collapse column.
   Therefore Artikelnummer begins under Rechnung Nr.
*/
    .io-invoice-master-grid .io-child-container {
        padding-left: 56px;
        width: 100%;
        box-sizing: border-box;
        background-color: #fff;
    }

/* Child grid */
.io-invoice-child-grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
}

    /* Child grid column widths */
    .io-invoice-child-grid col.col-item-number {
        width: 20%;
    }

    .io-invoice-child-grid col.col-description {
        width: 38%;
    }

    .io-invoice-child-grid col.col-quantity {
        width: 12%;
    }

    .io-invoice-child-grid col.col-unit-price {
        width: 15%;
    }

    .io-invoice-child-grid col.col-amount {
        width: 15%;
    }

    /* Child cells */
    .io-invoice-child-grid th,
    .io-invoice-child-grid td {
        padding: 5px 8px;
        vertical-align: middle;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .io-invoice-child-grid thead th {
        font-size: 0.75rem;
        font-weight: 600;
        background-color: #f8f9fa;
        border-top: 1px solid #ced4da;
        border-bottom: 1px solid #ced4da;
    }

    /* Numeric columns */
    .io-invoice-child-grid th:nth-child(3),
    .io-invoice-child-grid td:nth-child(3),
    .io-invoice-child-grid th:nth-child(4),
    .io-invoice-child-grid td:nth-child(4),
    .io-invoice-child-grid th:nth-child(5),
    .io-invoice-child-grid td:nth-child(5) {
        text-align: right;
    }

/* Master selected row */
.io-invoice-master-grid .io-grid-row.selected > td {
    background-color: #e7f1ff;
}

/* Responsive behavior */
@media (max-width: 1200px) {
    .io-invoice-grid-scroll {
        overflow-x: auto;
    }

    .io-invoice-master-grid {
        min-width: 1100px;
    }
}
.io-invoice-master-grid col.col-expand {
    width: 56px;
}

.io-invoice-master-grid .io-child-container {
    padding-left: 56px;
}

.io-Vehichlihistorygrid tbody tr.io-grid-row {
    cursor: pointer;
    background-color: transparent;
}

    .io-Vehichlihistorygrid tbody tr.io-grid-row.selected-row > td {
        background-color: #f8d7da !important;
    }

    .io-Vehichlihistorygrid tbody tr.io-grid-row:hover:not(.selected-row) > td {
        background-color: #f5f5f5;
    }

.invoice-article-table-wrapper {
    overflow: visible;
}

.article-menu-column {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding: 0 !important;
    overflow: visible;
}

.article-row-number-column {
    width: 30px;
    min-width: 30px;
}

.article-delete-column {
    width: 35px;
}

.article-menu-column .dropdown {
    position: static;
}

.article-header-menu-button {
    width: 29px;
    height: 27px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #212529;
    background-color: transparent;
    line-height: 27px;
}

    .article-header-menu-button:hover,
    .article-header-menu-button:focus,
    .article-header-menu-button.show {
        color: #0d6efd;
        background-color: #e7f1ff;
        box-shadow: none;
    }

.article-header-menu {
    min-width: 165px;
    padding: 4px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 0.875rem;
    z-index: 1080;
}

    .article-header-menu .dropdown-item {
        display: flex;
        align-items: center;
        padding: 7px 10px;
        border-radius: 3px;
    }

        .article-header-menu .dropdown-item:hover,
        .article-header-menu .dropdown-item:focus {
            color: #0d6efd;
            background-color: #e7f1ff;
        }

        .article-header-menu .dropdown-item i {
            width: 18px;
            text-align: center;
        }

.invoice-article-table-wrapper {
    overflow: auto;
}
/* Article tab layout */
.art-tab-wrapper {
    background: #fff;
    padding: 0;
}

.art-tab-content {
    background: #fff;
    min-height: 280px;
    align-items: stretch;
}

.art-tab-content > .io-grid-container {
    background: #fff;
}

/* Article sidebar panel (left of grid) */
.art-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    background: #fff;
    border-right: 1px solid #e2e6eb;
    margin-right: 0;
    flex-shrink: 0;
}

.art-sidebar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 68px;
    min-height: 54px;
    padding: 7px 4px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    color: #374151;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
    transition: all .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

    .art-sidebar-btn i {
        font-size: 18px;
        color: #6366f1;
    }

    .art-sidebar-btn:hover {
        color: #312e81;
        background: #eef2ff;
        border-color: #a5b4fc;
        box-shadow: 0 2px 6px rgba(99,102,241,.15);
        transform: translateY(-1px);
    }

    .art-sidebar-btn:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0,0,0,.06);
    }

.art-sidebar-divider {
    height: 1px;
    margin: 4px 8px;
    background: #e5e7eb;
}

.empty-article-row td {
    height: 220px;
    vertical-align: middle;
    background: #fff;
    color: #9ca3af;
    font-size: 13px;
}

#datatables_VehicleHistory tbody tr.io-grid-row {
    cursor: pointer;
}

    #datatables_VehicleHistory tbody tr.io-grid-row.vehicle-history-selected > td {
        background-color: #cfe2ff !important;
        color: #052c65;
    }

    #datatables_VehicleHistory tbody tr.io-grid-row.vehicle-history-selected {
        border-left: 3px solid #0d6efd;
    }

#datatables_InvoiceOverview
tbody
tr.io-grid-row.vehicle-history-expanded > td {
    background-color: #f8d7da !important;
}

#datatables_InvoiceOverview .VH-expand-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    line-height: 22px;
}


/* Master invoice row */
#datatables_InvoiceOverview tbody > tr.vehicle-history-master-row > td {
    background-color: #e8f1fb;
    color: #1f2937;
    font-weight: 500;
    border-top: 2px solid #9fb9d5;
    border-bottom: 1px solid #b8cce0;
}

/* Expanded master row */
#datatables_InvoiceOverview tbody > tr.vehicle-history-master-row:has( .VH-expand-btn[aria-expanded="true"] ) > td {
    background-color: #d6e8f8;
}

/* Master-row hover */
#datatables_InvoiceOverview tbody > tr.vehicle-history-master-row:hover > td {
    background-color: #c9e0f5;
}

/* Keep child rows white */
#datatables_InvoiceOverview tbody > tr.child-row > td {
    background-color: #ffffff;
}

/* Child table background */
#datatables_InvoiceOverview .child-grid,
#datatables_InvoiceOverview .child-grid td,
#datatables_InvoiceOverview .child-grid th {
    background-color: #ffffff;
}
/* Child-row outer container */
#datatables_InvoiceOverview
tbody > tr.vehicle-history-child-row > td {
    background-color: #fff8df;
    border-bottom: 2px solid #dfc979;
}

/* Child table */
/*#datatables_InvoiceOverview
.vehicle-history-child-row .child-grid {
    width: 92%;
    margin: 0 0 0 40px;
    background-color: #fff8df;
}*/

    /* Child table header */
    #datatables_InvoiceOverview
    .vehicle-history-child-row .child-grid thead th {
        background-color: #f8e9b3;
        color: #5b4a18;
        font-weight: 600;
        border-bottom: 1px solid #d8c270;
    }

    /* Child detail cells */
    #datatables_InvoiceOverview
    .vehicle-history-child-row .child-grid tbody td {
        background-color: #fff8df;
        color: #343a40;
        border-bottom: 1px solid #eadfab;
    }

    /* Child detail hover */
    #datatables_InvoiceOverview
    .vehicle-history-child-row .child-grid tbody tr:hover td {
        background-color: #ffefb5;
    }
    #datatables_InvoiceOverview
    tbody > tr.vehicle-history-child-row > td,
    #datatables_InvoiceOverview
    .vehicle-history-child-row .child-grid,
    #datatables_InvoiceOverview
    .vehicle-history-child-row .child-grid tbody td {
        background-color: #f8f9fa;
    }

        #datatables_InvoiceOverview
        .vehicle-history-child-row .child-grid thead th {
            background-color: #e9ecef;
        }

/* ── Vorlage Article Picker (io-vpick) ─────────────────────────── */
.io-vpick-content {
    height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Drag handle cursor on header */
.io-vpick-handle { cursor: grab; user-select: none; }
.io-vpick-handle:active { cursor: grabbing; }
.io-vpick-handle button { cursor: pointer; }

/* D / F / I language toggle buttons */
.io-vpick-lang {
    width: 26px;
    height: 26px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.12s;
}
.io-vpick-lang:hover { background: #e5e7eb; }
.io-vpick-lang.active { background: var(--io-primary); color: #fff; border-color: var(--io-primary); }

/* Selection info strip (subtle, light) */
.io-vpick-sel-strip {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    min-height: 46px;
}
.io-vpick-sel-col {
    flex: 1;
    padding: 6px 10px;
    border-right: 1px solid #dee2e6;
    overflow: hidden;
}
.io-vpick-sel-col:last-child { border-right: none; }
.io-vpick-sel-label {
    font-size: 0.62rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.io-vpick-sel-value {
    font-size: 0.79rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

/* Table */
.io-vpick-table-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
}
#vPickResults tr.vpick-row,
#aPickResults tr.vpick-row { cursor: pointer; }
#vPickResults tr.vpick-row:hover td,
#aPickResults tr.vpick-row:hover td { background-color: #f5f3ff; }
#vPickResults tr.vpick-row.io-selected td,
#aPickResults tr.vpick-row.io-selected td { background-color: #dde3ff; }
#vPickResults tr.vpick-row.io-selected:hover td,
#aPickResults tr.vpick-row.io-selected:hover td { background-color: #ccd4ff; }
.io-vpick-type-m { color: #198754; font-weight: 700; font-size: 0.74rem; }
.io-vpick-type-a { color: var(--io-primary); font-weight: 700; font-size: 0.74rem; }

/* Pagination */
.io-vpick-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    flex-shrink: 0;
    gap: 8px;
}
.io-vpick-page-btn {
    width: 28px;
    height: 26px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 4px;
    font-size: 0.73rem;
    cursor: pointer;
    color: #4b5563;
    padding: 0;
    transition: all 0.12s;
}
.io-vpick-page-btn:hover:not([disabled]) { background: #e5e7eb; }
.io-vpick-page-btn.active { background: var(--io-primary); color: #fff; border-color: var(--io-primary); }
.io-vpick-page-btn[disabled] { opacity: 0.35; cursor: default; }

/* Status bar */
.io-vpick-status-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 5px 12px;
    border-top: 1px solid #dee2e6;
    background: #fff;
    flex-shrink: 0;
    font-size: 0.74rem;
    color: #4b5563;
}
.io-vpick-status-item { display: flex; align-items: center; gap: 6px; }
.io-vpick-status-item input {
    width: 72px;
    height: 22px;
    font-size: 0.74rem;
    text-align: right;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    padding: 0 5px;
    background: #f9fafb;
    color: #374151;
}

/* Vehicle default-dates grid (shared _Layout modal) — clickable row highlight */
#datatable_VehicleDatesDafault tbody tr {
    cursor: pointer;
}
#datatable_VehicleDatesDafault tbody tr:hover > td {
    background-color: #f5f2fe;
}
#datatable_VehicleDatesDafault tbody tr.io-row-selected > td {
    background-color: #ede9fc !important;
}

.inca-calendar-modal {
    border: 0;
    border-radius: 0.35rem;
    overflow: hidden;
}

    .inca-calendar-modal .modal-header {
        color: #fff;
        background-color: #1f5b2a;
        border-bottom: 0;
    }

    .inca-calendar-modal .form-label,
    .inca-calendar-modal .form-check-label {
        font-size: 0.82rem;
        color: #212529;
    }

    .inca-calendar-modal .form-control-sm,
    .inca-calendar-modal .form-select-sm {
        min-height: 29px;
        font-size: 0.78rem;
    }

    .inca-calendar-modal textarea.form-control {
        min-height: 64px;
        resize: vertical;
    }

    .inca-calendar-modal .calendar-task-add {
        min-height: 38px;
    }

.io-calendar-plus {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .inca-calendar-modal .form-label {
        margin-top: 0.25rem;
    }

    .inca-calendar-modal .modal-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.io-group-header.group-has-discount > td {
    background-color: #fff3cd !important;
    color: #664d03;
    font-weight: 600;
    border-left: 4px solid #ffc107;
}

.io-group-header.group-has-discount:hover > td {
    background-color: #ffecb5 !important;
}

#gutschriftArtikelTable .io-detail-row {
    cursor: pointer;
}

    #gutschriftArtikelTable .io-detail-row:hover td {
        background-color: #eef6ff;
    }

    #gutschriftArtikelTable .io-detail-row.io-selected td {
        background-color: #cfe5ff !important;
        border-top-color: #86b7fe;
        border-bottom-color: #86b7fe;
    }

#divInvoiceTaskTree .invoice-task-template {
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 3px;
}

    #divInvoiceTaskTree .invoice-task-template:hover {
        background-color: #eef5f7;
    }

    #divInvoiceTaskTree .invoice-task-template.selected {
        color: #fff;
        background-color: #04556e;
    }

#dt_TaskTemplateGrid .task-template-row {
    cursor: pointer;
}

    #dt_TaskTemplateGrid .task-template-row:hover {
        background-color: #eef5f7;
    }

    #dt_TaskTemplateGrid .task-template-row.selected {
        color: #fff;
        background-color: #04556e;
    }

/* =========================================================
   Replacement vehicle details modal
   ========================================================= */

#EinzelheitenErsatzfahrzeug {
    --rv-primary: #2563eb;
    --rv-primary-dark: #1d4ed8;
    --rv-primary-soft: #eff6ff;
    --rv-success: #15803d;
    --rv-border: #dbe3ee;
    --rv-border-light: #e8edf4;
    --rv-surface: #ffffff;
    --rv-surface-soft: #f8fafc;
    --rv-text: #1e293b;
    --rv-muted: #64748b;
    --rv-radius: 10px;
}

    /* Modal container */

    #EinzelheitenErsatzfahrzeug .rv-modal-dialog {
        width: min(96vw, 1320px);
        max-width: 1320px;
        margin: 1rem auto;
    }

    #EinzelheitenErsatzfahrzeug .rv-modal-content {
        overflow: hidden;
        color: var(--rv-text);
        background: var(--rv-surface);
        border: 0;
        border-radius: 14px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), 0 4px 14px rgba(15, 23, 42, 0.1);
    }

    /* Header */

    #EinzelheitenErsatzfahrzeug .rv-modal-header {
        min-height: 68px;
        padding: 12px 18px;
        color: #fff;
        background: linear-gradient( 135deg, #1e40af 0%, #2563eb 55%, #3b82f6 100% );
        border-bottom: 0;
    }

        #EinzelheitenErsatzfahrzeug .rv-modal-header .modal-title {
            margin: 0;
            color: #fff;
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.25;
        }

    #EinzelheitenErsatzfahrzeug .rv-header-subtitle {
        margin-top: 2px;
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.75rem;
    }

    #EinzelheitenErsatzfahrzeug .rv-header-icon {
        display: inline-flex;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        flex: 0 0 38px;
        color: #fff;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 10px;
        font-size: 1.15rem;
    }

    #EinzelheitenErsatzfahrzeug .rv-modal-header .btn-close {
        padding: 8px;
        margin: 0;
        background-color: rgba(255, 255, 255, 0.92);
        border-radius: 8px;
        opacity: 0.9;
    }

        #EinzelheitenErsatzfahrzeug .rv-modal-header .btn-close:hover {
            background-color: #fff;
            opacity: 1;
        }

    /* Body */

    #EinzelheitenErsatzfahrzeug .rv-modal-body {
        padding: 16px;
        background: #f5f7fb;
    }

    /* Toolbar */

    #EinzelheitenErsatzfahrzeug .rv-toolbar {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 10px 8px 14px;
        margin-bottom: 14px;
        background: #fff;
        border: 1px solid var(--rv-border);
        border-radius: var(--rv-radius);
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    }

    #EinzelheitenErsatzfahrzeug .rv-toolbar-title {
        color: var(--rv-muted);
        font-size: 0.8rem;
        font-weight: 500;
    }

    #EinzelheitenErsatzfahrzeug .rv-toolbar .btn {
        min-height: 31px;
        padding-inline: 12px;
        border-radius: 7px;
        font-size: 0.79rem;
        font-weight: 500;
    }

    /* Reservation overview */

    #EinzelheitenErsatzfahrzeug .rv-overview-card {
        padding: 15px 16px 7px;
        margin-bottom: 14px;
        background: #fff;
        border: 1px solid var(--rv-border);
        border-radius: var(--rv-radius);
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    }

    #EinzelheitenErsatzfahrzeug .rv-section-heading {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 11px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--rv-border-light);
    }

    #EinzelheitenErsatzfahrzeug .rv-section-icon {
        display: inline-flex;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        flex: 0 0 32px;
        color: var(--rv-primary);
        background: var(--rv-primary-soft);
        border-radius: 8px;
    }

    #EinzelheitenErsatzfahrzeug .rv-section-title {
        color: var(--rv-text);
        font-size: 0.85rem;
        font-weight: 600;
    }

    #EinzelheitenErsatzfahrzeug .rv-section-description {
        color: var(--rv-muted);
        font-size: 0.7rem;
    }

    /* Tabs */

    #EinzelheitenErsatzfahrzeug .rv-tabs {
        gap: 5px;
        padding: 5px 5px 0;
        background: #e9eef6;
        border: 1px solid var(--rv-border);
        border-bottom: 0;
        border-radius: var(--rv-radius) var(--rv-radius) 0 0;
    }

        #EinzelheitenErsatzfahrzeug .rv-tabs .nav-link {
            min-width: 130px;
            padding: 9px 17px;
            color: #58677a;
            background: transparent;
            border: 0;
            border-radius: 8px 8px 0 0;
            font-size: 0.81rem;
            font-weight: 500;
            transition: color 0.15s ease, background-color 0.15s ease;
        }

            #EinzelheitenErsatzfahrzeug .rv-tabs .nav-link:hover {
                color: var(--rv-primary);
                background: rgba(255, 255, 255, 0.6);
            }

            #EinzelheitenErsatzfahrzeug .rv-tabs .nav-link.active {
                position: relative;
                color: var(--rv-primary-dark);
                background: #fff;
                font-weight: 600;
            }

                #EinzelheitenErsatzfahrzeug .rv-tabs .nav-link.active::after {
                    position: absolute;
                    right: 16px;
                    bottom: 0;
                    left: 16px;
                    height: 2px;
                    content: "";
                    background: var(--rv-primary);
                    border-radius: 2px;
                }

    #EinzelheitenErsatzfahrzeug .rv-tab-content {
        min-height: 440px;
        padding: 18px;
        background: #fff;
        border: 1px solid var(--rv-border);
        border-top: 0;
        border-radius: 0 0 var(--rv-radius) var(--rv-radius);
        box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
    }

    /* Inner section headings */

    #EinzelheitenErsatzfahrzeug .rv-content-heading {
        display: flex;
        align-items: center;
        gap: 7px;
        padding-bottom: 8px;
        margin: 4px 0 14px;
        color: var(--rv-primary-dark);
        border-bottom: 1px solid var(--rv-border);
        font-size: 0.86rem;
        font-weight: 600;
    }

        #EinzelheitenErsatzfahrzeug .rv-content-heading i {
            color: var(--rv-primary);
            font-size: 0.95rem;
        }

    /* Labels */

    #EinzelheitenErsatzfahrzeug .form-label,
    #EinzelheitenErsatzfahrzeug .form-check-label {
        color: #475569;
        font-size: 0.78rem;
    }

    #EinzelheitenErsatzfahrzeug .form-label {
        font-weight: 500;
    }

    /* Inputs */

    #EinzelheitenErsatzfahrzeug .form-control,
    #EinzelheitenErsatzfahrzeug .form-select {
        min-height: 33px;
        color: var(--rv-text);
        background-color: #fff;
        border-color: #cfd9e6;
        border-radius: 7px;
        font-size: 0.79rem;
        box-shadow: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    }

    #EinzelheitenErsatzfahrzeug textarea.form-control {
        line-height: 1.45;
        resize: vertical;
    }

    #EinzelheitenErsatzfahrzeug .form-control:hover,
    #EinzelheitenErsatzfahrzeug .form-select:hover {
        border-color: #aebdce;
    }

    #EinzelheitenErsatzfahrzeug .form-control:focus,
    #EinzelheitenErsatzfahrzeug .form-select:focus {
        border-color: #6096f8;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

    #EinzelheitenErsatzfahrzeug .form-control:disabled,
    #EinzelheitenErsatzfahrzeug .form-select:disabled,
    #EinzelheitenErsatzfahrzeug .form-control[readonly] {
        color: #64748b;
        background-color: #f1f5f9;
        border-color: #e2e8f0;
        opacity: 1;
    }

    /* Checkboxes */

    #EinzelheitenErsatzfahrzeug .form-check {
        min-height: 32px;
        display: flex;
        align-items: center;
        gap: 7px;
    }

#EinheitenErsatzfahrzeug .form-check-input {
    margin-top: 0;
}

#EinzelheitenErsatzfahrzeug .form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0;
    border-color: #aebdce;
    cursor: pointer;
}

    #EinzelheitenErsatzfahrzeug .form-check-input:checked {
        background-color: var(--rv-primary);
        border-color: var(--rv-primary);
    }

#EinzelheitenErsatzfahrzeug .form-check-label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Input groups and buttons */

#EinzelheitenErsatzfahrzeug .input-group .btn,
#EinzelheitenErsatzfahrzeug .input-group-text {
    border-color: #cfd9e6;
}

#EinzelheitenErsatzfahrzeug .btn-primary {
    background-color: var(--rv-primary);
    border-color: var(--rv-primary);
}

    #EinzelheitenErsatzfahrzeug .btn-primary:hover {
        background-color: var(--rv-primary-dark);
        border-color: var(--rv-primary-dark);
    }

#EinzelheitenErsatzfahrzeug .btn-success {
    background-color: var(--rv-success);
    border-color: var(--rv-success);
}

/* Calculation result fields */

#EinzelheitenErsatzfahrzeug
#txtRentalRateQtyCalculations,
#EinzelheitenErsatzfahrzeug
#txtRentalRateCostsCalculations,
#EinzelheitenErsatzfahrzeug
#txtRentalRateTotalCostsCalculations,
#EinzelheitenErsatzfahrzeug
#txtRentalRateKmDifferenceCalculation,
#EinzelheitenErsatzfahrzeug
#txtRentalRatePricePerKm2,
#EinzelheitenErsatzfahrzeug
#txtRentalRateKmTotalCalculation,
#EinzelheitenErsatzfahrzeug
#txtTotalFuelPrices {
    font-variant-numeric: tabular-nums;
    background: #f8fafc;
}

#EinzelheitenErsatzfahrzeug
#txtTotalAmountToPayCalculations {
    color: var(--rv-primary-dark);
    background: var(--rv-primary-soft);
    border-color: #bfdbfe;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Scrollbar */

#EinzelheitenErsatzfahrzeug .modal-body::-webkit-scrollbar {
    width: 8px;
}

#EinzelheitenErsatzfahrzeug .modal-body::-webkit-scrollbar-track {
    background: #eef2f7;
}

#EinzelheitenErsatzfahrzeug .modal-body::-webkit-scrollbar-thumb {
    background: #bdc8d6;
    border: 2px solid #eef2f7;
    border-radius: 8px;
}

/* Responsive */

@media (max-width: 991.98px) {
    #EinzelheitenErsatzfahrzeug .rv-modal-dialog {
        width: calc(100vw - 20px);
        margin: 10px auto;
    }

    #EinzelheitenErsatzfahrzeug .rv-modal-body {
        padding: 12px;
    }

    #EinzelheitenErsatzfahrzeug .rv-tabs .nav-link {
        min-width: auto;
        padding-inline: 14px;
    }

    #EinzelheitenErsatzfahrzeug .rv-tab-content {
        padding: 14px;
    }
}

@media (max-width: 767.98px) {
    #EinzelheitenErsatzfahrzeug .rv-modal-dialog {
        width: 100%;
        max-width: none;
        min-height: 100%;
        margin: 0;
    }

    #EinzelheitenErsatzfahrzeug .rv-modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    #EinzelheitenErsatzfahrzeug .rv-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    #EinzelheitenErsatzfahrzeug .rv-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

        #EinzelheitenErsatzfahrzeug .rv-tabs .nav-item {
            flex: 1 0 auto;
        }

        #EinzelheitenErsatzfahrzeug .rv-tabs .nav-link {
            width: 100%;
            white-space: nowrap;
        }

    #EinzelheitenErsatzfahrzeug .rv-tab-content {
        min-height: 0;
    }

    #EinzelheitenErsatzfahrzeug .row > [class*="col-"] {
        margin-bottom: 5px;
    }

    #EinzelheitenErsatzfahrzeug .text-md-end {
        text-align: left !important;
    }
}
#EinzelheitenErsatzfahrzeug .form-check-input {
    margin-top: 0;
}
