:root {
    --navy: #0a1628;
    --gold: #c9a84c;
    --cream: #faf8f3;
    --white: #ffffff;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --text: #1f2937;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: 'Sarabun', sans-serif;
    background: var(--cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.page {
    flex: 1;
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
}

/* Section */
.section {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: all .25s ease;
}

.section:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

/* Header */
.section-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 16px;
}

.t-green .section-header {
    background: #e6f4ee;
    color: #1a7a4a;
}

.t-amber .section-header {
    background: #fef3e2;
    color: #b45309;
}

.section-header .title {
    flex: 1;
}

.section-header .col {
    width: 150px;
    text-align: center;
    font-weight: 600;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table tr {
    border-bottom: 1px solid var(--gray-200);
    transition: all .25s ease;
    cursor: pointer;
}

/* 🔥 hover แถว */
.table tr:hover {
    background: linear-gradient(90deg, #f9fafb, #f3f4f6);
    transform: translateX(6px);
    box-shadow: inset 4px 0 0 var(--gold);
}

/* 🔥 ตอนกด */
.table tr:active {
    transform: scale(0.98);
    background: #eef2f7;
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
}

.col-name {
    width: auto;
}

.col-type {
    width: 150px;
    text-align: center;
}

.col-btn {
    width: 150px;
    text-align: center;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    background: #e8f0fb;
    color: #2563b0;
    border: 1px solid rgba(37, 99, 176, .2);
}

/* 🔥 Button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--navy);
    color: #e8c97a;
    text-decoration: none;
    font-size: 13px;
    transition: all .25s ease;
}

/* 🔥 hover ปุ่ม */
.btn:hover {
    background: var(--gold);
    color: #0a1628;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 18px rgba(201, 168, 76, 0.35);
}

/* เปลี่ยนสี icon */
.btn:hover svg {
    fill: #0a1628;
}

/* 🔥 ตอนกด */
.btn:active {
    transform: scale(0.95);
}

.btn svg {
    width: 14px;
    height: 14px;
    fill: #e8c97a;
}

.btn.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    pointer-events: none;
}

/* Responsive */
@media(max-width:768px) {
    .section-header .col {
        display: none;
    }

    .table td.col-type {
        display: none;
    }

    .table td.col-btn {
        width: auto;
    }

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

/* 🔍 Search */
.search-wrapper {
    display: flex;
    justify-content: flex-end;
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.search-box-wrap {
    position: relative;
    width: 320px;
}

.search-box-wrap input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-family: 'Sarabun', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
    background: #fff;
}

/* 🔥 hover ช่องค้นหา */
.search-box-wrap input:hover {
    border-color: var(--gold);
    background: #fffdf7;
}

/* 🔥 focus */
.search-box-wrap input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}