@charset "UTF-8";
@import url("../font/bootstrap-icons.css");
@import url("../font/stylesheet.css");
:root {
  /* Layout */
  --sidebar-width: 240px;
  --radius: 8px;
  --radius-sm: 4px;
  /* Typography */
  --font-base: 14px;
  --font-lg: 18px;
  --font-xl: 24px;
  --font-body: "Noto Sans Thai", sans-serif;
  --font-icon: "bootstrap-icons";
  /* Colors - Brand */
  --color-primary: #1e293b;
  --color-primary-light: #334155;
  --color-neutral: #6b7280;
  --color-border: #d1d5db;
  --color-bg-light: #f3f4f6;
  /* Colors - Background */
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  /* Text */
  --color-text: #1f2937;
  --color-text-light: #ffffff;
  --color-text-muted: #6b7280;
  /* Border */
  --color-border: #e5e7eb;
  /* Status */
  --color-danger: #b91c1c;
  --color-danger-bg: #fee2e2;
  --color-danger-border: #fca5a5;
  --color-success: #15803d;
  --color-success-bg: #dcfce7;
  --color-success-border: #86efac;
  --color-warning: #f59e0b;
  --color-warning-hover: #d97706;
  --color-warning-bg: #fef3c7;
  --color-warning-border: #fde68a;
  --color-warning-text: #92400e;
}

html,
body {
  font-family: var(--font-body);
}
html *,
body * {
  font-weight: 400;
}

/* =========================
   Simple CSS Reset
========================= */
/* Box sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margin */
* {
  margin: 0;
}

/* Base body */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Media elements */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Form elements inherit font */
input, button, textarea, select {
  font: inherit;
}

/* Remove button/input default styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove list styles */
ul, ol {
  list-style: none;
  padding: 0;
}

/* Remove link underline */
a {
  text-decoration: none;
  color: inherit;
}

/* Table fix */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

.frss, .input-group {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
}

.frsc, .category-tree .item .action-item {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.color-primary {
  color: var(--color-primary);
}

.color-success {
  color: var(--color-success);
}

.color-warning {
  color: var(--color-warning);
}

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

.lds-grid {
  display: inline-block;
  position: absolute;
  width: 80px;
  height: 80px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.lds-grid div {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFF;
  animation: lds-grid 1.2s linear infinite;
}
.lds-grid div:nth-child(1) {
  top: 8px;
  left: 8px;
  animation-delay: 0s;
}
.lds-grid div:nth-child(2) {
  top: 8px;
  left: 32px;
  animation-delay: -0.4s;
}
.lds-grid div:nth-child(3) {
  top: 8px;
  left: 56px;
  animation-delay: -0.8s;
}
.lds-grid div:nth-child(4) {
  top: 32px;
  left: 8px;
  animation-delay: -0.4s;
}
.lds-grid div:nth-child(5) {
  top: 32px;
  left: 32px;
  animation-delay: -0.8s;
}
.lds-grid div:nth-child(6) {
  top: 32px;
  left: 56px;
  animation-delay: -1.2s;
}
.lds-grid div:nth-child(7) {
  top: 56px;
  left: 8px;
  animation-delay: -0.8s;
}
.lds-grid div:nth-child(8) {
  top: 56px;
  left: 32px;
  animation-delay: -1.2s;
}
.lds-grid div:nth-child(9) {
  top: 56px;
  left: 56px;
  animation-delay: -1.6s;
}

.no-event {
  pointer-events: none;
  background-color: var(--color-bg);
}

.hamburger-menu {
  position: relative;
  width: 34px;
  height: 34px;
  background-color: var(--color-primary);
  border: 0;
}
.hamburger-menu .line {
  position: absolute;
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background-color: #fff;
  left: 7px;
  top: 9px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger-menu .line:nth-child(1) {
  left: 7px;
  top: 9px;
}
.hamburger-menu .line:nth-child(2) {
  width: 16px;
  left: 9px;
  top: 16px;
}
.hamburger-menu .line:nth-child(3) {
  left: 7px;
  top: 23px;
}
.hamburger-menu.active .line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-menu.active .line:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@keyframes lds-grid {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
/* =========================
BASE
========================= */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-base);
}
body.dragging-invalid * {
  cursor: not-allowed !important;
}
body.moving {
  cursor: progress;
}

/* =========================
LAYOUT
========================= */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary);
  color: #fff;
  padding: 20px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
}
.sidebar .inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}
.sidebar .logo {
  font-size: var(--font-lg);
  margin-bottom: 30px;
}
.sidebar .logo a {
  font-weight: bold;
}
.sidebar ul {
  list-style: none;
  padding-left: 0;
}
.sidebar li {
  margin-bottom: 10px;
  margin-left: 15px;
}
.sidebar nav {
  margin-left: -15px;
}
.sidebar nav a {
  text-decoration: none;
  display: block;
  padding: 10px;
  border-radius: var(--radius);
  color: #cbd5e1;
  transition: 0.2s;
}
.sidebar nav a:hover, .sidebar nav .active a {
  background: var(--color-primary-light);
  color: #fff;
}
.sidebar #btn_mobile {
  display: none;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: calc(100vh - var(--sidebar-width));
}

