@font-face {
    font-family: 'Sarabun';
    src: url('webfont/LINESeedSansTH_W_Rg.woff2') format('woff2');
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

:root {
    --navy-950: #0d1f20;
    --navy-900: #122e30;
    --navy-800: #1a3e40;
    --navy-700: #1e4a4d;
    --navy-600: #225C5F;
    --navy-500: #2d7275;
    --navy-400: #3d9295;
    --navy-300: #6ab8ba;
    --navy-100: #c0e4e5;
    --navy-50: #eaf6f6;

    --gold-600: #6a9228;
    --gold-500: #7daf30;
    --gold-400: #91C638;
    --gold-300: #aad45e;
    --gold-100: #dff0b8;
    --gold-50: #f2fae4;

    --red-600: #c0392b;
    --red-500: #e74c3c;
    --red-100: #fdecea;
    --green-600: #1a7a3a;
    --green-500: #27ae60;
    --green-100: #e9f7ef;
    --orange-500: #e67e22;
    --orange-100: #fef3e2;

    --gray-900: #1a1d23;
    --gray-800: #2d3240;
    --gray-700: #434857;
    --gray-600: #5f6475;
    --gray-400: #9099aa;
    --gray-300: #b8bfcc;
    --gray-200: #dde2ec;
    --gray-100: #f0f3f8;
    --gray-50: #f8f9fc;
    --white: #ffffff;

    --navy-200: #b5d8d9;
    --red-700: #b71c1c;
    --red-400: #ef4444;
    --red-300: #ff8a7a;
    --red-50: #fef0f0;
    --green-300: #5ee89a;
    --green-200: #c2e1cc;
    --green-50: #e8f5e9;
    --gold-700: #3d6010;
    --gold-650: #5a8a18;
    --gold-200: #c5e87a;
    --orange-700: #a05700;
    --orange-600: #a06000;
    --orange-50: #fdf4e3;
    --amber-50: #fff8e1;
    --danger-pink: #fa709a;
    --danger-yellow: #fee140;

    /* ── ADDED FOR projects_ajax ── */
    --navy: var(--navy-800);
    --navy-mid: var(--navy-600);
    --gold-dark: var(--gold-500);
    --gold: var(--gold-400);
    --gold-light: var(--gold-300);
    --gold-pale: var(--gold-50);
    --emerald-dark: var(--green-600);
    --emerald: var(--green-500);
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --violet-light: #a78bfa;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --dark: var(--gray-800);

    /* ── PASTEL GREEN HERO PALETTE ── */
    --hero-bg-start: #e8f5e3;
    --hero-bg-mid: #d4edcc;
    --hero-bg-end: #c5e6bb;
    --hero-text: #1e5c12;
    --hero-text-sub: #2d7a1f;
    --hero-text-muted: rgba(30, 92, 18, 0.60);
    --hero-border: rgba(80, 160, 60, 0.32);
    --hero-input-bg: rgba(255, 255, 255, 0.78);
    --hero-input-focus: rgba(255, 255, 255, 0.97);
    --hero-input-border-focus: rgba(70, 150, 50, 0.65);

    --font-main: 'Sarabun', sans-serif;
    --font-mono: 'Sarabun', sans-serif;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 13px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, .08);
    --shadow: 0 2px 12px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .14);
    --header-h: 80px;
    --sidebar-w: 340px;
    --sidebar-mini-w: 84px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--font-main);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    /* dvh กันมือถือนับความสูงรวมแถบ address bar ทำให้เกิดพื้นที่ว่าง/สกรอลล์เกินท้ายหน้า */
}

a {
    color: var(--navy-600);
    text-decoration: none
}

a:hover {
    color: var(--navy-500);
    text-decoration: underline
}

button {
    font-family: inherit;
    cursor: pointer
}

input,
select {
    font-family: inherit
}

img {
    max-width: 100%
}

/* ── MODAL OVERLAY ─────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--shadow-lg);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--white);
    border-radius: 16px;
    width: min(420px, 92vw);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform .25s;
    overflow: hidden;
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

/* ── ป้องกัน CSS จาก projects_ajax.php override .modal ──
   projects_ajax inject ".modal { display:none }" เข้า DOM
   ต้องใช้ specificity สูงกว่าเพื่อ override คืน           */
.modal-overlay .modal {
    display: flex !important;
    position: static !important;
    inset: unset !important;
    background: var(--white) !important;
    z-index: unset !important;
    width: min(420px, 92vw) !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: calc(100vh - 40px) !important;
    flex-direction: column !important;
    align-items: unset !important;
    justify-content: unset !important;
}

.modal-overlay .detail-modal {
    width: min(860px, 95vw) !important;
}

.modal-overlay .auction-detail-modal {
    width: min(700px, 95vw) !important;
    max-height: calc(100vh - 40px) !important;
    overflow: hidden !important;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    background: var(--navy-600);
    color: var(--white);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
}

.modal-header .m-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.modal-header .m-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.modal-header .m-title-main {
    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 50px;
}

.modal-header .m-title-sub {
    font-size: 13px;
    opacity: .7;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-body {
    padding: 32px 24px;
    overflow-y: auto;
    flex: 1;
}

/* ป้องกัน projects_ajax inject .modal-body override */
.modal-overlay .modal-body {
    padding: 32px 24px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, .6);
    font-size: 22px;
    cursor: pointer;
    transition: color .15s;
}

.modal-close:hover {
    color: var(--white)
}

.form-group {
    margin-bottom: 20px
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--navy-200);
    border-radius: 10px;
    background: var(--navy-50);
    color: var(--gray-900);
    outline: none;
    transition: all .15s;
}

.form-control:focus {
    border-color: var(--navy-600);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(34, 92, 95, .12)
}

/* ── LOGIN INPUT WITH ICON ── */
.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--navy-400);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

.login-input-wrap .form-control {
    padding-left: 42px;
}

.login-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 15px;
    padding: 0;
    transition: color .15s;
}

.login-pw-toggle:hover {
    color: var(--navy-600);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    background: var(--gold-400);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--gold-500);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(.98)
}

/* ── HEADER ────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: linear-gradient(90deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--navy-600) 100%);
    z-index: 200;
    display: flex;
    align-items: stretch;
    border-bottom: 6px solid rgba(145, 198, 56, .45);
    box-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}

.header-brand {
    width: var(--sidebar-w);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    border-right: 1px solid rgba(255, 255, 255, .07);
    flex-shrink: 0;
    transition: width .3s cubic-bezier(0.4, 0, 0.2, 1), padding .3s, gap .3s;
    justify-content: center;
}

.header-brand .brand-text {
    display: none;
}

body.sidebar-expanded .header-brand {
    justify-content: flex-start;
    padding: 0 22px;
    gap: 14px;
}

body.sidebar-expanded .header-brand .brand-text {
    display: flex;
}

.logo-shine-wrap {
    height: 48px;
    width: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-expanded .logo-shine-wrap {
    height: 54px;
    width: 54px;
}

.brand-text {
    color: var(--white);
    line-height: 1.3;
    min-width: 0;
}

.brand-text .b-th {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text .b-en {
    font-size: 13px;
    color: var(--gold-300);
    letter-spacing: .07em;
    text-transform: uppercase;
    font-weight: 500;
    opacity: .8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 18px;
    min-width: 0;
}

.header-title-wrap {
    flex: 1;
    min-width: 0;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .05em;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, .35);
    letter-spacing: .04em;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-year {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(145, 198, 56, .15);
    border: 1px solid rgba(145, 198, 56, .35);
    color: var(--gold-300);
    padding: 6px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
}

.v-tag {
    background: rgba(145, 198, 56, .15);
    border: 1px solid rgba(145, 198, 56, .35);
    color: var(--gold-300);
    padding: 2px 10px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .04em;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(145, 198, 56, .05);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(145, 198, 56, .4);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--red-600), var(--red-700));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
    transition: all 0.3s;
}

.btn-logout:hover {
    box-shadow: 0 6px 18px rgba(211, 47, 47, 0.45);
    filter: brightness(1.1);
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(145, 198, 56, 0.35);
    transition: all 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(145, 198, 56, 0.5);
    filter: brightness(1.08);
}

.btn-system {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-system:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-logout i {
    font-size: 16px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    padding-right: 20px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 16px 4px 4px;
    border-radius: 8px;
    border: 0px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    max-width: 280px;
    transition: all 0.3s;
}

.user-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    overflow: hidden;
}

.user-name {
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── SIDEBAR ───────────────────────────────────── */
.sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    padding-bottom: 24px;
    transition: width .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
    width: 4px
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 2px
}

.sidebar-section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: all .3s;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--gray-400);
    padding: 0 0 10px;
    margin-bottom: 12px;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--gray-50);
    transition: all .3s;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    height: auto;
    width: 100%;
    margin-bottom: 4px;
    padding: 10px 16px;
    border-radius: var(--radius);
    color: var(--gray-600);
    cursor: pointer;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    background: none;
    flex-shrink: 0;
    text-align: left;
    line-height: 1.4;
     font-weight: 600;
    font-size: 12px;
}

