/* ==========================================================================
   CUSTOM GLOBAL — SendMoney v2
   Styles partagés sur toutes les pages: tableaux, badges, formulaires, profil, login
   ========================================================================== */

/* -------------------------------------------------------
   LAYOUT — Correction chevauchement sidebar / contenu
------------------------------------------------------- */
body {
    overflow-x: hidden;
}

.main-content {
    overflow-x: hidden;
    margin-left: 240px;
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0 !important;
    }
}

.vertical-collpsed .main-content {
    margin-left: 70px;
}

/* -------------------------------------------------------
   TABLEAUX — En-têtes uniformes
------------------------------------------------------- */
.table thead th {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #454d55;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(85, 110, 230, 0.04);
}

.table td {
    vertical-align: middle;
}

/* -------------------------------------------------------
   BADGES DE STATUTS — Pills cohérents
------------------------------------------------------- */
.badge {
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 20px;
}

.badge.bg-warning  { color: #212529 !important; }
.badge.bg-info     { color: #fff !important; }

/* -------------------------------------------------------
   FORMULAIRES — Champs readonly + sections
------------------------------------------------------- */
.form-control[readonly],
.form-control:disabled:not([type="hidden"]) {
    background-color: #f4f6f9 !important;
    color: #6c757d;
    border-color: #e2e8f0;
    cursor: default;
}

/* Section de formulaire (wrapper avec couleur + filet gauche) */
.form-section {
    background: #f8f9fc;
    border-radius: 8px;
    padding: 20px 20px 12px 20px;
    margin-bottom: 24px;
    border-left: 3px solid #556ee6;
}

.form-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #556ee6;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    font-size: 16px;
}

/* -------------------------------------------------------
   BOUTONS D'ACTION — Tableaux
------------------------------------------------------- */
.btn-action-group {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    align-items: center;
}

.btn-action-group .btn {
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* -------------------------------------------------------
   PROFILE AVATAR — Initiales dans cercle coloré
------------------------------------------------------- */
.avatar-initials {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.profile-info-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f7;
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(85,110,230,0.1);
    color: #556ee6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 12px;
}

.profile-info-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #adb5bd;
    margin-bottom: 2px;
}

.profile-info-value {
    font-size: 14px;
    color: #343a40;
    font-weight: 500;
}

/* -------------------------------------------------------
   LOGIN PAGE — Layout moderne avec background premium
------------------------------------------------------- */
.login-page-wrapper {
    min-height: 100vh;
    background-color: #0f172a;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(85,110,230,0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(111,66,193,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(52,211,153,0.08) 0%, transparent 40%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Grille de points décorative en fond */
.login-page-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.login-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.04);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-header {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(85,110,230,0.25);
    padding: 36px 32px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(85,110,230,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.login-body {
    background: #fff;
    padding: 32px;
}

.login-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
    position: relative;
    z-index: 1;
}

/* -------------------------------------------------------
   FORMULAIRES — Titres de sections H3 automatiques
   (transactions/create, paiements/create, etc.)
------------------------------------------------------- */
form h3 {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #556ee6 !important;
    padding: 10px 14px !important;
    background: linear-gradient(90deg, rgba(85,110,230,0.08) 0%, transparent 70%);
    border-left: 3px solid #556ee6;
    border-radius: 0 6px 6px 0;
    margin-bottom: 20px !important;
}

form h3 i {
    font-size: 15px;
    vertical-align: middle;
    margin-right: 4px;
}

/* -------------------------------------------------------
   CARTES — Titres cohérents
------------------------------------------------------- */
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #343a40;
}

.card-title-desc {
    font-size: 13px;
    color: #74788d;
}

/* -------------------------------------------------------
   PAGINATION — Alignement DataTables
------------------------------------------------------- */
div.dataTables_wrapper div.dataTables_paginate {
    margin-top: 12px;
}

div.dataTables_wrapper div.dataTables_info {
    font-size: 12px;
    color: #74788d;
    padding-top: 14px;
}
