/* Angles droits partout : neutralise les rayons de bordure de Tabler/Bootstrap et du CSS custom */
*,
*::before,
*::after {
    border-radius: 0 !important;
}

:root {
    --autoflow-sidebar-width: 15rem;

    /* Tchad ERP palette */
    --tchad-blue: #00205B;
    --tchad-blue-rgb: 0, 32, 91;
    --tchad-blue-light: #E8ECF5;
    --tchad-yellow: #FFC72C;
    --tchad-yellow-rgb: 255, 199, 44;
    --tchad-red: #C8102E;
    --tchad-red-rgb: 200, 16, 46;
    --tchad-gray-50: #F9FAFB;
    --tchad-gray-200: #E5E7EB;
    --tchad-gray-600: #4B5563;

    --tblr-primary: var(--tchad-blue);
    --tblr-primary-rgb: var(--tchad-blue-rgb);
    --tblr-warning: var(--tchad-yellow);
    --tblr-warning-rgb: var(--tchad-yellow-rgb);
    --tblr-danger: var(--tchad-red);
    --tblr-danger-rgb: var(--tchad-red-rgb);
    --tblr-body-bg: var(--tchad-gray-50);
    --tblr-border-color: var(--tchad-gray-200);
    --tblr-secondary-color: var(--tchad-gray-600);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    color: #1F2937;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* ---- Buttons: weight, lift, real affordance ---- */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 0.375rem 0.85rem;
    font-size: 0.8125rem;
    border-radius: 0.4375rem;
}

.btn-primary {
    background-color: var(--tchad-blue);
    border-color: var(--tchad-blue);
    box-shadow: 0 1px 2px rgba(0, 32, 91, 0.15), 0 1px 3px rgba(0, 32, 91, 0.1);
}

.btn-primary:hover {
    background-color: #001945;
    border-color: #001945;
    box-shadow: 0 2px 6px rgba(0, 32, 91, 0.25);
}

.btn-outline-secondary {
    color: var(--tchad-gray-600);
    border-color: var(--tchad-gray-200);
    background: #ffffff;
}

.btn-outline-secondary:hover {
    background: var(--tchad-gray-50);
    border-color: #D1D5DB;
    color: #1F2937;
}

.btn-warning {
    color: var(--tchad-blue);
    box-shadow: 0 1px 2px rgba(255, 199, 44, 0.25);
}

.btn-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.text-primary {
    color: var(--tchad-blue) !important;
}

a {
    color: var(--tchad-blue);
    text-decoration: none;
}

a:hover {
    color: #001640;
    text-decoration: underline;
}

/* ---- Odoo-style "sheet" surfaces ---- */
.o-sheet {
    background: #ffffff;
    border: 1px solid var(--tchad-gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 8px rgba(15, 23, 42, 0.03);
}

.o-sheet.p-3 {
    padding: 1.5rem !important;
}

.o-sheet .card-header {
    border-bottom: 1px solid var(--tchad-gray-200);
    padding: 1rem 1.25rem;
}

.o-sheet .card-header .card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--tchad-blue);
}

.o-sheet .card-body {
    padding: 1.25rem;
}

/* ---- Numbered sections with blue header bar ---- */
.o-numbered-section {
    background: #ffffff;
    border: 1px solid var(--tchad-gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.o-numbered-section + .o-numbered-section {
    margin-top: 1.5rem;
}

.o-numbered-section-header {
    background: var(--tblr-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.625rem 1rem;
}

.o-numbered-section-body {
    display: grid;
}

.o-numbered-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    border-top: 1px solid var(--tchad-gray-200);
}

.o-numbered-section-body > .o-numbered-row:first-child {
    border-top: none;
}

.o-numbered-row-label {
    padding: 0.625rem 1rem;
    font-weight: 700;
    background: var(--tchad-gray-50);
    border-right: 1px solid var(--tchad-gray-200);
}

.o-numbered-row-value {
    padding: 0.625rem 1rem;
    color: var(--tblr-secondary-color);
}

.o-numbered-row-value .form-control,
.o-numbered-row-value .form-select {
    max-width: 100%;
}

@media (max-width: 767.98px) {
    .o-numbered-row {
        grid-template-columns: 1fr;
    }

    .o-numbered-row-label {
        border-right: none;
        border-bottom: 1px solid var(--tchad-gray-200);
    }
}

/* ---- Round colored action buttons for list rows ---- */
.o-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.375rem;
}

.o-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    color: #ffffff;
    flex: 0 0 auto;
}

