:root {
    --yellow: #E4D329;
    --yellow-dark: #d6c81f;
    --black: #091413;
    --cream: #F6F4EF;
    --white: #ffffff;
    --gray: #6B7280;
    --border: #E5E7EB;
    --soft: #F8FAFC;
    --danger: #dc3545;
    --success: #198754;
}

/* ===== Reset / Base ===== */

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--cream);
    color: var(--black);
    font-family: 'Sarabun', 'TH Sarabun New', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

a {
    transition: .25s ease;
}

img {
    max-width: 100%;
}

/* ===== Layout ===== */

.admin-wrap {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: var(--black);
    padding: 22px 18px;
    overflow-y: auto;
    z-index: 1000;
}

.admin-main {
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: 100vh;
    padding: 28px 32px;
}

.admin-main > h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 24px;
}

/* ===== Sidebar ===== */

.brand {
    color: var(--yellow);
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 22px;
    padding: 0 4px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.88);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.sidebar a i {
    font-size: 1.05rem;
    min-width: 22px;
    text-align: center;
}

.sidebar a:hover {
    background: rgba(255,255,255,.10);
    color: var(--yellow);
}

.sidebar a.active {
    background: var(--yellow);
    color: var(--black) !important;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(228,211,41,.28);
}

.sidebar a.active i {
    color: var(--black);
}

.sidebar-toggle {
    display: none;
    position: absolute;
    top: 16px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    color: var(--black);
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    z-index: 10000;
    cursor: pointer;
}

/* ===== Topbar ===== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    border-radius: 22px;
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 34px rgba(9,20,19,.05);
    border: 1px solid var(--border);
}

/* ===== Buttons ===== */

.btn,
.btn-yellow {
    font-size: .95rem;
    font-weight: 700;
    border-radius: 12px;
}

.btn-yellow {
    background: var(--yellow);
    color: var(--black);
    border: 0;
    padding: 9px 18px;
}

.btn-yellow:hover {
    background: var(--yellow-dark);
    color: var(--black);
}

.btn-sm {
    font-size: .85rem;
    border-radius: 10px;
}

/* ===== CRUD / Form / Table ===== */

.form-card,
.card-table {
    width: 100%;
    max-width: 100%;
    background: var(--white);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 12px 34px rgba(9,20,19,.05);
    border: 1px solid var(--border);
}

.card-table {
    overflow-x: auto;
}

.form-card label {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: .95rem;
}

textarea.form-control {
    min-height: 180px;
}

.preview {
    max-width: 260px;
    border-radius: 16px;
    margin-top: 14px;
}

.table {
    width: 100%;
    margin-bottom: 0;
    font-size: .95rem;
}

.table th {
    font-size: .95rem;
    font-weight: 800;
    color: var(--black);
    white-space: nowrap;
    padding: 14px 12px;
}

.table td {
    font-size: .92rem;
    vertical-align: middle;
    padding: 13px 12px;
}

.table .btn {
    border-radius: 10px;
}

/* ===== Dashboard ===== */

.admin-dashboard {
    padding-bottom: 36px;
}

.dashboard-topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 14px 36px rgba(9,20,19,.06);
    border: 1px solid var(--border);
}

.dashboard-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px;
    min-height: 118px;
    border-radius: 22px;
    background: var(--white);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--black);
    box-shadow: 0 12px 32px rgba(9,20,19,.05);
    transition: .3s ease;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    color: var(--black);
    box-shadow: 0 18px 42px rgba(9,20,19,.09);
}

.dashboard-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--black);
    color: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dashboard-card-content span {
    display: block;
    color: var(--black);
    font-size: .92rem;
    font-weight: 700;
}

.dashboard-card-content h2 {
    font-size: 1.85rem;
    font-weight: 900;
    margin: 2px 0;
    line-height: 1.1;
}

.dashboard-card-content p {
    margin: 0;
    color: var(--gray);
    font-size: .9rem;
}

.dashboard-panel {
    width: 100%;
    height: 100%;
    padding: 24px;
    border-radius: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 12px 34px rgba(9,20,19,.05);
}

