@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4F46E5; /* Indigo */
    --secondary-color: #6B7280; /* Gray */
    --background-color: #F3F4F6; /* Light Gray */
    --surface-color: #FFFFFF;
    --text-color: #1F2937;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --danger-color: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* =================================
   Header and Navigation
   ================================= */
header {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* নতুন যোগ করা হয়েছে */
.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img { 
    height: 40px; 
    margin-right: 12px; 
}
.logo-container h1 { 
    color: var(--text-color); 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin: 0; /* নিশ্চিত করুন কোনো অতিরিক্ত মার্জিন নেই */
}

/* Desktop Navigation */
nav .desktop-nav { display: flex; align-items: center; }
nav .welcome-text { color: var(--secondary-color); margin-right: 20px; font-size: 0.9rem; }
nav .welcome-text strong { color: var(--text-color); }
nav a, nav button { text-decoration: none; font-weight: 500; transition: all 0.2s ease-in-out; }
nav .desktop-nav a { color: var(--secondary-color); margin-left: 15px; padding: 8px 12px; border-radius: 6px; }
nav .desktop-nav a:hover { background-color: var(--background-color); color: var(--primary-color); }
nav .desktop-nav button { background-color: var(--primary-color); color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; margin-left: 15px; }
nav .desktop-nav button:hover { opacity: 0.9; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-color); cursor: pointer; z-index: 1001; }

/* =================================
   SIDE-DRAWER (Off-Canvas) Menu
   ================================= */
/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-overlay.active { visibility: visible; opacity: 1; }

/* Mobile Navigation Panel */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background-color: var(--surface-color);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}
.mobile-nav.active { transform: translateX(0); }

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav-header h4 { font-size: 1.1rem; color: var(--text-color); }
.close-menu-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--secondary-color);
    cursor: pointer;
}

