/**
 * Volgh Custom Overrides & Compatibility Layer for PVH-EBT Portal
 */

/* ========================================================
   FONT SIZES HELPER
   ======================================================== */
.font-size-10 { font-size: 10px !important; }
.font-size-11 { font-size: 11px !important; }
.font-size-12 { font-size: 12px !important; }
.font-size-13 { font-size: 13px !important; }
.font-size-14 { font-size: 14px !important; }
.font-size-15 { font-size: 15px !important; }
.font-size-16 { font-size: 16px !important; }
.font-size-17 { font-size: 17px !important; }
.font-size-18 { font-size: 18px !important; }
.font-size-20 { font-size: 20px !important; }
.font-size-22 { font-size: 22px !important; }
.font-size-24 { font-size: 24px !important; }
.font-size-28 { font-size: 28px !important; }
.font-size-32 { font-size: 32px !important; }
.font-size-48 { font-size: 48px !important; }

/* ========================================================
   LABEL / SOFT BADGES COMPATIBILITY
   ======================================================== */
.bg-label-primary, .bg-soft-primary {
    background-color: rgba(94, 45, 216, 0.12) !important;
    color: #5e2dd8 !important;
}

.bg-label-success, .bg-soft-success {
    background-color: rgba(45, 206, 137, 0.14) !important;
    color: #0f864c !important;
}

.bg-label-warning, .bg-soft-warning {
    background-color: rgba(255, 171, 0, 0.14) !important;
    color: #c77700 !important;
}

.bg-label-danger, .bg-soft-danger {
    background-color: rgba(245, 54, 92, 0.14) !important;
    color: #d61845 !important;
}

.bg-label-info, .bg-soft-info {
    background-color: rgba(17, 205, 239, 0.14) !important;
    color: #0c8da6 !important;
}

.bg-label-secondary, .bg-soft-secondary {
    background-color: rgba(134, 142, 150, 0.14) !important;
    color: #495057 !important;
}

.bg-label-dark, .bg-soft-dark {
    background-color: rgba(52, 58, 64, 0.14) !important;
    color: #212529 !important;
}

/* ========================================================
   TABS & TAB PANES VISIBILITY
   ======================================================== */
.tab-content > .tab-pane.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.nav-tabs-custom {
    border-bottom: 2px solid #e9edf4 !important;
    gap: 0.5rem;
}

