:root {
    --color-skyblue: #0f9aee;
    --color-text: #374151;
    --color-primary: #2C9AFF;
    --color-amber: #ffbf00;
    --color-primary-hover: #79bfff;
    --color-primary-light: #EDEBFD;
    --color-sidebar-bg: #14162B;
    --color-sidebar-bg-active: #6C5CE7;
    --color-sidebar-text: #A6A8C3;
    --color-sidebar-text-active: #FFFFFF;
    --color-sidebar-heading: #6E7191;
    --color-bg: #F4F5FA;
    --color-card-bg: #FFFFFF;
    --color-border: #E7E8F1;
    --dark-black: #000;
    --color-text-muted: #000;
    --color-text-light: #ACAEC7;
    --color-success-bg: #E4F9EE;
    --color-success-text: #1BA97F;
    --color-danger-bg: #FDEBEC;
    --color-danger-text: #E4626F;
    --color-online-dot: #22C55E;
    --color-focus: rgb(107, 114, 128);
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --shadow-card: 0 4px 24px rgba(20, 22, 43, 0.05);
    --shadow-dropdown: 0 8px 24px rgba(20, 22, 43, 0.12);
    --font-base: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --Slate: #64748b;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    /* background: var(--color-bg); */
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.content {
    padding: 24px 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: inherit;
    transition: background .15s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--color-primary-hover);
    }

/* Size variants — apply directly, no @media, e.g. <button class="btn btn-primary smBtn"> */
.smBtn {
    padding: 8px 14px;
    font-size: 12.5px;
    gap: 6px;
}

.mdBtn {
    padding: 10px 18px;
    font-size: 13.5px;
    gap: 8px;
}

.lgBtn {
    padding: 12px 20px;
    font-size: 14px;
    gap: 8px;
}

.xlBtn {
    padding: 14px 24px;
    font-size: 15px;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
}

.badge-active {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.badge-inactive {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

.card {
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    border-radius: var(--radius-lg);
    padding: 24px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--Slate);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.pagination-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-bg);
}

    .pagination-item.active {
        background: var(--color-primary);
        color: #fff;
    }

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
}

    .search input {
        border: none;
        background: transparent;
        outline: none;
        width: 100%;
        font-family: var(--font-base);
        color: var(--dark-black);
    }

    .search:focus-within {
        border-color: var(--color-focus);
    }

/* Size variants — apply directly, no @media, e.g. <div class="search smSearch"> */
.smSearch {
    padding: 8px 12px;
    font-size: 12.5px;
    width: 100%;
}

    .smSearch input {
        font-size: 12.5px;
    }

.mdSearch {
    padding: 9px 14px;
    font-size: 13px;
    width: 220px;
}

    .mdSearch input {
        font-size: 13px;
    }

.lgSearch {
    padding: 10px 16px;
    font-size: 13.5px;
    width: 260px;
}

    .lgSearch input {
        font-size: 13.5px;
    }

.xlSearch {
    padding: 11px 18px;
    font-size: 14px;
    width: 300px;
}

    .xlSearch input {
        font-size: 14px;
    }

.select {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    background: var(--color-card-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C8FAE' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 14px center;
    background-size: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--dark-black);
    font-family: var(--font-base);
}

    .select:focus,
    .select:focus-visible {
        border-color: var(--color-focus);
        outline: none;
        box-shadow: none;
    }

    .select option {
        background-color: #fff;
        box-shadow: var(--shadow-dropdown);
        border-radius: 15px;
        font-size: 12px;
        border: none;
        font-family: var(--font-base);
    }

.smSelect {
    padding: 10px 34px 10px 12px;
    font-size: 13px;
    width: 160px;
}

.mdSelect {
    padding: 11px 36px 11px 14px;
    font-size: 13.5px;
    width: 220px;
}

.lgSelect {
    padding: 12px 38px 12px 16px;
    font-size: 14px;
    width: 280px;
}

.xlSelect {
    padding: 13px 40px 13px 16px;
    font-size: 14px;
    width: 100%;
}

.input {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--dark-black);
    font-family: var(--font-base);
    outline: none;
}

    .input:focus {
        border-color: var(--color-focus);
    }

    .input::placeholder {
        color: var(--color-text-light);
    }

/* Size variants — apply directly, no @media, e.g. <input class="input smInput"> */
.smInput {
    padding: 10px 12px;
    font-size: 13px;
    width: 120px;
}

.mdInput {
    padding: 11px 14px;
    font-size: 13.5px;
    width: 240px;
}

.lgInput {
    padding: 12px 16px;
    font-size: 14px;
    width: 320px;
}

.xlInput {
    padding: 13px 16px;
    font-size: 14px;
    width: 350px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-base);
}

    .table thead th {
        text-align: left;
        color: var(--color-text-muted);
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        border-bottom: 1px solid var(--color-border);
        white-space: nowrap;
    }

    .table tbody td {
        border-bottom: 1px solid var(--color-border);
        color: var(--dark-black);
        white-space: nowrap;
        font-weight: 600;
    }

    .table tbody tr:hover {
        background: var(--color-bg);
    }

    .table a {
        color: var(--color-primary);
        font-weight: 600;
    }


