:root {
    --primary: #0C2B74;
    --primary-light: #1e4bb5;
    --accent: #E2911B;
    --accent-hover: #f1a12c;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* Premium Slim Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(12, 43, 116, 0.02);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #E2911B, #f1a12c);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E2911B;
}

/* ========================================= */
/* PHOTOREALISTIC CINEMATIC BACKGROUND       */
/* ========================================= */
.real-factory-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: url('factory_bg.webp') no-repeat center center;
    background-size: cover;
    animation: breathingBG 40s infinite alternate ease-in-out;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(12, 22, 45, 0.4) 0%, rgba(12, 22, 45, 0.9) 100%);
    backdrop-filter: blur(2px);
}

@keyframes breathingBG {
    0% {
        transform: scale(1) brightness(1);
    }

    100% {
        transform: scale(1.1) brightness(1.2);
    }
}

body {
    background: #0c162d;
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Login Card - CLEAN & PROFESSIONAL */
#login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    position: relative;
    /* 4-color gradient to ensure all corners are vibrant */
    background: linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(to bottom right, var(--primary), var(--accent), var(--primary), var(--accent)) border-box;
    border: 4px solid transparent;
    padding: 60px 50px;
    border-radius: 40px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
    z-index: 20;
    overflow: visible;
    /* Base position set to excellent state (-50px) to prevent layout shifts */
    transform: translateY(-50px);
    opacity: 0;
    animation: cardEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(-50px);
    }
}

.card-logo-container {
    margin-bottom: 40px;
}

.logo-icon-part {
    width: 80px;
    margin-bottom: 15px;
    animation: floatLogo 4s infinite ease-in-out;
}

.logo-text-part img {
    width: 240px;
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.system-title {
    font-size: 13px;
    font-weight: 900;
    margin-top: 25px;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(110deg,
            var(--accent) 30%,
            var(--primary) 45%,
            var(--primary-light) 50%,
            var(--primary) 55%,
            var(--accent) 70%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: luxuriousShine 6s linear infinite;
}

@keyframes luxuriousShine {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

/* Custom Select Structure & Layout Controls */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
    margin-bottom: 25px;
    /* Critical spacing */
}

.custom-select-wrapper.open {
    z-index: 9999 !important;
}

/* Ensure form groups don't overlap when dropdown is open */
.form-group:has(.custom-select-wrapper.open) {
    z-index: 9999 !important;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 46px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #E2911B !important;
    border-radius: 14px;
    color: #0c2b74;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    pointer-events: auto !important;
    outline: none !important;
}

.login-card .custom-select-trigger {
    height: 56px;
    border-radius: 16px;
}

input.custom-select-trigger::placeholder {
    color: #0c2b74;
    opacity: 0.7;
}

input.custom-select-trigger:focus {
    background: #ffffff;
    box-shadow: 0 0 15px rgba(226, 145, 27, 0.2);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    color: var(--primary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input,
select {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid var(--accent) !important;
    background: #ffffff;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    transition: 0.3s;
    outline: none !important;
    box-shadow: none !important;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(226, 145, 27, 0.2);
    background: #fffdf9;
}

.btn {
    width: 100%;
    padding: 18px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #1e4bb5 100%);
    color: white;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(12, 43, 116, 0.2);
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(12, 43, 116, 0.3);
}

/* ========================================= */
/* DASHBOARD & POST-LOGIN STYLES             */
/* Do NOT move or edit anything above this    */
/* ========================================= */

.container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0;
}

#dashboard {
    width: 100%;
    padding-bottom: 45vh;
}

/* Dashboard Header - Premium Glassmorphism */
.dashboard-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    padding: 20px 30px;
    border-radius: 24px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-bottom: 4px solid var(--accent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    border: 2.5px solid var(--accent);
    outline: 2px solid rgba(12, 43, 116, 0.08);
    box-shadow: 0 10px 25px rgba(12, 43, 116, 0.12);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-avatar-wrapper:hover {
    transform: scale(2.8);
    z-index: 10;
}

.user-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0C2B74, #1e4bb5) !important;
    color: white !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.user-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#greeting-text {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8 !important;
    font-weight: 850;
    margin: 0 !important;
}

.user-text h2 {
    color: #0C2B74;
    font-size: 23px;
    font-weight: 950;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

#display-jobtitle {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(12, 43, 116, 0.05);
    border: 1px solid rgba(12, 43, 116, 0.08);
    border-radius: 8px;
    font-size: 11px !important;
    color: #475569 !important;
    font-weight: 800;
    margin: 4px 0 0 0 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Stats Row - High Performance Look */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

#unified-stats-grid {
    grid-template-columns: repeat(4, 1fr) auto;
    align-items: center;
}

.refresh-stat-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: 2px solid var(--accent);
    box-shadow: 0 4px 20px rgba(12, 43, 116, 0.25), 0 0 0 1px rgba(226, 145, 27, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    grid-column: 5;
    justify-self: start;
    margin-left: 16px;
}

.refresh-stat-btn:hover {
    transform: scale(1.12) rotate(180deg);
    box-shadow: 0 8px 32px rgba(226, 145, 27, 0.4), 0 0 0 4px rgba(226, 145, 27, 0.2);
}

.refresh-stat-btn:active {
    transform: scale(0.92);
}

.refresh-stat-btn.spinning i {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* REQUEST LIST - PREMIUM GLASS CARDS */
.request-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 4px solid var(--accent);
    border-radius: 24px;
    padding: 20px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.request-item:hover {
    transform: translateX(10px) scale(1.01);
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(12, 43, 116, 0.1);
    border-color: var(--primary);
}

.req-main-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.req-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.req-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.req-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.req-dept {
    font-weight: 800;
    color: var(--primary);
    font-size: 16px;
}

.status-tag {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.req-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.dot-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbd5e1;
}

.view-btn {
    background: #f1f5f9;
    color: var(--primary);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.view-btn:hover {
    background: var(--primary);
    color: #fff;
}

.stat-card {
    background: #ffffff;
    padding: 22px 28px;
    border-radius: 24px;
    border: 1px solid rgba(12, 43, 116, 0.06);
    border-left: 5px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03);
    position: relative;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(12, 43, 116, 0.08);
}

.stat-card.stat-card-approved:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.stat-card.stat-card-pending:hover {
    border-color: rgba(226, 145, 27, 0.3);
}

.stat-card.stat-card-non-approved:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

.stat-card.stat-card-approved {
    border-left-color: #10b981;
}

.stat-card.stat-card-pending {
    border-left-color: #f59e0b;
}

.stat-card.stat-card-non-approved {
    border-left-color: #ef4444;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.stat-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    margin-left: 40px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.stat-card-approved .stat-icon-box {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
    border: 1px solid rgba(16,185,129,0.2);
    color: #10b981;
}

.stat-card-pending .stat-icon-box {
    background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.05));
    border: 1px solid rgba(245,158,11,0.2);
    color: #f59e0b;
}

.stat-card-non-approved .stat-icon-box {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.05));
    border: 1px solid rgba(239,68,68,0.2);
    color: #ef4444;
}

.stat-card:hover .stat-icon-box {
    transform: scale(1.08);
}

