/* Mandos Motors — modern bright automotive theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --mandos-red: #e11d2e;
    --mandos-red-dark: #b91524;
    --mandos-red-light: #fef2f2;
    --mandos-navy: #0f172a;
    --mandos-slate: #475569;
    --mandos-bg: #f1f5f9;
    --mandos-surface: #ffffff;
    --mandos-border: #e2e8f0;
    --mandos-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --mandos-radius: 12px;
    --mandos-radius-sm: 8px;
    --mandos-grid-font: 11px;
    --mandos-grid-header-font: 10px;
    --mandos-grid-line-height: 1.3;
    --mandos-sale-input-narrow: 165px;
    --mandos-sale-input-wide: 280px;
}

body.mandos-theme,
body.mandos-theme .wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--mandos-navy);
    -webkit-font-smoothing: antialiased;
}

/* —— Header —— */
body.mandos-theme.skin-red .main-header .navbar {
    background: var(--mandos-surface);
    border-bottom: 1px solid var(--mandos-border);
    box-shadow: var(--mandos-shadow);
}

body.mandos-theme.skin-red .main-header .navbar .nav > li > a,
body.mandos-theme.skin-red .main-header .navbar .sidebar-toggle {
    color: var(--mandos-navy) !important;
    font-weight: 500;
}

body.mandos-theme.skin-red .main-header .navbar .nav > li > a:hover,
body.mandos-theme.skin-red .main-header .navbar .sidebar-toggle:hover {
    background: var(--mandos-red-light) !important;
    color: var(--mandos-red) !important;
}

body.mandos-theme.skin-red .main-header .logo {
    background: var(--mandos-surface) !important;
    color: var(--mandos-navy);
    border-bottom: 3px solid var(--mandos-red);
    height: 50px;
    line-height: 46px;
}

body.mandos-theme.skin-red .main-header .logo:hover {
    background: var(--mandos-red-light) !important;
}

body.mandos-theme .logo-mgl {
    border-radius: 0;
    background: transparent !important;
    filter: none;
}

body.mandos-theme.skin-red .main-header li.user-header {
    background: linear-gradient(135deg, var(--mandos-red) 0%, var(--mandos-red-dark) 100%);
}

/* —— Sidebar —— */
body.mandos-theme.skin-red .wrapper,
body.mandos-theme.skin-red .main-sidebar,
body.mandos-theme.skin-red .left-side {
    background: var(--mandos-surface) !important;
}

body.mandos-theme.skin-red .main-sidebar {
    border-right: 1px solid var(--mandos-border);
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
}

body.mandos-theme.skin-red .sidebar-menu > li.header {
    background: var(--mandos-bg) !important;
    color: var(--mandos-slate) !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 16px 8px;
}

body.mandos-theme .mandos-sidebar-clock {
    background: linear-gradient(135deg, var(--mandos-red-light) 0%, #fff 100%) !important;
    border-bottom: 1px solid var(--mandos-border);
    padding: 10px 14px !important;
}

body.mandos-theme .mandos-sidebar-clock #txt {
    font-size: 12px;
    font-weight: 500;
    color: var(--mandos-slate);
    line-height: 1.4;
    white-space: normal;
}

body.mandos-theme.skin-red .sidebar a {
    color: var(--mandos-slate) !important;
}