.panel-header h4,
.dashboard-panel h4 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.panel-header p,
.dashboard-panel p {
    color: var(--gray);
    font-size: .92rem;
    margin-bottom: 22px;
}

/* ===== Quick Admin ===== */

.quick-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-admin-grid a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--black);
    font-size: .95rem;
    font-weight: 700;
}

.quick-admin-grid a i {
    font-size: 1.15rem;
    color: var(--black);
}

.quick-admin-grid a:hover {
    background: var(--yellow);
    transform: translateY(-3px);
}

/* ===== Dark Panel / System Status ===== */

.dark-panel {
    background: var(--black);
    color: var(--white);
    border: 0;
}

.dark-panel h4 {
    color: var(--white);
}

.dark-panel p {
    color: rgba(255,255,255,.72);
}

.system-status {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.system-status div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 15px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
}

.system-status span {
    color: rgba(255,255,255,.75);
}

.system-status strong {
    color: var(--yellow);
}

/* ===== Admin Login Page ===== */

.admin-wrap:has(.admin-login-split) {
    display: block !important;
    min-height: 100vh !important;
}

.admin-login-body {
    margin: 0;
    min-height: 100vh;
    background: var(--cream);
    overflow-x: hidden;
}

.admin-login-body .admin-login-split,
.admin-login-split {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 40% 60%;
    background: var(--cream);
}

.admin-login-body .login-welcome-panel,
.login-welcome-panel {
    min-height: 100vh;
    width: 100%;
    position: relative;
    background:
        radial-gradient(circle at 18% 12%, rgba(228,211,41,.26), transparent 30%),
        radial-gradient(circle at 85% 92%, rgba(228,211,41,.16), transparent 32%),
        var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.admin-login-body .login-welcome-panel::before,
.admin-login-body .login-welcome-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(228,211,41,.13);
}

.admin-login-body .login-welcome-panel::before {
    width: 280px;
    height: 280px;
    left: -90px;
    top: -90px;
}

.admin-login-body .login-welcome-panel::after {
    width: 360px;
    height: 360px;
    right: -140px;
    bottom: -120px;
}

.admin-login-body .login-welcome-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    text-align: center;
    color: var(--white);
    padding: 38px;
}

.admin-login-body .welcome-logo {
    width: 112px;
    height: 112px;
    margin: 0 auto 26px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 20px 55px rgba(0,0,0,.28),
        0 0 0 10px rgba(228,211,41,.18);
}

.admin-login-body .welcome-logo img {
    width: 86px;
    height: 86px;
    object-fit: contain;
}

.admin-login-body .login-welcome-content h1 {
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 20px;
}

.admin-login-body .login-welcome-content p {
    font-size: 1rem;
    line-height: 1.85;
    color: rgba(255,255,255,.82);
    margin-bottom: 26px;
}

.admin-login-body .login-welcome-content span {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    color: var(--yellow);
    font-weight: 900;
}

.admin-login-body .login-form-panel,
.login-form-panel {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
}

.admin-login-body .login-modern-card,
.login-modern-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    padding: 44px;
    border-radius: 32px;
    box-shadow: 0 24px 70px rgba(9,20,19,.10);
    border: 1px solid var(--border);
}

.admin-login-body .login-mobile-logo {
    display: none;
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--white);
    align-items: center;
    justify-content: center;
    box-shadow:
        0 14px 36px rgba(9,20,19,.14),
        0 0 0 6px rgba(228,211,41,.18);
}

.admin-login-body .login-mobile-logo img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.admin-login-body .login-modern-card h3 {
    text-align: center;
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--black);
    margin-bottom: 8px;
}

.admin-login-body .login-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 28px;
}

.admin-login-body .login-input-group {
    margin-bottom: 18px;
}

.admin-login-body .login-input-group label {
    font-weight: 800;
    margin-bottom: 8px;
    display: block;
    color: var(--black);
}

.admin-login-body .login-input {
    height: 52px;
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--white);
}

