*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%;font-family:"Noto Sans Thai",Tahoma,"Segoe UI",sans-serif;color:#24131c;background:#fff7fa}
body{font-size:15px;line-height:1.55}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font-family:inherit}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:280px;background:#20101a;color:#fff;padding:24px 14px;overflow-y:auto;z-index:1000;box-shadow:8px 0 30px rgba(41,16,28,.08)}
.brand{font-size:25px;font-weight:900;letter-spacing:.2px;padding:0 12px;color:#fff}.brand b{color:#ef7da8}.smallbrand{font-size:13px;color:#d9c9d0;padding:2px 12px 22px}
.nav{display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;min-height:46px!important;margin:4px 0!important;padding:11px 13px!important;border-radius:12px!important;color:#f8edf2!important;background:transparent!important;text-decoration:none!important;font-weight:600!important;font-size:15px!important;transition:.18s ease!important}
.nav i{width:22px;min-width:22px;text-align:center;font-size:17px;color:#f19abb}.nav span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav:hover{background:#321824!important;color:#fff!important;transform:translateX(2px)}.nav.active{background:linear-gradient(90deg,#d83e78,#eb7fa8)!important;color:#fff!important;box-shadow:0 8px 18px rgba(216,62,120,.2)}.nav.active i{color:#fff}
.main{margin-left:280px;min-height:100vh;width:calc(100% - 280px)}
.topbar{height:70px;background:#fff;border-bottom:1px solid #eadbe2;display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:900;color:#26151e}.topbar b{font-size:16px}.topbar span{color:#765d68;font-size:14px}
.content{padding:34px 30px 60px;max-width:1600px;margin:0 auto}.pagehead{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}.pagehead h1{font-size:34px;line-height:1.2;margin:0 0 7px;font-weight:900;color:#21141b}.pagehead p{margin:0;color:#806a74}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.cardx{background:#fff;border:1px solid #efdce5;border-radius:18px;padding:20px;box-shadow:0 5px 20px rgba(67,22,40,.04)}.cardx:hover{box-shadow:0 8px 28px rgba(67,22,40,.08)}
.modalbox{background:#fff;border:1px solid #efdce5;border-radius:18px;padding:20px;margin-bottom:20px;box-shadow:0 4px 18px rgba(67,22,40,.035)}
.table-wrap{width:100%;overflow-x:auto}.table{width:100%;border-collapse:collapse;background:#fff}.table th{font-weight:800;color:#4b303b;background:#fff8fb}.table th,.table td{padding:12px;border-bottom:1px solid #f0e2e8;text-align:left;vertical-align:middle}.table tr:hover td{background:#fffafd}
.input,select,textarea{width:100%;box-sizing:border-box;border:1px solid #e4ccd7;border-radius:11px;padding:10px 12px;background:#fff;color:#2c1b23;outline:none}.input:focus,select:focus,textarea:focus{border-color:#dd5a8b;box-shadow:0 0 0 3px rgba(221,90,139,.1)}textarea{min-height:110px;resize:vertical}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.form-grid .full{grid-column:1/-1}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:10px;padding:9px 14px;cursor:pointer;font-weight:700;line-height:1.2;white-space:nowrap}.btn-primary{background:#1976f3;color:#fff}.btn-pink{background:#d94c82;color:#fff}.btn-danger{background:#fff;color:#c6284f;border:1px solid #e66}.btn-soft{background:#fff0f5;color:#9b2757}.btn:hover{filter:brightness(.97);transform:translateY(-1px)}
.actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.tag{display:inline-block;background:#fff0f5;color:#a52859;border-radius:999px;padding:4px 9px;font-size:12px}.muted{color:#7b6b72}.flash{padding:12px 16px;background:#e9fff3;border:1px solid #b8e9ce;color:#167245;border-radius:10px;margin-bottom:14px}.error{padding:12px 16px;background:#fff0f0;border:1px solid #f1bcbc;color:#a22;border-radius:10px;margin-bottom:14px}.thumb{width:76px;height:56px;object-fit:cover;border-radius:10px;background:#f6edf1;border:1px solid #eadbe2}
@media(max-width:1200px){.sidebar{width:250px}.main{margin-left:250px;width:calc(100% - 250px)}.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.content{padding:28px 22px 50px}}
@media(max-width:900px){.sidebar{width:220px}.main{margin-left:220px;width:calc(100% - 220px)}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.topbar{padding:0 20px}}
@media(max-width:650px){.sidebar{position:relative;width:100%;height:auto;max-height:none;padding:14px}.brand{font-size:22px}.smallbrand{padding-bottom:10px}.nav{display:inline-flex!important;width:auto!important;margin:3px!important}.main{margin-left:0;width:100%}.topbar{height:auto;min-height:58px;padding:12px 16px}.content{padding:20px 14px 40px}.pagehead{flex-direction:column}.pagehead h1{font-size:28px}.cards{grid-template-columns:1fr}.toolbar{flex-direction:column;align-items:stretch}.table{min-width:760px}}

.slider-edit-preview{margin-top:12px;padding:10px;border:1px dashed #e4ccd7;border-radius:14px;background:#fffafd}.slider-edit-preview img{display:block;width:min(760px,100%);max-height:280px;object-fit:cover;border-radius:12px;border:1px solid #eadbe2;background:#f6edf1}.checkline{display:flex;align-items:center;gap:8px;margin-top:10px;color:#765d68;font-size:13px}.slider-thumb{width:180px;height:78px;object-fit:cover;border-radius:12px;border:1px solid #eadbe2;background:#f6edf1}.status-pill{border:0;border-radius:999px;padding:6px 12px;font:inherit;font-weight:800;cursor:pointer}.status-pill.on{background:#e8fff2;color:#167245}.status-pill.off{background:#f4eef1;color:#76636b}.empty-state{text-align:center;padding:45px 20px;color:#806a74}.empty-state i{font-size:48px;color:#d94c82}.empty-state h3{margin:8px 0 4px;color:#3a252e}@media(max-width:650px){.slider-thumb{width:130px;height:65px}}


/* ===== SONGHONG PINK x BLACK ADMIN THEME V18 ===== */
:root{--admin-pink:#ff2f86;--admin-pink2:#ff79b4;--admin-bg:#09090d;--admin-panel:#151119;--admin-line:rgba(255,64,145,.34)}
html,body{background:radial-gradient(ellipse at 90% 0%,rgba(255,35,125,.11),transparent 32%),#09090d!important;color:#f8f4f7!important}
.main,.content{background:transparent!important;color:#f8f4f7!important}
.sidebar{background:linear-gradient(180deg,#050508,#170b13 70%,#09090d)!important;border-right:1px solid #4a1730!important;color:#fff!important}
.brand,.brand b,.brand span{color:#fff!important}.brand b,.brand span{color:#ff5b9f!important}
.smallbrand,.muted,.topbar span{color:#c9b8c2!important}
.nav,.sidebar a,.side a{color:#f8edf3!important}
.nav i,.sidebar a i,.side a i{color:#ff5b9f!important}
.nav:hover,.sidebar a:hover,.side a:hover{background:#321824!important;color:#fff!important}
.nav.active,.sidebar a.active,.side a.active{background:linear-gradient(90deg,#ff2f86,#a80e50)!important;color:#fff!important;box-shadow:0 8px 22px rgba(255,47,134,.18)}
.topbar,.top{background:rgba(8,7,11,.96)!important;color:#fff!important;border-bottom:1px solid #ff2f86!important}
.pagehead h1,.pagehead h2,.content h1,.content h2,.content h3,.modal-title{color:#fff!important}
.pagehead p,.content p,.muted{color:#d1c4cd}
.cards .cardx,.cardx,.modalbox,.card,.table-wrap,.panel,.box,.login-card{background:linear-gradient(145deg,#19151d 0%,#0f0d13 72%,#26101d 100%)!important;color:#fff!important;border:1px solid rgba(255,64,145,.38)!important;border-radius:18px!important;box-shadow:0 12px 30px rgba(0,0,0,.22)!important}
.cardx:hover{border-color:#ff2f86!important;box-shadow:0 15px 34px rgba(255,47,134,.14)!important}
.table,.table-responsive{background:#111016!important;color:#fff!important}
.table{--bs-table-bg:#111016;--bs-table-color:#f8f4f7;--bs-table-border-color:#422035;--bs-table-striped-bg:#1b111a;--bs-table-striped-color:#fff;--bs-table-hover-bg:#291322;--bs-table-hover-color:#fff}
.table th,.table thead th{background:#2a101e!important;color:#ffb6d2!important;border-color:#5a2140!important}
.table td,.table th{border-color:#422035!important;color:#f8f4f7!important}
.table tr:hover td{background:#291322!important}
.input,input.form-control,select,textarea,.form-control,.form-select{background:#100e14!important;color:#fff!important;border:1px solid #63304a!important}
.input:focus,input.form-control:focus,select:focus,textarea:focus,.form-control:focus,.form-select:focus{border-color:#ff4b98!important;box-shadow:0 0 0 3px rgba(255,47,134,.17)!important}
input::placeholder,textarea::placeholder{color:#b9a8b2!important}
label,.form-label{color:#f5e8ef!important}
.btn-primary,.btn-pink,.btn-pink:hover{background:linear-gradient(120deg,#ff2f86,#bd1058)!important;color:#fff!important;border:1px solid #ff77b7!important}
.btn-soft{background:#24111d!important;color:#ffc1da!important;border:1px solid #ff4b98!important}
.btn-danger{background:#35101f!important;color:#ff9ebf!important;border:1px solid #c92c69!important}
.tag,.status-pill.on{background:#301020!important;color:#ffacd0!important}
.flash,.alert-success{background:#10251b!important;color:#b7f3ce!important;border-color:#236444!important}
.error,.alert-danger{background:#32101b!important;color:#ffb7c7!important;border-color:#a33155!important}
hr{border-color:#51243d!important;opacity:1}
a{color:#ff9dc4}
a:hover{color:#ffd1e3}
.thumb,.slider-thumb,.slider-edit-preview{border-color:#5a2140!important;background:#17121a!important}
.login-page{display:grid;place-items:center;min-height:100vh;background:radial-gradient(ellipse at 50% 0%,rgba(255,47,134,.22),transparent 48%),#09090d!important}
.login-card{width:min(460px,calc(100% - 28px));padding:30px!important}
.brand-icon{color:#ff4b98!important}
@media(max-width:650px){.sidebar{background:#08070b!important;border-bottom:1px solid #ff2f86!important}.content{padding:18px 12px 35px!important}.cards{grid-template-columns:1fr!important}.table{min-width:720px}.topbar{background:#09090d!important}}