.nav-item:hover {
    background: linear-gradient(135deg, var(--gold-200), var(--gold-50));
    font-weight: 600;
    color: var(--navy-600);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--gold-200), var(--gold-50));
    color: var(--navy-600);
    box-shadow: 0 4px 12px rgba(34, 92, 95, 0.08);
    border: 1px solid var(--gold-200);
    font-weight: 600;
}

.nav-item .nav-icon {
    font-size: 15px;
    text-align: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--navy-600);
    transition: all .25s;
    align-self: center;
}

.nav-item:hover .nav-icon {
    transform: scale(1.08);
    background: var(--navy-600);
    color: var(--white);
}

.nav-item.active .nav-icon {
    background: var(--navy-600);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(34, 92, 95, 0.3);
}

body.sidebar-collapsed .nav-item .nav-icon {
    margin-right: 0;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    color: var(--navy-600);
    box-shadow: none;
    align-self: center;
    margin-top: 0;
}

body.sidebar-collapsed .nav-item:hover .nav-icon {
    background: var(--navy-600);
    color: var(--white);
    transform: scale(1.08);
}

body.sidebar-collapsed .nav-item.active .nav-icon {
    background: var(--navy-700);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(145, 198, 56, 0.35);
}

body:not(.sidebar-collapsed) .nav-item .nav-icon {
    align-self: center;
    margin-top: 0;
}

.nav-label-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    font-size: 12px;
    transition: all .3s;
    pointer-events: all;
    text-align: left;
    gap: 4px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--gray-200);
    /* Gray background */
    color: var(--gray-700);
    /* Gray text */
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 16px;
    margin-left: auto;
    /* Push to right */
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .01em;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.nav-badge:empty {
    display: none !important;
}

/* ── COLLAPSED STATE ── */
body.sidebar-collapsed {
    --sidebar-w: var(--sidebar-mini-w);
}

body.sidebar-collapsed .sidebar-section {
    align-items: center;
    padding: 16px 8px;
}

body.sidebar-collapsed .sidebar-section-title {
    text-align: center;
    opacity: 0;
    transform: translateY(-5px);
    height: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

body.sidebar-collapsed .nav-item {
    width: 52px;
    height: 52px;
    justify-content: center;
    align-items: center;
    padding: 0;
    border-radius: 14px;
    margin-bottom: 8px;
}

body.sidebar-collapsed .nav-label-wrap {
    display: none !important;
}

.sidebar-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(18, 46, 48, 0.93);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    color: var(--white);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    transform: translateX(-8px);
}

.sidebar-tooltip.visible {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(18, 46, 48, 0.93);
    margin-right: -1px;
}

body.sidebar-collapsed .nav-badge {
    display: none !important;
}

.sidebar-stats {
    padding: 12px 16px;
    display: grid;
    gap: 8px
}

.stat-mini {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-mini .sm-val {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--navy-600);
    line-height: 1;
}

.stat-mini .sm-lbl {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.3;
    margin-top: 2px
}

.stat-mini .sm-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
}

/* ── MAIN ── */
.main {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* ป้องกัน footer (position:fixed) บังเนื้อหาส่วนล่างสุด */
.main-inner {
    padding: 24px;
    padding-bottom: 70px;
}

/* ══════════════════════════════════════════
   ── HERO SEARCH  (PASTEL GREEN THEME) ──
══════════════════════════════════════════ */
.hero-search {
    background: linear-gradient(135deg, var(--gold-50) 100%);
    border-radius: var(--radius-xl);
    padding: 22px 26px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(100, 170, 75, 0.28);
    box-shadow: 0 4px 20px rgba(80, 160, 60, 0.10);
}

.hero-search::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(100, 180, 70, .15), transparent 70%);
    pointer-events: none;
}

.hero-search::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--hero-text);
    margin-bottom: 4px;
    position: relative;
}

.hero-title2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
    margin-bottom: 4px;
    position: relative;
}

.hero-sub {
    font-size: 13px;
    color: var(--hero-text-muted);
    margin-bottom: 22px;
    position: relative;
}

.search-bar {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.search-input-wrap {
    flex: 2;
    min-width: 250px;
    position: relative;
}

.search-input-wrap .s-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hero-text-muted);
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 42px;
    font-size: 14px;
    background: var(--hero-input-bg);
    border: 1.5px solid var(--hero-border);
    border-radius: var(--radius);
    color: var(--hero-text);
    outline: none;
    transition: border-color .15s, background .15s;
}

.search-input::placeholder {
    color: var(--hero-text-muted);
}

.search-input:focus {
    background: var(--hero-input-focus);
    border-color: var(--hero-input-border-focus);
    box-shadow: 0 0 0 3px rgba(80, 160, 60, 0.12);
}

.btn-clear-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(80, 160, 60, 0.15);
    border: none;
    color: var(--hero-text-sub);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
    padding: 0;
}

.btn-clear-input:hover {
    background: rgba(80, 160, 60, 0.28);
    color: var(--hero-text);
}

.btn-clear-input.visible {
    display: flex;
}

.search-select {
    padding: 12px 14px;
    font-size: 13px;
    background: var(--hero-input-bg);
    border: 1.5px solid var(--hero-border);
    border-radius: var(--radius);
    color: var(--hero-text);
    outline: none;
    min-width: 160px;
    transition: border-color .15s;
}

.search-select option {
    background: #e8f5e3;
    color: var(--hero-text);
}

.search-select:focus {
    border-color: var(--hero-input-border-focus);
}

.btn-search {
    padding: 12px 24px;
    background: var(--gold-400);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .03em;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--gold-300);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(145, 198, 56, .4)
}

.btn-search:active {
    transform: translateY(0)
}

.search-tags {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1
}

.search-tag {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(80, 160, 60, 0.30);
    color: var(--hero-text);
    border-radius: 16px;
    padding: 3px 13px;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}

.search-tag:hover {
    background: rgba(80, 160, 60, 0.18);
    color: var(--hero-text);
    border-color: rgba(80, 160, 60, 0.55);
}

/* ── Select2 overrides inside hero ── */
.hero-search .select2-container {
    flex: 1;
    min-width: 160px
}

.hero-search .select2-container--default .select2-selection--single {
    background: var(--hero-input-bg);
    border: 1.5px solid var(--hero-border);
    padding: 11px 14px;
}

.hero-search .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--hero-text);
}

.hero-search .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--hero-text-sub) transparent transparent transparent;
}

.hero-search .select2-container--default.select2-container--focus .select2-selection--single {
    background: var(--hero-input-focus);
    border-color: var(--hero-input-border-focus);
    box-shadow: 0 0 0 3px rgba(80, 160, 60, 0.12);
}

/* ── STAT CARDS ── */
.stat-cards-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s, border-color .2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transition: opacity .2s;
    opacity: 0;
}

.stat-card.all::after {
    background: var(--navy-600);
}

.stat-card.plan::after {
    background: var(--green-500);
}

.stat-card.invite::after {
    background: var(--gold-400);
}

.stat-card.cancel::after {
    background: var(--red-500);
}

.stat-card.change::after {
    background: var(--orange-500);
}

.stat-card:hover,
.stat-card.active {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.stat-card:hover::after,
.stat-card.active::after {
    opacity: 1;
}

.stat-card.active {
    border-color: var(--gray-300);
}

.stat-card.all .stat-card-icon {
    background: var(--navy-50);
}

.stat-card.plan .stat-card-icon {
    background: var(--green-50);
}

.stat-card.invite .stat-card-icon {
    background: var(--gold-50);
}

.stat-card.cancel .stat-card-icon {
    background: var(--red-100);
}

.stat-card.change .stat-card-icon {
    background: var(--amber-50);
}

.stat-card-body {
    flex: 1;
    min-width: 0;
}

.stat-card-label {
    font-size: 12.5px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    font-family: var(--font-mono);
    letter-spacing: -.01em;
}

.stat-card.all .stat-card-value {
    color: var(--navy-600);
}

.stat-card.plan .stat-card-value {
    color: var(--green-500);
}

.stat-card.invite .stat-card-value {
    color: var(--gold-500);
}

.stat-card.cancel .stat-card-value {
    color: var(--red-500);
}

.stat-card.change .stat-card-value {
    color: var(--orange-500);
}

.stat-card-sub {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card-value.loaded {
    animation: countUp .4s ease forwards;
}

@media(max-width:1100px) {
    .stat-cards-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:700px) {
    .stat-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:400px) {
    .stat-cards-row {
        grid-template-columns: 1fr;
    }
}

/* ── FILTER BAR ── */
.filter-bar {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 20px;
    display: flex;
    gap: 24px;
    align-items: flex-end;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-group label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.filter-date {
    padding: 7px 13px 7px 34px;
    font-size: 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-800);
    background: var(--white);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    min-width: 130px;
    cursor: pointer;
}

.filter-sep {
    color: var(--gray-300);
    font-size: 13px;
    align-self: center;
    margin-top: 20px;
}

/* ── FLATPICKR ── */
.flatpickr-calendar {
    font-family: var(--font-main);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.flatpickr-months {
    background: var(--navy-600);
    padding: 8px 0;
}

.flatpickr-months .flatpickr-month {
    background: transparent;
}

.flatpickr-current-month {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--navy-600);
    color: var(--white);
    border: none;
    font-weight: 600;
    font-size: 14px;
}

.flatpickr-current-month input.cur-year {
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--gold-300);
    fill: var(--gold-300);
    padding: 8px 12px;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    fill: var(--white);
    border-radius: 6px;
}

.flatpickr-weekdays {
    background: var(--navy-800);
}

span.flatpickr-weekday {
    color: var(--gold-300);
    font-weight: 600;
    font-size: 13px;
}

.flatpickr-day {
    border-radius: var(--radius);
    color: var(--gray-800);
    font-size: 13px;
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    background: var(--navy-50);
    border-color: var(--navy-100);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--navy-600);
    border-color: var(--navy-600);
    color: var(--white);
    font-weight: 600;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: var(--gold-400);
    border-color: var(--gold-400);
}