.admin-login-body .login-input i {
    font-size: 1.1rem;
    color: var(--gray);
    margin-right: 12px;
}

.admin-login-body .login-input input {
    border: 0;
    outline: none;
    width: 100%;
    font-size: .95rem;
    background: transparent;
    color: var(--black);
}

.admin-login-body .login-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: var(--yellow);
    color: var(--black);
    font-weight: 900;
    margin-top: 10px;
}

.admin-login-body .login-hint {
    margin-top: 22px;
    text-align: center;
    color: var(--gray);
    font-size: .9rem;
}

/* ===== Admin Footer ===== */

.admin-footer {
    width: 100%;
    margin-top: 36px;
    padding: 15px 20px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: .88rem;
    box-shadow: 0 8px 26px rgba(9,20,19,.04);
}

.admin-footer strong {
    color: var(--black);
}

/* ===== Tablet ===== */

@media (max-width: 992px) {
    .sidebar {
        top: 16px;
        left: 16px;
        bottom: 16px;
        width: 240px;
        height: auto;
        border-radius: 24px;
        box-shadow: 0 24px 70px rgba(0,0,0,.35);
        transition: .3s ease;
    }

    .sidebar.collapsed {
        width: 76px !important;
        padding-left: 14px;
        padding-right: 14px;
    }

    .sidebar.collapsed .brand span,
    .sidebar.collapsed a span {
        display: none !important;
    }

    .sidebar.collapsed a {
        justify-content: center;
        padding: 12px 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .admin-main {
        margin-left: 108px;
        width: calc(100% - 108px);
        padding: 22px;
    }

    .sidebar:not(.collapsed) ~ .admin-main {
        margin-left: 286px;
        width: calc(100% - 286px);
    }

    .form-card,
    .card-table {
        padding: 22px;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-wrap:has(.admin-login-split) {
        display: block !important;
    }

    .admin-login-body .admin-login-split,
    .admin-login-split {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
    }

    .admin-login-body .login-welcome-panel,
    .login-welcome-panel {
        display: none !important;
    }

    .admin-login-body .login-form-panel,
    .login-form-panel {
        width: 100%;
        min-height: 100vh;
        padding: 0;
    }

    .admin-login-body .login-modern-card,
    .login-modern-card {
        max-width: 430px;
        padding: 34px 26px;
        border-radius: 28px;
    }

    .admin-login-body .login-mobile-logo {
        display: flex;
    }
}

/* ===== Mobile ===== */

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .sidebar {
        top: 12px;
        left: 12px;
        bottom: 12px;
        width: 220px;
        border-radius: 22px;
    }

    .sidebar.collapsed {
        width: 72px !important;
    }

    .admin-main {
        margin-left: 96px;
        width: calc(100% - 96px);
        padding: 16px;
    }

    .sidebar:not(.collapsed) ~ .admin-main {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .admin-main > h2 {
        font-size: 1.45rem;
    }

    .form-card,
    .card-table {
        padding: 18px;
        border-radius: 20px;
    }

    textarea.form-control {
        min-height: 160px;
    }

    .quick-admin-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        min-height: auto;
    }

    .dashboard-card-content h2 {
        font-size: 1.55rem;
    }

    .admin-footer {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
}
.dashboard-hero h1 {
    margin: 6px 0;
    font-size: 2rem;
    font-weight: 900;
}

.dashboard-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(228,211,41,.18);
    color: var(--black);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .6px;
}

.dark-panel .dashboard-kicker {
    background: rgba(255,255,255,.1);
    color: var(--yellow);
}

.dashboard-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--soft);
    border: 1px solid var(--border);
}

.dashboard-profile i {
    font-size: 2rem;
    color: var(--black);
}

.dashboard-profile strong,
.dashboard-profile small {
    display: block;
}

.dashboard-profile small {
    color: var(--gray);
}

.dashboard-card-modern {
    position: relative;
    overflow: hidden;
}

