﻿/* datagrid.css - common grid (table) + popup panel design for the whole project
   CSS only: no HTML/Razor/JS change. All DataTables features keep working
   (search, sorting, Copy / Excel / Print / Column visibility, scroll,
   fixed columns). Link it LAST in <head> of every layout / standalone page
   that shows tables:
   <link href="~/assets/css/datagrid.css" rel="stylesheet" />
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
    --grid-font: 'Inter', 'Noto Sans Devanagari', 'Segoe UI', system-ui, sans-serif;
    --grid-ink: #111827;
    --grid-text: #374151;
    --grid-muted: #6b7280;
    --grid-line: #edf0f3;
    --grid-head: #f8fafb;
    --grid-hover: #f5fafb;
    --grid-accent: #1f8ea3;
    --grid-accent-soft: #e3f3f6;
}

/* ---------- Toolbar: buttons left, search right ---------- */
.dataTables_wrapper:has(> .dt-buttons) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--grid-font);
}

    .dataTables_wrapper:has(> .dt-buttons) > .dataTables_scroll,
    .dataTables_wrapper:has(> .dt-buttons) > .DTFC_ScrollWrapper,
    .dataTables_wrapper:has(> .dt-buttons) > table.dataTable,
    .dataTables_wrapper:has(> .dt-buttons) > .dataTables_info,
    .dataTables_wrapper:has(> .dt-buttons) > .dataTables_paginate {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }

.dataTables_wrapper .dt-buttons {
    margin: 0 !important; /* overrides the old -5% hack */
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    float: none;
}

    .dataTables_wrapper .dt-buttons .btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin: 0 !important;
        padding: 7px 14px;
        border: 1px solid #dfe5ea !important;
        border-radius: 9px !important;
        background: #fff !important;
        color: var(--grid-text) !important;
        font-family: var(--grid-font);
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1.2;
        box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
        transition: background .15s ease, border-color .15s ease, color .15s ease;
    }

        .dataTables_wrapper .dt-buttons .btn:hover,
        .dataTables_wrapper .dt-buttons .btn:focus {
            background: var(--grid-accent-soft) !important;
            border-color: var(--grid-accent) !important;
            color: var(--grid-accent) !important;
            box-shadow: none;
        }

        .dataTables_wrapper .dt-buttons .btn::before {
            font-family: "Font Awesome 5 Free";
            font-weight: 900;
            font-size: 12.5px;
            color: var(--grid-accent);
        }

    .dataTables_wrapper .dt-buttons .buttons-copy::before { content: "\f0c5"; }
    .dataTables_wrapper .dt-buttons .buttons-excel::before { content: "\f1c3"; color: #1d7a45; }
    .dataTables_wrapper .dt-buttons .buttons-print::before { content: "\f02f"; }
    .dataTables_wrapper .dt-buttons .buttons-colvis::before { content: "\f0db"; }

    .dataTables_wrapper .dt-buttons .buttons-colvis::after {
        border-top-color: var(--grid-muted);
        margin-left: 2px;
    }

/* column visibility dropdown */
.dt-button-collection .dropdown-menu,
div.dt-button-collection {
    padding: 6px;
    border: 1px solid #e5e9ed;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .14);
    font-family: var(--grid-font);
}

    .dt-button-collection .dropdown-item {
        border-radius: 8px;
        font-size: 13.5px;
        padding: 6px 12px;
    }

        .dt-button-collection .dropdown-item.active {
            background: var(--grid-accent-soft);
            color: var(--grid-accent);
            font-weight: 600;
        }

/* search box */
.dataTables_wrapper .dataTables_filter {
    margin-left: auto;
    float: none;
    text-align: right;
}

    .dataTables_wrapper .dataTables_filter label {
        position: relative;
        margin: 0;
        font-size: 0; /* hide "Search:" text, keep the input */
    }

        .dataTables_wrapper .dataTables_filter label::before {
            content: "\f002";
            position: absolute;
            left: 13px;
            top: 50%;
            transform: translateY(-50%);
            font-family: "Font Awesome 5 Free";
            font-weight: 900;
            font-size: 13px;
            color: #9aa5b1;
            pointer-events: none;
        }

    .dataTables_wrapper .dataTables_filter input {
        width: 260px;
        height: 38px;
        margin: 0 !important;
        padding: 0 14px 0 36px;
        border: 1px solid #dfe5ea;
        border-radius: 10px;
        background: #fff;
        font-family: var(--grid-font);
        font-size: 14px;
        color: var(--grid-ink);
    }

        .dataTables_wrapper .dataTables_filter input::placeholder {
            color: #9aa5b1;
        }

        .dataTables_wrapper .dataTables_filter input:focus {
            outline: none;
            border-color: var(--grid-accent);
            box-shadow: 0 0 0 3px rgba(31, 142, 163, .15);
        }

/* ---------- Table frame ---------- */
.dataTables_wrapper .dataTables_scroll,
.dataTables_wrapper > table.dataTable {
    border: 1px solid #e5e9ed;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody {
    border: 0 !important;
}

/* ---------- Table base ---------- */
table.dataTable {
    margin: 0 !important;
    border-collapse: collapse !important;
    font-family: var(--grid-font);
    font-size: 14px;
    color: var(--grid-text);
}

    table.dataTable.table-bordered,
    table.dataTable.table-bordered th,
    table.dataTable.table-bordered td {
        border-left: 0 !important;
        border-right: 0 !important;
        border-top: 0 !important;
    }

    /* header */
    table.dataTable thead th,
    table.dataTable thead td {
        padding: 6px 24px 6px 8px !important; /* room for sort arrows */
        background: var(--grid-head) !important;
        color: var(--grid-muted) !important;
        font-size: 13.5px;
        font-weight: 600;
        text-align: left !important;
        vertical-align: middle;
        white-space: nowrap;
        border-bottom: 1px solid #e5e9ed !important;
        letter-spacing: .01em;
    }

    /* softer sort arrows */
    table.dataTable thead .sorting::before,
    table.dataTable thead .sorting::after,
    table.dataTable thead .sorting_asc::before,
    table.dataTable thead .sorting_asc::after,
    table.dataTable thead .sorting_desc::before,
    table.dataTable thead .sorting_desc::after {
        bottom: 50% !important;
        transform: translateY(50%);
        font-size: 11px;
        opacity: .25;
    }

    table.dataTable thead .sorting_asc::before,
    table.dataTable thead .sorting_desc::after {
        opacity: .9;
        color: var(--grid-accent);
    }

    table.dataTable thead .sorting_asc,
    table.dataTable thead .sorting_desc {
        color: var(--grid-ink) !important;
    }

    /* body */
    table.dataTable tbody td,
    table.dataTable tbody th {
        padding: 4px 8px !important;
        background: #fff;
        color: var(--grid-text);
        font-size: 14px;
        font-weight: 400;
        text-align: left !important;
        vertical-align: middle;
        border-bottom: 1px solid var(--grid-line) !important;
        line-height: 1.45;
    }

    /* no zebra stripes - plain rows like the reference */
    table.dataTable.table-striped tbody tr:nth-of-type(odd),
    table.dataTable.table-striped tbody tr:nth-of-type(odd) td,
    table.dataTable tbody tr.odd,
    table.dataTable tbody tr.even {
        background-color: #fff;
    }

    /* first column (serial no.) small & muted, second column (name) bold */
    table.dataTable tbody td:first-child {
        color: #9aa5b1;
        font-size: 13px;
        width: 48px;
    }

    table.dataTable tbody td:nth-child(2) {
        color: var(--grid-ink);
        font-weight: 600;
    }

    /* hover */
    table.dataTable tbody tr:hover td,
    table.dataTable tbody tr:hover th {
        background: var(--grid-hover) !important;
    }

    /* links inside cells */
    table.dataTable tbody a {
        color: var(--grid-accent);
        font-weight: 600;
        text-decoration: none;
    }

        table.dataTable tbody a:hover {
            color: #0f5c6b;
            text-decoration: underline;
        }

    table.dataTable tbody tr:last-child td {
        border-bottom: 0 !important;
    }

    /* footer totals, if any */
    table.dataTable tfoot th,
    table.dataTable tfoot td {
        padding: 4px 8px !important;
        background: var(--grid-head) !important;
        color: var(--grid-ink);
        font-weight: 700;
        text-align: left !important;
        border-top: 1px solid #e5e9ed !important;
    }

/* DataTables' hidden sizing header inside the scroll body must stay 0 px high */
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead th,
.dataTables_wrapper .dataTables_scrollBody table.dataTable thead td,
.dataTables_wrapper .DTFC_LeftBodyWrapper table.dataTable thead th,
.dataTables_wrapper .DTFC_RightBodyWrapper table.dataTable thead th {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
}

/* table fills the card width (still scrolls sideways when wider) */
.dataTables_wrapper .dataTables_scrollHeadInner,
.dataTables_wrapper .dataTables_scrollHeadInner > table.dataTable,
.dataTables_wrapper .dataTables_scrollBody > table.dataTable {
    width: 100% !important;
    min-width: max-content;
}

/* ---------- Fixed (frozen) columns blend in ---------- */
.DTFC_LeftHeadWrapper table,
.DTFC_RightHeadWrapper table,
.DTFC_LeftBodyWrapper table,
.DTFC_RightBodyWrapper table {
    background: #fff;
}

.DTFC_LeftBodyLiner,
.DTFC_RightBodyLiner {
    overflow-x: hidden;
}

.DTFC_LeftWrapper {
    box-shadow: 6px 0 10px -8px rgba(16, 24, 40, .25);
}

.DTFC_LeftHeadWrapper {
    border-top-left-radius: 12px;
    overflow: hidden;
}

/* ---------- Scrollbar ---------- */
.dataTables_scrollBody::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: #cfd8de;
    border-radius: 10px;
    border: 2px solid #fff;
}

    .dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
        background: #aab7c0;
    }

