/* ============================================
   KENYA DIGITAL BANKING SYSTEM
   Admin Panel Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    background: linear-gradient(135deg, #1a3a6c, #2c5282);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

header h1 i {
    font-size: 2rem;
}

nav {
    background-color: #2d3748;
    padding: 0.5rem 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.5rem 2rem;
}

nav ul li a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #4a5568;
    color: white;
}

nav ul li a.active {
    background-color: #3182ce;
}

/* ============================================
   CONTAINER & MAIN CONTENT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.main-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
    border-bottom: 3px solid #3182ce;
    padding-bottom: 0.5rem;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ============================================
   FORMS
   ============================================ */
form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #2c5282;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #3182ce;
}

.btn-secondary {
    background-color: #718096;
}

.btn-success {
    background-color: #38a169;
}

.btn-danger {
    background-color: #e53e3e;
}

.btn-warning {
    background-color: #dd6b20;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

table tr:hover {
    background-color: #f7fafc;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: #c6f6d5;
    color: #276749;
}

.badge-danger {
    background-color: #fed7d7;
    color: #9b2c2c;
}

.badge-warning {
    background-color: #feebc8;
    color: #9c4221;
}

.badge-info {
    background-color: #bee3f8;
    color: #2c5282;
}

.badge-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

/* ============================================
   SEARCH & FILTERS
   ============================================ */
.search-box {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box input,
.search-box select {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

.search-box button {
    padding: 0.75rem 1.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #3182ce;
    color: white;
    border-color: #3182ce;
}

.pagination .active {
    background-color: #3182ce;
    color: white;
    border-color: #3182ce;
}

.pagination .disabled {
    color: #a0aec0;
    cursor: not-allowed;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.modal-close:hover {
    color: #e53e3e;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background-color: #2d3748;
    color: #e2e8f0;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 0.75rem;
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3182ce;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}