.mobile-nav a {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}
.mobile-nav a:hover { background-color: #EEF2FF; color: var(--primary-color); }
.mobile-nav a i { width: 20px; text-align: center; }

.mobile-nav form { padding: 1.5rem; margin-top: auto; }
.mobile-nav form button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.mobile-nav form button:hover { opacity: 0.9; }

/* Main Content Styles, Cards, Forms etc. */
/* (The rest of the CSS is mostly unchanged) */

main h2 { font-size: 1.8rem; font-weight: 700; color: var(--text-color); margin-bottom: 0.5rem; }
main .subtitle { color: var(--secondary-color); margin-top: 0; margin-bottom: 2rem; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.summary-card { background-color: var(--surface-color); border-radius: 12px; padding: 1.5rem; display: flex; align-items: center; gap: 1rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05); transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; }
.summary-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.summary-card-link { text-decoration: none; }
.summary-card.clickable { cursor: pointer; }
.summary-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.summary-icon i { font-size: 1.4rem; }
.summary-text h4 { margin: 0; color: var(--secondary-color); font-weight: 500; font-size: 0.9rem; }
.summary-text span { font-size: 1.8rem; font-weight: 700; color: var(--text-color); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background-color: var(--surface-color); border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); padding: 1.5rem; display: flex; flex-direction: column; }
.card-header { margin-bottom: 1rem; }
.card-header h3 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.card-header p { margin: 0.25rem 0 0 0; color: var(--secondary-color); font-size: 0.9rem; }
.card-content a { display: flex; align-items: center; padding: 10px; margin: 5px 0; border-radius: 8px; text-decoration: none; color: var(--secondary-color); font-weight: 500; transition: all 0.2s ease-in-out; }
.card-content a:hover { background-color: #EEF2FF; color: var(--primary-color); }
.card-content a i { margin-right: 12px; width: 20px; text-align: center; color: var(--primary-color); }
.chart-card { grid-column: 1 / -1; }

.modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-content { background-color: #fefefe; margin: auto; padding: 0; border: 1px solid var(--border-color); width: 90%; max-width: 500px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); animation-name: animatetop; animation-duration: 0.4s }
@keyframes animatetop { from {transform: translateY(-50px); opacity: 0} to {transform: translateY(0); opacity: 1} }
.modal-header { padding: 1rem 1.5rem; background-color: var(--primary-color); color: white; border-radius: 12px 12px 0 0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.25rem; margin: 0; color: white; }
.modal-header .close { color: white; font-size: 28px; font-weight: bold; cursor: pointer; opacity: 0.8; transition: opacity 0.2s; }
.modal-header .close:hover { opacity: 1; }
.modal-body { padding: 1.5rem; }
.employee-list { list-style: none; padding: 0; max-height: 40vh; overflow-y: auto; }
.employee-list li { padding: 10px; border-bottom: 1px solid var(--border-color); }
.employee-list li:last-child { border-bottom: none; }

.form-container { max-width: 500px; margin: 2rem auto; padding: 2rem; background-color: var(--surface-color); border-radius: 12px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.form-container h2 { text-align: center; font-size: 1.8rem; color: var(--text-color); margin: 0 0 2rem 0; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }
.btn-submit { display: block; width: 100%; padding: 14px; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
.btn-submit:hover { background-color: #4338CA; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.messages li { padding: 1rem; margin-bottom: 1rem; border-radius: 8px; border: 1px solid transparent; }
.messages li.success { background-color: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.messages li.error { background-color: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }

footer { text-align: center; padding: 2rem; margin-top: 2rem; color: var(--secondary-color); font-size: 0.9rem; }

/* =================================
   RESPONSIVE STYLES (Media Queries)
   ================================= */
@media (min-width: 1200px) { .chart-card { grid-column: 1 / 3; grid-row: 1 / 3; } }
@media (max-width: 992px) { .logo-container h1 { display: none; } }
@media (max-width: 768px) {
    header { padding: 1rem; }
    nav .desktop-nav { display: none; }
    .menu-toggle { display: block; }
    main h2 { font-size: 1.5rem; }
    main .subtitle { font-size: 0.9rem; }
    .container { padding: 15px; }
    .summary-grid, .dashboard-grid { gap: 1rem; }
    .form-container { padding: 1.5rem; margin: 1rem auto; }
    .modal-content { width: 95%; }
}

 /* =================================
   for employ list page
   ================================= */

   /* =================================
   List Page & Table Styles
   ================================= */

/* Header for List Pages (e.g., Manage Employees) */
.list-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.btn-add-new, .btn-back {
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-add-new { background-color: var(--primary-color); }
.btn-back { background-color: var(--secondary-color); }
.btn-add-new:hover, .btn-back:hover { opacity: 0.9; }

/* Table Container & Styles */
.table-container {
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    overflow-x: auto; /* Horizontal scroll for very wide tables on medium screens */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: middle;
}

thead th {
    background-color: #F9FAFB; /* Slightly lighter than body bg */
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background-color: #F9FAFB;
}

.no-data-cell {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}
.btn-action:hover { opacity: 0.8; }
.btn-edit { background-color: #F59E0B; /* Amber */ }
.btn-delete { background-color: var(--danger-color); }


/* =================================
   RESPONSIVE STYLES FOR TABLES
   (max-width: 768px)
   ================================= */

@media (max-width: 768px) {
    /* Adjust page header for mobile */
    .list-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-actions {
        width: 100%;
    }
    .header-actions .btn-back { display: none; } /* Hide back button on mobile to save space */
    .header-actions .btn-add-new {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .table-container {
        padding: 0;
        border: none;
        box-shadow: none;
        background-color: transparent;
    }

    /* Hide the table header, but not from screen readers */
    thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    table, tbody { display: block; }
    
    tr {
        display: block;
        background-color: var(--surface-color);
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    td {
        display: block;
        border-bottom: 1px dashed var(--border-color);
        padding: 10px 0;
        text-align: right; /* Aligns the data to the right */
        position: relative;
    }
    
    td:last-child {
        border-bottom: none;
    }
    
    /* The magic: Use data-label for headers */
    td::before {
        content: attr(data-label);
        float: left; /* Pushes the label to the left */
        font-weight: 600;
        color: var(--text-color);
        text-align: left;
    }

    /* Special styling for action buttons on mobile */
    .action-buttons {
        text-align: center;
        padding-top: 15px;
    }
    .action-buttons::before {
        display: none; /* No need for "Actions" label */
    }
}

