/* Font weight and root variables */
@property --app-font-weight {
    syntax: "<number>";
    inherits: false;
    initial-value: 400;
}

:root {
    --app-font-weight: 400;
    --app-font-weight-title: calc(2.25 * var(--app-font-weight));
    --app-font-family: "Poppins", sans-serif, system-ui;
}

/* Base styling */
html, body {
    height: 100% !important;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--app-font-family);
    font-weight: var(--app-font-weight);
    background-color: #1a1a1a !important;
    color: white;
    overflow-x: hidden;
}

/* Full-width main wrapper */
.full-width-wrapper {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Scrollable Kanban wrapper */
.task-board-wrapper {
    padding: 30px;
    overflow-x: auto;
    position: relative;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

    .task-board-wrapper:hover {
        scrollbar-width: thin;
        scrollbar-color: #888 transparent;
    }

    .task-board-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .task-board-wrapper::-webkit-scrollbar-track {
        background: transparent;
    }

    .task-board-wrapper::-webkit-scrollbar-thumb {
        background-color: #555;
        border-radius: 10px;
    }

        .task-board-wrapper::-webkit-scrollbar-thumb:hover {
            background-color: #888;
        }

/* Kanban section layout */
.task-list-section {
    display: flex;
    gap: 24px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: max-content;
}

/* Column */
.kanban-column {
    width: 300px;
    min-width: 300px;
}

/* Section title */
.section-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: white;
}

    /* Optional for styling white title text differently */
    .section-header.white-heading {
        color: black;
        font-weight: 400;
    }

/* Column container */
.connect-sorting-content {
    background: transparent !important;
    padding: 8px;
}

/* Card layout */
.card {
    border-radius: 10px;
    border: 1px solid #444;
    margin-bottom: 16px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.05);
    transition: 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

/* Flexed top-left aligned card content */
.card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

/* Hover effect */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Tile color themes */
.card.bg-white {
    background-color: #f2f2f2;
    color: black;
}

    .card.bg-white .task-bottom span {
        color: #3cb1b7;
        font-weight: 900;
    }

/* Colored tile base text color enforcement */
.card.bg-blue {
    background-color: #3cb1b7;
    color: white;
}

.card.bg-green {
    background-color: #4faf5f;
    color: white;
}

.card.bg-red {
    background-color: #d61e4f;
    color: white;
}

.card.bg-purple {
    background-color: #9d48ef;
    color: white;
}

.card.bg-yellow {
    background-color: #e2c705;
    color: black;
}

/* Ensure ALL text inside colored tiles is white except yellow */
.card.bg-blue *,
.card.bg-green *,
.card.bg-red *,
.card.bg-purple * {
    color: white !important;
}

/* Badge styling */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Price / metadata area */
.task-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-top: 10px;
    width: 100%;
}

/* News "column" inside Kanban */
.kanban-news-strip {
    width: 100%;
    min-width: 100%;
}

/* Dashed alert box */
.alert-strip-wrapper {
    margin-top: 1.5em;
    border: 2px dashed white;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
}

/* Inner scrolling box */
.alert-strip-inner {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Scrolling text */
.alert-strip-text {
    white-space: nowrap;
    display: inline-block;
    animation: scrollAlert 35s linear infinite;
    font-size: 2.35rem;
    font-weight: 600;
    color: white;
    padding-left: 100%;
    box-sizing: border-box;
}

@keyframes scrollAlert {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.recent-requests-timeline {
    background-color: #3cb1b7;
    color: white;
}

.timeline-widget .timeline-item .timeline-badge-wrap .timeline-badge {
    background-color: transparent !important;
    border: 2px solid white !important;
}

.recent-requests-timeline {
    color: white !important; /* Set text color to white */
}

    .recent-requests-timeline .timeline-desc {
        color: white !important; /* Ensure timeline descriptions are white */
    }

    .recent-requests-timeline a {
        color: #ffffff !important; /* Ensure links are also white */
    }

.recent-requests-timeline {
    background-color: #3cb1b7; /* Background color for the widget */
    color: white; /* Default text color */
    padding: 20px; /* Add padding for better spacing */
    border-radius: 8px; /* Rounded corners */
}

.timeline-widget {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-item {
    margin-bottom: 20px; /* Add spacing between timeline events */
}

.timeline-badge {
    background-color: transparent; /* Remove fill color */
    border: 2px solid white; /* Add white outline */
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.timeline-badge-border {
    height: 100%;
    width: 2px;
    background-color: white; /* Vertical line color */
}

.timeline-desc {
    margin-left: 20px; /* Space between badge and text */
    line-height: 1.5; /* Line height for better readability */
}

    .timeline-desc .fw-bold {
        font-size: 14px;
        font-weight: bold;
    }

.double-stat-card-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 320px;
}

.stat-card {
    border-radius: 10px;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

    .stat-card.bg-blue {
        background-color: #3cb1b7;
    }

    .stat-card.bg-orange {
        background-color: #e55b2c;
    }

.stat-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 20px;
}

.stat-block h6 {
    font-size: 0.8rem;
    margin-bottom: 4px;
    opacity: 0.85;
    font-weight: 500;
}

.stat-block h3 {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
}

.stat-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.radial-chart {
    width: 80px;
    height: 60px;
}

.card-footer {
    margin-top: 20px;
    text-align: center;
}

    .card-footer h4 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
    }

.org-stat-container{
    margin-inline-end: 0.7em !important;
}

.blue-stat-container {
    margin-inline-end: 0.7em !important;
}

/* Custom CSS to stroke the radial track with white and remove its fill */
.apexcharts-radialbar .apexcharts-radialbar-track {
    stroke: #ffffff !important; /* White border for the empty arc */
    fill: transparent !important; /* No fill on the empty portion */
}

/* Custom chart labels styling */
.radial-chart-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-chart-labels {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.chart-title-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
}

.chart-value-text {
    font-size: 20px;
    font-weight: bold;
    display: block;
}

/* Hide ApexCharts built-in labels */
.apexcharts-datalabel-label, 
.apexcharts-datalabel-value {
    display: none !important;
}

/* Card container styles */
.stats-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 350px;
    margin-left: 30px;
    margin-right: auto;
}

/* Card styles */
.card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    width: 100%;
}

