@import url('fonts.css?v=2.0.8');

/* --- Brand Typography & Reset overrides --- */
:root {
    --brand-primary: #1B4D3E;
    --brand-primary-hover: #143a2f;
    --brand-secondary: #C9A227;
    --brand-dark: #0D2F25;
    --brand-bg: #F4F7F6;
    --font-heading: var(--font-sans);
    --font-body: var(--font-sans);
}

body {
    font-family: var(--font-body) !important;
    background-color: #ffffff;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    letter-spacing: normal;
    font-style: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading) !important;
    font-weight: 500;
    letter-spacing: normal;
    font-style: normal;
    text-transform: none;
    color: #1d1d1f;
}

/* --- สีธีม URU สำหรับหน้าฝั่งระบบ (admin / chairman / reader / researcher / univer) --- */
.text-uru-gold { color: var(--brand-secondary); }
.text-uru-teal { color: var(--brand-primary); }
.bg-uru-teal { background-color: var(--brand-primary); }

.hover\:text-uru-gold:hover { color: var(--brand-secondary); }
.hover\:text-uru-teal:hover { color: var(--brand-primary); }
.hover\:bg-uru-teal:hover { background-color: var(--brand-primary); }
.hover\:bg-uru-dark:hover { background-color: var(--brand-dark); }
.hover\:border-uru-teal:hover { border-color: var(--brand-primary); }
.focus\:border-uru-teal:focus { border-color: var(--brand-primary); }

/* --- ช่องอัปโหลดไฟล์แบบลากวาง (components/file-drop.blade.php + js/file-drop.js) --- */
.file-drop { position: relative; }

.file-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.file-drop__zone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.file-drop__zone:hover,
.file-drop--over .file-drop__zone {
    border-color: var(--brand-primary);
    background: #f1f7f5;
}