.dashboard-card-modern::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    right: -35px;
    top: -35px;
    border-radius: 50%;
    background: rgba(228,211,41,.22);
}

.dashboard-latest-list {
    display: grid;
    gap: 12px;
}

.dashboard-latest-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--border);
    color: var(--black);
    text-decoration: none;
}

.dashboard-latest-list a:hover {
    background: rgba(228,211,41,.18);
}

.dashboard-latest-list strong,
.dashboard-latest-list small {
    display: block;
}

.dashboard-latest-list small {
    color: var(--gray);
    font-size: .85rem;
}

.admin-pagination .page-link {
    color: var(--black);
    border-radius: 12px;
    margin: 0 3px;
    border: 1px solid var(--border);
    font-weight: 700;
}

.admin-pagination .page-item.active .page-link {
    background: var(--black);
    border-color: var(--black);
    color: var(--yellow);
}

.admin-pagination .page-item.disabled .page-link {
    color: #aaa;
}
.form-help {
    display: block;
    margin-top: 7px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #f8f9fa;
    color: #6b7280;
    font-size: .86rem;
    line-height: 1.65;
    border: 1px solid #e5e7eb;
}

.form-help::before {
    content: "คำแนะนำ: ";
    font-weight: 800;
    color: #212529;
}
.admin-list-toolbar {
    display: flex;
    justify-content: flex-end;
}

.admin-crud-table {
    table-layout: fixed;
    width: 100%;
}

.admin-crud-table th,
.admin-crud-table td {
    vertical-align: middle;
}

.admin-crud-table .col-order {
    width: 70px;
    text-align: center;
}

.admin-crud-table .col-action {
    width: 120px;
}

.admin-crud-table .field-title {
    width: 150px;
}

.admin-crud-table .field-icon {
    width: 140px;
}

.admin-crud-table .field-link,
.admin-crud-table .field-url {
    width: 42%;
}

.admin-crud-table .field-sort_order {
    width: 120px;
    text-align: center;
}

.admin-link-cell {
    display: inline-block;
    max-width: 100%;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.admin-link-cell:hover {
    color: #d4a900;
    text-decoration: underline;
}

.admin-icon-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
}

.admin-icon-preview i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    background: #111;
    color: #ffd84d;
    flex: 0 0 auto;
}