.smTableWrap {
    overflow-x: visible;
}

.smTable thead {
    display: none;
}

.smTable,
.smTable tbody,
.smTable tr,
.smTable td {
    display: block;
    width: 100%;
}

    .smTable tr {
        margin-bottom: 14px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        overflow: hidden;
    }

    .smTable td {
        padding: 10px 14px;
        font-size: 12.5px;
        border-bottom: 1px solid var(--color-border);
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

        .smTable td:last-child {
            border-bottom: none;
        }

        .smTable td::before {
            content: attr(data-label);
            font-weight: 600;
            color: var(--color-text-muted);
            text-transform: uppercase;
            font-size: 11px;
        }

/* --- MD: horizontal scroll, compact padding --- */
.mdTableWrap {
    overflow-x: auto;
}

.mdTable thead th {
    padding: 10px 14px;
    font-size: 11px;
}

.mdTable tbody td {
    padding: 10px 14px;
    font-size: 12.5px;
}

/* --- LG: horizontal scroll, standard padding --- */
/*.lgTableWrap {
    overflow-x: auto;
}*/

.lgTable thead th {
    padding: 12px 16px;
    font-size: 11.5px;
}

.lgTable tbody td {
    padding: 14px 16px;
    font-size: 13.5px;
}

/* --- XL: full spacious table --- */
.xlTableWrap {
    overflow-x: auto;
}

.xlTable thead th {
    padding: 14px 20px;
    font-size: 12px;
}

.xlTable tbody td {
    padding: 18px 20px;
    font-size: 14px;
}

/* ---------- Premium thin scrollbar (shared across md/lg/xl table-wrap) ---------- */
.mdTableWrap,
.lgTableWrap,
.xlTableWrap {
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-text-muted);
    width: 100%;
    overflow: auto;
}

    .mdTableWrap::-webkit-scrollbar,
    .lgTableWrap::-webkit-scrollbar,
    .xlTableWrap::-webkit-scrollbar {
        height: 4px;
        /* horizontal scroll -> height hi thickness control karti hai */
    }

    .mdTableWrap::-webkit-scrollbar-track,
    .lgTableWrap::-webkit-scrollbar-track,
    .xlTableWrap::-webkit-scrollbar-track {
        background: var(--color-bg);
        border-radius: 10px;
    }

    .mdTableWrap::-webkit-scrollbar-thumb,
    .lgTableWrap::-webkit-scrollbar-thumb,
    .xlTableWrap::-webkit-scrollbar-thumb {
        background: var(--color-text-muted);
        border-radius: 10px;
    }

        .mdTableWrap::-webkit-scrollbar-thumb:hover,
        .lgTableWrap::-webkit-scrollbar-thumb:hover,
        .xlTableWrap::-webkit-scrollbar-thumb:hover {
            background: var(--color-primary);
        }

/* ==========================================================================
   12. MODAL — base + direct size classes (smModal / mdModal / lgModal / xlModal)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 43, 0.45);
    display: flex;
    align-items: start;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

    .modal-overlay.hidden {
        display: none !important;
    }

.modal {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-dropdown);
    padding: 24px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Size variants — apply directly, no @media, e.g. <div class="modal mdModal"> */
.smModal {
    max-width: 380px;
}

.mdModal {
    max-width: 480px;
}

.lgModal {
    max-width: 640px;
}

.xlModal {
    max-width: 70vw
}

@media (max-width: 480px) {
    .xlModal {
        max-width: 90vw;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .xlModal {
        max-width: 100vh;
    }
}
/* Modal internal helper layout (form) */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    border-bottom: 2px solid #bfb8b8;
    padding-bottom: 15px;
}

.modal-title {
    color: #151a47;
    font-size: 17px;
    font-weight: 500;
}

.modal-close {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: var(--radius-sm);
}

    .modal-close:hover {
        background: var(--color-bg);
    }

.modal-field {
    margin-bottom: 16px;
}

    .modal-field label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        color: #64748B;
    }

.modal-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}

    .modal-fields .modal-field {
        margin-bottom: 0;
        flex: 0 0 auto;
    }