.dataTables_scrollBody::-webkit-scrollbar-track {
    background: #f6f8f9;
}

/* ---------- Info line & pagination ---------- */
.dataTables_wrapper .dataTables_info {
    padding: 2px 4px 0 !important;
    font-family: var(--grid-font);
    font-size: 13px;
    color: var(--grid-muted);
}

.dataTables_wrapper .dataTables_paginate .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border-color: #e5e9ed;
    color: var(--grid-text);
    font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background: var(--grid-accent);
    border-color: var(--grid-accent);
    color: #fff;
}

.dataTables_wrapper .dataTables_empty {
    padding: 28px !important;
    color: var(--grid-muted) !important;
    text-align: center !important;
}

/* ---------- Card that holds a grid (title like "Contracted Medicines & Rates") ---------- */
.card:has(.dataTables_wrapper) > .card-header .card-title {
    font-family: var(--grid-font);
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--grid-ink) !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_filter {
        flex: 1 1 100%;
        margin-left: 0;
    }

        .dataTables_wrapper .dataTables_filter label,
        .dataTables_wrapper .dataTables_filter input {
            width: 100%;
        }

    .dataTables_wrapper .dt-buttons .btn {
        padding: 6px 10px;
        font-size: 12.5px;
    }

    table.dataTable thead th,
    table.dataTable tbody td {
        padding: 4px 6px !important;
        font-size: 13px;
    }
}


/* ---------- Length menu ("Show 10 entries"), when a page uses it ---------- */
.dataTables_wrapper .dataTables_length {
    font-family: var(--grid-font);
    font-size: 13.5px;
    color: var(--grid-muted);
}

    .dataTables_wrapper .dataTables_length select {
        height: 36px;
        margin: 0 6px;
        padding: 0 28px 0 10px;
        border: 1px solid #dfe5ea;
        border-radius: 9px;
        font-family: var(--grid-font);
        font-size: 13.5px;
        color: var(--grid-ink);
    }

/* compact cells for every other Bootstrap table */
.table td,
.table th {
    padding: 4px 8px;
}

/* =====================================================================
   PLAIN TABLES (Bootstrap .table that are not DataTables)
   e.g. tables built in Reports.js or inside cards / pop-ups.
   ===================================================================== */
.content-wrapper table.table:not(.dataTable),
.modal table.table:not(.dataTable) {
    margin-bottom: 0;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid #e5e9ed !important;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    font-family: var(--grid-font);
    font-size: 14px;
    color: var(--grid-text);
}

    .content-wrapper table.table:not(.dataTable) th,
    .content-wrapper table.table:not(.dataTable) td,
    .modal table.table:not(.dataTable) th,
    .modal table.table:not(.dataTable) td {
        border-left: 0 !important;
        border-right: 0 !important;
        border-top: 0 !important;
        border-bottom: 1px solid var(--grid-line) !important;
        padding: 4px 8px;
        vertical-align: middle;
        text-align: left;
    }

    .content-wrapper table.table:not(.dataTable) thead th,
    .modal table.table:not(.dataTable) thead th {
        background: var(--grid-head) !important;
        color: var(--grid-muted) !important;
        font-size: 13.5px;
        font-weight: 600;
        white-space: nowrap;
        border-bottom: 1px solid #e5e9ed !important;
    }

    .content-wrapper table.table-striped:not(.dataTable) tbody tr:nth-of-type(odd),
    .modal table.table-striped:not(.dataTable) tbody tr:nth-of-type(odd) {
        background-color: #fff;
    }

    .content-wrapper table.table:not(.dataTable) tbody tr:hover td,
    .modal table.table:not(.dataTable) tbody tr:hover td {
        background: var(--grid-hover);
    }

    .content-wrapper table.table:not(.dataTable) tbody tr:last-child td,
    .modal table.table:not(.dataTable) tbody tr:last-child td {
        border-bottom: 0 !important;
    }


