/* Modern HR Dashboard Styles - Elegant Flat Elite Theme */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #334155;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-size: 13px;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--white);
    border-radius: 8px;
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--medium-gray);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.login-header .logo i {
    font-size: 24px;
    color: var(--white);
}

.login-header h2 {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-header p {
    color: var(--text-light);
    font-size: 13px;
    margin: 0;
}

.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-icon {
    position: absolute;
    left: 14px;
    z-index: 10;
    color: var(--text-light);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 12px 12px 50px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 13px;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--medium-gray);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    padding-top: 20px;
    border-top: 1px solid var(--medium-gray);
}

.demo-credentials {
    text-align: center;
}

.demo-credentials h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 12px;
}

.demo-credentials p {
    color: var(--text-light);
    font-size: 14px;
    margin: 4px 0;
}

.demo-credentials strong {
    color: var(--text-dark);
}

.alert {
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    border: none;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--medium-gray);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 18px 16px;
    border-bottom: 1px solid var(--medium-gray);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.sidebar-logo i {
    font-size: 20px;
}

.sidebar-logo h4 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.sidebar-nav {
    padding: 12px 0;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Explicitly left-align content */
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 13px;
}

.nav-link:hover {
    background: var(--light-gray);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.nav-link i {
    font-size: 16px;
    width: 18px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.topbar-left h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--light-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--medium-gray);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
}

.page-content {
    padding: 16px 20px;
    min-height: calc(100vh - 60px);
}

.page-title {
    margin-bottom: 16px;
}

.page-title h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.page-title p {
    color: var(--text-light);
    margin: 0;
    font-size: 12px;
}

.card {
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--medium-gray);
    background: var(--light-gray);
}

.card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 16px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    letter-spacing: 0.1px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

/* DataTable Styles */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    margin: 0;
}

.table thead th {
    background: var(--light-gray);
    color: var(--text-dark);
    font-weight: 600;
    padding: 10px 12px;
    border: none;
    font-size: 12px;
    letter-spacing: 0.1px;
}

.table tbody td {
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--medium-gray);
    color: var(--text-dark);
    font-size: 12px;
}

.table tbody tr:hover {
    background: var(--light-gray);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-col {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 12px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.form-control {
    cursor: pointer;
}

.form-text {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 11px;
    margin-top: 3px;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
        width: 240px;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .topbar {
        padding: 10px 12px;
    }

    .page-content {
        padding: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .page-title h1 {
        font-size: 18px;
    }

    .topbar-left h1 {
        font-size: 16px;
    }
}

/* Loading and Animation States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* GreytHR-inspired enhancements */
.employee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 11px;
}

.badge {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
}

.btn-group .btn {
    font-size: 11px;
    padding: 4px 8px;
}

/* Compact spacing for lists and tables */
.list-group-item {
    padding: 8px 12px;
    font-size: 12px;
}

/* Modal adjustments */
.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-body {
    font-size: 12px;
    padding: 16px;
}

.modal-footer {
    padding: 10px 16px;
}

/* Alert styling */
.alert {
    padding: 10px 12px;
    font-size: 12px;
    border-radius: 4px;
}

/* DataTable compact styling */
.dataTables_wrapper .dataTables_length select {
    padding: 4px 8px;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 4px 8px;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_info {
    font-size: 11px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 4px 8px;
    font-size: 11px;
}

/* Activity feed styling */
.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--medium-gray);
}

.activity-icon {
    width: 32px;
    height: 32px;
    font-size: 12px;
    margin-right: 12px;
}

.activity-content h6 {
    font-size: 12px;
    margin-bottom: 2px;
}

.activity-content p {
    font-size: 11px;
    margin-bottom: 1px;
}

.activity-content small {
    font-size: 10px;
}

/* Stats card improvements */
.card h5.card-title {
    font-size: 13px;
    font-weight: 500;
}

.card h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 8px 0;
}

.card p.card-text {
    font-size: 11px;
}

/* Dropdown and select improvements */
.dropdown-menu {
    font-size: 12px;
    border-radius: 4px;
    padding: 4px 0;
}

.dropdown-item {
    padding: 6px 12px;
    font-size: 12px;
}

/* Input group improvements */
.input-group .input-group-text {
    font-size: 12px;
    padding: 8px 12px;
}

/* Tab navigation */
.nav-tabs .nav-link {
    font-size: 12px;
    padding: 8px 16px;
}

/* Progress bars */
.progress {
    height: 6px;
    border-radius: 3px;
}

/* Checkbox and radio buttons */
.form-check-input {
    width: 16px;
    height: 16px;
}

.form-check-label {
    font-size: 12px;
    margin-left: 6px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 11px;
    padding: 6px 0;
    margin-bottom: 12px;
}

/* Tooltip */
.tooltip {
    font-size: 11px;
}

/* Submenu Styles */
.nav-item.has-submenu .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submenu-arrow {
    font-size: 10px;
    transition: var(--transition);
}

.nav-item.has-submenu .nav-link[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--light-gray);
    border-radius: 0 0 6px 6px;
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Added for explicit left alignment */
    gap: 8px;
    padding: 8px 16px 8px 40px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 12px;
    border-radius: 0;
    transition: var(--transition);
}

.submenu a:hover {
    background: var(--white);
    color: var(--primary-color);
}

.submenu a.active {
    background: var(--primary-color);
    color: var(--white);
}

.submenu a i {
    font-size: 11px;
    width: 14px;
    text-align: center;
}

/* Collapsed Sidebar Styles */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-logo h4,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .submenu-arrow {
    display: none;
}

.sidebar.collapsed .nav-link,
.sidebar.collapsed .submenu a {
    justify-content: center;
}

.sidebar.collapsed .submenu a {
    padding-left: 16px;
}

.main-content.collapsed {
    margin-left: 80px;
}