.flatpickr-day.today {
    border-color: var(--gold-400);
    color: var(--gold-600);
    font-weight: 700;
}

.flatpickr-day.today:hover {
    background: var(--gold-50);
    border-color: var(--gold-400);
    color: var(--navy-600);
}

.flatpickr-day.today.selected {
    background: var(--navy-600);
    border-color: var(--navy-600);
    color: var(--white);
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: var(--gray-300);
}

.btn-filter {
    padding: 7px 18px;
    background: var(--navy-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    transition: background .15s;
}

.btn-filter:hover {
    background: var(--navy-500)
}

.btn-clear {
    padding: 7px 14px;
    background: none;
    color: var(--gray-500);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13px;
    transition: all .15s;
}

.btn-clear:hover {
    color: var(--red-600);
    border-color: var(--red-500)
}

.result-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.result-count strong {
    color: var(--navy-600);
    font-size: 15px
}

/* ── TABLE ── */
.table-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
}

.table-header-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900)
}

.table-header-sub {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 1px
}

.sort-btns {
    margin-left: auto;
    display: flex;
    gap: 4px
}

.sort-btn {
    padding: 5px 13px;
    font-size: 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: 16px;
    background: none;
    color: var(--gray-500);
    transition: all .15s;
}

.sort-btn.active {
    background: var(--navy-50);
    border-color: var(--navy-300);
    color: var(--navy-600);
    font-weight: 600
}

.sort-btn:hover {
    border-color: var(--navy-300);
    color: var(--navy-600)
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

table.data-table thead th {
    background: var(--gray-50);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gray-500);
    padding: 10px 10px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table.data-table thead th.sort {
    cursor: pointer;
    user-select: none
}

table.data-table thead th.sort:hover {
    color: var(--navy-600)
}

table.data-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background .12s
}

table.data-table tbody tr:hover {
    background: var(--navy-50)
}

table.data-table tbody tr:last-child {
    border-bottom: none
}

table.data-table td {
    padding: 10px 10px;
    font-size: 13px;
    vertical-align: top;
}

.td-num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-400);
    text-align: right
}

.td-project {
    overflow: hidden;
}

.td-project .proj-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-600);
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.td-project .proj-dept {
    font-size: 13px;
    color: var(--gray-500);
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.4;
    margin-top: 2px;
}

.td-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-600);
    white-space: nowrap
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    letter-spacing: .01em;
    line-height: 1.4;
}

.badge-plan {
    background: var(--orange-100);
    color: var(--orange-700)
}

.badge-invite {
    background: var(--navy-50);
    color: var(--navy-600)
}

.badge-winner {
    background: var(--green-100);
    color: var(--green-600)
}

.badge-cancel {
    background: var(--red-50);
    color: var(--red-600)
}

.badge-change {
    background: var(--orange-50);
    color: var(--orange-600)
}

.badge-other {
    background: var(--gray-100);
    color: var(--gray-600)
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px 5px 10px;
    background: linear-gradient(135deg, var(--navy-600) 0%, var(--navy-400) 100%);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(34, 92, 95, .3);
    transition: box-shadow .2s, transform .15s;
    letter-spacing: .02em;
    white-space: nowrap;
}

.btn-detail:hover {
    box-shadow: 0 4px 14px rgba(34, 92, 95, .45);
    transform: translateY(-1px);
}

.btn-detail:active {
    transform: scale(.97);
}

/* ── PAGINATION ── */
.pagination {
    padding: 14px 20px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
}

.page-info {
    font-size: 13px;
    color: var(--gray-500);
    font-family: var(--font-mono)
}

.page-btns {
    display: flex;
    gap: 4px
}

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1.5px solid var(--gray-200);
    background: none;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--navy-300);
    color: var(--navy-600);
    background: var(--navy-50)
}

.page-btn.active {
    background: var(--navy-600);
    border-color: var(--navy-600);
    color: var(--white);
    font-weight: 600
}

.page-btn:disabled {
    opacity: .35;
    cursor: not-allowed
}

/* ── LOADING ── */
.loading-overlay {
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--navy-600);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-400);
}

.empty-state .es-icon {
    font-size: 40px;
    margin-bottom: 13px;
    opacity: .5
}

.empty-state .es-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 6px
}

.empty-state .es-sub {
    font-size: 13px
}

/* ── DETAIL MODAL ── */
.detail-modal {
    width: min(840px, 94vw);
    background: var(--gray-50);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

.detail-modal .modal-body {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 12px;
    align-content: start;
    background: var(--gray-50);
    overflow-y: auto;
    flex: 1;
}

.detail-section {
    padding: 18px 22px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    height: fit-content;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--navy-300);
}

.detail-section.color-2::before {
    background: var(--gold-400);
}

.detail-section.color-3::before {
    background: var(--green-500);
}

.detail-section.color-4::before {
    background: var(--navy-600);
}

.detail-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy-800);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-50);
    padding-bottom: 8px;
}

.detail-section-title i {
    color: var(--navy-500);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.color-2 .detail-section-title i {
    color: var(--gold-400);
}

.color-3 .detail-section-title i {
    color: var(--green-500);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-field .df-lbl {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--gray-500);
}

.detail-field .df-val {
    font-size: 14px;
    color: var(--navy-950);
    font-weight: 700;
    line-height: 1.5;
}

.detail-field.full {
    grid-column: 1/-1;
}

.detail-field.full .df-val {
    font-size: 15px;
    color: var(--navy-800);
}

.detail-field .df-val.money {
    font-family: var(--font-mono);
    color: var(--navy-600);
    font-size: 18px;
    font-weight: 800;
}

.detail-field .df-val.winner-money {
    font-family: var(--font-mono);
    color: var(--green-600);
    font-size: 20px;
    font-weight: 800;
}

.detail-field .df-val.diff-percent {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--green-700);
    background: var(--green-100);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    border: 1px solid var(--green-200);
}

.timeline-table-wrap {
    overflow-x: auto;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.timeline-table {
    min-width: 500px;
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: var(--white);
}

.timeline-table thead th {
    background: var(--navy-50);
    color: var(--navy-800);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--navy-100);
}

.timeline-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
    vertical-align: middle;
}

.timeline-table tbody tr:last-child td {
    border-bottom: none;
}

.timeline-table tbody tr.current {
    background: var(--gold-50);
}

/* ── TOAST ── */
.toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.toast {
    background: var(--navy-800);
    color: var(--white);
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: slideUp .25s ease;
    max-width: 320px;
}

.toast.success {
    border-left: 4px solid var(--gold-400)
}

.toast.error {
    border-left: 4px solid var(--red-500)
}