/* Topbar */
.topbar {
  height: 60px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  gap: 8px;
}
.topbar .title {
  font-weight: 600;
}
.topbar .user {
  font-size: 13px;
  color: var(--color-text-muted);
  border-left: solid 1px var(--color-border);
  padding-left: 8px;
}
.topbar button {
  font-size: 1rem;
  color: var(--color-text-muted);
}
.topbar button:hover {
  color: var(--color-text);
}

/* Content */
.content {
  height: calc(100vh - 60px);
  padding: 20px;
}
.content h1 {
  font-size: 1.8rem;
}

.content-full {
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* =========================
CARD
========================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: var(--color-surface);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}
.card.fix {
  width: auto;
}

.card h3 {
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--color-text-muted);
}

.big {
  font-size: var(--font-xl);
  font-weight: bold;
}

/* =========================
TABLE
========================= */
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
th.center, td.center {
  text-align: center;
}
th.right, td.right {
  text-align: right;
}
th img, td img {
  max-height: 75px;
  width: auto;
  border-radius: 6px;
}

th {
  background: #f8fafc;
  font-weight: 600;
}

tr.is_system {
  color: var(--color-text-muted);
}

table.tbl-permission {
  width: 600px;
  min-width: unset !important;
  max-width: calc(100% - 30px) !important;
}
table.tbl-permission .feature_group .name {
  font-weight: bold;
}
table.tbl-permission .feature_group.lv2 .name {
  padding-left: 1.75em;
}
table.tbl-permission .feature .name {
  padding-left: 3em;
}
table.tbl-permission .control {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}

/* =========================
BADGE
========================= */
.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.badge.success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge.danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

/* =========================
ALERT
========================= */
.alert-danger {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  color: var(--color-danger);
  margin-bottom: 15px;
}

/* =========================
BUTTON
========================= */
.btn-success {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--color-success);
  color: #fff;
  font-weight: 600;
  border: solid 1px var(--color-success);
  cursor: pointer;
  transition: 0.2s;
}
.btn-success:hover {
  background: var(--color-success-bg) !important;
  color: var(--color-success) !important;
}

.btn-danger {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--color-danger);
  color: #fff;
  font-weight: 600;
  border: solid 1px var(--color-danger);
  cursor: pointer;
  transition: 0.2s;
}
.btn-danger:hover {
  background: var(--color-danger-bg) !important;
  color: var(--color-danger) !important;
}

.btn-primary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}
.btn-primary:hover {
  background: var(--color-primary-light) !important;
}

.btn-outline-secondary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-neutral);
  font-weight: 600;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: 0.2s;
}
.btn-outline-secondary:hover {
  background: var(--color-bg-light);
  color: var(--color-neutral);
}