.o-action-btn .icon {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.o-action-btn:hover {
    color: #ffffff;
    opacity: 0.85;
    text-decoration: none;
}

.o-action-btn-view {
    background: #2fb344;
}

.o-action-btn-edit {
    background: var(--tchad-yellow);
    color: var(--tchad-blue);
}

.o-action-btn-edit:hover {
    color: var(--tchad-blue);
}

.o-action-btn-duplicate {
    background: #4299e1;
}

.o-action-btn-delete {
    background: var(--tchad-red);
}

/* ---- Odoo-style dense list/table ---- */
.o-table {
    margin-bottom: 0;
}

.o-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--tchad-gray-50);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--tchad-gray-600);
    border-bottom: 1px solid var(--tchad-gray-200);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.o-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--tchad-gray-50);
    color: #1F2937;
}

.o-table tbody tr {
    transition: background-color 0.1s ease;
}

.o-table tbody tr:hover {
    background-color: rgba(var(--tchad-blue-rgb), 0.04);
}

.o-table tbody tr:last-child td {
    border-bottom: none;
}

.o-table .badge {
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.6875rem;
    padding: 0.3rem 0.6rem;
    letter-spacing: 0.02em;
}

/* ---- Odoo-style status pills (workflow) ---- */
.o-statusbar {
    display: inline-flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    border-radius: 0.625rem;
    overflow: hidden;
    background: var(--tchad-gray-50);
    border: 1px solid var(--tchad-gray-200);
}

.o-status-pill {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
    color: var(--tchad-gray-600);
    border-radius: 0.4375rem;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.o-status-pill.is-active {
    background: var(--tchad-blue);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 32, 91, 0.3);
}

.o-status-pill.is-done {
    background: rgba(255, 199, 44, 0.25);
    color: #8a6400;
}

.o-status-pill.is-future {
    color: var(--tchad-gray-400);
}

.o-status-pill.is-cancelled {
    background: var(--tchad-red);
    color: #ffffff;
}

.o-statusbar-compact {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    gap: 0;
    position: relative;
}

.o-statusbar-compact .o-status-pill {
    position: relative;
    padding: 0.3rem 0.75rem !important;
    font-size: 0.5625rem;
    font-weight: 600;
    gap: 0.25rem;
    background: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;
    margin-right: 1.125rem;
}

.o-statusbar-compact .o-status-pill:last-child {
    margin-right: 0;
}

.o-statusbar-compact .o-status-pill:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1.125rem;
    height: 1px;
    background: var(--tchad-gray-200);
    transform: translateY(-50%);
}

.o-statusbar-compact .o-status-pill.is-future {
    color: var(--tchad-gray-400);
}

.o-statusbar-compact .o-status-pill.is-done {
    color: #2f9e44;
}

.o-statusbar-compact .o-status-pill.is-active {
    background: var(--tchad-blue) !important;
    color: #ffffff;
    box-shadow: none;
}

.o-statusbar-compact .o-status-pill.is-cancelled {
    background: #ffffff !important;
    color: var(--tchad-red);
}

.o-statusbar-compact .o-status-icon {
    font-size: 0.5625rem;
    line-height: 1;
}

/* ---- Quick-create modal (relational selects) ---- */
[data-relational-create-modal] .modal-dialog {
    max-height: calc(100vh - 3.5rem);
    display: flex;
}

[data-relational-create-modal] .modal-content {
    border: none;
    max-height: calc(100vh - 3.5rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-relational-create-modal] .modal-body {
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

[data-relational-create-modal] .modal-header,
[data-relational-create-modal] .modal-footer {
    flex-shrink: 0;
}

.o-status-pill.is-ellipsis {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    color: var(--tchad-gray-400);
    cursor: default;
}

.o-workflow-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.o-workflow-next-form {
    display: inline-flex;
    margin: 0;
}

.o-workflow-next-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 50%;
    background: var(--tchad-blue);
    color: #ffffff;
    flex: 0 0 auto;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.o-workflow-next-btn:hover {
    opacity: 0.85;
    color: #ffffff;
}

.o-workflow-next-btn i {
    font-size: 0.875rem;
}

/* ---- Odoo-style form header / action bar ---- */
.o-form-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--tchad-gray-200);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ---- Odoo-style notebook (tabs) ---- */
.o-notebook .nav-tabs {
    border-bottom: 1px solid var(--tchad-gray-200);
    gap: 0.25rem;
    flex-wrap: wrap;
}

.o-notebook .nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--tchad-gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.7rem 0.9rem;
    margin-right: 0.25rem;
    margin-bottom: -1px;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.o-notebook .nav-tabs .nav-link:hover {
    color: var(--tchad-blue);
    background: var(--tchad-gray-50);
}

.o-notebook .nav-tabs .nav-link.active {
    color: var(--tchad-blue);
    border-bottom-color: var(--tchad-blue);
    background: var(--tchad-blue-light);
}

.o-notebook .tab-content {
    padding-top: 1.5rem;
}

/* ---- Step wizard (multi-step form) ---- */
.o-wizard-steps {
    display: flex;
    align-items: flex-start;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.o-wizard-step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.o-wizard-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.375rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--tchad-gray-200);
    z-index: 0;
}