body.mandos-theme.skin-red .sidebar-menu > li > a {
    border-left: 3px solid transparent;
    border-radius: 0 var(--mandos-radius-sm) var(--mandos-radius-sm) 0;
    margin: 2px 8px 2px 0;
    padding: 10px 12px 10px 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

body.mandos-theme.skin-red .sidebar-menu > li:hover > a,
body.mandos-theme.skin-red .sidebar-menu > li.active > a {
    background: var(--mandos-red-light) !important;
    color: var(--mandos-red) !important;
    border-left-color: var(--mandos-red) !important;
}

body.mandos-theme.skin-red .sidebar-menu > li > .treeview-menu {
    background: var(--mandos-bg) !important;
    margin: 0 8px 4px 0;
    border-radius: var(--mandos-radius-sm);
}

body.mandos-theme.skin-red .treeview-menu > li > a {
    color: var(--mandos-slate) !important;
    padding: 8px 12px 8px 28px;
}

body.mandos-theme.skin-red .treeview-menu > li.active > a,
body.mandos-theme.skin-red .treeview-menu > li > a:hover {
    color: var(--mandos-red) !important;
    background: transparent;
}

body.mandos-theme .treeview-menu > li.bg-black,
body.mandos-theme .treeview-menu > li:hover {
    background: var(--mandos-red-light) !important;
    border-left: 3px solid var(--mandos-red) !important;
    color: var(--mandos-red) !important;
}

/* —— Content area —— */
body.mandos-theme .content-wrapper {
    background: var(--mandos-bg) !important;
    min-height: calc(100vh - 50px);
}

body.mandos-theme .content-header {
    padding: 16px 20px 8px;
}

body.mandos-theme .main-footer {
    background: var(--mandos-surface);
    border-top: 1px solid var(--mandos-border);
    color: var(--mandos-slate);
}

/* —— Boxes & panels —— */
body.mandos-theme .box {
    border-radius: var(--mandos-radius);
    border: 1px solid var(--mandos-border);
    box-shadow: var(--mandos-shadow);
    background: var(--mandos-surface);
}

body.mandos-theme .box-header {
    border-radius: var(--mandos-radius) var(--mandos-radius) 0 0;
    border-bottom: 1px solid var(--mandos-border);
    background: var(--mandos-surface);
    color: var(--mandos-navy);
    font-weight: 600;
}

body.mandos-theme .box-header.with-border {
    border-bottom: 1px solid var(--mandos-border);
}

body.mandos-theme .box.box-primary {
    border-top: 3px solid var(--mandos-red);
}

/* —— Buttons —— */
body.mandos-theme .btn {
    border-radius: var(--mandos-radius-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

body.mandos-theme .btn-primary,
body.mandos-theme .btn-success {
    background: var(--mandos-red) !important;
    border-color: var(--mandos-red-dark) !important;
}

body.mandos-theme .btn-primary:hover,
body.mandos-theme .btn-success:hover,
body.mandos-theme .btn-primary:focus,
body.mandos-theme .btn-success:focus {
    background: var(--mandos-red-dark) !important;
    border-color: var(--mandos-red-dark) !important;
    box-shadow: 0 4px 12px rgba(225, 29, 46, 0.35);
}

body.mandos-theme .btn-danger {
    background: #64748b !important;
    border-color: #475569 !important;
}

/* —— Forms —— */
body.mandos-theme .form-control {
    border-radius: var(--mandos-radius-sm);
    border: 1px solid var(--mandos-border);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.mandos-theme .form-control:focus {
    border-color: var(--mandos-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12);
}

body.mandos-theme .input-group-addon {
    border-radius: var(--mandos-radius-sm) 0 0 var(--mandos-radius-sm);
    background: var(--mandos-bg);
    border-color: var(--mandos-border);
    color: var(--mandos-slate);
}

/* —— Vehicle / Parts sale forms (inline labels, compact) —— */
body.mandos-theme .mandos-sale-form {
    overflow-x: hidden;
}

body.mandos-theme .mandos-sale-form .mandos-form-section {
    background: var(--mandos-bg);
    border-left: 3px solid var(--mandos-red);
    padding: 8px 12px;
    margin: 14px 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mandos-navy);
    width: 100%;
    clear: both;
}

body.mandos-theme .mandos-sale-form .mandos-form-section-with-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

body.mandos-theme .mandos-sale-form .mandos-form-section-title {
    flex: 0 0 auto;
    font-weight: 600;
}

body.mandos-theme .mandos-sale-form .mandos-customer-search {
    position: relative;
    flex: 1 1 320px;
    max-width: 420px;
    min-width: 220px;
    margin-left: auto;
}

body.mandos-theme .mandos-sale-form .mandos-customer-search-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 32px;
    font-size: 12px;
    padding: 4px 10px;
}

body.mandos-theme .mandos-sale-form .mandos-customer-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1050;
    background: #fff;
    border: 1px solid var(--mandos-border);
    border-radius: var(--mandos-radius-sm);
    box-shadow: var(--mandos-shadow);
    max-height: 220px;
    overflow-y: auto;
}

body.mandos-theme .mandos-sale-form .mandos-customer-search-item,
body.mandos-theme .mandos-sale-form .mandos-customer-search-empty {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--mandos-border);
    background: #fff;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--mandos-navy);
    cursor: pointer;
}

body.mandos-theme .mandos-sale-form .mandos-customer-search-item:hover,
body.mandos-theme .mandos-sale-form .mandos-customer-search-item:focus {
    background: var(--mandos-red-light);
    outline: none;
}

