/**
 * ========================================================
 * HRMS MODERN CUSTOM UI STYLESHEET
 * File: public/backend/assets/css/custom-ui.css
 * Description: Clean, modern enterprise UI styles for HRMS
 * ========================================================
 */

:root {
    --hrms-primary: #2563eb;
    --hrms-primary-hover: #1d4ed8;
    --hrms-primary-light: #eff6ff;
    --hrms-orange: #f97316;
    --hrms-orange-hover: #ea580c;
    --hrms-dark: #0f172a;
    --hrms-gray-text: #64748b;
    --hrms-gray-border: #edf2f7;
    --hrms-card-bg: #ffffff;
    --hrms-page-bg: #f8fafc;
    --hrms-radius-lg: 16px;
    --hrms-radius-md: 12px;
    --hrms-radius-sm: 8px;
    --hrms-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    --hrms-shadow-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------
   PAGE HEADER & BREADCRUMBS
-------------------------------------------------------- */
.hrms-page-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.hrms-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.hrms-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--hrms-gray-text);
    margin: 0;
    padding: 0;
    list-style: none;
}

.hrms-breadcrumb a {
    color: var(--hrms-gray-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hrms-breadcrumb a:hover {
    color: var(--hrms-primary);
}

.hrms-breadcrumb .active {
    color: #334155;
    font-weight: 600;
}

/* --------------------------------------------------------
   PROFILE HERO CARD (Top Section)
-------------------------------------------------------- */
.profile-hero-card {
    background: var(--hrms-card-bg);
    border-radius: var(--hrms-radius-lg);
    border: 1px solid var(--hrms-gray-border);
    box-shadow: var(--hrms-shadow);
    padding: 2rem 2.25rem;
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Animated Gradient Top Border */
.profile-hero-card::before,
.hrms-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: linear-gradient(
        90deg,
        #093ba6 0%,
        #0267ff 25%,
        #60a5fa 50%,
        #0267ff 75%,
        #093ba6 100%
    );
    background-size: 200% 100%;
    animation: cardBorderShimmer 3s ease-in-out infinite;
    z-index: 2;
}

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

.hero-avatar-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.hero-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    background: #f1f5f9;
}

.hero-avatar-action {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    font-size: 0.85rem;
    z-index: 5;
}

.hero-avatar-action.edit-btn {
    bottom: 2px;
    right: 2px;
    top: auto;
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.4);
}

.hero-avatar-action.delete-btn {
    top: 2px;
    right: 2px;
    color: #ef4444;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.hero-avatar-action:hover {
    transform: scale(1.12);
}

.hero-meta-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.hero-meta-subtitle {
    font-size: 0.92rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
}

.hero-meta-department {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.hero-badge-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
}

.hero-meta-doj {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 6px;
}

/* Dotted/Subtle Vertical Divider */
.hero-vertical-divider {
    border-left: 1px dashed #cbd5e1;
    height: 100%;
}

@media (max-width: 991px) {
    .hero-vertical-divider {
        border-left: none;
        border-top: 1px dashed #cbd5e1;
        margin: 1.5rem 0;
        height: 1px;
    }
}

/* Hero Key Info List */
.hero-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-info-row {
    display: flex;
    align-items: baseline;
    font-size: 0.9rem;
    line-height: 1.5;
}

.hero-info-label {
    width: 110px;
    flex-shrink: 0;
    color: #64748b;
    font-weight: 500;
}

.hero-info-value {
    color: #1e293b;
    font-weight: 500;
    flex-grow: 1;
    word-break: break-word;
}