.o-wizard-step.is-complete:not(:last-child)::after {
    background: var(--tblr-primary);
}

.o-wizard-step-circle {
    position: relative;
    z-index: 1;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid var(--tchad-gray-200);
    color: var(--tchad-gray-600);
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.o-wizard-step-circle svg {
    width: 20px;
    height: 20px;
}

.o-wizard-step.is-active .o-wizard-step-circle {
    border-color: var(--tblr-primary);
    color: var(--tblr-primary);
}

.o-wizard-step.is-complete .o-wizard-step-circle {
    background: var(--tblr-primary);
    border-color: var(--tblr-primary);
    color: #ffffff;
}

.o-wizard-step-label {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tchad-gray-600);
}

.o-wizard-step.is-active .o-wizard-step-label,
.o-wizard-step.is-complete .o-wizard-step-label {
    color: var(--tblr-primary);
}

.o-wizard-step-description {
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--tchad-gray-600);
    max-width: 14rem;
}

.o-wizard-panel {
    display: none;
}

.o-wizard-panel.is-active {
    display: block;
}

.o-wizard-panel-heading {
    margin-bottom: 1.25rem;
}

.o-wizard-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tchad-blue);
    margin-bottom: 0.25rem;
}

.o-wizard-panel-description {
    font-size: 0.8125rem;
    color: var(--tchad-gray-600);
    margin-bottom: 0;
}

.o-wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tchad-gray-200);
}

/* ---- Odoo-style field with inline icon ---- */
.o-field {
    margin-bottom: 1.25rem;
}

.o-field-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tchad-gray-600);
    margin-bottom: 0.375rem;
}

.o-field-input {
    position: relative;
}

.o-field-input .o-field-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    display: flex;
    pointer-events: none;
}

.o-field-input .o-field-icon svg {
    width: 16px;
    height: 16px;
}

.o-field-input.has-icon .form-control,
.o-field-input.has-icon .form-select {
    padding-left: 2.5rem;
}

.o-field-help {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.375rem;
}

/* ---- Inputs: real focus states, consistent height, breathing room ---- */
.form-control,
.form-select {
    border-color: var(--tchad-gray-200);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #1F2937;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: #9CA3AF;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tchad-blue);
    box-shadow: 0 0 0 3px rgba(var(--tchad-blue-rgb), 0.12);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tchad-gray-600);
    margin-bottom: 0.375rem;
}

.form-check-input:checked {
    background-color: var(--tchad-blue);
    border-color: var(--tchad-blue);
}

.form-check-input:focus {
    border-color: var(--tchad-blue);
    box-shadow: 0 0 0 3px rgba(var(--tchad-blue-rgb), 0.12);
}

body {
    min-height: 100vh;
}

.navbar-vertical {
    width: var(--autoflow-sidebar-width);
    box-shadow: 0.0625rem 0 0 rgba(0, 0, 0, 0.04);
}

@media (min-width: 992px) {
    .navbar-vertical.navbar-expand-lg ~ .page-wrapper {
        margin-left: var(--autoflow-sidebar-width);
    }
}

