﻿/* --- CCS PROFESSIONAL BRAND SYNC --- */

/* ============================================================
   1. ANIMATIONS (consolidated — no duplicates)
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single pulse used by both .badge-pulse and .live-placeholder */
@keyframes pulse {
    0% {
        opacity: .5;
        box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.7);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(240, 173, 78, 0);
    }

    100% {
        opacity: .5;
        box-shadow: 0 0 0 0 rgba(240, 173, 78, 0.7);
    }
}

/* Single spin used by both .live-spinner and Font Awesome .fa-spin */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* ============================================================
   2. LAYOUT & WORKSPACE
   ============================================================ */
body, .k-page, .k-grid, .k-wrapper, #k_content_wrapper, #k_content {
    background-color: #f3f3f9 !important;
}


/* ============================================================
   3. HEADER & MENU BAR
   ============================================================ */
#k_header, .k-header__top, .k-header__bottom,
.k-header-menu-wrapper, #k_header_menu {
    background-color: #ffffff !important;
    border-bottom: 1px solid #ebedf2 !important;
}

.k-header__bottom {
    height: 55px !important;
    border-bottom: 2px solid #fd1a1a !important;
    display: flex;
    align-items: center;
}

.k-menu__nav .k-menu__item > .k-menu__link .k-menu__link-text {
    color: #4a5568 !important;
    font-weight: 600 !important;
}

.k-menu__nav .k-menu__item:hover > .k-menu__link,
.k-menu__nav .k-menu__item.k-menu__item--active > .k-menu__link {
    background-color: #fff5f5 !important;
}


/* ============================================================
   4. BRAND COLORS & TYPOGRAPHY
   ============================================================ */
h2, .k-header__brand-title {
    color: #fd1a1a !important;
    font-weight: 700 !important;
}

.btn-primary, .btn-brand, #PayInvoiceButton, #SearchButton {
    background-color: #fd1a1a !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    padding: 8px 32px !important;
}

    .btn-primary:hover {
        background-color: #000000 !important;
    }

.btn-outline-secondary.active {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.font-weight-600 {
    font-weight: 600;
}


/* ============================================================
   5. CARDS & LAYOUT COMPONENTS
   ============================================================ */
.card, .k-portlet {
    background-color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 0 20px 3px rgba(0,0,0,0.08) !important;
}

#k_footer {
    background-color: #1a202c !important;
    color: #ffffff !important;
}

.border-top-salmon {
    border-top: 4px solid #ff6b6b !important;
}


/* ============================================================
   6. ACTION BUTTONS (Square Style)
   ============================================================ */
.flex-icon {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.btn-action-square {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 4px !important;
    transition: all 0.2s ease-in-out !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
}

    .btn-action-square.mini {
        width: 22px !important;
        height: 22px !important;
        border-radius: 3px !important;
    }

    .btn-action-square i {
        font-size: 11px !important;
        line-height: 1 !important;
    }

    .btn-action-square.mini i {
        font-size: 9px !important;
    }

    .btn-action-square.bg-success:hover {
        background-color: #218838 !important;
    }

    .btn-action-square.bg-danger:hover {
        background-color: #bd2130 !important;
    }


/* ============================================================
   7. COLOR UTILITY CLASSES
   ============================================================ */
/* Primary — used in two places with same intent; kept blue */
.bg-primary-light {
    background-color: rgba(0, 123, 255, 0.15) !important;
    color: #007bff !important;
}

    .bg-primary-light:hover {
        background-color: #007bff !important;
        color: #ffffff !important;
        transform: translateY(-2px);
    }

.bg-warning-light {
    background-color: rgba(255, 159, 67, 0.15) !important;
    color: #ff9f43 !important;
}

    .bg-warning-light:hover {
        background-color: #ff9f43 !important;
        color: #ffffff !important;
        transform: translateY(-2px);
    }

.bg-secondary-light {
    background-color: rgba(108, 117, 125, 0.15) !important;
    color: #6c757d !important;
}

    .bg-secondary-light:hover {
        background-color: #6c757d !important;
        color: #ffffff !important;
    }

.bg-danger-light {
    background-color: rgba(253, 26, 26, 0.15) !important;
    color: #fd1a1a !important;
}

    .bg-danger-light:hover {
        background-color: #fd1a1a !important;
        color: #ffffff !important;
    }

.bg-danger {
    background-color: #fd1a1a !important;
    color: white !important;
}

.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

/* Dashboard soft-color groupings */
.bg-soft-primary {
    background-color: rgba(59, 125, 221, 0.08) !important;
    color: #3b7ddd;
    border-left: 2px solid #3b7ddd;
}

.bg-soft-success {
    background-color: rgba(40, 167, 69, 0.08) !important;
    color: #28a745;
    border-left: 2px solid #28a745;
}

.bg-soft-info {
    background-color: rgba(0, 184, 212, 0.08) !important;
    color: #00b8d4;
    border-left: 2px solid #00b8d4;
}

.bg-soft-warning {
    background-color: rgba(240, 173, 78, 0.08) !important;
    color: #f0ad4e;
    border-left: 2px solid #f0ad4e;
}


/* ============================================================
   8. KPI TILES & DASHBOARD ELEMENTS
   ============================================================ */
/* Single consolidated .kpi-value — high-contrast black */
.kpi-value {
    font-size: 2rem;
    font-weight: 800 !important;
    color: #000000 !important;
}

/* Single consolidated .kpi-title */
.kpi-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Aliases kept for backward compat */
.kpi-title-custom {
    color: #000000 !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.kpi-value-custom {
    color: #000000 !important;
    font-weight: 700;
}

.kpi-label {
    color: #000000 !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
}

.row-has-rc {
    background-color: rgba(253, 26, 26, 0.03) !important;
}

.text-rc-alert {
    color: #fd1a1a;
    font-weight: 700;
}

.table-sm-custom td, .table-sm-custom th {
    padding: 0.4rem;
    vertical-align: middle;
}

.audit-col.d-none {
    display: none !important;
}

#do_legend ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#do_legend li span {
    white-space: nowrap;
}