.file-drop__zone i { font-size: 1.25rem; color: #94a3b8; }
.file-drop__zone:hover i,
.file-drop--over .file-drop__zone i { color: var(--brand-primary); }

.file-drop__label { font-size: 15px; font-weight: 500; color: #475569; }
.file-drop__hint { font-size: 15px; color: #94a3b8; margin-top: 1px; }

.file-drop__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.file-drop__item + .file-drop__item { margin-top: 0.375rem; }
.file-drop__icon { width: 1.75rem; height: 1.75rem; object-fit: contain; flex-shrink: 0; }

.file-drop__thumb {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    border-radius: 0.375rem;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.file-drop__meta { min-width: 0; flex: 1; }

.file-drop__name {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-drop__size { font-size: 15px; color: #94a3b8; }

.file-drop__remove {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.file-drop__remove:hover { background: #fef2f2; border-color: #fecaca; color: #ef4444; }

/* จอทับตอนกำลังอัป กันกดซ้ำ/ปิดหน้าหนีระหว่างส่งไฟล์ */
#file-drop-busy {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.7);
}

#file-drop-busy.is-open { display: flex; }

.file-busy__card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.file-busy__spinner {
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto 1rem;
    border: 3px solid #e2e8f0;
    border-top-color: var(--brand-primary);
    border-radius: 9999px;
    animation: spin 0.7s linear infinite;
}

.file-busy__title { font-size: 15px; font-weight: 500; color: #1d1d1f; }
.file-busy__note { font-size: 15px; color: #64748b; margin-top: 0.375rem; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Premium Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* --- Global Smooth Interactive Transitions & Animations --- */
a,
button,
input,
select,
textarea,
aside,
header,
.transition-smooth {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, opacity, background-color, border-color, box-shadow;
}

/* Scroll smooth globally */
html {
    scroll-behavior: smooth !important;
}

/* Subtle spring scale feedback on active click */
button:active,
aside nav a:active,
.btn-primary:active {
    transform: scale(0.97) !important;
}

/* --- Premium Hover Lift --- */
.hover-lift {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
}

/* --- Elegant Form Fields (Uiverse Neumorphic Design by Christian-putra30) --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
select,
textarea {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 100px;
    padding: 0.825rem 1.4rem !important;
    background-color: #f1f2f4;
    box-shadow: inset 1px 2px 6px rgba(0, 0, 0, 0.12);
    font-size: 0.95rem !important;
    color: #1d1d1f;
    transition: all 300ms ease-in-out;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.1em;
    padding-right: 2.75rem !important;
}

select option {
    font-size: 15px !important;
    padding: 0.6rem;
    background-color: #ffffff;
    color: #1d1d1f;
}

textarea {
    border-radius: 16px !important;
    padding: 1rem 1.4rem !important;
    min-height: 110px !important;
    line-height: 1.6 !important;
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    background-color: #ffffff;
    transform: scale(1.015);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), -5px -5px 30px #ffffff;
}

/* Custom styling for file input buttons to look clean and premium */
input[type="file"]::file-selector-button {
    border: none;
    background-color: #0071e3;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    margin-right: 0.75rem;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0px !important;
}

input[type="file"]::file-selector-button:hover {
    background-color: #0077ed;
}

/* Form checkboxes & radios */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #0071e3;
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    border: 1px solid #d2d2d7;
    cursor: pointer;
    transition: transform 0.1s ease;
}

input[type="checkbox"]:active,
input[type="radio"]:active {
    transform: scale(0.9);
}

/* --- Styled Premium Table (Designed to feel like Apple Developer grid) --- */
table,
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th,
.table-premium th {
    font-family: var(--font-sans) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    font-size: 15px;
    letter-spacing: normal !important;
    font-style: normal !important;
    color: #64748b;
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

table td,
.table-premium td {
    font-family: var(--font-sans) !important;
    font-style: normal !important;
    letter-spacing: normal !important;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e5e5ea;
    color: #1d1d1f;
    font-size: 15px;
    vertical-align: middle;
}

table tr:last-child td,
.table-premium tr:last-child td {
    border-bottom: none;
}

table tr,
.table-premium tr {
    transition: background-color 0.15s ease;
}

table tbody tr:hover,
.table-premium tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* --- Light Soft Neumorphic 3D Pill Buttons (White-Gray gradient with dark text) --- */
.btn-action,
.btn-primary,
.btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.6rem 1.6rem !important;
    border-radius: 9999px !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #E9ECEF 100%) !important;
    border: 1px solid #D0D5DD !important;
    color: #344054 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-shadow: none !important;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.08), inset 0px 1.5px 0px #FFFFFF !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;
    white-space: nowrap !important;
}

.btn-action:hover,
.btn-primary:hover {
    background: linear-gradient(180deg, #FFFFFF 0%, #DCE2E8 100%) !important;
    border-color: #B0B9C6 !important;
    color: #1D2939 !important;
    box-shadow: 0px 5px 14px rgba(0, 0, 0, 0.12), inset 0px 1.5px 0px #FFFFFF !important;
    transform: translateY(-1px) !important;
}

.btn-action:active,
.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.97) !important;
}

/* btn-edit: ปุ่ม "แก้ไข" เท่านั้น — คงสีโทน URU Soft Teal นูนสวยงาม */
.btn-edit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.55rem 1.4rem !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border-radius: 9999px !important;
    border: 1px solid #B0C4DE !important;
    color: #1B4D3E !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #E4EFEA 100%) !important;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer;
}

.btn-edit:hover {
    color: #0D2F25 !important;
    border-color: #1B4D3E !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #D4E5DD 100%) !important;
    transform: translateY(-1px) !important;
}

.btn-action:disabled,
.btn-action[disabled] {
    background-color: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* btn-secondary: ใช้สีเดียวกับ btn-primary ให้ปุ่มดูเหมือนกันทั้งหมด */
.btn-secondary {
    background: linear-gradient(180deg, #FFFFFF 0%, #E9ECEF 100%) !important;
    border: 1px solid #D0D5DD !important;
    color: #344054 !important;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #FFFFFF 0%, #DCE2E8 100%) !important;
    border-color: #B0B9C6 !important;
    color: #1D2939 !important;
    box-shadow: 0px 5px 14px rgba(0, 0, 0, 0.12), inset 0px 1.5px 0px #FFFFFF !important;
    transform: translateY(-1px) !important;
}

/* btn-danger-custom: Neumorphic Red for Edit/Correction */
.btn-danger-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 1rem !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    border-radius: 30px !important;
    background-image: linear-gradient(to top, #FFE4E6 0%, #fff 80%, #fff 100%) !important;
    border: 1px solid #E11D48 !important;
    color: #E11D48 !important;
    text-shadow: 0 1px #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), inset 0 1px 0 #fff;
    cursor: pointer;
    transition: all 0.25s ease-in-out !important;
}

.btn-danger-custom:hover {
    color: #BE123C !important;
    border-color: #BE123C !important;
    background-image: linear-gradient(to top, #FECDD3 0%, #fff 80%, #fff 100%) !important;
    transform: translateY(-0.5px) !important;
}

/* --- Premium Sidebar Overrides (Apple macOS Layout) --- */
aside {
    background-color: #f5f5f7 !important;
    /* Apple gray bg */
    border-right: 1px solid #d2d2d7 !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 0px !important;
    /* Flat layout, no float */
}

/* Reset parent wrapper divs for headers in sidebar */
aside nav div {
    padding: 0 !important;
    margin: 0 !important;
}

aside p {
    color: #86868b !important;
    font-size: 15px !important;
    letter-spacing: normal !important;
    font-weight: 500 !important;
    text-transform: none !important;
    padding-left: 0.75rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0.35rem !important;
}

/* Apple Sidebar navigation links (macOS style converted to Premium Neumorphic) */
aside nav a {
    color: #4a5568 !important;
    margin-bottom: 10px !important;
    padding: 0.65rem 1.1rem !important;
    border-radius: 30px !important; /* สระโค้งมนรับกับดีไซน์ปุ่มกดยื่นโครงการ */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    background-image: linear-gradient(to top, #e6e7eb 0%, #ffffff 85%, #fbfbfc 100%) !important;
    border: 1px solid #b8b9bb !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), inset 0 0 2px rgba(255, 255, 255, 0.8) !important;
    text-shadow: 0 1px #ffffff;
}

/* Hover: นูนลอยเด่นชัดขึ้นและลอยตัวตอบสนอง */
aside nav a:hover {
    background-image: linear-gradient(to top, #dedfe2 0%, #ffffff 85%, #f7f8fa 100%) !important;
    border: 1px solid #9fa0a2 !important;
    color: #1a202c !important;
    text-decoration: none !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08), inset 0 0 2px rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1.5px) !important;
}

/* Active Main Link: Premium Neumorphic กดจมลงไป (Inset Button) ราวกับถูกสวิตช์เปิดอยู่ */
aside nav a.active-menu-item,
aside nav a[class*="bg-[#0071e3]"],
aside nav a.bg-white {
    background-image: linear-gradient(to top, #c8c9cc 0%, #eef0f3 100%) !important;
    border: 1.5px solid #6b6c6e !important;
    color: #1a202c !important;
    font-weight: 500 !important;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.12), inset 0 0 3px rgba(0, 0, 0, 0.04) !important;
    text-shadow: 0 1px #ffffff !important;
    transform: translateY(0.5px) !important;
}

aside nav a.active-menu-item i,
aside nav a[class*="bg-[#0071e3]"] i,
aside nav a.bg-white i,
aside nav a.bg-white svg {
    color: #1a202c !important;
}

/* ปรับสไตล์ตัวเลข Badge ในเมนูที่ Active ให้เป็นสีเทาขรึมแทนสีฟ้า
   (เจาะจงเฉพาะ span ที่เป็น badge เท่านั้น ไม่ให้โดน span ชื่อเมนู) */
aside nav a.active-menu-item span[class*="rounded-full"],
aside nav a[class*="bg-[#0071e3]"] span[class*="bg-white/20"] {
    background-color: #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 20px !important;
    padding: 0.15rem 0.55rem !important;
}

/* ตัวเลข Badge ในเมนูที่ไม่ได้ Active ให้เข้มอ่านง่ายบนพื้นนูนสีขาว */
aside nav a span[class*="bg-slate-100"] {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
    border-radius: 20px !important;
    padding: 0.15rem 0.55rem !important;
    text-shadow: none !important;
}

/* Logout button in sidebar (Apple styled link) */
/* Logout button in sidebar (Uiverse Neumorphic styled) */
aside button {
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    cursor: pointer;
    width: 100%;
    padding: 0.65rem 1.25rem !important;
    background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%) !important;
    border-radius: 30px !important;
    border: 1px solid #8F9092 !important;
    transition: all 0.25s ease-in-out !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #606060 !important;
    text-shadow: 0 1px #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

aside button:hover {
    color: #ff453a !important;
    border-color: #ff453a !important;
    box-shadow: 0 4px 3px 1px #FCFCFC, 0 6px 8px #D6D7D9, 0 -4px 4px #CECFD1, 0 -6px 4px #FEFEFE, inset 0 0 3px 3px #CECFD1 !important;
}

aside button:active,
aside button:focus {
    box-shadow: 0 4px 3px 1px #FCFCFC, 0 6px 8px #D6D7D9, 0 -4px 4px #CECFD1, 0 -6px 4px #FEFEFE, inset 0 0 5px 3px #999, inset 0 0 30px #aaa !important;
}

/* Topbar Header styling — ใช้เฉพาะ admin topbar เท่านั้น ห้ามทับ .nd-header / .site-header / .portal-header */
header:not(.portal-header):not(.nd-header):not(.site-header) {
    background-color: rgba(22, 22, 23, 0.88) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid #333336 !important;
    border-radius: 0px !important;
}

header h2 {
    color: #1d1d1f !important;
    font-weight: 700 !important;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ห้ามใส่ forwards กลับเข้าไปเด็ดขาด */
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Custom Badge Styling --- */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 500;
}

/* Keep default rounded corners for modern card elements */
.rounded-sm {
    border-radius: 2px !important;
}

/* ขนาดตัวอักษรกำหนดที่ fonts.css ที่เดียว — ไม่ duplicate ที่นี่ */

/* ========================================================================== */
.folder-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background-color: transparent;
    border: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
}
.folder-upload-wrapper:hover {
    background-color: transparent;
}
.folder {
    --folder-back-1: #f7c14b;
    --folder-back-2: #e9a52f;
    --folder-front-1: #ffd970;
    --folder-front-2: #fbc548;
    --folder-edge: #d68f23;
    --paper: #fdfdfb;
    --paper-2: #f1f0ea;
    --ink: #2a2520;
    --ink-soft: #7c736a;
    --ring: #1b4d3e;
    --radius: 0.875em;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    position: relative;
    display: inline-block;
    width: 8.5em;
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}

.folder__toggle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 20;
}

.folder__shape {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 5 / 4;
    transition: transform 0.45s var(--ease);
}

.folder__back {
    position: absolute;
    inset: 14% 0 0 0;
    background: linear-gradient(
        135deg,
        var(--folder-back-1),
        var(--folder-back-2)
    );
    border-radius: 0.25em var(--radius) var(--radius) var(--radius);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.folder__back::before {
    content: "";
    position: absolute;
    top: -13%;
    left: 0;
    width: 46%;
    height: 16%;
    background: linear-gradient(
        135deg,
        var(--folder-back-1),
        var(--folder-back-2)
    );
    border-radius: 0.375em 0.375em 0 0;
    clip-path: polygon(0 0, 82% 0, 100% 100%, 0 100%);
}

.folder__papers {
    position: absolute;
    inset: 6% 8% 12% 8%;
    z-index: 2;
    display: block;
}

.paper {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 86%;
    height: 78%;
    translate: -50% 0;
    background: var(--paper);
    border-radius: 0.375em;
    box-shadow: 0 0.25em 0.875em rgba(60, 40, 10, 0.12);
    transition:
        transform 0.45s var(--ease),
        bottom 0.45s var(--ease);
    overflow: hidden;
}

.paper::before,
.paper::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 24%;
    height: 6%;
    border-radius: 0.2em;
    background: var(--paper-2);
}
.paper::before {
    top: 22%;
}
.paper::after {
    top: 40%;
    right: 40%;
}

.paper--1 {
    width: 78%;
    height: 70%;
    background: #f6f4ee;
}
.paper--2 {
    width: 82%;
    height: 74%;
    background: #fbfaf6;
}
.paper--3 {
    width: 86%;
}

.folder__front {
    position: absolute;
    inset: 38% 0 0 0;
    z-index: 3;
    background: linear-gradient(
        150deg,
        var(--folder-front-1),
        var(--folder-front-2)
    );
    border-radius: var(--radius);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 -1px 0 var(--folder-edge),
        0 0.875em 1.375em -0.75em rgba(120, 80, 10, 0.35);
    transform-origin: bottom center;
    transition: transform 0.45s var(--ease);
}

.folder__front::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.35) 0%,
        transparent 45%
    );
    pointer-events: none;
}

.folder__meta {
    display: block;
    margin-top: 1.1em;
    text-align: center;
}
.folder__title {
    display: block;
    font-weight: 500;
    font-size: 0.9em;
    letter-spacing: -0.01em;
    color: #1e293b;
}
.folder__count {
    display: block;
    margin-top: 0.25em;
    font-size: 0.75em;
    font-weight: 500;
    color: #64748b;
}

/* Hover & Active animations */
.folder:hover .folder__shape,
.folder.folder--active .folder__shape {
    transform: translateY(-0.375em);
}
.folder:hover .folder__front,
.folder.folder--active .folder__front {
    transform: rotateX(-32deg);
}
.folder:hover .paper,
.folder.folder--active .paper {
    transform: translateY(-26%);
}
.folder:hover .paper--1,
.folder.folder--active .paper--1 {
    transform: translate(-26%, -18%) rotate(-7deg);
}
.folder:hover .paper--2,
.folder.folder--active .paper--2 {
    transform: translate(22%, -22%) rotate(6deg);
}

.folder:active .folder__shape {
    transform: translateY(-0.125em) scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
    .folder__shape,
    .folder__front,
    .paper {
        transition: none;
    }
}

/* ========================================================================== */
.page-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 1;
    visibility: visible;
}
.page-preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-text {
    position: absolute;
    top: 58%;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: #000000;
    letter-spacing: normal;
    animation: textPulse 0.8s ease-in-out infinite alternate;
}
@keyframes textPulse {
    from { opacity: 0.5; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1.03); }
}
.page-preloader .loader {
    position: absolute;
    top: 48%;
    margin-left: -22.5px;
    left: 50%;
    width: 45px;
    height: 40px;
    background: linear-gradient(#0000 calc(1*100%/6), #1b4d3e 0 calc(3*100%/6), #0000 0),
              linear-gradient(#0000 calc(2*100%/6), #1b4d3e 0 calc(4*100%/6), #0000 0),
              linear-gradient(#0000 calc(3*100%/6), #1b4d3e 0 calc(5*100%/6), #0000 0);
    background-size: 10px 400%;
    background-repeat: no-repeat;
    animation: matrix 1s infinite linear;
}

@keyframes matrix {
  0% {
    background-position: 0% 100%, 50% 100%, 100% 100%
  }

  100% {
    background-position: 0% 0%, 50% 0%, 100% 0%
  }
}

/* ========================================================================== */
/* การ์ดสถิติแบบนูน 3 มิติสีขาวมุก */
.group.relative.bg-white.rounded-2xl {
    background-image: linear-gradient(to top, #f6f7f9 0%, #ffffff 100%) !important;
    border: 1px solid #d2d2d6 !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03), inset 0 0 2px rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.group.relative.bg-white.rounded-2xl:hover {
    transform: translateY(-2.5px) !important;
    border-color: #b8b9bb !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), inset 0 0 2px rgba(255, 255, 255, 0.95) !important;
}
.group.relative.bg-white.rounded-2xl .bg-slate-100 {
    background-color: #f1f2f5 !important;
    border: 1px solid #e1e2e5 !important;
    border-radius: 10px !important;
}

/* กล่องตารางรายการโครงการวิจัย Neumorphism */
.bg-white.rounded-2xl.border.border-slate-200\/80 {
    background-image: linear-gradient(to top, #fbfbfc 0%, #ffffff 100%) !important;
    border: 1px solid #d2d2d6 !important;
    border-radius: 18px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden !important; /* บังคับให้เนื้อหาตารางไม่ล้นขอบโค้งมน */
}
.bg-white.rounded-2xl.border.border-slate-200\/80 thead tr {
    background-color: #f1f2f5 !important;
    border-bottom: 1.5px solid #d2d2d6 !important;
}
.bg-white.rounded-2xl.border.border-slate-200\/80 th {
    font-weight: 800 !important;
    color: #4a5568 !important;
    padding: 0.9rem 1.25rem !important;
    font-size: 15px !important;
}
.bg-white.rounded-2xl.border.border-slate-200\/80 td {
    padding: 0.9rem 1.25rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 15px !important;
}

/* เอากรอบสีขาว หัวข้อค้นหาออก บีบให้สั้นลง และจัดย้ายไปชิดขวา */
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6,
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 {
    max-width: 380px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.5rem 0 !important;
    margin-left: auto !important; /* ผลักกล่องค้นหาไปชิดขอบขวาสุด */
    margin-right: 1.25rem !important; /* เว้นระยะปลอดภัยด้านขวาเพื่อป้องกันปุ่มตกขอบจอ */
}

/* ช่องกรอกและปุ่มค้นหา: สูงเท่ากันที่ 40px และใช้ขนาดฟอนต์เดียวกับข้อความอื่นในระบบ */
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6 input[type="text"],
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 input[type="text"],
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6 button[type="submit"],
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 button[type="submit"] {
    height: 2.5rem !important;
    font-size: 15px !important;
}

div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6 button[type="submit"],
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 button[type="submit"] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

/* ซ่อนข้อความหัวข้อ "ค้นหาโครงการ" ด้านบนช่องค้นหา */
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6 label,
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 label {
    display: none !important;
}

/* ซ่อนปุ่มล้างข้อมูล/รีเซ็ต (ปุ่มกลมขวาสุด) ในแถบค้นหาทั้งหมด */
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6 .flex.gap-2 a,
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 .flex.gap-2 a,
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.shadow-sm.mb-6 div.flex.gap-2 a,
div.bg-white.p-5.rounded-2xl.border.border-slate-200\/80.mb-6 div.flex.gap-2 a {
    display: none !important;
}

/* บังคับเปิดแถบสกรอลล์สำหรับ Custom Dropdown เสมอและเปิดระบบทัชสกรอลล์ลื่นไหล */
.scrollable-dropdown {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* ซ่อนแถบ Scrollbar ของแถบสไลด์เลื่อนแนวนอนหมวดหมู่ย่อยเพื่อความเรียบร้อยสวยงาม */
.scrollbar-none {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important;  /* IE and Edge */
}
.scrollbar-none::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
}

/* ===== Portal header — พื้นเทาเงิน metallic เหมือนเหล็ก ===== */
.portal-header {
    position: relative;
    background: linear-gradient(
        180deg,
        #fafafc 0%,
        #ececf1 38%,
        #dfe0e6 62%,
        #d2d3da 100%
    ) !important;
    background-color: #ececf1 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid #a8a8b2 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(0, 0, 0, 0.07),
        inset 0 2px 6px rgba(255, 255, 255, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 6px 16px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.portal-header::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0) 28%,
        rgba(0, 0, 0, 0.04) 72%,
        rgba(255, 255, 255, 0.12) 100%
    );
    opacity: 0.85;
}

.portal-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 20%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(255, 255, 255, 0.55) 80%,
        transparent 100%
    );
}

.portal-header-inner {
    position: relative;
    z-index: 1;
    min-height: 4rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

@media (min-width: 640px) {
    .portal-header-inner {
        min-height: 4.25rem;
        padding-top: 1.125rem;
        padding-bottom: 1.125rem;
    }
}

.portal-header-icon {
    color: #52525b !important;
    transition: color 0.15s ease;
}

.portal-header-menu i,
.portal-header-bell i {
    font-size: 1.375rem;
    line-height: 1;
}

.portal-header-bell {
    width: 2.5rem;
    height: 2.5rem;
}

.portal-header-user {
    color: #52525b !important;
    font-size: 17px !important;
}

.portal-header-avatar {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 15px !important;
}

.portal-header-icon:hover,
.portal-header-icon.is-active {
    color: #2d2d34 !important;
}

.portal-header-sep {
    color: #8a8a94 !important;
}

/* header portal — ตัวหนาเท่ากันทั้งแถบ */
.portal-header-brand,
.portal-header-brand *,
.portal-font-controls,
.portal-font-controls button,
.portal-font-controls span,
.portal-header-user,
.portal-header-icon {
    font-weight: 600 !important;
}

/* โลโก้ + ป้ายบทบาท — เทาเงินเข้มบนพื้น metallic */
.portal-header-logo {
    color: #3d3d45 !important;
    font-size: 18px !important;
}

.portal-role-badge {
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: #52525b !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(228, 228, 234, 0.55) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 1px 3px rgba(0, 0, 0, 0.08);
}

.portal-font-controls {
    color: #52525b !important;
}

.portal-font-label {
    font-size: 17px !important;
}

.portal-font-btn {
    padding: 0.3125rem 0.5625rem;
    font-size: 17px;
    font-weight: 600;
    color: #52525b;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(224, 224, 230, 0.62) 100%);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 0.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 2px rgba(0, 0, 0, 0.06),
        0 1px 2px rgba(0, 0, 0, 0.07);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.portal-font-btn:hover {
    color: #2d2d34;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 236, 242, 0.78) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== Portal sidebar — เมนูเงาเหมือนเหล็ก ===== */
.portal-sidebar {
    background: linear-gradient(180deg, #f8f8fc 0%, #ececf1 45%, #e2e3e9 100%) !important;
    border-right: 1px solid #b4b5bc !important;
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.75),
        4px 0 14px rgba(0, 0, 0, 0.1),
        8px 0 28px rgba(0, 0, 0, 0.06) !important;
}

.portal-sidebar nav a {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #e8e9ee 55%, #dcdde4 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 3px 6px rgba(0, 0, 0, 0.1),
        0 6px 14px rgba(0, 0, 0, 0.06) !important;
}

.portal-sidebar nav a:hover {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ececf2 55%, #dfe0e7 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 5px 10px rgba(0, 0, 0, 0.12),
        0 10px 22px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.portal-sidebar nav a.active-menu-item,
.portal-sidebar nav a[class*="bg-[#0071e3]"],
.portal-sidebar nav a.bg-white {
    background-image: linear-gradient(180deg, #d6d7dd 0%, #eceef2 100%) !important;
    border: 1px solid #9a9ba3 !important;
    box-shadow:
        inset 0 3px 7px rgba(0, 0, 0, 0.14),
        inset 0 1px 2px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.portal-sidebar button[type="submit"] {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, #e4e5eb 55%, #d8d9e0 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 3px 6px rgba(0, 0, 0, 0.1),
        0 6px 14px rgba(0, 0, 0, 0.06) !important;
}

.portal-sidebar button[type="submit"]:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 5px 10px rgba(0, 0, 0, 0.12),
        0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

.portal-sidebar > div.border-t {
    border-color: #c4c5cc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* ===== Portal profile dropdown — เงาเหมือนเหล็ก ===== */
.portal-profile-dropdown {
    width: min(15rem, calc(100vw - 1.5rem));
    padding: 0.375rem;
    background: linear-gradient(180deg, #f8f8fc 0%, #ececf1 45%, #e2e3e9 100%);
    border: 1px solid #b4b5bc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        0 4px 14px rgba(0, 0, 0, 0.12),
        0 10px 28px rgba(0, 0, 0, 0.08);
}

.portal-profile-dropdown-head {
    border-bottom: 1px solid #c8c9d0;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.55);
}

.portal-profile-name {
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #3d3d45 !important;
}

.portal-profile-email {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #6e6e78 !important;
}

.portal-profile-section {
    border-bottom: 1px solid #c8c9d0;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.55);
}

.portal-profile-section-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #86868f !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.portal-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.375rem 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #52525b !important;
    text-decoration: none !important;
    border-radius: 0.625rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #e8e9ee 55%, #dcdde4 100%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 3px 6px rgba(0, 0, 0, 0.1),
        0 6px 14px rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.portal-profile-menu-item i {
    font-size: 1.25rem;
    line-height: 1;
    color: #6e6e78 !important;
}

.portal-profile-menu-item:hover {
    color: #2d2d34 !important;
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ececf2 55%, #dfe0e7 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 5px 10px rgba(0, 0, 0, 0.12),
        0 10px 22px rgba(0, 0, 0, 0.08);
}

.portal-profile-menu-item:hover i {
    color: #52525b !important;
}

.portal-profile-footer {
    padding-top: 0.625rem !important;
}

.portal-profile-logout {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #be123c !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #f5e8eb 55%, #ecdde2 100%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 0.625rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.06),
        0 3px 6px rgba(0, 0, 0, 0.1),
        0 6px 14px rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-profile-logout i {
    font-size: 1.25rem;
    line-height: 1;
}

.portal-profile-logout:hover {
    color: #9f1239 !important;
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #fce7ec 55%, #f5d5dd 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 5px 10px rgba(0, 0, 0, 0.12),
        0 10px 20px rgba(0, 0, 0, 0.08);
}

/* ===== Portal inbox dropdown (กระดิ่ง) — โทน metallic + URU ===== */
.portal-inbox-dropdown {
    width: min(22rem, calc(100vw - 1.5rem));
    overflow: hidden;
    background: linear-gradient(180deg, #f8f8fc 0%, #ececf1 45%, #e2e3e9 100%);
    border: 1px solid #b4b5bc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        0 4px 14px rgba(0, 0, 0, 0.12),
        0 10px 28px rgba(0, 0, 0, 0.08);
}

.portal-inbox-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #c8c9d0;
    background: linear-gradient(180deg, #f4f4f8 0%, #e8e9ee 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.55);
}

.portal-inbox-dropdown-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #3d3d45 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.portal-inbox-dropdown-all {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1B4D3E !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.portal-inbox-dropdown-all:hover {
    color: #C9A227 !important;
}

.portal-inbox-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #c8c9d0;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.15s ease;
}

.portal-inbox-item:last-child {
    border-bottom: none;
}

.portal-inbox-item:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(228, 229, 235, 0.92) 100%);
}

.portal-inbox-item.is-system {
    background: rgba(255, 255, 255, 0.28);
}

.portal-inbox-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.625rem;
    height: 1.625rem;
    margin-top: 0.125rem;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
}

.portal-inbox-avatar--system {
    background: linear-gradient(180deg, #ececf1 0%, #d4d5dc 100%);
    border: 1px solid #adb0b8;
    color: #52525b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.portal-inbox-avatar--system i {
    font-size: 11px;
}

.portal-inbox-avatar--user {
    background: linear-gradient(180deg, #2a6b55 0%, #1B4D3E 55%, #0D2F25 100%);
    border: 1px solid #0D2F25;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.portal-inbox-user {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #3d3d45 !important;
}

.portal-inbox-time {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #86868f !important;
}

.portal-inbox-project {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1B4D3E !important;
}

.portal-inbox-message {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #52525b !important;
    line-height: 1.55;
}

.portal-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.4rem;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    border-radius: 0.3rem;
    border: 1px solid;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.portal-role-badge i {
    font-size: 12px;
    line-height: 1;
}

.portal-role-badge--system,
.portal-role-badge--unknown {
    background: linear-gradient(180deg, #ececf1 0%, #dfe0e7 100%);
    border-color: #adb0b8;
    color: #52525b !important;
}

.portal-role-badge--admin {
    background: linear-gradient(180deg, #e8e9ee 0%, #d8d9e0 100%);
    border-color: #9396a1;
    color: #3d3d45 !important;
}

.portal-role-badge--univer {
    background: linear-gradient(180deg, #e6f0ec 0%, #cfe4da 100%);
    border-color: rgba(27, 77, 62, 0.35);
    color: #1B4D3E !important;
}

.portal-role-badge--chairman {
    background: linear-gradient(180deg, #faf3dc 0%, #ede0b8 100%);
    border-color: rgba(201, 162, 39, 0.45);
    color: #7a5f10 !important;
}

.portal-role-badge--researcher {
    background: linear-gradient(180deg, #e3f2eb 0%, #c8e4d4 100%);
    border-color: rgba(27, 77, 62, 0.3);
    color: #1a4d3a !important;
}

.portal-role-badge--reader {
    background: linear-gradient(180deg, #ece8f2 0%, #ddd4ea 100%);
    border-color: rgba(91, 73, 128, 0.35);
    color: #5b4980 !important;
}

/* ===== Portal main — การ์ดสถิติ + ตาราง เงาเหมือนเหล็ก ===== */
.portal-stat-card {
    flex: 1 1 150px;
    min-width: 150px;
    max-width: 240px;
    padding: 1rem 1.125rem;
    border-radius: 0.875rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #ececf1 55%, #dfe0e7 100%);
    border: 1px solid #c4c5cc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 3px 8px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-stat-card:hover {
    transform: translateY(-2px);
    border-color: #b0b1b8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 5px 12px rgba(0, 0, 0, 0.12),
        0 12px 28px rgba(0, 0, 0, 0.08);
}

.portal-stat-card--active {
    border-color: #a8a9b0 !important;
}

.portal-stat-card--current {
    border-color: #0071e3 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.06),
        0 3px 8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 113, 227, 0.18) !important;
}

.portal-stat-card > p,
.portal-stat-card > p.text-\[11px\] {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #52525b !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.portal-stat-card .text-2xl,
.portal-stat-card [class*="text-2xl"] {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #2d2d34 !important;
}

.portal-stat-card .text-\[10px\],
.portal-stat-card .text-\[9px\] {
    font-size: 15px !important;
    font-weight: 600 !important;
}

.portal-table-panel {
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8f8fc 0%, #ececf1 100%);
    border: 1px solid #c4c5cc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04),
        0 4px 14px rgba(0, 0, 0, 0.1),
        0 10px 28px rgba(0, 0, 0, 0.06);
}

.portal-main table {
    background: transparent;
}

.portal-main table thead tr {
    background: linear-gradient(180deg, #f4f4f8 0%, #e2e3e9 100%) !important;
    border-bottom: 1px solid #c4c5cc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.portal-main table th {
    background: transparent !important;
    color: #52525b !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #c4c5cc !important;
    padding: 0.9rem 1.25rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.portal-main table td {
    font-size: 15px !important;
    color: #3d3d45 !important;
    border-bottom: 1px solid #d8d9e0 !important;
    background: rgba(255, 255, 255, 0.35);
}

.portal-main table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.72) !important;
}

.portal-main table tbody tr:last-child td {
    border-bottom: none !important;
}

.portal-main .bg-slate-50\/50,
.portal-main thead tr.bg-slate-50 {
    background: linear-gradient(180deg, #f4f4f8 0%, #e2e3e9 100%) !important;
}

/* ===== Home page + front header — เงาเหมือนเหล็ก + โทน URU teal/gold ===== */
.site-header {
    background: linear-gradient(180deg, #ececf1 0%, #e2e3e9 55%, #d8d9e0 100%) !important;
    border-bottom: 1px solid #c4c5cc !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 2px 8px rgba(0, 0, 0, 0.06) !important;
    overflow: visible !important;
}

.site-header-topbar {
    background: linear-gradient(180deg, #eef0f4 0%, #e2e4ea 100%) !important;
    border-bottom: 1px solid #c4c5cc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.site-header-title {
    color: #1B4D3E !important;
}

.site-header-subtitle {
    color: #64748b !important;
}

.site-header-action-link {
    color: #1B4D3E !important;
}

.site-header-action-link:hover {
    color: #C9A227 !important;
    background: rgba(27, 77, 62, 0.06) !important;
}

.site-header-font-label {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #52525b !important;
}

.site-header-font-btn {
    padding: 0.25rem 0.5rem;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #52525b;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, #e4e5eb 55%, #d8d9e0 100%);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 0.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 2px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.site-header-font-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #ececf2 55%, #dfe0e7 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.site-header-desktop {
    background: linear-gradient(180deg, #ececf1 0%, #e2e3e9 55%, #d8d9e0 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 -1px 0 rgba(0, 0, 0, 0.04) !important;
    overflow: visible !important;
}

.site-header-nav {
    background: linear-gradient(180deg, #ececf1 0%, #e2e3e9 100%) !important;
    border-top: 1px solid #c4c5cc !important;
    border-bottom: 1px solid #c4c5cc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    overflow: visible !important;
}

.site-header-nav > div {
    overflow: visible !important;
}

.site-header-nav-menu {
    overflow: visible !important;
}

.site-header-nav-cell {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    overflow: visible !important;
}

.site-header-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    height: 100%;
    padding: 0 0.35rem;
    color: #475569 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-header-nav-label {
    line-height: 1.2;
}

.site-header-nav-caret {
    flex-shrink: 0;
    font-size: 11px !important;
    opacity: 0.65;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header-nav-caret.is-spacer {
    visibility: hidden;
    pointer-events: none;
}

.site-header-nav-caret.is-open {
    transform: rotate(180deg);
    opacity: 1;
}

.site-header-nav-link:hover,
.site-header-nav-link.is-active,
.site-header-nav-link.is-open {
    color: #1B4D3E !important;
    background: rgba(255, 255, 255, 0.42) !important;
}

.site-header-nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 80;
    padding: 0;
    margin-top: 0;
    background: linear-gradient(180deg, #fafbfc 0%, #ececf1 100%);
    border: 1px solid #c4c5cc;
    border-top: none;
    border-radius: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 8px 16px rgba(0, 0, 0, 0.1);
}

.site-header-nav-dropdown-link {
    display: block;
    padding: 0.6rem 0.5rem;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid #d4d7de;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-header-nav-dropdown-link:last-child {
    border-bottom: none;
}

.site-header-nav-dropdown-link:hover {
    color: #1B4D3E;
    background: rgba(255, 255, 255, 0.72);
}

.site-header-nav-dropdown-link.is-active {
    color: #1B4D3E;
    background: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.site-header-mobile {
    background: linear-gradient(180deg, #f4f5f8 0%, #ececf1 100%) !important;
    border-bottom: 1px solid #c4c5cc !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ===== Portal login (/portal/login) ===== */
.portal-login-page {
    background: #f2f2f6;
}

.portal-login-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ececf1 55%, #dfe0e7 100%);
    border: 1px solid #c4c5cc;
    border-radius: 1.5rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 4px 14px rgba(0, 0, 0, 0.1),
        0 10px 28px rgba(0, 0, 0, 0.06);
}

.portal-login-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.35rem;
    background: linear-gradient(180deg, #e8e9ee 0%, #dfe0e7 100%);
    border: 1px solid #c4c5cc;
    border-radius: 9999px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.portal-login-tab {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.portal-login-tab.is-active {
    color: #344054;
    background: linear-gradient(180deg, #ffffff 0%, #e9ecef 100%);
    border-color: #d0d5dd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 #ffffff;
}

.portal-login-tab:not(.is-active):hover {
    color: #1B4D3E;
    background: rgba(255, 255, 255, 0.45);
}

.portal-login-divider {
    width: 1px;
    background: #c4c5cc;
    align-self: stretch;
}

.portal-login-input {
    width: 100%;
    border-radius: 9999px;
    border: 1px solid #c4c5cc;
    background: linear-gradient(180deg, #fafbfc 0%, #f0f1f5 100%);
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    font-size: 14px;
    color: #334155;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.portal-login-input:focus {
    border-color: #1B4D3E;
    background: #ffffff;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.03),
        0 0 0 3px rgba(27, 77, 62, 0.1);
}

.portal-login-input-wrap {
    position: relative;
}

.portal-login-input-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.portal-login-modal {
    background: linear-gradient(180deg, #fafbfc 0%, #ececf1 100%);
    border: 1px solid #c4c5cc;
    border-radius: 1.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 20px 50px rgba(0, 0, 0, 0.18);
}

.portal-login-modal-input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #c4c5cc;
    background: #f8f9fb;
    padding: 0.65rem 1rem;
    font-size: 14px;
    color: #334155;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-login-modal-input:focus {
    border-color: #1B4D3E;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.1);
}

/* การ์ดบริการออนไลน์ (Digital Ecosystem) */
.front-service-card {
    background: linear-gradient(180deg, #fff 0%, #ececf1 100%) !important;
    border: 1px solid #c4c5cc !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

.front-service-card:hover {
    border-color: rgba(27, 77, 62, 0.45) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 8px 22px rgba(27, 77, 62, 0.15) !important;
}

.front-service-card__media {
    background: linear-gradient(180deg, #fafbfc 0%, #f0f1f5 100%) !important;
}

.front-service-card__label {
    background: linear-gradient(180deg, #eef5f1 0%, #dce8e2 100%) !important;
    border-top: 1px solid #c4c5cc !important;
    color: #1B4D3E !important;
}

.front-service-card:hover .front-service-card__label {
    background: linear-gradient(180deg, #1B4D3E 0%, #0D2F25 100%) !important;
    border-top-color: #C9A227 !important;
    color: #fff !important;
}

.front-service-card--gcp .front-service-card__label {
    background: linear-gradient(180deg, #eef6ff 0%, #dceaf8 100%) !important;
    color: #1a4d6e !important;
}

.front-service-card--gcp:hover .front-service-card__label {
    background: linear-gradient(180deg, #1a5f8a 0%, #0d3d5c 100%) !important;
    border-top-color: #C9A227 !important;
    color: #fff !important;
}

/* พื้นหลังหน้าสาธารณะ — โทนเทาเงินเดียวกันทั้งเว็บ */
body:not(.font-sans) {
    background: #f2f2f6 !important;
}

main.flex-grow {
    background: #f2f2f6;
}

.home-page {
    background: #f2f2f6;
}

.home-page > section {
    background-color: #f2f2f6 !important;
    border-color: #d8d9de !important;
}

.home-page #banner-layer-1 {
    background: #f2f2f6 !important;
}

.home-page #banner-layer-1 > div > div,
.home-page #banner-layer-1 .front-media-frame,
.home-page #banner-layer-1 .front-media-slide,
.home-page #hero .front-media-frame,
.home-page #hero > .relative.w-full.h-\[500px\] {
    background: #f2f2f6 !important;
}

.home-page #hero > .relative.w-full.h-12.front-media-frame {
    background: #f2f2f6 !important;
}

/* ===== หน้าสาธารณะทั้งหมด — พื้นหลัง + กรอบรูป/แบนเนอร์ ===== */
.front-page {
    background: #f2f2f6 !important;
}

.front-media-frame,
.front-media-slide {
    background-color: #f2f2f6 !important;
}

.front-media-frame img[class*="object-contain"],
.front-media-slide img[class*="object-contain"] {
    background-color: transparent;
}

/* รูปแบนเนอร์/hero ที่มีพื้นขาว-เทาในไฟล์ — ให้กลืนกับพื้นหน้า */
.hero-media-stage {
    background-color: #f2f2f6;
    isolation: isolate;
}

.hero-media-img,
.home-page #banner-layer-1 .front-media-slide img {
    mix-blend-mode: multiply;
}

/* แถบ tab — segmented control: ทุกปุ่มมีกรอบเท่ากัน active ยกขึ้นชัด */
.front-tab-bar {
    margin-bottom: 2rem;
    padding: 0.4rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #e2e3e9 0%, #d4d5dc 100%);
    border: 1px solid #9396a1;
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.65);
}

.home-page .home-panel .front-tab-bar {
    margin-bottom: 1.5rem;
}

.front-tab-bar--toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .front-tab-bar--toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
}

.front-tab-bar__tabs {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.1rem;
    flex: 1;
    min-width: 0;
}

@media (min-width: 640px) {
    .front-tab-bar:not(.front-tab-bar--toolbar) .front-tab-btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

.front-tab-bar__search {
    padding-right: 0.15rem;
}

.front-tab-bar__search input {
    width: 100%;
    padding: 0.6rem 2.25rem 0.6rem 0.9rem;
    border-radius: 0.65rem;
    border: 1px solid #9396a1;
    background: rgba(255, 255, 255, 0.55);
    font-size: 13.5px;
    font-weight: 500;
    color: #3f3f46;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.front-tab-bar__search input:focus {
    background: rgba(255, 255, 255, 0.92);
    border-color: #1B4D3E;
    box-shadow: 0 0 0 2px rgba(27, 77, 62, 0.12);
}

.front-tab-btn {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0.65rem 1.15rem;
    border-radius: 0.7rem;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    color: #5a5a64;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(147, 150, 161, 0.45);
    outline: none;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.front-tab-btn:hover:not(.is-active) {
    color: #1B4D3E;
    border-color: #9396a1;
    background: rgba(0, 0, 0, 0.06);
}

.front-tab-btn.is-active {
    color: #1B4D3E;
    font-weight: 600;
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 100%);
    border-color: #adb0b8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 3px 8px rgba(0, 0, 0, 0.12);
}

.front-tab-btn:focus-visible {
    outline: 2px solid rgba(27, 77, 62, 0.35);
    outline-offset: 1px;
}

/* เส้นแบ่งรายการเอกสาร / ระเบียบ / ข่าว — ให้มองเห็นชัดบนพื้น metallic */
:root {
    --front-line: #adb0b8;
    --front-line-strong: #9396a1;
}

.front-list-head {
    border-bottom: 2px solid var(--front-line-strong) !important;
}

.front-list-grid {
    border-top: 1px solid var(--front-line);
}

.front-list-row {
    border-bottom: 1px solid var(--front-line) !important;
    border-radius: 0 !important;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}

.front-list-row:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(228, 229, 235, 0.9) 100%) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-color: var(--front-line) !important;
}

.front-list-row:hover .text-gray-800,
.front-list-row:hover h3 {
    color: #1B4D3E !important;
}

.front-list-row:hover .ph-arrow-up-right {
    color: #C9A227 !important;
}

.front-list-row:last-child {
    border-bottom: none !important;
}

.front-list-foot {
    border-top: 2px solid var(--front-line-strong) !important;
}

.front-list-panel {
    border: 1px solid var(--front-line-strong) !important;
    background: rgba(255, 255, 255, 0.42) !important;
}

.front-list-panel .front-list-head {
    border-bottom-color: var(--front-line) !important;
}

.front-page .front-news-card,
.home-page #news .card-elev.border {
    border-color: var(--front-line-strong) !important;
}

.front-page .front-news-card .border-t,
.home-page #news .card-elev .border-t {
    border-color: var(--front-line) !important;
}

/* ===== Home news / activity cards — กริด 4 ใบเท่ากัน ===== */
.home-news-section,
.home-activity-section {
    background: #f2f2f6 !important;
}

.home-news-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .home-news-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .home-news-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.15rem;
    }
}

.home-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 100%);
    border: 1px solid #c4c5cc;
    border-radius: 1.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 10px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-news-card:hover {
    border-color: rgba(27, 77, 62, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 6px 16px rgba(27, 77, 62, 0.1);
    transform: translateY(-2px);
}

.home-news-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
    background: #e8e9ee;
    flex-shrink: 0;
}

.home-news-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.home-news-card:hover .home-news-card__media img {
    transform: scale(1.04);
}

.home-news-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.4rem;
    padding: 1rem 1.05rem 1.1rem;
    min-height: 0;
}

.home-news-card__title {
    margin: 0;
    font-family: var(--font-sans), 'Sarabun', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1B4D3E;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-cat {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #C9A227;
    line-height: 1.2;
}

.home-news-date {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

.home-news-featured__foot,
.home-news-row__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.55rem;
}

.home-news-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1B4D3E;
    transition: color 0.2s ease, gap 0.2s ease;
}

.home-news-featured:hover .home-news-more,
.home-news-row:hover .home-news-more {
    color: #C9A227;
    gap: 0.45rem;
}

.home-news-empty {
    border: 1px dashed #c4c5cc;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.45);
}

/* ข่าวสารล่าสุด — แบบเดิม: ข่าวเด่น + รายการข้าง */
.home-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .home-news-grid {
        grid-template-columns: 1.15fr 1fr;
        gap: 1.25rem;
    }
}

.home-news-featured,
.home-news-row {
    display: flex;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 100%);
    border: 1px solid #c4c5cc;
    border-radius: 1.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 10px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.home-news-featured:hover,
.home-news-row:hover {
    border-color: rgba(27, 77, 62, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 6px 16px rgba(27, 77, 62, 0.1);
}

.home-news-featured {
    flex-direction: column;
    height: 100%;
}

.home-news-featured__media {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: #e8e9ee;
    flex-shrink: 0;
}

.home-news-featured__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.home-news-featured:hover .home-news-featured__media img {
    transform: scale(1.03);
}

.home-news-featured__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
    padding: 1.15rem 1.25rem 1.25rem;
    min-height: 0;
}

.home-news-featured__title {
    margin: 0;
    font-family: var(--font-sans), 'Sarabun', sans-serif;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.45;
    color: #1B4D3E;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

@media (min-width: 1024px) {
    .home-news-list {
        height: 100%;
    }

    .home-news-row {
        flex: 1 1 0;
        min-height: 0;
    }
}

.home-news-row {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

.home-news-row__media {
    width: 7.5rem;
    flex-shrink: 0;
    overflow: hidden;
    background: #e8e9ee;
    align-self: stretch;
}

@media (min-width: 640px) {
    .home-news-row__media {
        width: 9rem;
    }
}

.home-news-row__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.home-news-row:hover .home-news-row__media img {
    transform: scale(1.04);
}

.home-news-row__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    gap: 0.25rem;
}

.home-news-row__title {
    margin: 0;
    font-family: var(--font-sans), 'Sarabun', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1B4D3E;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== News index (/news) cards ===== */
.news-index-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .news-index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-index-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.15rem;
    }
}

@media (min-width: 1280px) {
    .news-index-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.15rem;
    }
}

.news-index-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 100%);
    border: 1px solid #c4c5cc;
    border-radius: 1.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 10px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-index-card:hover {
    border-color: rgba(27, 77, 62, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 6px 16px rgba(27, 77, 62, 0.1);
}

.news-index-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    width: 100%;
    overflow: hidden;
    background: #e8e9ee;
    flex-shrink: 0;
}

.news-index-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.news-index-card:hover .news-index-card__media img {
    transform: scale(1.03);
}

.news-index-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #cbd5e1;
}

.news-index-card__date {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 3.25rem;
    padding: 0.45rem 0.55rem;
    background: #1B4D3E;
    color: #fff;
    text-align: center;
    line-height: 1.1;
}

.news-index-card__day {
    display: block;
    font-size: 1rem;
    font-weight: 800;
}

.news-index-card__month {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.92;
}

.news-index-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 1.15rem 1.2rem 1.15rem;
}

.news-index-card__meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.news-index-card__dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
    background: #C9A227;
    flex-shrink: 0;
}

.news-index-card__cat {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.3;
}

.news-index-card__published {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.3;
}

.news-index-card__title {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.55;
    color: #1B4D3E;
}

.news-index-card__title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.news-index-card:hover .news-index-card__title a {
    color: #C9A227;
}

.news-index-card__excerpt {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.65;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-index-card__footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid #adb0b8;
}

.news-index-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1B4D3E;
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.news-index-card__more:hover,
.news-index-card:hover .news-index-card__more {
    color: #C9A227;
}

/* ===== Front pagination (หน้าสาธารณะ) ===== */
.front-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.front-pagination__info {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.4;
}

.front-pagination__info span {
    font-weight: 700;
    color: #1B4D3E;
}

.front-pagination__bar {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border-radius: 0.85rem;
    border: 1px solid #c4c5cc;
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 3px 10px rgba(0, 0, 0, 0.06);
}

.front-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.7rem;
    border: none;
    border-right: 1px solid #d0d1d8;
    background: transparent;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.front-pagination__btn:last-child {
    border-right: none;
}

.front-pagination__btn:hover:not(.is-disabled):not(.is-active):not(.is-ellipsis) {
    background: rgba(27, 77, 62, 0.08);
    color: #1B4D3E;
}

.front-pagination__btn.is-active {
    background: #1B4D3E;
    color: #fff;
}

.front-pagination__btn.is-disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.65;
}

.front-pagination__btn.is-ellipsis {
    color: #94a3b8;
    cursor: default;
}

.front-pagination__btn i {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 639px) {
    .front-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .front-pagination__info {
        text-align: center;
    }

    .front-pagination__bar {
        justify-content: center;
        width: 100%;
    }

    .front-pagination__btn {
        flex: 1 1 auto;
    }
}

.news-page {
    background: #f2f2f6 !important;
}

.news-page .card-elev {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ececf1 55%, #dfe0e7 100%) !important;
    border: 1px solid #c4c5cc !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 4px 14px rgba(0, 0, 0, 0.1),
        0 10px 28px rgba(0, 0, 0, 0.06) !important;
}

/* แถบ tab / กล่องย่อยในหน้า home ให้เข้ากับพื้นเทาเงิน */
.home-page .home-panel > .mb-6.bg-white:not(.front-tab-bar) {
    background: linear-gradient(180deg, #f4f4f8 0%, #e8e9ee 100%) !important;
    border-color: #c4c5cc !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

.home-page .inline-flex.p-2.bg-gray-100,
.home-page .inline-flex.p-1\.5.bg-gray-100,
.front-page .inline-flex.p-2.bg-gray-100,
.front-page .inline-flex.p-1\.5.bg-gray-100 {
    background: linear-gradient(180deg, #ececf1 0%, #dfe0e7 100%) !important;
    border: 1px solid #c4c5cc !important;
}

.home-page .bg-slate-100,
.home-page .bg-gray-50,
.home-page .bg-slate-50,
.front-page .bg-slate-100,
.front-page .bg-gray-50,
.front-page .bg-slate-50,
.news-page .bg-gray-50,
.news-page .bg-slate-50 {
    background-color: #e8e9ee !important;
}

.home-page .border-slate-100,
.home-page .border-slate-200,
.home-page .border-gray-100,
.front-page .border-slate-100,
.front-page .border-slate-200,
.front-page .border-gray-100 {
    border-color: #d0d1d8 !important;
}

.home-page .home-panel,
.home-page .content-card,
.home-page .card-elev,
.front-page .content-card,
.front-page .card-elev,
.front-page .bg-white.rounded-\[24px\],
.front-page .group.flex.flex-col.bg-white.border {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ececf1 55%, #dfe0e7 100%) !important;
    border: 1px solid #c4c5cc !important;
    border-radius: 1.25rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 4px 14px rgba(0, 0, 0, 0.1),
        0 10px 28px rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-page .home-panel {
    border-radius: 1.5rem;
}

.home-page .content-card:hover,
.home-page .card-elev:hover,
.home-page .home-panel:hover,
.front-page .content-card:hover,
.front-page .card-elev:hover,
.front-page .group.flex.flex-col.bg-white.border:hover {
    transform: translateY(-2px);
    border-color: #b0b1b8 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.05),
        0 6px 16px rgba(0, 0, 0, 0.12),
        0 14px 32px rgba(0, 0, 0, 0.08) !important;
}

.home-page .home-service-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ececf1 55%, #dfe0e7 100%) !important;
    border: 1px solid #c4c5cc !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 2px rgba(0, 0, 0, 0.07),
        0 3px 8px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.06) !important;
}

.home-page table {
    background: transparent;
}

.home-page table thead tr {
    background: linear-gradient(180deg, #f4f4f8 0%, #e2e3e9 100%) !important;
    border-bottom: 1px solid #c4c5cc !important;
}

.home-page table th {
    background: transparent !important;
    color: #52525b !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #c4c5cc !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.home-page table td {
    font-size: 15px !important;
    color: #3d3d45 !important;
    border-bottom: 1px solid #d8d9e0 !important;
    background: rgba(255, 255, 255, 0.35);
}

.home-page table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.72) !important;
}

.home-page .uppercase {
    text-transform: none !important;
    letter-spacing: normal !important;
}

.home-page [class*="tracking-widest"],
.home-page [class*="tracking-wide"] {
    letter-spacing: normal !important;
}

*,
*::before,
*::after,
.italic,
table td p.italic,
table td span.italic,
table td .italic,
table td p,
table td span,
table td h4,
table td a {
    font-style: normal !important;
}

/* ===== News / Activity detail page ===== */
.nd-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3.5rem;
}

@media (min-width: 1024px) {
    .nd-wrap {
        padding: 1.75rem 1.5rem 4rem;
    }
}

.nd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.nd-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.15rem;
}

.nd-article {
    overflow: hidden;
    border-radius: 1.35rem !important;
    padding: 1.35rem 1.2rem 1.5rem;
    background: #ffffff !important;
    border: 1px solid #d0d1d8 !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.04) !important;
    color: #1d1d1f;
}

.news-page .nd-article,
.front-page .nd-article,
.news-page article.nd-article,
.front-page article.nd-article {
    background: #ffffff !important;
    border: 1px solid #d0d1d8 !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.04) !important;
    transform: none !important;
}

.news-page .nd-article:hover,
.front-page .nd-article:hover {
    transform: none !important;
    border-color: #d0d1d8 !important;
}

@media (min-width: 768px) {
    .nd-article {
        padding: 1.75rem 1.75rem 1.85rem;
    }
}

header.nd-header,
.nd-header,
.news-page header.nd-header,
.front-page header.nd-header {
    margin-bottom: 1.25rem;
    padding: 0;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    color: #1d1d1f !important;
}

.nd-title,
header.nd-header .nd-title,
.news-page .nd-title,
.front-page .nd-title {
    margin: 0;
    font-family: var(--font-sans), 'Sarabun', sans-serif;
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
    font-weight: 800;
    line-height: 1.45;
    color: #1d1d1f !important;
    -webkit-text-fill-color: #1d1d1f !important;
}

.nd-meta,
.nd-date,
header.nd-header .nd-meta,
header.nd-header .nd-date {
    background: transparent !important;
    background-color: transparent !important;
}

.nd-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.nd-breadcrumb a:hover {
    color: #1B4D3E;
}

.nd-breadcrumb__current {
    color: #C9A227;
    max-width: min(100%, 28rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-bottom: 0.85rem;
}

.nd-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 0.55rem;
    background: #1B4D3E;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.nd-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
}

.nd-date i {
    color: #C9A227;
    font-size: 1rem;
}

.nd-cover {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 1.35rem;
    padding: 0;
    border: 1px solid #d0d1d8;
    border-radius: 1rem;
    background: #eef0f3;
    cursor: zoom-in;
    overflow: hidden;
}

.nd-cover__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 12rem;
    max-height: 22rem;
    padding: 0.85rem;
}

.nd-cover__frame img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 20rem;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
}

.nd-cover__hint {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(13, 47, 37, 0.82);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.nd-body {
    text-align: left;
    text-indent: 0 !important;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.9;
    font-size: 0.9375rem;
    color: #334155 !important;
}

.nd-body,
.nd-body p,
.nd-body li,
.nd-body span,
.nd-body strong,
.nd-body b,
.nd-body em,
.nd-body h1,
.nd-body h2,
.nd-body h3,
.nd-body h4,
.nd-body a,
.news-detail-body,
.news-detail-body p,
.news-detail-body li,
.news-detail-body span,
.news-detail-body strong,
.news-detail-body b,
.news-detail-body em,
.news-detail-body h1,
.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4,
.news-detail-body a,
.news-detail-heading,
.news-detail-bullet {
    color: #334155 !important;
}

.nd-body p,
.news-detail-body p {
    margin: 0 0 0.85rem;
    text-indent: 0 !important;
}

.news-detail-heading {
    display: inline-block;
    margin-top: 0.9rem;
    font-weight: 700;
    line-height: 1.6;
}

.news-detail-heading:first-child {
    margin-top: 0;
}

.news-detail-bullet {
    display: inline-block;
    padding-left: 0.85rem;
}

.nd-body a,
.news-detail-body a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nd-attach {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid #d0d1d8;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
}

.nd-attach__info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nd-attach__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid #d0d1d8;
    color: #1B4D3E;
    font-size: 1.15rem;
}

.nd-attach__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 800;
    color: #1B4D3E;
}

.nd-attach__ext {
    margin: 0.15rem 0 0;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nd-attach__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 0.65rem;
    background: #1B4D3E;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.nd-attach__btn:hover {
    background: #C9A227;
}

.nd-gallery {
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid #d0d1d8;
}

.nd-gallery__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.nd-gallery__head h2 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #1B4D3E;
}

.nd-gallery__head span {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nd-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .nd-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

.nd-gallery__item {
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid #d0d1d8;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #e8e9ee;
    cursor: zoom-in;
}

.nd-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.nd-gallery__item:hover img {
    transform: scale(1.05);
}

.nd-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid #c4c5cc;
    border-radius: 0.7rem;
    background: linear-gradient(180deg, #ffffff 0%, #ececf1 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1B4D3E;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.nd-back:hover {
    border-color: #1B4D3E;
    color: #1B4D3E;
    background: #fff;
}

.nd-related {
    margin-top: 2.5rem;
}

.nd-related__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.nd-related__eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C9A227;
}

.nd-related__head h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    color: #1B4D3E;
}

.nd-related__all {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border: 1px solid #d0d1d8;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.7);
    color: #1B4D3E;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.nd-related__all:hover {
    background: #1B4D3E;
    color: #fff;
}

.nd-related__grid {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .nd-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .nd-related__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.nd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(13, 47, 37, 0.94);
    backdrop-filter: blur(10px);
}

.nd-lightbox__close,
.nd-lightbox__nav {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.nd-lightbox__close:hover,
.nd-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nd-lightbox__close {
    top: 1rem;
    right: 1rem;
}

.nd-lightbox__nav--prev {
    left: 0.75rem;
}

.nd-lightbox__nav--next {
    right: 0.75rem;
}

.nd-lightbox__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: min(100%, 1100px);
}

.nd-lightbox__stage img {
    max-width: 100%;
    max-height: 76vh;
    border-radius: 1rem;
    object-fit: contain;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
}

.nd-lightbox__caption {
    margin: 0;
    max-width: 42rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.45;
}

.nd-lightbox__count {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
}

/* ===== Admin panel — สีตัวอักษรโทนระบบ + ไม่ให้คำไทยตก ===== */
.is-admin-panel {
    color: #1d1d1f;
}

.is-admin-panel .portal-main,
.is-admin-panel .portal-main label,
.is-admin-panel .portal-main h1,
.is-admin-panel .portal-main h2,
.is-admin-panel .portal-main h3,
.is-admin-panel .portal-main h4,
.is-admin-panel .portal-main p,
.is-admin-panel .portal-main span,
.is-admin-panel .portal-main td,
.is-admin-panel .portal-main th,
.is-admin-panel .portal-main a,
.is-admin-panel .portal-main button {
    letter-spacing: normal !important;
    text-transform: none !important;
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: auto;
    hyphens: none;
}

.is-admin-panel .portal-main {
    color: #1d1d1f;
}

.is-admin-panel .portal-main label {
    color: #86868b !important;
    font-weight: 600;
}

.is-admin-panel .portal-main h1,
.is-admin-panel .portal-main h2,
.is-admin-panel .portal-main h3,
.is-admin-panel .portal-main h4 {
    color: #1d1d1f !important;
}

.is-admin-panel .portal-main a:not([class*="btn"]):not([class*="bg-"]):not(.nd-attach__btn) {
    color: inherit;
}

.is-admin-panel .portal-main a.text-\[\#1d1d1f\]:hover,
.is-admin-panel .portal-main a[class*="hover:text-"]:hover {
    color: #1B4D3E;
}

.is-admin-panel .portal-main .badge-status {
    color: #1d1d1f !important;
    background: #f5f5f7 !important;
    border: 1px solid #d2d2d7 !important;
    font-weight: 600;
    letter-spacing: normal !important;
    text-transform: none !important;
    white-space: nowrap;
}

.is-admin-panel .portal-main .badge-status.bg-emerald-50,
.is-admin-panel .portal-main .badge-status[class*="emerald"] {
    color: #1B4D3E !important;
    background: #eef7f3 !important;
    border-color: #c5ddd2 !important;
}

.is-admin-panel .portal-main .badge-status.bg-rose-50,
.is-admin-panel .portal-main .badge-status[class*="rose"] {
    color: #b42318 !important;
    background: #fef3f2 !important;
    border-color: #fecdca !important;
}

.is-admin-panel .portal-main table td,
.is-admin-panel .portal-main table th {
    vertical-align: middle;
}

.is-admin-panel .portal-main table td .break-words,
.is-admin-panel .portal-main table td .font-bold {
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
}