/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo i {
    font-size: 2rem;
    color: #4fc3f7;
}

.logo h2 {
    font-size: 1.2rem;
}

nav {
    flex: 1;
    padding: 20px 0;
}

nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #4fc3f7;
}

nav a i {
    width: 20px;
    text-align: center;
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-info h4 {
    margin-bottom: 5px;
}

.user-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.balance {
    color: #4fc3f7;
    font-weight: bold;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search {
    position: relative;
    width: 300px;
}

.search input {
    width: 100%;
    padding: 12px 20px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
}

.search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.bg-primary .stat-icon { background: #2196F3; }
.bg-success .stat-icon { background: #4CAF50; }
.bg-warning .stat-icon { background: #FF9800; }
.bg-danger .stat-icon { background: #f44336; }

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-actions h3 {
    margin-bottom: 20px;
    color: #333;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #e9ecef;
    border-color: #2196F3;
    transform: translateY(-3px);
}

.action-btn i {
    font-size: 2rem;
    color: #2196F3;
}

.action-btn span {
    text-align: center;
    font-weight: 600;
}

.action-btn small {
    color: #666;
    font-weight: normal;
}

/* Recent Transactions */
.recent-transactions {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recent-transactions h3 {
    margin-bottom: 20px;
    color: #333;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: 600;
    color: #555;
}

tr:hover {
    background: #f8f9fa;
}

/* Network Status */
.network-status {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.network-status h3 {
    margin-bottom: 20px;
    color: #333;
}

.status-indicators {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
}

.status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.payment-btn {
    padding: 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.payment-btn.mpesa {
    background: #008000;
    color: white;
}

.payment-btn.airtel {
    background: #FF0000;
    color: white;
}

.payment-btn.cash {
    background: #FF9800;
    color: white;
}

.payment-btn.voucher {
    background: #9C27B0;
    color: white;
}

.payment-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.payment-btn img {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo h2, nav a span, .user-info div:last-child {
        display: none;
    }
    
    .logo {
        justify-content: center;
        padding: 15px;
    }
    
    nav a {
        justify-content: center;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .search {
        width: 100%;
    }
}

/* Ugandan Flag Colors */
.ug-flag {
    background: linear-gradient(to bottom, black 33%, yellow 33% 66%, red 66%);
}