/* ==========================================================
   CHARTE GRAPHIQUE OFFICIELLE - CNS BANK (BLANC, BLEU, DORÉ)
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Le fond de page est légèrement grisé/bleuté pour faire ressortir la boîte */
body {
    background-color: #EBF0F6 !important; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- LOGO ET MENU BLEU (HEADER) --- */
header {
    background: #0B2C5D !important; /* Bleu marine officiel */
    padding: 15px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header nav a {
    color: white !important;
    text-decoration: none;
    margin-left: 30px;
    font-size: 17px;
    font-weight: 600;
    transition: 0.3s;
}

header nav a:hover, header nav a.active {
    color: #C9A24A !important; /* Doré officiel au survol */
}

/* ==========================================================
   INTERFACE DU GAB (CONNEXION CENTRÉE ET COMPACTE)
   ========================================================== */

/* Conteneur de centrage global */
.login-page-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 20px 40px; /* Évite de se cacher sous le menu fixed */
}

/* La grande boîte du GAB (Couleur beige/gris chaud texturé en relief) */
.gab-card-container {
    background: #E5E2DC !important; 
    padding: 40px 30px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important; /* Ombre accentuée */
    width: 100%;
    max-width: 720px; /* Taille fixe pour ne pas prendre tout l'écran */
    text-align: center;
    border: 1px solid #D1CFC9;
}

/* Grand titre en Doré Sombre Institutionnel */
.gab-main-title {
    color: #926E2C !important;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sous-titre */
.gab-sub-title {
    color: #444444 !important;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

/* Le bloc interne Blanc Pur */
.inner-form-box {
    background-color: #FFFFFF !important; /* Blanc pur demandé */
    padding: 40px 35px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.form-group-gab {
    margin-bottom: 30px;
    text-align: center;
}

/* Libellés des champs (Identifiant et Code PIN) */
.form-group-gab label {
    display: block;
    font-size: 24px; /* Écritures bien grosses et lisibles */
    font-weight: bold;
    color: #333333 !important;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Champs de saisie blancs à contour fin */
.gab-input {
    width: 100%;
    max-width: 550px;
    padding: 16px 20px;
    font-size: 20px;
    border: 1px solid #CCCCCC !important;
    border-radius: 8px;
    text-align: center;
    background-color: #FFFFFF !important;
    color: #333333 !important;
    transition: all 0.3s ease;
}

/* Effet de sélection Doré brillant */
.gab-input:focus {
    border-color: #C9A24A !important;
    box-shadow: 0 0 10px rgba(201, 162, 74, 0.5) !important;
    outline: none;
}

/* Le gros bouton VALIDER Doré avec écriture Blanche */
.gab-btn-submit {
    background-color: #C9A24A !important; /* Doré */
    color: #FFFFFF !important; /* Blanc */
    width: 100%;
    max-width: 550px;
    padding: 18px 20px;
    font-size: 22px; /* Gros texte */
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(201, 162, 74, 0.3);
    transition: all 0.2s ease;
}

.gab-btn-submit:hover {
    background-color: #B28E3D !important; /* Doré un peu plus sombre au survol */
    transform: translateY(-2px);
}

/* Boîte d'erreur PHP */
.error-box {
    background-color: #FFEBEE !important;
    color: #D32F2F !important;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #EF9A9A !important;
    margin-bottom: 25px;
    font-weight: bold;
    font-size: 15px;
}

/* --- FOOTER BLEU MARINE --- */
footer {
    background: #0B2C5D !important;
    color: white !important;
    text-align: center;
    padding: 25px;
    margin-top: auto;
}
/* ==========================================================
   SECTION C : TABLEAUX DE BORD ET COMPTES (CLIENT & ADMIN)
   ========================================================== */

/* Conteneur global pour les pages intérieures */
.dashboard-container {
    max-width: 1200px;
    width: 100%;
    margin: 110px auto 40px; /* Espace sous le header fixe */
    padding: 0 20px;
    flex: 1;
}

/* Message de bienvenue ou d'en-tête de page */
.dashboard-header {
    background: #FFFFFF;
    padding: 25px 35px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #C9A24A; /* Ligne dorée décorative */
}

.dashboard-header h2 {
    color: #0B2C5D;
    font-size: 28px;
}

/* Grille pour afficher les comptes ou les actions du GAB */
.gab-grid-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Les grosses cartes d'action cliquables du GAB (Retrait, Solde, etc.) */
.action-card {
    background: #FFFFFF;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    color: #333333;
    font-weight: bold;
    font-size: 22px; /* Écritures agrandies */
    text-transform: uppercase;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.action-card:hover {
    border-color: #C9A24A;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(201, 162, 74, 0.15);
    color: #0B2C5D;
}

/* --- AFFICHAGE DU SOLDE DU COMPTE --- */
.solde-box {
    background: #0B2C5D;
    color: #FFFFFF;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
    box-shadow: 0 10px 25px rgba(11, 44, 93, 0.2);
}

.solde-box h3 {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #C9A24A; /* Titre du solde en doré */
    margin-bottom: 15px;
}

.solde-montant {
    font-size: 45px;
    font-weight: bold;
}

/* --- STYLES POUR LES TABLEAUX DE L'ADMIN (Gestion des comptes) --- */
.admin-table-wrapper {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.cns-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 16px;
    text-align: left;
}

.cns-table th {
    background-color: #0B2C5D;
    color: #FFFFFF;
    padding: 14px 18px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.cns-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #EAEAEA;
    color: #444444;
}

.cns-table tbody tr:hover {
    background-color: #F8FAFC;
}

/* Badges de statut (Actif / Bloqué) */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-danger { background: #FFEBEE; color: #C62828; }

/* Boutons d'action secondaires pour les formulaires ou tableaux */
.btn-secondary {
    background: #0B2C5D;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: #154385;
}