/* =========================
FORM
========================= */
.form-group {
  margin-bottom: 18px;
}
.form-group.required label::after {
  content: "*";
  color: var(--color-danger);
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.form-group input {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  font-size: 14px;
}
.form-group input:focus {
  outline: none;
  border-color: var(--color-primary-light);
}

.input-group {
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}

.chart-container-wrapper {
  position: relative;
  height: 80vh;
  max-height: 500px;
  width: 100%;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.chart-filters select {
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin-left: 8px;
}

.summary-box {
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-primary);
}

.chart-filters select {
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin-left: 8px;
}

/* =========================
	LOGIN PAGE
========================= */
.login-body {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-body .btn-primary {
  width: 100%;
}

.login-card {
  width: 100%;
  max-width: 450px;
  background: var(--color-surface);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.login-logo {
  text-align: center;
  font-size: var(--font-lg);
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 25px;
}

.login-error {
  text-align: center;
  font-size: 14px;
  color: var(--color-danger);
  margin-bottom: 8px;
}

.login-footer {
  text-align: center;
  font-size: 12px;
  margin-top: 20px;
  color: #888;
}

/* =========================
	SITE SELECTOR PAGE
========================= */
.site-wrapper {
  max-width: 1100px;
  margin: 60px auto;
  padding: 20px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.site-header h1 {
  font-size: 22px;
}

.user-info {
  font-size: 13px;
  color: var(--color-text-muted);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.site-card {
  display: block;
  padding: 25px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: 0.2s;
  text-decoration: none;
}

.site-card:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-3px);
}

.site-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.site-meta {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* =========================
	TABLE PAGE
========================= */
.table-container {
  width: 100%;
}
.table-container table {
  min-width: 100%;
}

table.datatable {
  min-width: 100%;
}
table.datatable thead {
  position: sticky;
  top: -20px;
}

.datatable-image {
  width: 75px;
  height: 75px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 4px;
  border: solid 1px var(--color-primary);
}

.datatable-image-wrapper {
  min-width: 100px;
}
.datatable-image-wrapper > div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
}

.form-search {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 8px;
}

.table-header {
  width: 100%;
  margin-bottom: 15px;
  display: flex;
  flex-direction: row;
  justify-self: flex-start;
  align-items: baseline;
}

.table-header input {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  width: 250px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  margin-right: 4px;
}

.btn-edit {
  background: var(--color-primary);
  color: #fff;
}

.btn-edit:hover {
  background: var(--color-primary-light);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  opacity: 0.9;
}

.table-pagination {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  margin-top: 15px;
}
.table-pagination .table-summary {
  display: none;
}
.table-pagination .table-summary.active {
  display: block;
}

.table-ppp {
  display: none;
  margin-left: auto;
  flex-direction: row;
  align-items: baseline;
}
.table-ppp.active {
  display: flex;
}

.pagination-ppp {
  width: 80px;
  margin: 0 8px;
}

/* Pagination */
.pagination {
  gap: 6px;
  margin-left: 16px;
}

.page-btn {
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
}

.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Alert Modal */
.alert-wrapper.active {
  z-index: 1000 !important;
}

#alert {
  position: fixed;
  left: 0;
  width: 100vw;
  top: 0;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 31;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#alert.active {
  pointer-events: painted;
  opacity: 1;
}
#alert .close_btn {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
#alert .alert-content {
  position: fixed;
  width: 30em;
  background-color: #fff;
  left: 50%;
  top: 45%;
  border-radius: 20px;
  box-shadow: 0 2px 8px 0 rgba(90, 97, 112, 0.2);
  transform: translate(-50%, -50%);
  border-radius: 10px;
  padding: 2em;
  text-align: center;
}
#alert #alert_topic {
  font-size: 1.75em;
  font-weight: 600;
  color: var(--color-warning);
  padding: 1rem 40px;
}
#alert #alert_content {
  font-size: 1.5em;
  margin-bottom: 1.4em;
  word-wrap: break-word;
}
#alert #alert_status {
  color: var(--color-warning);
  text-align: center;
}
#alert #alert_status > svg,
#alert #alert_status > i {
  font-size: 2.66em;
  display: none;
}
#alert #alert_status > svg::before,
#alert #alert_status > i::before {
  vertical-align: baseline;
}
#alert #alert_status.success {
  color: var(--color-success);
}
#alert #alert_status.success > svg.bi.check-circle-fill,
#alert #alert_status.success > i.bi.check-circle-fill {
  display: inline-block;
}
#alert #alert_status.success + #alert_topic {
  color: var(--color-success);
}
#alert #alert_status.warning {
  color: var(--color-warning);
}
#alert #alert_status.warning > svg.bi.exclamation-triangle-fill,
#alert #alert_status.warning > i.bi.exclamation-triangle-fill {
  display: inline-block;
}
#alert #alert_status.warning + #alert_topic {
  color: var(--color-warning);
}
#alert #alert_status.danger {
  color: var(--color-danger);
}
#alert #alert_status.danger > svg.bi.exclamation-octagon-fill,
#alert #alert_status.danger > i.bi.exclamation-octagon-fill {
  display: inline-block;
}
#alert #alert_status.danger + #alert_topic {
  color: var(--color-danger);
}

