@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --accent-primary: #ff7f00;
    --accent-secondary: #ff9d33;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(255, 127, 0, 0.15);
    box-shadow: 0 15px 35px -5px rgba(255, 127, 0, 0.15);
}

.navbar {
    position: relative;
    z-index: 1050;
}

.notification-menu {
    width: min(400px, calc(100vw - 32px));
    max-height: 360px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    color: var(--text-primary);
    z-index: 1060;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.gradient-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px 0 rgba(255, 127, 0, 0.3);
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(255, 127, 0, 0.4);
}

.gradient-btn:active {
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-tertiary);
}

/* Sidebar Layout */
.portal-container {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-smooth);
}

.portal-main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: radial-gradient(circle at top right, rgba(255, 127, 0, 0.05), transparent 600px),
        radial-gradient(circle at bottom left, rgba(255, 157, 51, 0.05), transparent 600px);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.sidebar-menu-item a:hover,
.sidebar-menu-item.active a {
    color: var(--text-primary);
    background: rgba(255, 127, 0, 0.1);
    border-left: 4px solid var(--accent-primary);
}

/* Form Controls */
.form-control,
.form-select {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 12px 16px;
    transition: var(--transition-smooth);
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 127, 0, 0.2);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

/* Badge styling */
.badge-active {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-inactive {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-scheduled {
    background-color: rgba(255, 127, 0, 0.15);
    color: #ff7f00;
    border: 1px solid rgba(255, 127, 0, 0.3);
}

.badge-attended {
    background-color: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-selected {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-rejected {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Table styling */
.table {
    color: var(--text-primary);
    vertical-align: middle;
}

.table th {
    background-color: #f1f5f9;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 16px;
}

.table td {
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    background-color: transparent;
}

/* Dashboard Analytics Widgets */
.widget-card {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 127, 0, 0.1);
    color: var(--accent-primary);
}

/* Calendar Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-header-day {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px;
}

.calendar-day-cell {
    min-height: 120px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.calendar-day-cell:hover {
    background: #f8fafc;
    border-color: rgba(255, 127, 0, 0.3);
}

.calendar-day-cell.other-month {
    opacity: 0.3;
}

.calendar-day-cell.today {
    border-color: var(--accent-primary);
    background: rgba(255, 127, 0, 0.05);
}

.calendar-events-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    overflow-y: auto;
    max-height: 80px;
}

.calendar-event {
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.event-birthday {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-left: 3px solid #ec4899;
}

.event-leave {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-left: 3px solid #f59e0b;
}

.event-project {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-left: 3px solid #10b981;
}

.event-interview {
    background: rgba(255, 127, 0, 0.15);
    color: #ff7f00;
    border-left: 3px solid #ff7f00;
}

.event-holiday {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-left: 3px solid #ef4444;
}

/* Birthday Modal Styling */
.birthday-modal-content {
    background: linear-gradient(135deg, #ffffff, #fff2e6);
    border: 1px solid rgba(255, 127, 0, 0.3);
    border-radius: 24px;
    overflow: hidden;
    color: #0f172a;
}

.birthday-card-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ec4899;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* PDF/Print Layout */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .portal-sidebar,
    .no-print,
    .btn,
    .alert {
        display: none !important;
    }

    .portal-main {
        padding: 0 !important;
        background: none !important;
    }

    .glass-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .table th {
        background-color: #f1f5f9 !important;
        color: black !important;
        border-bottom: 2px solid #cbd5e1 !important;
    }

    .table td {
        border-bottom: 1px solid #e2e8f0 !important;
        color: black !important;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .portal-main {
        padding: 20px 15px;
        /* Push content below fixed mobile navbar */
        padding-top: 74px !important;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .profile-banner {
        flex-direction: column;
        text-align: center;
    }
    .profile-banner .avatar-stub {
        margin: 0 auto 10px;
    }
    .profile-banner .d-flex.gap-3 {
        justify-content: center;
        flex-wrap: wrap;
    }
    .glass-card {
        padding: 15px !important;
    }
    .stat-card::before {
        width: 80px;
        height: 80px;
        top: -20px;
        right: -20px;
    }
}

/* ===================================================
   MOBILE TOP NAVBAR & SLIDE-IN DRAWER
   =================================================== */

/* Fixed top bar — hidden on desktop, shown on mobile */
.mobile-topnav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 58px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

@media (max-width: 991.98px) {
    .mobile-topnav { display: flex; }
}

.mobile-hamburger {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1;
}
.mobile-hamburger:hover { background: rgba(255,127,0,0.08); }

/* Dark overlay behind drawer */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1199;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-drawer-overlay.show {
    display: block;
    opacity: 1;
}

/* Slide-in drawer panel */
.mobile-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 290px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}
.mobile-drawer.open {
    transform: translateX(0);
}

/* Drawer header row */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}
.mobile-drawer-close:hover {
    background: rgba(239,68,68,0.08);
    color: #ef4444;
}

/* User info row inside drawer */
.mobile-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: rgba(255,127,0,0.03);
}

/* Navigation list inside drawer */
.mobile-drawer-menu {
    list-style: none;
    padding: 10px 10px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}
.mobile-drawer-menu li {
    margin-bottom: 2px;
}
.mobile-drawer-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition-smooth);
    border-left: 3px solid transparent;
}
.mobile-drawer-menu li a i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.mobile-drawer-menu li a:hover,
.mobile-drawer-menu li.active a {
    color: var(--accent-primary);
    background: rgba(255,127,0,0.08);
    border-left-color: var(--accent-primary);
}

/* Footer buttons inside drawer */
.mobile-drawer-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}
