:root {
    --wink-blue: #0099d3;
    --wink-dark-blue: #1a6e90;
    --wink-grey: #666666;
    --wink-bg: #f3f2ef;
    --wink-border: #dee2e6;
    --wink-light-bg: #f8f9fa;
    --wink-hover: rgba(0, 153, 211, 0.05);
    --sidebar-width: 305px;
    --navbar-height: 88px;
}

/* =========================================================
   GLOBAL
========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--wink-bg);
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #333;
}

body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* =========================================================
   GLOBAL PAGE LOADER
========================================================= */

.global-page-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(2px);
}

.global-page-loader.hidden {
    display: none !important;
}

.global-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 160px;
    padding: 24px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 20px 45px rgba(26, 110, 144, 0.2);
    border: 1px solid rgba(0, 153, 211, 0.18);
}

.global-loader-spinner {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 5px solid rgba(0, 153, 211, 0.18);
    border-top-color: var(--wink-blue);
    border-right-color: var(--wink-dark-blue);
    animation: global-loader-spin 0.9s linear infinite;
}

.global-loader-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wink-dark-blue);
}

@keyframes global-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   COLORS
========================================================= */

.bg-dark-blue {
    background-color: var(--wink-dark-blue) !important;
}

.text-dark-blue {
    color: var(--wink-dark-blue) !important;
}

.text-wink-blue {
    color: var(--wink-blue) !important;
}

/* =========================================================
   LINKS
========================================================= */

a {
    color: var(--wink-blue);
}

a:hover {
    color: var(--wink-dark-blue);
}

/* =========================================================
   APP
========================================================= */

#app {
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR
========================================================= */

#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

/* Sidebar scrollbar */

#sidebar::-webkit-scrollbar {
    width: 5px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

/* Sidebar links */

.sidebar-link {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
}

/* Active sidebar item */

.sidebar-link.active {
    background-color: var(--wink-blue) !important;
    color: #ffffff !important;
}

/* =========================================================
   MAIN WRAPPER
========================================================= */

#mainWrapper {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-width: 0;
}

/* =========================================================
   NAVBAR
========================================================= */

#mainWrapper .navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--navbar-height);
    background-color: #ffffff !important;
    border-bottom: 1px solid #e1e1e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Navbar page title */

#mainWrapper .navbar .fs-4 {
    font-size: 22px !important;
    font-weight: 500;
    color: var(--wink-dark-blue);
}

/* Navbar user */

#mainWrapper .navbar .user-name {
    font-size: 14px;
    font-weight: 500;
}
#mainWrapper .navbar .user-email {
    font-size: 12px;
    color: var(--wink-grey);
}
/* =========================================================
   MAIN CONTENT
========================================================= */

#mainContent {
    padding: 22px !important;
}

/* =========================================================
   DESKTOP SIDEBAR TOGGLE
========================================================= */

#app.sidebar-collapsed #sidebar {
    transform: translateX(-100%);
}

#app.sidebar-collapsed #mainWrapper {
    margin-left: 0;
}

/* =========================================================
   OVERLAY
========================================================= */

#sidebarOverlay {
    display: none;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn {
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 400;
    border-radius: 4px;
}

/* Small buttons */

.btn-sm {
    font-size: 13px;
    padding: 5px 10px;
}

/* Primary */

.btn-primary {
    background-color: var(--wink-blue);
    border-color: var(--wink-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--wink-dark-blue);
    border-color: var(--wink-dark-blue);
}

/* =========================================================
   CARDS
========================================================= */

.card {
    background-color: #ffffff;
    border: 1px solid var(--wink-border);
    border-radius: 6px;
    box-shadow: none;
}

/* Card header */

.card-header {
    background-color: #ffffff;
    padding: 11px 14px;
    border-bottom: 1px solid var(--wink-border);
}

/* Card title */

.card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    color: #333;
}

/* Card body */

.card-body {
    padding: 14px;
}

/* =========================================================
   BREADCRUMB
========================================================= */

.breadcrumb {
    margin-bottom: 14px;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--wink-blue);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--wink-grey);
}

/* =========================================================
   FILTER CARD
========================================================= */

.filter-card .card-body {
    padding: 10px 14px;
}

/* Filter select */

.filter-card .form-select {
    width: 100%;
    min-height: 38px;
    font-size: 13px;
    border-color: #ced4da;
    border-radius: 5px;
    box-shadow: none;
}

.filter-card .form-select:focus {
    border-color: var(--wink-blue);
    box-shadow: 0 0 0 0.15rem rgba(0, 153, 211, 0.12);
}

/* =========================================================
   DATA TABLES
========================================================= */

/* Main DataTable */

table.dataTable {
    width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
    font-size: 13px;
}

/* Table wrapper */

.table-responsive {
    width: 100%;
}