#confirm {
  position: fixed;
  left: 0;
  width: 100vw;
  top: 0;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#confirm .close_btn {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
#confirm #confirm_status {
  display: none;
}
#confirm.active {
  pointer-events: painted;
  opacity: 1;
}
#confirm .alert-content {
  position: fixed;
  width: 33.75em;
  min-height: 12.0625em;
  background-color: #fff;
  left: 50%;
  top: 45%;
  box-shadow: 0 2px 8px 0 rgba(90, 97, 112, 0.2);
  transform: translate(-50%, -50%);
  border-radius: 10px;
  text-align: left;
  overflow: hidden;
}
#confirm #confirm_topic {
  color: var(--color-text);
  font-size: 1.25rem;
  border-bottom: solid 1px #ccc;
  padding: 1rem 30px;
}
#confirm #confirm_topic > span {
  font-weight: 600;
}
#confirm #confirm_topic .close_btn {
  cursor: pointer;
}
#confirm #confirm_topic .close_btn > svg,
#confirm #confirm_topic .close_btn > i {
  color: var(--color-text);
  font-size: 1.8em;
  transition: color 0.3s ease;
}
#confirm #confirm_topic .close_btn:hover > svg,
#confirm #confirm_topic .close_btn:hover > i {
  color: var(--color-text);
}
#confirm #confirm_content {
  padding: 32px 40px;
  font-weight: 400;
  font-size: 1.5rem;
  min-height: 6.1785em;
  color: var(--color-text);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
#confirm .confirm_footer {
  padding: 0.625em 1em 1.8em;
  background-color: #fff;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}
#confirm .confirm_footer > a + a {
  margin-left: 0.8571em;
}

#process {
  position: fixed;
  left: 0;
  width: 100vw;
  top: 0;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 32;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#process.active {
  pointer-events: painted;
  opacity: 1;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-box {
  background: white;
  width: 600px;
  padding: 20px;
  margin: 100px auto;
}

.data-manage {
  height: calc(100vh - 60px);
  overflow-y: auto;
  margin: -20px;
  padding: 20px;
}
.data-manage-top {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
.data-manage-title {
  font-size: 22px;
  margin-bottom: 20px;
}
.data-manage .layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}
.data-manage .product-layout {
  grid-template-columns: 2fr 3fr 300px;
}
.data-manage .card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}
.data-manage hr {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--color-border);
}
.data-manage .frsc, .data-manage .category-tree .item .action-item, .category-tree .item .data-manage .action-item {
  gap: 6px;
}
.data-manage .grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.data-manage .form-group {
  margin-bottom: 10px;
}
.data-manage .form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--color-text-secondary);
}
.data-manage .form-group input,
.data-manage .form-group select,
.data-manage .form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.data-manage .form-group input:focus,
.data-manage .form-group select:focus,
.data-manage .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.data-manage .form-group select {
  padding: 6.5px 8px;
}
.data-manage .form-group textarea {
  min-height: 39px;
  max-height: 200px;
  line-height: 1.5;
}
.data-manage .form-group input[type=checkbox] {
  width: auto;
}
.data-manage .dynamic-block {
  margin-top: 10px;
}
.data-manage .dynamic-block .block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.data-manage .dynamic-block .block-header h3 {
  font-size: 14px;
}
.data-manage .dynamic-block .block-header button {
  font-size: 12px;
  cursor: pointer;
}
.data-manage .dynamic-block .item {
  border: 1px dashed var(--color-border);
  padding: 10px;
  margin-bottom: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.data-manage .dynamic-block .item > div {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: flex-start;
  min-width: 192px;
}
.data-manage .dynamic-block .item button {
  display: inline-block;
  position: absolute;
  right: 2px;
  top: 2px;
  background-color: var(--color-danger);
  color: var(--color-text-light);
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 16px;
  font-weight: bold;
  border-radius: 50%;
}
.data-manage .dynamic-block .item button::before {
  content: "✕";
  font-size: 11px;
}
.data-manage .form-action {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.data-manage .publish-date {
  display: none;
}
.data-manage #galleryPreview {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
}
.data-manage #galleryPreview .thumb {
  display: block;
  position: relative;
  border: solid 2px var(--color-border);
  border-radius: var(--radius);
  width: 80px;
  height: 80px;
  padding: 4px;
  cursor: grab;
  background: #fff;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  will-change: transform;
}
.data-manage #galleryPreview .thumb.dragging {
  opacity: 0.5;
  transform: scale(0.9);
  cursor: grabbing;
}
.data-manage #galleryPreview .thumb.drag-over {
  border-color: #007bff;
  background: #eaf3ff;
}
.data-manage #galleryPreview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.data-manage #galleryPreview button {
  display: inline-block;
  position: absolute;
  right: 2px;
  top: 2px;
  background-color: var(--color-danger);
  color: var(--color-text-light);
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 16px;
  font-weight: bold;
  border-radius: 50%;
}
.data-manage #galleryPreview button::before {
  content: "✕";
  font-size: 11px;
}
.data-manage .checkbox-group {
  margin-top: 10px;
  overflow-y: auto;
  max-height: 200px;
  border: solid 1px var(--color-border);
  border-radius: var(--radius);
  padding: 8px !important;
}
.data-manage .checkbox-group label {
  padding-left: 16px;
}
.data-manage .checkbox-group label input[type=checkbox] {
  margin-left: -16px;
}