.time-filter-bar {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.time-filter-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.time-filter-btn.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.time-filter-btn.active[data-card="nonApproved"] {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.time-filter-btn.active[data-card="pending"] {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.stat-card .label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-card .sub-value {
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
}

.stat-sub-info {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-sub-info i {
    font-size: 10px;
    margin-right: 1px;
}

.stat-sub-info .dot-separator {
    display: none;
}

.dot-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-indicator.green {
    background-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.dot-indicator.amber {
    background-color: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.dot-indicator.red {
    background-color: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.dot-separator {
    color: #cbd5e1;
    font-weight: normal;
    margin: 0 2px;
}

.trend-indicator {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.trend-indicator.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Section Titles - WHITE FOR DARK BG */
.section-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.section-title::before {
    content: '';
    width: 6px;
    height: 24px;
    border-radius: 5px;
    background: var(--accent);
}

/* Section header logic handled in the premium section below */

/* Shift Cards - Premium Redesign */
/* Shift Grid Layout */
.shift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.shift-card {
    background: #ffffff;
    padding: 0px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(12, 43, 116, 0.05);
    border-bottom: 4px solid var(--accent);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.shift-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(12, 43, 116, 0.02) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
    /* Move behind content */
}

.shift-card:hover {
    transform: translateY(-8px);
}

.shift-card:hover::before {
    opacity: 1;
}

#day-shift-card:hover {
    box-shadow: 0 30px 60px rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.4);
}

#night-shift-card:hover {
    box-shadow: 0 30px 60px rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
}

.shift-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#day-shift-card:hover .shift-icon {
    transform: scale(1.2) rotate(12deg);
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.85)) drop-shadow(0 0 30px rgba(245, 158, 11, 0.5));
}

#night-shift-card:hover .shift-icon {
    transform: scale(1.2) rotate(-12deg);
    filter: drop-shadow(0 0 15px rgba(147, 197, 253, 0.85)) drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
}

.shift-card h3 {
    color: #0c2b74;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.6px;
}

.shift-card p {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0.7;
    line-height: 1.5;
}

.shift-actions-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-step {
    background: linear-gradient(135deg, #0c2b74 0%, #1e3a8a 100%) !important;
    color: #fff !important;
    padding: 12px 35px !important;
    border-radius: 16px !important;
    border: none !important;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 12px 30px rgba(12, 43, 116, 0.2) !important;
    min-width: 240px;
    position: relative;
    /* Required for z-index */
    z-index: 10;
    /* Bring to front */
}

.btn-step:hover:not(:disabled) {
    background: linear-gradient(135deg, #E2911B 0%, #f59e0b 100%) !important;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 40px rgba(226, 145, 27, 0.35) !important;
}

.step-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2.5px;
    opacity: 0.8;
    text-transform: uppercase;
}

.btn-step strong {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Locked/Disabled States */
.btn-step:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
}

.shift-card.locked {
    filter: blur(2px) grayscale(0.9);
    opacity: 0.65;
    transform: scale(0.98);
    box-shadow: none;
}

.shift-card.locked:hover {
    transform: scale(0.98);
    /* Disable lift on hover for locked */
    border-color: rgba(12, 43, 116, 0.1);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 22, 45, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center by default */
    z-index: 10000;
    padding: 40px 20px;
    overflow-y: auto;
    /* Enable page-level scroll if needed */
}

/* Ensure modal content fits screen */
.modal-content.modal-premium {
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    margin: auto;
    border-radius: 25px;
    /* Reduced from 50px to allow slimmer bottom */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 100px 150px -50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(12, 43, 116, 0.05);
}

.excel-body-container {
    overflow-y: auto;
    padding: 25px 60px 10px;
    /* Reduced top padding to raise content */
}

.modal-header-excel {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 30px 60px;
    position: relative;
    border-bottom: none;
}

/* Futuristic Gold Divider line */
.modal-header-excel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, #E2911B, transparent);
    opacity: 0.5;
}

.shift-indicator-premium {
    background: linear-gradient(135deg, #E2911B, #f1a12c);
    color: white;
    padding: 10px 30px;
    border-radius: 100px;
    font-weight: 950;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    box-shadow: 0 15px 30px rgba(226, 145, 27, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(226, 145, 27, 0.6);
    animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 10px rgba(226, 145, 27, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(226, 145, 27, 0.7);
    }

    100% {
        box-shadow: 0 0 10px rgba(226, 145, 27, 0.4);
    }
}

.excel-doc-title {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 350px;
    margin-top: -5px;
    padding-right: 60px;
    /* Space for the close button */
}

.excel-doc-title h2 {
    font-size: 20px;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    color: #0c2b74 !important;
    letter-spacing: -0.5px;
}

.excel-doc-title p {
    font-size: 12px;
    font-weight: 950;
    margin: 3px 0 0;
    color: #E2911B !important;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Premium Inputs with Aura Effect */
.excel-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px 22px;
    font-size: 16px;
    font-weight: 800;
    color: #0c2b74;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

.excel-input:focus {
    background: white;
    border-color: #E2911B;
    box-shadow: 0 15px 35px rgba(226, 145, 27, 0.15), 0 0 0 5px rgba(226, 145, 27, 0.05);
    transform: translateY(-3px) scale(1.02);
}

.excel-input-with-icon {
    width: 100%;
    background: transparent;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #0c2b74;
    outline: none;
    transition: all 0.3s ease;
}

/* Fix browser autofill blue background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #0c2b74 !important;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 0 20px;
    transition: all 0.3s ease;
}

.input-icon-wrapper:focus-within {
    background: white;
    border-color: #E2911B;
    box-shadow: 0 10px 25px rgba(226, 145, 27, 0.1);
}

.input-icon-fixed {
    font-size: 13px;
    opacity: 0.6;
    margin-right: 12px;
}

/* Integrated Action Row inside Upper Box */
.excel-action-row {
    background: rgba(12, 43, 116, 0.02);
    border-top: 1px solid rgba(12, 43, 116, 0.08);
    padding: 15px 25px;
    margin: 10px -25px -25px;
    /* Restored previous spacing */
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.action-controls-wrap {
    flex: 1;
    display: flex;
    gap: 20px;
    align-items: center;
}

.excel-action-row .custom-select-wrapper {
    margin-bottom: 0 !important;
    flex: 1;
}

.btn-add-modern {
    background: linear-gradient(to right, #E2911B, #f1a12c);
    color: white;
    border: none;
    padding: 0 25px;
    height: 46px;
    /* Matched to trigger height */
    border-radius: 14px;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 8px 20px rgba(226, 145, 27, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-add-modern:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(226, 145, 27, 0.4);
    letter-spacing: 2px;
}

/* Action Stats Styles */
.stats-divider {
    height: 40px;
    width: 1px;
    background: rgba(12, 43, 116, 0.1);
    margin: 0 10px;
}

.action-stats-container {
    display: flex;
    gap: 25px;
    padding-left: 10px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.stat-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0px;
}

.stat-value {
    color: #E2911B;
    font-size: 20px;
    font-weight: 950;
    line-height: 1.1;
}

/* Floating Close Button - Elite Design */
.close-btn-floating {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: rgba(12, 43, 116, 0.05);
    border: 1px solid rgba(12, 43, 116, 0.1);
    color: #0c2b74;
    border-radius: 14px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.close-btn-floating:hover {
    background: #f43f5e;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3);
}

/* Premium Table Styling - Carbon Elite */
.excel-table-container {
    border-radius: 35px;
    overflow: hidden;
    border: 1px solid rgba(12, 43, 116, 0.08);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.06);
    background: white;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
}

.excel-table th {
    background: linear-gradient(to bottom, #0c2b74, #0a2461);
    color: #ffffff;
    padding: 20px 15px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-bottom: 3px solid #E2911B;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

.excel-table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(12, 43, 116, 0.05);
    font-weight: 600;
    color: #0c2b74;
    font-size: 13.5px;
    transition: all 0.2s ease;
}

/* Subtle Table Inputs */
.excel-input-inline {
    width: 100%;
    background: transparent !important;
    border: 1px solid transparent;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #0c2b74;
    transition: all 0.3s ease;
    text-align: center;
}

.excel-input-inline:hover {
    background: rgba(12, 43, 116, 0.03) !important;
    border-color: rgba(12, 43, 116, 0.1);
}

.excel-input-inline:focus {
    background: white !important;
    border-color: #E2911B;
    box-shadow: 0 5px 15px rgba(226, 145, 27, 0.1);
    outline: none;
    transform: scale(1.05);
}

/* Professional Delete Button */
.btn-delete-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(244, 63, 94, 0.05);
    color: #f43f5e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-delete-icon:hover {
    background: #f43f5e;
    color: white;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(244, 63, 94, 0.3);
}

.excel-table tr:last-child td {
    border-bottom: none;
}

.excel-table tr:hover td {
    background: rgba(226, 145, 27, 0.03);
    color: #E2911B;
}

/* Empty State Styling */
.table-empty-msg {
    padding: 30px 40px;
    /* Reduced from 80px to 30px to close the gap */
    text-align: center;
    background: #ffffff;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
    filter: grayscale(1);
}

.table-empty-msg p {
    color: #94a3b8;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.modal-footer-premium {
    padding: 8px 40px;
    display: flex;
    justify-content: center;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.btn-submit-premium {
    background: linear-gradient(135deg, #0c2b74 0%, #1e4bb5 100%);
    color: white;
    border: none;
    padding: 10px 40px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(12, 43, 116, 0.2);
}

.btn-submit-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(12, 43, 116, 0.3);
}

.btn-submit-premium span {
    font-size: 18px;
}

.request-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 40px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.02);
}

.excel-input-group label {
    display: block;
    font-size: 10px;
    font-weight: 950;
    color: #94a3b8;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.excel-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    color: #0c2b74;
}

.excel-table tr:hover td {
    background: #f8fafc;
}

.excel-table input {
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 800;
    color: #0c2b74;
    text-align: center;
}

.excel-table input:focus {
    background: white;
    border-color: #E2911B;
    outline: none;
}

/* Footer and Submit Button consolidated above */
.btn-submit-premium:active {
    transform: scale(0.98);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-header h2 {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.close-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: none;
    background: #f1f5f9;
    font-size: 22px;
    cursor: pointer;
    color: var(--primary);
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Form Grid */
.form-section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(to bottom, var(--accent), var(--primary));
}

.employee-selector-box {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid #edf2f7;
}

/* Select in modals */
select {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid #edf2f7;
    background: #ffffff;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: 0.3s;
}

select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 16px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
    color: #334155;
}

tr:hover td {
    background: #f8fafc;
}

/* Toast Notifications */
#notification-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100000;
}

.toast {
    padding: 18px 30px;
    border-radius: 16px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.4s forwards, toastOut 0.4s 9.5s forwards;
}

.toast-info {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.toast-success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.toast-error {
    background: #ffffff;
    color: var(--primary);
    border: 2px solid var(--accent);
    border-left: 8px solid var(--accent);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    border: none;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ========================================= */
/* PREMIUM FORM MODAL STYLES                 */
/* ========================================= */

.modal-premium {
    padding: 0 !important;
    overflow: hidden;
    max-width: 1400px !important;
}

/* Ultra-Compact Modal Header */
.modal-header-premium {
    position: relative;
}

.modal-header-stripe {
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent), var(--primary));
}

.modal-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px 8px;
}

.modal-header-content h2 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
}

.modal-subtitle {
    color: #94a3b8;
    font-size: 11px;
    margin-top: 0px;
    font-weight: 500;
}

.close-btn-premium {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    background: #fff;
    font-size: 18px;
    cursor: pointer;
    color: #94a3b8;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn-premium:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

/* Ultra-Compact Form Body */
.modal-premium form {
    display: flex;
    flex-direction: column;
    max-height: 75vh;
    padding: 0;
}

.form-body-scroll {
    overflow-y: auto;
    padding: 5px 30px 10px;
    flex: 1;
}

.form-footer-fixed {
    padding: 10px 30px 20px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

/* Streamlined Step Layout */
.form-step {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 8px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.form-step:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    background: transparent;
    border-bottom: none;
}

.step-number {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
}

.step-label {
    font-weight: 800;
    color: var(--primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-body {
    padding: 5px 0px;
}

/* Compact Picker Row */
.employee-picker-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
}

.add-emp-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(226, 145, 27, 0.2);
    transition: 0.3s;
}

/* Tiny Stats Row */
.stats-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #edf2f7;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
}

.stat-chip strong {
    color: var(--primary);
    font-size: 13px;
}

/* Micro Table Container */
.table-container-premium {
    border-radius: 12px;
    border: 1px solid #edf2f7;
    background: #fff;
    max-height: 450px;
    overflow-y: auto;
    position: relative;
}

/* Ensure scrollbar is always visible when needed */
.table-container-premium::-webkit-scrollbar {
    width: 6px;
}

.table-container-premium::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.table-container-premium th {
    padding: 12px 15px;
    font-size: 11px;
}

.table-container-premium td {
    padding: 10px 15px;
    font-size: 14px;
}

/* Tiny Batch Reason Box */
.batch-reason-box {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #fed7aa;
    background: #fffbeb;
}

.batch-reason-box label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
}

.batch-reason-box input {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
}

/* Compact Submit Button */
.submit-btn-premium {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 15px;
    margin-top: 8px;
}

/* ========================================= */
/* ========================================= */
:root {
    --primary: #0C2B74;
    /* SPF Brand Blue */
    --primary-light: #1e4bb5;
    --accent: #E2911B;
    /* SPF Brand Gold/Orange */
    --accent-glow: rgba(226, 145, 27, 0.2);
    --bg-soft: #f8fafc;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
}

body {
    background: radial-gradient(circle at top right, #f1f5f9, #e2e8f0);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.modal-content {
    background: var(--white);
    border-radius: 40px;
    box-shadow: 0 50px 100px -20px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--white);
    overflow: hidden;
    position: relative;
}

.modal-header-excel {
    background: var(--white);
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
}

.stats-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stats-grid-premium .stat-chip {
    background: #fff;
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.stats-grid-premium .stat-chip strong {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-branding-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.excel-logo-box-full {
    display: flex;
    align-items: center;
    gap: 12px;
}

.excel-logo-box-full .logo-icon-p {
    height: 60px;
}

.excel-logo-box-full .logo-text-p {
    height: 50px;
    margin-top: 5px;
}

.excel-doc-title {
    text-align: right;
    padding-right: 40px;
}

.excel-doc-title h2 {
    font-size: 14px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1px;
}

.excel-doc-title p {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    margin-top: 2px;
}

.shift-indicator-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.shift-indicator-premium {
    padding: 8px 25px;
    border-radius: 50px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(226, 145, 27, 0.6);
}


.close-btn-excel {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-soft);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.close-btn-excel:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: translateY(-50%) rotate(90deg);
}

.compact-form-header {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 20px 25px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.excel-input,
.excel-select {
    background: var(--white) !important;
    border: 2px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-row-compact {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 0;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.add-emp-btn {
    background: linear-gradient(135deg, var(--accent), #f59e0b) !important;
    border-radius: 14px !important;
    height: 45px !important;
    padding: 0 25px !important;
    box-shadow: 0 8px 16px -4px var(--accent-glow) !important;
}

.stat-chip {
    padding: 6px 15px;
    border-radius: 14px;
    font-size: 11px;
}

.stat-chip strong {
    font-size: 13px;
}

.table-container-premium {
    margin-top: 15px;
    border-radius: 20px;
}

#overtime-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.form-body-scroll {
    padding: 25px 40px;
    flex: 1;
    overflow-y: auto;
}

.form-footer-fixed {
    padding: 20px 40px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    width: 100%;
}

.submit-btn-premium {
    background: linear-gradient(180deg, var(--primary) 0%, #081d4f 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 14px 45px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: fit-content !important;
    min-width: 250px;
    margin: 0 auto !important;
    display: block;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 20px -5px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}

.submit-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.2),
        0 20px 30px -10px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    filter: brightness(1.2);
}

.submit-btn-premium:active {
    transform: translateY(2px) scale(0.97);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 10px rgba(0, 0, 0, 0.4) !important;
    filter: brightness(0.9);
}

.submit-btn-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.submit-btn-premium:hover::after {
    left: 100%;
}

.excel-input-inline {
    width: 100%;
    border: 1px solid var(--border) !important;
    background: var(--white) !important;
    padding: 6px !important;
    border-radius: 8px !important;
    text-align: center;
    font-weight: 800 !important;
    color: var(--primary);
    font-size: 13px;
}

.form-row-compact {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 20px;
}

.form-row-compact:last-child {
    margin-bottom: 0;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.employee-picker-row {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.picker-select-wrap {
    flex: 1;
}

.stats-row-inline {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.stat-icon {
    font-size: 18px;
}

.stat-chip strong {
    font-size: 16px;
    color: var(--primary);
    font-weight: 900;
}

.table-container-premium {
    background: var(--white);
    border-radius: 24px;
    border: 1px solid var(--border);
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.btn-delete-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
}

.btn-delete-icon:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.1);
}

.btn-zero-hours {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.05);
}

.btn-zero-hours:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-zero-hours.undo-mode {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.05);
}

.btn-zero-hours.undo-mode:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Scrollbar Delight */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.form-footer-fixed {
    padding: 30px 50px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

/* Print PDF Button */
.print-btn-excel {
    padding: 0 30px;
    height: 50px;
    border: 2px solid var(--primary);
    background: var(--white);
    border-radius: 16px;
    cursor: pointer;
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(12, 43, 116, 0.1);
}

.print-btn-excel:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(12, 43, 116, 0.2);
}

/* ========================================= */
/* PREMIUM SIGNATURE MANAGEMENT UI           */
/* ========================================= */
.signature-profile-container {
    padding: 8px 14px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 16px;
    border: 1.5px solid rgba(12, 43, 116, 0.08);
    border-left: 4px solid #0C2B74;
    /* Elegant corporate deep blue to match Logout button and theme */
    box-shadow: 0 10px 30px rgba(12, 43, 116, 0.04), inset 0 1px 2px #fff;
    min-width: 220px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.signature-profile-container:hover {
    box-shadow: 0 15px 35px rgba(12, 43, 116, 0.08), 0 0 15px rgba(12, 43, 116, 0.15);
    /* Sleek blue glow */
    transform: translateY(-2px);
    border-color: rgba(12, 43, 116, 0.12);
    border-left-color: #1e4bb5;
    /* Brighter royal blue on hover */
}

.sig-state {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-modern-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
}

.btn-modern-upload:hover {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
}

.btn-modern-upload .icon {
    font-size: 22px;
}

.btn-modern-upload .main-text {
    font-weight: 800;
    font-size: 13px;
    color: var(--primary);
}

.btn-modern-upload .sub-text {
    font-size: 10px;
    color: #64748b;
    font-weight: 700;
}

.sig-preview-wrapper {
    position: relative;
    width: 140px;
    height: 55px;
    background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px);
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid rgba(12, 43, 116, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Security Watermark text across the signature box */
.sig-preview-wrapper::before {
    content: "SPF SECURE";
    position: absolute;
    font-size: 7px;
    font-weight: 950;
    color: rgba(12, 43, 116, 0.08);
    letter-spacing: 3px;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 1;
    text-transform: uppercase;
}

/* 🛡️ SECURED shield badge in bottom right */
.sig-preview-wrapper::after {
    content: "🛡️ SECURED";
    position: absolute;
    bottom: 3px;
    right: 5px;
    font-size: 6.5px;
    font-weight: 900;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 3;
    pointer-events: none;
    border: 0.5px solid rgba(16, 185, 129, 0.2);
}

#header-sig-img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    filter: blur(1.5px) opacity(0.85) drop-shadow(0 2px 4px rgba(12, 43, 116, 0.15));
    mix-blend-mode: multiply;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Micro-interaction: slightly clear the signature on hover to view it cleanly but keep screenshot protection active */
.sig-preview-wrapper:hover #header-sig-img {
    filter: blur(0.8px) opacity(0.95) drop-shadow(0 3px 6px rgba(12, 43, 116, 0.2));
}

.sig-action-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sig-btn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 12px;
    border: 1.5px solid rgba(12, 43, 116, 0.06);
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.sig-btn-new:hover {
    background: #f8fafc;
    transform: translateX(3px);
    box-shadow: 0 4px 8px rgba(12, 43, 116, 0.05);
}

.sig-btn-new.update:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.03);
}

.sig-btn-new.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.03);
}

.sig-btn-new .icon {
    font-size: 12px;
}

/* Locked Button State Enhancement */
.btn-step.locked-sig {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed !important;
    position: relative;
}

.btn-step.locked-sig::after {
    content: "🔒";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
}

/* Locked Print Button */
.print-btn-excel.btn-locked-print {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border: 1px dashed #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.8;
}

.print-btn-excel.btn-locked-print:hover {
    background: #f1f5f9 !important;
}

/* Workflow Grouping Styles */
.workflow-group {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(12, 43, 116, 0.04);
}

.workflow-header {
    background: #f8fafc;
    padding: 12px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workflow-id {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.workflow-content {
    padding: 10px 0;
}

.workflow-item {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.workflow-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 50px;
    bottom: -15px;
    width: 2px;
    height: 30px;
    background: #e2e8f0;
    z-index: 1;
}

.workflow-item:last-child {
    background: rgba(12, 43, 116, 0.02);
}

.workflow-badge-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workflow-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
}

.workflow-meta {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.workflow-step-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    color: #94a3b8;
    z-index: 2;
}

.workflow-item.active .workflow-step-indicator {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Modal Core Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 22, 45, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    /* Super High to stay above everything */
    padding: 20px;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 1100px;
    max-height: 95vh;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    /* Above regular modals */
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 22, 45, 0.5);
    backdrop-filter: blur(5px);
}

/* Workflow Timeline Styles */
.workflow-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 40px;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
    border-radius: 20px;
    margin: 20px 0;
    position: relative;
    overflow: visible;
    border: 1px solid #edf2f7;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
}

.timeline-progress {
    position: absolute;
    top: 50%;
    left: 60px;
    height: 4px;
    background: linear-gradient(to right, #10b981, var(--primary));
    z-index: 2;
    transform: translateY(-50%);
    transition: width 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-radius: 2px;
}

.timeline-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    width: 100px;
}

.workflow-group {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 372px;
}

.workflow-group:hover {
    transform: translateY(-5px);
}

.workflow-header-premium {
    padding: 12px 20px;
    background: rgba(248, 250, 252, 0.5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-center {
    flex: 1;
    justify-content: center;
}

.btn-download-combined {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-download-combined:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #34d399, #10b981);
}

.btn-download-combined:active {
    transform: translateY(1px) scale(0.95);
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.2);
}

.wf-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* wf-date and wf-time relocated to step card metadata capsules */

.wf-dept {
    font-size: 10px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1px;
    background: rgba(12, 43, 116, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
}

.wf-creator {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    background: rgba(71, 85, 105, 0.08);
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.wf-creator:hover {
    background: rgba(71, 85, 105, 0.12);
    color: #1e293b;
}

.wf-role {
    font-size: 11px;
    font-weight: 800;
    color: #0369a1;
    background: rgba(3, 105, 161, 0.08);
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.wf-role:hover {
    background: rgba(3, 105, 161, 0.12);
    color: #075985;
}

/* Master Timeline Styles */
.master-timeline-container {
    padding: 20px 40px 15px 40px;
    background: #fff;
}

.workflow-steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(226, 232, 240, 0.6);
}

.workflow-step-card {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    background: rgba(12, 43, 116, 0.05);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}

.step-type {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.step-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.meta-capsule {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: rgba(100, 116, 139, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.meta-capsule:hover {
    background: rgba(100, 116, 139, 0.10);
    color: #1e293b;
}

.status-pill {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-accent-sm {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-accent-sm:hover {
    background-position: right center;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.btn-accent-sm:hover .btn-icon {
    animation: checkBounce 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.btn-accent-sm:active {
    transform: translateY(0) scale(0.98);
}

@keyframes checkBounce {
    0% {
        transform: translateY(0) scale(1);
    }

    30% {
        transform: translateY(-3px) scale(1.2) rotate(-8deg);
    }

    50% {
        transform: translateY(1px) scale(0.9) rotate(3deg);
    }

    80% {
        transform: translateY(-1px) scale(1.05);
    }

    100% {
        transform: translateY(0) scale(1.1);
    }
}

.btn-danger-sm {
    background: #fff1f2;
    color: #e11d48;
    border: 1.5px solid #fda4af;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger-sm:hover {
    background: #ffe4e6;
    border-color: #f43f5e;
    color: #be123c;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.12);
}

.btn-danger-sm:hover .btn-icon {
    transform: rotate(90deg) scale(1.1);
}

.btn-danger-sm:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary-outline {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-details-action {
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid #cbd5e1;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 2px 4px rgba(71, 85, 105, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-details-action:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(71, 85, 105, 0.08);
}

.btn-details-action:hover .btn-icon {
    transform: scale(1.1) translate(1px, -1px);
}

.btn-details-action:active {
    transform: translateY(0) scale(0.98);
}

.btn-edit-action {
    background: #f0f5ff;
    color: #1e40af;
    border: 1.5px solid #bfdbfe;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-edit-action:hover {
    background: #e0f2fe;
    border-color: #93c5fd;
    color: #1e3a8a;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.08);
}

.btn-edit-action:hover .btn-icon {
    transform: rotate(-15deg) scale(1.1);
}

.btn-edit-action:active {
    transform: translateY(0) scale(0.98);
}

.btn-cancel-action {
    background: #fff1f2;
    color: #e11d48;
    border: 1.5px solid #fda4af;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 2px 4px rgba(225, 29, 72, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cancel-action:hover {
    background: #ffe4e6;
    border-color: #f43f5e;
    color: #be123c;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.12);
}

.btn-cancel-action:hover .btn-icon {
    transform: scale(1.1);
}

.btn-cancel-action:active {
    transform: translateY(0) scale(0.98);
}

.btn-return-action {
    background: #fff7ed;
    color: #ea580c;
    border: 1.5px solid #fed7aa;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-return-action:hover {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.12);
}

.btn-return-action:hover .btn-icon {
    transform: rotate(-120deg);
}

.btn-return-action:active {
    transform: translateY(0) scale(0.98);
}

.btn-resubmit-action {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: white;
    border: none;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-resubmit-action:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
}

.btn-resubmit-action:hover .btn-icon {
    transform: rotate(180deg) scale(1.1);
}

.btn-resubmit-action:active {
    transform: translateY(0) scale(0.98);
}

.empty-step-slot {
    background: rgba(248, 250, 252, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    font-style: italic;
    min-height: 120px;
}

.workflow-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
    border-radius: 2px;
}

.timeline-progress {
    position: absolute;
    top: 14px;
    left: 0;
    height: 4px;
    background: #10b981;
    z-index: 2;
    transition: width 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    border-radius: 2px;
}

.timeline-progress::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.timeline-step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: help;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 900;
}

.timeline-step.completed .step-dot {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.timeline-step.active .step-dot {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
    box-shadow: 0 0 20px rgba(12, 43, 116, 0.2);
    transform: scale(1.3);
}

.timeline-step.rejected .step-dot {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
}

.timeline-step.returned .step-dot {
    border-color: #ea580c;
    background: #ea580c;
    color: #fff;
}

.step-label-timeline {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.timeline-step.completed .step-label-timeline {
    color: #10b981;
}

.timeline-step.active .step-label-timeline {
    color: var(--primary);
    font-weight: 900;
}

.timeline-step:hover {
    z-index: 200;
}

.step-tooltip {
    position: absolute;
    bottom: calc(100% + 20px);
    background: #1e293b;
    color: #fff;
    padding: 15px 20px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    width: 240px;
    text-align: center;
}

.timeline-step:hover .step-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.step-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: #1e293b;
}

.tooltip-title {
    display: block;
    font-weight: 900;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.responsible-names {
    color: #e2e8f0;
    font-weight: 600;
}

.switcher-divider {
    width: 2px;
    height: 25px;
    background: #e2e8f0;
    margin: 0 5px;
    align-self: center;
}

.dashboard-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent);
    padding: 4px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    gap: 4px;
    position: relative;
}

.switch-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.switch-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 15px rgba(12, 43, 116, 0.2);
}

.switch-btn:hover:not(.active) {
    color: var(--primary);
    background: #f8fafc;
}

.switch-btn .icon {
    font-size: 16px;
}

.empty-step-slot.action-slot {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(12, 43, 116, 0.05) 100%);
    border: 2px dashed rgba(16, 185, 129, 0.2);
}

.action-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.action-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.action-text {
    font-size: 13px;
    font-weight: 800;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary-glow {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}

.btn-primary-glow:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
}

/* Inherits new consolidated premium executive avatar styles from line 314 */

.avatar-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 43, 116, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.user-avatar-wrapper:hover .avatar-edit-overlay {
    opacity: 0;
}

/* Magic Magic Glow Animation */
@keyframes magic-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 136, 0, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 25px 10px rgba(255, 136, 0, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 136, 0, 0);
        transform: scale(1);
    }
}

.btn-magic-glow {
    animation: magic-pulse 0.8s ease-out;
    position: relative;
    z-index: 10;
}

/* ========================================= */
/* DUAL-HUB PROFESSIONAL SWITCHER           */
/* ========================================= */
.switcher-hub {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 12px 24px;
    gap: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hub-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    padding-left: 5px;
}

.hub-buttons {
    display: flex;
    gap: 10px;
}

.hub-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 8px 0;
}

/* Unified Action Bar - Light Glass Theme (Matches Header) - ENLARGED */
.section-header-row {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px 35px;
    /* Increased padding */
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-bottom: 4px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 45px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.section-header-row:has(.custom-select-wrapper.open) {
    z-index: 10500 !important;
}

.switcher-hub {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(12, 43, 116, 0.05);
    padding: 8px;
    /* Slightly larger padding */
    border-radius: 22px;
    border: 1px solid rgba(12, 43, 116, 0.05);
}

.hub-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-label {
    font-size: 10px;
    /* Slightly larger label */
    font-weight: 800;
    color: #64748b;
    letter-spacing: 2px;
    padding-left: 12px;
    text-transform: uppercase;
}

.hub-buttons {
    display: flex;
    gap: 6px;
}

.hub-divider {
    width: 1px;
    height: 30px;
    background: rgba(12, 43, 116, 0.1);
    margin: 0 5px;
}

.switch-btn {
    padding: 8px 16px;
    /* Compact buttons */
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #0c2b74;
    font-weight: 700;
    font-size: 13px;
    /* Compact font */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-btn .icon {
    font-size: 18px;
}

/* Larger Icons */
.switch-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #E2911B;
}

.switch-btn.active {
    background: #ffffff;
    color: #E2911B;
    box-shadow: 0 8px 20px rgba(12, 43, 116, 0.08);
    transform: translateY(-1px);
}

.switch-btn .icon {
    font-size: 16px;
}

.search-filter-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-select-filter {
    margin: 0 !important;
    position: relative;
}

.custom-select-filter.open {
    z-index: 99999 !important;
    /* Ensure it stays above stats cards */
}

/* Match Filters & Search to Light Glass Theme - Professional Interaction */
.custom-select-filter .custom-select-trigger {
    background: #ffffff;
    border: 1px solid rgba(12, 43, 116, 0.12) !important;
    /* Subtle default border */
    color: #0c2b74;
    height: 48px;
    border-radius: 16px;
    font-size: 14.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    margin: 0 !important;
    padding: 0 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-filter:hover .custom-select-trigger,
.custom-select-filter.open .custom-select-trigger {
    border-color: #E2911B !important;
    /* Gold only on interaction */
    box-shadow: 0 5px 15px rgba(226, 145, 27, 0.1);
    transform: translateY(-1px);
}

#request-search {
    background: #ffffff;
    border: 1px solid rgba(12, 43, 116, 0.1) !important;
    border-radius: 12px;
    padding: 0 16px;
    height: 38px;
    /* Compact */
    font-size: 13px;
    font-weight: 600;
    color: #0c2b74;
    transition: all 0.3s ease;
    width: 180px;
    /* Compact elegant width */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    margin: 0;
    display: flex;
    align-items: center;
}

#request-search:focus {
    border-color: #E2911B !important;
    box-shadow: 0 8px 25px rgba(226, 145, 27, 0.15) !important;
    outline: none;
}

/* Compact variant for dashboard filters - kept here for context */
.custom-select-filter .custom-select-trigger {
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    min-width: 130px;
    /* Perfectly compact width */
    gap: 8px;
    /* Prevents overlap completely */
    height: 38px;
    /* Match height of other components */
}

.custom-select-filter .custom-option {
    padding: 12px 18px;
    font-size: 13px;
}

.custom-select-filter .custom-select-trigger:after {
    width: 6px;
    height: 6px;
}

.custom-select-wrapper.open {
    z-index: 99999 !important;
    /* Force it to stay above everything when open */
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #E2911B;
    background: #fff;
    box-shadow: 0 10px 30px rgba(226, 145, 27, 0.15);
    transform: translateY(-2px);
}

.custom-select-trigger:after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 3px solid #E2911B;
    border-bottom: 3px solid #E2911B;
    transform: rotate(45deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-right: 4px;
    margin-top: -4px;
}

.custom-select-wrapper.open .custom-select-trigger:after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.custom-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: #ffffff;
    /* Solid background to prevent see-through overlapping */
    border-radius: 24px;
    border: 1px solid rgba(12, 43, 116, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    display: none;
    overflow: hidden;
    z-index: 1001;
    animation: premiumFadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.options-list-scroll {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #E2911B rgba(0, 0, 0, 0.05);
}

.options-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.options-list-scroll::-webkit-scrollbar-thumb {
    background: #E2911B;
    border-radius: 10px;
}

.custom-select-wrapper.open .custom-options {
    display: block;
}

/* Seamless Fusion - Icon + Input as one unit */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white) !important;
    border: 2px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 0 16px;
    height: 42px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: text;
}

.input-icon-wrapper:focus-within {
    background: #ffffff !important;
    border-color: #E2911B !important;
    box-shadow: 0 10px 30px -10px rgba(226, 145, 27, 0.3);
    transform: scale(1.02);
}

.input-icon-fixed {
    font-size: 13px;
    margin-right: 12px;
    opacity: 0.7;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.excel-input-with-icon {
    flex: 1;
    border: none !important;
    background: transparent !important;
    height: 100%;
    padding: 0 !important;
    font-size: 14px;
    font-weight: 600;
    color: #0c2b74;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.input-icon-wrapper:focus-within .input-icon-fixed {
    opacity: 1;
    transform: rotate(-10deg);
}

/* Smart Vanish: Icon disappears only when user types */
.input-icon-wrapper:has(.excel-input-with-icon:not(:placeholder-shown)) .input-icon-fixed {
    width: 0;
    margin-right: 0;
    opacity: 0;
    transform: scale(0);
    overflow: hidden;
}

.custom-option {
    padding: 16px 24px;
    color: #1e293b;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(12, 43, 116, 0.05);
    color: #0c2b74;
    padding-left: 32px;
}

.custom-option.selected {
    background: rgba(226, 145, 27, 0.1);
    color: #E2911B;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-option.selected::after {
    content: '✓';
    font-weight: 900;
    color: #E2911B;
    margin-left: 10px;
}

@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modern Input Enhancements for Date/Time */
input[type="date"],
input[type="time"] {
    position: relative;
    cursor: pointer;
}

/* Icons are handled by JS showPicker now, keep them visible */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    /* Subtle visibility */
    transition: opacity 0.2s;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Remove default blue highlight from focused date/time input segments */
input[type="time"]::-webkit-datetime-edit-hour-field:focus,
input[type="time"]::-webkit-datetime-edit-minute-field:focus,
input[type="time"]::-webkit-datetime-edit-ampm-field:focus,
input[type="date"]::-webkit-datetime-edit-day-field:focus,
input[type="date"]::-webkit-datetime-edit-month-field:focus,
input[type="date"]::-webkit-datetime-edit-year-field:focus {
    background-color: transparent !important;
    color: inherit !important;
    outline: none !important;
}

/* Table Pagination styling for Employee Portal */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0 0 24px 24px;
}

.pagination-info {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 4px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(226, 145, 27, 0.3);
    transform: translateY(-2px);
}

.pagination-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-current {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    padding: 0 12px;
}

/* Rows selector specific premium styling */
.rows-select-wrapper {
    position: relative;
    width: 75px !important;
    display: inline-block;
    user-select: none;
    margin: 0 8px;
}

.rows-select-wrapper .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(15, 23, 42, 0.15) !important;
    border-radius: 8px;
    color: #0f172a;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rows-select-wrapper .custom-select-trigger:after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid #0f172a;
    border-bottom: 2px solid #0f172a;
    transform: rotate(45deg);
    transition: all 0.3s ease;
    margin-left: 6px;
    display: inline-block;
    margin-top: -3px;
}

.rows-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(226, 145, 27, 0.2);
}

.rows-select-wrapper.open .custom-select-trigger:after {
    transform: rotate(-135deg);
    margin-top: 1px;
}

.rows-select-wrapper .custom-options {
    position: absolute;
    bottom: calc(100% + 6px);
    /* Opens UPWARDS since pagination is at the bottom */
    top: auto;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(12, 43, 116, 0.15);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
    display: none;
    overflow: hidden;
    z-index: 10001;
    animation: premiumFadeInUp 0.3s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.rows-select-wrapper.open .custom-options {
    display: block;
}

.rows-select-wrapper .custom-option {
    padding: 8px 12px;
    color: #475569;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rows-select-wrapper .custom-option:last-child {
    border-bottom: none;
}

.rows-select-wrapper .custom-option:hover {
    background: rgba(226, 145, 27, 0.08);
    color: var(--accent);
    padding-left: 12px;
    /* Prevent default padding slide */
}

.rows-select-wrapper .custom-option.selected {
    background: rgba(226, 145, 27, 0.12);
    color: var(--accent);
}

@keyframes premiumFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Premium Empty State Glass Card */
.empty-state {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 60px 40px;
    min-height: 372px;
    height: 372px;
    text-align: center;
    color: #94a3b8;
    font-weight: 700;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    animation: premiumFadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.empty-state-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
    animation: floatLogo 4s infinite ease-in-out;
}

/* Premium Sidebar Shift Indicator styles */
.workflow-body-container {
    display: flex;
    background: #fff;
    border-radius: 0 0 24px 24px;
    overflow: visible !important;
}

.workflow-shift-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    min-width: 140px;
    background: linear-gradient(to bottom, #fafbfd, #f1f5f9);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    border-radius: 0 0 0 24px;
}

.shift-sidebar-icon {
    font-size: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: floatShiftIcon 4s infinite ease-in-out;
}

.workflow-shift-sidebar:hover .shift-sidebar-icon {
    transform: scale(1.18) rotate(5deg);
}

.shift-sidebar-icon.day {
    filter: drop-shadow(0 10px 25px rgba(255, 179, 0, 0.45));
}

.shift-sidebar-icon.night {
    filter: drop-shadow(0 10px 25px rgba(30, 58, 138, 0.35));
}

.shift-sidebar-label {
    margin-top: 15px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
}

.shift-sidebar-label.day {
    color: #e67e22;
}

.shift-sidebar-label.night {
    color: #1e3a8a;
}

@keyframes floatShiftIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Premium Apply to All Buttons and Grid Formatting */
.btn-apply-all-premium {
    background: linear-gradient(135deg, #E2911B 0%, #f1a12c 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(226, 145, 27, 0.2);
    box-sizing: border-box;
    padding: 0 8px;
    text-transform: uppercase;
}

.btn-apply-all-premium:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(226, 145, 27, 0.35);
    background: linear-gradient(135deg, #f1a12c 0%, #ffb648 100%);
}

.btn-apply-all-premium:active {
    transform: translateY(0) scale(0.98);
}

.form-header-premium .excel-input,
.form-header-premium .custom-select-trigger {
    box-sizing: border-box !important;
    height: 50px !important;
    padding: 12px 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 18px !important;
}

.form-header-premium .input-icon-wrapper {
    box-sizing: border-box !important;
    height: 50px !important;
}

/* Night Shift Indicator Glow Pulse & Border Style overrides */
.shift-indicator-premium.night-mode-indicator {
    border: 2px solid rgba(12, 43, 116, 0.6) !important;
    animation: glow-pulse-blue 2s infinite !important;
}

@keyframes glow-pulse-blue {
    0% {
        box-shadow: 0 0 10px rgba(12, 43, 116, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(12, 43, 116, 0.7);
    }

    100% {
        box-shadow: 0 0 10px rgba(12, 43, 116, 0.4);
    }
}

/* Premium Shift Badges for Details View */
.view-shift-badge {
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: badgeGlowPulse 2.5s infinite ease-in-out;
    border: 1px solid;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.view-shift-badge.day-badge {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.25) 100%);
    color: #f59e0b;
    border-color: rgba(251, 191, 36, 0.4);
}

.view-shift-badge.night-badge {
    background: linear-gradient(135deg, rgba(12, 43, 116, 0.08) 0%, rgba(12, 43, 116, 0.18) 100%);
    color: var(--primary);
    border-color: rgba(12, 43, 116, 0.45);
}

.view-shift-badge .badge-icon {
    font-size: 14px;
    display: inline-block;
}

.view-shift-badge.day-badge .badge-icon {
    animation: sunSpinSlow 8s linear infinite;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

.view-shift-badge.night-badge .badge-icon {
    animation: moonSway 4s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 4px rgba(12, 43, 116, 0.6));
}

@keyframes badgeGlowPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px currentColor;
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 18px currentColor;
    }
}

@keyframes sunSpinSlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes moonSway {
    0% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(5deg);
    }
}

.center-badge-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

/* Executive Premium Generate Form Button */
.generate-form-btn-premium {
    background: linear-gradient(135deg, #E2911B 0%, #f59e0b 50%, #d97706 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
    padding: 16px 36px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border-radius: 16px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    box-shadow: 0 10px 25px rgba(226, 145, 27, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    height: 54px !important;
}

.generate-form-btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.45) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: 0.85s ease;
}

.generate-form-btn-premium:hover::before {
    left: 150%;
    transition: 0.85s ease;
}

.generate-form-btn-premium:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 15px 35px rgba(226, 145, 27, 0.5), 0 0 20px rgba(251, 191, 36, 0.35) !important;
    border-color: rgba(251, 191, 36, 0.7) !important;
}

.generate-form-btn-premium:active {
    transform: translateY(-1px) scale(0.98) !important;
    box-shadow: 0 8px 20px rgba(226, 145, 27, 0.4) !important;
}

/* Locked Print Button Override to keep it looking disabled */
.generate-form-btn-premium.btn-locked-print {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border: 1px dashed #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.8 !important;
}

.generate-form-btn-premium.btn-locked-print::before {
    display: none !important;
}

/* Premium Signature Choices and Drawing Board CSS */
.sig-choice-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sig-choice-card:hover {
    border-color: #0C2B74 !important;
    background-color: rgba(12, 43, 116, 0.03) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(12, 43, 116, 0.08);
}

.sig-choice-card:active {
    transform: translateY(0) scale(0.98);
}

#signature-canvas {
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* ========================================================== */
/* Pulsing Pending Stat Cards & Walkthrough Animations */
/* ========================================================== */

@keyframes statCardPulseAmber {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 0 0px rgba(245, 158, 11, 0.4);
        border-color: rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 15px 5px rgba(245, 158, 11, 0.25);
        border-color: rgba(245, 158, 11, 0.8);
    }

    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 0 0px rgba(245, 158, 11, 0);
        border-color: rgba(245, 158, 11, 0.3);
    }
}