.navbar-vertical .nav-link {
    color: var(--tblr-body-color);
    border-radius: 0.375rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.navbar-vertical .nav-link .icon {
    stroke: currentColor;
}

.navbar-vertical .nav-link:hover {
    background-color: var(--tblr-bg-surface-secondary, #f4f6fa);
    color: var(--tblr-body-color);
}

.navbar-vertical .nav-link.active {
    background-color: var(--tchad-blue-light);
    color: var(--tchad-blue);
    font-weight: 700;
    border-radius: 0.375rem;
    border-left: 3px solid var(--tchad-blue);
    padding-left: calc(0.75rem - 3px);
}

.navbar-vertical .container-fluid {
    padding: 0;
}

header.navbar .input-icon .form-control {
    border-radius: 999px;
    background: var(--tchad-gray-50);
    border-color: transparent;
}

header.navbar .input-icon .form-control:focus {
    background: #ffffff;
    border-color: var(--tchad-blue);
}

.navbar-vertical .sidebar-chevron {
    display: inline-flex;
    color: var(--tblr-secondary);
    transition: transform 0.15s ease-in-out;
}

.navbar-vertical [aria-expanded="true"] .sidebar-chevron {
    transform: rotate(90deg);
}

.navbar-vertical .collapse .nav-link {
    font-size: 0.875rem;
}

/* Ensure sticky navbar links and icons are visible on white background */
header.navbar.bg-white .nav-link,
header.navbar.bg-white .navbar-nav .dropdown-item {
    color: #333333;
}

header.navbar.bg-white .nav-link .icon,
header.navbar.bg-white .dropdown-item .icon {
    stroke: currentColor;
}

.autoflow-logo-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: var(--tblr-primary);
    color: #ffffff;
    font-weight: 700;
}

.page-wrapper {
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.page-body > .container-fluid,
.page-header > .container-fluid,
.footer > .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 100%;
}

.page-header {
    background: #ffffff;
    border-bottom: 1px solid var(--tchad-gray-200);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.page-title {
    font-weight: 700;
    color: var(--tchad-blue);
    font-size: 1.375rem;
}

.page-pretitle {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #9CA3AF;
}

.breadcrumb {
    font-size: 0.8125rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #D1D5DB;
}

.page-body {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.autoflow-chart-placeholder,
.autoflow-map-placeholder {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--tblr-border-color);
    border-radius: 0.5rem;
    color: var(--tblr-secondary);
    background-color: var(--tblr-bg-surface-secondary);
}

@media print {
    .navbar-vertical,
    header.navbar,
    .footer,
    .btn-list {
        display: none !important;
    }

    .page-wrapper {
        margin-left: 0 !important;
    }
}

/* ---- Dashboard: stat cards with colored icon badges ---- */
.o-stat-card {
    padding: 1.25rem;
    height: 100%;
}

.o-stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.o-stat-card-label {
    font-size: 0.8125rem;
    font-weight: 700;
}

.o-stat-card-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.o-stat-card-icon svg {
    width: 22px;
    height: 22px;
}

.o-stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.o-stat-card-change {
    font-size: 0.8125rem;
    font-weight: 700;
}

.o-stat-card-footer {
    font-size: 0.8125rem;
    color: var(--tchad-gray-600);
    margin-top: 0.25rem;
}

.o-stat-card.is-blue .o-stat-card-label,
.o-stat-card.is-blue .o-stat-card-value { color: var(--tchad-blue); }
.o-stat-card.is-blue .o-stat-card-icon { background: rgba(var(--tchad-blue-rgb), 0.1); color: var(--tchad-blue); }

.o-stat-card.is-green .o-stat-card-label,
.o-stat-card.is-green .o-stat-card-value { color: #15803d; }
.o-stat-card.is-green .o-stat-card-icon { background: rgba(21, 128, 61, 0.12); color: #15803d; }

.o-stat-card.is-purple .o-stat-card-label,
.o-stat-card.is-purple .o-stat-card-value { color: #6d28d9; }
.o-stat-card.is-purple .o-stat-card-icon { background: rgba(109, 40, 217, 0.12); color: #6d28d9; }

.o-stat-card.is-orange .o-stat-card-label,
.o-stat-card.is-orange .o-stat-card-value { color: #b45309; }
.o-stat-card.is-orange .o-stat-card-icon { background: rgba(255, 199, 44, 0.25); color: #b45309; }

.o-stat-card.is-red .o-stat-card-label,
.o-stat-card.is-red .o-stat-card-value { color: var(--tchad-red); }
.o-stat-card.is-red .o-stat-card-icon { background: rgba(var(--tchad-red-rgb), 0.1); color: var(--tchad-red); }

.o-stat-card-change.is-up { color: #15803d; }
.o-stat-card-change.is-down { color: var(--tchad-red); }

/* ---- Dashboard: CSS-only donut charts ---- */
.o-donut {
    position: relative;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--o-donut-gradient, conic-gradient(var(--tchad-gray-200) 0deg 360deg));
}

.o-donut::before {
    content: "";
    position: absolute;
    inset: 1.15rem;
    border-radius: 50%;
    background: #ffffff;
}

.o-donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
}

.o-donut-center .o-donut-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tchad-blue);
    line-height: 1.2;
}

.o-donut-center .o-donut-label {
    font-size: 0.75rem;
    color: var(--tchad-gray-600);
}

.o-donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
}

.o-donut-legend li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
    padding: 0.35rem 0;
}

.o-donut-legend-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--tchad-gray-600);
    font-weight: 600;
}

.o-donut-legend-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    display: inline-block;
}