.smModal .modal-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.mdModal .modal-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.lgModal .modal-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.xlModal .modal-fields {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

    /* Inside a sized modal's grid, fields stretch to fill their column
   (their own size class still controls padding/font-size, not width here) */
    .smModal .modal-fields .modal-field .input,
    .smModal .modal-fields .modal-field .select,
    .mdModal .modal-fields .modal-field .input,
    .mdModal .modal-fields .modal-field .select,
    .lgModal .modal-fields .modal-field .input,
    .lgModal .modal-fields .modal-field .select,
    .xlModal .modal-fields .modal-field .input,
    .xlModal .modal-fields .modal-field .select {
        width: 100%;
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 2px solid #bfb8b8;
    padding-top: 15px;
    margin: 15px 0 0 0;
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

    .btn-secondary:hover {
        background: var(--color-border);
    }

/* ==========================================================================
   13. ROW ACTIONS DROPDOWN (ellipsis "..." menu on table rows)
   ========================================================================== */
.row-actions-menu {
    position: absolute;
    min-width: 200px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 1000;
}

    .row-actions-menu.hidden {
        display: none;
    }

    .row-actions-menu li a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 5px 16px;
        font-size: 13px;
        font-weight: 500;
        color: var(--dark-black);
    }

        .row-actions-menu li a i {
            width: 14px;
            text-align: center;
            color: var(--color-text-muted);
            font-size: 12.5px;
        }

        .row-actions-menu li a:hover {
            background: var(--color-bg);
        }

.textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--dark-black);
    resize: vertical;
    outline: none;
    transition: .2s;
}

    .textarea:focus {
        border-color: var(--color-focus);
    }

.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 5px;
}

.history-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
}

    .dot.active {
        background: #22c55e;
    }

    .dot.inactive {
        background: #ef4444;
    }

.history-content {
    font-size: 13px;
}

.status {
    font-weight: 600;
}

.text-green {
    color: #22c55e;
}

.text-red {
    color: #ef4444;
}

.date {
    font-size: 12px;
    color: var(--color-text-muted);
}

.meta {
    font-size: 12px;
    color: var(--color-text-muted);
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffff;
    border-top-color: #2C9AFF;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.light-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.light-scrollbar::-webkit-scrollbar-track {
    background: #fff;
}

.light-scrollbar::-webkit-scrollbar-thumb {
    background: #F3F3F3;
    border-radius: 4px;
}

    .light-scrollbar::-webkit-scrollbar-thumb:hover {
        background: #D3D3D3;
    }
.scrollbar-none {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
@keyframes btnSpin {
    from {
        transform: translateY(-50%) rotate(0deg);
    }

    to {
        transform: translateY(-50%) rotate(360deg);
    }
}
/* Container Box */
#donut-chart {
    width: 100%; /* Ya fixed width jaise 500px */
    height: 450px; /* Aap yahan apni marzi ki height set kar sakte hain */
    min-height: 400px;
}

    /* SVG Element */
    #donut-chart svg {
        width: 100% !important;
        height: 100% !important;
    }
/* Card Container Styling */
#discrete-bar-chart {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    height: 500px;
}

    /* Bars Rounded Corners & Smooth Animation */
    #discrete-bar-chart .nv-bar rect {
        rx: 6px; /* Rounded top corners */
        ry: 6px;
        transition: opacity 0.2s ease;
    }

        #discrete-bar-chart .nv-bar rect:hover {
            opacity: 0.85; /* Hover effect */
        }

    /* Value Labels Above Bars */
    #discrete-bar-chart .nv-discretebar text.nv-value-text {
        font-size: 12px;
        font-weight: 600;
        fill: #2563eb;
    }

    /* Axis Labels & Grid Line Tweaks */
    #discrete-bar-chart .nv-axis text {
        font-size: 11px;
        fill: #64748b;
    }

    #discrete-bar-chart .nv-axis path.domain {
        stroke: #e2e8f0;
    }

    #discrete-bar-chart .zero line {
        stroke: #cbd5e1 !important;
    }
#discrete-bar-chart1 {
    height: 500px !important;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-sizing: border-box;
}

    #discrete-bar-chart1 svg {
        height: 500px !important;
    }

    /* Bar styling */
    #discrete-bar-chart1 .nv-bar {
        rx: 5;
        ry: 5;
    }

        /* Value labels */
        #discrete-bar-chart1 .nv-bar text {
            fill: #1e3a8a !important;
            font-size: 13px;
            font-weight: 600;
        }

    /* X-axis labels */
    #discrete-bar-chart1 .nv-x text {
        font-size: 12px;
        font-weight: 500;
        fill: #475569;
    }

    /* Y-axis labels */
    #discrete-bar-chart1 .nv-y text {
        font-size: 12px;
        fill: #64748b;
    }

    /* Grid lines */
    #discrete-bar-chart1 .nv-axis .tick line {
        stroke: #e2e8f0;
        stroke-opacity: 0.7;
    }
@keyframes skeleton-loading {
    to {
        background-position-x: -200%;
    }
}

.skeleton-overlay {
    background: linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100% );
    background-size: 200% 100%;
    animation: skeleton-sweep 1.5s linear infinite;
}

@keyframes skeleton-sweep {
    to {
        background-position-x: -200%;
    }
}
.input:disabled,
.select:disabled {
    background-color: #f6f6f6;
}

.lgTableWrap .row-actions-menu,
table .row-actions-menu {
    display: none !important;
}
table tbody tr td{
    white-space: wrap !important;
}
table tbody tr td span{
    white-space: nowrap !important;
}
.text-gray-300,
.text-gray-400,
.text-gray-500,
.text-gray-800,
.text-gray-900 {
    color: #000 !important;
}