:root {
    /* --- Ultra Premium Palette --- */
    --primary-green: #0F4C3A;
    /* Deep Emerald - Trust & Stability */
    --primary-light: #1A6B54;
    /* Lighter Emerald */
    --accent-gold: #C5A059;
    /* Muted Gold - Luxury */
    --accent-gold-hover: #D4AF37;
    /* Brighter Gold */

    --bg-body: #F7F9FC;
    /* Clean Premium Background */
    --bg-surface: #FFFFFF;
    /* Pure White Surface */

    --text-primary: #1A202C;
    /* Dark Slate - Readable */
    --text-secondary: #718096;
    /* Cool Gray */
    --text-light: #FFFFFF;

    --border-color: #E2E8F0;

    /* --- Shadows & Effects --- */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(15, 76, 58, 0.15);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-body);
    font-family: 'Sarabun', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography Enhancements --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

a {
    transition: var(--transition-fast);
    text-decoration: none;
}

/* --- Modern Sidebar --- */
.sidebar {
    background: var(--primary-green);
    /* Subtle gradient for depth */
    background: linear-gradient(180deg, var(--primary-green) 0%, #093025 100%);
    min-height: 100vh;
    padding: 30px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar .navbar-brand {
    color: var(--text-light);
    padding: 0 25px;
    margin-bottom: 3rem;
    display: block;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar .navbar-brand i {
    color: var(--accent-gold);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 14px 25px;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 4px solid transparent;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    transition: transform 0.2s;
}

.sidebar .nav-link:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 30px;
    /* Slight slide effect */
}

.sidebar .nav-link:hover i {
    color: var(--accent-gold);
    transform: scale(1.1);
}

.sidebar .nav-link.active {
    color: var(--text-light);
    background-color: rgba(197, 160, 89, 0.15);
    /* Tint of Gold */
    border-left-color: var(--accent-gold);
    font-weight: 600;
}

/* --- Premium Cards --- */
.card-custom {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition-smooth);
    margin-bottom: 2rem;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header-green {
    background-color: var(--bg-surface);
    color: var(--primary-green);
    border-bottom: 2px solid rgba(15, 76, 58, 0.1);
    padding: 1.5rem 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-green h5 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.card-header-green h5 i {
    color: var(--accent-gold);
    background: rgba(197, 160, 89, 0.15);
    padding: 8px;
    border-radius: 8px;
    margin-right: 12px;
    font-size: 1rem;
}

/* --- Buttons --- */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    transition: var(--transition-fast);
    letter-spacing: 0.3px;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Primary Action: Gold */
.btn-yellow,
.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #B08D4A 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}

.btn-yellow:hover,
.btn-gold:hover {
    background: linear-gradient(135deg, var(--accent-gold-hover) 0%, #C5A059 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.4);
    color: #fff;
}

/* Secondary Action: Outline/Ghost */
.btn-outline-custom {
    color: var(--primary-green);
    border: 2px solid rgba(15, 76, 58, 0.2);
    background: transparent;
}

.btn-outline-custom:hover {
    background: var(--primary-green);
    color: #fff;
    border-color: var(--primary-green);
}

/* "See All" Buttons in Card Header */
.card-header .btn-light {
    background: #F3F6F9;
    color: var(--text-secondary);
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.8rem;
}

.card-header .btn-light:hover {
    background: var(--primary-green);
    color: #fff;
}


/* --- Modern Table --- */
.table-custom {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
}

.table-custom thead th {
    background-color: #F8FAFC;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--border-color);
    border-top: none;
    letter-spacing: 1px;
}

.table-custom tbody td {
    padding: 1.2rem 2rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    background-color: var(--bg-surface);
    transition: background-color 0.2s;
}

.table-custom tbody tr:hover td {
    background-color: #FAFCFE;
}

/* Date Column */
.date-col {
    white-space: nowrap;
    width: 1%;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

/* Title link */
.table-custom a {
    color: var(--primary-green);
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.table-custom a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s;
}

.table-custom a:hover {
    color: var(--primary-light);
}

.table-custom a:hover::after {
    width: 100%;
}

/* --- Banner --- */
.banner-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.banner-wrapper:hover .banner-img {
    transform: scale(1.02);
}

/* --- Pagination --- */
.pagination {
    margin-top: 1rem;
}

.pagination .page-link {
    color: var(--text-secondary);
    border: none;
    margin: 0 4px;
    border-radius: 8px;
    font-weight: 500;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.pagination .page-link:hover {
    color: var(--primary-green);
    background-color: rgba(15, 76, 58, 0.05);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-green);
    color: #fff;
    box-shadow: 0 4px 10px rgba(15, 76, 58, 0.3);
}

/* --- Footer --- */
.footer {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    font-size: 0.9rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 767.98px) {
    .sidebar {
        display: none;
    }

    .sidebar.show {
        display: block;
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        padding-top: 60px;
        /* Space for toggler */
    }

    .mobile-navbar {
        background: var(--primary-green);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .card-header-green {
        padding: 1rem;
    }

    .table-custom thead {
        display: none;
        /* Hide headers on mobile for clearer view if needed */
    }

    .table-custom tbody td {
        display: block;
        padding: 0.8rem 1rem;
        text-align: right;
    }

    .table-custom tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--text-secondary);
    }

    .table-custom tbody td:first-child {
        text-align: left;
        border-bottom: none;
        padding-bottom: 0;
    }

    .table-custom tbody td:first-child::before {
        display: none;
    }
}