/* ==========================================================================
   DEQTEQ HRMS — GLOBAL MAIN STYLESHEET
   ========================================================================== */

:root {
    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-font-sans-serif: 'Inter', system-ui, sans-serif;
    --bs-body-bg: #f6f7fb;
    --bs-border-color: #e6e8ef;
    --brand-ink: #eef2ff;
}

html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
    min-width: 0;
}

body {
    font-family: var(--bs-font-sans-serif);
    background: 
        radial-gradient(900px 500px at 90% -10%, rgba(224, 231, 255, 0.5) 0%, transparent 60%),
        radial-gradient(700px 400px at -10% 10%, rgba(221, 214, 254, 0.5) 0%, transparent 55%),
        var(--bs-body-bg);
    min-height: 100vh;
    color: #0b1220;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Global Media & Container Fluidity */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100% !important;
    height: auto;
}

.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Plus Jakarta Sans', var(--bs-font-sans-serif);
    letter-spacing: -0.015em;
    word-break: break-word;
}

/* Premium Card Container */
.premium-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

/* Sidebar Layout */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px) saturate(140%);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

.no-sidebar .main-content {
    margin-left: 0;
    width: 100%;
}

/* Navigation Links */
.nav-link.active {
    background-color: var(--brand-ink);
    color: var(--bs-primary) !important;
    font-weight: 600;
    border-radius: 10px;
}

.nav-link {
    color: #3b4256;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: #0b1220;
}

.nav-group-title {
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    font-weight: 600;
}

.nav-sublink {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.825rem;
    padding: 0.45rem 0.75rem 0.45rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.15rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-sublink:hover {
    color: #0b1220;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.nav-sublink.active {
    color: var(--bs-primary) !important;
    font-weight: 600;
    background-color: var(--brand-ink);
}

.submenu-toggle[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.topbar {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bs-border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.75rem 1.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7d2fe, #a5f3fc);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 12px;
    color: #3730a3;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

.hero-banner {
    background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(34,211,238,.08));
    border: 1px solid rgba(255,255,255,.65);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.8), transparent 60%);
    pointer-events: none;
}

.brand-back-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.brand-back-link:hover {
    color: var(--bs-primary) !important;
    opacity: 0.85;
}

/* ==========================================================================
   ONBOARDING & VERIFICATION STYLES (Step 3 & Document Intake)
   ========================================================================== */

@keyframes laserScan {
    0% { top: 0%; opacity: 0.8; }
    50% { top: 90%; opacity: 1; }
    100% { top: 0%; opacity: 0.8; }
}

.upload-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.15rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.upload-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.upload-preview-box {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    box-sizing: border-box;
}

.upload-preview-box img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.laser-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(56,189,248,0) 0%, rgba(56,189,248,1) 50%, rgba(56,189,248,0) 100%);
    box-shadow: 0 0 8px #38bdf8;
    animation: laserScan 1.5s ease-in-out 2;
    pointer-events: none;
}

/* Signature Pad Canvas */
.signature-canvas-container {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    height: 200px;
    cursor: crosshair;
    touch-action: none;
    overflow: hidden;
    box-sizing: border-box;
}

#signatureCanvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Review Modal Styling */
.review-section-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-sizing: border-box;
}

.review-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
    word-break: break-word;
}

.review-value {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (Phones <= 576px & Tablets <= 768px)
   ========================================================================== */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .card {
        border-radius: 14px !important;
    }

    .card-body {
        padding: 1.25rem 1rem !important;
    }

    .card-header {
        padding: 1rem 1rem !important;
    }

    .card-footer {
        padding: 1rem 1rem !important;
        flex-direction: column-reverse !important;
        gap: 0.75rem !important;
    }

    .card-footer a,
    .card-footer button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .upload-card {
        padding: 0.875rem !important;
    }

    .review-section-card {
        padding: 0.875rem !important;
    }

    .modal-dialog {
        margin: 0.5rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .stepper-label {
        font-size: 11px !important;
    }

    .form-control, .form-select {
        font-size: 14px !important;
    }
}

/* ==========================================================================
   EX-EMPLOYEES & STAFF ROSTER TABLES
   ========================================================================== */
:root {
    --ai-glow: rgba(99, 102, 241, 0.05);
    --ai-primary: #4f46e5;
}

.ai-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    position: relative;
}

.table-responsive {
    min-height: 220px;
}

@media (min-width: 992px) {
    .table-responsive {
        overflow: visible !important;
    }
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

.ai-table thead th {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #8a92a6 !important;
    padding-top: 16px;
    padding-bottom: 16px;
    background-color: #fafbfe;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.clickable-row {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.clickable-row:hover {
    background-color: var(--ai-glow) !important;
    transform: translateY(-1px);
    box-shadow: inset 4px 0 0 0 #64748b, 0 4px 12px rgba(0, 0, 0, 0.02);
}

.badge-soft-relieved {
    background-color: rgba(14, 165, 233, 0.08);
    color: #0284c7;
    font-weight: 600;
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
}

.badge-soft-terminated {
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
}

/* ==========================================================================
   DRIVER.JS WALKTHROUGH STYLES & BOOTSTRAP 5 THEME BINDINGS
   ========================================================================== */
.driver-popover {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif !important;
    padding: 18px 20px !important;
    max-width: 320px !important;
}

.driver-popover-title {
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
}

.driver-popover-description {
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
}

.driver-popover-progress-text {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
}

.driver-popover-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 14px !important;
    padding-top: 10px !important;
    border-top: 1px solid #f1f5f9 !important;
}

.driver-popover-footer button {
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    transition: all 0.2s ease !important;
}

.driver-popover-next-btn,
.driver-popover-done-btn {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25) !important;
}

.driver-popover-next-btn:hover,
.driver-popover-done-btn:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3) !important;
    transform: translateY(-1px) !important;
}

.driver-popover-close-btn {
    color: #94a3b8 !important;
    font-size: 16px !important;
    top: 10px !important;
    right: 12px !important;
    cursor: pointer !important;
}

.driver-popover-close-btn:hover {
    color: #475569 !important;
}

/* ==========================================================================
   CUSTOM TOUR EXIT WARNING MODAL (BEAUTIFUL CENTER POPUP)
   ========================================================================== */
.tour-exit-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 2147483647 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease !important;
    padding: 20px !important;
}

.tour-exit-backdrop.show {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.tour-exit-card {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
    padding: 32px 28px !important;
    max-width: 440px !important;
    width: 100% !important;
    text-align: center !important;
    transform: scale(0.92) !important;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif !important;
}

.tour-exit-backdrop.show .tour-exit-card {
    transform: scale(1) !important;
}

.tour-exit-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(34, 211, 238, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 1px solid rgba(79, 70, 229, 0.2);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.tour-exit-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.tour-exit-quote {
    background: #f8fafc;
    border-left: 4px solid #4f46e5;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 18px 0;
    line-height: 1.4;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.tour-exit-subtitle {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.tour-exit-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.tour-btn-continue {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
    flex: 1;
}

.tour-btn-continue:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.tour-btn-exit {
    background: #f1f5f9;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tour-btn-exit:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}


