/* =========================
   RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Poppins",sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    background:linear-gradient(135deg,#4facfe,#00f2fe);
    min-height:100vh;
    color:#222;
}

/* =========================
   LOGIN PAGE
========================= */

.login-page{
    width:100%;
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.login-box{
    width:100%;
    max-width:420px;
    background:#fff;
    padding:35px;
    border-radius:20px;
    box-shadow:0 15px 40px rgba(0,0,0,.2);
}

.login-box h1{
    text-align:center;
    margin-bottom:10px;
    color:#0077ff;
}

.login-box p{
    text-align:center;
    margin-bottom:25px;
    color:#666;
}

.login-box input{
    width:100%;
    padding:14px;
    margin-bottom:15px;
    border:1px solid #ccc;
    border-radius:10px;
    font-size:16px;
    outline:none;
    transition:.3s;
}

.login-box input:focus{
    border-color:#0077ff;
    box-shadow:0 0 8px rgba(0,119,255,.25);
}

.remember{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:20px;
    font-size:15px;
}

#loginBtn{
    width:100%;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#0077ff;
    color:#fff;
    font-size:17px;
    cursor:pointer;
    transition:.3s;
}

#loginBtn:hover{
    background:#005fd1;
}

/* =========================
   MAIN APP
========================= */

#app{
    max-width:1400px;
    margin:25px auto;
    padding:20px;
}

/* =========================
   HEADER
========================= */

header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#fff;
    padding:18px 25px;
    border-radius:15px;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
    margin-bottom:25px;
}

header h1{
    font-size:28px;
    color:#0077ff;
}

#logoutBtn{
    background:#ff3b3b;
    color:#fff;
    border:none;
    padding:12px 20px;
    border-radius:8px;
    cursor:pointer;
    transition:.3s;
}

#logoutBtn:hover{
    background:#d60000;
}

/* =========================
   DASHBOARD
========================= */

.dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-bottom:30px;
}

.card{
    background:#fff;
    padding:25px;
    border-radius:15px;
    text-align:center;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    transition:.3s;
}

.card:hover{
    transform:translateY(-5px);
}

.card h3{
    color:#555;
    margin-bottom:12px;
    font-size:18px;
}

.card h2{
    color:#0077ff;
    font-size:30px;
}
/* =========================
   SECTION TITLE
========================= */

.section-title{
    margin:30px 0 15px;
}

.section-title h2{
    color:#fff;
    font-size:26px;
    font-weight:600;
}

/* =========================
   MEMBER SECTION
========================= */

.member-section{
    background:#ffffff;
    padding:25px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    margin-bottom:25px;
}

.member-controls{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.member-controls input{
    flex:1;
    min-width:220px;
    padding:12px;
    border:1px solid #ccc;
    border-radius:10px;
    font-size:16px;
    outline:none;
}

.member-controls input:focus{
    border-color:#0077ff;
}

#addMemberBtn{
    background:#28a745;
    color:#fff;
    border:none;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
}

#addMemberBtn:hover{
    background:#218838;
}

.member-list{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:20px;
}

.member-card{
    display:flex;
    align-items:center;
    gap:10px;
    background:#f5f5f5;
    padding:10px 15px;
    border-radius:30px;
    box-shadow:0 3px 8px rgba(0,0,0,.08);
}

.member-card button{
    background:#ff3b3b;
    color:#fff;
    border:none;
    border-radius:50%;
    width:28px;
    height:28px;
    cursor:pointer;
}

/* =========================
   EXPENSE SECTION
========================= */

.expense-section{
    background:#fff;
    padding:25px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    margin-bottom:30px;
}

.expense-form{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:15px;
}

.expense-form input,
.expense-form select,
.expense-form textarea{
    width:100%;
    padding:12px;
    border:1px solid #ccc;
    border-radius:10px;
    font-size:15px;
    outline:none;
    transition:.3s;
}