@keyframes statCardPulseBlue {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 0 0px rgba(12, 43, 116, 0.3);
        border-color: rgba(12, 43, 116, 0.2);
    }

    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 15px 5px rgba(12, 43, 116, 0.2);
        border-color: rgba(12, 43, 116, 0.6);
    }

    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 0 0px rgba(12, 43, 116, 0);
        border-color: rgba(12, 43, 116, 0.2);
    }
}

.stat-card-pending-pulsing-amber {
    animation: statCardPulseAmber 2s infinite ease-in-out;
    cursor: pointer;
    position: relative;
    z-index: 10000;
}

.stat-card-pending-pulsing-blue {
    animation: statCardPulseBlue 2s infinite ease-in-out;
    cursor: pointer;
    position: relative;
    z-index: 10000;
}

/* Magic Glow animation on target workflow card */
@keyframes workflowMagicGlow {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 0 0px rgba(245, 158, 11, 0.5);
        border-color: rgba(245, 158, 11, 0.5);
    }

    50% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 25px 8px rgba(245, 158, 11, 0.4);
        border-color: rgba(245, 158, 11, 1);
        background: rgba(245, 158, 11, 0.03);
    }

    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 0 0 0px rgba(245, 158, 11, 0);
        border-color: rgba(245, 158, 11, 0.5);
    }
}