body.mandos-theme .mandos-sale-form .mandos-customer-search-empty {
    cursor: default;
    color: var(--mandos-slate);
}

body.mandos-theme .mandos-sale-form .mandos-customer-search-item:last-child {
    border-bottom: none;
}

body.mandos-theme .mandos-sale-form .form-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 6px 8px;
}

body.mandos-theme .mandos-sale-form .form-group > .control-label {
    flex: 0 0 112px;
    max-width: 112px;
    margin: 0;
    padding: 0;
    text-align: right;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: normal;
}

body.mandos-theme .mandos-sale-form .form-group > .control-label i {
    font-size: 11px;
    font-weight: 400;
    display: block;
}

body.mandos-theme .mandos-sale-form .form-group > .form-control,
body.mandos-theme .mandos-sale-form .form-group > select.form-control {
    flex: 1 1 120px;
    width: auto !important;
    max-width: var(--mandos-sale-input-narrow);
    min-width: 90px;
    height: 32px;
    padding: 4px 8px;
    font-size: 12px;
}

body.mandos-theme .mandos-sale-form .form-group > textarea.form-control {
    flex: 1 1 200px;
    max-width: var(--mandos-sale-input-narrow);
    min-height: 48px;
    height: auto;
    resize: vertical;
}

body.mandos-theme .mandos-sale-form .form-group > .select2-container {
    flex: 1 1 120px !important;
    width: auto !important;
    max-width: var(--mandos-sale-input-narrow) !important;
    min-width: 90px !important;
}

body.mandos-theme .mandos-sale-form .form-group.form-group-wide > .form-control,
body.mandos-theme .mandos-sale-form .form-group.form-group-wide > select.form-control,
body.mandos-theme .mandos-sale-form .form-group.form-group-wide > .select2-container {
    width: var(--mandos-sale-input-wide) !important;
    max-width: var(--mandos-sale-input-wide) !important;
    min-width: var(--mandos-sale-input-wide) !important;
    flex: 0 0 var(--mandos-sale-input-wide);
}

body.mandos-theme .mandos-sale-form .form-group.form-group-wide > textarea.form-control,
body.mandos-theme .mandos-sale-form .mandos-customer-col .form-group:not(.form-group-check):not(.form-group-action) > .form-control,
body.mandos-theme .mandos-sale-form .mandos-customer-col .form-group:not(.form-group-check):not(.form-group-action) > select.form-control,
body.mandos-theme .mandos-sale-form .mandos-customer-col .form-group:not(.form-group-check):not(.form-group-action) > .select2-container,
body.mandos-theme .mandos-sale-form .mandos-customer-col .form-group:not(.form-group-check):not(.form-group-action) > textarea.form-control,
body.mandos-theme .mandos-sale-form .col-xs-12:has(.mandos-form-section) ~ [class*="col-"] .form-group:not(.form-group-check):not(.form-group-action) > .form-control,
body.mandos-theme .mandos-sale-form .col-xs-12:has(.mandos-form-section) ~ [class*="col-"] .form-group:not(.form-group-check):not(.form-group-action) > select.form-control,
body.mandos-theme .mandos-sale-form .col-xs-12:has(.mandos-form-section) ~ [class*="col-"] .form-group:not(.form-group-check):not(.form-group-action) > .select2-container,
body.mandos-theme .mandos-sale-form .col-xs-12:has(.mandos-form-section) ~ [class*="col-"] .form-group:not(.form-group-check):not(.form-group-action) > textarea.form-control {
    width: var(--mandos-sale-input-wide) !important;
    max-width: var(--mandos-sale-input-wide) !important;
    min-width: var(--mandos-sale-input-wide) !important;
    flex: 0 0 var(--mandos-sale-input-wide);
}

body.mandos-theme .mandos-sale-form .form-group.form-group-check > .control-label {
    flex: 0 0 112px;
}

body.mandos-theme .mandos-sale-form .form-group.form-group-check > div {
    flex: 0 0 auto;
    margin: 0;
}

body.mandos-theme .mandos-sale-form .form-group.form-group-action {
    justify-content: flex-start;
    padding-top: 0;
}

body.mandos-theme .mandos-sale-form .form-group.form-group-action > .control-label {
    display: none;
}

body.mandos-theme .mandos-sale-form .form-group.form-group-action .btn {
    margin-top: 0;
    min-width: 110px;
}

