/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login/Register Container */
body:not(.dashboard) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #5568d3;
}

.error {
    background: #ffe6e6;
    color: #d63031;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.link a {
    color: #667eea;
    text-decoration: none;
}

.link a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard {
    background: #f5f6fa;
    min-height: 100vh;
    display: block;
}

/* Navbar - Fixed positioning */
.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    color: #667eea;
    font-size: 24px;
    margin: 0;
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar .user-name {
    color: #333;
    font-weight: bold;
}

.navbar .logout-btn {
    background: #d63031;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.navbar .logout-btn:hover {
    background: #c92a2a;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.welcome-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 30px;
}

.welcome-box h2 {
    color: #333;
    margin-bottom: 10px;
}

.welcome-box p {
    color: #666;
    font-size: 18px;
}

/* Statistics Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
    background: #f0f0f0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.stat-info h3 {
    font-size: 32px;
    color: #667eea;
    margin: 0;
}

.stat-info p {
    color: #666;
    margin: 5px 0 0 0;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.menu-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.menu-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.menu-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.menu-card p {
    color: #666;
    font-size: 14px;
}

/* Table Styles */
.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.table-container h3 {
    margin-bottom: 20px;
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

table tr:hover {
    background: #f5f5f5;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.badge-asset { background: #d4edda; color: #155724; }
.badge-liability { background: #f8d7da; color: #721c24; }
.badge-equity { background: #d1ecf1; color: #0c5460; }
.badge-income { background: #d4edda; color: #155724; }
.badge-expense { background: #fff3cd; color: #856404; }

/* Form Container */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Journal Entry Specific */
.entry-lines {
    margin: 20px 0;
}

.entry-line {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: end;
}

.entry-line select,
.entry-line input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.btn-small {
    padding: 10px 15px;
    background: #d63031;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-add {
    background: #00b894;
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.totals {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.totals-row.total {
    font-weight: bold;
    font-size: 18px;
    border-top: 2px solid #333;
    padding-top: 10px;
}

.text-right {
    text-align: right;
}

/* Add Account Section */
.add-account-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.add-form {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.add-form .form-group {
    margin: 0;
}

.add-form .btn {
    width: auto;
    white-space: nowrap;
}

/* Account Type Sections */
.account-type-section {
    margin-bottom: 30px;
}

.account-type-header {
    background: #667eea;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-icon {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
}

.btn-toggle {
    background: #00b894;
    color: white;
}

.btn-delete {
    background: #d63031;
    color: white;
}

.btn-toggle:hover {
    background: #00a383;
}

.btn-delete:hover {
    background: #c92a2a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .add-form {
        grid-template-columns: 1fr;
    }
    
    .entry-line {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-container,
    .menu-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================
   SIDEBAR NAVIGATION STYLES
======================================== */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Container */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.sidebar-header p {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.8;
}

/* Navigation Menu */
.sidebar-nav {
    padding: 20px 0;
}

/* Menu Group */
.menu-group {
    margin-bottom: 25px;
}

.menu-group-title {
    padding: 10px 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 5px;
}

/* Menu Items */
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: white;
    padding-left: 25px;
}

.menu-item.active {
    background: rgba(255,255,255,0.15);
    border-left-color: #ffd700;
}

.menu-item-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.menu-item-text {
    flex: 1;
}

.menu-item-title {
    font-size: 14px;
    font-weight: 500;
    display: block;
}

.menu-item-subtitle {
    font-size: 11px;
    opacity: 0.7;
    display: block;
    margin-top: 2px;
}

/* Sidebar Toggle Button (For Mobile) */
.sidebar-toggle {
    display: none; /* Desktop এ থাকবে না */
    position: fixed;
    top: 20px;
    left: 20px;
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    background: #f5f6fa;
    transition: all 0.3s;
}

/* Top Bar (Navbar) Styles override for Sidebar layout */
.navbar {
    position: sticky !important;
    width: 100% !important;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

/* Badge for notifications */
.menu-badge {
    background: #ff4757;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}