/* ============================================================
   9. SPINNERS & LIVE PLACEHOLDERS
   ============================================================ */
.live-placeholder {
    display: inline-block;
    min-width: 40px;
    animation: pulse 1.5s infinite ease-in-out;
    color: #adb5bd !important;
}

.live-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Dashboard KPI spinners — brand red so visible on white background */
.live-placeholder .fa-spinner,
#arTableBody .fa-spinner,
#drawerLoader .fa-spinner {
    color: #fd1a1a !important;
}

/* Button spinners stay white */
.btn .fa-spinner,
.btn-action-square .fa-spinner {
    color: #ffffff !important;
}

/* Ensure FA spin animation runs */
.fa-spin {
    -webkit-animation: fa-spin 2s infinite linear;
    animation: fa-spin 2s infinite linear;
    display: inline-block !important;
}


/* ============================================================
   10. DASHBOARD CHART WIDGETS
   ============================================================ */
.progress-bar, .k-widget.k-chart {
    background-color: #fd1a1a !important;
}

.k-chart-donut-center, .k-gauge {
    color: #2c3e50 !important;
    font-family: 'Poppins', sans-serif !important;
}

.k-chart-tooltip {
    background-color: #1a202c !important;
    border-color: #fd1a1a !important;
    color: #ffffff !important;
}


/* ============================================================
   11. TAB NAVIGATION
   ============================================================ */
/* Bootstrap tab overrides */
.tab-pane {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

    .tab-pane:not(.active) {
        display: none !important;
    }

/* Custom tab button style */
.nav-tabs-custom {
    display: flex;
    gap: 8px;
}

.btn-tab {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 13px;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    top: 2px;
    outline: none !important;
}

    .btn-tab.active {
        background-color: #ffffff !important;
        color: #ff6b6b !important;
        border-top: 4px solid #ff6b6b;
        border-left: 1px solid #dee2e6;
        border-right: 1px solid #dee2e6;
        box-shadow: 0 -3px 6px rgba(0,0,0,0.05);
    }

    .btn-tab:hover:not(.active) {
        background-color: #e9ecef;
        color: #ff6b6b;
    }

    .btn-tab i {
        font-size: 15px;
    }

.nav-tabs .nav-link {
    white-space: nowrap;
}

/* Tab badges */
.nav-tabs .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    font-weight: 600;
    border-radius: 10px;
    vertical-align: middle;
}

.nav-tabs .badge-primary {
    background-color: #3b7ddd !important;
    color: #ffffff !important;
}

.nav-tabs .badge-warning {
    background-color: #f0ad4e !important;
    color: #ffffff !important;
}

.nav-tabs .nav-link:hover .badge-primary {
    background-color: #fd1a1a !important;
    transition: background-color 0.3s ease;
}

.nav-tabs .nav-link:hover .badge-warning {
    background-color: #ff9f43 !important;
    transition: background-color 0.3s ease;
}