.btn-browse {
  position: relative;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  display: inline-block !important;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.btn-browse:hover {
  background: var(--color-primary-light);
}
.btn-browse input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.btn-browse::before {
  content: "Choose File";
  color: #fff;
}

.browse-image {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
}
.browse-image img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border: solid 1px var(--color-border);
  border-radius: var(--radius);
  padding: 4px;
  background-color: var(--color-bg);
}
.browse-image label {
  width: 86px;
  max-width: calc(100% - 100px - 6px);
}
.browse-image .preview-box {
  position: relative;
  margin-right: 6px;
}
.browse-image .preview-box button {
  display: inline-block;
  position: absolute;
  right: 2px;
  top: 2px;
  background-color: var(--color-danger);
  color: var(--color-text-light);
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 16px;
  font-weight: bold;
  border-radius: 50%;
}
.browse-image .preview-box button::before {
  content: "✕";
  font-size: 11px;
}

.amsify-suggestags-input-area.amsify-suggestags-input-area-default {
  border: solid 1px var(--color-border);
  border-radius: var(--radius);
  padding: 8px !important;
}

.category-group {
  margin-bottom: 0.7rem;
}
.category-group h3 {
  color: var(--color-text);
  font-weight: 600;
}
.category-group label {
  margin-left: 8px;
}