.admin-icon-preview span {
    display: inline-block;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-action-buttons {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {

    .admin-crud-table {
        min-width: 900px;
    }
}
/* =========================================================
   ADMIN LOGIN - LARGE TYPOGRAPHY OVERRIDE
   วางไว้ท้ายสุดของ admin.css
========================================================= */

/* ---------------------------------------------------------
   LEFT PANEL
--------------------------------------------------------- */

.admin-login-body .login-welcome-content {
    max-width: 480px;
}

.admin-login-body .welcome-logo {
    width: 140px;
    height: 140px;
    margin-bottom: 34px;
}

.admin-login-body .welcome-logo img {
    width: 108px;
    height: 108px;
}

.admin-login-body .login-welcome-content h1 {
    font-size: 38px !important;
    line-height: 1.25;
    font-weight: 900;
    margin-bottom: 26px;
}

.admin-login-body .login-welcome-content p {
    font-size: 18px !important;
    line-height: 1.9;
    margin-bottom: 32px;
}

.admin-login-body .login-welcome-content span {
    font-size: 17px !important;
    padding: 12px 28px;
}


/* ---------------------------------------------------------
   RIGHT PANEL / LOGIN CARD
--------------------------------------------------------- */

.admin-login-body .login-modern-card {
    max-width: 560px;
    padding: 54px 52px;
}


/* หัวข้อเข้าสู่ระบบ */

.admin-login-body .login-modern-card h3 {
    font-size: 34px !important;
    line-height: 1.25;
    font-weight: 900;
    margin-bottom: 12px;
}


/* คำอธิบายใต้หัวข้อ */

.admin-login-body .login-subtitle {
    font-size: 18px !important;
    line-height: 1.7;
    margin-bottom: 38px;
}


/* ---------------------------------------------------------
   FORM LABEL
--------------------------------------------------------- */

.admin-login-body .login-input-group {
    margin-bottom: 26px;
}

.admin-login-body .login-input-group label {
    font-size: 18px !important;
    font-weight: 800;
    margin-bottom: 10px;
}


/* ---------------------------------------------------------
   INPUT
--------------------------------------------------------- */

.admin-login-body .login-input {
    height: 66px;
    padding: 0 20px;
    border-radius: 18px;
}

.admin-login-body .login-input i {
    font-size: 22px !important;
    margin-right: 16px;
}

.admin-login-body .login-input input {
    font-size: 18px !important;
    font-weight: 500;
}

.admin-login-body .login-input input::placeholder {
    font-size: 17px !important;
}


/* ---------------------------------------------------------
   BUTTON
--------------------------------------------------------- */

.admin-login-body .login-submit {
    height: 64px;
    margin-top: 14px;

    font-size: 19px !important;
    font-weight: 900;

    border-radius: 18px;
}


/* ---------------------------------------------------------
   LOGIN HINT
--------------------------------------------------------- */

.admin-login-body .login-hint {
    margin-top: 28px;

    font-size: 16px !important;
    line-height: 1.6;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 992px) {

    .admin-login-body .login-modern-card {
        max-width: 540px;
        padding: 46px 40px;
    }

    .admin-login-body .login-modern-card h3 {
        font-size: 32px !important;
    }

    .admin-login-body .login-subtitle {
        font-size: 17px !important;
    }

    .admin-login-body .login-input-group label {
        font-size: 17px !important;
    }

    .admin-login-body .login-input input {
        font-size: 17px !important;
    }

    .admin-login-body .login-submit {
        font-size: 18px !important;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    .admin-login-body .login-modern-card {
        padding: 34px 24px;
    }

    .admin-login-body .login-mobile-logo {
        width: 86px;
        height: 86px;
    }

    .admin-login-body .login-mobile-logo img {
        width: 66px;
        height: 66px;
    }

    .admin-login-body .login-modern-card h3 {
        font-size: 28px !important;
    }

    .admin-login-body .login-subtitle {
        font-size: 16px !important;
        margin-bottom: 28px;
    }

    .admin-login-body .login-input-group label {
        font-size: 16px !important;
    }

    .admin-login-body .login-input {
        height: 58px;
    }

    .admin-login-body .login-input i {
        font-size: 20px !important;
    }

    .admin-login-body .login-input input {
        font-size: 16px !important;
    }

    .admin-login-body .login-submit {
        height: 58px;
        font-size: 17px !important;
    }

    .admin-login-body .login-hint {
        font-size: 14px !important;
    }

}
/* =========================================================
   PERSONNEL FORM
========================================================= */

.personnel-form-page {
    width: 100%;
    padding-bottom: 30px;
}


/* Header */

.personnel-form-header {
    margin-bottom: 24px;
}

.personnel-form-kicker {
    display: inline-flex;

    margin-bottom: 5px;

    color: var(--gray);

    font-size: .82rem;
    font-weight: 900;

    letter-spacing: .08em;
}

.personnel-form-header h2 {
    margin: 0 0 4px;

    color: var(--black);

    font-size: 2rem;
    font-weight: 900;
}

.personnel-form-header p {
    margin: 0;

    color: var(--gray);

    font-size: .95rem;
}


/* Main Card */

.personnel-form-card {
    padding: 30px;
}


/* Sections */

.personnel-form-section {
    padding-bottom: 28px;

    margin-bottom: 28px;

    border-bottom: 1px solid var(--border);
}

.personnel-form-section:last-of-type {
    border-bottom: 0;
}


/* Section Header */

.personnel-form-section-head {
    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 22px;
}

.personnel-section-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: var(--black);
    color: var(--yellow);

    font-size: 1.2rem;
}

.personnel-form-section-head h3 {
    margin: 0 0 2px;

    color: var(--black);

    font-size: 1.12rem;
    font-weight: 900;
}

.personnel-form-section-head p {
    margin: 0;

    color: var(--gray);

    font-size: .88rem;
}


/* Grid */

.personnel-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.personnel-field-full {
    grid-column: 1 / -1;
}


/* Fields */

.personnel-form-field label,
.personnel-upload-field label {
    display: block;

    margin-bottom: 8px;

    color: var(--black);

    font-size: .96rem;
    font-weight: 800;
}

.personnel-form-field .form-control,
.personnel-form-field .form-select,
.personnel-upload-field .form-control {
    min-height: 50px;

    padding: 10px 14px;

    border-radius: 14px;
}

.required {
    color: var(--danger);
}


/* Help */

.personnel-form-help {
    display: block;

    margin-top: 7px;

    color: var(--gray);

    font-size: .82rem;
}


/* Image */

.personnel-image-upload {
    display: flex;
    align-items: flex-start;

    gap: 24px;
}

.personnel-current-image {
    flex: 0 0 160px;
}

.personnel-current-image span {
    display: block;

    margin-bottom: 8px;

    color: var(--gray);

    font-size: .84rem;
    font-weight: 700;
}

.personnel-current-image img {
    width: 150px;
    height: 180px;

    object-fit: cover;

    object-position: top center;

    border-radius: 18px;

    border: 1px solid var(--border);

    box-shadow:
        0 10px 28px rgba(9,20,19,.08);
}

.personnel-upload-field {
    flex: 1;
}


/* Actions */

.personnel-form-actions {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 5px;
}

.personnel-save-btn,
.personnel-cancel-btn {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 10px 20px;

    border-radius: 14px;

    font-weight: 800;
}

.personnel-cancel-btn {
    background: var(--white);

    color: var(--black);

    border: 1px solid var(--border);
}

.personnel-cancel-btn:hover {
    background: var(--soft);

    color: var(--black);
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 768px) {

    .personnel-form-card {
        padding: 22px;
    }

    .personnel-form-grid {
        grid-template-columns: 1fr;
    }

    .personnel-field-full {
        grid-column: auto;
    }

    .personnel-image-upload {
        flex-direction: column;
    }

}


@media (max-width: 576px) {

    .personnel-form-header h2 {
        font-size: 1.65rem;
    }

    .personnel-form-card {
        padding: 18px;
    }

    .personnel-form-section-head {
        align-items: flex-start;
    }

    .personnel-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .personnel-save-btn,
    .personnel-cancel-btn {
        width: 100%;
    }

}
/* =========================================================
   PERSONNEL ADMIN FILTER
========================================================= */

.admin-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-list-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}


/* ---------------------------------------------------------
   Personnel Filter Form
--------------------------------------------------------- */

.admin-personnel-filter-form {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(230px, 320px)
        minmax(300px, 1fr)
        auto;

    align-items: end;

    gap: 12px;
}


.admin-personnel-group-filter,
.admin-search-input-wrap {
    min-width: 0;
}


.admin-personnel-group-filter label,
.admin-search-input-wrap label {
    display: block;

    margin-bottom: 7px;

    color: var(--black);

    font-size: .9rem;
    font-weight: 800;
}


.admin-personnel-filter-form .form-select,
.admin-personnel-filter-form .form-control {
    width: 100%;
    min-height: 52px;

    border: 1px solid var(--border);
    border-radius: 15px;

    font-size: .95rem;

    background-color: var(--white);
}


.admin-personnel-filter-form .form-select:focus,
.admin-personnel-filter-form .form-control:focus {
    border-color: var(--yellow);

    box-shadow:
        0 0 0 4px rgba(228,211,41,.12);
}


/* ---------------------------------------------------------
   Search Buttons
--------------------------------------------------------- */

.admin-search-actions {
    display: flex;
    align-items: center;

    gap: 8px;
}


.admin-search-actions .btn {
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding-left: 18px;
    padding-right: 18px;

    white-space: nowrap;
}


/* ---------------------------------------------------------
   Filter Information
--------------------------------------------------------- */

.admin-personnel-filter-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-top: 16px;

    padding: 12px 16px;

    border-radius: 14px;

    background:
        rgba(228,211,41,.12);

    border:
        1px solid rgba(228,211,41,.25);

    color: var(--black);

    font-size: .9rem;
}