@keyframes slideUp {
    from {
        transform: translateY(16px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.shine-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 80%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: shineSweep 20s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shineSweep {
    0% {
        background-position: 110% 0;
    }

    10% {
        background-position: -10% 0;
    }

    20% {
        background-position: 110% 0;
    }

    100% {
        background-position: 110% 0;
    }
}

/* ── RESPONSIVE ── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 20, .65);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.sidebar-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.btn-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    margin-right: 12px;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: background .15s;
}

.btn-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media(min-width: 901px) {
    .sidebar {
        transition: width .3s, transform .25s;
    }

    .main {
        transition: margin-left .3s;
    }

    .header-brand {
        transition: width .3s, padding .3s, gap .3s;
    }

    body.sidebar-collapsed .header-brand .brand-text {
        display: none;
    }

    .header-brand {
        width: var(--sidebar-w);
        justify-content: flex-start;
        padding: 0 22px;
    }

    .header-brand .brand-text {
        display: flex;
        opacity: 1;
    }

    .logo-shine-wrap {
        height: 54px;
        width: 54px;
    }
}

body.sidebar-collapsed .header-brand {
    width: var(--sidebar-mini-w);
    padding: 0 8px;
    justify-content: center;
    gap: 0;
    overflow: hidden;
}

#table-area {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media(max-width:1150px) {
    .header-title {
        font-size: 17px;
    }

    .header-subtitle {
        font-size: 13px;
    }
}

@media(max-width:900px) {
    :root {
        --sidebar-w: 0px
    }

    .sidebar {
        transform: translateX(-340px);
        width: 340px;
        transition: transform .25s;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg)
    }

    .sidebar-section {
        align-items: stretch;
        padding: 20px 16px;
    }

    .sidebar-section-title {
        text-align: left;
        padding: 0 0 8px 4px;
    }

    .nav-item {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
        min-height: 48px;
        height: auto;
    }

    .nav-item .nav-icon {
        margin-right: 12px;
        font-size: 18px;
        width: 20px;
    }

    .nav-label-wrap {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: none;
        border: none;
        padding: 0;
        box-shadow: none;
        color: var(--gray-700);
        pointer-events: all;
        backdrop-filter: none;
        width: 100%;
    }

    .nav-item:hover .nav-label-wrap {
        color: var(--navy-600);
    }

    .nav-label-wrap::after {
        display: none;
    }

    .nav-badge {
        margin-left: auto;
        background: var(--navy-600);
        color: var(--white);
        box-shadow: none;
    }

    .header-brand {
        width: auto;
        max-width: none;
        border-right: none;
        padding: 0 16px;
        flex: 1;
        justify-content: flex-start;
    }

    .logo-shine-wrap {
        height: 44px;
        width: 44px;
    }

    .header-brand .brand-text {
        display: flex;
    }

    .btn-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
    }

    .header-brand .brand-text .b-th {
        font-size: 17px !important;
    }

    .header-brand .brand-text .b-en {
        display: none !important;
    }

    .header-main {
        display: none;
    }

    .main {
        margin-left: 0;
        padding: 16px;
        margin-top: var(--header-h);
    }

    .header-actions {
        padding: 0 16px;
    }

    .btn-login span:nth-child(2) {
        display: none;
    }

    .btn-login {
        padding: 9px 12px;
    }

    .user-pill {
        padding: 6px 10px;
    }

    .user-pill>div:nth-child(2) {
        display: none;
    }

    .btn-logout {
        padding: 9px 12px;
        font-size: 0;
        line-height: 0;
    }

    .btn-logout::before {
        content: '\f2f5';
        font-family: 'Font Awesome 6 Pro';
        font-weight: 900;
        font-size: 14px;
    }
}

@media(max-width:850px) {
    .filter-bar {
        gap: 16px;
        align-items: stretch;
    }

    .filter-group,
    .filter-actions {
        flex: 1;
        min-width: 200px;
    }

    .result-count {
        width: 100%;
        text-align: center;
        margin: 0;
        padding-top: 10px;
        border-top: 1px solid var(--gray-100);
    }
}

@media(max-width:600px) {
    .filter-bar {
        padding: 16px;
    }

    .filter-group,
    .filter-actions {
        min-width: 100%;
    }

    .hero-search {
        padding: 24px 20px
    }

    .search-bar {
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-header .sort-btns {
        align-self: stretch;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    table.data-table {
        min-width: 750px;
    }

    .pagination {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

/* ── SELECT2 (global) ── */
.select2-container--default .select2-selection--single {
    height: auto;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 8px 12px;
    background: var(--white);
    transition: all .15s;
    outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--gray-800);
    font-size: 14px;
    padding: 0;
    line-height: 1.5;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--navy-600);
    box-shadow: 0 0 0 3px rgba(34, 92, 95, .15);
}

.filter-bar .select2-container {
    width: 280px !important;
}

.filter-bar .select2-container--default .select2-selection--single {
    padding: 6px 12px;
    border-color: var(--gray-200);
    font-size: 13.5px;
    background: var(--gray-50);
}

.filter-bar .select2-container--default .select2-selection--single:hover {
    background: var(--white);
    border-color: var(--navy-300);
}

.select2-dropdown {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 2001;
}

.select2-search__field {
    padding: 8px 12px !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-sm) !important;
    outline: none !important;
}

.select2-results__option {
    padding: 8px 12px;
    font-size: 14px;
}

.select2-results__option--highlighted[aria-selected] {
    background: var(--navy-600) !important;
    color: var(--white) !important;
}

.select2-results__option[aria-selected=true] {
    background: var(--navy-50);
    color: var(--navy-700);
    font-weight: 600;
}

.card2 {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background: rgba(145, 198, 56, 0.07);
    background-clip: border-box;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(34, 92, 95, 0.22);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card2:hover {
    background-color: rgba(145, 198, 56, 0.15);
    border: 1px solid rgba(34, 92, 95, 0.35);
    transform: translateY(-2px);
}

.card2 .card-body {
    padding: 1.5rem;
}

.textc {
    text-align: center;
}

.user-avatar-wrapper {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.modern-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.modern-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.modern-btn:hover::before {
    transform: translateX(100%);
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.modern-btn:active {
    transform: translateY(-1px);
}

.modern-btn-primary {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
}

.modern-btn-danger {
    background: linear-gradient(135deg, var(--danger-pink) 0%, var(--danger-yellow) 100%);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.modern-btn:hover .btn-shine {
    left: 100%;
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-bottom: 12px;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--navy-600);
    text-align: center;
    white-space: nowrap;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .form-control {
    margin: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    flex: 1;
}

.btn-99 {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: var(--navy-600);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-99:hover {
    background: var(--gold-400);
    box-shadow: 0px 6px 15px rgba(145, 198, 56, 0.3);
}

.clock-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--hero-bg-start);
    border: 0px solid var(--gold-700);
    border-radius: 12px;
    padding: 6px 14px 6px 10px;
}

.clock-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 50px;
    background: var(--green-500);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-time {
    font-size: 17px;
    font-weight: 700;
    color: var(--green-600);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.clock-date {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-600);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-400);
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.75);
    }
}

#pagination-top {
    margin-left: auto;
    display: flex;
    align-items: center;
}

#pagination-top .page-btns {
    display: flex;
    gap: 4px;
}

#pagination-top .page-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    font-size: 13px;
}

.sidebar-scroll-inner {
    height: 100%;
    overflow-y: auto;
    overflow-x: visible;
    padding-bottom: 0;
}

.sidebar-scroll-inner::-webkit-scrollbar {
    width: 4px
}

.sidebar-scroll-inner::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 2px
}

.sidebar-toggle-bar {
    position: sticky;
    bottom: 0px;
    left: 0;
    right: 0;
    height: 44px;
    background: var(--hero-bg-start);
    border-top: 1px solid var(--hero-bg-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    transition: background .15s, color .15s;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-toggle-bar:hover {
    background: var(--navy-50);
    color: var(--navy-600);
}

.sidebar-toggle-label {
    font-size: 13px;
    transition: all .3s;
    white-space: nowrap;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar-toggle-label {
    display: none;
}

body.sidebar-collapsed .sidebar-toggle-bar {
    justify-content: center;
}

/* ── AUCTION DETAIL MODAL ── */
.auction-detail-modal {
    width: min(860px, 95vw);
}

.auc-hero {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-600) 100%);
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.auc-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(145, 198, 56, .15), transparent 70%);
    pointer-events: none;
}

.auc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
}

.auc-badge-active {
    background: rgba(39, 174, 96, .2);
    color: var(--green-300);
    border: 1px solid rgba(39, 174, 96, .3);
}

.auc-badge-done {
    background: rgba(145, 198, 56, .2);
    color: var(--gold-200);
    border: 1px solid rgba(145, 198, 56, .3);
}

.auc-badge-cancelled {
    background: rgba(231, 76, 60, .2);
    color: var(--red-300);
    border: 1px solid rgba(231, 76, 60, .3);
}

.auc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.45;
    margin: 10px 0 6px;
}

.auc-dept {
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.auc-body {
    padding: 20px 24px;
    background: var(--gray-50);
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auc-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 18px 22px;
    position: relative;
    overflow: hidden;
}

.auc-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.auc-section.s-info::before {
    background: var(--navy-400);
}

.auc-section.s-reg::before {
    background: var(--gold-400);
}

.auc-section.s-auction::before {
    background: var(--green-500);
}

.auc-section.s-attach::before {
    background: var(--navy-300);
}

.auc-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--gray-500);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
}

.auc-section-title i {
    font-size: 15px;
}

.s-info .auc-section-title i {
    color: var(--navy-400);
}

.s-reg .auc-section-title i {
    color: var(--gold-400);
}

.s-auction .auc-section-title i {
    color: var(--green-500);
}

