/* ===== GLOBAL ===== */

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    padding:0;
    overflow-x:hidden;
    font-family:Arial, sans-serif;
    background:#f4f6f9;
}

/* ===== CONTAINER ===== */

.container{
    width:100%;
    max-width:1000px;
    margin:30px auto;
    padding:0 10px;
}

/* ===== CARD ===== */

.card{
    background:#fff;
    padding:20px;
    margin-bottom:20px;
    border-radius:10px;
}

/* ===== TITLE ===== */

h2{
    margin-top:0;
}

/* ===== FORM ===== */

form{
    display:flex;
    flex-direction:column;
    gap:12px;
}

input,
select,
button{
    width:100%;
    padding:12px;
    font-size:16px;
    border-radius:8px;
    border:1px solid #ddd;
}

select{
    appearance:none;
}

button{
    background:#2563eb;
    color:white;
    border:none;
    cursor:pointer;
}

/* ===== TABLE ===== */

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

table th,
table td{
    padding:10px;
    border-bottom:1px solid #ddd;
    text-align:left;
    word-break:break-word;
}

/* ===== TABLE SCROLL ===== */

.table-scroll{
    width:100%;
    max-width:100%;

    overflow-x:auto;
    overflow-y:auto;

    max-height:600px;

    border-radius:10px;
}

.table-scroll thead th{
    position:sticky;
    top:0;
    background:white;
    z-index:5;
}

/* ===== BADGES ===== */

.badge-income{
    color:#16a34a;
    font-weight:bold;
}

.badge-expense{
    color:#dc2626;
    font-weight:bold;
}

/* ===== LOGIN ===== */

.login-wrapper{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    background:linear-gradient(135deg,#2563eb,#1e3a8a);
}

.login-card{
    width:100%;
    max-width:420px;
    background:white;
    padding:30px;
    border-radius:14px;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
}

/* ===== LAYOUT ===== */

.topbar{
    position:fixed;
    top:0;
    left:0;

    width:100%;
    height:60px;

    background:#1e293b;
    color:white;

    display:flex;
    align-items:center;

    padding:0 20px;

    box-sizing:border-box;

    z-index:1000;
}

.logo{
    font-weight:bold;
    font-size:18px;
}

.main{
    display:flex;
}

/* ===== SIDEBAR ===== */

.sidebar{
    width:220px;
    min-width:220px;

    background:#0f172a;

    min-height:100vh;

    margin-top:60px;
}

.sidebar a{
    display:block;
    padding:12px 20px;
    color:#cbd5e1;
    text-decoration:none;
}

.sidebar a:hover{
    background:#1e293b;
    color:white;
}

/* ===== CONTENT ===== */

.content{
    flex:1;
    min-width:0;

    width:100%;

    padding:20px;

    margin-top:60px;
}

/* ===== DASHBOARD ===== */

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
}

.card-box{
    padding:20px;
    border-radius:12px;
    color:white;
}

.card-box h3{
    margin:0;
    font-size:16px;
}

.card-box .value{
    margin-top:10px;
    font-size:26px;
    font-weight:bold;
}