.workflow-magic-glow {
    animation: workflowMagicGlow 1.8s infinite ease-in-out !important;
    border-width: 2px !important;
    border-style: solid !important;
    transition: all 0.3s ease !important;
}

/* Dropdown styling */
.pending-dropdown {
    width: 320px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    border: 1px solid rgba(12, 43, 116, 0.12);
    box-shadow: 0 20px 40px rgba(12, 43, 116, 0.15);
    z-index: 100000 !important;
    padding: 16px;
    direction: ltr;
    transform-origin: top center;
    animation: pendingDropdownFadeIn 0.25s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes pendingDropdownFadeIn {
    from {
        opacity: 0;
        transform: scaleY(0.3);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

.pending-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.pending-dropdown-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pending-dropdown-count {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
}

.pending-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding-right: 4px;
}

/* Custom Scrollbar for dropdown list */
.pending-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.pending-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.pending-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(12, 43, 116, 0.15);
    border-radius: 10px;
}

.pending-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(12, 43, 116, 0.3);
}

.pending-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(12, 43, 116, 0.02);
    border: 1px solid rgba(12, 43, 116, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pending-dropdown-item:hover {
    background: rgba(12, 43, 116, 0.05);
    border-color: rgba(12, 43, 116, 0.15);
    transform: translateX(3px);
}

.pending-dropdown-item-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pending-dropdown-item-id {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
}

.pending-dropdown-item-desc {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

.pending-dropdown-item-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pending-dropdown-item-badge.returned {
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
}

.pending-dropdown-item-badge.pending_manager {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.pending-dropdown-item-badge.pending_hr {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.pending-dropdown-item-badge.execution {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.pending-dropdown-tour-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary), #1e3a8a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(12, 43, 116, 0.2);
    transition: all 0.25s ease;
}

.pending-dropdown-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(12, 43, 116, 0.3);
    filter: brightness(1.1);
}

.pending-dropdown-tour-btn:active {
    transform: translateY(0);
}

/* Floating Walkthrough Controller Panel */
.walkthrough-controller {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    padding: 16px 20px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: controllerSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes controllerSlideUp {
    from {
        bottom: -100px;
        opacity: 0;
    }

    to {
        bottom: 25px;
        opacity: 1;
    }
}

.walkthrough-controller-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.walkthrough-controller-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.walkthrough-controller-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.walkthrough-controller-close:hover {
    color: white;
}

.walkthrough-controller-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 10px 14px;
}

.walkthrough-controller-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.walkthrough-controller-wf-id {
    font-size: 13px;
    font-weight: 800;
    color: white;
}

.walkthrough-controller-wf-desc {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.walkthrough-controller-progress {
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
}

.walkthrough-controller-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.walkthrough-controller-btn {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.walkthrough-controller-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.walkthrough-controller-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.walkthrough-controller-btn-primary {
    background: #f59e0b;
    color: #0f172a;
    border: none;
    flex: 1;
}

.walkthrough-controller-btn-primary:hover:not(:disabled) {
    background: #fbbf24;
    transform: translateY(-1px);
}

/* Live dot pulsing animation next to stats value */
.live-dot-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 10px;
    position: relative;
    vertical-align: middle;
}

.stat-card .live-dot-pulse.notification-dot {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    z-index: 10;
}

.live-dot-pulse.amber {
    background-color: #f59e0b;
}

.live-dot-pulse.amber::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid #f59e0b;
    animation: liveDotPulseAnim 1.5s infinite ease-out;
    opacity: 0;
}

.live-dot-pulse.blue {
    background-color: #3b82f6;
}

.live-dot-pulse.blue::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    animation: liveDotPulseAnim 1.5s infinite ease-out;
    opacity: 0;
}

@keyframes liveDotPulseAnim {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Floating speech bubble over active workflow card (Glassmorphic, positioned in header left) */
.walkthrough-speech-bubble {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: #0f172a;
    /* Slate 900 dark text for legibility */
    padding: 6px 14px;
    /* Compact padding to fit perfectly in the header bar */
    border-radius: 20px;
    /* Fully rounded pill shape for modern look inside the header */
    font-size: 11px;
    /* Slightly smaller font size to fit header height */
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05), 0 0 10px rgba(226, 145, 27, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    border: 2px solid #f59e0b;
    font-family: inherit;
    white-space: nowrap;
}

/* Hide pointing arrow since it is integrated into the header bar */
.walkthrough-speech-bubble::after {
    display: none !important;
}

.walkthrough-active .timeline-step {
    z-index: 9999 !important;
}

.walkthrough-active .step-tooltip {
    z-index: 10000 !important;
}

@keyframes speechBubblePopIn {
    0% {
        transform: scale(0.6) translateY(5px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.animate-pop-in {
    animation: speechBubblePopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Magic glow and vibration styling for focused workflow card */
.workflow-group.workflow-magic-glow {
    position: relative;
    border-color: var(--accent) !important;
    animation: cardGlowShake 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1, cardGlowPulse 2s ease-in-out 0.6s infinite alternate;
    z-index: 10;
    overflow: visible !important;
    /* Ensure the speech bubble is not clipped */
}

@keyframes cardGlowShake {
    0% {
        transform: translateY(0);
    }

    15% {
        transform: translateY(-8px) scale(1.02);
    }

    25% {
        transform: translateY(-8px) scale(1.02) rotate(-0.5deg);
    }

    40% {
        transform: translateY(-8px) scale(1.02) rotate(0.5deg);
    }

    55% {
        transform: translateY(-8px) scale(1.02) rotate(-0.3deg);
    }

    70% {
        transform: translateY(-8px) scale(1.02) rotate(0.3deg);
    }

    85% {
        transform: translateY(-8px) scale(1.02) rotate(0);
    }

    100% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes cardGlowPulse {
    0% {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(226, 145, 27, 0.25), 0 0 0 2px var(--accent) !important;
    }

    100% {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 45px rgba(226, 145, 27, 0.45), 0 0 0 4px var(--accent) !important;
    }
}

/* ============================================
   Walkthrough Pointer Arrow (SVG Overlay)
   ============================================ */
.walkthrough-pointer-arrow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: visible;
}

.walkthrough-pointer-arrow path.arrow-curve {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.35));
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    opacity: 0;
    animation: arrowDrawIn 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s both;
}

.walkthrough-pointer-arrow polygon.arrow-head {
    fill: #f59e0b;
    filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.35));
    opacity: 0;
    animation: arrowHeadAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards,
        arrowHeadPulse 1.8s ease-in-out 1.6s infinite alternate;
}

@keyframes arrowDrawIn {
    0% {
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

@keyframes arrowHeadAppear {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes arrowHeadPulse {
    0% {
        opacity: 1;
        filter: drop-shadow(0 1px 3px rgba(245, 158, 11, 0.35));
    }

    50% {
        opacity: 0.3;
        filter: drop-shadow(0 0px 0px rgba(245, 158, 11, 0));
    }

    100% {
        opacity: 1;
        filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.6));
    }
}

/* Active filter styling for clickable stats cards */
.stat-card.stat-card-approved,
.stat-card.stat-card-non-approved,
.stat-card.stat-card-pending {
    cursor: pointer;
}

.stat-card.stat-card-approved.active-filter {
    border-color: #10b981 !important;
    border-left-color: #10b981 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25) !important;
    background: #f0fdf4 !important;
}

.stat-card.stat-card-non-approved.active-filter {
    border-color: #ef4444 !important;
    border-left-color: #ef4444 !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.25) !important;
    background: #fef2f2 !important;
}

.stat-card.stat-card-pending.active-filter {
    border-color: #f59e0b !important;
    border-left-color: #f59e0b !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25) !important;
    background: #fffbeb !important;
}

/* ========================================= */
/* PREMIUM BACKGROUND WATERMARKS & SPARKLINES */
/* ========================================= */

/* 1. Day & Night Shift Watermarks */
#day-shift-card::after {
    content: '\f185';
    /* FontAwesome Sun */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: -25px;
    bottom: -35px;
    font-size: 200px;
    color: rgba(251, 191, 36, 0.04);
    z-index: 0;
    pointer-events: none;
    transform: rotate(-15deg);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#day-shift-card:hover::after {
    transform: rotate(0deg) scale(1.05);
    color: rgba(251, 191, 36, 0.08);
}

#night-shift-card::after {
    content: '\f186';
    /* FontAwesome Moon */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: -15px;
    bottom: -25px;
    font-size: 180px;
    color: rgba(59, 130, 246, 0.04);
    z-index: 0;
    pointer-events: none;
    transform: rotate(-10deg);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#night-shift-card:hover::after {
    transform: rotate(0deg) scale(1.05);
    color: rgba(59, 130, 246, 0.08);
}

/* Ensure shift card content stays above the watermark */
.shift-card .shift-icon,
.shift-card h3,
.shift-card p,
.shift-card .btn {
    position: relative;
    z-index: 1;
}

/* 2. Stat Cards Background Sparklines */


/* Ensure stat card content stays above the watermark */
.stat-card .stat-content,
.stat-card .stat-icon-box {
    position: relative;
    z-index: 1;
}

/* ========================================= */
/* SMART SUMMARY & SHIFT TRACKER WIDGETS      */
/* ========================================= */

.header-smart-summary {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 145, 27, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    color: #0c2b74;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    max-width: fit-content;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(226, 145, 27, 0.08);
    transition: all 0.3s ease;
    animation: fadeInDown 0.5s ease forwards;
}

.shift-tracker {
    margin-top: -5px;
    margin-bottom: 20px;
    background: rgba(12, 43, 116, 0.03);
    border: 1px solid rgba(12, 43, 116, 0.05);
    border-radius: 12px;
    padding: 12px 15px;
    text-align: left;
    animation: fadeIn 0.5s ease forwards;
}

.tracker-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tracker-status {
    color: #f59e0b;
    display: flex;
    align-items: center;
}

.tracker-time {
    color: #64748b;
}

.tracker-progress-bg {
    height: 6px;
    background: rgba(12, 43, 116, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.tracker-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 10px;
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.inline-dot {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    display: inline-block !important;
    margin-right: 12px;
}

.shift-actions-row {
    margin-top: auto;
    width: 100%;
}

.shift-time-badge {
    background: rgba(12, 43, 116, 0.04);
    border-bottom: 1px solid rgba(12, 43, 116, 0.08);
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    padding: 12px 14px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
    margin-bottom: 15px;
    border-radius: 0;
}

/* Mobile: enlarged login elements (viewport scales 1400px to fit phone) */
@media (max-device-width: 768px) {
    #login-section .login-card {
        max-width: 76%;
        padding: 60px 52px;
        border-radius: 56px;
        transform: translateY(-520px) !important;
    }
    #login-section .card-logo-container {
        margin-bottom: 56px;
    }
    #login-section .logo-icon-part {
        width: 130px;
    }
    #login-section .logo-text-part img {
        width: 420px;
        max-width: 100%;
    }
    #login-section .system-title {
        font-size: 36px;
        letter-spacing: 5px;
        margin-top: 36px;
    }
    #login-section .login-card .custom-select-trigger {
        height: 110px;
        font-size: 38px;
        padding: 0 36px;
        border-radius: 32px;
    }
    #login-section input,
    #login-section select {
        padding: 28px 32px;
        font-size: 36px;
        border-radius: 28px;
    }
    #login-section .btn {
        padding: 32px;
        font-size: 38px;
        border-radius: 32px;
    }
    #login-section label {
        font-size: 28px;
        margin-bottom: 16px;
    }
    #login-section .custom-select-wrapper {
        margin-bottom: 32px;
    }
    #login-section .form-group {
        margin-bottom: 36px;
    }
    #login-section {
        padding: 24px;
    }
    #login-section .custom-option {
        padding: 28px 40px;
        font-size: 32px;
    }
    #login-section .custom-option:hover {
        padding-left: 52px;
    }
    #login-section #sys-copyright-login {
        max-width: 800px !important;
    }
}