.s-attach .auc-section-title i {
    color: var(--navy-300);
}

.auc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
}

.auc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auc-field.full {
    grid-column: 1/-1;
}

.auc-field .af-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gray-400);
}

.auc-field .af-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-800);
    line-height: 1.5;
}

.auc-field .af-val.muted {
    color: var(--gray-400);
    font-style: italic;
    font-weight: 400;
}

.auc-dt-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
}

.auc-dt-card .adc-label {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.auc-dt-card .adc-date {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-700);
}

.auc-dt-card .adc-time {
    font-size: 13px;
    color: var(--navy-600);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.auc-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy-600), var(--navy-400));
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    box-shadow: 0 3px 12px rgba(34, 92, 95, .25);
}

.auc-attach-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(34, 92, 95, .4);
    color: var(--white);
    text-decoration: none;
}

.auc-attach-btn i {
    font-size: 18px;
}

.auc-no-attach {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px dashed var(--gray-200);
    border-radius: 8px;
    color: var(--gray-400);
    font-size: 13px;
}

@media(max-width:600px) {
    .auc-grid {
        grid-template-columns: 1fr;
    }
}

/* ── TODAY ALERT BANNER ── */
.today-alert-bar {
    margin: 0 12px 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--gold-50) 0%, var(--gold-100) 100%);
    border: 1px solid var(--gold-400);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.today-alert-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gold-400);
    border-radius: 10px 0 0 10px;
}

.today-alert-bar:hover {
    background: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-200) 100%);
    border-color: var(--gold-500);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(145, 198, 56, .25);
}

.today-alert-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: var(--gold-400);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--white);
}

.today-alert-text {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.today-alert-text .ta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-700);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.today-alert-text .ta-count {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold-650);
    line-height: 1.1;
}

.today-alert-text .ta-sub {
    font-size: 12px;
    color: var(--gold-600);
}

.today-alert-badge {
    background: var(--red-400);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 16px;
    white-space: nowrap;
    animation: badgePulse 2s infinite;
    flex-shrink: 0;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .4);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
}

body.sidebar-collapsed .today-alert-bar {
    margin: 0 8px 12px;
    padding: 10px 6px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

body.sidebar-collapsed .today-alert-text {
    display: none;
}

body.sidebar-collapsed .today-alert-badge {
    font-size: 10px;
    padding: 1px 5px;
}

/* ── TODAY ROW HIGHLIGHT ── */
table.data-table tbody tr.row-today {
    background: var(--gold-50) !important;
    position: relative;
}

table.data-table tbody tr.row-today:hover {
    background: var(--gold-100) !important;
}

table.data-table tbody tr.row-today td:first-child {
    border-left: 3px solid var(--gold-400);
}

.today-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--gold-400);
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* ── NAV TODAY BADGE ── */
.nav-today-badge {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    background: var(--green-500);
    color: var(--white);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 16px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .01em;
    animation: navBadgePulse 2.5s infinite;
    line-height: 1.4;
}

/* หากมี nav-today-badge สีเขียวอยู่ก่อนหน้า ให้ยกเลิก margin-left: auto ของสีเทา เพื่อให้ติดกันด้านขวา */
.nav-today-badge+.nav-badge {
    margin-left: 0;
}

.nav-today-badge i {
    font-size: 8px;
    opacity: .85;
}

@keyframes navBadgePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .5);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

body.sidebar-collapsed .nav-today-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
    gap: 0;
    animation: navBadgePulse 2.5s infinite;
}

.nav-item {
    position: relative;
}

/* ── TODAY PILL ── */
.today-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--gold-50);
    color: var(--gold-650);
    border: 1px solid var(--gold-400);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 16px;
    margin-top: 3px;
    letter-spacing: .02em;
}

/* ── DATE PICK WRAP ── */
.date-pick-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.date-pick-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

/* ── Footer ─────────────────────────────────────────────── */
/* ── Footer ─────────────────────────────────────────────── */
/* ── Footer ─────────────────────────────────────────────── */
.site-footer-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 99;
    padding: 12px 24px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    text-align: center;
    font-size: 13px;
    color: #999;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-divider {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: var(--gray-300);
    vertical-align: middle;
}

.footer-copy strong {
    color: var(--navy-700);
    font-weight: 600;
}

/* ── SweetAlert2 DDC Theme ── */
.swal-ddc-popup {
    border-radius: 16px !important;
    padding: 28px !important;
    box-shadow: 0 8px 32px rgba(18, 46, 48, 0.18) !important;
}

.swal-ddc-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #122e30 !important;
}

.swal-ddc-text {
    font-size: 14px !important;
    color: #5a6e6f !important;
}

.swal-ddc-icon {
    border-color: #1a3e40 !important;
    color: #1a3e40 !important;
}

.swal-ddc-confirm {
    background: #c0392b !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    box-shadow: none !important;
}

.swal-ddc-confirm:hover {
    background: #a93226 !important;
}

.swal-ddc-cancel {
    background: #f0f4f4 !important;
    color: #1a3e40 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    box-shadow: none !important;
}

.swal-ddc-cancel:hover {
    background: #dde8e8 !important;
    color: #122e30 !important;
}

/* ══════════════════════════════════════════════════
   PRINT STYLES — วางต่อท้าย style.css หรือเพิ่มใน <style> ใน index.php
   ══════════════════════════════════════════════════ */

@media print {

    /* ── 1. รีเซ็ต layout ── */
    *,
    *::before,
    *::after {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        font-size: 10pt !important;
        font-family: 'Sarabun', 'TH Sarabun New', sans-serif !important;
        width: 100% !important;
    }

    /* ── 2. ซ่อนส่วนที่ไม่ต้องพิมพ์ ── */
    .site-header,
    .sidebar,
    .sidebar-overlay,
    .sidebar-toggle-bar,
    .hero-search,
    .stat-cards-row,
    .filter-bar,
    .table-header .sort-btns,
    .table-header .clock-wrap,
    #pagination,
    #pagination-top,
    .btn-detail,
    .btn-login,
    .btn-logout,
    .toast-wrap,
    .modal-overlay,
    #toasts,
    .site-footer-bar,
    .search-tags,
    .filter-actions,
    .result-count,
    button,
    .nav-item,
    .nav-badge,
    .nav-today-badge {
        display: none !important;
    }

    /* ── 3. Main: เต็มหน้า ไม่มี margin จาก sidebar ── */
    .main {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ── 4. Table card: เต็มหน้า ไม่มีเงา ── */
    .table-card {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        page-break-inside: auto;
    }

    /* ── 5. Table header: แสดงแค่ชื่อหัวเรื่อง ── */
    .table-header {
        display: block !important;
        padding: 0 0 8pt 0 !important;
        border-bottom: 1.5pt solid #1a3e40 !important;
        margin-bottom: 8pt !important;
        background: transparent !important;
    }

    .table-header-title {
        color: #1a3e40 !important;
        font-size: 14pt !important;
        font-weight: 700 !important;
    }

    .table-header-sub {
        color: #555 !important;
        font-size: 9pt !important;
    }

    /* ── 6. print-meta: แสดงใต้ชื่อ ── */
    #print-meta {
        display: flex !important;
        justify-content: space-between !important;
        font-size: 8pt !important;
        color: #666 !important;
        margin-bottom: 6pt !important;
    }

    /* ── 7. ตาราง ── */
    #table-area {
        display: block !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 8pt !important;
        table-layout: fixed !important;
        page-break-inside: auto !important;
    }

    .data-table thead {
        display: table-header-group !important;
        /* ทำซ้ำหัวตารางในทุกหน้า */
    }

    .data-table tfoot {
        display: table-footer-group !important;
    }

    .data-table tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }

    .data-table th {
        background: #1a3e40 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding: 5pt 4pt !important;
        font-size: 8pt !important;
        font-weight: 700 !important;
        border: 0.5pt solid #ccc !important;
        text-align: left !important;
        vertical-align: middle !important;
    }

    .data-table td {
        padding: 4pt 4pt !important;
        border: 0.5pt solid #ddd !important;
        vertical-align: top !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        color: #111 !important;
        font-size: 8pt !important;
        line-height: 1.4 !important;
    }

    .data-table tbody tr:nth-child(even) {
        background: #f7f9fa !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ── 8. Badge พิมพ์ออกมาสวย ── */
    .type-badge {
        font-size: 7pt !important;
        padding: 2pt 4pt !important;
        border-radius: 3pt !important;
        display: inline-block !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .badge-winner {
        background: #e4f7ee !important;
        color: #1a7a3a !important;
    }

    .badge-invite {
        background: #e3f0fc !important;
        color: #1b4080 !important;
    }

    .badge-plan {
        background: #fdf3c8 !important;
        color: #7a5800 !important;
    }

    .badge-cancel {
        background: #fdecea !important;
        color: #c0392b !important;
    }

    .badge-change {
        background: #fff3e0 !important;
        color: #e65100 !important;
    }

    /* ── 9. proj-name / proj-dept ── */
    .proj-name {
        font-size: 8pt !important;
        font-weight: 600 !important;
        color: #1a3e40 !important;
        line-height: 1.4 !important;
    }

    .proj-dept {
        font-size: 7pt !important;
        color: #444 !important;
    }

    /* ── 10. footer พิมพ์ ── */
    #print-footer {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        text-align: center !important;
        font-size: 7.5pt !important;
        color: #666 !important;
        border-top: 0.5pt solid #ccc !important;
        padding: 4pt 0 !important;
        background: #fff !important;
    }

    /* ── 11. Page size และ margin ── */
    @page {
        size: A4 landscape;
        margin: 12mm 10mm 18mm 10mm;
    }

    /* ── 12. loading overlay ซ่อน ── */
    .loading-overlay,
    .spinner {
        display: none !important;
    }

    /* ── 13. ป้องกัน overflow ของ td ── */
    td,
    th {
        max-width: 200pt !important;
        overflow: hidden !important;
    }
}