body.mandos-theme .mandos-sale-form .mandos-sale-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
    -webkit-overflow-scrolling: touch;
}

body.mandos-theme .mandos-sale-form .mandos-sale-table-wrap table {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 0;
    table-layout: auto;
}

body.mandos-theme .mandos-sale-form .mandos-sale-table-wrap th,
body.mandos-theme .mandos-sale-form .mandos-sale-table-wrap td {
    white-space: nowrap;
    padding: 6px 8px !important;
}

@media (max-width: 991px) {
    body.mandos-theme .mandos-sale-form .form-group > .control-label {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: left;
    }

    body.mandos-theme .mandos-sale-form .form-group > .form-control,
    body.mandos-theme .mandos-sale-form .form-group > select.form-control,
    body.mandos-theme .mandos-sale-form .form-group > .select2-container,
    body.mandos-theme .mandos-sale-form .mandos-customer-col .form-group > .form-control,
    body.mandos-theme .mandos-sale-form .form-group.form-group-wide > .form-control,
    body.mandos-theme .mandos-sale-form .form-group.form-group-wide > .select2-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100%;
    }
}

/* —— Data grids & tables —— */
body.mandos-theme table.dataTable,
body.mandos-theme table.dataTable.table,
body.mandos-theme .box-body table,
body.mandos-theme .content table.table,
body.mandos-theme table.ui.table,
body.mandos-theme table.ui.celled.table,
body.mandos-theme table.styled-table {
    font-size: var(--mandos-grid-font) !important;
}

body.mandos-theme table.dataTable thead th,
body.mandos-theme table.dataTable thead td,
body.mandos-theme table.dataTable.table thead th,
body.mandos-theme table.dataTable.table thead td,
body.mandos-theme .table > thead > tr > th,
body.mandos-theme .table > thead > tr > td,
body.mandos-theme table.ui.table thead th,
body.mandos-theme table.styled-table thead th,
body.mandos-theme table.styled-table thead td {
    background: var(--mandos-navy) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: var(--mandos-grid-header-font) !important;
    line-height: var(--mandos-grid-line-height) !important;
    border: none !important;
    padding: 5px 6px !important;
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    vertical-align: middle !important;
    text-align: center;
}

body.mandos-theme table.dataTable tbody th,
body.mandos-theme table.dataTable tbody td,
body.mandos-theme table.dataTable.table tbody th,
body.mandos-theme table.dataTable.table tbody td,
body.mandos-theme .table > tbody > tr > th,
body.mandos-theme .table > tbody > tr > td,
body.mandos-theme table.ui.table tbody td,
body.mandos-theme table.ui.table tbody th,
body.mandos-theme table.styled-table tbody td,
body.mandos-theme table.styled-table tbody th {
    font-size: var(--mandos-grid-font) !important;
    line-height: var(--mandos-grid-line-height) !important;
    padding: 5px 6px !important;
    vertical-align: middle !important;
}

body.mandos-theme table.dataTable.table thead th.sorting:after,
body.mandos-theme table.dataTable.table thead th.sorting_asc:after,
body.mandos-theme table.dataTable.table thead th.sorting_desc:after,
body.mandos-theme table.dataTable.table thead td.sorting:after,
body.mandos-theme table.dataTable.table thead td.sorting_asc:after,
body.mandos-theme table.dataTable.table thead td.sorting_desc:after {
    top: 50% !important;
    transform: translateY(-50%);
    font-size: 0.75em !important;
}

body.mandos-theme table.dataTable.table thead th.sorting,
body.mandos-theme table.dataTable.table thead th.sorting_asc,
body.mandos-theme table.dataTable.table thead th.sorting_desc,
body.mandos-theme table.dataTable.table thead td.sorting,
body.mandos-theme table.dataTable.table thead td.sorting_asc,
body.mandos-theme table.dataTable.table thead td.sorting_desc {
    padding-right: 16px !important;
}

/* DataTables toolbar + footer alignment */
body.mandos-theme .dataTables_wrapper {
    width: 100% !important;
    font-size: var(--mandos-grid-font) !important;
    box-sizing: border-box;
}

body.mandos-theme .dataTables_wrapper .dataTables_length,
body.mandos-theme .dataTables_wrapper .dataTables_filter,
body.mandos-theme .dataTables_wrapper .dataTables_info,
body.mandos-theme .dataTables_wrapper .dataTables_paginate,
body.mandos-theme .dataTables_wrapper .dataTables_processing {
    font-size: var(--mandos-grid-font) !important;
    float: none !important;
}