.nav-tabs .nav-link.active .badge {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.badge-pulse {
    animation: pulse 2s infinite;
}


/* ============================================================
   12. BADGES (global)
   ============================================================ */
.badge {
    font-weight: 600;
    text-transform: uppercase;
    padding: 5px 10px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.badge-danger {
    background-color: #fd1a1a;
}

.badge-success {
    background-color: #28a745;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

.badge-info {
    background-color: #00b8d4 !important;
    color: #ffffff !important;
}


/* ============================================================
   13. DISPUTE ROWS & EXPANDED STATES
   ============================================================ */
.expanded-row {
    background-color: #f8f9fa !important;
    border-left: 3px solid #ff9f43 !important;
}

    .expanded-row td {
        font-size: 0.85rem !important;
        color: #4a5568 !important;
        padding: 10px !important;
    }


/* ============================================================
   14. REPORTS TAB
   ============================================================ */
.hover-shadow {
    transition: all 0.3s ease;
}

    .hover-shadow:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        transform: translateY(-2px);
    }


/* ============================================================
   15. LOGIN PAGE
   ============================================================ */
.login-area-section {
    padding: 0;
    background-color: #f3f3f9;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 5vh;
    font-family: 'Poppins', sans-serif;
}

    .login-area-section .row.g-0 {
        margin: 0 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        width: 100%;
    }

    .login-area-section .col-lg-6,
    .login-area-section .col-md-6 {
        padding: 0 !important;
        margin: 0 !important;
    }

.login_img_caption {
    background: linear-gradient(to bottom, rgba(44,62,80,0.4) 0%, rgba(44,62,80,0.7) 50%, rgba(253,26,26,0.85) 100%), url('/images/login-bg2.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    padding: 80px 60px;
    height: 100% !important;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: #ffffff;
}

    .login_img_caption,
    .login_img_caption h2,
    .login_img_caption h3,
    .login_img_caption p,
    .content_slider h2,
    .content_slider p {
        color: #ffffff !important;
    }

.content_slider h2 {
    font-size: 40px !important;
    font-weight: 700;
    margin-bottom: 20px;
}

.content_slider p {
    font-size: 20px !important;
    line-height: 1.6;
    text-shadow: 0px 2px 10px rgba(0,0,0,0.5) !important;
}

.content_slider .slide {
    display: none;
    animation: fadeIn 1s ease-in-out;
}

    .content_slider .slide:first-child {
        display: block;
    }

.login_content_inner {
    background: #ffffff;
    padding: 60px;
    height: 100% !important;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none !important;
}

    .login_content_inner .form-check-input {
        margin-right: 12px !important;
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .login_content_inner .form-control {
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        height: 50px !important;
        color: #2c3e50 !important;
        background-color: #ffffff !important;
        padding: 10px 15px !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        transition: all 0.3s ease-in-out;
    }

        .login_content_inner .form-control:focus {
            border-color: #fd1a1a !important;
            box-shadow: 0 0 0 3px rgba(253,26,26,0.1) !important;
            outline: none !important;
        }

        .login_content_inner .form-control::placeholder {
            color: #a0aec0 !important;
            opacity: 1;
        }

        .login_content_inner .form-control:-webkit-autofill,
        .login_content_inner .form-control:-webkit-autofill:hover,
        .login_content_inner .form-control:-webkit-autofill:focus {
            -webkit-text-fill-color: #2c3e50 !important;
            transition: background-color 5000s ease-in-out 0s;
        }

.witr_btn {
    background: #fd1a1a !important;
    color: #ffffff !important;
    padding: 12px 40px !important;
    border-radius: 50px 0px 50px 0px !important;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    transition: all 0.4s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(253,26,26,0.2);
}

    .witr_btn:hover {
        background: #2c3e50 !important;
        border-radius: 0px 50px 0px 50px !important;
        transform: translateY(-2px);
    }

.arrow-right {
    width: 20px !important;
    margin-left: 10px;
    filter: brightness(0) invert(1);
}

.devider-center {
    display: block;
    width: 45px;
    height: 4px;
    background: #fd1a1a;
    margin: 15px 0 25px 0;
}

.forgot-sec .form-check-input {
    margin-right: 12px !important;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.forgot-sec .form-check-label {
    padding-left: 5px;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.9rem;
}

.forgot-sec a {
    margin-left: auto;
    color: #2c3e50;
    font-weight: 500;
}


/* ============================================================
   16. RESPONSIVE (Mobile)
   ============================================================ */
@media (max-width: 768px) {
    .d-flex.align-items-end {
        flex-direction: column;
        align-items: flex-start !important;
    }

    #dashboardTabs {
        margin-left: 0 !important;
        width: 100%;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

        #dashboardTabs::-webkit-scrollbar {
            display: none;
        }

        #dashboardTabs .nav-item {
            flex-shrink: 0;
        }

        #dashboardTabs .nav-link {
            padding: 6px 10px;
            font-size: 0.78rem;
            white-space: nowrap;
        }
}
