/* ============================================
   GEP HR MANAGER - LAYOUT STYLES
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1e3a5f;
    --primary-light: #2d5a8e;
    --primary-dark: #0f1f33;
    --secondary-color: #3498db;
    --accent-color: #00b894;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --bg-color: #f5f7fa;
    --sidebar-bg: #1e3a5f;
    --sidebar-hover: #2d5a8e;
    --card-bg: #ffffff;
    --border-color: #e1e8ed;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --sidebar-width: 260px;
    --header-height: 70px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), width var(--transition-normal);
}

.sidebar.collapsed {
    width: var(--sidebar-width);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.logo-text {
    white-space: nowrap;
    transition: opacity var(--transition-normal);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 8px;
    border-radius: 8px;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 16px 8px;
    margin-top: 8px;
}

.nav-section:first-child {
    margin-top: 0;
    padding-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-text {
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    transition: opacity var(--transition-normal);
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.badge.warning {
    background: var(--warning-color);
    color: var(--text-primary);
}

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

.badge.info {
    background: var(--info-color);
    color: white;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
    min-width: 0;
}

/* Top Header */
.top-header {
    background: var(--card-bg);
    height: var(--header-height);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--bg-color);
}

.search-box {
    position: relative;
    width: 350px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
    background: var(--bg-color);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--bg-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 2px solid white;
}

.user-profile {
    position: relative;
}

.user-profile>a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

.user-profile>a:hover {
    background: var(--primary-color);
    color: white;
}

.user-profile .dropdown-toggle::after {
    display: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-profile:hover .user-name {
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-light);
}

.user-profile:hover .user-role {
    color: rgba(255, 255, 255, 0.7);
}

/* User Profile Dropdown */
.user-profile .dropdown-menu {
    margin-top: 10px;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 8px;
}

.user-profile .dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.user-profile .dropdown-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 30px;
    min-width: 0;
}

/* ============================================
   NOTIFICATION MODAL STYLES
   ============================================ */
.notification-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-color);
}

.notification-item.unread {
    background: rgba(52, 152, 219, 0.08);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.warning {
    background: rgba(253, 203, 110, 0.15);
    color: #e67e22;
}

.notification-icon.success {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success-color);
}

.notification-icon.info {
    background: rgba(52, 152, 219, 0.15);
    color: var(--info-color);
}

.notification-icon.danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger-color);
}

.notification-content {
    flex: 1;
}

.notification-content p {
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar.active~.sidebar-overlay {
        display: block;
    }

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

    .top-header {
        padding: 0 16px;
    }

    .page-content {
        padding: 20px 16px;
    }
}

@media (max-width: 767.98px) {
    .search-box {
        display: none;
    }

    .header-actions .action-btn {
        width: 38px;
        height: 38px;
    }

    .user-profile>a {
        padding: 6px 10px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 575.98px) {
    .top-header {
        height: 60px;
        padding: 0 12px;
    }

    .header-right {
        gap: 10px;
    }

    .page-content {
        padding: 16px 12px;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

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

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: none;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.card-body {
    padding: 24px;
}

/* Form Styles */
.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

.btn-close:focus {
    box-shadow: none;
}