.card-blue{
    background:linear-gradient(135deg,#3b82f6,#1d4ed8);
}

.card-green{
    background:linear-gradient(135deg,#22c55e,#15803d);
}

.card-red{
    background:linear-gradient(135deg,#ef4444,#b91c1c);
}

.card-purple{
    background:linear-gradient(135deg,#a855f7,#6b21a8);
}

/* ===== TOAST ===== */

.toast{
    position:fixed;
    top:70px;
    right:20px;

    padding:12px 18px;

    border-radius:8px;

    color:white;

    opacity:0;
    transform:translateY(-20px);

    transition:.4s;

    z-index:9999;
}

.toast.show{
    opacity:1;
    transform:translateY(0);
}

.toast.success{
    background:#16a34a;
}

.toast.error{
    background:#dc2626;
}

/* ===== MOBILE NAV ===== */

.bottom-nav{
    display:none;

    position:fixed;
    bottom:0;
    left:0;

    width:100%;
    height:60px;

    background:#0f172a;

    justify-content:space-around;
    align-items:center;

    z-index:999;
}

.bottom-nav a{
    color:#cbd5e1;
    text-decoration:none;
    font-size:20px;
}

.bottom-nav a:hover{
    color:white;
}

.add-btn{
    width:50px;
    height:50px;

    border-radius:50%;

    background:#22c55e;
    color:white !important;

    display:flex !important;
    justify-content:center;
    align-items:center;

    margin-top:-20px;
}

/* ===== TOPBAR RIGHT ===== */

.topbar-right{
    margin-left:auto;
}

.topbar-right a{
    color:white;
    text-decoration:none;
    font-size:14px;
}

/* ===== MOBILE TRANSACTION LIST ===== */

.mobile-list{
    display:none;
}

/* ===== MODAL ===== */

.modal{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,0.5);

    display:none;
    justify-content:center;
    align-items:center;

    padding:20px;

    z-index:99999;
}

.modal.show{
    display:flex;
}

.modal-content{
    width:100%;
    max-width:400px;

    background:white;

    padding:20px;

    border-radius:14px;
}

.modal-content h3{
    margin-top:0;
}

/* ===== ACCORDION ===== */

.accordion-title{
    font-size:18px;
    font-weight:bold;

    cursor:pointer;

    display:flex;
    justify-content:space-between;
    align-items:center;
}

.accordion-body{
    margin-top:15px;
}

@media (max-width:768px){

    .accordion-body{
        display:none;
    }

    .accordion-body.show{
        display:block;
    }

}
/* ===== MOBILE ===== */

@media (max-width:768px){

    .topbar-right{
        display:none;
    }

    .sidebar{
        display:none;
    }

    .bottom-nav{
        display:flex;
    }

    .content{
        padding:10px;
        padding-bottom:80px;
    }

    .container{
        margin:0;
        padding:10px;
    }

    .card{
        padding:15px;
    }

    .login-card{
        padding:20px;
    }

    /* TABLE HIDE */

    .table-scroll{
        display:none;
    }

    /* MOBILE CARDS */

    .mobile-list{
        display:flex;
        flex-direction:column;
        gap:12px;
		 max-height:500px;
    overflow-y:auto;
    }

    .mobile-item{
        background:white;

        padding:14px;

        border-radius:12px;

        box-shadow:0 2px 10px rgba(0,0,0,0.05);

        cursor:pointer;
    }

    .mobile-item-top{
        display:flex;
        justify-content:space-between;
        align-items:center;

        margin-bottom:8px;
    }

    .mobile-item-category{
        font-size:15px;
        font-weight:bold;
    }

    .mobile-item-amount{
        font-size:16px;
        font-weight:bold;
    }

}
/* ===== MODERN LOGIN ===== */

.modern-login-body{
    margin:0;
    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    padding:20px;

    background:
    linear-gradient(
    135deg,
    #1e293b,
    #0f172a
    );
}

.modern-login-box{
    width:100%;
    max-width:380px;

    background:white;

    padding:40px 35px;

    border-radius:16px;

    box-shadow:
    0 25px 60px rgba(0,0,0,.35);

    text-align:center;
}

.modern-login-logo{
    margin-bottom:20px;
}

.modern-login-logo img{
    width:190px;
    height:auto;
}

.modern-login-box h1{
    margin:0 0 30px;

    font-size:20px;
    font-weight:600;

    color:#1e293b;
}

.modern-login-box form{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.modern-login-box input[type="text"],
.modern-login-box input[type="password"]{

    width:100%;

    padding:13px 14px;

    border:1px solid #d1d5db;

    border-radius:8px;

    font-size:14px;
}

.modern-login-box input:focus{

    border-color:#2563eb;

    outline:none;

    box-shadow:
    0 0 0 3px rgba(37,99,235,0.15);
}

.modern-login-box button{

    width:100%;

    padding:13px;

    background:#2563eb;

    color:#fff;

    border:none;

    border-radius:8px;

    font-size:15px;
    font-weight:600;

    cursor:pointer;
}

.modern-login-box button:hover{
    background:#1d4ed8;
}

.remember-box{
    display:flex;
    align-items:center;
    gap:8px;

    font-size:14px;

    color:#475569;
}

.remember-box input{
    width:auto;
}

.modern-login-footer{
    margin-top:25px;

    font-size:12px;

    color:#64748b;
}

.login-error{
    background:#fee2e2;
    color:#b91c1c;

    padding:12px;

    border-radius:8px;

    margin-bottom:20px;

    font-size:14px;
}