/* General Styles & Fonts */
:root {
    --primary-color: #4CAF50; /* A fresh green for a thrifty, eco-friendly feel */
    --secondary-color: #0e4aa3ea; /* A warm yellow for accents */
    --text-color: #333;
    --light-text-color: #666;
    --background-color: #F8F9FA;
    --card-background: #fff;
    --border-color: #ddd;
    --button-hover: #45a049;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--button-hover);
}

.logo {
    max-width: 150px;
}

/* --- Login Page Styles --- */
.login-container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.login-image-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--card-background);
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: var(--background-color);
}

.logo-container {
    margin-bottom: 20px;
}

.login-form-box {
    background: var(--card-background);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form-box h2 {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.login-form-box p {
    color: var(--light-text-color);
    margin-bottom: 25px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--light-text-color);
}

.remember-me input {
    margin-right: 8px;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-button:hover {
    background-color: var(--button-hover);
}

.forgot-password {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    color: var(--light-text-color);
}

.signup-text {
    margin-top: 20px;
    font-size: 14px;
    color: var(--light-text-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: var(--card-background);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.navbar .logo {
    max-height: 50px;
}




.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
    margin-left: 5px;
}

.nav-links > li > a {
    font-weight: 600;
    color: var(--text-color);
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-links > li > a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Dropdown container */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-background);
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 5px;
    overflow: hidden;
    z-index: 2000;
}

/* Dropdown links */
.dropdown-content a {
    padding: 10px 15px;
    display: block;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Show dropdown on hover */
.nav-links li:hover > .dropdown-content {
    display: block;
}

.member-details-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

.member-details-container h1 {
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.profile-card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.profile-header {
    margin-bottom: 25px;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 15px;
}

.profile-card h3 {
    font-weight: 600;
    margin-bottom: 5px;
}

.profile-card p {
    color: var(--light-text-color);
    font-size: 14px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto 25px auto;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--border-color);
}

.detail-item span:first-child {
    font-weight: 600;
}

.edit-profile-button {
    padding: 10px 25px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-profile-button:hover {
    background-color: #ffc82d;
}

.recent-activity {
    text-align: left;
}

.recent-activity h2 {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 5px;
}

.recent-activity ul {
    list-style: none;
}

.recent-activity li {
    background: var(--card-background);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.recent-activity li a {
    color: var(--text-color);
    display: block;
}

.recent-activity li a:hover {
    color: var(--primary-color);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {

    .login-container {
        flex-direction: column;
    }

    .login-image-section {
        display: none; /* Hide image on smaller screens */
    }

    .login-form-section {
        width: 100%;
        padding: 20px;
    }

    .login-form-box {
        padding: 30px 20px;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }


    .member-details-container {
        padding: 20px;
        margin: 20px auto;
    }


    .navbar-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--primary-color); /* Change the color to be visible */
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    .nav-links {
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-links li {
        margin-left: 0;
        width: 100%;
    }
    .dropdown-content {
        position: static;
        box-shadow: none;
        border-radius: 0;
        min-width: unset;
    }
    .dropdown-content a {
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links li:hover > .dropdown-content {
        display: block;
    }
}
/* --- Member List Page Styles --- */
.members-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.members-container h1 {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.members-table-wrapper {
    background: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
    overflow-x: auto;
}

.members-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.members-table-wrapper th, .members-table-wrapper td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.members-table-wrapper th {
    font-weight: 600;
    color: var(--light-text-color);
    text-transform: uppercase;
    font-size: 14px;
}

.members-table-wrapper tr:last-child td {
    border-bottom: none;
}

.status-active {
    color: #198754;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.savings-amount {
    font-weight: 600;
}

/* Media Queries for responsiveness */
@media (max-width: 600px) {
    .members-table-wrapper table {
        font-size: 14px;
    }

    .members-table-wrapper th, .members-table-wrapper td {
        padding: 10px;
    }
}

/* --- Shared Page and Form Styles --- */
.page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

.form-page {
    max-width: 600px;
}

.form-card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
    text-align: left;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
}

.primary-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.primary-button:hover {
    background-color: var(--button-hover);
}

.history-table-wrapper {
    background: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
    overflow-x: auto;
}

.history-table-wrapper h2 {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-align: left;
}

.history-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.history-table-wrapper th, .history-table-wrapper td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.history-table-wrapper th {
    font-weight: 600;
    color: var(--light-text-color);
    text-transform: uppercase;
    font-size: 14px;
}

.history-table-wrapper tr:last-child td {
    border-bottom: none;
}

.status-success {
    color: #198754;
    font-weight: 600;
}

.status-pending {
    color: #ffc107;
    font-weight: 600;
}

.type-credit {
    color: #198754;
}

.type-debit {
    color: #dc3545;
}

.amount-positive {
    color: #198754;
    font-weight: 600;
}

.amount-negative {
    color: #dc3545;
    font-weight: 600;
}

/* Ensure these are in your stats grid section */
.stat-card .icon.fa-wallet,
.stat-card .icon.fa-coins,
.stat-card .icon.fa-calendar-alt {
    font-size: 3rem;
    color: var(--primary-color);
}


.accordion {
    margin-bottom: 1rem;
}

.accordion-header {
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f1f3f5;
}

.accordion-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.accordion-header .more-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.accordion-header .more-button:hover {
    background-color: var(--secondary-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--card-background);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.accordion-content.active {
    max-height: 1000px;
    padding: 1rem;
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
    .page-container {
        padding: 10px;
        margin: 20px auto;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-card .icon {
        font-size: 2rem;
    }
}

/* --- Small Button Styles --- */
.btn-small {
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Success small button */
.btn-small.success {
    background-color: #4CAF50;
    color: #fff !important;
}
.btn-small.success:hover {
    background-color: #157347;
    color: #fff;
}

/* Warning small button */
.btn-small.warning {
    background-color: #ffc107;
    color: #000;
}
.btn-small.warning:hover {
    background-color: #e0a800;
}

/* Danger small button */
.btn-small.danger {
    background-color: #dc3545;
    color: #fff;
}
.btn-small.danger:hover {
    background-color: #bb2d3b;
}

.btn-small.secondary {
    background-color: #0b64e9ea;
    color: #fff;
}
.btn-small.secondary:hover {
    background-color: #0e4aa3ea;
}

.danger-row{
    background-color: #dc3545;
}
.success-row{
    background-color: #198754;
}

.error{
    color: #dc3545 !important;
}
.success{
    color:#198754 !important;
}

h1{
    color:#198754;
}



/* --- Stylish Details Card --- */
.details-card {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Stronger, more modern shadow */
    margin-bottom: 2rem;
    border: 1px solid #e9ecef; /* Subtle border for definition */
}

.details-card h2 {
    font-weight: 600;
    font-size: 1.75rem;
    color: var(--secondary-color); /* Use a vibrant color for the title */
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color); /* A fresh, clean divider */
    padding-bottom: 0.75rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem 1.5rem; /* Increased gap for better spacing */
}

.detail-item {
    /* Flexbox for clean vertical alignment */
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-weight: 600;
    color: var(--light-text-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    position: relative;
    padding-left: 20px; /* Space for the icon */
}

.detail-item label::before {
    content: '▶'; /* A simple, elegant arrow icon */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: bold;
}

.detail-item p {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
    word-break: break-word;
}

/* Status badges for a more polished look */
.status-active, .status-inactive {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px; /* Pill-shaped */
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.status-active {
    color: #157347;
    background-color: #e2f4e5;
}

.status-inactive {
    color: #dc3545;
    background-color: #fbe6e8;
}

/* Enhanced Table and Button Styles for consistency */
.table-wrapper {
    margin-top: 2.5rem;
}

.data-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-table th, .data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8f9fa;
    color: var(--light-text-color);
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.data-table tbody tr:hover {
    background-color: #f1f3f5;
}

.btn-small.warning {
    background-color: #ffc107;
    color: #212529; /* Darker text for readability on yellow */
}

.btn-small.warning:hover {
    background-color: #e0a800;
}



/* --- New Layout Container --- */
.main-content {
    padding: 2.5rem;
    max-width: 1400px; /* Wider container for the new layout */
    margin: 0 auto;
}

.member-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 1rem;
}

.member-profile-header h1 {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.member-profile-header .welcome-text {
    flex-grow: 1; /* Pushes the buttons to the right */
    font-size: 1.2rem;
    color: var(--light-text-color);
    margin-left: 1rem;
    font-style: normal;
}

.member-actions {
    display: flex;
    gap: 1rem;
}

.details-layout-container {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 1/3 sidebar, 2/3 main content */
    gap: 2rem;
}

.sidebar-details-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.details-card-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.content-tables {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- Re-using and adjusting existing styles --- */
.details-card-section h2 {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item label {
    font-weight: 600;
    color: var(--light-text-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.detail-item p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    word-break: break-word;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    margin: 0;
}

.table-header .more-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.table-header .more-button:hover {
    background-color: var(--secondary-color);
}

/* You can keep the status-active/inactive and button styles as they are. */

/* --- Media Queries for responsiveness --- */
@media (max-width: 992px) {
    .details-layout-container {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
}