.expense-form input:focus,
.expense-form select:focus,
.expense-form textarea:focus{
    border-color:#0077ff;
    box-shadow:0 0 8px rgba(0,119,255,.2);
}

.expense-form textarea{
    resize:vertical;
    min-height:90px;
    grid-column:1/-1;
}

/* =========================
   BUTTON GROUP
========================= */

.button-group{
    display:flex;
    gap:15px;
    grid-column:1/-1;
    flex-wrap:wrap;
}

#saveExpenseBtn{
    background:#0077ff;
    color:#fff;
    border:none;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
}

#saveExpenseBtn:hover{
    background:#005fd1;
}

#resetExpenseBtn{
    background:#6c757d;
    color:#fff;
    border:none;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
}

#resetExpenseBtn:hover{
    background:#545b62;
}
/* =========================
   EXPENSE TABLE SECTION
========================= */

.expense-list-section{
    background:#ffffff;
    padding:25px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    margin-bottom:30px;
}

/* =========================
   SEARCH & FILTER
========================= */

.table-tools{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:20px;
}

.table-tools input,
.table-tools select{
    flex:1;
    min-width:220px;
    padding:12px;
    border:1px solid #ccc;
    border-radius:10px;
    outline:none;
    font-size:15px;
}

.table-tools input:focus,
.table-tools select:focus{
    border-color:#0077ff;
    box-shadow:0 0 8px rgba(0,119,255,.2);
}

#showMonthBtn{
    background:#17a2b8;
    color:#fff;
    border:none;
    padding:12px 18px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
}

#showMonthBtn:hover{
    background:#138496;
}

#deleteMonthBtn{
    background:#dc3545;
    color:#fff;
    border:none;
    padding:12px 18px;
    border-radius:10px;
    cursor:pointer;
    transition:.3s;
}

#deleteMonthBtn:hover{
    background:#b52b38;
}

/* =========================
   TABLE
========================= */

.table-container{
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:1100px;
}

table thead{
    background:#0077ff;
    color:#fff;
}

table th{
    padding:15px;
    text-align:center;
    font-size:15px;
}

table td{
    padding:14px;
    text-align:center;
    border-bottom:1px solid #e8e8e8;
    background:#fff;
}

table tbody tr:nth-child(even){
    background:#f8f9fa;
}

table tbody tr:hover{
    background:#eef6ff;
    transition:.3s;
}

/* =========================
   ACTION BUTTONS
========================= */

.edit-btn{
    background:#ffc107;
    color:#000;
    border:none;
    padding:8px 12px;
    border-radius:8px;
    cursor:pointer;
    transition:.3s;
}

.edit-btn:hover{
    background:#e0a800;
}

.delete-btn{
    background:#dc3545;
    color:#fff;
    border:none;
    padding:8px 12px;
    border-radius:8px;
    cursor:pointer;
    transition:.3s;
}

.delete-btn:hover{
    background:#b52b38;
}

/* =========================
   STATUS COLORS
========================= */

.paid{
    color:#28a745;
    font-weight:600;
}

.pending{
    color:#dc3545;
    font-weight:600;
}

.balance{
    color:#0077ff;
    font-weight:600;
}
/* =========================
   SUMMARY SECTION
========================= */

.summary-section{
    background:#fff;
    padding:25px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    margin-bottom:30px;
}

.summary-cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
}