/* =====================================================================
   SIDE PANEL POPUP - "कार्य का विवरण" edit popup (#ProposedDiv with
   #proposedAmountByHQ), opened by clicking a number on Reports/workDrilldown.
   CSS only: the popup slides in from the right, the × button and Close
   button close it (Bootstrap data-dismiss, unchanged). Overrides the
   inline margin-left:-50% / min-width:1100px that pushed it off-screen.
   ===================================================================== */

.modal:has(#proposedAmountByHQ) {
    padding-right: 0 !important;
    overflow: hidden !important;
}

    .modal:has(#proposedAmountByHQ) .modal-dialog {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(620px, 100vw);
        max-width: none;
        height: 100%;
        margin: 0;
        transform: none;
        /* the panel itself */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #fff;
        border-radius: 18px 0 0 18px;
        box-shadow: -16px 0 48px rgba(15, 35, 52, .22);
        font-family: var(--grid-font);
        pointer-events: auto; /* clicks inside never count as backdrop clicks */
    }

.modal.show:has(#proposedAmountByHQ) .modal-dialog {
    animation: gvDrawerIn .38s cubic-bezier(.22, .8, .3, 1) both;
}

@keyframes gvDrawerIn {
    from {
        transform: translateX(100%);
        opacity: .4;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* .modal-content has inline "min-width:1100px !important; margin-left:-50%"
   which no stylesheet can override. display:contents removes its box, so
   those inline values no longer apply; header/body/footer sit directly in
   the panel above. */
.modal:has(#proposedAmountByHQ) .modal-content {
    display: contents;
}

/* header with the × button */
.modal:has(#proposedAmountByHQ) .modal-header {
    flex: 0 0 auto;
    align-items: center;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: linear-gradient(120deg, #0f5c6b, #1f8ea3);
}

    .modal:has(#proposedAmountByHQ) .modal-header .modal-title {
        font-size: 17px;
        font-weight: 600;
        line-height: 1.35;
    }

        .modal:has(#proposedAmountByHQ) .modal-header .modal-title:empty::before,
        .modal:has(#proposedAmountByHQ) .modal-header .modal-title span:empty::before {
            content: "कार्य का विवरण अपडेट करें";
        }

    .modal:has(#proposedAmountByHQ) .modal-header .close {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin: 0 0 0 auto;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, .18);
        color: #fff;
        font-size: 26px;
        font-weight: 400;
        line-height: 1;
        text-shadow: none;
        opacity: 1;
        transition: background .15s ease, transform .15s ease;
    }

        .modal:has(#proposedAmountByHQ) .modal-header .close:hover,
        .modal:has(#proposedAmountByHQ) .modal-header .close:focus {
            background: rgba(255, 255, 255, .32);
            transform: rotate(90deg);
            outline: none;
        }

/* scrollable body */
.modal:has(#proposedAmountByHQ) .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 22px 22px 10px;
}

    .modal:has(#proposedAmountByHQ) .modal-body > .col-md-12 {
        padding: 0;
    }

    /* one field per line inside the narrow panel */
    .modal:has(#proposedAmountByHQ) .modal-body [class*="col-md-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 16px;
    }

    .modal:has(#proposedAmountByHQ) .modal-body label {
        display: block;
        margin-bottom: 6px;
        font-size: 13.5px;
        font-weight: 600;
        color: #475463;
    }

    .modal:has(#proposedAmountByHQ) .modal-body .form-control {
        height: 42px;
        border: 1px solid #d5dde3;
        border-radius: 10px;
        font-size: 14px;
        color: #111827;
    }

        .modal:has(#proposedAmountByHQ) .modal-body .form-control:focus {
            border-color: #1f8ea3;
            box-shadow: 0 0 0 3px rgba(31, 142, 163, .16);
        }

    .modal:has(#proposedAmountByHQ) .modal-body p {
        margin: 8px 0 0;
        padding: 8px 12px;
        border-radius: 8px;
        background: #fff7e0;
        color: #8a5f00;
        font-size: 12.5px;
        line-height: 1.5;
    }

    .modal:has(#proposedAmountByHQ) .modal-body .row[align="center"] {
        margin: 4px 0 0;
    }

    .modal:has(#proposedAmountByHQ) .modal-body #btnUpdate {
        width: 100%;
        padding: 11px 16px;
        border: 0;
        border-radius: 10px;
        background: #1f8ea3;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(31, 142, 163, .3);
    }

        .modal:has(#proposedAmountByHQ) .modal-body #btnUpdate:hover {
            background: #16707f;
        }

/* footer stays at the bottom */
.modal:has(#proposedAmountByHQ) .modal-footer {
    flex: 0 0 auto;
    padding: 14px 22px;
    border-top: 1px solid #eef2f5;
    background: #fafbfc;
}

    .modal:has(#proposedAmountByHQ) .modal-footer .btn {
        min-width: 110px;
        border-radius: 10px;
        font-weight: 600;
    }

@media (max-width: 575.98px) {
    .modal:has(#proposedAmountByHQ) .modal-dialog {
        border-radius: 0;
    }
}


/* =====================================================================
   SIDE PANEL POPUP - table popups (#ProposedDiv / #workDetailsModal that
   hold the #demo3 grid), e.g. Main/DistrictWiseWorkCounts and
   Reports/workDrilldown. Same panel as above, wider for the grid.
   ===================================================================== */

.modal:has(#demo3) {
    padding-right: 0 !important;
    overflow: hidden !important;
}

    .modal:has(#demo3) .modal-dialog {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(1100px, 100vw);
        max-width: none;
        height: 100%;
        margin: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #fff;
        border-radius: 18px 0 0 18px;
        box-shadow: -16px 0 48px rgba(15, 35, 52, .22);
        font-family: var(--grid-font);
        pointer-events: auto;
    }

.modal.show:has(#demo3) .modal-dialog {
    animation: gvDrawerIn .38s cubic-bezier(.22, .8, .3, 1) both;
}

/* removes the box that carries inline margin-left:-50% / min-width:1100px */
.modal:has(#demo3) .modal-content {
    display: contents;
}

.modal:has(#demo3) .modal-header {
    flex: 0 0 auto;
    align-items: center;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: linear-gradient(120deg, #0f5c6b, #1f8ea3);
}

    .modal:has(#demo3) .modal-header .modal-title {
        font-size: 17px;
        font-weight: 600;
        line-height: 1.35;
    }

    .modal:has(#demo3) .modal-header .close {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin: 0 0 0 auto;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, .18);
        color: #fff;
        font-size: 26px;
        font-weight: 400;
        line-height: 1;
        text-shadow: none;
        opacity: 1;
        transition: background .15s ease, transform .15s ease;
    }

        .modal:has(#demo3) .modal-header .close:hover,
        .modal:has(#demo3) .modal-header .close:focus {
            background: rgba(255, 255, 255, .32);
            transform: rotate(90deg);
            outline: none;
        }

.modal:has(#demo3) .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px;
}

.modal:has(#demo3) .modal-footer {
    flex: 0 0 auto;
    padding: 14px 22px;
    border-top: 1px solid #eef2f5;
    background: #fafbfc;
}

    .modal:has(#demo3) .modal-footer .btn {
        min-width: 110px;
        border-radius: 10px;
        font-weight: 600;
    }

@media (max-width: 575.98px) {
    .modal:has(#demo3) .modal-dialog {
        border-radius: 0;
    }
}


/* =====================================================================
   BUTTONS - gradient + soft coloured shadow for the whole project.
   Grid toolbar buttons, card tool icons and outline buttons keep their
   own look.
   ===================================================================== */

.btn-primary { --gv-btn-a: #23a0b6; --gv-btn-b: #0f5c6b; --gv-btn-text: #fff; --gv-btn-shadow: 15, 92, 107; }
.btn-success { --gv-btn-a: #34b872; --gv-btn-b: #1e8449; --gv-btn-text: #fff; --gv-btn-shadow: 30, 132, 73; }
.btn-danger { --gv-btn-a: #ee5f63; --gv-btn-b: #c2323a; --gv-btn-text: #fff; --gv-btn-shadow: 194, 50, 58; }
.btn-warning { --gv-btn-a: #ffcb45; --gv-btn-b: #f0a500; --gv-btn-text: #3a2a00; --gv-btn-shadow: 224, 154, 0; }
.btn-info { --gv-btn-a: #38bdd8; --gv-btn-b: #1786a3; --gv-btn-text: #fff; --gv-btn-shadow: 23, 134, 163; }
.btn-secondary { --gv-btn-a: #8995a2; --gv-btn-b: #5c6773; --gv-btn-text: #fff; --gv-btn-shadow: 92, 103, 115; }

:is(.content-wrapper, .modal) .btn:is(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-secondary):not(.dt-buttons *):not(.dt-button-collection *) {
    padding: 7px 18px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gv-btn-a), var(--gv-btn-b));
    color: var(--gv-btn-text);
    font-weight: 600;
    letter-spacing: .01em;
    box-shadow: 0 6px 14px rgba(var(--gv-btn-shadow), .32), 0 2px 4px rgba(15, 35, 52, .12);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

    :is(.content-wrapper, .modal) .btn:is(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-secondary):not(.dt-buttons *):not(.dt-button-collection *):not(:disabled):not(.disabled):hover {
        color: var(--gv-btn-text);
        filter: brightness(1.06);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(var(--gv-btn-shadow), .4), 0 3px 6px rgba(15, 35, 52, .14);
    }

    :is(.content-wrapper, .modal) .btn:is(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-secondary):not(.dt-buttons *):not(.dt-button-collection *):not(:disabled):not(.disabled):active {
        transform: translateY(0);
        box-shadow: 0 3px 8px rgba(var(--gv-btn-shadow), .35);
    }

    :is(.content-wrapper, .modal) .btn:is(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-secondary):not(.dt-buttons *):not(.dt-button-collection *):focus-visible {
        outline: 2px solid rgba(var(--gv-btn-shadow), .55);
        outline-offset: 2px;
    }

    :is(.content-wrapper, .modal) .btn:is(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-secondary):not(.dt-buttons *):not(.dt-button-collection *):is(:disabled, .disabled) {
        box-shadow: none;
    }

/* gap between buttons placed side by side */
.btn.float-right + .btn.float-right {
    margin-right: 10px;
}


/* =====================================================================
   TABLE ACTION ICONS - edit / delete / other outline buttons inside grids.
   The markup comes from the database, so the look is set by class, icon
   and title. Soft tinted tile; fills with its colour on hover.
   ===================================================================== */

table tbody td:has(> .btn[class*="btn-outline"]) {
    white-space: nowrap;
}

table tbody td .btn[class*="btn-outline"] {
    --gv-act: #1a7f93;
    --gv-act-bg: #e6f4f7;
    --gv-act-line: #c5e4ea;
    --gv-act-shadow: 26, 127, 147;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 30px;
    height: 30px;
    margin: 0 !important;
    padding: 0 8px;
    border: 1px solid var(--gv-act-line);
    border-radius: 9px;
    background: var(--gv-act-bg);
    color: var(--gv-act);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    box-shadow: 0 2px 5px rgba(var(--gv-act-shadow), .14);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

    table tbody td .btn[class*="btn-outline"] + .btn[class*="btn-outline"] {
        margin-left: 6px !important;
    }

    table tbody td .btn[class*="btn-outline"] i {
        color: inherit !important;
        font-size: 13px;
    }

    /* colour by meaning */
    table tbody td .btn.btn-outline-success {
        --gv-act: #1e8449;
        --gv-act-bg: #e8f6ee;
        --gv-act-line: #c7e8d5;
        --gv-act-shadow: 30, 132, 73;
    }

    table tbody td .btn.btn-outline-warning {
        --gv-act: #a86f00;
        --gv-act-bg: #fff5dc;
        --gv-act-line: #f6e2ae;
        --gv-act-shadow: 224, 154, 0;
    }

    table tbody td .btn.btn-outline-danger,
    table tbody td .btn[class*="btn-outline"]:has(.fa-times, .fa-trash, .fa-trash-alt, .fa-close, .fa-remove, .fa-ban),
    table tbody td .btn[class*="btn-outline"][title*="delete" i] {
        --gv-act: #c2323a;
        --gv-act-bg: #fdecec;
        --gv-act-line: #f7cfd1;
        --gv-act-shadow: 194, 50, 58;
    }

    table tbody td .btn[class*="btn-outline"]:hover,
    table tbody td .btn[class*="btn-outline"]:focus-visible {
        border-color: var(--gv-act);
        background: var(--gv-act);
        color: #fff;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(var(--gv-act-shadow), .32);
    }

    table tbody td .btn[class*="btn-outline"]:active {
        transform: translateY(0);
        box-shadow: 0 2px 5px rgba(var(--gv-act-shadow), .3);
    }
