/* Custom CSS - Premium HR Theme */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    background-color: #f8fafc;
    /* Slate-50 base */
}

/* Typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- NAVIGATION (The "Clean Capsule" Look) --- */
#main-nav {
    gap: 0.25rem;
    display: flex;
    align-items: center;
}

.nav-item {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* Hover State */
.nav-item:hover {
    color: #0f172a;
    /* Slate-900 */
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Subtle lift */
    transform: translateY(-1px);
}

/* Active State - The "Pop" */
.nav-item.active {
    background-color: #0ea5e9;
    /* Primary-500 */
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    /* Glow effect */
    transform: translateY(0);
}

.nav-item.active:hover {
    transform: none;
    /* Stable when active */
    background-color: #0284c7;
    /* Primary-600 */
}

/* Mobile Nav - Refined */
.nav-item-mobile {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.nav-item-mobile:hover {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}


/* --- DASHBOARD CARDS & UTILITY --- */

.kpi-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border-color: #e0f2fe;
    transform: translateY(-0.25rem);
}

.kpi-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #e2e8f0;
    font-size: 3.75rem;
    opacity: 0.2;
    pointer-events: none;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 28rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.search-input-container:focus-within {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    border-color: #0ea5e9;
}

/* Common Components */
.card {
    background-color: #ffffff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 20px -3px rgba(0, 0, 0, 0.1), 0 10px 25px -2px rgba(0, 0, 0, 0.05);
}

/* Inputs */
.input-field {
    display: block;
    width: 100%;
    border-radius: 0.75rem; /* rounded-xl */
    border: 1px solid #e2e8f0; /* border-slate-200 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    font-size: 0.875rem; /* sm:text-sm */
    line-height: 1.25rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1rem;
    padding-right: 1rem;
    transition-property: box-shadow;
    transition-duration: 200ms;
    background-color: #f8fafc; /* bg-slate-50 */
    outline: none;
}

.input-field:focus {
    border-color: #0ea5e9; /* focus:border-primary-500 */
    background-color: #ffffff; /* focus:bg-white */
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); /* focus:ring-primary-500 */
}

.label-text {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 600; /* font-semibold */
    color: #475569; /* text-slate-600 */
    margin-bottom: 0.375rem; /* mb-1.5 */
    margin-left: 0.25rem; /* ml-1 */
}


/* Status Badges - Refined */
.badge {
    display: inline-flex;
    align-items: center;
    padding-left: 0.625rem;
    padding-right: 0.625rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #d1fae5;
}

.badge-warning {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
}

.badge-danger {
    background-color: #fff1f2;
    color: #be123c;
    border: 1px solid #ffe4e6;
}

.badge-info {
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1px solid #e0f2fe;
}

/* Table Styles - Airy */
.table-container {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.modern-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background-color: rgba(248, 250, 252, 0.5);
}

.modern-table th {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modern-table tbody {
    background-color: #ffffff;
}

.modern-table td {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 0.875rem;
    color: #475569;
}

.modern-table tr:hover td {
    background-color: rgba(248, 250, 252, 0.5);
}

/* Animations */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInSlide 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.animate-shake {
    animation: shake 0.2s ease-in-out 0s 2;
}

/* Toast */
.toast-msg {
    pointer-events: auto;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 24rem;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #f1f5f9;
    padding: 1rem;
    z-index: 9999;
    animation: slideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Floating Action Button helper for mobile (optional future use) */
.fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    height: 3.5rem;
    width: 3.5rem;
    background-color: #0284c7;
    border-radius: 9999px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    transition: all 0.3s;
    z-index: 40;
}

@media (min-width: 768px) {
    .fab {
        display: none;
    }
}