/* ── MIGRATED FROM projects_ajax.php ── */
.swal-th-popup,
.swal-th-title,
.swal2-html-container,
.swal2-confirm {
    font-family: 'Sarabun', sans-serif !important;
}

.topnav {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(18, 46, 48, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, .2);
}

.topnav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    height: 56px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 24px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-ico {
    width: 250px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
}

.brand-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-sub {
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
}

.nav-items {
    display: flex;
    align-items: stretch;
    flex: 1;
    gap: 2px;
}

.nav-item i {
    font-size: 14px;
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 7px 13px;
    border-radius: 99px;
    transition: .25s;
}

.nav-search:focus-within {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .3);
}

.nav-search input {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Sarabun', sans-serif;
    font-size: 13px;
    color: #fff;
    width: 180px;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, .45);
}

.nav-search i {
    color: rgba(255, 255, 255, .5);
    font-size: 13px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

.mobile-nav {
    display: none;
    background: var(--navy-mid);
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav .nav-item {
    display: flex;
    height: auto;
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    border-left: 3px solid transparent;
}

.mobile-nav .nav-item.active {
    border-left-color: var(--gold);
    background: rgba(255, 255, 255, .06);
}

.page {
    width: 100%;
}

.section {
    display: none;
    animation: fadeIn .3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.hero {
    background: linear-gradient(130deg, var(--navy-800) 0%, var(--navy-600) 55%, var(--navy-400) 100%);
    border-radius: var(--radius-lg);
    padding: 22px 28px;
    color: var(--white);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.hero::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
}

.hero-left h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.hero-left p {
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-ico.navy {
    background: rgba(15, 37, 87, .08);
    color: var(--navy);
}

.stat-ico.gold {
    background: rgba(212, 175, 55, .12);
    color: var(--gold-dark);
}

.stat-ico.green {
    background: rgba(16, 185, 129, .1);
    color: var(--emerald);
}

.stat-ico.sky {
    background: rgba(59, 127, 221, .1);
    color: var(--blue);
}

.stat-ico.violet {
    background: rgba(124, 58, 237, .1);
    color: var(--violet);
}

.stat-label {
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}

.stat-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
}

.stat-note {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 1px;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-head-ico {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.card-head-ico.navy {
    background: linear-gradient(135deg, var(--navy), var(--blue));
}

.card-head-ico.gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
}

.card-head-ico.green {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
}

.card-head-ico.rose {
    background: linear-gradient(135deg, var(--rose), #fb7185);
}

.card-head-ico.violet {
    background: linear-gradient(135deg, var(--violet), var(--violet-light));
}

.card-head-ico.amber {
    background: linear-gradient(135deg, var(--amber), var(--gold));
}

.filter-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    background: rgba(59, 127, 221, .08);
    border: 1px solid rgba(59, 127, 221, .2);
    font-size: 13px;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 12px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.form-ctrl {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Sarabun', sans-serif;
    background: #fff;
    color: var(--dark);
    transition: .25s;
}

.form-ctrl:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .1);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--gray-400);
    font-family: 'Sarabun', sans-serif;
    font-size: 13px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--gold-dark) transparent;
    border-width: 0 4px 5px 4px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .12);
    outline: none;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    color: var(--gray-400);
    font-size: 16px;
    font-weight: 400;
    line-height: 38px;
    transition: color .15s;
    position: absolute;
    right: 28px;
    top: 0;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: var(--rose);
}

.select2-container--default .select2-search--dropdown {
    padding: 8px 10px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 13px;
    padding: 6px 10px;
    outline: none;
    transition: border-color .2s;
    width: 100%;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, .1);
}

.select2-results__options {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

.select2-results__option:not(:last-child) {
    border-bottom: 1px solid var(--gray-100);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--gold);
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background: var(--gold-pale);
    color: var(--gold-dark);
    font-weight: 600;
}

.select2-container--default .select2-results__option--highlighted[aria-selected=true] {
    background: var(--gold);
    color: #fff;
}

.select2-results__message,
.select2-container--default .select2-results__option[aria-disabled=true] {
    color: var(--gray-400);
    font-size: 13px;
    padding: 10px 14px;
}

.select2-results__options::-webkit-scrollbar {
    width: 5px;
}

.select2-results__options::-webkit-scrollbar-track {
    background: var(--gray-50);
}

.select2-results__options::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 99px;
}

.select2-results__options::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.input-clearable {
    position: relative;
}

.input-clearable .form-ctrl {
    padding-right: 34px;
}

.input-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: none;
    transition: color .15s;
}

.input-clear-btn:hover {
    color: var(--rose);
}

.input-clear-btn.visible {
    display: block;
}

.month-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.month-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    align-items: center;
}

.m-btn {
    position: relative;
    padding: 6px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 99px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
    color: var(--gray-600);
    transition: all .18s ease;
    white-space: nowrap;
}

.m-btn:hover:not(:disabled) {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(59, 127, 221, .05);
    transform: translateY(-1px);
}

.m-btn.active {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 37, 87, .25);
    transform: translateY(-1px);
}

.m-btn.has-data::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    border: 1.5px solid #fff;
}

.m-btn.active.has-data::after {
    border-color: var(--navy);
}

.m-btn.is-latest {
    border-color: var(--gold-dark);
    color: var(--gold-dark);
}

.m-btn.is-latest:not(.active) {
    background: var(--gold-pale);
}

.m-btn.is-latest .latest-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 99px;
    background: var(--gold);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    vertical-align: middle;
    line-height: 1.4;
}

.m-btn.active.is-latest {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    border-color: var(--gold-dark);
    color: #fff;
}

.m-btn.active.is-latest .latest-badge {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

.m-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

.latest-data-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(16, 185, 129, .08));
    border: 1px solid rgba(16, 185, 129, .2);
    margin-top: 12px;
    font-size: 13px;
    color: var(--dark);
    flex-wrap: wrap;
}

.latest-data-banner .ldb-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(16, 185, 129, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-dark);
    font-size: 15px;
    flex-shrink: 0;
}

.latest-data-banner .ldb-text strong {
    color: var(--emerald-dark);
}

.latest-data-banner .ldb-text span {
    color: var(--gray-500);
    font-size: 13px;
    display: block;
    margin-top: 1px;
}

.latest-data-banner .ldb-btn {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--emerald-dark);
    color: #fff;
    border: none;
    font-family: 'Sarabun', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.latest-data-banner .ldb-btn:hover {
    background: var(--emerald);
    transform: translateY(-1px);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    border: none;
    transition: .2s;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: .9;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #fff;
}

.btn-green {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    color: #fff;
}

.btn-rose {
    background: linear-gradient(135deg, var(--rose), #fb7185);
    color: #fff;
}

.btn-navy {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: #fff;
}

.btn-violet {
    background: linear-gradient(135deg, var(--violet), var(--violet-light));
    color: #fff;
}

.btn-outline {
    background: #fff;
    border: 1.5px solid var(--gray-300) !important;
    color: var(--gray-600);
}

.btn-outline:hover {
    border-color: var(--navy) !important;
    color: var(--navy);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-bottom: 10px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--gold-pale);
    border: 1px solid rgba(212, 175, 55, .3);
    font-size: 13px;
    color: var(--gold-dark);
    font-weight: 600;
}

.filter-chip.quarter {
    background: rgba(124, 58, 237, .08);
    border-color: rgba(124, 58, 237, .25);
    color: var(--violet);
}

.filter-chip.month-chip {
    background: rgba(59, 127, 221, .08);
    border-color: rgba(59, 127, 221, .25);
    color: var(--blue);
}

.filter-chip .rm {
    cursor: pointer;
    opacity: .6;
    transition: .15s;
}

.filter-chip .rm:hover {
    opacity: 1;
    color: var(--rose);
}

