/* ১. ভেরিয়েবল এবং বেসিক রিসেট */
:root {
    --primary: #00695c;
    --secondary: #004d40;
    --accent: #ffc107;
    --danger: #ff5252;
    --success: #2ecc71;
    --sidebar-width: 260px;
    --bg: #f0f2f5;
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

/* সাইডবার ওপেন থাকলে স্ক্রলিং বন্ধ করার ক্লাস */



@font-face {
    font-family: 'Adorsho';
    src: url('AdorshoLip.ttf') format('truetype');
}

body { 
    font-family: 'Adorsho', sans-serif !important; 
    background: var(--bg); 
    margin: 0; 
    display: flex; 
    /* ভুতুড়ে স্ক্রলিং বন্ধ করতে নিচের ৩টি লাইন গুরুত্বপূর্ণ */
    overflow-x: hidden; 
    width: 100%; 
    min-height: 100vh;
}

/* ২. স্কেলিটন লোডিং */
.skeleton {
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

.skeleton-card { height: 120px; width: 100%; border-radius: 15px; margin-bottom: 15px; }

/* ৩. লগইন এবং কনসেন্ট বক্স */
#login-section { position: fixed; inset: 0; background: white; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: white; padding: 40px; border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; }

/* ৪. সাইডবার (Desktop) */
.sidebar { 
    width: var(--sidebar-width); 
    background: var(--secondary); 
    height: 100vh; 
    color: white; 
    z-index: 100; 
    display: flex; 
    flex-direction: column; 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
}
.sidebar-header { 
    background: url(https://i.ibb.co.com/scXjc6G/image.png);
    margin-bottom: 10px;
    box-shadow: rgba(255,255,255,0.7);
    padding: 20px 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.menu-item { padding: 15px 25px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.3s; color: rgba(255,255,255,0.7); }
.menu-item:hover, .menu-item.active { background: rgba(255,255,255,0.1); color: white; border-left: 4px solid var(--danger); }

/* ৫. মেইন কন্টেন্ট এবং কার্ডস */
.main-content { 
    margin-left: var(--sidebar-width); 
    flex: 1; 
    padding: 30px; 
    min-height: 100vh; 
    width: calc(100% - var(--sidebar-width));
    overflow-y: auto; /* কন্টেন্ট বড় হলে শুধু লম্বালম্বি স্ক্রল হবে */
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 10px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
border: 1px solid var(--success); }
.card-container { background: white; padding: 10px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin-bottom: 25px; }


/* ৬. টেবিল এবং ফর্ম */
.table-responsive { width: 100%; overflow-x: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { text-align: left; padding: 12px; background: #f8f9fa; font-size: 13px; color: #666; }
td { padding: 12px; border-bottom: 1px solid #eee; font-size: 14px; }

.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px; margin-bottom: 15px; font-family: inherit; transition: 0.3s; }
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0,105,92,0.1); }
.btn-primary { background: var(--primary); color: white; border: none; padding: 12px; border-radius: 10px; cursor: pointer; width: 100%; font-weight: 600; transition: 0.3s; }
.btn-primary:active { transform: scale(0.98); }

/* ৭. পপ-আপ মডাল */
#photoModal { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 99999; justify-content: center; align-items: center; padding: 20px; }
#photoModal div { position: relative; max-width: 90%; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#modalImg { width: 100%; max-height: 90vh; border: 5px solid white; border-radius: 15px; object-fit: contain; }
.close-modal { position: absolute; top: -15px; right: -15px; background: #ff5252; color: white; border: none; border-radius: 50%; width: 35px; height: 35px; cursor: pointer; font-weight: bold; }

/* ৮. হামবার্গ মেনু ও ওভারলে */


.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 1001; backdrop-filter: blur(2px); 
    
}
.sidebar-overlay.active { display: block; 
    
}

/* ৯. ব্যয় ও হিসাব রক্ষণ স্পেশাল ডিজাইন (Accounts) */
#accounts-tab .stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; /* বামে ফর্ম ছোট, ডানে লিস্ট বড় */
    gap: 25px; 
    align-items: start; 
}

#expense-history-list { 
    max-height: 60vh; 
    overflow-y: auto; 
    padding-right: 10px; 
    scrollbar-width: thin; 
    scrollbar-color: #ddd transparent;
}

/* ১০. মোবাইল রেসপনসিভ */
@media (max-width: 992px) {
    #accounts-tab .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {

  .hamburger-menu { 
    display: block !important; 
  }

  .sidebar {
    display: flex !important;
    flex-direction: column;

    position: fixed;
    top: 0;
    left: -280px;

    width: 260px;
    height: 100vh; /* 🔥 full height */

    background: #006064; /* optional */

    z-index: 1002;

    overflow-y: auto; /* 🔥 scroll enable */
    -webkit-overflow-scrolling: touch; /* smooth scroll (mobile) */

    transition: left 0.3s ease; /* smooth slide */
  }

  .sidebar.active { 
    left: 0 !important; 
  }

  .close-sidebar { 
    display: block !important; 
    position: absolute; 
    right: 15px; 
    top: 15px; 
    font-size: 20px; 
    color: white; 
    cursor: pointer; 
    z-index: 2;
  }

  .main-content { 
    margin-left: 0; 
    width: 100%; 
    padding: 80px 15px 30px 15px; 
  }

  .stats-grid { 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
  }
}


/* ১. গ্লোবাল হেডার স্টাইল */
.header { 
    background: var(--primary); 
    color: white; 
    padding: 15px; 
    text-align: center; 
    position: fixed; /* স্ক্রিনের একদম উপরে আটকে থাকবে */
    top: 0; 
    left: 0;
    width: 100%; /* পুরো স্ক্রিন জুড়ে থাকবে */
    z-index: 2000; /* সাইডবারের চেয়েও উপরে থাকবে */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}





/* ৪. মোবাইল রেসপনসিভ অ্যাডজাস্টমেন্ট */
@media (max-width: 768px) {
    .header {
        padding: 15px 15px 15px 60px; /* হামবার্গ মেনুর জন্য বামে জায়গা */
        text-align: left;
        font-size: 16px;
    }

    .sidebar {
        top: 0; /* মোবাইলে সাইডবার পুরো স্ক্রিন জুড়ে থাকবে */
        height: 100%;
        z-index: 2002;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        margin-top: 60px; /* মোবাইলেও কন্টেন্ট হেডারের নিচ থেকে শুরু হবে */
    }
.hamburger-menu { 
    display: none; 
    position: fixed; 
    top: 10px; 
    left: 15px; 
    font-size: 24px; 
    color: white; 
    cursor: pointer; 
    z-index: 2001; 
    background: transparent; 
}

}
