/* CodeFlux-inspired HR System Employee Styles */

:root {
    --primary-green: #10b981;
    --primary-green-dark: #059669;
    --primary-green-light: #d1fae5;
    --primary-green-darker: #047857;
    --secondary-green: #34d399;
    --accent-green: #6ee7b7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 10px 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    margin-left: -20px;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.mobile-menu {
    background-color: dimgrey;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

    .mobile-menu ul {
        margin: 0;
        padding: 0.25rem 1rem;
        list-style: none;
    }

    .mobile-menu li {
        padding: 0.25rem 0; 
    }

    .mobile-menu a {
        display: block;
        color: white; 
        text-decoration: none;
        font-weight: 500;
        padding: 0.25rem;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }

        .mobile-menu a:hover,
        .mobile-menu a:focus {
            background-color: #e8f5e9; 
            color: var(--primary-green); 
        }

/* Hide the mobile menu on larger screens */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Sidebar Styles */
.sidebar {
    background: white;
    width: 250px;
    min-height: calc(100vh - 80px);
    padding: 1.5rem 0;
    box-shadow: 2px 0 4px -1px rgba(0, 0, 0, 0.1);
    position: fixed;
    left: 0;
    top: 80px;
    transition: margin-left 0.3s ease;
}

.sidebar-menu {
    list-style: none;
}

    .sidebar-menu li {
        margin-bottom: 0.5rem;
    }

    .sidebar-menu a {
        display: flex;
        align-items: center;
        padding: 0.75rem 1.5rem;
        color: #64748b;
        text-decoration: none;
        transition: all 0.2s;
        border-left: 3px solid transparent;
    }

        .sidebar-menu a:hover,
        .sidebar-menu a.active {
            background-color: var(--primary-green-light);
            color: var(--primary-green-dark);
            border-left-color: var(--primary-green-dark);
        }

    .sidebar-menu i {
        margin-right: 0.90rem;
        width: 20px;
        text-align: center;
    }

    .sidebar{
        transition: all 0.3s ease;
    }

    /*Collapsed Sidebar*/

    .sidebar.collapsed{
        width: 110px;
    }

    .sidebar.collapsed .sidebar-menu a span{
        display: none !important;
    }

    .sidebar.collapsed .sidebar-menu i{
        margin: 0 auto;
    }

    .sidebar.collapsed ~ .main-content{
        margin-left: 80px;
        transition: margin-left 0.3s ease;
    }

    @media (max-width: 767.98px){
        .sidebar{
            width: 0;
            overflow: hidden;
        }

        .sidebar.collapsed{
            width: 250px;
            overflow: visible;
        }

        .main-content{
            margin-left: 0;
        }

        .sidebar-collapsed ~ .main-content{
            margin-left: 250px;
        }
    }
/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 80px);
    transition: margin-left 0.3s ease;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #64748b;
    font-size: 1rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-green);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-green-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

.btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

    .btn-secondary:hover {
        background-color: #e2e8f0;
    }

.btn-success {
    background-color: #10b981;
    color: white;
}

    .btn-success:hover {
        background-color: #059669;
    }

.btn-danger {
    background-color: #ef4444;
    color: white;
}

    .btn-danger:hover {
        background-color: #dc2626;
    }

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

    .table th {
        background-color: #f8fafc;
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        color: #374151;
        border-bottom: 1px solid #e2e8f0;
    }

    .table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .table tbody tr:hover {
        background-color: #f8fafc;
    }

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary-green);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    .form-input.invalid {
        border-color: #dc2626;
    }

    .form-input.valid {
        border-color: #16a34a; 
    }

.validation-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    min-height: 100px;
    resize: vertical;
}

/* File Upload Styles */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

    .file-upload input[type="file"] {
        position: absolute;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    background-color: #f9fafb;
    color: #6b7280;
    transition: all 0.2s;
}

.file-upload:hover .file-upload-label {
    border-color: #10b981;
    background-color: #f0fdf4;
    color: #059669;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-draft {
    background-color: #e5e7eb;
    color: #374151;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #dbeafe;
    color: var(--primary-green-dark);
    border: 1px solid #93c5fd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}
