/* ESS Portal — Bento Design (matching Odoo HR Portal) */

/* ===== PAGE LOADER ===== */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #714B67;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.loader-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Poppins', sans-serif;
}

body {
    background: #ffffff;
    min-height: 100vh;
}

/* ===== PROFILE HEADER ===== */
.hr_profile_header {
    margin-bottom: 2rem;
}

.hr_profile_card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    padding: 1.5rem;
}

.hr_avatar_box {
    position: relative;
}

.hr_avatar_box img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid #f8f9fa;
}

.hr_avatar_placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    border: 3px solid #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== NEWS CAROUSEL ===== */
.hr_news_carousel {
    height: 120px;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.hr_news_card {
    display: flex;
    align-items: center;
    height: 120px;
    padding: 0;
}

.hr_news_icon_box {
    width: 85px;
    min-width: 85px;
    height: 100%;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hr_news_icon_box i {
    color: #ff9f43;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hr_news_content {
    padding: 1rem 1.5rem;
    overflow: hidden;
    flex: 1;
}

.hr_news_title {
    font-weight: 800;
    color: #1a1a1a;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.3rem;
}

.hr_news_description {
    color: #555;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3.2em;
    line-height: 1.6em;
}

/* ===== BENTO APP DASHBOARD ===== */
.hr_app_dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 24px;
    padding: 10px 0 50px 0;
    justify-content: center;
}

@media (max-width: 576px) {
    .hr_app_dashboard {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 16px;
    }
}

/* ===== APP TILES ===== */
.hr_app_tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.hr_app_tile:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.hr_app_tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.hr_app_tile:hover::after {
    left: 100%;
}

/* ===== APP ICON ===== */
.hr_app_icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease;
    position: relative;
}

.hr_app_icon i {
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hr_app_tile:hover .hr_app_icon {
    transform: scale(1.1) rotate(2deg);
}

@media (max-width: 576px) {
    .hr_app_icon {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }
    .hr_app_icon i {
        font-size: 22px;
    }
}

/* ===== APP BADGE ===== */
.hr_app_badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #714B67;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

/* ===== APP LABEL ===== */
.hr_app_label {
    font-weight: 600;
    color: #4a4a4a;
    font-size: 15px;
    text-align: center;
    letter-spacing: 0.3px;
}

@media (max-width: 576px) {
    .hr_app_label {
        font-size: 12px;
    }

    /* Mobile-friendly tables */
    .shadcn-table thead th,
    .shadcn-table tbody td {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Stack profile header on mobile */
    .hr_profile_card {
        flex-direction: column;
        text-align: center;
        gap: 1rem !important;
    }

    .hr_profile_card h2 {
        font-size: 1.3rem;
    }

    /* Page header stack on mobile */
    .page-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .page-header h4 {
        font-size: 1.1rem;
    }

    /* Cards less padding on mobile */
    .shadcn-card-body {
        padding: 1rem;
    }

    /* Full width buttons on mobile */
    .btn-shadcn {
        font-size: 0.8rem;
    }

    /* Navbar brand smaller */
    .ess-navbar .navbar-brand {
        font-size: 0.95rem;
    }

    /* Container less padding */
    main.container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ===== SHADCN CARD (List Pages) ===== */
.shadcn-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.shadcn-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.shadcn-card-body {
    padding: 1.5rem;
}

.hr_table_container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    overflow-x: auto;
}

/* ===== SHADCN TABLE ===== */
.shadcn-table {
    width: 100%;
    border-collapse: collapse;
}

.shadcn-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    letter-spacing: 0.05em;
}

.shadcn-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #374151;
}

.shadcn-table tbody tr:hover {
    background: #f9fafb;
}

/* ===== SHADCN BADGES ===== */
.shadcn-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #f3f4f6; color: #374151; }
.badge-primary { background: #ede9fe; color: #5b21b6; }

/* ===== SHADCN BUTTONS ===== */
.btn-shadcn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-shadcn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-shadcn.primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-shadcn.secondary {
    background: #6b7280;
    color: #fff;
}

.btn-shadcn.outline {
    background: transparent;
    color: #667eea;
    border-color: #667eea;
}

.btn-shadcn.outline:hover {
    background: rgba(102, 126, 234, 0.05);
}

.btn-shadcn.danger {
    background: #ef4444;
    color: #fff;
}

.btn-shadcn.warning {
    background: #f59e0b;
    color: #fff;
}

/* ===== NAVBAR ===== */
.ess-navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 0.5rem 0;
}

.ess-navbar .navbar-brand {
    font-weight: 700;
    color: #714B67;
    font-size: 1.1rem;
}

.ess-navbar .nav-link {
    color: #4a4a4a;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ess-navbar .nav-link:hover,
.ess-navbar .nav-link.active {
    color: #714B67;
    background: rgba(113, 75, 103, 0.08);
}

/* ===== LOGIN PAGE ===== */
.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.login-logo {
    font-size: 3rem;
    color: #714B67;
}

/* ===== PAGE HEADERS ===== */
.page-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* ===== FORM STYLING ===== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ===== TOAST ALERTS ===== */
.ess-alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease;
}

.ess-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ess-alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #f0fff4 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.ess-alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #fff5f5 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.ess-alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fffef5 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.ess-alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #f0faff 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.ess-alert .btn-close {
    filter: none;
    opacity: 0.5;
    font-size: 0.7rem;
}

.ess-alert .btn-close:hover {
    opacity: 1;
}

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

/* ===== ERROR PAGE ===== */
.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.error-icon-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.error-icon-danger i {
    color: #dc2626;
    font-size: 2rem;
}