.category-tree {
  list-style: none;
  margin: 0;
  padding-left: 16px;
  /* sortable states */
}
.category-tree .toggle-child {
  cursor: pointer;
  pointer-events: none;
  opacity: 0.4;
}
.category-tree .toggle-child::before {
  content: "\f63b";
  font-family: "bootstrap-icons";
}
.category-tree .toggle-action {
  cursor: pointer;
  border: 0;
  background: transparent;
  font-size: 18px;
  pointer-events: none;
  opacity: 0;
}
.category-tree .toggle-action::before {
  content: "\f341";
  font-family: "bootstrap-icons";
}
.category-tree .cover {
  position: relative;
  display: inline-block;
  position: relative;
}
.category-tree .cover img {
  height: 36px;
  width: 36px;
  object-fit: contain;
  position: relative;
  border-radius: 8px;
  border: solid 1px var(--color-border);
  pointer-events: none;
}
.category-tree ul {
  list-style: none;
  margin: 0 0 0 8px;
  padding-left: 16px;
  border-left: 1px dashed var(--color-border);
}
.category-tree li {
  margin: 4px 0;
  position: relative;
}
.category-tree li::before {
  content: "";
  position: absolute;
  top: 27px;
  left: -16px;
  width: 16px;
  height: 1px;
  background: var(--color-border);
}
.category-tree li.drag-over > .item {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.category-tree li.have_child > .item .toggle-child {
  opacity: 1;
  pointer-events: painted;
}
.category-tree .item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: grab;
  transition: background 0.15s ease;
}
.category-tree .item.have_action > .item-detail .toggle-action {
  opacity: 1;
  pointer-events: painted;
}
.category-tree .item.action-collapse > .item-detail .toggle-action::before {
  content: "\f340";
}
.category-tree .item.action-collapse > .action-list {
  display: none;
}
.category-tree .item.child-collapse > .item-detail .toggle-child::before {
  content: "\f64d";
}
.category-tree .item.child-collapse + ul {
  display: none;
}
.category-tree .item .action-list {
  padding-left: 4em;
  display: flex;
  flex-direction: column;
}
.category-tree .item .action-item {
  gap: 8px;
  padding: 2px 4px;
  border-radius: 4px;
}
.category-tree .item .action-item::before {
  content: "-";
}
.category-tree .item .action-item:hover {
  background: #fff;
}
.category-tree .item .action-item:hover .action-item-control {
  opacity: 1;
  pointer-events: painted;
}
.category-tree .item .action-item-control {
  margin-left: auto;
  display: flex;
  opacity: 0;
  pointer-events: none;
}
.category-tree .item .action-item-control button {
  font-size: 12px;
}
.category-tree .item .action-item-control button:hover {
  text-decoration: underline;
}
.category-tree .item .feature-status {
  font-size: 10px;
  padding: 2px 4px;
  background-color: var(--color-warning);
  color: #fff;
  border-radius: 4px;
}
.category-tree .item:hover {
  background: #eee;
  border-color: #d1d5db;
}
.category-tree .item:active {
  cursor: grabbing;
  background: var(--color-bg-light);
}
.category-tree .item .item-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.category-tree .item .item-detail > div {
  white-space: nowrap;
}
.category-tree .item .item-detail.have_action {
  margin-bottom: 4px;
  border-bottom: dotted 1px var(--color-border);
  padding-bottom: 4px;
}
.category-tree .drag-handle {
  cursor: grab;
  font-size: 14px;
  color: #9ca3af;
}
.category-tree .drag-handle:hover {
  color: #6b7280;
}
.category-tree .sortable-ghost {
  opacity: 0.4;
}
.category-tree .sortable-drag {
  opacity: 0.9;
}
.category-tree .sortable-chosen {
  background: var(--color-bg-light);
  border-color: var(--color-primary);
}

#qr_preview {
  border: solid 1px var(--color-border);
  margin-top: 8px;
  width: 200px;
  height: 200px;
  aspect-ratio: 1;
}

/* ===== Left: Folder Tree ===== */
#folderTree {
  width: 260px;
  border-right: 1px solid #ddd;
  padding: 10px;
  overflow-y: auto;
  background: #fafafa;
}
#folderTree li {
  position: relative;
  padding-left: 14px;
  margin: 2px 0;
}
#folderTree li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 6px;
  width: 10px;
  height: 1px;
  background: #ddd;
}
#folderTree li:last-child::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  bottom: 0;
  width: 1px;
  background: #fff;
  /* กลบเส้น */
}
#folderTree ul {
  list-style: none;
  margin: 0;
  position: relative;
}
#folderTree ul::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: #ddd;
}
#folderTree ul ul {
  display: none;
}
#folderTree > ul::before {
  display: none;
}
#folderTree > ul > li::before {
  display: none;
}

/* folder node */
.folder {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.folder:hover {
  background: #e6f0ff;
}
.folder.active {
  background: #cce0ff;
  font-weight: bold;
}
.folder::before {
  content: "\f285";
  font-family: var(--font-icon);
  display: inline-block;
  margin-right: 4px;
  font-size: 14px;
  transition: transform 0.15s;
}
.folder.open::before {
  transform: rotate(90deg);
}

#mediaList {
  flex: 1;
  overflow-y: auto;
  /* ===== Media List (Table Style) ===== */
  /* icon + name */
}
#mediaList .media-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
#mediaList .media-list th {
  text-align: left;
  padding: 8px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}
