/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #00b074;
    --primary-light: #e6f7f2;
    --sidebar-bg: #008254;
    --bg-main: #f4f9f7;
    --card-bg: #ffffff;
    --border-color: #e6edea;
    --text-main: #14211d;
    --text-muted: #72847f;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.02), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
}

body {
    background-color: var(--bg-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

.container-fluid > .row {
    display: flex !important;
    flex-wrap: nowrap !important;
}

/* Navbar */
.navbar {
    background-color: var(--card-bg) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 2.5rem;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    color: var(--text-main) !important;
}
.navbar-brand span {
    color: var(--primary);
}

.sidebar {
    background: linear-gradient(180deg, #00563b 0%, #002d1f 100%);
    height: calc(100vh - 36px);
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    flex: 0 0 260px !important;
    margin: 18px 0 18px 18px !important;
    padding: 1.5rem 0;
    border-radius: 24px !important;
    position: sticky;
    top: 18px;
    box-shadow: 0 8px 32px rgba(0, 45, 31, 0.2);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

main {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100vh;
    overflow-y: auto;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}
main::-webkit-scrollbar {
    width: 8px;
}
main::-webkit-scrollbar-track {
    background: transparent;
}
main::-webkit-scrollbar-thumb {
    background: rgba(0, 176, 116, 0.15);
    border-radius: 10px;
}
main::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 176, 116, 0.3);
}
/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
    margin: 0.2rem 0.85rem;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    position: relative;
}
.sidebar .nav-link i {
    font-size: 1.1rem;
    opacity: 0.8;
    transition: all 0.25s ease;
}
.sidebar .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(4px);
}
.sidebar .nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}
.sidebar .nav-link.active {
    color: #00b074 !important;
    background-color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.sidebar .nav-link.active i {
    color: #00b074 !important;
    opacity: 1;
}
.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background-color: #00b074;
    border-radius: 4px;
}

.sidebar .nav-link .transition-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.7rem;
    margin-left: auto;
    flex-shrink: 0;
}
/* Rotate chevron up when dropdown is open */
.sidebar .nav-link[aria-expanded="true"] .transition-icon {
    transform: rotate(180deg);
}
.sidebar .nav-link[aria-expanded="false"] .transition-icon,
.sidebar .nav-link.collapsed .transition-icon {
    transform: rotate(0deg);
}
.sidebar-logo i {
    font-size: 1.6rem;
}
.sidebar-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.35);
    padding: 1.25rem 1.6rem 0.4rem 1.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
}
.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    border-left: 1px dashed rgba(255, 255, 255, 0.1);
    margin-left: 2rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}
.sidebar-submenu .nav-link {
    font-size: 0.82rem;
    padding: 0.55rem 1.25rem;
    margin: 0.1rem 0.5rem 0.1rem 0.5rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
}
.sidebar-submenu .nav-link::before {
    display: none;
}
.sidebar-submenu .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}
.sidebar-submenu .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: none;
}

/* Elegant Sidebar Layout */
.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    margin-bottom: 1.75rem;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.card-body {
    padding: 2rem;
}

/* Stats Layout */
.stat-card {
    border-left: 5px solid var(--primary);
}
.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background-color: rgba(75, 32, 163, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Sidebar logo */
.sidebar-logo {
    padding: 0.5rem 1.8rem 2rem 1.8rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Header bar inside content area */
.content-header {
    background-color: #ffffff;
    border-radius: 40px;
    padding: 0.75rem 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px -2px rgba(75, 32, 163, 0.05);
    border: 1px solid rgba(75, 32, 163, 0.03);
}

.search-bar-pill {
    background-color: #f1f3f9;
    border-radius: 30px;
    padding: 0.5rem 1.25rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    width: 280px;
}
.search-bar-pill::placeholder {
    color: #adb5bd;
}

.header-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #f1f3f9;
    border: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.header-icon-btn:hover {
    background-color: #e2e6f0;
}
.header-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Underline Inputs (Jobie style) */
.form-control, .form-select {
    border: none;
    border-bottom: 1.5px solid #dcdbe5;
    border-radius: 0;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: transparent;
    transition: border-color 0.25s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: none;
    background-color: transparent;
}
.form-label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* Buttons */
.btn {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.75rem;
    border-radius: 30px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(75, 32, 163, 0.2);
}
.btn-primary:hover {
    background-color: #3b1782;
    border-color: #3b1782;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(75, 32, 163, 0.3);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.btn-outline-secondary {
    color: var(--text-muted);
    border-color: #dcdbe5;
}
.btn-outline-secondary:hover {
    background-color: rgba(75, 32, 163, 0.04);
    color: var(--text-main);
}
.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
}

/* Tables */
.table {
    margin-bottom: 0;
    vertical-align: middle;
}
.table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
}
.table tbody tr:hover {
    background-color: rgba(75, 32, 163, 0.02);
}

