:root {
    --consid-color: #fccd59;
    --process-color: #ec718c;
    --done-color: #50af73;
    --default-color: #17a2b8;
}

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@100;300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit&family=Sarabun:wght@100;300&display=swap');

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #e8f4fc;
}

.ew-grid .ew-list-other-options {
    display: flex;
    align-items: center;
    column-gap: 10px;
}

.ew-grid .ew-add,
.ew-grid .ew-add-edit-option>.ew-btn-group,
.ew-action-option>.ew-btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ew-add-edit-option>.ew-btn-group>.btn,
.ew-action-option>.ew-btn-group>.btn {
    border-radius: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.ew-grid .ew-add,
.ew-add-edit-option>.ew-btn-group>.btn.ew-add {
    background-color: var(--primary-color);
    color: #fff;
}


.ew-grid .ew-list-option-separator {
    padding-right: 0;
}

.text-muted,
.ew-grid .ew-detail-option {
    display: none;
}

.ew-search-operator,
.ew-search-operator2 {
    display: none;
}

.d-flex {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
}

.p-1 {
    display: flex;
    flex: 50%;
    width: 50%;
    margin-bottom: 10px;
    max-height: 350px;
    max-width: 50%;
    overflow: hidden;
}

.img-thumbnail {
    padding: 0;
    border-radius: 0;
}

th[data-name="checkbox"] {
    width: 20px;
}


/* .btn-consid.disabled, */

.btn-consid,
.btn-consid:hover {
    background-color: var(--consid-color);
    color: #fff;
}

.stat-badge {
    padding: 5px;
    display: block;
    width: 30px;
    height: 10px;
    border-radius: 20px;
    margin: auto;
    background-color: var(--default-color);
}

.stat-badge.consid {
    background-color: var(--consid-color);
}

.stat-badge.process {
    background-color: var(--process-color);
}

.stat-badge.done {
    background-color: var(--done-color);
}

.btn-process,
.btn-process:hover {
    background-color: var(--process-color);
    color: #fff;
}

.btn-done,
.btn-done:hover {
    background-color: var(--done-color);
    color: #fff;
}

@media print {
    button {
        display: none !important;
    }
}


/* datepicker */

div[class^='cal'] {
    max-width: 300px;
}

.row-alert {
    background-color: #17a2b8 !important;
    color: white !important;
}

h1,
h2,
h3,
h4,
.card-title {
    font-family: 'Sarabun', sans-serif;
}


/* .ew-master-div {
    display: none;
} */

.btn-toolbar {
    justify-content: flex-end;
}

.ew-search-field input[id="x_create_year"] {
    font-weight: bold;
    border-color: var(--primary-color);
}

.ew-search-panel {
    width: 100%;
}

.ew-extended-search {
    display: flex;
    border-radius: 3px;
    padding: 0px;
    margin: auto;
    justify-content: center;
    flex-wrap: wrap;
    align-items: baseline;
}

.ew-extended-search .ew-row {
    margin-bottom: 0;
}

.ew-add-form input[dischange="true"],
.ew-add-form select[dischange="true"] {
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
    background-color: #ccc;
}

.req-status-group-btn {
    display: flex;
    justify-content: center;
}

.req-status-group-btn a {
    font-size: 10px;
    white-space: nowrap;
    margin: 3px;
}

.ew-grid .ew-table>thead>tr>th {
    white-space: nowrap;
    text-align: center;
}

.ew-grid .ew-table>tbody>tr>td,
.ew-grid .ew-table>tfoot>tr>td {
    text-align: center;
    white-space: normal;
}

.ew-grid,
.ew-form:not(.ew-list-form):not(.ew-pager-form),
table.ew-master-table.ew-vertical {
    width: 100%;
}

.report-content {
    position: relative;
    width: 100%;
    padding-bottom: 10px;
}

.remind_job_card {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.remind_job_card .card {
    flex: 0.22;
    align-items: center;
}

.remind_job_card .card-body {
    padding: 0.5em;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.remind_job_card .card-value {
    font-size: 22px;
    text-align: center;
}

.remind_job_card .card-title {
    font-size: 15px;
}

.os-theme-light>.os-scrollbar>.os-scrollbar-track {
    background-color: var(--primary-color);
}

.content-header h1 {
    font-size: 1.8rem;
    font-family: 'Sarabun', sans-serif;
}

canvas[id^='chart_'] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: auto 1200 / 500;
    margin: auto;
}

.ew-dashboard .col-sm-2,
.ew-dashboard .col-sm-4 {
    min-width: 100% !important;
    width: 100%;
}

.nav-link {
    white-space: nowrap;
}

.ew-search-div .col-sm-10>div {
    display: flex;
}

.form-inline .form-group {
    margin-bottom: 10px;
}

td[data-field="donator_name"],
td[data-field="object_id"] {
    min-width: 200px;
    max-width: 200px;
}

td[data-field="moo"],
td[data-field="request_status"] {
    min-width: 120px;
    max-width: 120px;
}


/* .ew-table-header,
td[class^='ew-rpt-grp'] span {
    white-space: nowrap;
} */

.card {
    border: 1px solid rgb(199 199 199 / 25%);
}

h1.card-title {
    font-size: 1.8rem;
}

.dashboard-img {
    max-width: 150px;
    margin: 10px;
}

.ew-grid .ew-table,
.ew-grid .ew-grid-middle-panel {
    max-width: 96vw;
    overflow-x: scroll !important;
}

#x_get_location {
    display: none;
}

#use-current-location {
    display: flex;
    justify-content: space-around;
    width: 200px;
    margin-top: 10px;
    padding: 6px 12px;
    background: #4285F4;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}

#use-current-location:hover {
    background: #3367D6;
}

[class*='sidebar-light-'] {
    background-color: #d4edff;
}

.content-wrapper {
    background-color: #e8f4fc;
}

.info-box {
    background-color: #e7e7e7;
}

.main-header {
    border-bottom-color: #ffffff;
}

td[data-name="get_location"] span span {
    display: none;
}

.status-bade-emo,
.status-bade-emo:hover {
    text-decoration: none;
    cursor: help;
}

.badge-warning,
.badge-danger {
    color: #ffffff
}

/* ===== Number Navigator ===== */
.number-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    justify-content: center;
}

.num-nav-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
}


.map-filter-control {
    background: rgba(255, 255, 255, .95);
    border-radius: 10px;
    padding: 6px;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column;
    /* 👈 เรียงบน → ล่าง */
}

.map-filter-control .btn-filter {
    background: #f1f1f1;
    border: 1px solid #a3a3a3;
    color: #333;
    padding: 6px 12px;
    margin: 0 3px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s ease;
}

.map-filter-control .btn-filter.active {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.map-filter-control .btn-filter {
    position: relative;
}

.map-filter-control .btn-filter .badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #e53935;
    color: white;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.filter-btn-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}


/* ===== Timeline Container ===== */
.number-nav {
    width: 100%;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: sans-serif;
}

/* วันที่ซ้าย / ขวา */
.timeline-date {
    font-size: 11px;
    color: #555;
    white-space: nowrap;
}

/* เส้น timeline */
.timeline-track {
    flex: 1;
    height: 4px;
    background: #1976d2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* จุดเหตุการณ์ */
.timeline-dot {
    min-width: 17px;
    height: 17px;
    background: #ffffff;
    border: 2px solid #1976d2;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot:hover {
    background: #1976d2;
}

/* เลขลำดับ */
.timeline-dot span {
    font-weight: bold;
    font-size: 10px;
    color: #1976d2;
}

.timeline-dot:hover span {
    color: #ffffff;
}

.main-footer {
    margin-top: 20px;
}