/* ================================================
   THÈME GRIS CLAIR APAISANT POUR SMS GATEWAY
   Couleurs douces et lisibles
   ================================================ */

/* === COULEURS PRINCIPALES === */
:root {
    --bg-primary: #e8eaed;           /* Fond principal - gris très clair */
    --bg-secondary: #f5f6f7;         /* Fond secondaire - presque blanc */
    --bg-tertiary: #ffffff;          /* Fond des cartes - blanc */
    --text-primary: #202124;         /* Texte principal - presque noir */
    --text-secondary: #5f6368;       /* Texte secondaire - gris moyen */
    --border-color: #dadce0;         /* Bordures - gris clair */
    --accent-blue: #1a73e8;          /* Bleu vif */
    --accent-green: #34a853;         /* Vert vif */
    --accent-red: #ea4335;           /* Rouge vif */
    --accent-yellow: #fbbc04;        /* Jaune/orange vif */
    --accent-purple: #a142f4;        /* Violet vif */
    --hover-bg: #f1f3f4;             /* Fond au survol */
}

/* === FOND GÉNÉRAL === */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* === WRAPPER DE CONTENU === */
.content-wrapper {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* === SIDEBAR === */
.main-sidebar {
    background-color: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color) !important;
}

.sidebar-menu > li > a {
    color: var(--text-primary) !important;
}

.sidebar-menu > li.active > a,
.sidebar-menu > li:hover > a {
    background-color: var(--hover-bg) !important;
    color: var(--accent-blue) !important;
    border-left: 3px solid var(--accent-blue);
}

.sidebar-menu > li > a > .fa,
.sidebar-menu > li > a > .ion {
    color: var(--text-secondary) !important;
}