.table-wrap {
    position: relative;
}

.loading-overlay.active {
    display: flex;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.tbl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
    gap: 8px;
}

.tbl-toolbar h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.tbl-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.dept-name {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

.money-sub {
    font-size: 10px;
    color: var(--gray-400);
}

.method-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: rgba(15, 37, 87, .07);
    border-radius: 7px;
    font-size: 13px;
    color: var(--navy);
    font-weight: 600;
}

.contract-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--gold-pale);
    border: 1px solid rgba(212, 175, 55, .3);
    border-radius: 7px;
    font-size: 13px;
    color: var(--gold-dark);
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.contract-link:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

.badge-navy {
    background: rgba(15, 37, 87, .08);
    color: var(--navy);
    border: 1px solid rgba(15, 37, 87, .12);
}

.badge-gold {
    background: var(--gold-pale);
    color: var(--gold-dark);
    border: 1px solid rgba(212, 175, 55, .25);
}

.badge-green {
    background: rgba(16, 185, 129, .1);
    color: var(--emerald-dark);
    border: 1px solid rgba(16, 185, 129, .2);
}

.badge-violet {
    background: rgba(124, 58, 237, .1);
    color: var(--violet);
    border: 1px solid rgba(124, 58, 237, .18);
}

.contract-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .2);
    font-size: 10px;
    color: var(--emerald-dark);
    font-weight: 600;
}

.page-info-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 18px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-600);
}

.page-info-bar strong {
    color: var(--navy);
}

.pagination li {
    list-style: none;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
    transition: .2s;
}

.pagination a:hover:not(.disabled) {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.pagination .active a {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    border-color: var(--navy);
    color: #fff;
}

.pagination .disabled a {
    opacity: .35;
    pointer-events: none;
}

.sum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.sum-card {
    border-radius: 13px;
    padding: 16px;
    text-align: center;
    color: #fff;
}

.sum-card.navy {
    background: linear-gradient(135deg, var(--navy), var(--navy-mid));
}

.sum-card.gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
}

.sum-card.green {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
}

.sum-card.sky {
    background: linear-gradient(135deg, var(--navy-600), var(--blue));
}

.sum-card-val {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
}

.sum-card-lbl {
    font-size: 10px;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.report-tbl-wrap {
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

.report-tbl-head {
    padding: 11px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.report-tbl-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.report-tbl-head p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.tbl-sm th {
    font-size: 13px;
    padding: 9px 11px;
}

.tbl-sm td {
    padding: 8px 11px;
    font-size: 13px;
}

.tbl-sm tbody tr:nth-child(odd) {
    background: var(--gray-50);
}

.tbl-sm thead {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
}

.modal.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 18px;
    width: 92%;
    max-width: 960px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 72px rgba(0, 0, 0, .22);
    display: flex;
    flex-direction: column;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-100);
}

.modal-head h2 {
    color: var(--navy);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.modal-x {
    background: var(--gray-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 17px;
    cursor: pointer;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}

.modal-x:hover {
    background: var(--rose);
    color: #fff;
}

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 22px 0;
    border-bottom: 1px solid var(--gray-100);
}

.modal-tab {
    padding: 8px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    transition: .2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.modal-tab.active {
    color: var(--navy);
    border-color: var(--gold);
}

.divider {
    height: 1px;
    background: var(--gray-100);
    margin: 14px 0;
}

.empty-state i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: .4;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}

.debug-panel {
    background: #1e293b;
    color: #94a3b8;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 13px;
    font-family: monospace;
    margin-top: 12px;
    display: none;
}

.debug-panel.show {
    display: block;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 24px;
    background: #E3F0FF;
    border: none;
    color: #185FA5;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}

.btn-back:hover {
    background: #C8E0FA;
    transform: translateX(-3px);
}

.card:has(.select2-container) {
    overflow: visible !important;
}

.rating-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.rating-fab-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(212, 175, 55, .5), 0 2px 8px rgba(0, 0, 0, .1);
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s;
    font-size: 22px;
    position: relative;
}

.rating-fab-btn:hover {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 8px 28px rgba(212, 175, 55, .55);
}

.rating-fab-btn .rfb-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, .4);
    animation: rfbPulse 2.5s ease-in-out infinite;
}

@keyframes rfbPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: .6;
    }

    50% {
        transform: scale(1.18);
        opacity: 0;
    }
}

.rating-fab-tooltip {
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .2s, transform .2s;
    position: absolute;
    right: 62px;
    bottom: 14px;
}

.rating-fab:hover .rating-fab-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.rating-panel {
    position: fixed;
    bottom: 96px;
    right: 28px;
    z-index: 4000;
    width: 340px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 16px 56px rgba(15, 37, 87, .18), 0 4px 16px rgba(0, 0, 0, .06);
    border: 1.5px solid rgba(212, 175, 55, .2);
    overflow: hidden;
    transform: scale(0.88) translateY(16px);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease;
}

.rating-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.rp-head {
    background: linear-gradient(130deg, var(--navy-800) 0%, var(--navy-600) 60%, var(--navy-400) 100%);
    padding: 16px 18px 14px;
    position: relative;
}

.rp-head::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(15, 37, 87, .04), transparent);
}

.rp-head-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-head-title .rp-star-ico {
    font-size: 18px;
}

.rp-head-sub {
    color: rgba(255, 255, 255, .6);
    font-size: 12px;
    line-height: 1.5;
}

.rp-head-close {
    position: absolute;
    top: 13px;
    right: 14px;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.rp-head-close:hover {
    background: rgba(244, 63, 94, .7);
}

.rp-body {
    padding: 16px 18px;
    max-height: 520px;
    overflow-y: auto;
}

.rp-body::-webkit-scrollbar {
    width: 4px;
}

.rp-body::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 99px;
}

.rp-stats-block {
    background: var(--gray-50);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid var(--gray-100);
}

.rp-stats-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.rp-avg-big {
    font-size: 40px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -1px;
}

.rp-avg-right {
    flex: 1;
}

.rp-mini-stars {
    color: var(--gold);
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 2px;
}

.rp-avg-sub {
    font-size: 12px;
    color: var(--gray-500);
}

.rp-bar-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.rp-bar-lbl {
    font-size: 12px;
    color: var(--gray-500);
    width: 12px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 600;
}

.rp-bar-track {
    flex: 1;
    height: 7px;
    background: var(--gray-200);
    border-radius: 99px;
    overflow: hidden;
}

.rp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
    border-radius: 99px;
    transition: width .6s cubic-bezier(.25, .46, .45, .94);
}

.rp-bar-cnt {
    font-size: 10px;
    color: var(--gray-400);
    width: 18px;
    flex-shrink: 0;
    text-align: left;
}

.rp-sec-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 8px;
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rp-sec-label:first-child {
    margin-top: 0;
}

.rp-star-row {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-bottom: 4px;
}

.rp-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 34px;
    padding: 3px;
    line-height: 1;
    filter: grayscale(1) opacity(.3);
    transition: transform .12s cubic-bezier(.34, 1.56, .64, 1), filter .1s;
}

.rp-star-btn.lit {
    filter: none;
}

.rp-star-btn:hover {
    transform: scale(1.25);
}

.rp-star-hint {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 14px;
    min-height: 18px;
    font-weight: 600;
}

.rp-emoji-row {
    display: flex;
    gap: 5px;
    margin-bottom: 14px;
}

.rp-emoji-btn {
    flex: 1;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    padding: 8px 4px 6px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s, transform .15s;
}

.rp-emoji-btn .rp-emoji-ico {
    font-size: 20px;
    display: block;
    line-height: 1.2;
}

.rp-emoji-btn .rp-emoji-lbl {
    display: block;
    font-size: 9px;
    color: var(--gray-500);
    margin-top: 3px;
    font-family: 'Sarabun', sans-serif;
    font-weight: 600;
}

.rp-emoji-btn:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
    transform: translateY(-3px);
}

.rp-emoji-btn.selected {
    border-color: var(--gold-dark);
    background: var(--gold-pale);
}

.rp-emoji-btn.selected .rp-emoji-lbl {
    color: var(--gold-dark);
}

.rp-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid var(--gray-200);
    border-radius: 11px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: 'Sarabun', sans-serif;
    resize: none;
    outline: none;
    color: var(--dark);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 12px;
}

.rp-textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .1);
}

.rp-textarea::placeholder {
    color: var(--gray-400);
}

.rp-submit-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
    box-shadow: 0 3px 14px rgba(212, 175, 55, .4);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rp-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, .45);
}

.rp-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.rp-submit-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rp-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 14px 0;
}

.rp-review-item {
    display: flex;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid var(--gray-100);
}

.rp-review-item:last-child {
    border: none;
    padding-bottom: 0;
}

.rp-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-mid), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.rp-review-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}

.rp-review-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}

.rp-review-stars {
    font-size: 10px;
    color: var(--gold);
}