.hero-info-value a {
    color: var(--hrms-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.hero-info-value a:hover {
    text-decoration: underline;
}

/* Top Right Circular Card Action (Matching Reference SS) */
.card-corner-action {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.card-corner-action:hover {
    background: #ffffff;
    color: var(--hrms-primary);
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-blue-gradient,
.btn-send-message {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%);
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 22px;
    border-radius: 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 82, 217, 0.35);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-blue-gradient:hover,
.btn-send-message:hover {
    background: linear-gradient(180deg, #1a78ff 0%, #0047be 100%);
    color: #ffffff !important;
    transform: translateY(-1.5px);
    box-shadow: 0 7px 18px rgba(0, 82, 217, 0.45);
}

.btn-blue-gradient:active,
.btn-send-message:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 82, 217, 0.3);
}

/* --------------------------------------------------------
   NAVIGATION TABS (Modern Underline Style)
-------------------------------------------------------- */
.profile-nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.75rem;
    gap: 8px;
}

.profile-nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    background: transparent;
    border-radius: 0;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-nav-tabs .nav-link:hover {
    color: #0052d9;
}

.profile-nav-tabs .nav-link.active {
    color: #0052d9;
    background: transparent;
    border-bottom-color: #0052d9;
}

/* --------------------------------------------------------
   SECTION CARDS (Personal, Bank, Emergency, etc.)
-------------------------------------------------------- */
.hrms-card {
    background: var(--hrms-card-bg);
    border-radius: var(--hrms-radius-lg);
    border: 1px solid var(--hrms-gray-border);
    box-shadow: var(--hrms-shadow);
    margin-bottom: 1.5rem;
    height: calc(100% - 1.5rem);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.hrms-card:hover {
    box-shadow: var(--hrms-shadow-hover);
}

.hrms-card-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.hrms-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hrms-card-title i {
    color: #64748b;
    font-size: 1rem;
}

.hrms-card-body {
    padding: 1.5rem 1.75rem;
    flex: 1;
}

/* Two-column Key-Value Details (Matching Reference Screenshot) */
.profile-detail-table {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-row {
    display: flex;
    align-items: baseline;
    padding-bottom: 11px;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 0.9rem;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-key {
    width: 44%;
    flex-shrink: 0;
    color: #64748b;
    font-weight: 500;
}

.detail-val {
    width: 56%;
    color: #1e293b;
    font-weight: 600;
    word-break: break-word;
}

.detail-val a {
    color: var(--hrms-primary);
    text-decoration: none;
}

.detail-val a:hover {
    text-decoration: underline;
}

/* Section Mini Title inside cards */
.section-mini-heading {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0f172a;
    margin: 1.25rem 0 0.75rem 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.section-mini-heading:first-child {
    margin-top: 0;
}

/* --------------------------------------------------------
   STATUS PILLS
-------------------------------------------------------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill.active {
    background: #dcfce7;
    color: #15803d;
}

.status-pill.inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-pill.freeze {
    background: #fef9c3;
    color: #a16207;
}

.status-pill.terminated {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pill.on-hold {
    background: #e0f2fe;
    color: #0369a1;
}

.status-pill.rehire {
    background: #ede9fe;
    color: #6d28d9;
}

/* --------------------------------------------------------
   PASSWORD FORM & INPUT STYLES
-------------------------------------------------------- */
.hrms-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.hrms-input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.hrms-form-control {
    height: 44px;
    border-radius: var(--hrms-radius-sm);
    border: 1.5px solid #e2e8f0;
    padding: 0 14px;
    font-size: 0.9rem;
    width: 100%;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
}

.hrms-form-control:focus {
    border-color: var(--hrms-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

.hrms-btn-primary {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 82, 217, 0.35);
}

.hrms-btn-primary:hover {
    background: linear-gradient(180deg, #1a78ff 0%, #0047be 100%);
    color: #ffffff;
    transform: translateY(-1.5px);
    box-shadow: 0 7px 18px rgba(0, 82, 217, 0.45);
}

.hrms-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 82, 217, 0.3);
}

.hrms-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: var(--hrms-radius-sm);
    padding: 8px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hrms-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}


/* --------------------------------------------------------
   COMPACT SLEEK NAVBAR & GRADIENT STYLING
-------------------------------------------------------- */
#page-topbar {
    height: 46px !important;
    background: linear-gradient(90deg, #093ba6 0%, #0d55d8 45%, #1e6bf2 100%) !important;
    border-bottom: none !important;
    box-shadow: 0 3px 15px rgba(9, 59, 166, 0.18) !important;
    position: fixed !important;
    z-index: 1050 !important;
    /* NOTE: NO overflow:hidden — keeps dropdowns visible */
}

/* ── Animated shimmer border — bottom of navbar ── */
/* Uses background-position trick: no overflow:hidden needed, no clipping */
#page-topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.08) 25%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(255, 255, 255, 0.08) 75%,
        rgba(255, 255, 255, 0.08) 100%
    );
    background-size: 200% 100%;
    animation: navbarShimmer 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

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

/* ── Notification Bell Badge ── */
.noti-icon.position-relative {
    position: relative !important;
}

.noti-badge {
    position: absolute !important;
    top: 4px !important;
    right: 2px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 18px !important;
    text-align: center !important;
    border-radius: 999px !important;
    background: #22c55e !important;
    color: #ffffff !important;
    border: 2px solid #1e6bf2 !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08) !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.navbar-header,
.navbar-header.header-bg {
    height: 46px !important;
    min-height: 46px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 1.25rem !important;
    background: transparent !important;
    position: relative !important;
    z-index: 1050 !important;
}

/* Navbar dropdown must appear above all page content */
.navbar-header .dropdown-menu,
.header-item .dropdown-menu,
#page-topbar .dropdown-menu {
    z-index: 1055 !important;
    position: absolute !important;
}

/* Portal cards must NOT create new stacking context above navbar */
.portal-card,
.portal-profile-card,
.portal-metric-card {
    isolation: auto !important;
    z-index: auto !important;
}

.navbar-header .header-item {
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    color: #ffffff !important;
}

.navbar-header .header-text,
.navbar-header .noti-icon i,
.navbar-header .header-item i {
    color: #ffffff !important;
}

.app-logo {
    max-height: 34px !important;
    max-width: 140px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.navbar-brand-wrapper {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
    height: 100% !important;
    padding: 0 14px 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    box-sizing: border-box !important;
    transition: width 0.25s ease-in-out, min-width 0.25s ease-in-out, max-width 0.25s ease-in-out !important;
}

body[data-sidebar-size="sm"] .navbar-brand-wrapper,
body.vertical-collpsed .navbar-brand-wrapper {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    justify-content: center !important;
    padding: 0 !important;
}

body[data-sidebar-size="sm"] .navbar-brand-wrapper .app-logo,
body.vertical-collpsed .navbar-brand-wrapper .app-logo,
body[data-sidebar-size="sm"] .navbar-brand-wrapper .logo,
body.vertical-collpsed .navbar-brand-wrapper .logo {
    display: none !important;
}

@media (max-width: 991.98px) {
    .navbar-header,
    .navbar-header.header-bg {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .navbar-brand-wrapper,
    body[data-sidebar-size="sm"] .navbar-brand-wrapper,
    body.vertical-collpsed .navbar-brand-wrapper {
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        padding: 0 !important;
    }

    body[data-sidebar-size="sm"] .navbar-brand-wrapper .app-logo,
    body.vertical-collpsed .navbar-brand-wrapper .app-logo,
    body[data-sidebar-size="sm"] .navbar-brand-wrapper .logo,
    body.vertical-collpsed .navbar-brand-wrapper .logo {
        display: block !important;
    }
}

/* Modern Hamburger Toggle Button */
#vertical-menu-btn,
body:not([data-sidebar-size="sm"]) #vertical-menu-btn,
body[data-sidebar-size="sm"] #vertical-menu-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    outline: none !important;
    align-self: center !important;
}

#vertical-menu-btn i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
}

#vertical-menu-btn:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    transform: translateY(-1px) scale(1.04) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

#vertical-menu-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

#vertical-menu-btn:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35) !important;
}

/* ========================================================
   SIDEBAR & MAIN-CONTENT RESPONSIVE / TOGGLE SYNC
   ======================================================== */

/* Fixed positioning so position never shifts between absolute & fixed */
.page-content {
    padding-top: calc(46px + 1.25rem) !important;
    padding-bottom: 50px !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

.footer {
    position: fixed !important;
    bottom: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 1rem !important;
    background: #ffffff !important;
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    transition: left 0.25s ease-in-out !important;
}

.footer .container-fluid {
    padding: 0 !important;
}

.footer .row {
    margin: 0 !important;
    width: 100% !important;
}

.footer .col-12 {
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    line-height: 1.2 !important;
}

/* Animated Brand Gradient Text in Footer (MMT Logo Color Scheme) */
.footer-brand-rainbow,
.footer-brand-gradient,
.footer a.footer-text {
    display: inline-block !important;
    background: linear-gradient(
        90deg,
        #0573bb 0%,
        #00b4d8 25%,
        #22c55e 50%,
        #10b981 75%,
        #0573bb 100%
    ) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    font-weight: 700 !important;
    animation: footerBrandShift 3.5s linear infinite !important;
    text-decoration: none !important;
    transition: filter 0.2s ease !important;
    vertical-align: middle !important;
}

.footer a.footer-text:hover,
.footer-brand-rainbow:hover,
.footer-brand-gradient:hover {
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(5, 115, 187, 0.45)) !important;
}

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

/* Prevent text wrapping / jittering during sidebar toggle animation */
#sidebar-menu ul li a {
    white-space: nowrap !important;
}

/* --------------------------------------------------------
   DESKTOP ONLY (>= 992px) SIDEBAR & MAIN-CONTENT
   -------------------------------------------------------- */
@media (min-width: 992px) {
    .vertical-menu {
        position: fixed !important;
        top: 46px !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 230px !important;
        z-index: 1001 !important;
        overflow-x: hidden !important;
        transition: width 0.25s ease-in-out !important;
    }

    .main-content {
        margin-left: 230px !important;
        transition: margin-left 0.25s ease-in-out !important;
    }

    .footer {
        left: 230px !important;
        right: 0 !important;
    }

    body:not([data-sidebar-size="sm"]) .vertical-menu,
    body[data-sidebar-size="lg"] .vertical-menu {
        width: 230px !important;
    }

    body:not([data-sidebar-size="sm"]) .main-content,
    body[data-sidebar-size="lg"] .main-content {
        margin-left: 230px !important;
    }

    body:not([data-sidebar-size="sm"]) .footer,
    body[data-sidebar-size="lg"] .footer {
        left: 230px !important;
    }

    /* Collapsed Sidebar on desktop (data-sidebar-size="sm" or vertical-collpsed) */
    body[data-sidebar-size="sm"] .vertical-menu,
    body.vertical-collpsed .vertical-menu {
        width: 70px !important;
        position: fixed !important;
        z-index: 1001 !important;
        overflow: visible !important;
        transition: width 0.25s ease-in-out !important;
    }

    body[data-sidebar-size="sm"] .main-content,
    body.vertical-collpsed .main-content {
        margin-left: 70px !important;
        transition: margin-left 0.25s ease-in-out !important;
    }

    body[data-sidebar-size="sm"] .footer,
    body.vertical-collpsed .footer {
        left: 70px !important;
        transition: left 0.25s ease-in-out !important;
    }
}

/* --------------------------------------------------------
   MOBILE & TABLET (< 992px): FULL WIDTH CONTENT & SIDEBAR OVERLAY
   -------------------------------------------------------- */
@media (max-width: 991.98px) {
    /* 1. Main Content: Reset left margin and padding to 0 */
    .main-content,
    body .main-content,
    body:not([data-sidebar-size="sm"]) .main-content,
    body[data-sidebar-size="sm"] .main-content,
    body[data-sidebar-size="lg"] .main-content {
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 2. Footer: Reset left to 0 */
    .footer,
    body .footer,
    body:not([data-sidebar-size="sm"]) .footer,
    body[data-sidebar-size="sm"] .footer,
    body[data-sidebar-size="lg"] .footer {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    /* 3. Sidebar: Fixed overlay drawer hidden off-screen to the left */
    .vertical-menu,
    body .vertical-menu,
    body:not([data-sidebar-size="sm"]) .vertical-menu,
    body[data-sidebar-size="sm"] .vertical-menu,
    body[data-sidebar-size="lg"] .vertical-menu {
        position: fixed !important;
        top: 46px !important;
        bottom: 0 !important;
        left: -260px !important;
        width: 260px !important;
        z-index: 1050 !important;
        display: block !important;
        visibility: hidden !important;
        transition: left 0.25s ease-in-out, visibility 0.25s ease-in-out !important;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.25) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    /* 4. When sidebar is opened via hamburger */
    body.sidebar-enable .vertical-menu {
        left: 0 !important;
        visibility: visible !important;
    }

    /* 5. Backdrop overlay */
    .sidebar-backdrop {
        position: fixed !important;
        top: 46px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(15, 23, 42, 0.45) !important;
        backdrop-filter: blur(2px) !important;
        z-index: 1040 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.2s ease !important;
    }

    body.sidebar-enable .sidebar-backdrop {
        display: block !important;
        opacity: 1 !important;
    }

    /* 6. Page Content Padding on Tablet/Mobile */
    .page-content {
        padding-top: calc(46px + 1rem) !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-bottom: 50px !important;
    }
}

/* --------------------------------------------------------
   EXTRA SMALL MOBILE PHONES (< 576px)
   -------------------------------------------------------- */
@media (max-width: 575.98px) {
    .page-content {
        padding-top: calc(46px + 0.75rem) !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        padding-bottom: 50px !important;
    }

    /* Welcome Card on Dashboard */
    .dashboard-header-banner {
        padding: 1.15rem 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .dashboard-header-banner .dash-user-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .dash-avatar-wrapper {
        width: 52px !important;
        height: 52px !important;
    }

    .dash-welcome-text {
        min-width: 0 !important;
        width: 100% !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .dash-welcome-text h4 {
        font-size: 1.15rem !important;
        word-break: normal !important;
        line-height: 1.35 !important;
        margin-bottom: 0.25rem !important;
    }

    .dash-welcome-text p {
        font-size: 0.82rem !important;
        line-height: 1.45 !important;
        word-break: normal !important;
    }

    .dash-welcome-text .d-flex {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .dash-banner-actions {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .dash-banner-actions a,
    .dash-banner-actions .btn,
    .dash-banner-actions .hrms-btn-primary {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* Stat Metric Cards */
    .hrms-metric-card {
        padding: 0.75rem 0.85rem !important;
        min-height: 74px !important;
    }

    .hrms-metric-content {
        gap: 8px !important;
    }

    .metric-info-left {
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    .metric-title {
        font-size: 0.68rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .metric-value {
        font-size: 1.25rem !important;
    }

    .metric-subtitle {
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .metric-icon-box {
        flex-shrink: 0 !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 15px !important;
    }

    /* Roster Table on Mobile (< 576px) */
    .hrms-dash-card-header {
        padding: 0.85rem 1rem !important;
    }

    .hrms-dash-card-header h6 {
        font-size: 0.9rem !important;
    }

    .roster-table {
        font-size: 11.5px !important;
        width: 100% !important;
    }

    .roster-table thead th {
        font-size: 11px !important;
        padding: 8px 4px !important;
        white-space: nowrap !important;
    }

    .roster-table tbody td {
        padding: 8px 4px !important;
        vertical-align: middle !important;
    }

    .roster-table th.ps-3,
    .roster-table td.ps-3 {
        padding-left: 8px !important;
    }

    .roster-table th.pe-3,
    .roster-table td.pe-3 {
        padding-right: 8px !important;
    }

    .roster-table .table-avatar {
        width: 28px !important;
        height: 28px !important;
    }

    .roster-table .table-user-name {
        font-size: 11.5px !important;
        max-width: 85px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .roster-table .table-user-desc {
        font-size: 10px !important;
        max-width: 85px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .roster-table .badge {
        font-size: 10px !important;
        padding: 3px 5px !important;
        font-weight: 600 !important;
    }

    .roster-table .roster-view-btn {
        width: 26px !important;
        height: 26px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }
}

/* Roster Table Base Rules */
.roster-table .table-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    flex-shrink: 0;
}

.roster-table .table-user-info {
    min-width: 0;
}

.roster-table .table-user-name {
    line-height: 1.25;
}

.roster-table .table-user-desc {
    display: block;
    line-height: 1.2;
}

/* ========================================================
   REPORT PAGE RESPONSIVE STYLES
   ======================================================== */
.report-header {
    padding: 6px 16px !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    position: relative !important;
    z-index: 1050 !important;
}

.report-title {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.report-filter-form {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    margin-left: auto !important;
}

.report-date-wrap {
    width: 110px;
    flex-shrink: 0;
}

.report-date-wrap .header-filter-input {
    width: 110px !important;
    cursor: pointer;
}

.report-user-wrap {
    width: 150px;
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    z-index: 1060;
}

.report-user-wrap .user-dropdown-toggle-btn {
    width: 150px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    text-align: left !important;
}

.report-actions-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

/* Tablet & Mobile Breakpoint (< 992px) */
@media (max-width: 991.98px) {
    .report-header {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 12px !important;
        gap: 10px !important;
        min-height: auto !important;
    }

    .report-header .report-title {
        width: 100% !important;
        margin-bottom: 2px !important;
    }

    .report-filter-form {
        width: 100% !important;
        margin-left: 0 !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .report-date-wrap {
        flex: 1 1 calc(50% - 4px) !important;
        width: auto !important;
        min-width: 0 !important;
    }

    .report-date-wrap .header-filter-input,
    .card-header-navbar-gradient .report-date-wrap .flatpickr-input,
    .card-header-navbar-gradient .report-date-wrap input.datepicker {
        width: 100% !important;
        max-width: 100% !important;
    }

    .report-user-wrap {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .report-user-wrap .user-dropdown-toggle-btn {
        width: 100% !important;
    }

    .report-user-wrap .user-dropdown-menu {
        left: 0 !important;
        right: 0 !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .report-actions-group {
        display: flex !important;
        width: 100% !important;
        gap: 6px !important;
    }

    .report-actions-group button,
    .report-actions-group a {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
        height: 32px !important;
        font-size: 12px !important;
    }
}

/* Extra Small Phones (< 576px) */
@media (max-width: 575.98px) {
    .report-header {
        padding: 8px 10px !important;
        gap: 8px !important;
    }

    .report-header .report-title {
        font-size: 13px !important;
    }

    .report-actions-group button,
    .report-actions-group a {
        font-size: 11px !important;
        padding: 0 8px !important;
        height: 30px !important;
    }

    .card-body.report-card-body {
        padding: 0.75rem 0.5rem !important;
    }
}

/* --------------------------------------------------------
   COMPACT SIDEBAR (Keep existing layout/icon position untouched)
-------------------------------------------------------- */
#sidebar-menu {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

#sidebar-menu ul.metismenu > li {
    margin-bottom: 5px !important;
}

#sidebar-menu ul.metismenu > li > a {
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}

/* Active List Item with Gradient Blue */
#sidebar-menu ul.metismenu > li.mm-active > a,
#sidebar-menu ul.metismenu > li > a.active {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

#sidebar-menu ul.metismenu > li.mm-active > a i,
#sidebar-menu ul.metismenu > li.mm-active > a svg,
#sidebar-menu ul.metismenu > li > a.active i,
#sidebar-menu ul.metismenu > li > a.active svg {
    color: #ffffff !important;
}

#sidebar-menu ul.metismenu > li.mm-active > a:after {
    border-color: #ffffff !important;
}

/* Submenu active item */
#sidebar-menu .sub-menu li.mm-active > a,
#sidebar-menu .sub-menu li a.active {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%) !important;
    color: #ffffff !important;
    border-radius: 4px !important;
}

/* --------------------------------------------------------
   PREMIUM HRMS DASHBOARD STYLING (MATCHING SCREENSHOT)
-------------------------------------------------------- */
.dashboard-header-banner {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.dashboard-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #093ba6 0%, #0267ff 50%, #60a5fa 100%);
}

.dash-avatar-wrapper {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #0267ff;
    box-shadow: 0 4px 10px rgba(2, 103, 255, 0.2);
    flex-shrink: 0;
}

.dash-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-welcome-text h4 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.dash-welcome-text p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.dash-welcome-text .highlight-badge {
    color: #0267ff;
    font-weight: 600;
}

/* --------------------------------------------------------
   COMPACT HORIZONTAL STATS CARDS (MATCHING USER REFERENCE)
-------------------------------------------------------- */
.hrms-metric-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.85rem 1.15rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 82px;
}

.hrms-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0d9488; /* default teal */
}

.hrms-metric-card.border-teal::before { background: #0d9488; }
.hrms-metric-card.border-orange::before { background: #0267ff; }
.hrms-metric-card.border-green::before { background: #22c55e; }
.hrms-metric-card.border-blue::before { background: #0267ff; }
.hrms-metric-card.border-indigo::before { background: #6366f1; }
.hrms-metric-card.border-rose::before { background: #f43f5e; }
.hrms-metric-card.border-purple::before { background: #a855f7; }

.hrms-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.hrms-metric-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.metric-info-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-title {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
}

.metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0d9488;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.metric-value.color-teal { color: #0d9488; }
.metric-value.color-orange { color: #0267ff; }
.metric-value.color-green { color: #22c55e; }
.metric-value.color-blue { color: #0267ff; }
.metric-value.color-indigo { color: #4338ca; }
.metric-value.color-rose { color: #e11d48; }
.metric-value.color-purple { color: #9333ea; }

.metric-subtitle {
    font-size: 0.73rem;
    color: #94a3b8;
    margin-top: 2px;
}

.metric-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin: 0;
}

.metric-icon-box.teal { background: #f0fdfa; color: #0d9488; border: 1px solid #ccfbf1; }
.metric-icon-box.orange { background: #eff6ff; color: #0267ff; border: 1px solid #dbeafe; }
.metric-icon-box.green { background: #f0fdf4; color: #22c55e; border: 1px solid #bbf7d0; }
.metric-icon-box.blue { background: #eff6ff; color: #0267ff; border: 1px solid #dbeafe; }
.metric-icon-box.indigo { background: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; }
.metric-icon-box.rose { background: #fff1f2; color: #f43f5e; border: 1px solid #ffe4e6; }
.metric-icon-box.purple { background: #faf5ff; color: #a855f7; border: 1px solid #f3e8ff; }
    color: #0267ff;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.metric-link:hover {
    text-decoration: underline;
}

/* Dashboard Section Card */
.hrms-dash-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.hrms-dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #093ba6 0%, #0267ff 50%, #60a5fa 100%);
    background-size: 200% 100%;
    animation: cardBorderShimmer 3s ease-in-out infinite;
}

.hrms-dash-card-header {
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hrms-dash-card-header h6 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.hrms-dash-card-body {
    padding: 1.4rem;
    flex: 1;
}

/* Department Progress Bars */
.dept-bar-item {
    margin-bottom: 14px;
}

.dept-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.dept-progress {
    height: 8px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.dept-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0267ff 0%, #0052d9 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clock In / Out List */
.clockin-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.clockin-user-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.clockin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #0267ff;
}

.clockin-badge-time {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.late-badge-time {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
}


/* ==========================================================================
   MY PORTAL & MODALS PREMIUM UI STYLES
   ========================================================================== */

/* Main Portal Card Base */
.portal-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-card:hover {
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0267ff;
}

.portal-card.accent-blue::before { background: linear-gradient(90deg, #0267ff, #0052d9); }
.portal-card.accent-emerald::before { background: linear-gradient(90deg, #10b981, #059669); }
.portal-card.accent-indigo::before { background: linear-gradient(90deg, #6366f1, #4f46e5); }
.portal-card.accent-sky::before { background: linear-gradient(90deg, #0284c7, #0369a1); }
.portal-card.accent-rose::before { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.portal-card.accent-amber::before { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* Portal Profile Card */
.portal-profile-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portal-profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0267ff 0%, #0052d9 50%, #10b981 100%);
}

/* MMT Brand Gradient Border (Blue → Cyan → Green) */
.portal-avatar-wrapper {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 140px;
    height: 140px;
    margin: 14px auto 16px auto;
    border-radius: 50%;
    /* Gradient border via background + padding trick */
    background: linear-gradient(135deg, #0573bb 0%, #00b4d8 30%, #22c55e 65%, #0284c7 100%);
    padding: 4px;
}

/* White inner circle to show only the border */
.portal-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #ffffff;
    z-index: 1;
}

/* Soft glow behind */
.portal-avatar-wrapper::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0573bb 0%, #00b4d8 30%, #22c55e 65%, #0284c7 100%);
    filter: blur(10px);
    opacity: 0.4;
    z-index: 0;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.portal-avatar-wrapper:hover::after {
    opacity: 0.65;
    filter: blur(14px);
}

.portal-avatar-wrapper a {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    text-decoration: none;
}

.portal-avatar-img {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.10);
    transition: transform 0.25s ease;
    display: block;
    position: relative;
    z-index: 2;
    background: #f1f5f9;
    /* For span fallback avatars */
    min-width: 124px;
    min-height: 124px;
    align-items: center;
    justify-content: center;
}

.portal-avatar-wrapper:hover .portal-avatar-img {
    transform: scale(1.02);
}

.portal-avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
}


.portal-avatar-badge.online {
    background: #22c55e;
    animation: pulseOnline 2s infinite;
}

.portal-avatar-badge.break {
    background: #f59e0b;
    animation: pulseBreak 2s infinite;
}

.portal-avatar-badge.offline {
    background: #94a3b8;
}

@keyframes pulseOnline {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes pulseBreak {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.portal-user-greeting {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    text-align: center;
}

.portal-greeting-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0267ff;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    padding: 2px 9px;
    vertical-align: middle;
}

.portal-time-pill {
    display: none;
}

/* Status Badges */
.portal-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 700;
    width: 100%;
    margin-bottom: 14px;
}

.portal-status-badge.required {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.portal-status-badge.active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.portal-status-badge.break {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.portal-status-badge.done {
    background: #eff6ff;
    color: #0267ff;
    border: 1px solid #bfdbfe;
}

.portal-status-badge.leave {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Action Buttons (Matches user's Blue Check In / Green Start Break buttons) */
.btn-punch-in {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 11px 22px !important;
    font-size: 14.5px !important;
    box-shadow: 0 4px 14px rgba(2, 103, 255, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-punch-in:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 103, 255, 0.45) !important;
    color: #ffffff !important;
}

.btn-punch-in:active {
    transform: translateY(0);
}

.btn-punch-out {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-punch-out:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
    color: #ffffff !important;
}

.btn-break-start {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-break-start:hover {
    background: linear-gradient(135deg, #022c22 0%, #065f46 50%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 78, 59, 0.45) !important;
    color: #ffffff !important;
}

.btn-break-end {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 11px 22px !important;
    font-size: 14.5px !important;
    box-shadow: 0 4px 14px rgba(2, 103, 255, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-break-end:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 103, 255, 0.45) !important;
    color: #ffffff !important;
}

/* View Report Button (Outline Blue -> Solid Vibrant Blue on Hover with White Text) */
.btn-portal-view-report {
    background: transparent !important;
    color: #0267ff !important;
    border: 1.5px solid #0267ff !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    padding: 7px 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
}

.btn-portal-view-report i {
    color: #0267ff !important;
    transition: color 0.2s ease !important;
}

.btn-portal-view-report:hover,
.btn-portal-view-report:focus,
.btn-portal-view-report:active {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%) !important;
    color: #ffffff !important;
    border-color: #0052d9 !important;
    box-shadow: 0 4px 14px rgba(2, 103, 255, 0.35) !important;
    transform: translateY(-1px);
}

.btn-portal-view-report:hover i,
.btn-portal-view-report:focus i,
.btn-portal-view-report:active i,
.btn-portal-view-report:hover *,
.btn-portal-view-report:focus *,
.btn-portal-view-report:active * {
    color: #ffffff !important;
}

/* Metric Cards on Right Side */
.portal-metric-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.portal-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #0267ff;
}

.portal-metric-card.accent-blue::before { background: linear-gradient(90deg, #0267ff, #0052d9); }
.portal-metric-card.accent-emerald::before { background: linear-gradient(90deg, #10b981, #059669); }
.portal-metric-card.accent-indigo::before { background: linear-gradient(90deg, #6366f1, #4f46e5); }
.portal-metric-card.accent-sky::before { background: linear-gradient(90deg, #0284c7, #0369a1); }
.portal-metric-card.accent-rose::before { background: linear-gradient(90deg, #f43f5e, #e11d48); }

.portal-metric-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.portal-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.portal-metric-icon.blue { background: #eff6ff; color: #0267ff; border: 1px solid #dbeafe; }
.portal-metric-icon.emerald { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.portal-metric-icon.indigo { background: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; }
.portal-metric-icon.sky { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd; }
.portal-metric-icon.rose { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.portal-metric-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.portal-metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 4px;
}

.portal-metric-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 8px;
}

.portal-metric-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    font-weight: 600;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

/* Dual Break Mini-Boxes Inside Portal Metric Card */
.portal-break-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 100%;
}

.portal-break-item {
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portal-break-item.actual {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.portal-break-item.missed {
    background: #fff5f5;
    border: 1px solid #fecaca;
}

.portal-break-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.portal-break-item.actual .portal-break-label { color: #0284c7; }
.portal-break-item.missed .portal-break-label { color: #dc2626; }

.portal-break-val {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 4px 0 2px 0;
}

.portal-break-item.actual .portal-break-val { color: #0369a1; }
.portal-break-item.missed .portal-break-val { color: #b91c1c; }

/* Shift Item Clean Styling */
.portal-shift-badge-active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.portal-shift-badge-inactive {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Activity & Report Table Section */
.portal-table-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    margin-top: 4px;
}

.portal-table-header {
    padding: 16px 22px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-table-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.portal-table-badge {
    background: #eff6ff;
    color: #0267ff;
    border: 1px solid #dbeafe;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.portal-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.portal-table tbody td {
    padding: 14px 18px;
    font-size: 13.5px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.portal-table tbody tr:hover {
    background: #f8fafc;
}

.portal-btn-view {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: #0267ff;
    border: 1px solid #dbeafe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.portal-btn-view:hover {
    background: #0267ff;
    color: #ffffff;
    border-color: #0267ff;
    transform: translateY(-1px);
}

.portal-btn-breaks {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.portal-btn-breaks:hover {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

/* ==========================================================================
   PORTAL MODALS PREMIUM STYLES
   ========================================================================== */
.portal-modal .modal-content {
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    background: #ffffff;
}

.portal-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    position: relative;
}

.portal-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.portal-modal.modal-checkin .portal-modal-header::before {
    background: linear-gradient(90deg, #0267ff, #0052d9);
}

.portal-modal.modal-checkout .portal-modal-header::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.portal-modal.modal-break .portal-modal-header::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.portal-modal.modal-break-end .portal-modal-header::before {
    background: linear-gradient(90deg, #0267ff, #0052d9);
}

.portal-modal-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.portal-modal-icon.blue { background: #eff6ff; color: #0267ff; border: 1px solid #dbeafe; }
.portal-modal-icon.red { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.portal-modal-icon.green { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.portal-modal-icon.amber { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

.portal-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.portal-modal-subtitle {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

.portal-modal-body {
    padding: 22px 24px;
}

/* Clean White Live Digital Clock Widget */
.portal-clock-display {
    background: #ffffff !important;
    border-radius: 14px;
    padding: 16px 20px;
    color: #1e293b;
    text-align: center;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    margin-bottom: 18px;
    border: 1.5px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.portal-clock-display::before {
    display: none !important;
}

.portal-clock-display .clock-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.portal-clock-display .clock-meta .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.portal-clock-display .clock-digits {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.2;
    padding: 2px 0;
    color: #0f172a !important;
    text-shadow: none !important;
    position: relative;
    z-index: 1;
}

.portal-clock-display.green .clock-digits {
    color: #059669 !important;
    text-shadow: none !important;
}

.portal-clock-display.red {
    background: #ffffff !important;
    border-color: #fecaca !important;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.05) !important;
}

.portal-clock-display.red .clock-digits {
    color: #dc2626 !important;
    text-shadow: none !important;
}

.portal-clock-display.amber {
    background: #ffffff !important;
    border-color: #fde68a !important;
}

.portal-clock-display.amber .clock-digits {
    color: #d97706 !important;
    text-shadow: none !important;
}

.portal-clock-display.blue {
    background: #ffffff !important;
    border-color: #dbeafe !important;
}

.portal-clock-display.blue .clock-digits {
    color: #0267ff !important;
    text-shadow: none !important;
}

.portal-clock-display .clock-footer {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.portal-clock-display .clock-footer i {
    color: #16a34a !important;
}

/* Camera Preview Card - Clean White */
.portal-camera-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 1.5px solid #e2e8f0;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.portal-camera-bar {
    padding: 10px 16px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.portal-camera-bar span,
.portal-camera-bar i {
    color: #1e293b !important;
}

.modal-checkout .portal-camera-bar {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.portal-camera-badge-live {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.portal-camera-badge-live .pulse-dot {
    width: 6px;
    height: 6px;
    background: #16a34a;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

.portal-camera-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f8fafc;
}

/* Location Status Bar */
.portal-location-bar {
    margin-bottom: 16px;
    text-align: center;
}

/* Modal Form Fields */
.portal-form-label {
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-form-label .req-dot {
    color: #ef4444;
}

.portal-input, .portal-textarea {
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    font-size: 13.5px !important;
    padding: 10px 14px !important;
    background: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.portal-input:focus, .portal-textarea:focus {
    background: #ffffff !important;
    border-color: #0267ff !important;
    box-shadow: 0 0 0 3px rgba(2, 103, 255, 0.12) !important;
    outline: none !important;
}

/* Modal Footer Action Buttons */
.portal-modal-footer {
    padding: 14px 24px 20px 24px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.btn-portal-modal-primary {
    background: linear-gradient(180deg, #0267ff 0%, #0052d9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    box-shadow: 0 4px 14px rgba(2, 103, 255, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-portal-modal-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 103, 255, 0.45) !important;
    color: #ffffff !important;
}

.btn-portal-modal-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-portal-modal-danger {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-portal-modal-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45) !important;
    color: #ffffff !important;
}

.btn-portal-modal-success {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-portal-modal-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #022c22 0%, #065f46 50%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 78, 59, 0.45) !important;
    color: #ffffff !important;
}


/* ==========================================================================
   PORTAL MODAL SCROLL & INTERNAL SCROLLBAR OPTIMIZATIONS
   ========================================================================== */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0px !important;
}

.portal-modal.modal {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    padding-right: 0px !important;
}

/* Check In & Check Out Modal Dimensions (Single-Column Vertical Style) */
.portal-modal.modal-checkin .modal-dialog,
.portal-modal.modal-checkout .modal-dialog {
    max-width: 550px !important;
    margin: 1.5rem auto !important;
}

.portal-modal .modal-dialog-scrollable {
    max-height: calc(100vh - 3rem) !important;
    display: flex;
}

.portal-modal .modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 3rem) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    border-radius: 18px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35) !important;
}

.portal-modal .modal-dialog-scrollable .portal-modal-body {
    max-height: calc(85vh - 140px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 18px 22px !important;
    scroll-behavior: smooth;
}

/* Custom Sleek Scrollbar for Modal Body */
.portal-modal .portal-modal-body::-webkit-scrollbar {
    width: 6px;
}

.portal-modal .portal-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.portal-modal .portal-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.portal-modal .portal-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Pinned Modal Footer */
.portal-modal .portal-modal-footer {
    padding: 12px 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.portal-modal .portal-clock-display {
    padding: 12px 16px;
    margin-bottom: 14px;
}

.portal-modal .portal-clock-display .clock-digits {
    font-size: 1.85rem;
    letter-spacing: 1px;
}

.portal-modal .portal-camera-card {
    margin-bottom: 14px;
}

.portal-modal .portal-camera-video {
    height: 190px;
    width: 100%;
    object-fit: cover;
}

.tox-tinymce {
    border-radius: 10px !important;
}

/* ==========================================================================
   DISABLE PACE PRELOADER & CORNER SPINNER
   ========================================================================== */
.pace,
.pace-progress,
.pace-activity {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================================
   PAGE CARD HEADER (NAVBAR GRADIENT STYLE) & DARK GREEN GRADIENT BUTTON
   ========================================================================== */
.card-header-navbar-gradient {
    background: linear-gradient(90deg, #093ba6 0%, #0d55d8 45%, #1e6bf2 100%) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    padding: 6px 18px !important;
    min-height: 38px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-top-left-radius: inherit !important;
    border-top-right-radius: inherit !important;
}

.card-header-navbar-gradient .card-title-text {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.card-header-navbar-gradient .card-header-actions {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.btn-dark-green-gradient {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 4px 13px !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 10px rgba(6, 78, 59, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    margin-left: auto !important;
    white-space: nowrap !important;
}

.btn-dark-green-gradient i {
    font-size: 11px !important;
    line-height: 1 !important;
}

.btn-dark-green-gradient:hover {
    background: linear-gradient(135deg, #022c22 0%, #065f46 50%, #047857 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 14px rgba(6, 78, 59, 0.5) !important;
    color: #ffffff !important;
}

.btn-dark-green-gradient:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(6, 78, 59, 0.3) !important;
}

.btn-gradient-cancel {
    background: linear-gradient(135deg, #64748b 0%, #475569 50%, #334155 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 6px rgba(71, 85, 105, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.btn-gradient-cancel:hover,
.btn-gradient-cancel:focus,
.btn-gradient-cancel:active {
    background: linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(30, 41, 59, 0.35) !important;
    color: #ffffff !important;
}

.btn-gradient-cancel i {
    color: #ffffff !important;
}

/* ==========================================================================
   GLOBAL ACTION BUTTONS (DELETE ICON WHITE, COMPACT BUTTONS)
   ========================================================================== */
.delete-btn-bg,
.delete-btn-bg i,
.delete-btn-text,
button.delete-btn-bg,
button.delete-btn-bg i {
    color: #ffffff !important;
}

/* ==========================================================================
   FLOATING OUTLINE INPUT GROUP (MATERIAL OUTLINE FLOATING TRANSITION)
   ========================================================================== */
.floating-outline-group {
    position: relative;
    width: 100%;
}

.floating-outline-group .form-control-compact {
    height: 38px !important;
    min-height: 38px !important;
    padding: 6px 14px !important;
    font-size: 13.5px !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Default state: Label sits INSIDE input like placeholder (grey text, vertically centered) */
.floating-outline-group .floating-label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 400;
    color: #8c8e8f;
    pointer-events: none;
    line-height: 1;
    z-index: 3;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focused OR Filled (not placeholder-shown): border turns blue, label floats to top border line */
.floating-outline-group .form-control-compact:focus,
.floating-outline-group .form-control-compact:not(:placeholder-shown) {
    border-color: #0d6efd !important;
    border-width: 1.5px !important;
}

.floating-outline-group .form-control-compact:focus ~ .floating-label,
.floating-outline-group .form-control-compact:not(:placeholder-shown) ~ .floating-label,
.floating-outline-group:focus-within .floating-label,
.floating-outline-group:has(.form-control-compact:not(:placeholder-shown)) .floating-label {
    top: 0 !important;
    transform: translateY(-50%) !important;
    background-color: #ffffff !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #0d6efd !important;
}

.floating-outline-group .form-control-compact:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12) !important;
}

.floating-outline-group .form-control-compact::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* ==========================================================================
   SLATE / CANCEL PILL GRADIENT BUTTON (MATCHING USER SCREENSHOT)
   ========================================================================== */
.btn-slate-pill-gradient {
    background: linear-gradient(180deg, #5e6b7b 0%, #475463 50%, #34404f 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 5px 16px !important;
    border-radius: 30px !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
}

.btn-slate-pill-gradient i {
    font-size: 11px !important;
    line-height: 1 !important;
    color: #ffffff !important;
}

.btn-slate-pill-gradient:hover {
    background: linear-gradient(180deg, #4d5968 0%, #3a4654 50%, #26313e 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.5) !important;
    color: #ffffff !important;
}

.btn-slate-pill-gradient:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.3) !important;
}

/* ==========================================================================
   MODAL FOOTER BUTTON SIZING (STANDARD BOOTSTRAP RECTANGLE BUTTONS)
   ========================================================================== */
.modal-footer {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 8px !important;
}

.modal-footer::before,
.modal-footer::after {
    display: none !important;
    content: none !important;
}

.modal-footer .btn {
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    min-height: 38px !important;
    line-height: 1.5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.modal-footer .btn-secondary {
    background-color: #6c757d !important;
    border: 1px solid #6c757d !important;
    color: #ffffff !important;
}

.modal-footer .btn-secondary:hover {
    background-color: #5c636a !important;
    border-color: #565e64 !important;
    color: #ffffff !important;
}

.modal-footer .btn-primary {
    background-color: #0d6efd !important;
    border: 1px solid #0d6efd !important;
    color: #ffffff !important;
}

.modal-footer .btn-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: #ffffff !important;
}

/* ========================================================
   AUTH / LOGIN PAGE RESPONSIVE STYLES
   Standard Bootstrap 5 Breakpoints:
   - Extra Small (XS): < 576px (Phones portrait)
   - Small (SM): 576px - 767.98px (Phones landscape)
   - Medium (MD): 768px - 991.98px (Tablets portrait)
   - Large (LG+): >= 992px (Desktops / Laptops)
   ======================================================== */

body.login-page-body,
html:has(body.login-page-body) {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.login-wrapper {
    min-height: 100vh !important;
    height: auto !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem 1rem !important;
    box-sizing: border-box !important;
}

.login-card-container {
    width: 100% !important;
    max-height: none !important;
    display: flex !important;
    box-sizing: border-box !important;
    transition: all 0.25s ease !important;
}

/* Medium & Tablets (max-width: 991.98px) - Hide left brand panel and center form */
@media (max-width: 991.98px) {
    .brand-panel {
        display: none !important;
    }

    .login-card-container {
        max-width: 480px !important;
        margin: 0 auto !important;
        border-radius: 20px !important;
        box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.12),
                    0 0 0 1px rgba(226, 232, 240, 0.8) !important;
    }

    .form-panel {
        flex: 1 1 100% !important;
        width: 100% !important;
        padding: 2.25rem 2rem !important;
    }
}

/* Small devices (max-width: 767.98px) - Handheld landscape & small tablets */
@media (max-width: 767.98px) {
    .login-wrapper {
        padding: 1.25rem 0.75rem !important;
    }

    .login-card-container {
        max-width: 440px !important;
        border-radius: 18px !important;
    }

    .form-panel {
        padding: 2rem 1.5rem !important;
    }

    .form-header h2 {
        font-size: 1.45rem !important;
    }

    .form-header p {
        font-size: 0.82rem !important;
    }
}

/* Extra Small (max-width: 575.98px) - Mobile phones portrait */
@media (max-width: 575.98px) {
    .login-wrapper {
        padding: 0.75rem 0.5rem !important;
        align-items: center !important;
    }

    .login-card-container {
        max-width: 100% !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08),
                    0 0 0 1px rgba(226, 232, 240, 0.9) !important;
    }

    .form-panel {
        padding: 1.5rem 1.15rem !important;
    }

    .logo-wrap {
        margin-bottom: 0.85rem !important;
    }

    .company-logo {
        max-height: 36px !important;
        width: auto !important;
    }

    .form-header h2 {
        font-size: 1.3rem !important;
        margin-bottom: 0.25rem !important;
    }

    .form-header p {
        font-size: 0.8rem !important;
        margin-bottom: 1.15rem !important;
    }

    .form-group-custom {
        margin-bottom: 0.95rem !important;
    }

    .form-label-custom {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }

    .input-box .form-control {
        height: 46px !important;
        font-size: 0.9rem !important;
        padding-left: 2.45rem !important;
    }

    .input-icon-left {
        left: 12px !important;
        font-size: 0.95rem !important;
    }

    .password-toggle-btn {
        right: 8px !important;
        width: 34px !important;
        height: 34px !important;
        font-size: 0.95rem !important;
    }

    .remember-wrap {
        font-size: 0.8rem !important;
        margin-bottom: 1.15rem !important;
    }

    .btn-submit {
        height: 46px !important;
        font-size: 0.92rem !important;
        border-radius: 10px !important;
    }

    .form-alert {
        padding: 8px 12px !important;
        font-size: 0.78rem !important;
        margin-bottom: 0.85rem !important;
    }

    .form-footer {
        margin-top: 1.15rem !important;
        font-size: 0.75rem !important;
    }
}

/* Landscape / short-height screens (max-height: 600px) */
@media (max-height: 600px) {
    .login-wrapper {
        padding: 1rem 0.5rem !important;
        min-height: 100vh !important;
        height: auto !important;
    }

    .login-card-container {
        max-height: none !important;
        margin: auto 0 !important;
    }

    .brand-panel {
        padding: 1.5rem !important;
    }

    .form-panel {
        padding: 1.25rem 1.5rem !important;
    }

    .logo-wrap {
        margin-bottom: 0.5rem !important;
    }

    .form-header p {
        margin-bottom: 0.75rem !important;
    }

    .form-group-custom {
        margin-bottom: 0.75rem !important;
    }
}

/* ==========================================================================
   MY PORTAL & MODALS RESPONSIVE BREAKPOINTS (Bootstrap 5)
   ========================================================================== */

/* Tablet & Mobile (< 992px) */
@media (max-width: 991.98px) {
    .portal-profile-card {
        padding: 20px 18px;
    }
    .portal-metric-card {
        padding: 16px 18px;
    }
}

/* Tablet (576px to 991.98px) - Clean width for report modal */
@media (min-width: 576px) and (max-width: 991.98px) {
    .portal-modal.modal-report .modal-dialog {
        max-width: 680px !important;
        width: 92% !important;
        margin: 1.75rem auto !important;
    }
    .portal-modal .portal-tabs .nav-link {
        font-size: 12.5px !important;
        padding: 8px 6px !important;
    }
    .portal-modal-title {
        font-size: 0.98rem !important;
    }
}

/* Base styles for Portal Daily Report Segmented Tabs */
.portal-modal .portal-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.portal-modal .portal-tabs .nav-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    text-align: center !important;
}

.portal-modal .portal-tabs .nav-link {
    width: 100% !important;
    padding: 9px 8px !important;
    border-radius: 10px !important;
    border: 1.5px solid transparent !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: transparent !important;
    color: #64748b !important;
    transition: all 0.2s ease !important;
}

.portal-modal .portal-tabs .nav-link:hover {
    background: #ffffff !important;
    color: #1e293b !important;
}

.portal-modal .portal-tabs .nav-link.active {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

.portal-modal .portal-tabs .nav-link.text-danger.active {
    color: #ef4444 !important;
    border-color: #fecaca !important;
}

.portal-modal .portal-tabs .nav-link.text-primary.active {
    color: #0267ff !important;
    border-color: #bfdbfe !important;
}

.portal-modal .portal-tabs .nav-link.text-success.active {
    color: #059669 !important;
    border-color: #a7f3d0 !important;
}

/* Landscape / Small Tablet (< 768px) */
@media (max-width: 767.98px) {
    .portal-table-header {
        padding: 14px 16px;
    }
    .portal-table thead th {
        padding: 10px 10px;
        font-size: 0.7rem;
    }
    .portal-table tbody td {
        padding: 12px 10px;
        font-size: 13px;
    }
}

/* Extra Small Phones (< 576px) */
@media (max-width: 575.98px) {
    /* 1. Profile Card */
    .portal-profile-card {
        padding: 18px 14px !important;
        margin-bottom: 1rem !important;
    }
    .portal-avatar-wrapper {
        width: 112px !important;
        height: 112px !important;
        margin: 8px auto 12px auto !important;
    }
    .portal-avatar-img {
        width: 102px !important;
        height: 102px !important;
    }
    .portal-avatar-badge {
        width: 18px !important;
        height: 18px !important;
        bottom: 3px !important;
        right: 3px !important;
    }
    .portal-user-greeting {
        font-size: 0.95rem !important;
        margin-bottom: 4px !important;
    }
    .portal-status-badge {
        font-size: 11.5px !important;
        padding: 6px 10px !important;
        margin-bottom: 12px !important;
    }
    .btn-punch-in,
    .btn-punch-out,
    .btn-break-start,
    .btn-break-end {
        padding: 9px 12px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    /* 2. Metric Cards */
    .portal-metric-card {
        padding: 14px 14px !important;
        border-radius: 14px !important;
    }
    .portal-metric-header {
        gap: 8px !important;
        margin-bottom: 8px !important;
    }
    .portal-metric-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }
    .portal-metric-title {
        font-size: 0.74rem !important;
    }
    .portal-metric-value {
        font-size: 1.25rem !important;
        margin-bottom: 2px !important;
    }
    .portal-metric-desc {
        font-size: 0.72rem !important;
        margin-bottom: 6px !important;
    }
    .portal-metric-footer {
        font-size: 0.68rem !important;
        padding-top: 6px !important;
    }

    /* Card 3 (Leave & Reports) quick buttons on mobile */
    .portal-metric-card .btn-portal-view-report,
    .portal-metric-card .btn-punch-in {
        padding: 6px 8px !important;
        font-size: 11.5px !important;
        white-space: nowrap !important;
    }

    /* Card 4 (Break Times - Dual Box) */
    .portal-break-row {
        gap: 8px !important;
    }
    .portal-break-item {
        padding: 10px 8px !important;
        border-radius: 10px !important;
    }
    .portal-break-label {
        font-size: 0.62rem !important;
        gap: 4px !important;
    }
    .portal-break-val {
        font-size: 1.05rem !important;
        margin: 3px 0 !important;
    }
    .portal-break-item .badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    /* 3. Today's Attendance & Activity Log Table */
    .portal-table-card {
        border-radius: 14px !important;
    }
    .portal-table-header {
        padding: 12px 14px !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .portal-table-title {
        font-size: 0.92rem !important;
    }
    .portal-table-badge {
        font-size: 11px !important;
        padding: 2px 8px !important;
    }
    .portal-table thead th {
        padding: 8px 6px !important;
        font-size: 10px !important;
        letter-spacing: 0.02em !important;
        white-space: nowrap !important;
    }
    .portal-table tbody td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    .portal-table thead th.pe-4,
    .portal-table tbody td.pe-4 {
        padding-right: 8px !important;
        text-align: center !important;
    }
    .portal-table tbody td span.fw-bold {
        font-size: 12px !important;
        white-space: nowrap !important;
    }
    .portal-btn-breaks {
        padding: 3px 7px !important;
        font-size: 10.5px !important;
        white-space: nowrap !important;
    }
    .portal-btn-view {
        width: 28px !important;
        height: 28px !important;
        font-size: 11.5px !important;
    }

    /* 4. Portal Modals (All Modals Responsive on <576px) */
    .portal-modal .modal-dialog,
    .portal-modal.modal-checkin .modal-dialog,
    .portal-modal.modal-checkout .modal-dialog,
    .portal-modal.modal-break .modal-dialog,
    .portal-modal.modal-break-end .modal-dialog,
    .portal-modal.modal-report .modal-dialog {
        max-width: calc(100% - 1rem) !important;
        width: calc(100% - 1rem) !important;
        margin: 0.5rem auto !important;
    }
    .portal-modal .modal-content {
        border-radius: 16px !important;
        max-height: calc(100vh - 1rem) !important;
    }
    .portal-modal-header {
        padding: 10px 14px !important;
    }
    .portal-modal-title-box {
        gap: 8px !important;
    }
    .portal-modal-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }
    .portal-modal-title {
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        margin: 0 !important;
    }
    .portal-modal-subtitle {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }
    .portal-modal-body {
        padding: 14px !important;
    }
    .portal-modal-footer {
        padding: 10px 14px 14px 14px !important;
    }

    /* Daily Report Modal Segmented Tabs & Content (< 576px) */
    .portal-modal .portal-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        padding: 5px !important;
        gap: 4px !important;
        background: #f1f5f9 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        overflow: hidden !important;
    }
    .portal-modal .portal-tabs .nav-item {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }
    .portal-modal .portal-tabs .nav-link {
        font-size: 11.5px !important;
        padding: 7px 3px !important;
        border-radius: 8px !important;
        border: 1px solid transparent !important;
        gap: 4px !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
    .portal-modal .portal-tabs .nav-link i {
        font-size: 11px !important;
    }
    .portal-modal .portal-tabs .nav-link.active {
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
        font-weight: 700 !important;
    }
    .portal-modal .portal-tabs .nav-link.text-danger.active {
        color: #ef4444 !important;
        border-color: #fecaca !important;
    }
    .portal-modal .portal-tabs .nav-link.text-primary.active {
        color: #0267ff !important;
        border-color: #bfdbfe !important;
    }
    .portal-modal .portal-tabs .nav-link.text-success.active {
        color: #059669 !important;
        border-color: #a7f3d0 !important;
    }
    .portal-modal .tab-content,
    .portal-tab-content {
        padding: 12px 10px !important;
    }
    .portal-modal .tab-content .card-body,
    .portal-tab-content .card-body {
        padding: 12px !important;
        font-size: 13px !important;
    }

    /* Live Digital Clock in Check In / Check Out */
    .portal-clock-display {
        padding: 10px 12px !important;
        margin-bottom: 12px !important;
    }
    .portal-clock-display .clock-meta {
        font-size: 9.5px !important;
        letter-spacing: 0.04em !important;
    }
    .portal-clock-display .clock-digits {
        font-size: 1.55rem !important;
        padding: 0 !important;
    }
    .portal-clock-display .clock-footer {
        font-size: 10px !important;
    }

    /* Camera Card */
    .portal-camera-bar {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
    .portal-camera-video {
        height: 150px !important;
    }
}

/* ==========================================================================
   LEAVE TYPES PAGE RESPONSIVE STYLES (Bootstrap 5)
   ========================================================================== */

/* Base Styles for Leave Type Table */
.leave-type-table td,
.leave-type-table th {
    white-space: nowrap;
    vertical-align: middle;
    padding: 8px 14px;
}

.leave-type-table th {
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
}

.leave-type-table td {
    font-size: 13.5px;
    color: #334155;
}

/* Modal Footer Actions Base */
.modal-footer-btn-wrap {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Tablet & Mobile (< 992px) */
@media (max-width: 991.98px) {
    .leave-type-card .card-header {
        padding: 6px 14px !important;
    }
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 575.98px) {
    /* Card Header */
    .leave-type-card .card-header {
        padding: 6px 10px !important;
    }
    .leave-type-card .card-title-text {
        font-size: 13.5px !important;
    }
    .leave-type-card .card-header-actions .btn {
        padding: 3px 8px !important;
        font-size: 11px !important;
    }

    /* Card Body */
    .leave-type-card .card-body {
        padding: 8px 4px !important;
    }

    /* Table */
    .leave-type-table {
        min-width: 100% !important;
    }
    .leave-type-table th {
        font-size: 11px !important;
        padding: 6px 6px !important;
        letter-spacing: 0.02em !important;
        white-space: nowrap !important;
    }
    .leave-type-table td {
        font-size: 12px !important;
        padding: 6px 6px !important;
        white-space: nowrap !important;
    }
    .leave-type-table td:nth-child(2),
    .leave-type-table th:nth-child(2) {
        text-align: center !important;
    }
    .leave-type-table td:nth-child(3),
    .leave-type-table th:nth-child(3) {
        text-align: center !important;
    }
    .leave-type-table .btn-group .btn {
        padding: 3px 6px !important;
        font-size: 10px !important;
        width: 26px !important;
        height: 26px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .leave-type-table .btn-group .btn i {
        font-size: 10px !important;
    }

    /* Modals (Create & Edit Leave Type) */
    #createLeaveTypeModal .modal-dialog,
    #editLeaveTypeModal .modal-dialog {
        max-width: calc(100% - 1rem) !important;
        margin: 0.5rem auto !important;
    }
    #createLeaveTypeModal .modal-body,
    #editLeaveTypeModal .modal-body {
        padding: 16px 12px !important;
    }
    #createLeaveTypeModal .leave-type-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
        margin-bottom: 12px !important;
    }
    #createLeaveTypeModal .leave-type-row .floating-outline-group:first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    #createLeaveTypeModal .leave-type-row .floating-outline-group:nth-child(2) {
        width: 74px !important;
        flex: 0 0 74px !important;
    }
    #createLeaveTypeModal .leave-type-row .floating-outline-group:nth-child(2) .floating-label {
        left: 8px !important;
        font-size: 11px !important;
    }
    #createLeaveTypeModal .leave-type-row .floating-outline-group:nth-child(2) input {
        padding: 6px 8px !important;
        text-align: center !important;
    }
    #createLeaveTypeModal .leave-type-row button {
        width: 36px !important;
        height: 38px !important;
        flex: 0 0 36px !important;
    }
    #editLeaveTypeModal .modal-body .d-flex {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
    }
    #editLeaveTypeModal .floating-outline-group:first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    #editLeaveTypeModal .floating-outline-group:nth-child(2) {
        width: 80px !important;
        flex: 0 0 80px !important;
    }
    #editLeaveTypeModal .floating-outline-group:nth-child(2) .floating-label {
        left: 8px !important;
        font-size: 11px !important;
    }
    #editLeaveTypeModal .floating-outline-group:nth-child(2) input {
        padding: 6px 8px !important;
        text-align: center !important;
    }
    .modal-footer-btn-wrap {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }
    .modal-footer-btn-wrap .btn {
        flex: 1 1 0 !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* ==========================================================================
   LEAVE APPLICATIONS & MY APPLICATIONS RESPONSIVE STYLES (Bootstrap 5)
   ========================================================================== */

/* Header Base (Desktop >= 992px) */
.leave-app-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.leave-app-filter-form {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-left: auto !important;
    margin-bottom: 0 !important;
}

/* Tablet & Mobile (< 992px) */
@media (max-width: 991.98px) {
    .leave-app-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 10px 14px !important;
    }

    .leave-app-title {
        width: 100% !important;
        margin-bottom: 2px !important;
    }

    .leave-app-filter-form {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin-left: 0 !important;
        gap: 8px !important;
    }
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 575.98px) {
    .leave-app-header {
        padding: 10px 10px !important;
        gap: 8px !important;
    }

    .leave-app-title {
        font-size: 13.5px !important;
    }

    .leave-app-filter-form {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        width: 100% !important;
    }

    /* 2x2 Grid of Filter Inputs on Mobile */
    .leave-app-filter-form input#filter_date,
    .leave-app-filter-form .header-filter-input {
        flex: 1 1 calc(50% - 3px) !important;
        width: calc(50% - 3px) !important;
        min-width: 0 !important;
        height: 32px !important;
        font-size: 11.5px !important;
    }

    .leave-app-filter-form .search-select-component {
        flex: 1 1 calc(50% - 3px) !important;
        width: calc(50% - 3px) !important;
        min-width: 0 !important;
    }

    .leave-app-filter-form .search-select-trigger {
        height: 32px !important;
        font-size: 11.5px !important;
        padding: 0 8px !important;
    }

    .leave-app-filter-form .search-select-dropdown {
        max-width: calc(100vw - 24px) !important;
        min-width: 200px !important;
    }

    .leave-app-filter-form .dropdown-align-left .search-select-dropdown {
        left: 0 !important;
        right: auto !important;
    }

    .leave-app-filter-form .dropdown-align-right .search-select-dropdown {
        right: 0 !important;
        left: auto !important;
    }

    /* Action Buttons (Filter & Reset) in One Line */
    .leave-app-filter-form #applyFilterBtn,
    .leave-app-filter-form #resetFilterBtn {
        flex: 1 1 calc(50% - 3px) !important;
        width: calc(50% - 3px) !important;
        height: 32px !important;
        font-size: 12px !important;
        justify-content: center !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Table Responsive Compact Styles */
    .leave-app-table th {
        font-size: 11px !important;
        padding: 8px 6px !important;
        letter-spacing: 0.02em !important;
        white-space: nowrap !important;
    }

    .leave-app-table td {
        font-size: 12px !important;
        padding: 6px 6px !important;
        white-space: nowrap !important;
    }

    .leave-app-table .avatar {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ============================================================
   Leave Applications Modal — Footer Buttons Responsive Fix
   ============================================================ */
@media (max-width: 575.98px) {
    /* Modal footer: stack buttons in a 2-col grid */
    .modal-footer[style*="justify-content:flex-end"] {
        flex-wrap: wrap !important;
        justify-content: stretch !important;
        gap: 6px !important;
    }

    /* Close button: full width on first row */
    .modal-footer .btn-slate-pill-gradient {
        width: 100% !important;
        font-size: 12px !important;
        padding: 7px 10px !important;
        height: auto !important;
    }

    /* Disapprove & Approve: side by side, equal width */
    .modal-footer .btn-red-gradient,
    .modal-footer .btn-dark-green-gradient {
        flex: 1 1 calc(50% - 3px) !important;
        min-width: 0 !important;
        font-size: 12px !important;
        padding: 7px 6px !important;
        height: auto !important;
        margin-left: 0 !important;
        text-align: center !important;
    }
}

/* ============================================================
   Leave Applications — Tablet Responsive Fix (576px–991px)
   ============================================================ */
@media (min-width: 576px) and (max-width: 991.98px) {

    /* Header: stack title on first row, filters wrap below */
    .leave-app-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 8px 14px !important;
        gap: 8px !important;
    }

    .leave-app-title {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }

    /* Filter form: wrap into 2 per row */
    .leave-app-filter-form {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        align-items: center !important;
    }

    /* Date input + Leave Type + Status — each take ~calc space */
    .leave-app-filter-form .header-filter-input,
    .leave-app-filter-form input[type="text"] {
        flex: 1 1 140px !important;
        width: auto !important;
        min-width: 100px !important;
    }

    /* Searchable dropdowns */
    .leave-app-filter-form .search-select-component {
        flex: 1 1 140px !important;
        width: auto !important;
        min-width: 100px !important;
    }

    /* Filter + Reset buttons side by side */
    .leave-app-filter-form #applyFilterBtn,
    .leave-app-filter-form #resetFilterBtn {
        flex: 1 1 calc(50% - 3px) !important;
        justify-content: center !important;
        font-size: 12px !important;
        height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Table: compact on tablet */
    .leave-app-table th {
        font-size: 12px !important;
        padding: 8px 8px !important;
        white-space: nowrap !important;
    }

    .leave-app-table td {
        font-size: 12px !important;
        padding: 7px 8px !important;
        white-space: nowrap !important;
    }

    .leave-app-table .avatar {
        width: 32px !important;
        height: 32px !important;
    }

    /* Modal footer buttons on tablet */
    .modal-footer[style*="justify-content:flex-end"] {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .modal-footer .btn-slate-pill-gradient,
    .modal-footer .btn-red-gradient,
    .modal-footer .btn-dark-green-gradient {
        font-size: 12px !important;
        padding: 6px 14px !important;
        height: auto !important;
    }
}

/* ============================================================
   Pay Slips Section — Responsive Styles
   ============================================================ */

/* ── Mobile Devices (< 576px) ── */
@media (max-width: 575.98px) {
    .slip-header {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    .slip-title {
        font-size: 14px !important;
        width: 100% !important;
        margin-bottom: 2px !important;
    }

    .slip-filter-form {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin: 0 !important;
    }

    /* Year & Month: 2 per row */
    .slip-filter-year,
    .slip-filter-month {
        flex: 1 1 calc(50% - 3px) !important;
        width: calc(50% - 3px) !important;
        min-width: 0 !important;
    }

    /* Employee dropdown & Search: full width */
    .slip-filter-employee,
    .slip-filter-search {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Filter & Reset: 2 per row */
    #applySlipFilterBtn,
    #resetSlipFilterBtn {
        flex: 1 1 calc(50% - 3px) !important;
        width: calc(50% - 3px) !important;
        height: 32px !important;
        font-size: 12px !important;
        justify-content: center !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    /* Add Slip button: full width */
    .btn-slip-add {
        flex: 1 1 100% !important;
        width: 100% !important;
        height: 34px !important;
        font-size: 13px !important;
        justify-content: center !important;
        margin-top: 2px !important;
    }

    /* Card body & Table */
    .slip-card-body {
        padding: 8px !important;
    }

    .slip-table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 8px !important;
    }

    .slip-table th {
        font-size: 11px !important;
        padding: 8px 6px !important;
        white-space: nowrap !important;
    }

    .slip-table td {
        font-size: 12px !important;
        padding: 6px 6px !important;
        white-space: nowrap !important;
    }

    .slip-table .user-avatar {
        width: 30px !important;
        height: 30px !important;
    }

    .slip-table .emp-name {
        font-size: 12.5px !important;
    }

    .slip-pagination {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
        align-items: center !important;
    }
}

/* ── Tablet Devices (576px – 991px) ── */
@media (min-width: 576px) and (max-width: 991.98px) {
    .slip-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 8px 14px !important;
        gap: 8px !important;
    }

    .slip-title {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }

    .slip-filter-form {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        align-items: center !important;
    }

    .slip-filter-year {
        flex: 1 1 85px !important;
        width: auto !important;
    }

    .slip-filter-month {
        flex: 1 1 115px !important;
        width: auto !important;
    }

    .slip-filter-employee {
        flex: 1 1 150px !important;
        width: auto !important;
    }

    .slip-filter-search {
        flex: 1 1 140px !important;
        width: auto !important;
    }

    #applySlipFilterBtn,
    #resetSlipFilterBtn {
        flex: 0 0 auto !important;
        height: 28px !important;
    }

    .btn-slip-add {
        flex: 0 0 auto !important;
        height: 28px !important;
        margin-left: auto !important;
    }

    .slip-table th {
        font-size: 12px !important;
        padding: 8px 8px !important;
        white-space: nowrap !important;
    }

    .slip-table td {
        font-size: 12px !important;
        padding: 7px 8px !important;
        white-space: nowrap !important;
    }

    .slip-table .user-avatar {
        width: 32px !important;
        height: 32px !important;
    }
}