.summary-card{
    background:linear-gradient(135deg,#0077ff,#00b4ff);
    color:#fff;
    padding:25px;
    border-radius:15px;
    text-align:center;
    transition:.3s;
}

.summary-card:hover{
    transform:translateY(-5px);
}

.summary-card h3{
    margin-bottom:10px;
    font-size:18px;
}

.summary-card h2{
    font-size:30px;
}

/* =========================
   MEMBER REPORT
========================= */

.report-section{
    background:#fff;
    padding:25px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    margin-bottom:30px;
}

.member-report{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.report-card{
    background:#f8f9fa;
    border-left:5px solid #0077ff;
    border-radius:12px;
    padding:18px;
}

.report-card h3{
    color:#0077ff;
    margin-bottom:12px;
}

.report-card p{
    margin:8px 0;
    font-size:15px;
}

/* =========================
   SETTLEMENT
========================= */

.settlement-section{
    background:#fff;
    padding:25px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
    margin-bottom:30px;
}

.settlement-box{
    background:#f8f9fa;
    padding:20px;
    border-radius:12px;
    line-height:2;
    font-size:17px;
    border-left:5px solid #28a745;
}

/* =========================
   ACTION BUTTONS
========================= */

.action-section{
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    justify-content:center;
    margin-bottom:30px;
}

.action-section button{
    border:none;
    border-radius:10px;
    padding:12px 20px;
    color:#fff;
    cursor:pointer;
    font-size:15px;
    transition:.3s;
}

#printBtn{
    background:#0077ff;
}

#downloadPdfBtn{
    background:#dc3545;
}

#downloadExcelBtn{
    background:#28a745;
}

#backupBtn{
    background:#6f42c1;
}

#restoreBtn{
    background:#17a2b8;
}

#clearAllBtn{
    background:#343a40;
}

.action-section button:hover{
    transform:scale(1.05);
    opacity:.9;
}
/* =========================
   FOOTER
========================= */

footer{
    margin-top:40px;
    background:#ffffff;
    border-radius:15px;
    padding:20px;
    text-align:center;
    box-shadow:0 8px 20px rgba(0,0,0,.1);
}

footer p{
    color:#555;
    margin:5px 0;
    font-size:15px;
}

/* =========================
   BUTTON ANIMATION
========================= */

button{
    transition:all .3s ease;
}

button:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 18px rgba(0,0,0,.15);
}

/* =========================
   INPUT ANIMATION
========================= */

input,
select,
textarea{
    transition:.3s;
}

input:focus,
select:focus,
textarea:focus{
    outline:none;
    transform:scale(1.01);
}

/* =========================
   DARK MODE
========================= */

body.dark{
    background:#121212;
    color:#fff;
}

body.dark header,
body.dark footer,
body.dark .card,
body.dark .member-section,
body.dark .expense-section,
body.dark .expense-list-section,
body.dark .summary-section,
body.dark .report-section,
body.dark .settlement-section,
body.dark .login-box{
    background:#1f1f1f;
    color:#fff;
}

body.dark input,
body.dark select,
body.dark textarea{
    background:#2b2b2b;
    color:#fff;
    border:1px solid #555;
}

body.dark table td{
    background:#222;
    color:#fff;
}

body.dark table thead{
    background:#0056b3;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar{
    width:10px;
    height:10px;
}

::-webkit-scrollbar-track{
    background:#ddd;
}

::-webkit-scrollbar-thumb{
    background:#0077ff;
    border-radius:10px;
}

::-webkit-scrollbar-thumb:hover{
    background:#0056b3;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:992px){

header{
    flex-direction:column;
    gap:15px;
    text-align:center;
}

.dashboard{
    grid-template-columns:repeat(2,1fr);
}

.summary-cards{
    grid-template-columns:repeat(2,1fr);
}

.member-report{
    grid-template-columns:1fr;
}

}

@media(max-width:768px){

.dashboard,
.summary-cards{
    grid-template-columns:1fr;
}

.member-controls{
    flex-direction:column;
}

.button-group{
    flex-direction:column;
}

.table-tools{
    flex-direction:column;
}

.action-section{
    flex-direction:column;
}

.action-section button{
    width:100%;
}

header h1{
    font-size:22px;
}

.card h2,
.summary-card h2{
    font-size:24px;
}

}

@media(max-width:480px){

body{
    padding:10px;
}

#app{
    padding:10px;
}

.login-box{
    padding:20px;
}

.section-title h2{
    font-size:20px;
}

table{
    min-width:900px;
}

}