:root{

    /* Backgrounds */
    --bg-color:#F8F9FB;
    --surface-color:#FFFFFF;
    --card-bg:#FFFFFF;
    --input-bg:#F3F4F6;

    /* Text */
    --text-color:#000;
    --secondary-text:#6B7280;

    /* Border */
    --border-color:#E5E7EB;

    /* Primary */
    --primary:#3B82F6;
    --primary-bg:#DBEAFE;

    /* Success */
    --success:#206C40;
    --success-bg:#DCFCE7;

    /* Danger */
    --danger:#9C1C1B;
    --danger-bg:#FEE2E2;

    /* btn-bg */
    --btn-bg: #000;
    --btn-bg-2 : #CCCCCC;
    --reset-bg : #fee2e2c2;

    /* Hover */
    --hover-color:#DBEAFE;

    /* Shadow */
    --shadow:0 2px 8px rgba(15,23,42,.06);
}


.dark{

    /* Backgrounds */
    --bg-color:#111827;
    --surface-color:#1F2937;
    --card-bg:#1F2937;
    --input-bg:#111827;

    /* Text */
    --text-color:#F9FAFB;
    --secondary-text:#9CA3AF;

    /* Border */
    --border-color:#374151;

    /* Primary */
    --primary:#60A5FA;
    --primary-bg:#374151;

    /* Success */
    --success:#206C40;
    --success-bg:#DCFCE7;

    /* Danger */
    --danger:#9C1C1B;
    --danger-bg:#FEE2E2;

    /* btn-bg */
    --btn-bg: #3B82F6;
    --btn-bg-2 : #3B82F6;
    --reset-bg : #FFF5F5;



    /* Hover */
    --hover-color:#374151;

    /* Shadow */
    --shadow:0 4px 12px rgba(0,0,0,.35);
}



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

html,body{
    width:100%;
    height:100%;
    font-family:Inter, sans-serif;
}

.hidden{
    display:none !important;
}
.container{
    display:grid;
    grid-template-columns:260px 1fr;
    min-height:100vh;
    background-color: var(--bg-color);
}

/* Sidebar */

.sidebar{
    padding: 25px;
    height: 100vh;
    position: sticky;
    top: 0;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.sidebar-top{
    display:flex;
    flex-direction:column;
    gap:45px;
}

.logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.logo-icon{
    width:42px;
    height:42px;

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

    border-radius:12px;
    background-color: var(--primary-bg);
    color: var(--primary);
    font-size:22px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.logo-text h2{
    font-size:20px;
    font-weight:700;
    color: var(--text-color);
}

.logo-text p{
    font-size:13px;
    color:var(--secondary-text)
}

.nav{
    display:flex;
    flex-direction:column;
    gap: 5px;
}

.nav a{

    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 20px;
    border-radius:12px;
    text-decoration:none;
    color:var(--secondary-text);
    transition:.3s;
}

.nav a.active{
    background:var(--primary-bg);
    color:var(--primary);
    font-weight:600;
}

.dark .nav a.active{
    background:var(--primary-bg);
    color:var(--primary);
}

.nav a:hover{
    background-color: var(--primary-bg);
    color: var(--primary);
    border:none;
}
.nav a span {
    padding-left: 5px;
}

.add-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 12px 0px;
    font-weight: 700;
    background-color: var(--btn-bg);
    border-radius: 10px;
    border: none;
    cursor: pointer;

}

/* Main */

.main{
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
}

/* Navbar */

.navbar{
    position: absolute;
    top: 0;
    gap: 25px;
    left: 260px;      /* Sidebar ki width */
    right: 0;
    height: 67px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-left: none;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content:flex-end;
    padding: 0px 35px;
}
.navbar-top-right {
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    border-left: 1px solid var(--border-color);
    padding-left: 15px;
}
.navbar p {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.navbar button {
    background-color: transparent;
    color: black;
    border:none;
    font-size: 14px;
    font-weight: 600;
}

.logout-btn {
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 7px 15px;
    border-radius: 5px;
    gap: 8px;
}

.logout-btn i {
    font-size: 13px;
}
/* Heading */


.dashboard-view {
    padding: 30px;
    margin-top: 70px;
}
.heading{
    margin-bottom: 24px;
    height:50px;
}

.heading h1 {
    font-size: 27px;
    color: var(--text-color);
}

/* Cards */

.cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.card{
    height:160px;
    padding:20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    box-shadow:0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: left;
}

.card-body {
    display:flex;
    flex-direction:column;
    gap:10px;
    padding-top: 25px;
}

.card-body h2 {
    font-size: 25px;
    font-weight: 600;
}

.card-body p{
    font-size:18px;
    color:var(--secondary-text)
}

.card-b {
    width:40px;
    height:40px;

    display:flex;
    justify-content:center;
    align-items:center;
    color: var(--text-color);
    border-radius:12px;
    background:var(--primary-bg);
    color:var(--primary);
    font-size:17px;
}
.balance {
    color:var(--text-color);
}
.card-i {
    width:40px;
    height:40px;

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

    border-radius:12px;
    background:var(--success-bg);
    color:var(--success);
    font-size:17px;
}

#income {
    color:var(--success);
}
.card-e {
    width:40px;
    height:40px;

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

    border-radius:12px;
    background:var(--danger-bg);
    color:var(--danger);
    font-size:17px;
}

#expense {
    color:var(--danger);
}

.card-t {
    width: 40px;
    height:40px;

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

    border-radius:12px;
    background:var(--primary-bg);
    color:var(--primary);
    font-size:17px;
}