.admin-personnel-filter-info > div {
    display: flex;
    align-items: center;

    gap: 8px;
}


.admin-personnel-filter-info i {
    color: var(--black);

    font-size: 1rem;
}


.admin-result-range {
    color: var(--gray);

    font-size: .85rem;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1100px) {

    .admin-personnel-filter-form {
        grid-template-columns:
            minmax(200px, 280px)
            1fr;
    }

    .admin-search-actions {
        grid-column: 1 / -1;

        justify-content: flex-end;
    }

}


@media (max-width: 768px) {

    .admin-list-header {
        flex-direction: column;
    }

    .admin-list-header .btn-yellow {
        align-self: flex-start;
    }


    .admin-personnel-filter-form {
        grid-template-columns: 1fr;
    }


    .admin-search-actions {
        grid-column: auto;

        justify-content: stretch;
    }


    .admin-search-actions .btn {
        flex: 1;
    }


    .admin-personnel-filter-info {
        flex-direction: column;
        align-items: flex-start;
    }

}


@media (max-width: 576px) {

    .admin-search-actions {
        flex-direction: column;
    }


    .admin-search-actions .btn {
        width: 100%;
    }

}

/* =========================================================
   SLIDER IMAGE GUIDE
========================================================= */

.slider-image-guide {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 16px 18px;

    border-radius: 15px;

    background: rgba(228, 211, 41, .10);

    border: 1px solid rgba(228, 211, 41, .30);

    color: var(--black);
}