/* ---------------------------------------------------------
   TABLE HEADER
--------------------------------------------------------- */

table.dataTable thead th {
    background-color: var(--wink-light-bg) !important;
    color: #495057 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 9px 10px !important;
    vertical-align: middle !important;
    white-space: nowrap;
    border-color: #e3e6e8 !important;
}

/* Remove strong sorting appearance */

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    font-weight: 500 !important;
}

/* ---------------------------------------------------------
   TABLE BODY
--------------------------------------------------------- */

table.dataTable tbody td {
    font-size: 13px !important;
    font-weight: 400;
    color: #495057;
    padding: 8px 10px !important;
    vertical-align: middle !important;
    border-color: #e3e6e8 !important;
}

/* ---------------------------------------------------------
   TABLE ROWS
--------------------------------------------------------- */

table.dataTable tbody tr {
    background-color: #ffffff;
}

/* Alternate row */

table.dataTable tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

/* Hover */

table.dataTable tbody tr:hover {
    background-color: var(--wink-hover) !important;
}

/* Keep cells clean on hover */

table.dataTable tbody tr:hover > td {
    background-color: var(--wink-hover) !important;
}

/* ---------------------------------------------------------
   TABLE BORDERS
--------------------------------------------------------- */

table.dataTable.table-bordered {
    border-color: #e3e6e8 !important;
}

table.dataTable.table-bordered > :not(caption) > * {
    border-color: #e3e6e8 !important;
}

table.dataTable.table-bordered > :not(caption) > * > * {
    border-color: #e3e6e8 !important;
}

/* =========================================================
   DATATABLE TOP ROW
========================================================= */

.dt-layout-row:first-child {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    align-items: center;
}

/* =========================================================
   EXCEL / PDF BUTTONS
========================================================= */

.dt-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Remove default spacing */

.dt-buttons .btn {
    margin: 0 !important;
    padding: 6px 11px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
}

/* ---------------------------------------------------------
   EXCEL
--------------------------------------------------------- */

.dt-buttons .btn-outline-success {
    color: var(--wink-dark-blue) !important;
    background-color: #ffffff !important;
    border-color: var(--wink-dark-blue) !important;
}

.dt-buttons .btn-outline-success:hover {
    color: #ffffff !important;
    background-color: var(--wink-dark-blue) !important;
    border-color: var(--wink-dark-blue) !important;
}

/* ---------------------------------------------------------
   PDF
--------------------------------------------------------- */

.dt-buttons .btn-outline-danger {
    color: var(--wink-blue) !important;
    background-color: #ffffff !important;
    border-color: var(--wink-blue) !important;
}

.dt-buttons .btn-outline-danger:hover {
    color: #ffffff !important;
    background-color: var(--wink-blue) !important;
    border-color: var(--wink-blue) !important;
}

/* =========================================================
   DATATABLE SEARCH
========================================================= */

.dt-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Search label */

.dt-search label {
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 400;
    color: #666666;
}

/* Search input */