/* === Image Cropper === */
.cropper-modal {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 720px;
    width: 90%;
    overflow: hidden;
    backdrop-filter: blur(20px);
}
.cropper-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cropper-header h3 {
    color: var(--polished-gold);
    font-size: 18px;
    margin: 0;
}
.cropper-header h3 i { margin-right: 10px; }
.cropper-hint {
    font-size: 12px;
    color: var(--text-dim);
}
.cropper-body {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
}
.cropper-image-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #111;
    border-radius: 12px;
    min-height: 300px;
    max-height: 520px;
    cursor: crosshair;
    user-select: none;
    padding: 0;
    line-height: 0;
}
.cropper-image-wrapper img {
    display: block;
    pointer-events: none;
}
.cropper-selection {
    position: absolute;
    border: 2px dashed #3498db;
    outline: 9999px solid rgba(0,0,0,0.6);
    cursor: move;
    display: none;
    touch-action: none;
}
.cropper-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid var(--polished-gold);
    border-radius: 50%;
}
.cropper-handle-nw { top: -7px; left: -7px; cursor: nw-resize; }
.cropper-handle-ne { top: -7px; right: -7px; cursor: ne-resize; }
.cropper-handle-sw { bottom: -7px; left: -7px; cursor: sw-resize; }
.cropper-handle-se { bottom: -7px; right: -7px; cursor: se-resize; }
.cropper-preview-wrapper {
    width: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cropper-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--glass-border);
    background: #111;
}
.cropper-preview canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cropper-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
@media (max-width: 600px) {
    .cropper-body { flex-direction: column; align-items: center; }
    .cropper-preview-wrapper { width: 100%; flex-direction: row; gap: 12px; justify-content: center; }
}