/* Stats card specific styles */
.stats-card-content {
    padding: 15px;
    color: white;
    border-radius: 0;
}

.stat-card-teal {
    background-color: #3cb1b7;
}

.stat-card-orange {
    background-color: #ff6633;
}

/* Stat row layout (for top rows) */
.stat-row {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 10px;
    margin-bottom: 10px;
}

/* Individual stat and chart containers with opacity */
.stat-container,
.chart-container {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    height: 120px; /* Fixed height for consistency */
}

.stat-container {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text */
    padding: 10px;
}

.chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Full-width chart container for the bottom chart of the orange card */
.full-width-chart-container {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    height: 120px; /* Same height as stat-row containers */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Stat text styles */
.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 5px 0 0 0;
    line-height: 1;
}

/* Footer styles */
.stats-footer {
    text-align: left;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
}

    .stats-footer h2 {
        font-size: 2rem;
        font-weight: bold;
        margin: 0;
        line-height: 1;
    }

    .stats-footer h5 {
        font-size: 0.9rem;
        font-weight: 600;
        text-transform: uppercase;
        margin: 0;
        line-height: 1.2;
        WHITE-SPACE: nowrap;
    }

/* Ensure all text is white in stat cards */
.stats-card-content * {
    color: white !important;
}

/* Center charts properly and ensure no overflow */
.apexcharts-canvas {
    margin: 0 auto !important;
    display: block !important;
    width: 100% !important;
}

/* Customize chart label positioning */
.apexcharts-radialbar-hollow {
    margin-bottom: 0 !important;
}

/* Dashboard container layout */
.full-width-wrapper {
    width: 100%;
}

.task-board-wrapper {
    width: 100%;
}

/* Fixed main layout structure */
.dashboard-container {
    display: flex;
    width: 100%;
    gap: 30px;
    position: relative;
}

.dashboard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Row layout */
.dashboard-row {
    display: flex;
    width: 100%;
    gap: 30px;
    margin-bottom: 20px;
    align-items: stretch;
    min-height: 310px; /* Set a minimum height for rows */
}

    .dashboard-row:last-child {
        margin-bottom: 0;
    }

/* Tile wrappers */
.blue-tile-wrapper, .orange-tile-wrapper {
    width: 350px;
    flex-shrink: 0;
}

/* Bar chart wrapper */
.bar-chart-wrapper {
    flex-grow: 1;
    min-height: 300px;
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    padding: 15px;
    border: 2px dashed #ffffff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Chart header for bar chart */
.chart-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.custom-legend {
    display: flex;
    gap: 15px;
}

.legend-pill {
    border-radius: 20px;
    padding: 4px 15px 4px 35px;
    position: relative;
    color: white;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    height: 26px;
}

.legend-circle {
    width: 14px;
    height: 14px;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.chart-title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Hide ApexCharts tooltip */
.apexcharts-tooltip {
    display: none !important;
}

/* Chart container */
#chart-container, #chart, #salesChart {
    width: 100%;
    height: calc(100% - 50px);
}

/* Timeline styles - Clean implementation */
.timeline-wrapper {
    width: 350px;
    background-color: #3cb1b7;
    border-radius: 12px;
    color: white;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header icon circle */
.timeline-header {
    position: relative;
    padding: 20px 40px 15px 80px; /* Increased left padding to accommodate the icon */
}

.timeline-header-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

    .timeline-header-icon i {
        font-size: 20px;
        color: #3cb1b7; /* Same blue as your theme */
    }

.timeline-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    color: white;
    letter-spacing: 0.5px;
}

.timeline-body {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0 40px 20px 40px;
    position: relative;
}

/* Timeline container */
.timeline-widget {
    list-style: none;
    position: relative;
    padding: 0;
    margin: 0;
}

    /* Connect timeline to header icon */
    .timeline-widget::after {
        content: '';
        position: absolute;
        top: -30px; /* Extend higher to connect to the icon */
        bottom: 0;
        left: 6px;
        width: 2px;
        background-color: white;
    }

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

    .timeline-item:last-child {
        padding-bottom: 10px;
    }

/* White circle indicators */
.timeline-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #3cb1b7;
    border: 2px solid white;
    position: absolute;
    left: 0;
    top: 5px;
    z-index: 1;
}