/* Pulsing Status Indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}
.status-none {
    background-color: #10b981;
}
.status-amber {
    background-color: #f59e0b;
    animation: pulse-amber 1.8s infinite;
}
.status-orange {
    background-color: #f97316;
    animation: pulse-orange 1.4s infinite;
}
.status-red {
    background-color: #ef4444;
    animation: pulse-red 1s infinite;
}

@keyframes pulse-amber {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Leave request cards */
.leave-card {
    border: none;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.leave-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background-color: var(--primary-light);
}

/* Tabs for Operations */
#opsSubTabs .nav-link {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.85rem 1.15rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    background: transparent;
}
#opsSubTabs .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Custom Warning Letter styling */
#printSection .border {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
}

@media print {
    body * {
        visibility: hidden;
    }
    #printSection, #printSection * {
        visibility: visible;
    }
    #printSection {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none !important;
        border: none !important;
    }
}

/* Responsive layout configurations for all screens */
@media (max-width: 991.98px) {
    .container-fluid > .row {
        flex-wrap: wrap !important;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px !important;
        max-width: 280px !important;
        min-width: 280px !important;
        flex: 0 0 280px !important;
        height: 100vh;
        z-index: 1060;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0;
        padding-top: 1.5rem;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        margin: 0 !important;
    }
    .sidebar.show {
        left: 0 !important;
    }
    main {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .content-header {
        border-radius: 16px;
        padding: 0.75rem 1rem;
        margin-bottom: 1.25rem;
    }
    .search-bar-pill {
        width: 100%;
        max-width: 180px;
    }
}

@media (max-width: 575.98px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
        border-radius: 12px;
    }
    .content-header > div {
        width: 100%;
        justify-content: space-between;
    }
    .search-bar-pill {
        max-width: 100%;
    }
}

body.sidebar-collapsed .sidebar {
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    flex: 0 0 0 !important;
    padding: 1.5rem 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border-right: none !important;
    box-shadow: none !important;
}
body.sidebar-collapsed .sidebar > div {
    display: none !important;
}
body.sidebar-collapsed .sidebar .sidebar-toggle-btn {
    display: flex !important;
    right: -15px !important;
}
body.sidebar-collapsed main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
}

/* Floating Sidebar Toggle Button styled premium */
.sidebar-toggle-btn {
    position: absolute;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: -15px !important;
    width: 32px;
    height: 32px;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 86, 59, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 45, 31, 0.18) !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1060;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #00563b !important;
    padding: 0 !important;
}
.sidebar-toggle-btn:hover {
    background-color: #00b074 !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.15) !important;
    border-color: #00b074 !important;
}

/* Standout Logo styling */
.sidebar-logo {
    background: transparent !important;
    border-radius: 0;
    padding: 0.65rem 0.5rem !important;
    margin: 0 0.85rem 1.75rem 0.85rem !important;
    box-shadow: none !important;
    border: none !important;
    transition: all 0.3s ease;
}
.sidebar-logo img {
    filter: drop-shadow(0px 2px 4px rgba(255, 255, 255, 0.95)) !important;
}

