/* Admin 2 only. Not shared with the old admin. */

:root {
    --a2-red: #CC0000;
    --a2-red-dark: #990000;
    --a2-red-light: #e53939;
    --a2-red-bright: #ff4d4d;
    /* ปุ่ม/หัวตาราง: ไล่สีซ้าย→ขวา เฉพาะ #C40001 → #7A0001 */
    --a2-grad: linear-gradient(90deg, #C40001 0%, #7A0001 100%);
    --a2-grad-hover: linear-gradient(90deg, #C40001 0%, #7A0001 100%);
    --a2-grad-x: linear-gradient(90deg, #C40001 0%, #7A0001 100%);
    --a2-grad-x-soft: linear-gradient(90deg, #C40001 0%, #7A0001 100%);
    --a2-rail-bg: linear-gradient(180deg, #d01212 0%, #b00808 48%, #7a0000 100%);
    --a2-ink: #243044;
    --a2-muted: #8b93a1;
    --a2-line: #e7ebf0;
    --a2-bg: #f4f6f8;
    --a2-page:
        radial-gradient(ellipse 85% 60% at -6% -8%, rgba(255, 168, 168, 0.55) 0%, transparent 58%),
        radial-gradient(ellipse 60% 50% at 108% -6%, rgba(255, 150, 150, 0.38) 0%, transparent 54%),
        linear-gradient(180deg, #fff4f4 0%, #fde8e8 100%);
    --a2-card: #fff;
    --a2-rail: 64px;
    --a2-panel-w: 236px;
    --a2-side: calc(var(--a2-rail) + var(--a2-panel-w));
    --a2-pill: 999px;
    --a2-btn-shadow: 0 6px 14px rgba(196, 0, 1, 0.24);
}

* { box-sizing: border-box; }

body.a2 {
    margin: 0;
    min-height: 100vh;
    color: var(--a2-ink);
    background: var(--a2-page);
    background-attachment: fixed;
    font-family: "Sarabun", "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }

.a2-app {
    min-height: 100vh;
}

/* โครงสร้าง 2 ชั้น: แถบไอคอนแคบ + แผงเมนูของไอคอนที่เลือก (แบบในภาพตัวอย่าง) */
.a2-side {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(var(--a2-side), 94vw);
    display: flex;
    align-items: stretch;
    background: #fff;
    color: var(--a2-ink);
    border-right: 1px solid var(--a2-line);
    box-shadow: 8px 0 28px rgba(28, 35, 48, 0.05);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
}

.a2-main { transition: margin-left 0.28s cubic-bezier(0.22, 1, 0.36, 1); }

.a2-side.is-open { transform: none; }

/* --- แถบไอคอน (ซ้ายสุด) --- */
.a2-rail {
    width: var(--a2-rail);
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 0 10px;
    border-right: 0;
    background: var(--a2-rail-bg);
    color: #fff;
    box-shadow: inset 0 -10px 16px rgba(0, 0, 0, 0.14);
}

/* โลโก้บนแถบไอคอน (ไม่มีพื้นหลังสี) — ขอบบนตรงกับชื่อหน่วยงานในแผงเมนู */
.a2-rail__logo {
    width: 42px;
    height: 42px;
    flex: none;
    margin-bottom: 10px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--a2-red);
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    overflow: hidden;
}

.a2-rail__logo img { width: 100%; height: 100%; object-fit: contain; }

.a2-rail__nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.a2-rail__nav::-webkit-scrollbar { display: none; }

.a2-rail__foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.a2-rail__foot form { display: contents; }

.a2-rail__unfold { display: none; }

.a2-rail__btn {
    position: relative;
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.a2-rail__btn svg { width: 19px; height: 19px; }

.a2-rail__btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.a2-rail__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.a2-rail__btn.is-active {
    background: #fff;
    color: var(--a2-red);
    box-shadow: 0 6px 14px rgba(80, 0, 0, 0.18);
}

/* tooltip ชื่อกลุ่มเมื่อชี้ไอคอน (เฉพาะจอใหญ่ที่ชี้ได้แม่น) */
@media (hover: hover) and (min-width: 1100px) {
    .a2-rail__btn[data-label]::after {
        content: attr(data-label);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        z-index: 40;
        padding: 5px 9px;
        border-radius: 8px;
        background: var(--a2-ink);
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transform: translate(-4px, -50%);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .a2-rail__btn[data-label]:hover::after,
    .a2-rail__btn[data-label]:focus-visible::after {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

/* --- แผงเมนูของกลุ่มที่เลือก --- */
.a2-side .a2-menupanel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.a2-menupanel__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    /* padding-top เท่ากับแถบไอคอน ให้ขอบบนโลโก้ตรงกับบรรทัดแรกของชื่อหน่วยงาน */
    padding: 14px 14px 10px;
}

.a2-menupanel__brand { min-width: 0; }

.a2-menupanel__brand strong { display: block; }

.a2-menupanel__brand strong {
    font-size: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.a2-menupanel__close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #f4f6f8;
    color: var(--a2-ink);
    cursor: pointer;
}

.a2-menupanel__close svg { width: 14px; height: 14px; }

.a2-menupanel__body {
    flex: 1;
    overflow-y: auto;
    padding: 2px 10px 10px;
    scrollbar-width: thin;
    scrollbar-color: #d5dae2 transparent;
}

.a2-menupanel__label {
    margin: 6px 8px;
    color: var(--a2-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.a2-menu { display: grid; gap: 0; }

.a2-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 2px 8px;
    border-radius: 12px;
    color: #5d6675;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.a2-mico {
    width: 22px;
    height: 22px;
    flex: none;
    display: grid;
    place-items: center;
    color: currentColor;
    background: none;
}

.a2-menu a .a2-mico svg,
.a2-mico svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.a2-menu a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-menu a span:last-child {
    white-space: normal;
    line-height: 1.25;
}

.a2-menu a.is-child {
    margin-left: 14px;
    min-height: 34px;
}

.a2-menu a.is-child .a2-mico {
    width: 18px;
    height: 18px;
}

.a2-menu a.is-child .a2-mico svg {
    width: 14px;
    height: 14px;
}

.a2-menu a:hover { background: #f6f7fa; color: var(--a2-ink); }

.a2-menu a.is-active {
    background: #fdeeee;
    color: var(--a2-red);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .a2-side, .a2-main, .a2-rail__btn, .a2-menu a { transition: none; }
}

.a2-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    background: rgba(20, 16, 18, 0.45);
}

.a2-main {
    min-width: 0;
    min-height: 100vh;
}

.a2-top {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 14px 22px;
    background: var(--a2-page);
    background-attachment: fixed;
}

.a2-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.a2-topback,
.a2-iconbtn {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
}

.a2-iconbtn {
    background: #fff;
    box-shadow: 0 1px 2px rgba(36, 48, 68, 0.05);
}

.a2-topback:hover,
.a2-iconbtn:hover { background: #fff; color: var(--a2-ink); }

.a2-topback svg,
.a2-iconbtn svg { width: 18px; height: 18px; }

.a2-topback svg { transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1); }

@media (max-width: 1099px) {
    .a2-topback svg { transform: rotate(180deg); }
    body.a2:has(.a2-side.is-open) .a2-topback svg { transform: none; }
}

@media (min-width: 1100px) {
    body.a2.is-rail .a2-topback svg { transform: rotate(180deg); }
}

.a2-theme__sun { display: none; }
body.a2.is-dark .a2-theme__moon { display: none; }
body.a2.is-dark .a2-theme__sun { display: block; }

.a2-topsearch {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
    max-width: 560px;
}

.a2-topsearch input[type="search"] {
    width: 100%;
    height: 46px;
    padding: 0 52px 0 18px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--a2-ink);
    box-shadow: 0 1px 2px rgba(36, 48, 68, 0.05);
}

.a2-topsearch input[type="search"]::placeholder { color: #9aa3b2; }

.a2-topsearch input[type="search"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

.a2-topsearch input[type="search"]::-webkit-search-cancel-button { display: none; }

.a2-topsearch button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--a2-red);
    color: #fff;
    cursor: pointer;
}

.a2-topsearch button svg { width: 16px; height: 16px; }

.a2-topsearch__list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 6px;
    border: 1px solid var(--a2-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(28, 35, 48, 0.12);
}

.a2-topsearch__list a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.a2-topsearch__list a:hover,
.a2-topsearch__list a.is-active { background: #f7f8fa; }

.a2-burger {
    width: 42px;
    height: 42px;
    display: grid;
    gap: 5px;
    place-content: center;
    border: 0;
    border-radius: 12px;
    background: #f6f7f9;
    cursor: pointer;
}

.a2-burger span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--a2-ink);
}

.a2-top__title { min-width: 0; }

.a2-top__title strong,
.a2-top__title small { display: block; }

.a2-top__title strong { font-size: 18px; }

.a2-top__title small {
    color: var(--a2-muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.a2-top__tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.a2-bell {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #5d6675;
    background: #f4f6f8;
}

.a2-bell svg { width: 18px; height: 18px; }

.a2-avatar {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--a2-red);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.a2-avatar--lg {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 18px;
}

.a2-user { position: relative; }

.a2-user summary {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    cursor: pointer;
}

.a2-user__chev {
    width: 16px;
    height: 16px;
    flex: none;
    color: #9aa3b2;
}

.a2-user summary::-webkit-details-marker { display: none; }

.a2-user__meta strong,
.a2-user__meta small { display: block; }

.a2-user__meta strong { font-size: 14px; line-height: 1.2; }

.a2-user__meta small { color: var(--a2-muted); font-size: 12px; }

.a2-user__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 180px;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--a2-line);
    box-shadow: 0 12px 30px rgba(28, 35, 48, 0.12);
}

.a2-user__menu a,
.a2-user__menu button {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.a2-user__menu a:hover,
.a2-user__menu button:hover { background: #f7f8fa; }

.a2-content { padding: 16px; }

/* การ์ดที่เรียงลงมาให้ห่างกันทุกหน้า — ไม่ทับช่องของผังบุคลากร */
.a2-content:not(:has(.a2-org)) {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.a2-content:not(:has(.a2-org)) > .a2-alert,
.a2-content:not(:has(.a2-org)) > .a2-hint,
.a2-content:not(:has(.a2-org)) > .a2-hello,
.a2-content:not(:has(.a2-org)) > .a2-stats,
.a2-content:not(:has(.a2-org)) > .a2-grid,
.a2-content:not(:has(.a2-org)) > .a2-mnu-top,
.a2-content:not(:has(.a2-org)) > .a2-mnu-list,
.a2-content:not(:has(.a2-org)) > .a2-logpanel,
.a2-content:not(:has(.a2-org)) > .a2-sum,
.a2-content:not(:has(.a2-org)) > .a2-post-bar,
.a2-content:not(:has(.a2-org)) > .a2-panel,
.a2-content:not(:has(.a2-org)) > .a2-cards {
    margin-top: 0;
    margin-bottom: 0;
}

.a2-content form:not(.a2-settings):has(> .a2-panel + .a2-panel) {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.a2-hello {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.16) 0 70px, transparent 71px),
        radial-gradient(circle at 8% 90%, rgba(255, 255, 255, 0.1) 0 60px, transparent 61px),
        linear-gradient(100deg, #CC0000 0%, #b00000 55%, #990000 100%);
}

.a2-hello__who {
    display: flex;
    gap: 12px;
    align-items: center;
}

.a2-hello__who p,
.a2-hello__who strong,
.a2-hello__who small { display: block; margin: 0; }

.a2-hello__who p { font-size: 13px; opacity: 0.85; }

.a2-hello__who strong { font-size: 22px; line-height: 1.25; }

.a2-hello__who small { margin-top: 2px; font-size: 13px; opacity: 0.88; }

.a2-hello__time {
    min-width: 150px;
    padding: 10px 16px;
    border-radius: 14px;
    text-align: right;
    background: rgba(120, 8, 24, 0.22);
}

.a2-hello__time strong,
.a2-hello__time small { display: block; }

.a2-hello__time strong { font-size: 32px; letter-spacing: 0.03em; }

.a2-hello__time small { font-size: 13px; opacity: 0.9; }

.a2-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
}

.a2-stat {
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 104px;
    padding: 16px;
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
}

.a2-stat::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -28px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.a2-stat--teal { background: linear-gradient(135deg, #1aa8a4, #128f8c); }
.a2-stat--green { background: linear-gradient(135deg, #46c17a, #2ea564); }
.a2-stat--orange { background: linear-gradient(135deg, #f6b034, #ef9612); }
.a2-stat--red { background: linear-gradient(135deg, #ef6a6a, #e24b4b); }

.a2-stat__icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}

.a2-stat__icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

.a2-stat__mark {
    position: absolute;
    right: -8px;
    bottom: -18px;
    width: 110px;
    height: 110px;
    opacity: 0.16;
    pointer-events: none;
    transition: transform .28s ease, opacity .28s ease;
}

.a2-stat__mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.a2-stat__copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.a2-stat:hover .a2-stat__icon {
    transform: translateY(-4px) scale(1.12) rotate(-6deg);
    background: rgba(255, 255, 255, 0.32);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    animation: a2-stat-icon-bob .7s ease;
}

.a2-stat:hover .a2-stat__mark {
    opacity: 0.24;
    transform: translate(-6px, -8px) scale(1.08) rotate(8deg);
}

@keyframes a2-stat-icon-bob {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    40% { transform: translateY(-8px) scale(1.16) rotate(-8deg); }
    100% { transform: translateY(-4px) scale(1.12) rotate(-6deg); }
}

.a2-stat strong,
.a2-stat b,
.a2-stat small { display: block; position: relative; }

.a2-stat strong { font-size: 28px; line-height: 1; }

.a2-stat b { margin-top: 4px; font-size: 15px; }

.a2-stat small { opacity: 0.9; font-size: 12px; }

.a2-grid {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.a2-panel {
    background: var(--a2-card);
    border: 1px solid #eef1f4;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.04);
    padding: 16px;
}

.a2-panel__head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.a2-panel__head h2,
.a2-panel__head h3 {
    margin: 0;
    font-size: 16px;
}

.a2-panel__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.a2-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

body.a2.is-dark .a2-count {
    background: #1f2430;
    color: #d1d5db;
}

.a2-panel__head a {
    color: var(--a2-red);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.a2-disk-panel { margin-top: 0; }

.a2-disk {
    display: grid;
    justify-items: center;
    gap: 16px;
}

.a2-disk__size { margin: 0 0 10px; font-size: 15px; }

.a2-disk__size strong { color: var(--a2-red); font-size: 17px; }

.a2-disk__free { margin: 8px 0 0; font-size: 13px; }

.a2-ring {
    position: relative;
    width: 150px;
    height: 150px;
}

.a2-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.a2-ring__track,
.a2-ring__value {
    fill: none;
    stroke-width: 10;
}

.a2-ring__track { stroke: #f3e4e7; }

.a2-ring__value {
    stroke: var(--a2-red);
    stroke-linecap: round;
    stroke-dasharray: 301.6;
    stroke-dashoffset: calc(301.6 - (301.6 * var(--a2-pct) / 100));
}

.a2-ring div {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
}

.a2-ring strong { font-size: 28px; color: var(--a2-red); }

.a2-ring small { color: var(--a2-muted); }

.a2-meter { width: min(100%, 280px); }

.a2-meter__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--a2-muted);
    font-size: 13px;
}

.a2-meter__bar {
    height: 8px;
    border-radius: 99px;
    background: #f3e4e7;
    overflow: hidden;
}

.a2-meter__bar span {
    display: block;
    height: 100%;
    background: var(--a2-red);
}

.a2-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.a2-feed li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--a2-line);
}

.a2-feed strong,
.a2-feed small { display: block; }

.a2-feed small { color: var(--a2-muted); font-size: 12px; }

.a2-feed__mark {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    flex: none;
    border-radius: 99px;
    background: var(--a2-red);
}

.a2-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #b0b6c0;
    text-align: center;
}

.a2-empty svg { width: 42px; height: 42px; }

.a2-empty p { margin: 0; }

.a2-search {
    display: flex;
    gap: 8px;
}

.a2-search input {
    width: min(240px, 52vw);
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background: #f8f9fb;
}

.a2-search button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--a2-red);
    color: #fff;
    cursor: pointer;
}

.a2-tablewrap {
    overflow-x: auto;
    overflow-y: clip;
}

.a2-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.a2-table th,
.a2-table td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f6;
}

.a2-table th {
    color: var(--a2-muted);
    font-size: 13px;
    font-weight: 600;
}

.a2-thumb {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

.a2-video-preview {
    width: 240px;
    max-width: 42vw;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #111827;
}

.a2-video-preview iframe,
.a2-video-preview video,
.a2-video-preview embed {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.a2-pill {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
}

.a2-pill.is-on {
    background: #e8f8ef;
    color: #1d8a4e;
}

.a2-muted { color: var(--a2-muted); }

.a2-pager {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
}

.a2-pager a,
.a2-pager span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--a2-line);
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.a2-pager a:hover { border-color: var(--a2-red); color: var(--a2-red); }

.a2-pager .is-disabled { color: #c5cad3; }

.a2-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #e8f8ef;
    color: #146c3a;
}

.a2-alert--bad {
    background: #fde8ea;
    color: #b10000;
}

.a2-settings {
    display: grid;
    gap: 14px;
}

.a2-fields,
.a2-colors {
    display: grid;
    gap: 12px;
}

.a2-fitbtn > .a2-save {
    align-self: end;
    justify-self: end;
    width: auto;
    min-width: 140px;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.a2-field {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.a2-field span { color: #4b5565; }

.a2-field input[type="text"],
.a2-field input[type="email"],
.a2-field input[type="password"],
.a2-field textarea,
.a2-contact input {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background: #f8f9fb;
    color: var(--a2-ink);
}

.a2-field textarea { min-height: 140px; resize: vertical; }

.a2-field input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background: #fff;
}

.a2-save,
.a2-ghost {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.a2-save {
    border: 0;
    background: var(--a2-red);
    color: #fff;
}

.a2-panel__head a.a2-save {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.a2-ghost {
    border: 1px solid var(--a2-line);
    background: #fff;
    color: var(--a2-ink);
}

.a2-contact {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--a2-line);
}

.a2-contact label {
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: #4b5565;
}

.a2-contact__remove {
    justify-self: start;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: #f8e8e8;
    color: var(--a2-red);
    cursor: pointer;
}

.a2-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a2-alert--error {
    background: #fde8e8;
    color: #9b1c1c;
}

.a2-alert--error p { margin: 0; }

.a2-cards {
    display: grid;
    gap: 16px;
}

.a2-upload {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--a2-line);
    border-radius: 16px;
    background: #fff;
}

.a2-bgslot {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--a2-line);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.a2-bgslot > .a2-upload {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    align-items: stretch;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.a2-bgslot > .a2-upload > input[type="file"] {
    margin-top: auto;
}

.a2-bgslot .a2-save {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    flex: 0 0 auto;
}

.a2-bgslot > .a2-upload > .a2-save {
    width: 100%;
}

.a2-bgcolor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px 16px;
}

.a2-bgcolor label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--a2-muted);
    font-size: 13px;
}

.a2-bgcolor input[type="color"] {
    width: 42px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--a2-line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.a2-upload img,
.a2-choice img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 12px;
    background: #f6f7f8;
}

.a2-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
}

.a2-switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--a2-red);
}

.a2-switch--range {
    flex-wrap: wrap;
    align-items: center;
}

.a2-switch--range input[type="range"] {
    flex: 1 1 100%;
    width: 100%;
    height: 36px;
    margin: 4px 0 8px;
    accent-color: var(--a2-red);
    cursor: pointer;
}

.a2-radios,
.a2-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.a2-choice {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.a2-choice label {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--a2-line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.a2-choice label.is-on {
    border-color: var(--a2-red);
    background: #fff5f5;
}

.a2-table-wrap { overflow-x: auto; }

.a2-table {
    width: 100%;
    border-collapse: collapse;
}

.a2-table th,
.a2-table td {
    padding: 10px;
    border-bottom: 1px solid var(--a2-line);
    text-align: left;
    vertical-align: top;
}

.a2-inline input,
.a2-inline select,
.a2-fields select,
.a2-fields textarea {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background-color: #fff;
}

.a2-inline select,
.a2-fields select {
    padding-right: 42px;
}

.a2-inline input,
.a2-inline select { width: auto; min-width: 160px; }

@media (min-width: 800px) {
    .a2-cards { grid-template-columns: 1fr 1fr; }
    .a2-choice { grid-template-columns: repeat(3, 1fr); }
    .a2-fields { grid-template-columns: 1fr 1fr; }
    .a2-colors { grid-template-columns: repeat(3, 1fr); }
    .a2-field:has(textarea) { grid-column: 1 / -1; }
    .a2-contact {
        grid-template-columns: 1.2fr 0.6fr 1.4fr auto;
        align-items: end;
    }
}

@media (min-width: 720px) {
    .a2-stats { grid-template-columns: 1fr 1fr; }
    .a2-content { padding: 20px; }
}

@media (min-width: 1100px) {
    .a2-side {
        width: var(--a2-rail);
        overflow: visible;
        transform: none;
        box-shadow: none;
    }
    .a2-rail {
        position: relative;
        z-index: 2;
        height: 100%;
        background: var(--a2-rail-bg);
    }
    .a2-side .a2-menupanel {
        position: absolute;
        z-index: 1;
        top: 0;
        bottom: 0;
        left: var(--a2-rail);
        width: var(--a2-panel-w);
        flex: none;
        border-right: 1px solid var(--a2-line);
        box-shadow: 8px 0 24px rgba(28, 35, 48, 0.06);
        transform: translate3d(0, 0, 0);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        will-change: transform;
    }
    body.a2.is-rail .a2-menupanel {
        transform: translate3d(-100%, 0, 0);
        pointer-events: none;
    }
    .a2-backdrop,
    .a2-burger { display: none; }
    .a2-menupanel__close { display: grid; }
    .a2-main { margin-left: var(--a2-side); }
    body.a2.is-rail .a2-main { margin-left: var(--a2-rail); }
    body.a2.is-rail .a2-rail__unfold { display: grid; }
    .a2-stats { grid-template-columns: repeat(4, 1fr); }
    .a2-grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
    .a2-content { padding: 22px 24px 32px; }
    .a2-user__meta { display: block; }
}

@media (max-width: 1099px) {
    .a2-user__meta { display: none; }
}

.a2-hint {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.45;
}

.a2-popup-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.a2-popup-bar__meta h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.a2-popup-bar__meta .a2-muted {
    margin: 0;
}

.a2-popup-bar__flag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.a2-popup-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.a2-popup-upload .a2-field {
    margin: 0;
}

.a2-popup-empty {
    justify-items: start;
    padding: 24px 4px;
}

.a2-popup-list {
    display: grid;
    gap: 14px;
}

.a2-popup-card {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid #f0d4d4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.a2-popup-card__media {
    position: relative;
    min-width: 0;
}

.a2-popup-card__no {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--a2-grad);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(196, 0, 1, 0.28);
}

.a2-popup-card__media a {
    display: block;
    line-height: 0;
}

.a2-popup-card img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.a2-popup-card__body {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
}

.a2-popup-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.a2-popup-card__top strong {
    font-size: 0.98rem;
    color: var(--a2-ink);
}

.a2-popup-card__acts {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.a2-popup-card__move {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: 1px solid #f0c2c2;
    border-radius: 10px;
    background: #fff;
    color: var(--a2-red);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.a2-popup-card__move svg {
    width: 18px;
    height: 18px;
    display: block;
}

.a2-popup-card__move:hover {
    background: #fff8f8;
    border-color: #e89a9a;
    box-shadow: 0 6px 14px rgba(196, 0, 1, 0.12);
}

.a2-popup-card__move:active {
    transform: translateY(1px);
}

.a2-popup-card__body .a2-field {
    margin: 0;
}

.a2-popup-card__body .a2-field input[type="url"] {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid #f0d4d4;
    border-radius: var(--a2-pill, 999px);
    background: #fff;
}

.a2-popup-list__foot {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

@media (max-width: 700px) {
    .a2-popup-bar {
        align-items: stretch;
    }

    .a2-popup-bar__flag {
        width: 100%;
    }

    .a2-popup-bar__flag .a2-save {
        flex: 1;
    }

    .a2-popup-upload {
        grid-template-columns: 1fr;
    }

    .a2-popup-card {
        grid-template-columns: 1fr;
    }

    .a2-popup-card img {
        height: 180px;
    }

    .a2-popup-list__foot {
        justify-content: stretch;
    }

    .a2-popup-list__foot .a2-save {
        width: 100%;
    }
}

/* --- Admin 2: ระบบควบคุมเมนู (หน้าใหญ่) --- */
.a2-mnu-top { display: grid; gap: 14px; margin-top: 14px; }

.a2-mnu-search { align-items: center; }

.a2-mnu-search input { flex: 1; width: auto; }

.a2-mnu-clear { display: inline-flex; align-items: center; text-decoration: none; }

.a2-mnu-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 200px) auto;
    gap: 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--a2-line);
}

.a2-news-add {
    padding-top: 0;
    border-top: 0;
}

.a2-mnu-add .a2-field,
.a2-mnu-add .a2-save {
    margin: 0;
}

.a2-mnu-add .a2-field input[type="text"] {
    height: 42px;
    min-height: 42px;
    background-color: #fff;
}

.a2-mnu-add .a2-save {
    height: 42px;
    min-height: 42px;
    padding: 0 18px;
    white-space: nowrap;
    align-self: end;
}

.a2-mnu-add select,
.a2-mnu-form input,
.a2-mnu-form select {
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--a2-ink);
}

.a2-mnu-add select,
.a2-mnu-form select {
    padding-right: 42px;
}

.a2-mnu-list { display: grid; gap: 14px; margin-top: 14px; }

.a2-mnu-savebar {
    display: none;
    margin: 0;
    position: sticky;
    bottom: 16px;
    z-index: 9;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--a2-red);
    border-radius: 14px;
    background: #fff5f5;
}

.a2-mnu-savebar.is-on { display: flex; }

.a2-mnu-savebar p { margin: 0; font-weight: 700; }

body.a2.is-dark .a2-mnu-savebar { background: #2a1518; }

.a2-mnu-card__head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.a2-mnu-order {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fdeeee;
    color: var(--a2-red);
    font-weight: 700;
    font-size: 16px;
}

.a2-mnu-card__title { min-width: 0; flex: 1; }

.a2-mnu-card--embed {
    background: #f8fafc;
}

.a2-mnu-embed {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #e8eef5;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

.a2-mnu-card__title h2 { margin: 0; font-size: 19px; line-height: 1.35; }

.a2-mnu-card__title small { color: var(--a2-muted); font-size: 12px; }

.a2-mnu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.a2-mnu-form,
.a2-mnu-stack {
    display: grid;
    gap: 10px;
    min-width: min(280px, 78vw);
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--a2-line);
    border-radius: 14px;
    background: #fbfcfd;
}

.a2-mnu-stack .a2-mnu-form { margin-top: 0; padding: 0; border: 0; background: none; }

.a2-mnu-form label { display: grid; gap: 5px; font-size: 13px; color: #4b5565; }

.a2-mnu-del {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: #f8e8e8;
    color: var(--a2-red);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.a2-mnu-del:hover { background: #f5dede; }

.a2-mnu-subname { color: var(--a2-ink); font-weight: 600; text-decoration: none; }

.a2-mnu-subname:hover { color: var(--a2-red); text-decoration: underline; }

.a2-mnu-table { min-width: 520px; }

.a2-mnu-empty { margin: 4px 0 2px; font-size: 13px; }

@media (min-width: 800px) {
    .a2-mnu-add { grid-template-columns: minmax(0, 1fr) minmax(160px, 200px) auto; }
}

/* ปรับลำดับขึ้น/ลง + เมนูลูก (ชั้นที่ 3) */
.a2-mnu-ord { display: inline-flex; gap: 4px; align-items: center; }

.a2-mnu-ord form { display: contents; }

.a2-mnu-ordbtn {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--a2-line);
    border-radius: 8px;
    background: #fff;
    color: #5d6675;
    font-size: 10px;
    cursor: pointer;
}

.a2-mnu-ordbtn:hover:not(:disabled) { border-color: var(--a2-red); color: var(--a2-red); }

.a2-mnu-ordbtn:disabled { opacity: 0.35; cursor: default; }

.a2-mnu-ordcell { display: inline-flex; align-items: center; gap: 8px; }

.a2-mnu-childrow td { background: #fdf8f8; }

.a2-mnu-childrow td:nth-child(2) { padding-left: 30px; }

.a2-mnu-childname { color: var(--a2-red); font-weight: 700; margin-right: 4px; }

/* --- Responsive: หน้า /admin2/menu --- */
@media (max-width: 900px) {
    .a2-mnu-card__head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px 10px;
    }

    .a2-mnu-actions {
        grid-column: 1 / -1;
        width: 100%;
    }

    .a2-mnu-actions > button,
    .a2-mnu-actions > form {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .a2-mnu-actions .a2-ghost,
    .a2-mnu-actions .a2-mnu-del {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .a2-mnu-top { gap: 12px; margin-top: 10px; }

    .a2-mnu-add {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .a2-mnu-add .a2-save {
        width: 100%;
        height: 44px;
        min-height: 44px;
    }

    .a2-mnu-search {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .a2-mnu-search input {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
    }

    .a2-mnu-search button,
    .a2-mnu-clear {
        width: 100%;
        min-height: 42px;
        justify-content: center;
    }

    .a2-mnu-card__title h2 {
        font-size: 16px;
        word-break: break-word;
    }

    .a2-mnu-order {
        width: 36px;
        height: 36px;
        font-size: 14px;
        border-radius: 10px;
    }

    .a2-mnu-ordbtn {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    /* ตารางเมนูย่อย → การ์ดบนมือถือ (ไม่ต้องเลื่อนแนวนอน) */
    .a2-mnu-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .a2-mnu-table thead { display: none; }

    .a2-mnu-table tbody,
    .a2-mnu-table tr,
    .a2-mnu-table td {
        display: block;
        width: 100%;
    }

    .a2-mnu-table tr {
        margin: 0;
        padding: 12px 12px 10px;
        border: 1px solid var(--a2-line);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .a2-mnu-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
        border: 0 !important;
        background: transparent !important;
        text-align: right;
    }

    .a2-mnu-table td + td {
        border-top: 1px dashed #eef2f6 !important;
    }

    .a2-mnu-table td::before {
        content: attr(data-label);
        flex: none;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 700;
        text-align: left;
    }

    .a2-mnu-table td[data-label="ชื่อเมนู"] {
        flex-wrap: wrap;
        justify-content: flex-start;
        text-align: left;
        gap: 6px 8px;
    }

    .a2-mnu-table td[data-label="ชื่อเมนู"]::before {
        width: 100%;
        margin-bottom: 2px;
    }

    .a2-mnu-table td[data-label="จัดการ"] {
        justify-content: space-between;
        padding-top: 10px;
    }

    .a2-mnu-childrow {
        margin-left: 0 !important;
        background: #fdf8f8 !important;
        border-color: #f3d4d4 !important;
    }

    .a2-mnu-childrow td:nth-child(2) { padding-left: 0; }

    .a2-mnu-childname { display: none; }

    .a2-mnu-subname {
        display: inline;
        word-break: break-word;
        line-height: 1.4;
    }

    .a2-icoacts {
        gap: 4px;
        margin-left: auto;
    }

    .a2-icoact {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: #f8fafc;
    }

    .a2-icoact svg {
        width: 18px;
        height: 18px;
    }

    .a2-mnu-ordcell {
        margin-left: auto;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .a2-mnu-card__head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .a2-mnu-card__head .a2-mnu-ord {
        grid-column: 2;
        justify-self: end;
    }

    .a2-mnu-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .a2-mnu-actions > button,
    .a2-mnu-actions > form {
        flex: none;
        width: 100%;
    }

    .a2-mnu-actions > form:only-of-type:last-child,
    .a2-mnu-actions > .a2-mnu-del {
        grid-column: 1 / -1;
    }

    .a2-icoact {
        width: 42px;
        height: 42px;
    }

    .a2-mnu-table tr { padding: 12px 10px; }
}

/* --- SweetAlert2 (เฉพาะหน้า Admin 2) --- */
body.a2 .swal2-popup.a2-swal {
    font-family: "Sarabun", "Segoe UI", sans-serif;
    border-radius: 18px;
    max-width: 92vw;
}

body.a2 .swal2-popup.a2-swal .swal2-title { font-size: 20px; }

body.a2 .swal2-popup.a2-swal .swal2-html-container { font-size: 15px; }

body.a2 .swal2-popup.a2-swal .swal2-confirm,
body.a2 .swal2-popup.a2-swal .swal2-cancel { border-radius: 10px; min-height: 42px; padding: 0 20px; }

/* --- Responsive: Admin 2 ทุกหน้า --- */
.a2-tablewrap { max-width: 100%; -webkit-overflow-scrolling: touch; }

@media (max-width: 720px) {
    .a2-content { padding: 12px; }
    .a2-top { min-height: 64px; padding: 10px 12px; gap: 8px; }
    .a2-topsearch input[type="search"] { height: 42px; }
    .a2-hello { padding: 14px; border-radius: 16px; }
    .a2-hello__who strong { font-size: 19px; }
    .a2-hello__time { width: 100%; text-align: left; }
    .a2-hello__time strong { font-size: 26px; }
    .a2-panel { padding: 12px; border-radius: 16px; }
    .a2-ring { width: 128px; height: 128px; }
    .a2-search { flex-wrap: wrap; }
    .a2-search input { flex: 1 1 150px; width: auto; }
    .a2-mnu-search button, .a2-mnu-clear { flex: 1; justify-content: center; }
    .a2-mnu-card__title h2 { font-size: 17px; }
    .a2-mnu-actions { width: 100%; }
    .a2-mnu-actions > button { flex: 1; }
    .a2-mnu-actions form { flex: 1; }
    .a2-mnu-del { width: 100%; }
    .a2-contact-actions .a2-save,
    .a2-contact-actions .a2-ghost { flex: 1; }
    .a2-pager { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
    :root { --a2-rail: 56px; --a2-panel-w: 224px; }
    .a2-rail__btn { width: 38px; height: 38px; border-radius: 11px; }
    .a2-rail__logo { width: 38px; height: 38px; }
    .a2-menupanel__brand strong { font-size: 14px; }
    .a2-menupanel__head { padding: 12px 10px 8px; }
    .a2-menupanel__body { padding: 2px 8px 10px; }
    .a2-menu a { min-height: 38px; font-size: 12.5px; padding: 2px 8px; }
    .a2-avatar { width: 36px; height: 36px; }
    .a2-user__menu { width: min(180px, 70vw); }
    .a2-stat { min-height: 92px; padding: 13px; }
    .a2-stat strong { font-size: 24px; }
    body.a2 .swal2-popup.a2-swal .swal2-actions { flex-wrap: wrap; gap: 8px; }
    body.a2 .swal2-popup.a2-swal .swal2-confirm,
    body.a2 .swal2-popup.a2-swal .swal2-cancel { flex: 1; margin: 0; }
}

/* --- ป๊อปอัป (Modal) Admin 2 — หัวแดง + ฟุตเตอร์ติดล่าง + แอนิเมชันเปิด/ปิด --- */
.a2-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        background 0.22s ease;
}

.a2-modal[hidden] { display: none !important; }

.a2-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.5);
}

.a2-modal__box {
    width: min(520px, 100%);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    margin: auto;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition:
        opacity 0.24s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.a2-modal.is-open .a2-modal__box {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .a2-modal,
    .a2-modal__box {
        transition: none !important;
    }
}

.a2-modal__box--wide { width: min(560px, 100%); }
.a2-modal__box--desk { width: min(760px, 100%); }

.a2-modal__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f6;
}

.a2-modal__head--brand {
    background: var(--a2-red);
    border-bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 8px 8px;
}

.a2-modal__head--danger { background: #b91c1c; }

.a2-modal__head > div { min-width: 0; flex: 1; }

.a2-modal__head small {
    display: block;
    margin: 0 0 2px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

.a2-modal__head h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.a2-modal__head--brand h3 { color: #fff; }

.a2-modal__head h3 svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.a2-modal__head h3 span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-modal__close {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 15px;
    cursor: pointer;
}

.a2-modal__head--brand .a2-modal__close {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.a2-modal__close:hover { background: #e2e8f0; color: #0f172a; }

.a2-modal__head--brand .a2-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.a2-modal__sub {
    margin: 0;
    padding: 12px 18px 0;
    color: #64748b;
    font-size: 13px;
}

.a2-modal-tabs {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.a2-modal-tabs__nav {
    display: flex;
    flex: none;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef2f6;
    background: #f8fafc;
    overflow-x: auto;
    scrollbar-width: none;
}

.a2-modal-tabs__nav::-webkit-scrollbar { display: none; }

.a2-modal-tabs__nav button {
    flex: none;
    height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.a2-modal-tabs__nav button:hover { background: #fff; color: #0f172a; }

.a2-modal-tabs__nav button.is-active {
    background: #fff;
    color: var(--a2-red);
    box-shadow: 0 0 0 1px #fecaca, 0 1px 2px rgba(15, 23, 42, 0.06);
}

.a2-modal-tabs__nav button.is-danger.is-active {
    background: var(--a2-red);
    color: #fff;
    box-shadow: none;
}

.a2-modal-tabs__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.a2-tabpane { display: none !important; }
.a2-tabpane.is-show { display: block !important; }

.a2-sheet {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
    padding: 0;
    margin: 0;
    border: 0;
    background: #fff;
}

.a2-sheet__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 22px 22px 8px;
}

.a2-sheet__sec {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 4px;
    border-bottom: 1px dashed #e5e7eb;
}

.a2-sheet__sec:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 8px;
}

.a2-sheet__sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--a2-red);
    font-size: 14px;
    font-weight: 700;
}

.a2-sheet__sec-title svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.a2-sheet__lead,
.a2-sheet__hint {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
}

.a2-sheet label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.a2-sheet label em {
    color: var(--a2-red);
    font-style: normal;
    font-weight: 700;
}

.a2-sheet__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.a2-sheet input:not([type="file"]):not([type="checkbox"]):not([type="hidden"]):not([type="radio"]),
.a2-sheet select,
.a2-modal .a2-mnu-form input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]),
.a2-modal .a2-mnu-form select {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background-color: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    outline: none;
}

.a2-sheet select,
.a2-modal .a2-mnu-form select {
    padding-right: 42px;
}

.a2-sheet textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 88px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    resize: vertical;
    outline: none;
}

.a2-sheet input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):focus,
.a2-sheet select:focus,
.a2-sheet textarea:focus,
.a2-modal .a2-mnu-form input:focus,
.a2-modal .a2-mnu-form select:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.08);
}

.a2-sheet__foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex: none;
    margin: 0;
    padding: 14px 22px;
    border-top: 1px solid #eef2f6;
    background: #fff;
}

.a2-sheet__foot .a2-save,
.a2-sheet__foot .a2-ghost,
.a2-sheet__foot .a2-mnu-del,
.a2-modal__foot .a2-save,
.a2-modal__foot .a2-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 104px;
    height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.a2-sheet__foot .a2-save svg,
.a2-sheet__foot .a2-mnu-del svg {
    width: 15px;
    height: 15px;
}

.a2-sheet__foot .a2-save,
.a2-modal__foot .a2-save {
    border: 0;
    background: var(--a2-red);
    color: #fff;
}

.a2-sheet__foot .a2-save:hover,
.a2-modal__foot .a2-save:hover { background: var(--a2-red-dark); }

.a2-sheet__foot .a2-ghost,
.a2-modal__foot .a2-ghost {
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
}

.a2-sheet__foot .a2-ghost:hover,
.a2-modal__foot .a2-ghost:hover { background: #e2e8f0; }

.a2-sheet__foot .a2-mnu-del,
.a2-mnu-del--solid {
    border: 0 !important;
    background: var(--a2-red) !important;
    color: #fff !important;
}

.a2-sheet__foot .a2-mnu-del:hover,
.a2-mnu-del--solid:hover { background: var(--a2-red-dark) !important; }

.a2-sheet__danger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 8px 12px;
    text-align: center;
}

.a2-sheet__warn {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fef2f2;
    color: var(--a2-red);
}

.a2-sheet__warn svg {
    width: 24px;
    height: 24px;
}

.a2-sheet__danger strong {
    color: #0f172a;
    font-size: 16px;
}

.a2-sheet__danger p {
    margin: 0;
    max-width: 340px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 400;
}

.a2-modal__box > .a2-mnu-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 18px;
    border: 0;
    background: #fff;
}

.a2-modal__box > .a2-mnu-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.a2-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid #eef2f6;
}

/* ไอคอนจัดการในตาราง: ย้าย / แก้ไข / เพิ่ม / ลบ */
.a2-icoacts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.a2-icoact {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease;
}

.a2-icoact svg {
    width: 18px;
    height: 18px;
    display: block;
}

.a2-icoact--move { color: #22a34a; }
.a2-icoact--edit { color: #2b7fff; }
.a2-icoact--add { color: #0d9488; }
.a2-icoact--del { color: #e11d48; }
.a2-icoact--view { color: #0f766e; }
.a2-icoact--files,
.a2-icoact--upload { color: #2563eb; }

.a2-upload > .a2-icoact,
.a2-post-upload > .a2-icoact,
.a2-popup-upload > .a2-icoact,
.a2-slide-add > .a2-icoact,
.a2-bgslot > .a2-upload > .a2-icoact,
.a2-fitbtn > .a2-icoact,
.a2-fields > .a2-icoact {
    justify-self: end;
    align-self: flex-end;
    margin-left: auto;
}

button.a2-contact__remove.a2-icoact {
    justify-self: end;
    align-self: end;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e11d48;
}

.a2-icoact:hover { background: #f1f5f9; }
.a2-icoact--move:hover { background: #ecfdf3; }
.a2-icoact--view:hover { background: #ecfdf3; }
.a2-icoact--edit:hover { background: #f8fafc; }
.a2-icoact--files:hover { background: #eff6ff; }
.a2-icoact--add:hover { background: #f0fdfa; }
.a2-icoact--del:hover { background: #fef2f2; }

@media (max-width: 640px) {
    .a2-modal {
        align-items: flex-end;
        padding: 0;
    }

    .a2-modal__box {
        opacity: 0;
        transform: translateY(28px);
    }

    .a2-modal.is-open .a2-modal__box {
        opacity: 1;
        transform: none;
    }

    .a2-modal__box,
    .a2-modal__box--wide,
    .a2-modal__box--desk {
        width: 100%;
        max-height: 92dvh;
        border-radius: 16px 16px 0 0;
    }

    .a2-sheet__body { padding: 18px 16px 6px; }

    .a2-sheet__row { grid-template-columns: 1fr; }

    .a2-sheet__foot,
    .a2-modal__foot {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 12px 16px;
    }

    .a2-sheet__foot .a2-save,
    .a2-sheet__foot .a2-ghost,
    .a2-sheet__foot .a2-mnu-del,
    .a2-modal__foot .a2-save,
    .a2-modal__foot .a2-ghost {
        width: 100%;
        min-width: 0;
    }
}

/* --- แดชบอร์ด: กิจกรรมล่าสุด --- */
.a2-act { margin-top: 14px; }

.a2-feed { display: grid; gap: 0; }

.a2-feed__day {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #eef1f4;
}

.a2-feed__day:first-child { border-top: 0; padding-top: 4px; }

.a2-feed__date {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 1px;
    padding-top: 2px;
}

.a2-feed__date strong {
    font-size: 26px;
    line-height: 1;
    color: var(--a2-ink);
}

.a2-feed__date small {
    color: #8b93a1;
    font-size: 12px;
    font-weight: 700;
}

.a2-feed__date span {
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fdeeee;
    color: var(--a2-red);
    font-size: 10px;
    font-weight: 700;
}

.a2-feed__body { display: grid; gap: 12px; min-width: 0; }

.a2-feed__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.a2-feed__kind {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    background: #64748b;
}

.a2-feed__kind--menu { background: #3b82f6; }
.a2-feed__kind--news { background: #f43f5e; }
.a2-feed__kind--event { background: #f59e0b; }

.a2-feed__head a,
.a2-feed__head > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--a2-ink);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.a2-feed__head a:hover { color: var(--a2-red); }

.a2-feed__head em {
    margin-left: auto;
    flex: none;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f4f6f8;
    color: #64748b;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
}

.a2-feed__topic ul {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: grid;
    gap: 3px;
}

.a2-feed__topic li {
    color: #5d6675;
    font-size: 13px;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-feed__topic a { color: inherit; text-decoration: none; }
.a2-feed__topic a:hover { color: var(--a2-red); }
.a2-feed__topic .is-more { color: #94a3b8; }

@media (max-width: 720px) {
    .a2-feed__day { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
    .a2-feed__date strong { font-size: 22px; }
}

/* --- แดชบอร์ด: สรุปข้อมูลที่ลงเว็บไซต์ --- */
.a2-sum {
    margin-top: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6eef8;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(30, 64, 175, 0.06);
}

.a2-sum__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    background: linear-gradient(100deg, #1e3a8a 0%, #1d4ed8 52%, #3b82f6 100%);
    color: #fff;
}

.a2-sum__head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.a2-sum__head p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.a2-sum__all {
    flex: none;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.a2-sum__all:hover { background: #f8fafc; }

.a2-sum__body { padding: 18px 18px 10px; }

.a2-sum__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.a2-sum__stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 96px;
    padding: 16px 18px;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    background: #fff;
    color: #243044;
    text-decoration: none;
}

.a2-sum__stat strong {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.a2-sum__stat span {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.a2-sum__stat--month.is-on {
    border-color: transparent;
    background: #e9f9ef;
}

.a2-sum__stat--month.is-on strong,
.a2-sum__stat--month.is-on span { color: #16a34a; }

.a2-sum__stat.is-on:not(.a2-sum__stat--month):not(.a2-sum__stat--day):not(.a2-sum__stat--months) {
    border-color: #93c5fd;
    background: #f3f8ff;
}

.a2-sum__stat.is-on:not(.a2-sum__stat--month):not(.a2-sum__stat--day):not(.a2-sum__stat--months) strong,
.a2-sum__stat.is-on:not(.a2-sum__stat--month):not(.a2-sum__stat--day):not(.a2-sum__stat--months) span {
    color: #1d4ed8;
}

.a2-sum__stat--day,
.a2-sum__stat--months {
    align-items: center;
    justify-content: center;
    border-color: transparent;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.a2-sum__stat--day { background: #eef3ff; color: #3b6fd8; }
.a2-sum__stat--months { background: #f4eefe; color: #7c5cbf; }
.a2-sum__stat--day.is-on { box-shadow: inset 0 0 0 2px #3b6fd8; }
.a2-sum__stat--months.is-on { box-shadow: inset 0 0 0 2px #7c5cbf; }

.a2-sum__listhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 4px 6px;
    color: #6b7280;
    font-size: 14px;
}

.a2-sum__listhead a {
    color: #3b6fd8;
    font-weight: 700;
    text-decoration: none;
}

.a2-sum__group {
    margin: 14px 4px 2px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.a2-sum__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid #f1f4f8;
    color: inherit;
    text-decoration: none;
}

.a2-sum__row:hover .a2-sum__title { color: #1d4ed8; }

.a2-sum__tag {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.a2-sum__tag--menu { background: #e7f0ff; color: #3b6fd8; }
.a2-sum__tag--news { background: #e8f1ff; color: #3d6ec9; }
.a2-sum__tag--event { background: #e5f8ee; color: #1f9d55; }

.a2-sum__title {
    overflow: hidden;
    color: #374151;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-sum__row time {
    color: #9aa3b2;
    font-size: 13px;
    white-space: nowrap;
}

.a2-sum__empty {
    margin: 12px 4px 16px;
    color: #6b7280;
}

.a2-sum__stat:focus-visible,
.a2-sum__all:focus-visible,
.a2-sum__row:focus-visible,
.a2-sum__listhead a:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .a2-sum__stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .a2-sum__head { align-items: flex-start; flex-direction: column; padding: 18px 16px; }
    .a2-sum__body { padding: 14px 12px 8px; }
    .a2-sum__row { grid-template-columns: auto minmax(0, 1fr); }
    .a2-sum__row time { grid-column: 2; font-size: 12px; }
}

body.a2.is-dark .a2-sum {
    background: var(--a2-card);
    border-color: var(--a2-line);
}

body.a2.is-dark .a2-sum__stat {
    background: #151b27;
    border-color: var(--a2-line);
    color: var(--a2-ink);
}

body.a2.is-dark .a2-sum__stat span,
body.a2.is-dark .a2-sum__title,
body.a2.is-dark .a2-sum__listhead,
body.a2.is-dark .a2-sum__group,
body.a2.is-dark .a2-sum__empty { color: var(--a2-muted); }

body.a2.is-dark .a2-sum__stat strong { color: var(--a2-ink); }
body.a2.is-dark .a2-sum__row { border-bottom-color: var(--a2-line); }
body.a2.is-dark .a2-sum__title { color: var(--a2-ink); }


/* --- จัดการเนื้อหาเมนู (add_post) --- */
.a2-pager .is-current {
    border-color: var(--a2-red);
    background: #fff5f5;
    color: var(--a2-red);
    font-weight: 700;
}

.a2-post-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.a2-post-bar__meta h2 {
    margin: 6px 0 4px;
    font-size: 22px;
    line-height: 1.3;
}

.a2-post-bar__meta p { margin: 0; }

.a2-ghost.a2-post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    margin: 0 0 8px;
    padding: 0 12px 0 10px;
    border: 1px solid #f0c2c2;
    border-radius: 10px;
    background: #fff;
    color: var(--a2-red);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}

.a2-ghost.a2-post-back::before {
    content: "";
    width: 7px;
    height: 7px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 1px;
    transform: translateY(-1px) rotate(45deg);
    background: none;
}

.a2-ghost.a2-post-back:hover {
    border-color: var(--a2-red);
    background: #fff5f5;
    color: var(--a2-red-dark);
}

.a2-post-bar__acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.a2-post-bar__acts .a2-save,
.a2-post-bar__acts .a2-ghost,
.a2-post-copybtn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
}

.a2-post-panel { margin-top: 0; }

.a2-post-empty {
    display: grid;
    place-items: center;
    align-content: center;
    justify-items: center;
    gap: 0;
    min-height: 220px;
    padding: 28px 8px;
    text-align: center;
}

.a2-empty.a2-news-empty {
    justify-items: center;
    text-align: center;
}

.a2-post-table th:last-child,
.a2-post-table td:last-child {
    text-align: center;
    white-space: nowrap;
}

.a2-post-table td:last-child .a2-icoacts {
    justify-content: center;
    width: 100%;
}

.a2-icoacts a.a2-icoact { text-decoration: none; }
.a2-icoacts form { display: contents; }
.a2-icoact { border: 0; }

.a2-post-grid {
    display: grid;
    gap: 14px;
}

.a2-post-grid--split {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
    align-items: start;
}

.a2-post-form__sec {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e5e7eb;
}

.a2-post-form .a2-field,
.a2-post-upload .a2-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.a2-post-form .a2-field em,
.a2-sheet label em { color: var(--a2-red); font-style: normal; }

.a2-post-form .a2-field input:not([type="file"]),
.a2-post-form .a2-field textarea,
.a2-post-form .a2-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background-color: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.a2-post-form .a2-field select {
    padding-right: 42px;
}

.a2-post-form .a2-field input[type="date"] { height: 44px; padding-top: 0; padding-bottom: 0; }

.a2-post-form__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

.a2-post-form__foot .a2-ghost,
.a2-post-form__foot .a2-save {
    text-decoration: none;
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
}

.a2-post-cover {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
    justify-items: stretch;
}

.a2-post-cover .a2-field {
    width: 100%;
    min-width: 0;
}

.a2-post-cover input[type="file"] {
    width: 100%;
    max-width: none;
}

.a2-post-cover__img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 280px;
    border-radius: 12px;
    border: 1px solid var(--a2-line);
    background: #f8fafc;
    object-fit: cover;
}

.a2-post-cover__img.is-empty {
    display: none;
}

.a2-post-cover__acts { display: flex; gap: 8px; }

.a2-post-grid--create > .a2-panel,
.a2-post-form,
.a2-post-form__sec {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.a2-post-files__head h3 { margin: 0 0 4px; font-size: 16px; }
.a2-post-files__head p { margin: 0 0 14px; }

.a2-sequp {
    display: grid;
    gap: 10px;
}

.a2-sequp__head .a2-sheet__sec-title {
    margin-bottom: 4px;
}

.a2-sequp__hint,
.a2-sequp__meta {
    margin: 0;
    font-size: 13px;
}

.a2-sequp__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.a2-sequp__item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #f0d4d4;
    border-radius: 12px;
    background: #fff;
}

.a2-sequp__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.a2-sequp__size {
    color: #64748b;
    font-size: 12px;
}

.a2-sequp__remove {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    cursor: pointer;
}

.a2-sequp-swal {
    margin-top: 8px;
}

.a2-sequp-swal__bar {
    height: 8px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.a2-sequp-swal__bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #C40001 0%, #7A0001 100%);
    transition: width .2s ease;
}

.a2-sequp-swal__text {
    margin: 10px 0 0;
    font-size: 13px;
    color: #64748b;
}

.a2-post-upload {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #e5e7eb;
}

.a2-post-upload .a2-save { justify-self: start; }

.a2-post-files__block { margin-top: 16px; }
.a2-post-files__block h4 {
    margin: 0 0 10px;
    color: var(--a2-red);
    font-size: 14px;
}

.a2-post-thumb {
    display: block;
    width: 56px;
    max-width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--a2-line);
}

/* รูปในตารางห้ามดันความกว้างตามไฟล์ต้นฉบับ — ไม่งั้นเลื่อนลงแล้วเห็นแถวขาด */
.a2-tablewrap img {
    max-width: 72px;
    height: auto;
}

.a2-tablewrap img.a2-post-thumb {
    width: 56px;
    height: 40px;
}

.a2-events-table {
    width: 100%;
    min-width: 640px;
    table-layout: fixed;
}

.a2-events-table th:nth-child(1),
.a2-events-table td:nth-child(1) { width: 48px; }
.a2-events-table th:nth-child(2),
.a2-events-table td:nth-child(2) { width: 84px; }
.a2-events-table th:nth-child(4),
.a2-events-table td:nth-child(4) { width: 128px; }
.a2-events-table th:nth-child(5),
.a2-events-table td:nth-child(5) { width: 110px; }
.a2-events-table th:nth-child(6),
.a2-events-table td:nth-child(6) { width: 108px; }

.a2-events-table .a2-mnu-subname {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .a2-events-table {
        min-width: 0;
        table-layout: auto;
    }

    .a2-events-table th,
    .a2-events-table td { width: auto; }

    .a2-events-table .a2-mnu-subname {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

.a2-post-files__bulk {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.a2-post-files__empty { margin: 8px 0 0; }

.a2-file-coverbtn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    line-height: 1.2;
    white-space: nowrap;
}

.a2-slidecard__meta--tools {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.a2-video-embed {
    display: grid;
    gap: 8px;
}

.a2-video-embed__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.a2-video-embed__src,
.a2-video-embed__out {
    width: 100%;
}

@media (max-width: 720px) {
    .a2-video-embed__row {
        grid-template-columns: 1fr;
    }
}

.a2-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.a2-post-copyall { margin-top: 4px; }

.a2-post-copylist {
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
    margin-top: 8px;
}

.a2-post-copyitem {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    background: #fafbfc;
    cursor: pointer;
}

.a2-post-copyitem:hover { border-color: #fecaca; background: #fff; }

.a2-post-copyitem span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.a2-post-copyitem strong {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.35;
}

.a2-post-copyitem small { color: #94a3b8; font-size: 12px; }

.a2-sheet__foot .a2-mnu-del,
.a2-sheet__foot a.a2-mnu-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 104px;
    height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

@media (max-width: 980px) {
    .a2-post-grid--split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .a2-post-bar__acts { width: 100%; }
    .a2-post-bar__acts > * { flex: 1; }
    .a2-post-form__foot {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.a2-typebar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.a2-typebar__btn {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--a2-line);
    background: #fff;
    color: var(--a2-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.a2-typebar__btn.is-on {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.a2-slide-add {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.2fr) auto;
    gap: 10px;
    align-items: end;
}

.a2-slidegrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.a2-slidecard {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--a2-line);
    border-radius: 14px;
    background: #fff;
}

.a2-slidecard img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    background: #f8fafc;
}

.a2-slidecard__check {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
}

.a2-slidecard__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.a2-slidecard__meta a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #b91c1c;
    font-size: 12px;
}

@media (max-width: 720px) {
    .a2-slide-add { grid-template-columns: 1fr; }
    .a2-slide-add .a2-save { width: 100%; }
}

/* ช่องเลือกไฟล์ — ปุ่มเข้มแบบระบบเดิม อยู่ในกรอบ ไม่ถูกตัดขอบ */
body.a2 input[type="file"] {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 42px;
    cursor: pointer;
    overflow: hidden;
}

body.a2 input[type="file"]:focus {
    outline: 1px auto #1f2937;
    border-color: #d1d5db;
    box-shadow: none;
}

body.a2 input[type="file"]::file-selector-button,
body.a2 input[type="file"]::-webkit-file-upload-button {
    box-sizing: border-box;
    height: 42px;
    margin: 0 0.75rem 0 0;
    padding: 0 1rem;
    border: 0;
    border-radius: 0;
    background: #1f2937;
    color: #fff;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 42px;
    cursor: pointer;
}

body.a2 input[type="file"]::file-selector-button:hover,
body.a2 input[type="file"]::-webkit-file-upload-button:hover {
    background: #374151;
}

.a2-upload__note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.a2-hint a { color: var(--a2-red); font-weight: 700; }

.a2-strategy-row .a2-field textarea { min-height: 72px; }

#strategyItems {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.a2-strategy-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.35fr) 180px 84px auto;
    gap: 14px 18px;
    align-items: end;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--a2-line);
    border-radius: 14px;
    background: #fff;
}

.a2-strategy-row .a2-field {
    gap: 8px;
}

.a2-strategy-row > .a2-ghost {
    align-self: end;
    margin-bottom: 2px;
}

.a2-strategy-icon__preview {
    display: block;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
    border-radius: 50%;
    object-fit: contain;
    background: #f3f5f8;
}

.a2-strategy-left__preview {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    margin-bottom: 8px;
    border-radius: 10px;
    background: #f3f5f8;
}

.a2-strategy-icon input[type="file"] {
    width: 100%;
    font-size: 12px;
}

.a2-strategy-icon__remove {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--a2-muted);
    font-size: 12px;
    font-weight: 600;
}

.a2-wstudio__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.a2-wstudio__head h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: var(--a2-ink);
}

.a2-wstudio__head p {
    margin: 6px 0 0;
    max-width: 640px;
    color: var(--a2-muted);
    font-size: 14px;
}

.a2-wstudio__head a { color: var(--a2-red); font-weight: 700; }

.a2-wstudio__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.a2-wstudio__actions .a2-ghost,
.a2-wstudio__actions .a2-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
}

.a2-wstudio__actions svg { width: 18px; height: 18px; }

.a2-widgets {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.a2-wpanel {
    border: 1px solid #f0d4d4;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(153, 0, 0, 0.06);
    padding: 18px;
}

.a2-wpanel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.a2-wpanel__head h3 {
    margin: 0;
    font-size: 18px;
}

.a2-wpanel__badge {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #fff1f1;
    color: var(--a2-red);
}

.a2-wpanel__badge svg { width: 18px; height: 18px; }

.a2-wcount {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff1f1;
    color: var(--a2-red);
    font-size: 13px;
    font-weight: 700;
}

.a2-wlock,
.a2-wrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #f3e4e4;
    border-radius: 18px;
    background: #fff;
}

.a2-widget-canvas,
.a2-widget-canvas * {
    -webkit-user-select: none;
    user-select: none;
}

.a2-widget-canvas ::selection {
    background: transparent;
    color: inherit;
}

.a2-wrow,
.a2-wlock {
    cursor: default;
}
.a2-wrow:hover { border-color: #f0b4b4; box-shadow: 0 8px 20px rgba(204, 0, 0, 0.08); }

.a2-wrow--hold {
    opacity: 1;
    background: #fff5f5;
    border: 2px dashed #f43f5e;
    box-shadow: none;
}

.a2-wrow--hold > * { opacity: 0.35; }

.a2-wrow--lift {
    opacity: 1 !important;
    background: #fff !important;
    border: 2px solid var(--a2-red) !important;
    box-shadow: 0 18px 42px rgba(153, 0, 0, 0.28);
    cursor: grabbing;
}

.a2-wcard--lift {
    opacity: 1 !important;
    background: #fff !important;
    border: 2px solid var(--a2-red) !important;
    box-shadow: 0 18px 42px rgba(153, 0, 0, 0.28);
    cursor: grabbing;
}

.a2-wlock--nav,
.a2-widget-lock--nav { background: #fff8f8; }
.a2-wlock--foot,
.a2-widget-lock--foot { margin-top: 4px; margin-bottom: 0; background: #fff8f8; }

.a2-wrow__grip {
    display: grid;
    grid-template-columns: repeat(2, 4px);
    gap: 3px;
    width: 16px;
    cursor: grab;
    flex: 0 0 auto;
}

.a2-wrow__grip i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d7c4c4;
}

.a2-wrow__no,
.a2-wlock__pin {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--a2-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.a2-wlock__pin { width: auto; min-width: 28px; padding: 0 8px; font-size: 12px; }

.a2-wrow__icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #fff1f1;
    color: var(--a2-red);
    flex: 0 0 auto;
}

.a2-wrow__icon svg { width: 26px; height: 26px; }

.a2-wrow__body { min-width: 0; flex: 1; }
.a2-wrow__body strong { display: block; font-size: 15px; }
.a2-wrow__body small { display: block; margin-top: 2px; color: var(--a2-muted); font-size: 12px; line-height: 1.4; }
.a2-wrow__body label,
.a2-wlock label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: var(--a2-muted);
    font-size: 13px;
}

.a2-wlock select,
.a2-wrow select {
    max-width: 100%;
    border: 0;
    background-color: transparent;
    color: var(--a2-ink);
    font: inherit;
    font-size: 13px;
    padding-right: 36px;
}

.a2-wrow__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.a2-wrow__style-meta {
    display: block;
    margin-top: 4px;
    color: var(--a2-muted);
    font-size: 12px;
}

.a2-wrow__style-meta em {
    font-style: normal;
    color: var(--a2-ink);
    font-weight: 600;
}

.a2-wrow__style {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #f0b4b4;
    border-radius: 12px;
    background: #fff8f8;
    color: var(--a2-red);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}

.a2-wrow__style svg { width: 18px; height: 18px; flex: 0 0 auto; }
.a2-wrow__style:hover { background: #fff1f2; border-color: #e11d48; }

.a2-wrow__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex: 0 0 auto;
}

.a2-wrow__style-meta {
    display: block;
    margin-top: 4px;
    color: var(--a2-muted);
    font-size: 12px;
}

.a2-wrow__style-meta em {
    font-style: normal;
    color: var(--a2-ink);
    font-weight: 600;
}

.a2-wrow__style {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #f0b4b4;
    border-radius: 12px;
    background: #fff8f8;
    color: var(--a2-red);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}

.a2-wrow__style svg { width: 18px; height: 18px; flex: 0 0 auto; }
.a2-wrow__style:hover { background: #fff1f2; border-color: #e11d48; }

.a2-wrow__del {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #fff1f2;
    color: #e11d48;
    cursor: pointer;
    flex: 0 0 auto;
}

.a2-wrow__del svg { width: 18px; height: 18px; }
.a2-wrow__del:hover { background: #ffe4e6; }

.a2-wstyle-box {
    width: min(1080px, 100%);
    max-height: min(92vh, 860px);
    display: flex;
    flex-direction: column;
}

#a2-wstyle-modal .a2-modal__head--brand {
    padding: 18px 24px;
}

#a2-wstyle-modal .a2-modal__head--brand h3,
#a2-wstyle-modal .a2-modal__head--brand small,
#a2-wstyle-modal .a2-modal__head--brand .a2-modal__close {
    color: #fff;
}

#a2-wstyle-modal .a2-modal__head--brand small {
    margin: 4px 0 0;
    opacity: 0.92;
    font-weight: 500;
}

#a2-wstyle-modal .a2-modal__head--brand .a2-modal__close {
    background: rgba(255, 255, 255, 0.16);
    border: 0;
}

#a2-wstyle-modal .a2-modal__head--brand .a2-modal__close:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.a2-wstyle-body {
    flex: 1;
    overflow: auto;
    padding: 18px 24px 12px;
    background: #f8fafc;
}

.a2-wstyle-hint {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
}

.a2-wstyle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.a2-wstyle-grid[data-count="1"] {
    grid-template-columns: minmax(0, 280px);
    justify-content: start;
}

.a2-wstyle-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 280px));
    justify-content: start;
}

.a2-wstyle-card {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 10px;
    border: 2px solid #e8eef5;
    border-radius: 16px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.a2-wstyle-card:hover {
    border-color: #f0b4b4;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(204, 0, 0, 0.1);
}

.a2-wstyle-card.is-on {
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(204, 0, 0, 0.12), 0 8px 18px rgba(204, 0, 0, 0.08);
}

.a2-wstyle-card.is-on::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--a2-wstyle-angle, 0deg),
        rgba(204, 0, 0, 0.2) 0deg,
        rgba(204, 0, 0, 0.2) 280deg,
        #e11d48 320deg,
        #cc0000 340deg,
        rgba(204, 0, 0, 0.2) 360deg
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: a2-wstyle-orbit 2.4s linear infinite;
    pointer-events: none;
}

@property --a2-wstyle-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes a2-wstyle-orbit {
    to { --a2-wstyle-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
    .a2-wstyle-card.is-on {
        border-color: var(--a2-red);
        box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.14), 0 8px 18px rgba(204, 0, 0, 0.08);
    }

    .a2-wstyle-card.is-on::before {
        animation: none;
        display: none;
    }
}

.a2-wstyle-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.a2-wstyle-card__check {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: none;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--a2-red);
    color: #fff;
    box-shadow: 0 8px 16px rgba(204, 0, 0, 0.28);
}

.a2-wstyle-card.is-on .a2-wstyle-card__check { display: grid; }
.a2-wstyle-card__check svg { width: 15px; height: 15px; }

.a2-wstyle-card__media {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    border: 1px solid #eef2f7;
    background: #fff;
}

.a2-wstyle-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

.a2-wstyle-card__ph {
    color: #94a3b8;
    font-size: 13px;
}

.a2-wstyle-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 0 2px 2px;
}

.a2-wstyle-card__meta strong {
    font-size: 13px;
    color: var(--a2-ink);
}

.a2-wstyle-foot,
#a2-wstyle-modal .a2-modal__foot {
    margin: 0;
    padding: 16px 24px 22px;
    gap: 12px;
    border-top: 1px solid #eef2f7;
    background: #fff;
}

@media (max-width: 900px) {
    .a2-wstyle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .a2-wrow__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .a2-wstyle-box { width: min(100%, 100%); }

    .a2-wstyle-grid,
    .a2-wstyle-grid[data-count="1"],
    .a2-wstyle-grid[data-count="2"] {
        grid-template-columns: 1fr;
    }

    #a2-wstyle-modal .a2-modal__foot {
        padding: 14px 16px 18px;
    }
}

.a2-wlock__tag {
    margin-left: 0;
    color: var(--a2-red);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.a2-wlock .a2-wrow__actions {
    margin-left: auto;
}

.a2-wlib-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--a2-muted);
    font-size: 13px;
}

.a2-wlib-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.a2-wlib-toolbar__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.a2-wlib-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.a2-wlib-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 1px solid #f0e4e4;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.a2-wlib-card:hover {
    border-color: #f0b4b4;
    box-shadow: 0 8px 18px rgba(204, 0, 0, 0.06);
}

.a2-wlib-card.is-on {
    border-color: #f0b4b4;
    background: #fff8f8;
}

.a2-wlib-card.is-off {
    opacity: 0.72;
    background: #fafafa;
}

.a2-wlib-card__body {
    min-width: 0;
    flex: 1;
}

.a2-wlib-card__body strong {
    display: block;
    font-size: 14px;
    color: var(--a2-ink);
}

.a2-wlib-card__body small {
    display: block;
    margin-top: 2px;
    color: var(--a2-muted);
    font-size: 12px;
    line-height: 1.4;
}

.a2-wlib-card__switch {
    margin: 0;
    flex: 0 0 auto;
}

.a2-wlib-card__switch span:last-child {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: var(--a2-red);
}

.a2-wlib-card.is-off .a2-wlib-card__switch span:last-child {
    color: var(--a2-muted);
}

@media (max-width: 900px) {
    .a2-wlib-grid { grid-template-columns: 1fr; }
}

#widget-sortable { margin: 0; padding: 0; list-style: none; }

.a2-widget-empty { margin: 0 0 10px; padding: 28px 8px; text-align: center; color: var(--a2-muted); }
.a2-widget-empty.is-hide { display: none; }

.a2-palette { position: sticky; top: 12px; }

.a2-wtabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.a2-wtabs button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 68px;
    padding: 8px 4px;
    border: 0;
    border-radius: 16px;
    background: #f4f6f8;
    color: var(--a2-red);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.a2-wtabs button svg { width: 22px; height: 22px; }

.a2-wtabs button.is-on { background: var(--a2-red); color: #fff; }

.a2-wsearch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 14px;
    border: 1px solid #f0d4d4;
    border-radius: 999px;
    background: #fff;
}

.a2-wsearch svg { width: 18px; height: 18px; color: var(--a2-muted); flex: 0 0 auto; }

.a2-wsearch input {
    width: 100%;
    height: 42px;
    border: 0;
    background: transparent;
    font: inherit;
}

.a2-palette__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: min(68vh, 760px);
    overflow: auto;
    padding-right: 2px;
}

.a2-wcard {
    position: relative;
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 132px;
    padding: 14px 14px 16px;
    border: 1px solid #f3e4e4;
    border-radius: 18px;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: grab;
}

.a2-wcard__name { font-weight: 700; font-size: 14px; line-height: 1.35; padding-right: 28px; }
.a2-wcard small { color: var(--a2-muted); font-size: 12px; line-height: 1.4; }

.a2-wcard__add {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    background: var(--a2-red);
    color: #fff;
    line-height: 0;
}

.a2-wcard__add svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.a2-wcard.is-added {
    background: #fff8f8;
    border-color: #f0b4b4;
}

.a2-wcard.is-added .a2-wcard__add { background: #16a34a; }

.a2-wcard.is-repeatable { border-style: dashed; }

.a2-wcard[hidden] { display: none; }

.a2-wpalette-empty {
    margin: 8px 0 0;
    color: var(--a2-muted);
    text-align: center;
}

.a2-wcard--hold { opacity: 0.55; }

#a2-divider-file {
    display: none !important;
}

#a2-divider-modal .a2-modal__box { width: min(560px, 100%); }

#a2-divider-modal .a2-modal__head { min-height: 72px; padding: 18px 22px; }

#a2-divider-modal .a2-sheet__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 24px 20px;
}

#a2-divider-modal .a2-field { margin: 0; }

#a2-divider-modal .a2-hint { margin: 0; line-height: 1.6; }

#a2-divider-modal .a2-modal__foot {
    margin: 0;
    padding: 16px 24px 22px;
    gap: 12px;
}

#a2-divider-preview {
    display: block;
    width: 100%;
    height: 132px;
    margin: 0;
    object-fit: contain;
    border-radius: 14px;
    background: #f4f6f8;
    border: 1px solid #e7ebf0;
}

.a2-colorgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.a2-colorgrid label,
.a2-newsalt__row label,
.a2-newsalt__btn {
    display: grid;
    gap: 6px;
    justify-items: center;
    padding: 10px;
    border: 1px solid var(--a2-line);
    border-radius: 12px;
    font-size: 13px;
}

.a2-newsalt { display: grid; gap: 10px; margin-bottom: 12px; }

.a2-newsalt__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--a2-line);
    border-radius: 12px;
}

.a2-newsalt__row > div { flex: 1; min-width: 200px; }

.a2-newsalt__preview {
    margin-top: 8px;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .a2-widgets,
    .a2-strategy-row { grid-template-columns: 1fr; }
    .a2-palette { position: static; }
}

@media (max-width: 640px) {
    .a2-wstudio__head h2 { font-size: 22px; }
    .a2-palette__list { grid-template-columns: 1fr; }
    .a2-wlock__tag { display: none; }
}

/* โหมดมืด — เปิดจากปุ่มด้านขวาของแถบบน */
body.a2.is-dark {
    --a2-ink: #e8eef6;
    --a2-muted: #9aa8bb;
    --a2-line: #313c50;
    --a2-bg: #12161e;
    --a2-card: #1b2230;
    color-scheme: dark;
    background: #12161e;
}

body.a2.is-dark .a2-top { background: #12161e; }

body.a2.is-dark .a2-rail {
    background: var(--a2-rail-bg);
    color: #fff;
}

body.a2.is-dark .a2-rail__btn { color: #fff; background: transparent; }
body.a2.is-dark .a2-rail__btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
body.a2.is-dark .a2-rail__btn.is-active { background: #fff; color: var(--a2-red); }

body.a2.is-dark .a2-side,
body.a2.is-dark .a2-menupanel,
body.a2.is-dark .a2-panel,
body.a2.is-dark .a2-upload,
body.a2.is-dark .a2-bgslot,
body.a2.is-dark .a2-user__menu,
body.a2.is-dark .a2-topsearch__list,
body.a2.is-dark .a2-iconbtn,
body.a2.is-dark .a2-modal__box,
body.a2.is-dark .a2-sheet,
body.a2.is-dark .a2-pager a,
body.a2.is-dark .a2-pager span,
body.a2.is-dark .a2-ghost,
body.a2.is-dark .a2-widget-row,
body.a2.is-dark .a2-wpanel,
body.a2.is-dark .a2-wrow,
body.a2.is-dark .a2-wcard,
body.a2.is-dark .a2-palette,
body.a2.is-dark .a2-palette button,
body.a2.is-dark .a2-strategy-row,
body.a2.is-dark .a2-slidecard,
body.a2.is-dark .a2-colorgrid label,
body.a2.is-dark .a2-newsalt__row,
body.a2.is-dark .a2-newsalt__btn,
body.a2.is-dark .a2-choice label,
body.a2.is-dark .a2-mnu-table tr {
    background: var(--a2-card);
    color: var(--a2-ink);
}

body.a2.is-dark .a2-menu a:hover,
body.a2.is-dark .a2-menupanel__close,
body.a2.is-dark .a2-burger,
body.a2.is-dark .a2-topback:hover,
body.a2.is-dark .a2-iconbtn:hover,
body.a2.is-dark .a2-user__menu a:hover,
body.a2.is-dark .a2-user__menu button:hover,
body.a2.is-dark .a2-topsearch__list a:hover,
body.a2.is-dark .a2-topsearch__list a.is-active,
body.a2.is-dark .a2-sheet__foot .a2-ghost:hover {
    background: #273044;
    color: var(--a2-ink);
}

body.a2.is-dark .a2-ghost.a2-post-back {
    background: #1c2433;
    border-color: #5c2a2a;
    color: #ffb4b4;
    box-shadow: none;
}

body.a2.is-dark .a2-ghost.a2-post-back:hover {
    background: #273044;
    border-color: #ffb4b4;
    color: #fff;
}

body.a2.is-dark .a2-menu a.is-active,
body.a2.is-dark .a2-mnu-childrow,
body.a2.is-dark .a2-mnu-childrow td {
    background: #3a2428;
    color: #fecaca;
}

body.a2.is-dark .a2-table th,
body.a2.is-dark .a2-table td {
    border-bottom-color: var(--a2-line);
}

body.a2.is-dark input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]),
body.a2.is-dark select,
body.a2.is-dark textarea {
    background: #151b26;
    color: var(--a2-ink);
    border-color: var(--a2-line);
}

body.a2.is-dark input[type="file"] {
    background: #151b26;
    border-color: var(--a2-line);
    color: #c5d0de;
}

body.a2.is-dark input[type="file"]::file-selector-button,
body.a2.is-dark input[type="file"]::-webkit-file-upload-button {
    background: #3d4a5c;
}

body.a2.is-dark .a2-modal__head h3,
body.a2.is-dark .a2-sheet label,
body.a2.is-dark .a2-sheet__sec-title,
body.a2.is-dark .a2-mnu-form label,
body.a2.is-dark .a2-field,
body.a2.is-dark .a2-contact label,
body.a2.is-dark .a2-modal__close {
    color: var(--a2-ink);
}

body.a2.is-dark .a2-modal__head--brand h3,
body.a2.is-dark .a2-modal__head--brand .a2-modal__close,
body.a2.is-dark .a2-modal__head--danger h3,
body.a2.is-dark .a2-save,
body.a2.is-dark .a2-topsearch button {
    color: #fff;
}

body.a2.is-dark .a2-modal__head--brand .a2-modal__close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

body.a2.is-dark .a2-wpanel { border-color: #3a2a2a; box-shadow: none; }
body.a2.is-dark .a2-wrow,
body.a2.is-dark .a2-wlock,
body.a2.is-dark .a2-wcard,
body.a2.is-dark .a2-wsearch { border-color: #3a2a2a; }
body.a2.is-dark .a2-wrow__icon,
body.a2.is-dark .a2-wpanel__badge,
body.a2.is-dark .a2-wcount { background: #3a1515; }
body.a2.is-dark .a2-wtabs button { background: #151b26; color: #ff8a8a; }
body.a2.is-dark .a2-wtabs button.is-on { background: var(--a2-red); color: #fff; }
body.a2.is-dark .a2-wcard.is-added { background: #2a1515; }
body.a2.is-dark .a2-wrow select,
body.a2.is-dark .a2-wlock select,
body.a2.is-dark .a2-wsearch input {
    background: transparent;
    border: 0;
    color: var(--a2-ink);
}
body.a2.is-dark .a2-wrow__style {
    background: #2a1515;
    border-color: #5c3030;
    color: #ff8a8a;
}
body.a2.is-dark .a2-wstyle-card {
    background: var(--a2-card);
    border-color: #3a2a2a;
}
body.a2.is-dark .a2-wstyle-card.is-on { border-color: var(--a2-red); }
body.a2.is-dark .a2-wrow__style {
    background: #2a1515;
    border-color: #5c3030;
    color: #ff8a8a;
}
body.a2.is-dark .a2-wstyle-card {
    background: var(--a2-card);
    border-color: #3a2a2a;
}
body.a2.is-dark .a2-wstyle-card.is-on { border-color: var(--a2-red); }

body.a2.is-dark .swal2-popup.a2-swal {
    background: var(--a2-card);
    color: var(--a2-ink);
}

@media (max-width: 720px) {
    body.a2.is-dark .a2-mnu-table tr { background: var(--a2-card); }
    body.a2.is-dark .a2-mnu-childrow { background: #3a2428 !important; border-color: #5c3030 !important; }
    body.a2.is-dark .a2-mnu-table td + td { border-top-color: #313c50 !important; }
    body.a2.is-dark .a2-icoact { background: #273044; }
}

/* หน้าเข้าสู่ระบบและเลือกทางเข้า — การ์ดหัวแดงบนพื้นไล่สี */
body.a2-auth {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    color: #243044;
    background: var(--a2-page);
    background-attachment: fixed;
    font-family: "Sarabun", "Segoe UI", sans-serif;
}

.a2-authcard {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(176, 92, 92, 0.14);
    overflow: hidden;
}

.a2-authcard__head {
    position: relative;
    padding: 28px 24px 22px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 12% 120%, rgba(255, 255, 255, 0.16) 0 78px, transparent 79px),
        radial-gradient(circle at 92% -10%, rgba(255, 255, 255, 0.2) 0 96px, transparent 97px),
        radial-gradient(circle at 72% 140%, rgba(255, 255, 255, 0.1) 0 64px, transparent 65px),
        linear-gradient(180deg, #e10600 0%, #b10000 100%);
}

.a2-authlogo {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #fff;
    color: var(--a2-red);
    font-weight: 700;
    font-size: 22px;
    overflow: hidden;
    box-shadow: 0 10px 18px rgba(120, 0, 0, 0.18);
}

.a2-authlogo img { width: 74%; height: 74%; object-fit: contain; }

.a2-authcard__head strong { display: block; font-size: 20px; line-height: 1.35; }

.a2-authcard__head span,
.a2-authcard__head small { display: block; }

.a2-authcard__head span { margin-top: 4px; font-size: 15px; }

.a2-authcard__head small { margin-top: 2px; opacity: 0.85; font-size: 13px; }

.a2-authcard__body { padding: 18px 18px 16px; }

.a2-authhello {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #f1e4e4;
    border-radius: 16px;
    background: #fff;
}

.a2-authhello b { display: block; font-size: 14px; }

.a2-authhello p { margin: 2px 0 0; color: #8b93a1; font-size: 12px; line-height: 1.45; }

.a2-authhello__ico {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff1f1;
    color: var(--a2-red);
}

.a2-authhello__ico svg { width: 18px; height: 18px; }

.a2-authfield { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; }

.a2-authfield input[type="text"],
.a2-authfield input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #eadfdf;
    border-radius: 12px;
    background: #fff;
    color: #243044;
}

.a2-authfield input:focus {
    outline: none;
    border-color: #e10600;
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}

.a2-autherr { margin: 0 0 10px; color: #b10000; font-size: 13px; }

.a2-authcheck {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
    font-size: 14px;
}

.a2-authnote { margin: 0 0 14px; color: #b45353; font-size: 12px; line-height: 1.45; }

.a2-authsubmit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    background: #e10600;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.a2-authsubmit:hover { background: #b10000; }

.a2-authpick {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #f0e4e4;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.a2-authpick:hover { border-color: #f0b4b4; background: #fffafa; }

.a2-authpick strong,
.a2-authpick small { display: block; }

.a2-authpick strong { font-size: 15px; }

.a2-authpick small { color: #8b93a1; font-size: 12px; }

.a2-authpick__ico {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #e10600;
    color: #fff;
}

.a2-authpick__ico svg,
.a2-authpick__go { width: 18px; height: 18px; }

.a2-authpick__go { margin-left: auto; color: #c4c4c4; flex: none; }

.a2-authpick--soft .a2-authpick__ico { background: #fff1f2; color: #e10600; }

.a2-authfoot {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border: 0;
    background: none;
    color: #e10600;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

/* รายการชุดบุคลากร */
.a2-orgbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.a2-orgbar__find {
    flex: 1 1 240px;
    min-width: 0;
}

.a2-orgbar__find input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: 420px;
}

.a2-orgbar__find button { flex: 0 0 auto; }

.a2-orgbar > .a2-save,
.a2-orgbar > .a2-icoact { margin-left: auto; }

.a2-orgtable { min-width: 640px; }

.a2-orgtable th,
.a2-orgtable td { vertical-align: middle; }

.a2-orgtable td[data-label="ชุดบุคลากร"] { min-width: 220px; }

.a2-orgrow__view { font-size: 15px; }

.a2-orgrow__edit {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.a2-orgrow__edit[hidden] { display: none !important; }

.a2-orgrow__edit input {
    flex: 1 1 160px;
    min-width: 0;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background: #fff;
    color: var(--a2-ink);
}

.a2-orgrow__edit .a2-save,
.a2-orgrow__edit .a2-ghost {
    min-height: 38px;
    padding: 0 12px;
}

.a2-orgopen {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--a2-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.a2-orgopen:hover { filter: brightness(0.94); }

.a2-orgtable .a2-icoacts form { display: contents; }

.a2-orgtable td:last-child { width: 1%; white-space: nowrap; }

.a2-orgnone {
    margin: 10px 0 0;
    color: var(--a2-muted);
    font-size: 14px;
}

@media (max-width: 720px) {
    .a2-orgbar__find { width: 100%; }
    .a2-orgbar__find input { width: auto; max-width: none; flex: 1 1 auto; }

    .a2-orgbar > .a2-save { margin-left: 0; }

    .a2-orgtable { min-width: 0; }

    .a2-orgtable td[data-label="ชุดบุคลากร"] {
        flex-wrap: wrap;
        justify-content: flex-start;
        text-align: left;
    }

    .a2-orgtable td[data-label="ชุดบุคลากร"]::before { width: 100%; }

    .a2-orgtable td:last-child { width: auto; white-space: normal; }

    .a2-orgrow__edit { width: 100%; }
}

.a2-content:has(.a2-org) {
    padding: 0;
    height: calc(100vh - 76px);
    overflow: hidden;
}

.a2-org {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    height: 100%;
    min-height: 0;
    background: #fff;
}

.a2-org__stage { position: relative; min-width: 0; min-height: 0; }

.a2-org__view {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    background-color: #fbf6f6;
    background-image: radial-gradient(#f0d0d4 1.15px, transparent 1.2px);
    background-size: 18px 18px;
}

.a2-org__view.is-panning { cursor: grabbing; }

.a2-org__view.is-linking,
.a2-org__view.is-linking .a2-orgcard { cursor: crosshair; }

.a2-org__world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

.a2-org__svg { position: absolute; overflow: visible; pointer-events: none; z-index: 1; }

.a2-org__line { fill: none; stroke: #1d6fe0; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

.a2-org__hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }

.a2-org__rubber { fill: none; stroke: #2b7de9; stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 6 5; }

.a2-org__empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 24px;
    color: #9a6270;
    text-align: center;
    pointer-events: none;
}

.a2-org__empty[hidden] { display: none; }

.a2-org__badge {
    position: absolute;
    z-index: 4;
    top: 14px;
    left: 14px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #7a3140;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(120, 30, 40, 0.08);
    pointer-events: none;
}

.a2-org__map {
    position: absolute;
    z-index: 4;
    right: 16px;
    bottom: 74px;
    width: 180px;
    height: 112px;
    padding: 8px;
    border: 1px solid #f3d4d8;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(120, 30, 40, 0.1);
}

.a2-org__map canvas { width: 100%; height: 100%; display: block; border-radius: 10px; cursor: pointer; }

.a2-orgtools {
    position: absolute;
    z-index: 5;
    top: 14px;
    right: 14px;
}

.a2-orgtools__btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: #243044;
    box-shadow: 0 8px 24px rgba(80, 20, 30, 0.12);
    cursor: pointer;
}

.a2-orgtools__btn svg { width: 18px; height: 18px; }

.a2-orgtools__btn:hover,
.a2-orgtools__btn[aria-expanded="true"] { background: #fff1f2; color: #e10600; }

.a2-orgtools__menu {
    position: absolute;
    top: 48px;
    right: 0;
    width: 230px;
    padding: 6px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(80, 20, 30, 0.16);
}

.a2-orgtools__menu[hidden] { display: none; }

.a2-orgtools__menu button {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #243044;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.a2-orgtools__menu button svg { width: 18px; height: 18px; flex: none; }

.a2-orgtools__menu button:hover,
.a2-orgtools__menu button.is-on { background: #fff1f2; color: #e10600; }

.a2-orgtools__menu button:disabled { opacity: 0.4; cursor: default; }

.a2-orgtools__menu button:disabled:hover { background: transparent; color: inherit; }

.a2-org__hscroll,
.a2-org__vscroll {
    position: absolute;
    z-index: 6;
    background: rgba(255, 255, 255, 0.92);
    scrollbar-color: #e10600 #f6e4e6;
}

.a2-org__hscroll {
    left: 0;
    right: 210px;
    bottom: 0;
    height: 16px;
    overflow-x: scroll;
    overflow-y: hidden;
}

.a2-org__vscroll {
    top: 0;
    right: 0;
    bottom: 200px;
    width: 16px;
    overflow-x: hidden;
    overflow-y: scroll;
}

.a2-org__hscroll[hidden],
.a2-org__vscroll[hidden] { display: none; }

.a2-org__hscroll div { height: 1px; }

.a2-org__vscroll div { width: 1px; }

.a2-org__hscroll::-webkit-scrollbar,
.a2-org__vscroll::-webkit-scrollbar { height: 14px; width: 14px; }

.a2-org__hscroll::-webkit-scrollbar-thumb,
.a2-org__vscroll::-webkit-scrollbar-thumb {
    background: #e10600;
    border-radius: 999px;
}

.a2-org__hscroll::-webkit-scrollbar-track,
.a2-org__vscroll::-webkit-scrollbar-track { background: #f6e4e6; }

.a2-org__zoom {
    position: absolute;
    z-index: 4;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(80, 20, 30, 0.12);
}

.a2-org__zoom button,
.a2-org__zoom span {
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #243044;
    font-weight: 700;
}

.a2-org__zoom button { cursor: pointer; }

.a2-org__zoom button:hover { background: #fff1f2; color: #e10600; }

.a2-org__zoom svg { width: 16px; height: 16px; }

.a2-org__zoom span { min-width: 52px; font-size: 13px; }

.a2-org__view.has-sky {
    background-color: #d7e9f8;
    background-image: none;
}

.a2-orgcard {
    position: absolute;
    z-index: 2;
    width: 210px;
    padding: 10px 8px 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    user-select: none;
    cursor: grab;
}

.a2-orgframe {
    position: relative;
    width: 157px;
    height: 190px;
    margin: 6px auto 8px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
}

.a2-orgframe img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 127px;
    height: 160px;
    object-fit: cover;
    object-position: center top;
    transform: translate(-50%, -50%);
    -webkit-user-drag: none;
    user-select: none;
}

.a2-orgcard.is-selected .a2-orgframe { box-shadow: 0 0 0 3px #e10600; }

.a2-orgcard.is-armed .a2-orgframe { box-shadow: 0 0 0 3px #e10600; outline: 2px dashed #e10600; outline-offset: 3px; }

.a2-orgcard.is-target .a2-orgframe { box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.45); }

.a2-orgcard__avatar {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e23b4a;
    color: #fff;
    font-weight: 700;
    object-fit: cover;
}

.a2-orgcard__name {
    margin: 0;
    color: #1c2430;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.a2-orgcard__role,
.a2-orgcard__detail {
    margin: 2px 0 0;
    color: #4b5565;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.a2-orgcard__x {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #e10600;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(180, 12, 0, 0.35);
}

.a2-orgcard__x:hover { background: #c10500; color: #fff; }

.a2-orgcard__port {
    position: absolute;
    left: 50%;
    z-index: 3;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e23b4a;
    box-shadow: 0 0 0 1px #f3b4bc;
    transform: translateX(-50%);
    cursor: crosshair;
}

.a2-orgcard__port--in { top: -11px; }

.a2-orgcard__port--out { bottom: -11px; }

.a2-org__side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 18px 16px 16px;
    border-left: 1px solid #efe4e6;
    background: #f6f7fb;
}

.a2-orgback {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--a2-red);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.a2-orgback:hover { background: #fff5f5; }

.a2-org__sidehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.a2-org__sidehead h2,
.a2-org__side h2 { margin: 0; font-size: 22px; line-height: 1.2; }

.a2-org__sidehead .a2-save {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(204, 0, 0, 0.22);
}

.a2-orglist {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    margin: 0;
    padding: 2px 4px 2px 0;
    overflow: auto;
    user-select: none;
    -webkit-user-select: none;
}

.a2-orgname {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 60px;
    padding: 8px 12px;
    border: 1px solid #e6eaf1;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.a2-orgname:hover { border-color: #f0c2c6; box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06); }

.a2-orgname:active { cursor: grabbing; }

.a2-orgname.is-placed {
    background: #f3fbf6;
    border-color: #b7e7c8;
}

.a2-orgname.is-placed small { color: #146c3a; }

#a2-org-modal .a2-sheet__foot #a2-org-delete { margin-right: auto; }

#a2-org-modal .a2-sheet__foot #a2-org-delete[hidden] { display: none !important; }

.a2-orgname.is-selected { border-color: #e10600; box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.14); }

.a2-orgname__pic {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fde8ea;
    color: #b10000;
    font-weight: 700;
    object-fit: cover;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #f3d5d8;
}

.a2-orgname > span { min-width: 0; }

.a2-orgname strong,
.a2-orgname small { display: block; }

.a2-orgname strong {
    overflow: hidden;
    color: #1c2430;
    font-size: 15px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-orgname small { margin-top: 2px; color: #8b93a1; font-size: 12px; line-height: 1.35; white-space: pre-line; }

.a2-orgname.is-placed .a2-orgname__pic { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #b7e7c8; }

.a2-org__rows { width: 100%; margin-bottom: 12px; }

.a2-orgghost {
    position: fixed;
    z-index: 80;
    max-width: 220px;
    padding: 8px 12px;
    border: 1px solid #e10600;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(120, 16, 24, 0.16);
    color: #1c2430;
    font-weight: 700;
    pointer-events: none;
}

.a2-org__view.is-drop { box-shadow: inset 0 0 0 3px rgba(225, 6, 0, 0.55); }

.a2-orgguide {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    background: #1d6fe0;
}

.a2-orgguide[hidden] { display: none; }

.a2-orgguide--h {
    left: -4000px;
    width: 20000px;
    height: 1px;
}

.a2-orgguide--v {
    top: -4000px;
    width: 1px;
    height: 20000px;
}

.a2-orgaxis {
    position: absolute;
    z-index: 1;
    width: 0;
    border-left: 2px dashed #e10600;
    pointer-events: none;
}

.a2-orgaxis[hidden] { display: none; }

.a2-orgaxis span {
    position: absolute;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    color: #e10600;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
}


.a2-orggaps { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.a2-orggap {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #1d4f86;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
}

.a2-orggap.is-uneven { background: #fff1f2; color: #b10000; }

.a2-org__lead,
.a2-org__help {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    color: #667085;
    font-size: 12.5px;
    line-height: 1.55;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.a2-org__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.a2-org__acts .a2-save,
.a2-org__acts .a2-ghost { min-height: 38px; }

.a2-org__status { min-height: 1.2em; margin: 0 0 12px; font-size: 12px; color: #8b93a1; }

.a2-org__status.is-ok { color: #146c3a; }

.a2-org__status.is-busy { color: #9a3412; }

.a2-org__status.is-bad { color: #b10000; }

.a2-orgform { display: grid; gap: 10px; }

.a2-orgform__photo {
    display: flex;
    justify-content: center;
}

.a2-orgform__photo img,
.a2-orgform__photo .a2-orgcard__avatar {
    width: min(83px, 100%);
    height: auto;
    aspect-ratio: 415 / 567;
    object-fit: cover;
    object-position: center center;
    border-radius: 8px;
}

.a2-orgform .a2-field textarea { min-height: 72px; }

.a2-orgform select {
    width: 100%;
    min-height: 42px;
    padding: 8px 42px 8px 10px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--a2-ink);
}

.a2-orgform__btns { display: flex; flex-wrap: wrap; gap: 8px; }

.a2-orgkids__label { margin: 0 0 6px; font-size: 13px; font-weight: 700; }

.a2-orgkid {
    display: inline-flex;
    margin: 0 6px 6px 0;
    padding: 6px 10px;
    border: 1px solid #f3d0d4;
    border-radius: 999px;
    background: #fff7f7;
    color: #7a3140;
    cursor: pointer;
}

.a2-orgkid:hover { border-color: #e10600; }

@media (max-width: 900px) {
    .a2-content:has(.a2-org) { height: auto; overflow: visible; }
    .a2-org { display: flex; flex-direction: column; height: auto; }
    .a2-org__stage { height: 70vh; min-height: 440px; }
    .a2-org__side { border-left: 0; border-top: 1px solid #f3e4e6; overflow: visible; }
    .a2-orglist { max-height: 70vh; }
    .a2-org__map { width: 132px; height: 84px; right: 10px; bottom: 64px; }
}

body.a2.is-dark .a2-org,
body.a2.is-dark .a2-org__side { background: var(--a2-card); }

body.a2.is-dark .a2-org__view {
    background-color: #171c26;
    background-image: radial-gradient(#3a2c34 1.15px, transparent 1.2px);
}

body.a2.is-dark .a2-org__zoom,
body.a2.is-dark .a2-org__map,
body.a2.is-dark .a2-org__hscroll,
body.a2.is-dark .a2-org__vscroll,
body.a2.is-dark .a2-org__badge,
body.a2.is-dark .a2-orgtools__btn,
body.a2.is-dark .a2-orgtools__menu { background: #1b2230; color: var(--a2-ink); }

body.a2.is-dark .a2-orgtools__menu button { color: var(--a2-ink); }

body.a2.is-dark .a2-org__view.has-sky { background-color: #d7e9f8; }

body.a2.is-dark .a2-orgcard { background: transparent; border-color: transparent; }

body.a2.is-dark .a2-org__view:not(.has-sky) .a2-orgcard__name,
body.a2.is-dark .a2-org__view:not(.has-sky) .a2-orgcard__role,
body.a2.is-dark .a2-org__view:not(.has-sky) .a2-orgcard__detail { color: var(--a2-ink); }

body.a2.is-dark .a2-org__zoom button,
body.a2.is-dark .a2-org__zoom span { color: var(--a2-ink); }

body.a2.is-dark .a2-orgrow__edit input,
body.a2.is-dark .a2-orgform select { background-color: #12161e; color: var(--a2-ink); border-color: var(--a2-line); }

body.a2.is-dark .a2-orgname,
body.a2.is-dark .a2-orgghost { background: #1b2230; color: var(--a2-ink); border-color: #3a2c34; }

body.a2.is-dark .a2-orgname.is-placed { background: #143024; border-color: #1f7a45; }

body.a2.is-dark .a2-orgname small { color: #a7b0be; }

body.a2.is-dark .a2-orgname.is-placed small { color: #86efac; }

body.a2.is-dark .a2-orgback,
body.a2.is-dark .a2-org__help { background: #12161e; color: var(--a2-ink); }

body.a2.is-dark .a2-orgname strong { color: var(--a2-ink); }

.a2-logpanel { margin-top: 14px; }

.a2-logfilters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-bottom: 16px;
}

.a2-logfilters label {
    display: grid;
    gap: 6px;
    min-width: 160px;
    flex: 1 1 180px;
    font-size: 13px;
    color: #4b5565;
}

.a2-logfilters input,
.a2-logfilters select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--a2-ink);
}

.a2-logfilters select {
    padding-right: 42px;
}

.a2-logfilters .a2-save,
.a2-logfilters .a2-ghost {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.a2-logtable small {
    display: block;
    margin-top: 4px;
    color: var(--a2-muted);
    font-size: 12px;
}

.a2-logtable strong {
    display: block;
    font-size: 14px;
    line-height: 1.45;
}

.a2-logtable ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #5d6675;
    font-size: 13px;
}

.a2-logact {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.a2-logact--create { background: #e8f8ef; color: #146c3a; }
.a2-logact--update { background: #e8f1ff; color: #1d4ed8; }
.a2-logact--delete { background: #fde8ea; color: #b10000; }

@media (max-width: 720px) {
    .a2-logtable thead { display: none; }
    .a2-logtable,
    .a2-logtable tbody,
    .a2-logtable tr,
    .a2-logtable td { display: block; width: 100%; }
    .a2-logtable tr {
        margin-bottom: 10px;
        padding: 10px 12px;
        border: 1px solid var(--a2-line);
        border-radius: 14px;
    }
    .a2-logtable td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border: 0;
        padding: 6px 0;
        text-align: right;
    }
    .a2-logtable td::before {
        content: attr(data-label);
        color: #94a3b8;
        font-size: 12px;
        font-weight: 700;
    }
    .a2-logtable td[data-label="รายการ"] {
        display: block;
        text-align: left;
    }
}

body.a2 .a2-bedate {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 44px;
    border: 1px solid var(--a2-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

body.a2 .a2-bedate:focus-within {
    border-color: var(--a2-red);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

body.a2 .a2-bedate__text,
body.a2 .a2-field .a2-bedate__text,
body.a2 .a2-post-form .a2-field .a2-bedate__text {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--a2-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 44px;
}

body.a2 .a2-bedate__text:focus {
    outline: none;
}

body.a2 input[type="date"].a2-bedate__native,
body.a2 .a2-field input[type="date"].a2-bedate__native,
body.a2 .a2-post-form .a2-field input[type="date"].a2-bedate__native {
    position: relative;
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 1px solid var(--a2-line) !important;
    border-radius: 0 !important;
    background-color: #f8f9fb !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
    color: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 0;
}

body.a2 input[type="date"].a2-bedate__native::-webkit-datetime-edit,
body.a2 input[type="date"].a2-bedate__native::-webkit-datetime-edit-fields-wrapper,
body.a2 input[type="date"].a2-bedate__native::-webkit-datetime-edit-text,
body.a2 input[type="date"].a2-bedate__native::-webkit-datetime-edit-month-field,
body.a2 input[type="date"].a2-bedate__native::-webkit-datetime-edit-day-field,
body.a2 input[type="date"].a2-bedate__native::-webkit-datetime-edit-year-field {
    display: none;
    padding: 0;
    margin: 0;
}

body.a2 input[type="date"].a2-bedate__native::-webkit-calendar-picker-indicator,
body.a2 input[type="date"].a2-bedate__native::-webkit-inner-spin-button,
body.a2 input[type="date"].a2-bedate__native::-webkit-clear-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

body.a2 input[type="date"].a2-bedate__native::-moz-calendar-picker-indicator {
    opacity: 0;
}

body.a2.is-dark .a2-bedate {
    background: #151b26;
    border-color: var(--a2-line);
}

body.a2.is-dark .a2-bedate__text {
    color: var(--a2-ink);
}

body.a2.is-dark input[type="date"].a2-bedate__native {
    background-color: #10161f !important;
    border-left-color: var(--a2-line) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") !important;
}

.a2-mnu-name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-left: calc((var(--a2-mnu-depth, 1) - 1) * 18px);
}

.a2-mnu-card.is-hidden,
.a2-mnu-childrow.is-hidden {
    opacity: 0.62;
}

.a2-icoact--hide { color: #64748b; }
.a2-icoact--show { color: #15803d; }

.a2-mnu-show {
    align-self: end;
    min-height: 42px;
}

@media (min-width: 721px) {
    .a2-mnu-table {
        width: 100%;
        table-layout: fixed;
    }

    .a2-mnu-table th:nth-child(1),
    .a2-mnu-table td:nth-child(1) { width: 7.5rem; }

    .a2-mnu-table th:nth-child(3),
    .a2-mnu-table td:nth-child(3) { width: 7.75rem; }

    .a2-mnu-table th:nth-child(4),
    .a2-mnu-table td:nth-child(4) { width: 13.5rem; }

    .a2-mnu-table th:nth-child(3),
    .a2-mnu-table td:nth-child(3),
    .a2-mnu-table th:nth-child(4),
    .a2-mnu-table td:nth-child(4) {
        text-align: right;
    }

    .a2-mnu-table td:nth-child(4) .a2-icoacts {
        justify-content: flex-end;
        width: 100%;
    }

    .a2-news-posts.a2-mnu-table th:nth-child(4),
    .a2-news-posts.a2-mnu-table td:nth-child(4) {
        width: 4.5rem;
    }

    .a2-news-posts.a2-mnu-table th:nth-child(5),
    .a2-news-posts.a2-mnu-table td:nth-child(5) {
        width: 7.5rem;
        text-align: right;
    }

    .a2-news-posts.a2-mnu-table td:nth-child(5) .a2-icoacts {
        justify-content: flex-end;
        width: 100%;
    }

    .a2-events-table.a2-mnu-table th:nth-child(1),
    .a2-events-table.a2-mnu-table td:nth-child(1) {
        width: 48px;
        text-align: center;
    }

    .a2-events-table.a2-mnu-table th:nth-child(2),
    .a2-events-table.a2-mnu-table td:nth-child(2) {
        width: 84px;
        text-align: left;
    }

    .a2-events-table.a2-mnu-table th:nth-child(3),
    .a2-events-table.a2-mnu-table td:nth-child(3) {
        width: auto;
        text-align: left;
    }

    .a2-events-table.a2-mnu-table th:nth-child(4),
    .a2-events-table.a2-mnu-table td:nth-child(4) {
        width: 9.5rem;
        text-align: right;
    }

    .a2-events-table.a2-mnu-table th:nth-child(5),
    .a2-events-table.a2-mnu-table td:nth-child(5) {
        width: 8.5rem;
        text-align: right;
    }

    .a2-events-table.a2-mnu-table th:nth-child(6),
    .a2-events-table.a2-mnu-table td:nth-child(6) {
        width: 7.5rem;
        text-align: right;
    }

    .a2-events-table.a2-mnu-table td:nth-child(6) .a2-icoacts {
        justify-content: flex-end;
        width: 100%;
    }

    .a2-orgtable.a2-mnu-table th:nth-child(1),
    .a2-orgtable.a2-mnu-table td:nth-child(1) {
        width: auto;
        text-align: left;
    }

    .a2-orgtable.a2-mnu-table th:nth-child(2),
    .a2-orgtable.a2-mnu-table td:nth-child(2) {
        width: 7.5rem;
        text-align: center;
    }

    .a2-orgtable.a2-mnu-table th:nth-child(3),
    .a2-orgtable.a2-mnu-table td:nth-child(3) {
        width: 16.5rem;
        text-align: right;
    }

    .a2-orgtable .a2-icoacts {
        justify-content: flex-end;
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
    }
}

body.a2 label.a2-check {
    align-self: flex-start;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    min-height: 42px;
    margin: 2px 0 0;
    padding: 0 14px 0 12px;
    border: 1px solid #e6ebf2;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

body.a2 label.a2-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: none;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    accent-color: #15803d;
}

body.a2 label.a2-check:has(input:checked) {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

body.a2 label.a2-check input[type="checkbox"]:focus {
    outline: 2px solid rgba(21, 128, 61, 0.35);
    outline-offset: 2px;
    box-shadow: none;
}

body.a2.is-dark label.a2-check {
    background: #151b26;
    border-color: var(--a2-line);
    color: var(--a2-ink);
}

body.a2.is-dark label.a2-check:has(input:checked) {
    background: #143024;
    border-color: #1f7a45;
    color: #86efac;
}

/* =========================================================
   Admin2 UI polish — ใช้ร่วมทุกหน้า
   ========================================================= */

@keyframes a2-float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes a2-stat-shine {
    0% { transform: translateX(-120%) rotate(18deg); opacity: 0; }
    35% { opacity: 0.35; }
    100% { transform: translateX(220%) rotate(18deg); opacity: 0; }
}

@keyframes a2-soft-pulse {
    0%, 100% { opacity: 0.18; transform: scale(1); }
    50% { opacity: 0.28; transform: scale(1.06); }
}

.a2-hello {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 40px rgba(153, 0, 0, 0.18);
    background:
        radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.16) 0 70px, transparent 71px),
        radial-gradient(circle at 8% 90%, rgba(255, 255, 255, 0.1) 0 60px, transparent 61px),
        radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        linear-gradient(100deg, #CC0000 0%, #b00000 55%, #990000 100%);
    background-size: auto, auto, 10px 10px, auto;
}

.a2-hello::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -48px;
    width: 180px;
    height: 180px;
    border: 18px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.a2-hello__time {
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(4px);
}

.a2-stats {
    gap: 14px;
}

.a2-stat {
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.a2-stat:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.18);
    filter: saturate(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .a2-stat:hover .a2-stat__icon,
    .a2-stat:hover .a2-stat__mark {
        animation: none;
        transform: none;
    }
}

.a2-panel,
.a2-sum,
.a2-wpanel,
.a2-logpanel,
.a2-mnu-card,
.a2-table-wrap,
.a2-tablewrap,
.a2-disk-panel {
    border: 1px solid #e4ebf3;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 28px rgba(15, 23, 42, 0.06);
}

.a2-panel,
.a2-sum,
.a2-wpanel,
.a2-mnu-card,
.a2-logpanel {
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.a2-panel:hover,
.a2-wpanel:hover,
.a2-mnu-card:hover,
.a2-logpanel:hover {
    border-color: #f0b4b4;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 16px 34px rgba(204, 0, 0, 0.08);
}

/* แถบหัวข้อหน้าไม่ต้องเป็นกรอบการ์ดว่าง */
.a2-post-bar {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.a2-topsearch__list[hidden] {
    display: none !important;
}

.a2-alert:empty {
    display: none !important;
}

.a2-panel {
    border-radius: 20px;
    padding: 18px;
}

.a2-sum {
    border-color: #f0d4d4;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(153, 0, 0, 0.08);
}

.a2-sum__head {
    background:
        radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        linear-gradient(100deg, #CC0000 0%, #b00000 55%, #990000 100%);
    background-size: 8px 8px, auto;
}

.a2-sum__all {
    color: var(--a2-red);
}

.a2-sum__stat {
    border: 1px solid #e7edf5;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.a2-sum__stat:hover {
    transform: translateY(-3px);
    border-color: #f0b4b4;
    box-shadow: 0 12px 24px rgba(204, 0, 0, 0.08);
}

.a2-sum__row,
.a2-wrow,
.a2-wlock,
.a2-wlib-card,
.a2-wcard,
.a2-choice label,
.a2-field,
.a2-switch {
    border-color: #e7edf5;
}

.a2-wrow,
.a2-wlock,
.a2-wlib-card,
.a2-wcard {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.03);
}

.a2-table-wrap,
.a2-tablewrap {
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
}

.a2-panel .a2-table-wrap,
.a2-panel .a2-tablewrap {
    border: 1px solid #e7edf5;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    border-radius: 16px;
    margin-top: 4px;
}

.a2-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    border-spacing: 0;
}

.a2-table thead {
    background: var(--a2-grad-x);
}

.a2-table thead tr {
    background: transparent;
}

.a2-table thead th,
.a2-table > thead > tr > th {
    padding: 14px 16px !important;
    vertical-align: middle !important;
    text-align: left;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    color: #fff !important;
    border: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.14) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.a2-table thead th:last-child,
.a2-table > thead > tr > th:last-child {
    border-right: 0 !important;
}

.a2-table tbody td {
    padding: 14px 16px !important;
    vertical-align: middle !important;
    background: #fff;
    border-bottom: 1px solid #eef2f7 !important;
    color: var(--a2-ink);
}

.a2-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.a2-table tbody tr {
    transition: background .15s ease;
}

.a2-table tbody tr:hover td {
    background: #fff8f8;
}

/* ดรอปดาวน์ / select ทั้งระบบ admin2 — ลูกศรแดง */
body.a2 select:not([hidden]) {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-height: 42px;
    padding: 0 42px 0 14px;
    border: 1px solid #e4ebf3;
    border-radius: 12px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23C40001' d='M6.5 9.5a1 1 0 0 1 1.7-.7L12 12.6l3.8-3.8a1 1 0 0 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L6.8 10.2a1 1 0 0 1-.3-.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
    color: var(--a2-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.a2 select:not([hidden]):hover {
    border-color: #f0b4b4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23C40001' d='M6.5 9.5a1 1 0 0 1 1.7-.7L12 12.6l3.8-3.8a1 1 0 0 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L6.8 10.2a1 1 0 0 1-.3-.7z'/%3E%3C/svg%3E");
}

body.a2 select:not([hidden]):focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(196, 0, 1, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23C40001' d='M6.5 9.5a1 1 0 0 1 1.7-.7L12 12.6l3.8-3.8a1 1 0 0 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L6.8 10.2a1 1 0 0 1-.3-.7z'/%3E%3C/svg%3E");
}

.a2-inline {
    gap: 10px;
}

.a2-inline select,
.a2-fields select,
.a2-panel__tools select,
.a2-logfilters select,
.a2-mnu-top select {
    width: auto;
    min-width: 180px;
}

.a2-panel__head,
.a2-panel__tools,
.a2-mnu-top,
.a2-inline {
    margin-bottom: 4px;
}

.a2-panel__tools {
    gap: 10px;
}

.a2-modal__box {
    border: 1px solid #e4ebf3;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.a2-save,
.a2-ghost,
.a2-sum__all {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.a2-save {
    box-shadow: var(--a2-btn-shadow);
}

@media (min-width: 960px) {
    .a2-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .a2-stat,
    .a2-stat::before,
    .a2-stat::after {
        animation: none !important;
    }

    .a2-stat:hover,
    .a2-panel:hover,
    .a2-wpanel:hover,
    .a2-mnu-card:hover,
    .a2-sum__stat:hover {
        transform: none;
    }
}

body.a2.is-dark .a2-panel,
body.a2.is-dark .a2-sum,
body.a2.is-dark .a2-wpanel,
body.a2.is-dark .a2-logpanel,
body.a2.is-dark .a2-mnu-card,
body.a2.is-dark .a2-table-wrap,
body.a2.is-dark .a2-tablewrap {
    border-color: #3a2a2a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

body.a2.is-dark .a2-post-bar {
    border: 0;
    box-shadow: none;
    background: transparent;
}

body.a2.is-dark .a2-table thead {
    background: linear-gradient(90deg, #C40001 0%, #7A0001 100%) !important;
}

body.a2.is-dark .a2-table thead tr,
body.a2.is-dark .a2-table thead th,
body.a2.is-dark .a2-table > thead > tr > th {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    color: #fff !important;
}

body.a2.is-dark .a2-table tbody td {
    background: var(--a2-card);
    border-bottom-color: #3a2a2a !important;
}

body.a2.is-dark .a2-table tbody tr:hover td {
    background: #2a1515;
}

body.a2.is-dark select:not([hidden]) {
    background-color: #151b26;
    border-color: #3a2a2a;
    color: var(--a2-ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff4d4d' d='M6.5 9.5a1 1 0 0 1 1.7-.7L12 12.6l3.8-3.8a1 1 0 0 1 1.4 1.4l-4.5 4.5a1 1 0 0 1-1.4 0L6.8 10.2a1 1 0 0 1-.3-.7z'/%3E%3C/svg%3E");
}

/* =========================================================
   Admin2 kit — ปุ่ม/ค้นหา/ตาราง ไล่สีแบบตัวอย่าง (คงโทนแดง)
   ========================================================= */

body.a2 .a2-save,
body.a2 .a2-search button,
body.a2 .a2-authsubmit,
body.a2 .a2-mnu-del--solid,
body.a2 .a2-sheet__foot .a2-save,
body.a2 .a2-modal__foot .a2-save,
body.a2 .a2-sheet__foot .a2-mnu-del,
body.a2 a.a2-save,
body.a2 button.a2-save,
body.a2 .a2-topsearch button {
    border: 0;
    border-radius: var(--a2-pill);
    background: var(--a2-grad);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
    box-shadow: var(--a2-btn-shadow);
    transition: background .15s ease, box-shadow .15s ease, transform .15s ease, filter .15s ease;
}

body.a2 .a2-save:hover,
body.a2 .a2-search button:hover,
body.a2 .a2-authsubmit:hover,
body.a2 .a2-mnu-del--solid:hover,
body.a2 .a2-sheet__foot .a2-save:hover,
body.a2 .a2-modal__foot .a2-save:hover,
body.a2 .a2-sheet__foot .a2-mnu-del:hover,
body.a2 a.a2-save:hover,
body.a2 button.a2-save:hover,
body.a2 .a2-topsearch button:hover {
    background: var(--a2-grad);
    filter: none;
    box-shadow: 0 8px 18px rgba(197, 1, 2, 0.28);
}

body.a2 .a2-save:active,
body.a2 .a2-search button:active,
body.a2 a.a2-save:active,
body.a2 button.a2-save:active,
body.a2 .a2-topsearch button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(197, 1, 2, 0.24);
}

body.a2 .a2-ghost:not(.a2-post-back) {
    border-radius: var(--a2-pill);
    border: 1px solid #f0c2c2;
    background: #fff;
    color: var(--a2-red);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

body.a2 .a2-ghost:not(.a2-post-back):hover {
    border-color: #e89a9a;
    background: #fff8f8;
    color: var(--a2-red-dark);
}

body.a2 .a2-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

body.a2 .a2-desk-search {
    margin: 0 0 14px;
}

body.a2 .a2-search input,
body.a2 .a2-search input[type="search"],
body.a2 .a2-search input[type="text"] {
    flex: 1 1 220px;
    width: auto;
    min-width: 180px;
    min-height: 44px;
    padding: 0 18px 0 42px;
    border: 1px solid #f0d4d4;
    border-radius: var(--a2-pill);
    background:
        #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23CC0000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E")
        no-repeat 14px center / 18px;
    color: var(--a2-ink);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

body.a2 .a2-search input:focus {
    outline: none;
    border-color: #e89a9a;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

body.a2 .a2-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    font-weight: 700;
}

body.a2 .a2-panel__tools .a2-save,
body.a2 .a2-post-bar__acts .a2-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
}

body.a2 .a2-mnu-top .a2-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    min-height: 42px;
    padding: 0 18px;
}

body.a2 .a2-topsearch input[type="search"] {
    border-radius: var(--a2-pill);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body.a2 .a2-topsearch button {
    background: var(--a2-grad);
    box-shadow: var(--a2-btn-shadow);
}

body.a2 .a2-topsearch button:hover {
    background: var(--a2-grad);
    box-shadow: 0 8px 18px rgba(197, 1, 2, 0.28);
}

body.a2 .a2-table-wrap,
body.a2 .a2-tablewrap {
    border: 1px solid #f0d4d4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(153, 0, 0, 0.06);
    overflow: hidden;
}

/* ตารางไฟล์ในคอลัมน์ขวาของหน้าแก้ไข ห้ามใช้ความกว้างขั้นต่ำ 560px
   เพราะกรอบ overflow:hidden จะตัดคอลัมน์จัดการ */
body.a2 .a2-post-grid--split > .a2-panel {
    min-width: 0;
}

body.a2 .a2-post-files .a2-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

body.a2 .a2-post-files .a2-table th,
body.a2 .a2-post-files .a2-table td {
    padding: 10px 8px !important;
}

body.a2 .a2-post-files .a2-table th:nth-child(1),
body.a2 .a2-post-files .a2-table td:nth-child(1) {
    width: 2.25rem;
}

body.a2 .a2-post-files .a2-table th:nth-child(3),
body.a2 .a2-post-files .a2-table td:nth-child(3) {
    width: 5.6rem;
}

body.a2 .a2-post-files .a2-table th:last-child,
body.a2 .a2-post-files .a2-table td:last-child {
    width: 42%;
}

body.a2 .a2-post-files .a2-icoacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    width: 100%;
}

body.a2 .a2-post-files .a2-file-coverbtn {
    white-space: nowrap;
}

body.a2 .a2-table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ไล่สีหัวตารางทั้งแถบเดียวที่ thead — ช่อง th โปร่งใส ไม่ไล่ทีละคอลัมน์ */
body.a2 .a2-table thead {
    background: linear-gradient(90deg, #C40001 0%, #7A0001 100%) !important;
}

body.a2 .a2-table thead tr {
    background: transparent !important;
}

body.a2 .a2-table thead th,
body.a2 .a2-table > thead > tr > th {
    padding: 15px 16px !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    color: #fff !important;
    border: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.16) !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

body.a2 .a2-table thead th:last-child,
body.a2 .a2-table > thead > tr > th:last-child {
    border-right: 0 !important;
}

body.a2 .a2-table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f3e8e8 !important;
}

body.a2 .a2-table tbody tr:hover td {
    background: #fff5f5;
}

body.a2 .a2-pager a,
body.a2 .a2-pager span {
    border-radius: var(--a2-pill);
}

body.a2 .a2-pager a:hover {
    background: #fff5f5;
}

body.a2 .a2-hello,
body.a2 .a2-sum__head,
body.a2 .a2-authcard__head {
    background:
        radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.16) 0 70px, transparent 71px),
        radial-gradient(circle at 8% 90%, rgba(255, 255, 255, 0.1) 0 60px, transparent 61px),
        var(--a2-grad-x);
}

body.a2 .a2-stat--red,
body.a2 .a2-wtabs button.is-on {
    background: var(--a2-grad);
}

/* เมนูซ้าย: ปุ่มที่เลือกต้องพื้นขาว ไม่ทับด้วยไล่สีแดง */
body.a2 .a2-rail {
    background: var(--a2-rail-bg);
    color: #fff;
}

body.a2 .a2-rail__btn {
    background: transparent;
    color: #fff;
}

body.a2 .a2-rail__btn.is-active,
body.a2 .a2-rail__btn.is-active:hover {
    background: #fff !important;
    color: var(--a2-red) !important;
    box-shadow: 0 6px 14px rgba(80, 0, 0, 0.18);
}

body.a2 .a2-icoact--edit {
    color: #2b7fff;
}

body.a2.is-dark .a2-save,
body.a2.is-dark .a2-search button,
body.a2.is-dark .a2-authsubmit,
body.a2.is-dark a.a2-save,
body.a2.is-dark button.a2-save {
    background: var(--a2-grad);
    color: #fff;
}

body.a2.is-dark .a2-search input,
body.a2.is-dark .a2-search input[type="search"],
body.a2.is-dark .a2-search input[type="text"] {
    background-color: #151b26;
    border-color: #5c2a2a;
    color: var(--a2-ink);
}

body.a2.is-dark .a2-table thead {
    background: linear-gradient(90deg, #C40001 0%, #7A0001 100%) !important;
}

body.a2.is-dark .a2-table thead tr,
body.a2.is-dark .a2-table thead th,
body.a2.is-dark .a2-table > thead > tr > th {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
}

body.a2.is-dark .a2-table-wrap,
body.a2.is-dark .a2-tablewrap {
    border-color: #5c2a2a;
}

body.a2.is-dark .a2-rail__btn.is-active,
body.a2.is-dark .a2-rail__btn.is-active:hover {
    background: #fff !important;
    color: var(--a2-red) !important;
}

.a2-orgtable .a2-mnu-ord form { display: inline-flex; margin: 0; }
.a2-org__adds { display: flex; gap: 6px; align-items: center; }
.a2-org__adds .a2-ghost,
.a2-org__adds .a2-save { min-height: 36px; padding: 0 12px; border-radius: 999px; }
.a2-orgnote {
    position: absolute;
    z-index: 3;
    width: max-content;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(20, 40, 70, 0.16);
    text-align: center;
    cursor: grab;
    user-select: none;
}
.a2-orgnote p {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: pre;
}
.a2-orgnote.is-photo {
    width: auto;
    max-width: none;
    padding: 0;
    background: transparent !important;
    box-shadow: none;
}
.a2-orgnote.is-photo img {
    display: block;
    width: 280px;
    height: auto;
    border-radius: 12px;
    -webkit-user-drag: none;
}
.a2-orgnote.is-selected { outline: 3px solid #e10600; outline-offset: 2px; }
.a2-orgnote__x {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #e10600;
    color: #fff;
    font-size: 16px;
    line-height: 22px;
    cursor: pointer;
}
.a2-orgnote-colors { display: flex; gap: 12px; }
.a2-orgnote-colors label { flex: 1; }
.a2-orgnote-colors input[type="color"] { width: 100%; height: 40px; padding: 4px; border: 1px solid #d7dde6; border-radius: 10px; background: #fff; }
.a2-orgnote-preview { display: block; width: 160px; height: auto; margin-top: 6px; border-radius: 10px; }

/* หน้าภาพสไลด์ — การ์ดเพิ่ม/รายการ ตามธีมแดงเดิม */
.a2-slides {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.a2-slides__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.a2-slides__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 16px;
    border: 1px solid #f3d4d4;
    border-radius: 999px;
    background: #fff;
    color: var(--a2-ink);
    box-shadow: 0 4px 14px rgba(196, 0, 1, 0.05);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.a2-slides__tab svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--a2-red);
}

.a2-slides__tab.is-on {
    border-color: transparent;
    background: var(--a2-grad);
    color: #fff;
    box-shadow: var(--a2-btn-shadow);
}

.a2-slides__tab.is-on svg { color: #fff; }

.a2-slides__add,
.a2-slides__list {
    padding: 18px;
    border: 1px solid #f6e4e4;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(196, 0, 1, 0.06);
}

.a2-slides__add {
    display: grid;
    grid-template-columns: minmax(240px, 0.95fr) minmax(260px, 1.15fr) auto;
    grid-template-areas:
        "file link action"
        "name name .";
    gap: 8px 18px;
    align-items: end;
}

.a2-slides__col--file { grid-area: file; }
.a2-slides__col--link { grid-area: link; }
.a2-slides__submit { grid-area: action; }
.a2-slides__add > .a2-slides__filename {
    grid-area: name;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-slides__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--a2-ink);
    font-size: 15px;
    font-weight: 700;
}

.a2-slides__label svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--a2-red);
}

.a2-slides__label em {
    color: var(--a2-red);
    font-style: normal;
}

.a2-slides__filebox {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.a2 .a2-slides__filebox > input[type="file"].a2-slides__file {
    flex: 1 1 180px;
    width: auto;
    min-width: 0;
    height: 42px;
    min-height: 42px;
}

label.a2-slides__check {
    position: relative;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    color: #3a4558;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

label.a2-slides__check input {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.a2-slides__tick {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid #f0b4b4;
    border-radius: 6px;
    background: #fff;
}

label.a2-slides__check input:checked + .a2-slides__tick {
    border-color: var(--a2-red);
    background: var(--a2-red);
}

label.a2-slides__check input:checked + .a2-slides__tick::after {
    content: "";
    width: 6px;
    height: 10px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

label.a2-slides__check input:focus-visible + .a2-slides__tick {
    outline: 2px solid rgba(204, 0, 0, 0.35);
    outline-offset: 2px;
}

.a2-slides__col--link input,
.a2-slides__text {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #f0d0d0;
    border-radius: 10px;
    background: #fff;
    color: var(--a2-ink);
    font: inherit;
    font-size: 14px;
}

.a2-slides__col--link input:focus,
.a2-slides__text:focus,
.a2-slides-edit input[type="text"]:focus,
.a2-slides-edit select:focus {
    outline: 2px solid rgba(204, 0, 0, 0.22);
    border-color: var(--a2-red);
}

.a2-slides__col--link input:disabled,
.a2-slides__text:disabled,
.a2-slides-edit input[type="text"]:disabled {
    background: #f7f8fa;
    color: #98a2b3;
}

.a2-slides__filename {
    margin: 4px 0 0;
    color: var(--a2-muted);
    font-size: 13px;
}

.a2-slides__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--a2-grad);
    color: #fff;
    box-shadow: var(--a2-btn-shadow);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.a2-slides__submit svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.a2-slides__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.a2-slides__head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--a2-ink);
    font-size: 18px;
}

.a2-slides__head h2 svg {
    width: 20px;
    height: 20px;
    flex: none;
    color: var(--a2-red);
}

.a2-slides__all {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #f3b4b4;
    border-radius: 999px;
    background: #fff;
    color: var(--a2-red);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.a2-slides__all:hover { background: #fff5f5; }

.a2-slides__empty {
    margin: 0;
    padding: 28px 12px;
    border-radius: 16px;
    background: #fff8f8;
    color: var(--a2-muted);
    text-align: center;
}

.a2-slides__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.a2-slides__card {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid #f3e4e4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(196, 0, 1, 0.05);
}

.a2-slides__media {
    overflow: hidden;
    border-radius: 14px;
    background: #f8fafc;
}

.a2-slides__media img,
.a2-slides__preview {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
}

.a2-slides__preview {
    border-radius: 14px;
}

.a2-slides__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 2px 2px;
}

.a2-slides__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--a2-red);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.a2-slides__link.is-empty { color: var(--a2-muted); font-weight: 500; }

.a2-slides__link svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.a2-slides__link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a2-slides__acts {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex: none;
}

body.a2 .a2-slides__card .a2-icoact--edit,
body.a2 .a2-slides__card .a2-icoact--del {
    color: var(--a2-red);
}

body.a2 .a2-slides__card .a2-icoact {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: transparent;
}

body.a2 .a2-slides__card .a2-icoact:hover { background: #fff1f1; }

.a2-slides__list .a2-pager { margin-top: 16px; }

.a2-slides-edit .a2-slides__filebox { margin-top: 12px; }

.a2-slides-edit .a2-sheet__sec > label span {
    display: inline-flex;
    margin-bottom: 2px;
}

@media (max-width: 900px) {
    .a2-slides__add,
    .a2-slides__add:has(.a2-slides__extra) {
        grid-template-columns: 1fr;
        grid-template-areas:
            "file"
            "name"
            "link"
            "action"
            "extra";
    }

    .a2-slides__submit {
        width: 100%;
        height: 42px;
    }
}

@media (max-width: 720px) {
    .a2-slides__tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .a2-slides__tab { flex: none; }

    .a2-slides__grid { grid-template-columns: 1fr 1fr; }

    .a2-slides__add,
    .a2-slides__list { padding: 14px; }
}

@media (max-width: 520px) {
    .a2-slides__grid { grid-template-columns: 1fr; }

    .a2-slides__filebox {
        flex-wrap: wrap;
    }
}

.a2-slides__add:has(.a2-slides__extra) {
    grid-template-areas:
        "file link action"
        "name name ."
        "extra extra extra";
}

.a2-slides__extra { grid-area: extra; }

.a2-slides__extra .a2-slides__text,
.a2-slides__col--link input,
.a2-slides__text {
    box-sizing: border-box;
}

.a2-slides__media { position: relative; }

.a2-slides__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(196, 0, 1, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

body.a2.is-dark .a2-slides__tab:not(.is-on),
body.a2.is-dark .a2-slides__add,
body.a2.is-dark .a2-slides__list,
body.a2.is-dark .a2-slides__card,
body.a2.is-dark .a2-slides__all,
body.a2.is-dark .a2-slides__empty {
    background: var(--a2-card);
    color: var(--a2-ink);
    border-color: #5c2a2a;
}

body.a2.is-dark .a2-slides__tick {
    background: #151b26;
    border-color: #7a3030;
}

body.a2.is-dark .a2-slides__col--link input,
body.a2.is-dark .a2-slides__text,
body.a2.is-dark .a2-slides-edit input[type="text"],
body.a2.is-dark .a2-slides-edit select {
    background: #151b26;
    color: var(--a2-ink);
    border-color: #5c2a2a;
}

body.a2.is-dark .a2-slides__col--link input:disabled,
body.a2.is-dark .a2-slides__text:disabled,
body.a2.is-dark .a2-slides-edit input[type="text"]:disabled {
    background: #121820;
    color: #8b93a1;
}

.a2-lays {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.a2-lay {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--a2-line, #e4e7ec);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.a2-lay input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.a2-lay:has(input:checked) {
    border-color: var(--a2-red);
    box-shadow: 0 0 0 2px rgba(180, 40, 40, .18);
}

.a2-lay__mock {
    display: block;
    height: 72px;
    border-radius: 8px;
    background: #f4f6f8;
}

.a2-lay__name,
.a2-lay small {
    display: block;
    text-align: center;
    line-height: 1.3;
}

.a2-lay small {
    color: var(--a2-muted, #6b7280);
    font-size: 12px;
}

.a2-lay__mock--0 {
    background:
        linear-gradient(#9aa3b2, #9aa3b2) 10px 14px / 46% 8px no-repeat,
        linear-gradient(#d5dbe3, #d5dbe3) 10px 28px / 78% 4px no-repeat,
        linear-gradient(#d5dbe3, #d5dbe3) 10px 38px / 70% 4px no-repeat,
        linear-gradient(#c5ced8, #c5ced8) 10px 50px / 34% 16px no-repeat,
        #f7f8fa;
}

.a2-lay__mock--1 {
    background:
        linear-gradient(#222, #222) 12px 16px / 62% 5px no-repeat,
        linear-gradient(#b7bdc6, #b7bdc6) 12px 28px / 76% 3px no-repeat,
        linear-gradient(#b7bdc6, #b7bdc6) 12px 36px / 72% 3px no-repeat,
        linear-gradient(#b7bdc6, #b7bdc6) 12px 44px / 68% 3px no-repeat,
        linear-gradient(#b7bdc6, #b7bdc6) 12px 52px / 50% 3px no-repeat,
        #fff;
}

.a2-lay__mock--2 {
    background:
        linear-gradient(#1d6fbf, #1d6fbf) 8px 28px / 28px 10px no-repeat,
        linear-gradient(#1d6fbf, #1d6fbf) 40px 28px / 28px 10px no-repeat,
        linear-gradient(#d7eefb, #d7eefb) 8px 44px / 42% 3px no-repeat,
        linear-gradient(#d7eefb, #d7eefb) 8px 52px / 36% 3px no-repeat,
        linear-gradient(#9fd0ee, #9fd0ee) 62% 18px / 32% 46px no-repeat,
        linear-gradient(180deg, #b7e4fb, #fff);
}

.a2-lay__mock--3 {
    background:
        radial-gradient(circle at 18% 28%, #e7d3b0 0 14px, transparent 15px),
        radial-gradient(circle at 40% 28%, #c9844a 0 14px, transparent 15px),
        radial-gradient(circle at 62% 28%, #6aa0c8 0 14px, transparent 15px),
        radial-gradient(circle at 84% 28%, #d4b46a 0 14px, transparent 15px),
        linear-gradient(#f08a1a, #f08a1a) center 48px / 36% 6px no-repeat,
        #fff;
}

.a2-lay__mock--4 {
    background:
        radial-gradient(circle at 78% 58%, #2b7de0 0 10px, #fff 11px 13px, transparent 14px),
        radial-gradient(circle at 62% 58%, #2b7de0 0 10px, #fff 11px 13px, transparent 14px),
        linear-gradient(#fff, #fff) 8px 40px / 34% 6px no-repeat,
        linear-gradient(#2f6b3a, #6eae78);
}

.a2-lay__mock--5 {
    background:
        linear-gradient(#e2b15a, #e2b15a) 8px 8px / 18% 36px no-repeat,
        linear-gradient(#e2b15a, #e2b15a) 30% 8px / 18% 36px no-repeat,
        linear-gradient(#e2b15a, #e2b15a) 52% 8px / 18% 36px no-repeat,
        linear-gradient(#e2b15a, #e2b15a) 74% 8px / 18% 36px no-repeat,
        linear-gradient(#178a45, #178a45) center 50px / 42% 14px no-repeat,
        #fff8ec;
}

body.a2.is-dark .a2-lay {
    background: #1c2430;
    border-color: #3a4658;
    color: #e8edf5;
}

.a2-secslot {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--a2-line, #e4e7ec);
    border-radius: 12px;
}

.a2-secslot__img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin: 6px 0 8px;
}