/* Hub Popup Menu for stat cards */
.hub-popup-menu {
    min-width: 220px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(12, 43, 116, 0.08);
    border-left: 5px solid #cbd5e1;
    box-shadow: 0 15px 35px rgba(12, 43, 116, 0.12);
    z-index: 100000 !important;
    padding: 8px;
    direction: ltr;
    transform-origin: top center;
    animation: pendingDropdownFadeIn 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    position: fixed;
}

.hub-popup-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    margin-left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 7px solid #ffffff;
    filter: drop-shadow(0 -2px 2px rgba(12,43,116,0.06));
}

.hub-popup-approved {
    border-left-color: #10b981;
}
.hub-popup-non-approved {
    border-left-color: #ef4444;
}
.hub-popup-pending {
    border-left-color: #f59e0b;
}

.hub-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: background 0.15s;
    white-space: nowrap;
}
.hub-popup-item:hover {
    background: rgba(12, 43, 116, 0.06);
}
.hub-popup-item .icon {
    font-size: 16px;
}

/* Batch field pairs: input + Apply to All button grouped */
.batch-field-pair {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.5);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.batch-field-pair:focus-within {
    border-color: #E2911B;
    background: #ffffff;
    box-shadow: 0 8px 25px -8px rgba(226, 145, 27, 0.2);
}
.batch-field-pair .excel-input-group {
    margin-bottom: 0;
}
.batch-field-pair .btn-apply-all-premium {
    height: 42px;
    width: 120px;
    flex: none;
    font-size: 10px;
    border-radius: 12px;
}
.batch-field-pair .input-icon-wrapper {
    height: 42px !important;
}
.batch-field-pair .excel-input {
    height: 42px;
    min-height: 42px;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 13px;
}
.batch-field-pair .custom-select-wrapper {
    margin-bottom: 0;
}
.batch-field-pair .custom-select-trigger {
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 16px !important;
    box-sizing: border-box;
}
.batch-field-pair .excel-input {
    height: 50px;
    min-height: 50px;
    padding: 0 16px;
    box-sizing: border-box;
}
.batch-field-pair .btn-apply-all-premium {
    height: 50px;
    width: 120px;
    flex: none;
    font-size: 10px;
    border-radius: 14px;
}
.batch-field-pair .input-icon-wrapper {
    height: 50px !important;
}