body.mandos-theme .dataTables_wrapper .dataTables_length label,
body.mandos-theme .dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    white-space: normal;
    line-height: var(--mandos-grid-line-height);
}

body.mandos-theme .dataTables_wrapper .dataTables_length select,
body.mandos-theme .dataTables_wrapper .dataTables_filter input {
    font-size: var(--mandos-grid-font) !important;
    padding: 4px 8px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
}

body.mandos-theme .dataTables_wrapper .dataTables_filter input {
    width: 160px !important;
    max-width: 42vw;
}

body.mandos-theme .dataTables_wrapper .dataTables_filter .ui.input {
    width: auto !important;
    display: inline-flex !important;
    vertical-align: middle;
}

body.mandos-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.35em 0.75em !important;
    font-size: var(--mandos-grid-font) !important;
}

/* Semantic UI DataTables grid (length / filter / table / info / paginate rows) */
body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.stackable.grid,
body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid {
    width: 100% !important;
    margin: 0 !important;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row > .column,
body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row > [class*="wide column"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100%;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row:not(.dt-table) > .column,
body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row:not(.dt-table) > [class*="wide"].column {
    width: auto !important;
    flex: 0 1 auto !important;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row:first-child .right.aligned.column,
body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row:first-child .right.aligned {
    margin-left: auto;
    text-align: right;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row.dt-table {
    display: block !important;
    margin-bottom: 0 !important;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row.dt-table > .column,
body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row.dt-table > .sixteen.wide.column {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.grid > .row:last-child {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    padding-top: 4px;
    border-top: 1px solid var(--mandos-border);
}

body.mandos-theme .dataTables_wrapper.dt-semanticUI .ui.pagination.menu {
    margin: 0 !important;
    min-height: 0;
    box-shadow: none;
    border: 1px solid var(--mandos-border);
}

/* ScrollX: keep head/body/footer same width as controls */
body.mandos-theme .dataTables_wrapper .dataTables_scroll {
    width: 100% !important;
    clear: both;
    overflow: auto;
}

body.mandos-theme .dataTables_wrapper .dataTables_scrollHead,
body.mandos-theme .dataTables_wrapper .dataTables_scrollBody,
body.mandos-theme .dataTables_wrapper .dataTables_scrollFoot {
    width: 100% !important;
}

body.mandos-theme .dataTables_wrapper .dataTables_scrollHeadInner,
body.mandos-theme .dataTables_wrapper .dataTables_scrollHeadInner table,
body.mandos-theme .dataTables_wrapper .dataTables_scrollBody table {
    width: 100% !important;
    margin: 0 !important;
}

/* Standard DataTables (no Semantic UI dom) — aligned grid toolbars */
body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
}

body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) .dataTables_length {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
}

body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) .dataTables_filter {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
}

body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) .dataTables_processing {
    grid-column: 1 / -1;
}

body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) .dataTables_scroll,
body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) > table.dataTable {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
}

body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) .dataTables_info {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    padding-top: 0 !important;
}

body.mandos-theme .dataTables_wrapper:not(.dt-semanticUI) .dataTables_paginate {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    padding-top: 0 !important;
}

body.mandos-theme .box-body {
    overflow-x: auto;
}

body.mandos-theme .box-body .ui.grid {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.mandos-theme .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

body.mandos-theme .table-hover > tbody > tr:hover {
    background-color: var(--mandos-red-light);
}

body.mandos-theme .styled-table {
    border-radius: var(--mandos-radius);
    overflow: hidden;
    box-shadow: var(--mandos-shadow);
    border: 1px solid var(--mandos-border);
}

body.mandos-theme .styled-table thead tr {
    background: var(--mandos-navy);
    color: #fff;
}

/* Action icons in grid cells */
body.mandos-theme .box-body table .btnLarge,
body.mandos-theme table.dataTable .btnLarge {
    font-size: 16px !important;
}

/* —— Dashboard cards —— */
body.mandos-theme .card {
    border-radius: var(--mandos-radius);
    border: 1px solid var(--mandos-border);
    box-shadow: var(--mandos-shadow);
    margin: 12px 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.mandos-theme .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.15);
}

