/* Universal Font Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;700&display=swap');

/* --- USER FACING APP STYLES --- */

body {
    font-family: 'Noto Sans Bengali', sans-serif;
    background-color: #e9ebee;
    margin: 0;
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Main mobile screen frame */
.mobile-frame {
    width: 100%;
    max-width: 420px;
    background-color: #f4f6f9;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    height: 90vh; 
    max-height: 850px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    background: linear-gradient(to right, #FF4B2B, #FF416C);
    height: 35px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin: -15px -15px 0 -15px; /* Adjust to sit at the very top */
    flex-shrink: 0;
}

/* Fixed Headers */
.dashboard-header, .page-header {
    flex-shrink: 0;
    padding: 0 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 10;
    background-color: #f4f6f9;
}
.dashboard-header {
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-header {
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 15px;
}

/* Scrollable Content Area */
.dashboard-main, .page-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 15px;
}

/* Header Elements */
.greeting p { margin: 0; color: #666; font-size: 16px; }
.greeting h3 { margin: 0; color: #111; font-size: 20px; }
.user-avatar {
    width: 50px; height: 50px; border-radius: 50%; background: #FF416C;
    display: flex; justify-content: center; align-items: center;
    font-size: 24px; font-weight: bold; color: white;
}
.back-btn { font-size: 20px; color: #333; text-decoration: none; }
.page-header h3 { flex-grow: 1; margin: 0; font-size: 20px; padding-right: 20px; }

/* Dashboard Components */
.balance-card {
    background: linear-gradient(90deg, #8E2DE2, #4A00E0); color: white;
    padding: 25px; border-radius: 20px; display: flex;
    justify-content: space-between; align-items: center; margin: 0 0 25px 0;
}
.balance-info p { margin: 0; font-size: 16px; opacity: 0.9; }
.balance-info h2 { margin: 5px 0 0; font-size: 32px; }
.refresh-icon i { font-size: 20px; cursor: pointer; opacity: 0.8; }
.actions-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 15px; margin-bottom: 30px;
}
.action-item { text-align: center; text-decoration: none; color: #333; }
.action-item .icon-bg {
    width: 60px; height: 60px; background-color: #ffffff; border-radius: 15px;
    margin: 0 auto 8px; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.action-item .icon-bg i { font-size: 24px; color: #8E2DE2; }
.action-item span { font-size: 14px; font-weight: 500; display: block; color: #555; }
.transactions-section { margin-bottom: 20px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.section-header h4 { margin: 0; font-size: 18px; color: #333; }
.section-header a { text-decoration: none; color: #FF416C; font-weight: bold; font-size: 14px; }
.transaction-item {
    background: #fff; padding: 15px; border-radius: 15px;
    display: flex; align-items: center; margin-bottom: 10px;
}
.transaction-icon {
    width: 45px; height: 45px; background: rgba(255, 65, 108, 0.1);
    color: #FF416C; border-radius: 50%; display: flex; justify-content: center;
    align-items: center; font-size: 18px; margin-right: 15px;
}
.transaction-details { flex-grow: 1; }
.transaction-details p { margin: 0; font-weight: bold; }
.transaction-details span { font-size: 12px; color: #777; }
.transaction-amount p { margin: 0; font-weight: bold; color: #FF416C; }

/* Fixed Bottom Navigation */
.bottom-nav {
    background: #ffffff; display: flex; justify-content: space-around;
    padding: 10px 0; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    flex-shrink: 0; z-index: 1000;
}
.nav-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #999; flex: 1; }
.nav-item.active { color: #FF416C; }
.nav-item i { font-size: 22px; margin-bottom: 5px; }
.nav-item span { font-size: 12px; font-weight: 500; }

/* Auth Pages (Login/Register) */
.auth-container {
    padding: 30px 20px; background-color: #ffffff; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); width: 100%;
    max-width: 360px; margin: auto; box-sizing: border-box;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.auth-container h2 { text-align: center; color: #333; margin-bottom: 30px; font-size: 24px; }
.message { text-align: center; margin-top: 20px; font-size: 14px; color: #666; }
.message a { color: #4A00E0; text-decoration: none; font-weight: bold; }

/* Shared Form & Button Styles */
.form-container { background: #ffffff; padding: 20px; border-radius: 20px; margin-bottom: 20px; }
.form-container .form-title, .form-label { font-size: 16px; color: #666; margin-bottom: 10px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; }
.input-group input, .input-group select {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px;
    box-sizing: border-box; font-size: 16px;
}
.btn {
    width: 100%; padding: 14px; border: none; border-radius: 8px;
    background: linear-gradient(90deg, #8E2DE2, #4A00E0); color: white;
    font-size: 16px; font-weight: bold; cursor: pointer;
    transition: transform 0.2s; box-shadow: 0 4px 10px rgba(74, 0, 224, 0.3);
}
.btn:hover { transform: translateY(-2px); }
.message-box { padding: 15px; margin-bottom: 20px; border-radius: 8px; text-align: center; font-weight: 500; }
.message-box.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message-box.error, .error-message { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Page Specific Styles: Recharge, Cashout, Payment, Add Money etc. */
.tabs { display: flex; margin-bottom: 20px; }
.tab-btn { flex: 1; padding: 10px; font-size: 16px; border: none; background-color: #f0f0f0; cursor: pointer; }
.tab-btn.active { background-color: #8E2DE2; color: white; }
.tab-btn:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.tab-btn:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.balance-display { text-align: center; margin-bottom: 15px; font-size: 16px; color: #555; }
.balance-display span { font-weight: bold; color: #111; }
.method-selector { display: flex; gap: 10px; margin-bottom: 20px; }
.method-btn { flex: 1; padding: 10px; font-size: 16px; border-radius: 8px; cursor: pointer; border: 1px solid #ddd; background-color: #f9f9f9; color: #333; font-weight: 500; }
.method-btn.active { background-color: #8E2DE2; color: white; border-color: #8E2DE2; }
.qr-section { background: #fff; border-radius: 12px; padding: 20px; text-align: center; color: #555; border: 1px dashed #ddd; margin-bottom: 20px; cursor: pointer; }
.qr-section i { font-size: 40px; margin-bottom: 10px; color: #4A00E0; }
.separator { text-align: center; color: #888; margin-bottom: 20px; }
.instruction-box { background-color: #fff3cd; color: #856404; padding: 15px; border-radius: 12px; margin-bottom: 20px; border: 1px solid #ffeeba; }
.instruction-box h4, .payment-numbers-box h4 { margin-top: 0; margin-bottom: 10px; }
.instruction-box ol { padding-left: 20px; margin: 0; }
.payment-numbers-box { background: #fff; padding: 20px; border-radius: 12px; margin-bottom: 20px; }
.number-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #f0f0f0; }
.number-item:last-child { border-bottom: none; }
.method-name { font-weight: bold; color: #4A00E0; }
.account-number { font-size: 16px; color: #333; }
.account-type { font-size: 12px; color: #777; }
.input-group select { appearance: none; background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'); background-repeat: no-repeat; background-position: right 1rem center; background-size: .65em auto; }

/* PIN Modal */
.pin-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: none; justify-content: center; align-items: center; z-index: 2000; }
.pin-modal-content { background: #fff; padding: 25px; border-radius: 16px; text-align: center; width: 90%; max-width: 320px; }
.pin-modal-content h4 { margin-top: 0; font-size: 18px; }
.pin-modal-content p { color: #555; margin-bottom: 20px; }
.pin-inputs { display: flex; justify-content: center; gap: 10px; margin-bottom: 25px; }
.pin-box { width: 45px; height: 45px; text-align: center; font-size: 20px; border: 1px solid #ccc; border-radius: 8px; -webkit-text-security: disc; }


/* --- ADMIN PANEL STYLES --- */

:root {
    --primary-color: #2c3e50; --secondary-color: #34495e;
    --accent-color: #3498db; --light-gray: #ecf0f1;
    --text-color: #333; --white-color: #ffffff;
    --success-color: #2ecc71; --danger-color: #e74c3c; --warning-color: #f39c12;
}
.wrapper { display: flex; }
.sidebar {
    width: 250px; background: var(--primary-color); color: var(--white-color);
    height: 100vh; position: fixed; transition: all 0.3s;
}
.sidebar-header { padding: 20px; background: var(--secondary-color); text-align: center; }
.sidebar-header h3 { margin: 0; font-size: 22px; }
.sidebar ul { list-style: none; padding: 0; }
.sidebar ul li a {
    padding: 15px 20px; display: block; color: var(--light-gray); text-decoration: none;
    border-left: 3px solid transparent; transition: all 0.2s;
}
.sidebar ul li a i { margin-right: 10px; }
.sidebar ul li a:hover, .sidebar ul li.active a {
    background: var(--secondary-color); border-left-color: var(--accent-color); color: var(--white-color);
}
.main-content { width: 100%; padding-left: 250px; transition: all 0.3s; }
.header {
    background: var(--white-color); padding: 10px 30px; display: flex;
    justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.header h2 { margin: 0; color: var(--primary-color); font-size: 24px; }
.header a { color: var(--primary-color); text-decoration: none; font-weight: bold; }
.content-body { padding: 30px; }
.card {
    background: var(--white-color); border-radius: 8px; padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 30px;
}
.card-header h3 {
    margin-top: 0; margin-bottom: 20px; color: var(--primary-color);
    border-bottom: 1px solid var(--light-gray); padding-bottom: 15px;
}
table.responsive-table { width: 100%; border-collapse: collapse; }
.responsive-table thead { background-color: var(--light-gray); }
.responsive-table th, .responsive-table td { padding: 12px 15px; border-bottom: 1px solid #ddd; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; }
.btn.admin { background-color: var(--accent-color); color: var(--white-color); padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.2s; }
.btn.admin:hover { background-color: #2980b9; }
.login-wrapper { height: 100vh; display: flex; justify-content: center; align-items: center; }
.login-box { width: 100%; max-width: 400px; padding: 40px; }
.status { padding: 5px 10px; border-radius: 15px; color: var(--white-color); font-size: 12px; font-weight: bold; }
.status-pending { background-color: var(--warning-color); }
.status-approved, .status-completed { background-color: var(--success-color); }
.status-rejected { background-color: var(--danger-color); }
.action-links a { text-decoration: none; margin-right: 8px; font-weight: bold; }
.action-links .approve-link { color: var(--success-color); }
.action-links .reject-link { color: var(--danger-color); }
.action-links .edit-link { color: var(--accent-color); }
.action-links .delete-link { color: var(--danger-color); }

/* Admin Responsive (Mobile Friendly) Styles */
@media (max-width: 768px) {
    .sidebar { left: -250px; }
    .main-content { padding-left: 0; }
    .header { position: relative; }
    .mobile-menu-toggle { display: block; cursor: pointer; font-size: 24px; }
    .sidebar.active { left: 0; }
    .responsive-table thead { display: none; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
    .responsive-table tr { margin-bottom: 15px; border: 1px solid #ddd; border-radius: 5px; padding: 10px; }
    .responsive-table td { text-align: right; padding-left: 50%; position: relative; border-bottom: none; }
    .responsive-table td::before { content: attr(data-label); position: absolute; left: 10px; width: calc(50% - 20px); padding-right: 10px; text-align: left; font-weight: bold; }
    .action-links { text-align: right; }
}

/* --- Profile Page Styles --- */
.profile-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}
.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #FF416C;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    font-weight: bold;
    color: white;
    margin: 0 auto 15px;
}
.profile-info-card h3 { margin: 0 0 5px 0; }
.profile-info-card p { margin: 0; color: #666; }

/* --- Updated Transaction Item Styles --- */
.transaction-icon.icon-out {
    background: rgba(255, 65, 108, 0.1);
    color: #FF416C; /* Red for money out */
}
.transaction-icon.icon-in {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71; /* Green for money in */
}
.transaction-amount .amount-out {
    color: #FF416C; /* Red */
}
.transaction-amount .amount-in {
    color: #2ecc71; /* Green */
}



/* --- Transaction History Filter Styles --- */
.filter-container {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.filter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
.filter-form .form-group {
    margin-bottom: 0;
}
.filter-form label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}
.filter-buttons {
    display: flex;
    gap: 10px;
}
.btn-filter, .btn-clear {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}
.btn-filter {
    background-color: var(--primary-color, #2c3e50); /* Fallback color */
    color: white;
    border: none;
}
.btn-clear {
    background-color: var(--light-gray, #ecf0f1); /* Fallback color */
    color: var(--text-color, #333);
    border: 1px solid #ddd;
}
.no-results {
    text-align: center;
    padding: 30px;
    color: #777;
}

/* Responsive layout for filter form on larger screens */
@media (min-width: 400px) {
    .filter-form {
        grid-template-columns: 1fr 1fr;
    }
    .filter-form .form-group:first-child {
        grid-column: 1 / -1; /* Make type selector full width */
    }
}


/* --- Loan Page Specific Styles --- */
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

/* --- Notification System Styles --- */
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.notification-bell {
    position: relative;
    font-size: 24px;
    color: #555;
    text-decoration: none;
}
.unread-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.notification-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}
.notification-item:hover {
    background-color: #f8f9fa;
}
.notification-icon {
    font-size: 20px;
    color: var(--primary-color, #2c3e50);
    margin-right: 15px;
}
.notification-content p {
    margin: 0 0 5px 0;
    font-weight: 500;
}
.notification-content small {
    color: #777;
}