.o-donut-legend-amount {
    font-weight: 700;
    color: #1F2937;
}

/* ---- Dashboard: top vehicles ranking ---- */
.o-ranking-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    color: var(--tchad-gray-600);
    text-align: center;
}

.o-ranking-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--tchad-gray-50);
}

.o-ranking-item:last-child {
    border-bottom: none;
}

.o-ranking-rank {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--tchad-blue-light);
    color: var(--tchad-blue);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Dashboard: key indicators grid ---- */
.o-indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.o-indicator-tile {
    padding: 0.9rem 1rem;
    border: 1px solid var(--tchad-gray-200);
    border-radius: 0.625rem;
    background: var(--tchad-gray-50);
}

.o-indicator-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--tchad-gray-600);
    margin-bottom: 0.35rem;
}

.o-indicator-tile-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tchad-blue);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.o-indicator-tile-value svg {
    width: 18px;
    height: 18px;
    color: var(--tchad-gray-600);
}

/* ---- Dashboard: notifications ---- */
.o-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.625rem;
    margin-bottom: 0.75rem;
}

.o-notification:last-child {
    margin-bottom: 0;
}

.o-notification-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 700;
}

.o-notification-title {
    font-size: 0.8125rem;
    font-weight: 700;
}

.o-notification-message {
    font-size: 0.8125rem;
    color: var(--tchad-gray-600);
}

.o-notification.is-info { background: rgba(var(--tchad-blue-rgb), 0.06); }
.o-notification.is-info .o-notification-icon { background: var(--tchad-blue); }
.o-notification.is-info .o-notification-title { color: var(--tchad-blue); }

.o-notification.is-success { background: rgba(21, 128, 61, 0.08); }
.o-notification.is-success .o-notification-icon { background: #15803d; }
.o-notification.is-success .o-notification-title { color: #15803d; }

.o-notification.is-warning { background: rgba(255, 199, 44, 0.15); }
.o-notification.is-warning .o-notification-icon { background: #b45309; }
.o-notification.is-warning .o-notification-title { color: #b45309; }

/* ---- Dashboard: tighter spacing between cards/components ---- */
#dashboard-page .row-cards {
    --tblr-gutter-x: 1rem;
    --tblr-gutter-y: 1rem;
}

#dashboard-page .row + .row {
    margin-top: 1rem;
}

#dashboard-page .row.mb-1 {
    margin-bottom: 1rem !important;
}

#dashboard-page .o-sheet .card-header {
    padding: 0.85rem 1.1rem;
}

#dashboard-page .o-sheet .card-body {
    padding: 1rem 1.1rem;
}

#dashboard-page .o-stat-card {
    padding: 1rem;
}

#dashboard-page .o-donut {
    width: 9rem;
    height: 9rem;
}

#dashboard-page .o-donut-legend {
    margin-top: 0.75rem !important;
}

#dashboard-page .o-indicator-grid {
    gap: 0.75rem;
}

/* ---- Searchable select (Odoo-style combobox with "create") ---- */
.o-searchable-select {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.o-searchable-select-input {
    padding-right: 2.25rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='7'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.o-searchable-select-source {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.o-searchable-select-menu {
    position: fixed;
    z-index: 1080;
    max-height: 240px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--tchad-gray-200);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 0;
    width: 100%;
    min-width: 280px;
}

.o-searchable-select-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.875rem;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--tchad-gray-200);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.o-searchable-select-item:last-child {
    border-bottom: none;
}

.o-searchable-select-item:hover {
    background: rgba(var(--tchad-blue-rgb), 0.08);
    color: var(--tchad-blue);
}

.o-searchable-select-item.is-active {
    background: var(--tchad-blue);
    color: #ffffff;
}

.o-searchable-select-empty {
    padding: 0.45rem 0.6rem;
    font-size: 0.8125rem;
    color: var(--tchad-gray-600);
}

.o-searchable-select-create {
    display: block;
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tchad-blue);
    text-decoration: none;
    border-top: 1px solid var(--tchad-gray-200);
    margin-top: 0;
    text-align: left;
}

.o-searchable-select-create:hover {
    background: rgba(var(--tchad-blue-rgb), 0.08);
}