.nav-tabs-custom .nav-link {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: #687483 !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.25rem !important;
    background: transparent !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tabs-custom .nav-link.active {
    color: #5e2dd8 !important;
    border-bottom: 2.5px solid #5e2dd8 !important;
    background: rgba(94, 45, 216, 0.05) !important;
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

/* ========================================================
   CARDS & ELEVATION
   ======================================================== */
.card {
    border: 1px solid #ebecf1 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(18, 38, 63, 0.05) !important;
}

.card-header {
    border-bottom: 1px solid #ebecf1 !important;
    background-color: #ffffff !important;
}

/* ========================================================
   VOLGH SIDEBAR & HEADER POSITIONING
   ======================================================== */
.app-sidebar .side-header {
    height: 70px !important;
    padding: 0 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border-bottom: 1px solid #ebecf1 !important;
}

.app-sidebar .side-menu {
    padding-bottom: 3rem !important;
}

.app-sidebar .side-menu__item.active {
    background: linear-gradient(to right, #5e2dd8 0%, #7644eb 100%) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

.app-sidebar .side-menu__item.active .side-menu__icon {
    color: #ffffff !important;
}

.app-sidebar .side-menu__item.active .side-menu__label {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.app-sidebar .side-menu__icon {
    font-size: 1.25rem !important;
    margin-right: 0.75rem !important;
}

/* Header Navbar */
.app-header.header {
    height: 70px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #ebecf1 !important;
    box-shadow: 0 2px 8px rgba(18, 38, 63, 0.04) !important;
}

/* Desktop layout positioning */
@media (min-width: 768px) {
    body:not(.no-sidebar-page).sidebar-mini:not(.sidenav-toggled) .app-header {
        left: 250px !important;
        width: calc(100% - 250px) !important;
        transition: left 0.2s ease, width 0.2s ease;
    }
    body:not(.no-sidebar-page).sidebar-mini:not(.sidenav-toggled) .app-content {
        margin-left: 250px !important;
        transition: margin-left 0.2s ease;
    }
    body:not(.no-sidebar-page).sidebar-mini.sidenav-toggled .app-header {
        left: 100px !important;
        width: calc(100% - 100px) !important;
        transition: left 0.2s ease, width 0.2s ease;
    }
    body:not(.no-sidebar-page).sidebar-mini.sidenav-toggled .app-content {
        margin-left: 100px !important;
        transition: margin-left 0.2s ease;
    }
    body:not(.no-sidebar-page).sidebar-mini.sidenav-toggled .side-header-brand-text {
        display: none !important;
    }
}

/* Content spacing under fixed header */
.app-content.main-content {
    padding-top: 85px !important;
}

body.no-sidebar-page .app-content.main-content {
    padding-top: 92px !important;
    margin-left: 0 !important;
    width: 100% !important;
}

/* Sidebar Toggle Button styling */
.app-sidebar__toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    color: #334155 !important;
    background: #f1f5f9 !important;
    cursor: pointer !important;
    margin-right: 0.75rem !important;
    text-decoration: none !important;
    border: none !important;
}
.app-sidebar__toggle:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}
.app-sidebar__toggle:before {
    display: none !important;
}

/* Full Width Public Layout (when sidebar is hidden) */
body.no-sidebar-page .app-header {
    left: 0 !important;
    width: 100% !important;
    right: 0 !important;
    padding-left: 0 !important;
}

/* ========================================================
   PUBLIC BRAND & HEADER NAVIGATION BAR
   ======================================================== */
.app-header .header-brand {
    min-width: auto !important;
    text-align: left !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
}

body.no-sidebar-page .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.no-sidebar-page .navbar-nav .nav-item {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
}

body.no-sidebar-page .navbar-nav .nav-link {
    color: #475569 !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    padding: 7px 13px !important;
    background: transparent !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    line-height: 1.2 !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

body.no-sidebar-page .navbar-nav .nav-link:hover {
    color: #1e293b !important;
    background-color: #f1f5f9 !important;
}

body.no-sidebar-page .navbar-nav .nav-link.active {
    color: #5e2dd8 !important;
    background-color: rgba(94, 45, 216, 0.08) !important;
    font-weight: 600 !important;
}

body.no-sidebar-page .navbar-nav .nav-link i {
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
}

body.no-sidebar-page .navbar-nav .nav-link .ri-arrow-down-s-line {
    font-size: 14px !important;
    opacity: 0.6 !important;
    margin-left: 2px !important;
    transition: transform 0.2s ease !important;
}

body.no-sidebar-page .navbar-nav .nav-link.active .ri-arrow-down-s-line {
    opacity: 0.85 !important;
}

/* ========================================================
   HEADER DROPDOWN MENUS (PUBLIC & DASHBOARD)
   ======================================================== */
.app-header.header {
    height: 70px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #ebecf1 !important;
    box-shadow: 0 2px 8px rgba(18, 38, 63, 0.04) !important;
    z-index: 1040 !important;
}

.app-header .nav-item.dropdown,
.app-header .dropdown {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

.app-header .dropdown-toggle::after {
    display: none !important;
}

.app-header .dropdown-toggle[aria-expanded="true"] .ri-arrow-down-s-line {
    transform: rotate(180deg);
}

.app-header .dropdown-toggle .ri-arrow-down-s-line {
    transition: transform 0.2s ease;
}

.app-header .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 8px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12) !important;
    background: #ffffff !important;
    z-index: 1060 !important;
    padding: 0.5rem !important;
    transform: none !important;
    animation: fadeInDown 0.18s ease forwards;
}

.app-header .dropdown-menu.dropdown-menu-end {
    left: auto !important;
    right: 0 !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-header .dropdown-menu .dropdown-item {
    border-radius: 8px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 13.5px !important;
    color: #334155 !important;
    transition: all 0.15s ease !important;
}
.app-header .dropdown-menu .dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #5e2dd8 !important;
}
.app-header .dropdown-menu .dropdown-item.active {
    background-color: rgba(94, 45, 216, 0.08) !important;
    color: #5e2dd8 !important;
    font-weight: 600 !important;
}

/* Tables */
.table th {
    font-size: 12.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #687483 !important;
    font-weight: 700 !important;
    background-color: #f7f8fb !important;
    border-bottom: 1px solid #ebecf1 !important;
}

.table td {
    vertical-align: middle !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f2f3f7 !important;
}

/* ========================================================
   TABLER ICONS FONT OVERRIDE & COMPATIBILITY
   ======================================================== */
.ti, [class^="ti-"], [class*=" ti-"] {
    font-family: 'tabler-icons' !important;
}

/* ========================================================
   STAT METRIC CARDS & WATERMARK ICONS
   ======================================================== */
.stat-metric-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px !important;
    overflow: hidden;
    position: relative;
}
.stat-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(18, 38, 63, 0.08) !important;
}
.stat-metric-card .card-top-stripe {
    height: 4px;
    width: 100%;
}
.stat-metric-card .watermark-icon {
    position: absolute;
    right: -8px;
    bottom: -10px;
    font-size: 76px;
    opacity: 0.07;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}
.stat-metric-card .stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.stat-metric-card:hover .stat-icon-wrapper {
    transform: scale(1.06);
}
.stat-metric-card p,
.stat-metric-label {
    color: #64748b !important;
}

/* Fix Volgh avatar square background leak */
.avatar {
    background: transparent !important;
    border-radius: 50% !important;
    box-shadow: none !important;
}

/* ========================================================
   STANDARDIZED PAGE HEADER BANNER STYLE
   ======================================================== */
.page-header {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 8px !important;
    padding: 1.15rem 1.4rem !important;
    margin: 1.25rem 0 !important;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04) !important;
}

.px-3-5 { padding-left: 0.9rem !important; padding-right: 0.9rem !important; }
.py-1-5 { padding-top: 0.38rem !important; padding-bottom: 0.38rem !important; }

/* Fix status indicator dot on avatars from being blown up by Volgh .border padding rule */
.status-indicator-dot {
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    min-height: 9px !important;
    max-width: 9px !important;
    max-height: 9px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    background-color: #10b981 !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    display: block !important;
    box-sizing: content-box !important;
    z-index: 2 !important;
}