.slider-image-guide-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--black);
    color: var(--yellow);

    font-size: 1.1rem;
}

.slider-image-guide strong {
    font-weight: 900;
}

.slider-image-guide ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.slider-image-guide li {
    margin-bottom: 4px;

    color: var(--gray);

    font-size: .9rem;
    line-height: 1.6;
}

.slider-image-guide li strong {
    color: var(--black);
}
/* =========================================================
   ADMIN SEARCH
   Label + Input + Button อยู่บรรทัดเดียวกัน และชิดขวา
========================================================= */

.admin-search-form {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 12px;

    margin-left: auto;
}


/* กลุ่ม Label + Input */

.admin-search-form .admin-search-group {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 0;
}


/* คำว่า ค้นหาข้อมูล */

.admin-search-form label {
    margin: 0;

    font-size: 1rem;
    font-weight: 800;

    color: var(--black);

    white-space: nowrap;
}


/* ช่องค้นหา */

.admin-search-form .form-control {
    width: 300px;
    height: 54px;

    padding: 0 18px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: #fff;

    font-size: 1rem;

    transition: .2s ease;
}

.admin-search-form .form-control:focus {
    border-color: var(--yellow);

    box-shadow:
        0 0 0 4px rgba(228, 211, 41, .12);
}


/* ปุ่มค้นหา */

.admin-search-form .btn-dark {
    height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 22px;

    border-radius: 15px;

    font-size: 1rem;
    font-weight: 800;

    white-space: nowrap;
}


/* Icon */

.admin-search-form .btn-dark i {
    font-size: 1.05rem;
}


/* ปุ่มล้างค้นหา */

.admin-search-form .btn-outline-secondary {
    height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    border-radius: 15px;

    white-space: nowrap;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    .admin-search-form {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-search-form .admin-search-group {
        flex: 1;
    }

    .admin-search-form .form-control {
        width: 100%;
        min-width: 220px;
    }

}


@media (max-width: 576px) {

    .admin-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search-form .admin-search-group {
        flex-direction: column;
        align-items: stretch;

        gap: 7px;
    }

    .admin-search-form .form-control {
        width: 100%;
    }

    .admin-search-form .btn-dark,
    .admin-search-form .btn-outline-secondary {
        width: 100%;
    }

}