.transectīōn {
    color:var(--text-color);
}
/* Analysis */

.analysis{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    color: var(--text-color);
}

.chart{
    position:relative;
    padding: 20px;
    height:350px;
    background-color: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-body{
    padding: 10px;
    flex:1;
    height: 250px;
    width: 100%;
    position:relative;
    background-color: var(--bg-color);
    border-radius: 10PX;
}
.chart-body canvas{
    width:100% !important;
    height:100% !important;
}

.preferences{
    padding: 20px;
    height: 230px;
    background-color: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.them {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
    padding-bottom: 20px;
    border-bottom:1px solid var(--border-color);
}

.them span {
    font-size: 16px;
    font-weight: 600;
}

.switch {
    position: relative;
    height: 26px;
    width: 50px;
    display: inline-block;
}
.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    background:var(--btn-bg-2);
    inset: 0;
    border-radius: 30px;
    transition: 0.3s;
}

.slider::before{

    content:"";

    position:absolute;

    width:20px;
    height:20px;

    left:3px;
    top:3px;

    background-color: var(--surface-color);

    border-radius:50%;

    transition:.3s;
}

input:checked + .slider{
    background:#2563EB;
}

input:checked + .slider::before{
    transform:translateX(22px);
}

.reset-btn {
    margin-top: 20PX;
    background: var(--reset-bg);
    font-weight: 600;
    color:var(--danger);
    width: 100%;
    padding: 7px 0px;
    border-radius: 5px;
    border: 0.5px solid rgba(220, 20, 60, 0.14);
}

/* Transactions */

.transactions{
    padding: 20px;
    min-height:100px;
    width: 65%;
    background:var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    color: var(--text-color);
}


.transaction-controls{
    display:grid;
    grid-template-columns:320px 1fr;
    margin-bottom:10px;
    gap: 20px
}

.transaction-controls .search-bar {
    display: flex;
    width: 100%;
    padding: 7px 10px;
    border-radius: 10px;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    gap: 20px;
}

.transaction-controls .search-bar input {
    width:100%;
    border:none;
    outline:none;
    font-size:14px;
    background-color: transparent;
    color: var(--secondary-text);
}

.transaction-controls select{
    width:100%;
    padding:8px 12px;
    border:1px solid var(--border-color);
    border-radius:12px;
    font-size:16px;
    background:var(--bg-color);
    outline:none;
    cursor:pointer;
    color: var(--secondary-text)
}


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

thead th{

    text-align:left;
    padding:16px 10px;
    color:var(--secondary-text);
    font-size:12px;
    font-weight:600;
    border-bottom:1px solid var(--border-color);

}

tbody td {
    padding:20px 10px;
    border-bottom:1px solid var(--border-color);
    font-size:14px;
}

.category-badge{
    display:inline-block;
    padding:6px 12px;
    background:var(--bg-color);
    border-radius:8px;
    font-size:14px;
}


.income {
    color:var(--success);
}

.expense {
    color:var(--danger);
}

.edit-btn{
    color:var(--primary);
    cursor:pointer;
    margin-right:15px;
}

.delete-btn{
    color:var(--danger);
    cursor:pointer;
}

.setting-view {
    padding: 30px;
    margin-top: 70px;
}

.top-header {
    margin-bottom: 24px;
    height:50px;
}

.top-header h2 {
    font-size:28px;
    font-weight:700;
    color: var(--text-color);
    margin-bottom: 5px;
}


.top-header p {
    font-size:13px;
    color:var(--secondary-text);
}

.profile-card {
    position: relative;
    height:260px;
    width: 800px;
    padding:20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    box-shadow:0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: left;
    gap: 18px;
}

.profile-card h2 {
    color: var(--text-color);
}

.form-group {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}



.form-group .name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: left;
    gap: 10px;
    width: 370px;
    font-size: 14px;
    color: var(--text-color);
}

.form-group .name input {
    padding: 10px;
    border: none;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background-color: var(--bg-color);
    color: var(--text-color);

}

.form-group .currency {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: left;
    gap: 10px;
    width: 370px;
    font-size: 14px;
    color: var(--text-color);
}

.form-group .currency select {
    padding: 10px;
    border: none;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background-color: var(--bg-color);
    cursor: pointer;
    color: var(--text-color);
}

.save-btn {
    width: 140px;
    margin-top: 30px;
    color: white;
    padding: 12px 0px;
    font-weight: 700;
    background-color: var(--btn-bg);
    border-radius: 7px;
    border: none;
    cursor: pointer;
}

/*Model popup */

.modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.modal-content{
    width:450px;
    background:var(--surface-color);
    border-radius:18px;
    padding:20px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:22px;
    box-shadow:0 15px 45px rgba(0,0,0,.25);
}

.modal-header{
    display:flex;
    justify-content:center;
    align-items:baseline;
    color: var(--text-color);
    gap: 160px;
}

.close-btn{
    border:none;
    background:none;
    cursor:pointer;
    font-size:18px;
    color:var(--secondary-text);

}

#transactionForm{
    display:flex;
    flex-direction:column;
    gap:15px;
    font-size: 15px;
    color: var(--text-color);
}

.form-row input,
.form-row select{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: left;
    border: none;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    width: 370px;
    font-size: 14px;
    color: var(--text-color);
    padding: 10px 7px;
    margin-top: 7px;
    border-radius: 7px;
}


.modal-actions{

    display:flex;
    align-items: baseline;
    justify-content:flex-end;
    gap:20px;

}

.save {
    width: 100%;
}