.rp-review-emoji {
    font-size: 10px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 1px 6px;
    border-radius: 99px;
}

.rp-review-text {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.5;
}

.rp-review-time {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 2px;
}

.rp-thankyou {
    display: none;
    padding: 30px 18px;
    text-align: center;
}

.rp-ty-ico {
    font-size: 52px;
    display: block;
    margin-bottom: 12px;
    animation: tyBounce .5s ease;
}

@keyframes tyBounce {
    0% {
        transform: scale(0)
    }

    60% {
        transform: scale(1.15)
    }

    100% {
        transform: scale(1)
    }
}

.rp-ty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.rp-ty-sub {
    font-size: 13px;
    color: var(--gray-500);
}

.rp-ty-stars {
    font-size: 28px;
    color: var(--gold);
    margin: 8px 0;
    letter-spacing: 3px;
}

.rp-footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(212, 175, 55, .12);
    border: 1px solid rgba(212, 175, 55, .25);
    font-size: 12px;
    color: var(--gold-dark);
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.rp-footer-badge:hover {
    background: rgba(212, 175, 55, .2);
}

.site-footer {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-600) 60%, var(--navy-400) 100%);
    color: rgba(255, 255, 255, .85);
    padding: 32px 20px 0;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
}

.footer-org {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-org-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-org-name i {
    color: var(--gold);
    font-size: 16px;
}

.footer-org-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    transition: .2s;
}

.footer-link:hover {
    background: rgba(212, 175, 55, .25);
    border-color: var(--gold);
    color: #fff;
}

.footer-visitors {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.07);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px 14px;
}

.footer-copy {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.footer-copy-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.footer-copy-text {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    line-height: 1.7;
}

.footer-version {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(212, 175, 55, .15);
    border: 1px solid rgba(212, 175, 55, .25);
    font-size: 10px;
    color: var(--gold-light);
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 12px 0;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom-left {
    font-size: 13px;
    color: rgba(255, 255, 255, .4);
}

.footer-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .4);
}

.footer-bottom-right i {
    color: var(--gold);
}

@media(max-width:900px) {
    .nav-items {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }



    .hero {
        padding: 18px 16px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    thead {
        display: none;
    }

    tbody tr {
        display: block;
        margin-bottom: 10px;
        background: #fff;
        border: 1.5px solid var(--gray-200);
        border-radius: 11px;
        padding: 10px;
    }

    td {
        display: block;
        padding: 5px 0;
        border-bottom: 1px solid var(--gray-100);
    }

    td:last-child {
        border: none;
    }

    td::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 700;
        color: var(--navy);
        text-transform: uppercase;
        letter-spacing: .3px;
        margin-bottom: 2px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-org {
        align-items: center;
    }

    .footer-org-name {
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-copy {
        align-items: center;
        text-align: center;
    }

    .rating-panel {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 86px;
    }

    .rating-fab {
        bottom: 16px;
        right: 16px;
    }
}

@media(max-width:500px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

#dept option:disabled {
    display: none;
}

.select2-container--open .select2-dropdown {
    left: auto !important;
}

.select2-results__option[aria-disabled="true"] {
    display: none !important;
}

.brand-ico img {
    width: 85%;
    filter: brightness(0) invert(1);
}

/* ══════════════════════════════════════════════
   SKELETON LOADING SYSTEM
══════════════════════════════════════════════ */

/* shimmer animation */
@keyframes sk-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.sk-shimmer {
    background: linear-gradient(90deg,
            var(--gray-100, #f0f0f0) 25%,
            var(--gray-50, #f8f8f8) 50%,
            var(--gray-100, #f0f0f0) 75%);
    background-size: 600px 100%;
    animation: sk-shimmer 1.4s ease infinite;
    border-radius: 6px;
}

/* ── Stat Cards skeleton ── */
.stat-card-value.sk-val {
    display: inline-block;
    width: 64px;
    height: 28px;
    margin: 4px 0 2px;
    border-radius: 6px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, .25) 25%,
            rgba(255, 255, 255, .45) 50%,
            rgba(255, 255, 255, .25) 75%);
    background-size: 600px 100%;
    animation: sk-shimmer 1.4s ease infinite;
    color: transparent !important;
    pointer-events: none;
}

/* ── Nav badge skeleton ── */
.nav-badge.sk-badge {
    width: 28px;
    height: 14px;
    display: inline-block;
    border-radius: 16px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, .18) 25%,
            rgba(255, 255, 255, .32) 50%,
            rgba(255, 255, 255, .18) 75%);
    background-size: 600px 100%;
    animation: sk-shimmer 1.4s ease infinite;
    color: transparent !important;
}

/* ── Table skeleton ── */
.sk-table-wrap {
    padding: 0 2px;
}

.sk-table-row {
    display: grid;
    grid-template-columns: 3% 10% 12% 30% 13% 10% 7% 6%;
    gap: 0 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--gray-100, #f0f0f0);
}

.sk-table-row:first-child {
    border-top: 0.5px solid var(--gray-100, #f0f0f0);
}

.sk-cell {
    height: 14px;
    border-radius: 5px;
}

.sk-cell.short {
    width: 60%;
}

.sk-cell.mid {
    width: 80%;
}

.sk-cell.full {
    width: 100%;
}

.sk-cell.slim {
    height: 10px;
}

.sk-cell.tall {
    height: 18px;
}

/* staggered delay for rows */
.sk-table-row:nth-child(1) .sk-cell {
    animation-delay: 0s;
}

.sk-table-row:nth-child(2) .sk-cell {
    animation-delay: .06s;
}

.sk-table-row:nth-child(3) .sk-cell {
    animation-delay: .12s;
}

.sk-table-row:nth-child(4) .sk-cell {
    animation-delay: .18s;
}

.sk-table-row:nth-child(5) .sk-cell {
    animation-delay: .24s;
}

.sk-table-row:nth-child(6) .sk-cell {
    animation-delay: .30s;
}

.sk-table-row:nth-child(7) .sk-cell {
    animation-delay: .36s;
}

.sk-table-row:nth-child(8) .sk-cell {
    animation-delay: .42s;
}

/* ── Modal skeleton ── */
.sk-modal-header {
    height: 80px;
    background: linear-gradient(135deg, #122e30 0%, #1a3e40 100%);
    border-radius: 0;
    margin: -1px -1px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 20px;
    gap: 8px;
}

.sk-modal-header .sk-cell {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, .12) 25%,
            rgba(255, 255, 255, .22) 50%,
            rgba(255, 255, 255, .12) 75%);
    background-size: 600px 100%;
    animation: sk-shimmer 1.4s ease infinite;
}

.sk-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sk-modal-body .sk-cell {
    width: 100%;
}

.sk-modal-body .sk-cell.w40 {
    width: 40%;
}

.sk-modal-body .sk-cell.w60 {
    width: 60%;
}

.sk-modal-body .sk-cell.w75 {
    width: 75%;
}

.sk-modal-body .sk-cell.h32 {
    height: 32px;
    border-radius: 8px;
}

.sk-modal-body .sk-cell.h48 {
    height: 48px;
    border-radius: 8px;
}

.sk-modal-body .sk-cell.h80 {
    height: 80px;
    border-radius: 8px;
}

.sk-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {

    .sk-shimmer,
    .sk-cell,
    .sk-val,
    .sk-badge {
        animation: none;
    }

    /* ── Row Today Styling ── */
    tr.row-today {
        background: #fffbf1 !important;
        transition: background 0.2s ease;
    }

    tr.row-today:hover {
        background: #fef1cd !important;
    }
}

/* ── File Upload Dropzone ── */
.file-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #0ea5e9;
    background: #f8fafc;
}

.file-drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-list-item {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: default;
    border-radius: 8px;
}

.file-dz-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.file-dz-icon {
    font-size: 42px;
    color: #22d3ee;
}

.file-dz-text {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

.file-dz-text span {
    color: #0ea5e9;
    font-weight: 600;
}

.file-dz-sub {
    font-size: 13px;
    color: #94a3b8;
}

/* Has File State */
.file-info-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.file-info-icon-box {
    width: 36px;
    height: 44px;
    background: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid #1e293b;
    flex-shrink: 0;
}
.file-info-icon-box::before {
    content: "PDF";
    font-size: 10px;
    font-weight: 800;
    color: #ffffff;
    background: #1e293b;
    position: absolute;
    bottom: -2px;
    left: -2px;
    right: -2px;
    text-align: center;
    border-radius: 0 0 2px 2px;
    padding: 2px 0;
}

.file-info-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 8px;
}

.file-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.file-info-size {
    font-size: 12px;
    color: #0ea5e9;
    font-weight: 600;
}

.file-progress-bg {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    width: 100%;
    overflow: hidden;
}

.file-progress-bar {
    height: 100%;
    background: #0ea5e9;
    width: 100%;
    border-radius: 2px;
}

.file-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-remove-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}