#mediaList .media-list td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}
#mediaList .media-list tr {
  transition: background 0.15s;
}
#mediaList .media-list tr:hover {
  background: #f0f6ff;
}
#mediaList .media-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
}
#mediaList .media-name-cell:active {
  cursor: grabbing;
}
#mediaList .media-icon {
  font-size: 18px;
}
#mediaList .media-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
  border: solid 1px var(--color-border);
  background-color: #fff;
}

#breadcrumb {
  font-size: 13px;
}
#breadcrumb .crumb {
  cursor: pointer;
  color: #007bff;
}
#breadcrumb .crumb:hover {
  text-decoration: underline;
}
#breadcrumb .crumb.active {
  color: #333;
  font-weight: bold;
  cursor: default;
}

.media-list-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
  width: 100%;
  gap: 8px;
}

.btn-media {
  display: inline-block;
  position: relative;
  cursor: pointer;
  width: 26px;
  height: 26px;
  text-align: center;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #ddd;
  padding: 0;
  margin: 0;
}
.btn-media:hover {
  background: #f0f6ff;
  border-color: #bcd;
}
.btn-media i {
  font-size: 20px;
  line-height: 26px;
  font-weight: bold;
}
.btn-media input {
  position: absolute;
  opacity: 0;
  right: 0;
  top: 0;
  pointer-events: none;
}

.my-popup {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.7);
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  z-index: 10;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.my-popup.active {
  display: flex;
}
.my-popup h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 2rem;
}
.my-popup .content {
  background-color: var(--color-bg);
  width: 600px;
  height: 400px;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 30px);
  border-radius: 8px;
  padding-bottom: 4rem;
  position: relative;
}
.my-popup .control {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4rem;
  border-top: solid 1px var(--color-border);
  text-align: center;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-action-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-action {
  width: 26px;
  height: 26px;
  padding: 1px;
  border-radius: 6px;
  border: solid 1px var(--color-border);
  transition: all 0.2s ease;
}
.btn-action:hover {
  background-color: #fff;
}
.btn-action i {
  pointer-events: none;
}
.btn-action-text {
  width: auto;
  padding: 1px 4px;
  font-weight: 400;
  display: flex;
  gap: 2px;
  font-size: 12px;
}

.chk-group {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  font-size: 14px !important;
  color: var(--color-text) !important;
}
.chk-group input {
  width: auto !important;
  margin-right: 0.5rem;
}

.drag-over {
  background: #e3f2fd;
  outline: 1px dashed #2196f3;
}

.drag-invalid {
  background: #ffebee !important;
  outline: 1px dashed #e53935;
  cursor: not-allowed;
}

.my-modal {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.7);
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  z-index: 10;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.my-modal.active {
  display: flex;
}
.my-modal .content {
  background-color: var(--color-bg);
  width: 748px;
  height: 600px;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 30px);
  padding: 0;
  border-radius: 8px;
  position: relative;
}
.my-modal .top {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-bottom: solid 1px var(--color-border);
}
.my-modal .top h4 {
  margin-bottom: 0;
}
.my-modal .body {
  padding: 16px;
  padding-bottom: 72px;
}
.my-modal .control {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  border-top: solid 1px var(--color-border);
  position: absolute;
  height: 72px;
  bottom: 0;
  left: 0;
  width: 100%;
}

