/* Dashboard and admin specific styles */

.dashboard {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 280px;
    background: rgba(15, 28, 63, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
    color: white;
    padding: 2rem 0;
}

.menu {
    list-style: none;
}

.menu-item {
    padding: 1.2rem 2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255,255,255,0.05);
    padding-left: 2.5rem;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), transparent);
    border-left: 4px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.main-content {
    flex: 1;
    padding: 3rem 2rem;
    background: transparent;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.section h2 {
    margin-bottom: 2rem;
    color: var(--text-light);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.balance {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
}

.recent-transactions {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dark);
}

.recent-transactions h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.transaction-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-amount {
    font-weight: 700;
}

.transaction-amount.positive {
    color: #059669;
}

.transaction-amount.negative {
    color: #dc2626;
}

.account-details, .rib-details {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dark);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.card-display {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: var(--text-dark);
}

.card-display img {
    margin-bottom: 2rem;
}

.card-details {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.rib-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 600px;
    color: var(--text-dark);
}

.loan-info {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-dark);
}

.loan-info img {
    margin-bottom: 1rem;
}

.loan-list {
    margin-top: 2rem;
}

.loan-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.loan-item h4 {
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* Admin tables */
.admin-table {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

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

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

th {
    background: #f3f4f6;
    font-weight: 600;
    color: #1a1a1a;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 0.5rem;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.action-btn:hover {
    opacity: 0.8;
}

.btn-credit {
    background: #10b981;
    color: white;
}

.btn-block {
    background: #f59e0b;
    color: white;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-contact {
    background: #3b82f6;
    color: white;
}

.btn-validate {
    background: #10b981;
    color: white;
}

.btn-reject {
    background: #ef4444;
    color: white;
}

.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.login-box {
    background: var(--card-bg);
    padding: 3.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    max-width: 480px;
    color: var(--text-dark);
}

.login-box h2 {
    margin-bottom: 2.5rem;
    color: var(--text-dark);
    text-align: center;
    font-size: 2rem;
}

.login-help {
    margin-top: 2rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 5px;
    font-size: 0.9rem;
}

.login-help code {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem 0;
    }
    
    .menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .menu-item {
        padding: 0.8rem 1.5rem;
        white-space: nowrap;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
    }
    
    .admin-table {
        overflow-x: auto;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.7rem 0.5rem;
    }
    
    .action-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }
}