body.mandos-theme .card .card-header {
    background: linear-gradient(135deg, var(--mandos-red) 0%, #c41e2e 100%) !important;
    border-radius: 0;
    padding: 14px 16px;
    margin: 0 !important;
    box-shadow: none !important;
}

body.mandos-theme .card .card-header i {
    font-style: normal;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    height: auto !important;
    letter-spacing: 0.01em;
}

body.mandos-theme .card .card-content {
    padding: 16px 20px !important;
}

body.mandos-theme .card .card-title,
body.mandos-theme .card .h3 {
    font-weight: 700;
    color: var(--mandos-navy);
    font-size: 1.25rem;
}

body.mandos-theme .card .category {
    color: var(--mandos-slate);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.mandos-theme .card .card-footer {
    border-top: 1px solid var(--mandos-border);
    background: #fafbfc;
    padding: 12px 18px;
}

body.mandos-theme .card .card-footer a {
    color: var(--mandos-red);
    font-weight: 600;
}

body.mandos-theme .card [data-background-color] {
    box-shadow: none !important;
}

/* —— Breadcrumbs (page tabs) —— */
body.mandos-theme .breadcrumb-bg li a {
    background: #cbd5e1;
    color: var(--mandos-navy);
    font-weight: 500;
    height: 38px;
    line-height: 38px;
}

body.mandos-theme .breadcrumb-bg li:nth-child(even) a {
    background-color: #e2e8f0;
}

body.mandos-theme .breadcrumb-bg li:nth-child(even) a:before {
    border-color: #e2e8f0;
}

body.mandos-theme .breadcrumb-bg li:nth-child(even) a:after {
    border-left-color: #e2e8f0;
}

body.mandos-theme .breadcrumb-bg li a:before,
body.mandos-theme .breadcrumb-bg li a:after {
    border-width: 19px 10px;
}

body.mandos-theme .breadcrumb-bg li a:hover,
body.mandos-theme .breadcrumb-bg li a:active {
    background-color: var(--mandos-red) !important;
    color: #fff !important;
}

body.mandos-theme .breadcrumb-bg li a:hover:before,
body.mandos-theme .breadcrumb-bg li a:active:before {
    border-color: var(--mandos-red) !important;
}

body.mandos-theme .breadcrumb-bg li a:hover:after,
body.mandos-theme .breadcrumb-bg li a:active:after {
    border-left-color: var(--mandos-red) !important;
}

/* —— Modals & alerts —— */
body.mandos-theme .modal-content {
    border-radius: var(--mandos-radius);
    border: none;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

body.mandos-theme .modal-header {
    background: var(--mandos-bg);
    border-bottom: 1px solid var(--mandos-border);
    border-radius: var(--mandos-radius) var(--mandos-radius) 0 0;
}

/* —— Select2 —— */
body.mandos-theme .select2-container--default .select2-selection--single {
    border-radius: var(--mandos-radius-sm);
    border-color: var(--mandos-border);
    height: 34px;
}

/* —— Login page (no mandos-theme on body — separate selectors) —— */
body.mandos-login {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.mandos-login form,
body.mandos-login .bottomArea {
    border-radius: var(--mandos-radius);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

body.mandos-login form button[type=submit] {
    background: linear-gradient(135deg, var(--mandos-red) 0%, var(--mandos-red-dark) 100%) !important;
    border: none !important;
    border-radius: var(--mandos-radius-sm) !important;
    padding: 12px !important;
    font-weight: 600;
}

body.mandos-login form input {
    border-radius: var(--mandos-radius-sm) !important;
    border-color: var(--mandos-border) !important;
}

body.mandos-login .input-group-addon {
    background: var(--mandos-red) !important;
    border-color: var(--mandos-red) !important;
    border-radius: var(--mandos-radius-sm) 0 0 var(--mandos-radius-sm) !important;
}

body.mandos-login #bg {
    -webkit-filter: none;
    filter: none;
}

/* —— Pagination & labels —— */
body.mandos-theme .pagination > .active > a,
body.mandos-theme .pagination > .active > span {
    background: var(--mandos-red);
    border-color: var(--mandos-red);
}

body.mandos-theme .pagination > li > a {
    color: var(--mandos-red);
    border-radius: 6px;
    margin: 0 2px;
}

body.mandos-theme label {
    font-weight: 500;
    color: var(--mandos-slate);
}

body.mandos-theme .content {
    padding: 8px 16px 24px;
}

body.mandos-theme .text-info {
    color: var(--mandos-red) !important;
}

body.mandos-theme .fa-file-pdf-o.text-danger {
    color: var(--mandos-red) !important;
}