/* === HEADER / NAVBAR === */
.main-header .navbar {
    background-color: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.main-header .navbar .nav > li > a {
    color: var(--text-primary) !important;
}

.main-header .navbar .nav > li > a:hover {
    background-color: var(--hover-bg) !important;
}

.main-header .logo {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

/* === SMALL BOXES (Statistiques) === */
.small-box {
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.small-box h3,
.small-box p {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Couleurs vives pour les boxes */
.bg-yellow-gradient {
    background: linear-gradient(135deg, #fbbc04 0%, #f9ab00 100%) !important;
}

.bg-blue-gradient {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
}

.bg-aqua-gradient {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%) !important;
}

.bg-green-gradient {
    background: linear-gradient(135deg, #34a853 0%, #2d8e47 100%) !important;
}

.bg-red-gradient {
    background: linear-gradient(135deg, #ea4335 0%, #d33b2c 100%) !important;
}

.bg-purple-gradient {
    background: linear-gradient(135deg, #a142f4 0%, #8e24aa 100%) !important;
}

.bg-maroon-gradient {
    background: linear-gradient(135deg, #e67c73 0%, #d93025 100%) !important;
}

.bg-black-gradient {
    background: linear-gradient(135deg, #5f6368 0%, #3c4043 100%) !important;
}

/* === BOXES / CARDS === */
.box {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.box-header {
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    background-color: var(--bg-secondary) !important;
}

.box-body {
    color: var(--text-primary) !important;
}

.box-footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* === FORMULAIRES === */
.form-control {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.form-control:focus {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
}

.form-control::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.6;
}

select.form-control option {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.input-group-addon {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* === BOUTONS === */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #1557b0 !important;
    border-color: #1557b0 !important;
}

.btn-success {
    background-color: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
    color: #ffffff !important;
}

.btn-danger {
    background-color: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: var(--accent-yellow) !important;
    border-color: var(--accent-yellow) !important;
    color: #202124 !important;
}

/* === TABLES === */
.table {
    color: var(--text-primary) !important;
    background-color: var(--bg-tertiary) !important;
}

.table > thead > tr > th {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-bottom: 2px solid var(--border-color) !important;
    font-weight: 600;
}

.table > tbody > tr {
    background-color: var(--bg-tertiary) !important;
}

.table > tbody > tr:hover {
    background-color: var(--hover-bg) !important;
}

.table > tbody > tr > td {
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--bg-tertiary) !important;
}

.table-striped > tbody > tr:nth-of-type(even) {
    background-color: var(--bg-secondary) !important;
}

/* === DATATABLES === */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-primary) !important;
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: var(--text-primary) !important;
    background-color: var(--hover-bg) !important;
    border: 1px solid var(--accent-blue) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: #ffffff !important;
    background-color: var(--accent-blue) !important;
    border: 1px solid var(--accent-blue) !important;
}

/* === MODALS === */
.modal-content {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

.modal-header {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-body {
    color: var(--text-primary) !important;
}

.modal-footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
}

.close {
    color: var(--text-primary) !important;
    opacity: 0.6;
}

.close:hover {
    opacity: 1;
}

/* === ALERTS === */
.alert {
    border-radius: 6px;
}

.alert-info {
    background-color: #e8f0fe !important;
    border-color: var(--accent-blue) !important;
    color: var(--text-primary) !important;
}

.alert-success {
    background-color: #e6f4ea !important;
    border-color: var(--accent-green) !important;
    color: var(--text-primary) !important;
}

.alert-warning {
    background-color: #fef7e0 !important;
    border-color: var(--accent-yellow) !important;
    color: var(--text-primary) !important;
}

.alert-danger {
    background-color: #fce8e6 !important;
    border-color: var(--accent-red) !important;
    color: var(--text-primary) !important;
}

/* === BREADCRUMB === */
.content-header {
    background-color: transparent !important;
}

.content-header h1,
.content-header h2,
.content-header h3 {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* === LABELS / BADGES === */
.label {
    border-radius: 4px;
    padding: 0.3em 0.6em;
}

.badge {
    border-radius: 10px;
}

/* === PAGINATION === */
.pagination > li > a,
.pagination > li > span {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.pagination > li > a:hover {
    background-color: var(--hover-bg) !important;
    border-color: var(--accent-blue) !important;
}

.pagination > .active > a,
.pagination > .active > span {
    background-color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    color: #ffffff !important;
}

/* === DROPDOWN === */
.dropdown-menu {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dropdown-menu > li > a {
    color: var(--text-primary) !important;
}

.dropdown-menu > li > a:hover {
    background-color: var(--hover-bg) !important;
    color: var(--accent-blue) !important;
}

/* === NAV TABS === */
.nav-tabs {
    border-bottom: 1px solid var(--border-color) !important;
}

.nav-tabs > li > a {
    color: var(--text-secondary) !important;
}

.nav-tabs > li > a:hover {
    background-color: var(--hover-bg) !important;
    border-color: var(--border-color) !important;
}

.nav-tabs > li.active > a {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    border-bottom-color: transparent !important;
    color: var(--accent-blue) !important;
    font-weight: 600;
}

/* === PANEL === */
.panel {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

.panel-heading {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.panel-body {
    color: var(--text-primary) !important;
}

/* === SELECT2 === */
.select2-container--default .select2-selection--single {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
}

.select2-dropdown {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

.select2-container--default .select2-results__option {
    color: var(--text-primary) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--accent-blue) !important;
    color: #ffffff !important;
}

/* === TIMELINE === */
.timeline > li > .timeline-item {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.timeline > li > .timeline-item > .timeline-header {
    color: var(--text-primary) !important;
}

.timeline > li > .timeline-item > .timeline-body {
    color: var(--text-primary) !important;
}

/* === SCROLLBAR PERSONNALISÉE === */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* === TEXT COLORS === */
.text-muted {
    color: var(--text-secondary) !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* === HR === */
hr {
    border-top: 1px solid var(--border-color) !important;
}

/* === FOOTER === */
.main-footer {
    background-color: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* === LINKS === */
a {
    color: var(--accent-blue) !important;
}

a:hover {
    color: #1557b0 !important;
}

/* === INFO BOX === */
.info-box {
    background-color: var(--bg-tertiary) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.info-box-text,
.info-box-number {
    color: var(--text-primary) !important;
}

/* === WELL === */
.well {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* === TOASTR NOTIFICATIONS === */
.toast {
    background-color: var(--bg-tertiary) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.toast-success {
    background-color: #34a853 !important;
    color: #ffffff !important;
}

.toast-error {
    background-color: #ea4335 !important;
    color: #ffffff !important;
}

.toast-info {
    background-color: #1a73e8 !important;
    color: #ffffff !important;
}

.toast-warning {
    background-color: #fbbc04 !important;
    color: #202124 !important;
}

/* === CODE === */
code {
    background-color: var(--bg-secondary) !important;
    color: #d93025 !important;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

pre {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* === SIDEBAR USER PANEL === */
.user-panel {
    border-bottom: 1px solid var(--border-color) !important;
}

.user-panel .info p {
    color: var(--text-primary) !important;
}