.dt-search input {
    width: 210px !important;
    height: 36px !important;
    margin-left: 8px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    color: #333;
    background-color: #ffffff;
    border: 1px solid #ced4da !important;
    border-radius: 5px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Search focus */

.dt-search input:focus {
    border-color: var(--wink-blue) !important;
    box-shadow: 0 0 0 0.15rem rgba(0, 153, 211, 0.12) !important;
}

/* Placeholder */

.dt-search input::placeholder {
    color: #999;
}

/* =========================================================
   DATATABLE BOTTOM ROW
========================================================= */

.dt-layout-row:last-child {
    margin-top: 12px !important;
    align-items: center;
}

/* =========================================================
   DATATABLE INFORMATION
========================================================= */

.dt-info {
    padding-top: 0 !important;
    font-size: 13px;
    color: #666666;
}

/* =========================================================
   DATATABLE PAGINATION
========================================================= */

.dt-paging {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Pagination */

.dt-paging .pagination {
    margin-bottom: 0;
    gap: 0;
}

/* Page links */

.dt-paging .page-link {
    min-width: 36px;
    height: 36px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--wink-dark-blue) !important;
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
}

/* Hover */

.dt-paging .page-link:hover {
    color: #ffffff !important;
    background-color: var(--wink-blue) !important;
    border-color: var(--wink-blue) !important;
}

/* Active */

.dt-paging .page-item.active .page-link {
    color: #ffffff !important;
    background-color: var(--wink-blue) !important;
    border-color: var(--wink-blue) !important;
}

/* Disabled */

.dt-paging .page-item.disabled .page-link {
    color: #999999 !important;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

/* =========================================================
   STATUS SWITCH
========================================================= */

.form-switch {
    padding-left: 2.5em;
}

.form-switch .form-check-input {
    width: 2em;
    height: 1em;
    margin-left: -2.5em;
    cursor: pointer;
    box-shadow: none !important;
}

.form-switch .form-check-input:focus {
    border-color: var(--wink-blue);
    box-shadow: 0 0 0 0.15rem rgba(0, 153, 211, 0.12) !important;
}

/* =========================================================
   ACTION BUTTONS
========================================================= */

table.dataTable tbody .btn {
    padding: 4px 7px !important;
    font-size: 12px !important;
    line-height: 1.4;
    border-radius: 4px;
}

/* Space between action buttons */

table.dataTable tbody .btn + .btn,
table.dataTable tbody form + a,
table.dataTable tbody a + form {
    margin-left: 3px;
}

/* =========================================================
   EMPTY TABLE
========================================================= */

.dataTables_empty {
    padding: 20px !important;
    text-align: center;
    color: #777;
    font-size: 13px;
}

/* =========================================================
   GENERAL FORM ELEMENTS
========================================================= */

.form-control,
.form-select {
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    border-color: #ced4da;
    border-radius: 5px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--wink-blue);
    box-shadow: 0 0 0 0.15rem rgba(0, 153, 211, 0.12);
}

/* =========================================================
   LABELS
========================================================= */

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

/* =========================================================
   ALERTS
========================================================= */

.alert {
    font-size: 13px;
    border-radius: 5px;
}

/* =========================================================
   TOOLTIP
========================================================= */

.tooltip {
    font-family: "Roboto", sans-serif;
    font-size: 12px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767.98px) {
    /* -----------------------------------------------------
       SIDEBAR
    ----------------------------------------------------- */

    #sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }

    /* Open sidebar */

    #app.sidebar-open #sidebar {
        transform: translateX(0);
    }

    /* -----------------------------------------------------
       MAIN
    ----------------------------------------------------- */

    #mainWrapper {
        width: 100%;
        margin-left: 0;
    }

    /* -----------------------------------------------------
       OVERLAY
    ----------------------------------------------------- */

    #app.sidebar-open #sidebarOverlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.35);
        z-index: 1040;
    }

    /* -----------------------------------------------------
       NAVBAR
    ----------------------------------------------------- */

    #mainWrapper .navbar {
        min-height: 65px !important;
        height: 65px !important;
    }

    /* Navbar title */

    #mainWrapper .navbar .fs-4 {
        font-size: 18px !important;
    }

    /* -----------------------------------------------------
       CONTENT
    ----------------------------------------------------- */

    #mainContent {
        padding: 15px !important;
    }

    /* -----------------------------------------------------
       BREADCRUMB
    ----------------------------------------------------- */

    .breadcrumb {
        margin-bottom: 12px;
        font-size: 12px;
    }

    /* -----------------------------------------------------
       CARD
    ----------------------------------------------------- */

    .card-header {
        padding: 10px 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 16px;
    }

    /* -----------------------------------------------------
       FILTER
    ----------------------------------------------------- */

    .filter-card .card-body {
        padding: 10px;
    }

    /* -----------------------------------------------------
       DATATABLE TOP
    ----------------------------------------------------- */

    .dt-layout-row:first-child {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px !important;
    }

    /* Buttons */

    .dt-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    /* Search */

    .dt-search {
        width: 100%;
        justify-content: flex-start;
    }

    .dt-search label {
        width: 100%;
        display: flex;
        align-items: center;
    }

    .dt-search input {
        width: 100% !important;
        flex: 1;
        margin-left: 8px !important;
    }

    /* -----------------------------------------------------
       DATATABLE BOTTOM
    ----------------------------------------------------- */

    .dt-layout-row:last-child {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 12px !important;
    }

    /* Info */

    .dt-info {
        width: 100%;
        text-align: left;
    }

    /* Pagination */

    .dt-paging {
        width: 100%;
        justify-content: flex-start;
    }

    /* -----------------------------------------------------
       TABLE
    ----------------------------------------------------- */

    table.dataTable thead th {
        font-size: 12px !important;
        padding: 8px !important;
    }

    table.dataTable tbody td {
        font-size: 12px !important;
        padding: 7px 8px !important;
    }

    /* -----------------------------------------------------
       ACTION BUTTONS
    ----------------------------------------------------- */

    table.dataTable tbody .btn {
        padding: 4px 6px !important;
        font-size: 11px !important;
    }
}
/* =========================================================
   EXTRA SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
    #mainContent {
        padding: 10px !important;
    }
    .card-header {
        padding: 9px 10px;
    }
    .card-body {
        padding: 10px;
    }

    .dt-buttons .btn {
        padding: 5px 9px !important;
        font-size: 12px !important;
    }

    .dt-search {
        flex-direction: column;
        align-items: stretch;
    }

    .dt-search label {
        display: block;
        margin-bottom: 5px;
    }

    .dt-search input {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .dt-paging .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}