.my-media-tool {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.7);
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  z-index: 10;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.my-media-tool.active {
  display: flex;
}
.my-media-tool .top {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding-right: 15px;
  gap: 8px;
}
.my-media-tool .content {
  background-color: var(--color-bg);
  width: 765px;
  height: 600px;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 30px);
  padding: 0;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: stretch;
}
.my-media-tool .folder-list {
  width: 200px;
  height: 100%;
  overflow: auto;
  border-right: solid 1px #ccc;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  padding: 15px;
  padding-left: 0;
  background: #fafafa;
}
.my-media-tool .folder-list li {
  position: relative;
  padding-left: 14px;
  margin: 2px 0;
}
.my-media-tool .folder-list li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 6px;
  width: 10px;
  height: 1px;
  background: #ddd;
}
.my-media-tool .folder-list li:last-child::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 13px;
  bottom: 0;
  width: 1px;
  background: #fff;
  /* กลบเส้น */
}
.my-media-tool .folder-list ul {
  list-style: none;
  margin: 0;
  position: relative;
}
.my-media-tool .folder-list ul::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: #ddd;
}
.my-media-tool .folder-list ul ul {
  display: none;
}
.my-media-tool .folder-list > ul::before {
  display: none;
}
.my-media-tool .folder-list > ul > li::before {
  display: none;
}
.my-media-tool .media-list {
  width: calc(100% - 200px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}
.my-media-tool .media-list nav {
  height: 51px;
  padding: 15px;
  font-size: 13px;
}
.my-media-tool .media-list nav .crumb {
  cursor: pointer;
  color: #007bff;
}
.my-media-tool .media-list nav .crumb:hover {
  text-decoration: underline;
}
.my-media-tool .media-list nav .crumb.active {
  color: #333;
  font-weight: bold;
  cursor: default;
}
.my-media-tool .media-list .box {
  list-style: none;
  width: 100%;
  height: calc(100% - 51px - 56px - 32px);
  overflow-y: auto;
  padding: 0 8px;
  margin: 0;
}
.my-media-tool .media-list .item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 6px;
  float: left;
  margin: 0 2px 24px;
  overflow: hidden;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
}
.my-media-tool .media-list .item:hover {
  background: #e6f0ff;
}
.my-media-tool .media-list .item.active {
  background: #cce0ff;
}
.my-media-tool .media-list .item.active .name {
  font-weight: bold;
}
.my-media-tool .media-list .icon {
  width: 64px;
  height: 64px;
  font-size: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: solid 1px var(--color-border);
  background-color: #fff;
}
.my-media-tool .media-list .icon img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.my-media-tool .media-list .name {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 64px;
  text-align: center;
}
.my-media-tool .load-more {
  width: 100%;
  text-align: center;
  font-weight: bold;
  margin-top: auto;
  height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.my-media-tool .load-more.active {
  opacity: 1;
  pointer-events: painted;
}
.my-media-tool .control {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: solid 1px var(--color-border);
}
.my-media-tool .btn-submit {
  opacity: 0.2;
  pointer-events: none;
}
.my-media-tool .btn-submit.active {
  opacity: 1;
  pointer-events: painted;
}

.my-media-control {
  width: 108px;
  min-width: unset !important;
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  position: relative;
}
.my-media-control:hover {
  background: #e6f0ff;
}
.my-media-control .icon {
  width: 100px;
  height: 100px;
  font-size: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: solid 1px var(--color-border);
  background-color: #fff;
}
.my-media-control .icon img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.my-media-control .name {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100px;
  text-align: center;
}
.my-media-control .btn-delete {
  display: inline-block;
  position: absolute;
  right: 2px;
  top: 2px;
  background-color: var(--color-danger);
  color: var(--color-text-light);
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 16px;
  font-weight: bold;
  border-radius: 50%;
}
.my-media-control .btn-delete::before {
  content: "✕";
  font-size: 11px;
}

.my-lang-control .my-lang-top {
  width: 100%;
  position: relative;
}
.my-lang-control .my-lang-tab {
  position: absolute;
  right: 10px;
  bottom: -5px;
}
.my-lang-control .my-lang-tab_item {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border: solid 1px var(--color-border);
  font-size: 12px;
  padding: 2px 8px;
  cursor: pointer;
}
.my-lang-control .my-lang-tab_item.active {
  font-weight: bold;
  background-color: #fff;
  border-bottom-color: #fff;
}
.my-lang-control .my-lang-data_all {
  display: none;
}

.btn-toggle-all-expand, .btn-toggle-all-action {
  border: 0;
  background: transparent;
}
.btn-toggle-all-expand::before, .btn-toggle-all-action::before {
  font-family: var(--font-icon);
}

.btn-toggle-all-expand::before {
  content: "\f64d";
}
.btn-toggle-all-expand.active::before {
  content: "\f63b";
}

.btn-toggle-all-action::before {
  content: "\f340";
}
.btn-toggle-all-action.active::before {
  content: "\f341";
}

@media (max-width: 1200px) {
  .page-product .product-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .title {
    margin-left: 24px;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar .inner {
    height: 100vh;
    overflow-y: auto;
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .sidebar #btn_mobile {
    display: inline-block;
    position: absolute;
    right: 1px;
    top: 0;
    transform: translateX(100%);
  }

  .pagination {
    width: 100%;
    margin-left: 0;
  }
}

/*# sourceMappingURL=style.css.map */