/* Timeline content */
.timeline-desc {
    font-size: 14px;
    line-height: 1.5;
}

.fw-semibold {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    display: block;
}

.text-white-50 {
    color: white !important;
    margin-top: 4px;
}

.timeline-badge-close {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid white;
    position: absolute;
    left: 0;
    top: 5px;
    z-index: 1;
}

/* Add this to your existing CSS file - Company name single line styling */
/*.card-body h5 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}*/

/* Ensure all h5 elements in cards follow the same pattern */
/*.card h5 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 10px;
}*/

.company-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
}

/* Enhanced flashing animations with white glow effects */

/* Red flashing effect for proforma orders - ENHANCED */
.card.bg-red-flash {
    background-color: #d61e4f !important;
    color: white !important;
    animation: flashRedEnhanced 1s infinite;
    border: 2px solid transparent;
}

    .card.bg-red-flash * {
        color: white !important;
    }

@keyframes flashRedEnhanced {
    0% {
        background-color: #d61e4f;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #d61e4f;
        transform: scale(1);
    }

    50% {
        background-color: #ff1744;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
        border-color: #ff1744;
        transform: scale(1.02);
    }

    100% {
        background-color: #d61e4f;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #d61e4f;
        transform: scale(1);
    }
}

/* Overdue card styling with enhanced flashing effect */
.card.bg-overdue {
    background-color: #ff6633 !important;
    color: white !important;
    animation: flashOverdueEnhanced 1s infinite;
    border: 2px solid transparent;
}

    .card.bg-overdue * {
        color: white !important;
    }

@keyframes flashOverdueEnhanced {
    0% {
        background-color: #ff6633;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #ff6633;
        transform: scale(1);
    }

    50% {
        background-color: #ff4400;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
        border-color: #ff4400;
        transform: scale(1.02);
    }

    100% {
        background-color: #ff6633;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #ff6633;
        transform: scale(1);
    }
}

/* Blue flashing effect - ENHANCED */
.card.bg-blue-flash {
    background-color: #3cb1b7 !important;
    color: white !important;
    animation: flashBlueEnhanced 1s infinite;
    border: 2px solid transparent;
}

    .card.bg-blue-flash * {
        color: white !important;
    }

@keyframes flashBlueEnhanced {
    0% {
        background-color: #3cb1b7;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #3cb1b7;
        transform: scale(1);
    }

    50% {
        background-color: #00e5ff;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
        border-color: #00e5ff;
        transform: scale(1.02);
    }

    100% {
        background-color: #3cb1b7;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #3cb1b7;
        transform: scale(1);
    }
}

/* Yellow flashing effect - ENHANCED */
.card.bg-yellow-flash {
    background-color: #e2c705 !important;
    color: black !important;
    animation: flashYellowEnhanced 1s infinite;
    border: 2px solid transparent;
}

    .card.bg-yellow-flash * {
        color: black !important;
    }

@keyframes flashYellowEnhanced {
    0% {
        background-color: #e2c705;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #e2c705;
        transform: scale(1);
    }

    50% {
        background-color: #ffeb3b;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
        border-color: #ffeb3b;
        transform: scale(1.02);
    }

    100% {
        background-color: #e2c705;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #e2c705;
        transform: scale(1);
    }
}

/* Green flashing effect - ENHANCED */
.card.bg-green-flash {
    background-color: #4faf5f !important;
    color: white !important;
    animation: flashGreenEnhanced 1s infinite;
    border: 2px solid transparent;
}

    .card.bg-green-flash * {
        color: white !important;
    }

@keyframes flashGreenEnhanced {
    0% {
        background-color: #4faf5f;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #4faf5f;
        transform: scale(1);
    }

    50% {
        background-color: #00e676;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
        border-color: #00e676;
        transform: scale(1.02);
    }

    100% {
        background-color: #4faf5f;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #4faf5f;
        transform: scale(1);
    }
}

/* Purple flashing effect - ENHANCED */
.card.bg-purple-flash {
    background-color: #9d48ef !important;
    color: white !important;
    animation: flashPurpleEnhanced 1s infinite;
    border: 2px solid transparent;
}

    .card.bg-purple-flash * {
        color: white !important;
    }

@keyframes flashPurpleEnhanced {
    0% {
        background-color: #9d48ef;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #9d48ef;
        transform: scale(1);
    }

    50% {
        background-color: #e040fb;
        box-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 40px rgba(255, 255, 255, 0.8);
        border-color: #e040fb;
        transform: scale(1.02);
    }

    100% {
        background-color: #9d48ef;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
        border-color: #9d48ef;
        transform: scale(1);
    }
}

@media (min-width: 1920px) {
    .task-list-section {
        display: flex !important;
        gap: 13px !important;
        flex-wrap: nowrap !important;
    }
}