/* หน้าที่: จัดหน้าหลังบ้าน โปรไฟล์ ฟอร์ม และตารางเป็นพื้นที่ทำงานที่อ่านง่าย ไม่เคลื่อนขณะกรอกข้อมูล */
.friendly-body[data-ui-surface=workspace] { background: #f4f5fa; --ui-bar: 76px; --ui-accent: #6456ce; }
.friendly-body .workspace-appbar {
  background: #ffffffed; border-bottom: 1px solid #e2e5ef; height: var(--ui-bar);
  padding-inline: 28px; gap: 18px; box-shadow: 0 5px 24px #22304e05;
}
.friendly-body .workspace-home { color: #25314b; font-size: 15px; }
.friendly-body .workspace-home>span:first-child { background: linear-gradient(145deg,#9b8dee,#6a58c9 50%,#403186); border: 1px solid #b3a4f5; box-shadow: 0 3px 0 #3d2d75, 0 8px 18px #7e62ca35, inset 0 1px 2px #ffffff70; border-radius: 12px; }
.friendly-body .workspace-page-name { font-size: 14px; border-color: #e4e6ef; }
.friendly-body :where(.dashboard-app,.my-space,.system-module-layout,.operations) { background: transparent; }
.friendly-body :where(.dashboard-sidebar,.system-module-sidebar,.my-sidebar) {
  background: linear-gradient(155deg,#1d263f,#121b30 70%) !important; color: #e9edf8 !important;
  border-right: 1px solid #ffffff10; padding: 24px 17px; box-shadow: 6px 0 25px #17213c0a;
  scrollbar-width: thin; scrollbar-color: #596483 #1c2841;
}
.friendly-body :where(.system-module-sidebar,.my-sidebar) { top: var(--ui-bar); }
.friendly-body .system-navigation { display: flex; flex-direction: column; gap: 9px; color: #e3e8f4; }
.friendly-body .unified-hub-sidebar { background: linear-gradient(155deg,#1d263f,#121b30) !important; color: #e9edf8 !important; }
.friendly-body .system-tree { color: #e3e8f4; }
.friendly-body .system-tree summary:hover { background: #ffffff0b; }
.friendly-body .system-tree-group[open]>summary { background: #d9cff422; color: #d5c8ff; }
.friendly-body .system-tree-search input { background: #0e172b; color: #fff; border-color: #36415b; }
.friendly-body .system-navigation :where(a,summary) { min-height: 46px; border-radius: 12px; }
.friendly-body .system-navigation a { color: inherit; font-size: 14px; line-height: 1.7; }
.friendly-body .system-navigation :where(small,.system-nav-label) { color: #a6b3cd; }
.friendly-body .system-navigation :where(a,summary):hover { background: #ffffff09; }
.friendly-body .system-navigation .system-leaf[aria-current=page] {
  color: #fff !important; background: linear-gradient(110deg,#6956c3,#544796) !important;
  box-shadow: inset 3px 0 #b7a5ff, 0 4px 16px #080d2324; border: 1px solid #9a87e654;
}
.friendly-body .system-back { border-color: #ffffff12; color: #b4c4e4; }
.friendly-body :where(.system-nav-group,.system-nav-system) { border-color: #ffffff0d; }
.friendly-body .system-navigation :where(input[type=search]) { width: 100%; background: #0e172b; color: #fff; border: 1px solid #36415b; border-radius: 12px; }
.friendly-body .system-navigation input::placeholder { color: #a6b3cd; }
.friendly-body :where(.system-brand,.my-brand,.dash-brand strong) { color: #f8f9ff !important; }
.friendly-body :where(.my-sidebar-foot,.my-sidebar>.my-eyebrow) { color: #acb9d2 !important; }
.friendly-body .my-sidebar-foot button { background: #ffffff0b; color: #e5e9f5; border-color: #ffffff20; }
.friendly-body .sidebar-shop>button { background: #ffffff08; border: 1px solid #ffffff16; border-radius: 14px; }
.friendly-body .sidebar-shop small { line-height: 1.7; color: #a8b8d2; }
.friendly-body .sidebar-user { background: #ffffff08; border: 1px solid #ffffff10; border-radius: 14px; }
.friendly-body .dashboard-topbar { background: #ffffffd9 !important; box-shadow: none; border-bottom: 1px solid #e2e6ef; }
.friendly-body .dashboard-content,.friendly-body .my-main,.friendly-body .operations { padding: 28px clamp(22px,3vw,44px) 48px; }
.friendly-body .system-breadcrumbs { padding-bottom: 18px; color: #53647c; font-size: 14px; }
.friendly-body .module-header {
  background: radial-gradient(ellipse at 100% 0,#dce8ff80,transparent 55%),linear-gradient(118deg,#fff,#f5f7fd); border: 1px solid #d9e1ee; border-radius: 22px;
  border-top: 3px solid #6e67c7; padding: 21px 26px; box-shadow: var(--xp-shadow); margin-bottom: 24px;
}
.friendly-body .module-header :where(h1,h2) { font-size: clamp(23px,2.4vw,32px); color: #2d2947; }
.friendly-body .module-header p { color: #637088; max-width: 760px; }
.friendly-body :where(.panel,.module-item,.op-panel,.op-card,.my-card,.op-stats>*,.my-stats>*,.stat-grid>article) {
  background: #fff !important; border: 1px solid #e0e5ef !important; border-radius: var(--xp-radius);
  box-shadow: var(--xp-shadow) !important; color: #25334b;
}
.friendly-body .module-item:hover { transform: none; border-color: #c7bfe5 !important; }
.friendly-body :where(.module-item h3,.op-card h3,.my-card h2,.my-section-head h2) { line-height: 1.55; }
.friendly-body :where(.module-item p,.op-card p,.my-card p) { color: #637188; }
.friendly-body :where(.primary-dash-button,.op-button.primary,.my-button.primary,.op-primary,.my-primary,.login-button) {
  background: linear-gradient(135deg,#7964d6,#5945b0) !important; color: #fff; border: 1px solid #8976d5;
  border-radius: 13px; box-shadow: 0 3px 0 #453382, 0 7px 16px #6753b71c !important;
  min-height: 46px; padding: 11px 18px; line-height: 1.65;
}
.friendly-body :where(.primary-dash-button,.op-button.primary,.my-button.primary,.op-primary,.my-primary,.login-button):active { box-shadow: 0 1px 0 #453382 !important; }
.friendly-body :where(.module-toolbar,.op-toolbar,.my-filters) { border-radius: 16px; gap: 12px; align-items: end; }
.friendly-body :where(.module-actions button,.my-button,.op-button,.view-site,.logout-button) { border-radius: 12px; }
.friendly-body :where(.op-dialog,.my-dialog,.admin-modal-box,.booking-box,.auth-form) :where(input,select,textarea),
.friendly-body :where(.my-card,.op-panel,.module-toolbar,.op-toolbar) :where(input,select,textarea) {
  border: 1px solid #d7deea; border-radius: 11px; background: #fcfdff; color: #25324b;
}
.friendly-body :where(.my-card,.op-panel,.admin-modal-box) label { color: #34415a; }
.friendly-body :where(table) { border-collapse: separate; border-spacing: 0; }
.friendly-body :where(thead th) { background: #eef2f8; color: #3e506b; font-weight: 600; font-size: 14px; padding-block: 15px; }
.friendly-body :where(tbody td) { border-bottom-color: #e9edf4; }
.friendly-body :where(tbody tr):hover { background: #f7f5fe; }
.friendly-body .my-hero { background: linear-gradient(118deg,#2a244b,#6353a0); border: 1px solid #978ac245; border-radius: 24px; box-shadow: 0 5px 0 #ded8ed, 0 17px 35px #43366813; padding: 28px; }
.friendly-body .my-hero :where(h2,p) { color: #fff; }
.friendly-body .my-hero .my-avatar { background: linear-gradient(150deg,#e4dbff,#a58dcf); color: #483774; border: 3px solid #ffffff5c; box-shadow: 0 4px 0 #21173540; }
.friendly-body .my-top h1 { color: #292642; font-size: clamp(24px,2.8vw,35px); }
.friendly-body .my-card { padding: 26px; }
.friendly-body .my-section-head { margin-top: 28px; }
.friendly-body .my-footer { color: #68748b; }
.friendly-body .attendance-tag-picker { background: #fff; border: 1px solid #ddd7ec; box-shadow: 0 7px 24px #3229470d; border-radius: 17px; }
.friendly-body .attendance-tag-options button { min-height: 48px; }
.friendly-body :where(.attendance-table-scroll,.op-tables) { scrollbar-width: thin; scrollbar-color: #9d8dc0 #f2eff8; }
/* หน้าต่างเป็นชั้นลอย แต่หัวข้อและปุ่มปิดคงตำแหน่งเพื่อใช้จอสัมผัสได้สะดวก */
.friendly-body dialog:not(.workspace-menu-dialog) { border: 1px solid #e0dfec; border-radius: 24px; box-shadow: 0 30px 100px #15203b4d; }
.friendly-body dialog::backdrop { background: #11182d99; backdrop-filter: blur(7px); }
.friendly-body :where(.admin-modal-box,.booking-box) { border-radius: 24px; }
.friendly-body :where(.modal-close,.universal-dialog-close,[data-dialog-x],[data-my-close],[data-op-close]) { min-width: 44px; min-height: 44px; border-radius: 12px; }
.friendly-body .workspace-menu-dialog { background: #141e33; border-radius: 24px 0 0 24px; }
.friendly-body .workspace-menu-dialog>header { background: #fff; }
.friendly-body .workspace-menu-dialog :where(.dashboard-sidebar,.my-sidebar,.system-module-sidebar) { background: linear-gradient(155deg,#1d263f,#121b30) !important; color: #e9edf8 !important; }
.friendly-body .workspace-menu-dialog .system-navigation { color: #e9edf8; }
.friendly-body .workspace-menu-dialog .system-navigation :where(small,.system-nav-label) { color: #a7b6d1; }
.friendly-body .workspace-menu-dialog .sidebar-user { background: #ffffff08; color: #fff; }
.friendly-body .workspace-menu-dialog .sidebar-user strong { color: #fff; }
.friendly-body .workspace-menu-dialog .sidebar-shop>button { background: #ffffff08; color: #fff; border-color: #ffffff20; }
.friendly-body .workspace-menu-dialog .sidebar-shop>span { color: #a7b6d1; }
.friendly-body .workspace-menu-dialog .my-sidebar-foot { color: #a7b6d1; }
/* หน้าเข้าสู่ระบบแยกฉากตกแต่งจากฟอร์ม เพื่อไม่ให้การเคลื่อนไหวรบกวนรหัสผ่าน */
.friendly-body[data-ui-surface=auth] { background: #eff1f8; }
.friendly-body .auth-page { padding: 26px; min-height: calc(100svh - 100px); gap: 0; max-width: 1500px; margin: 0 auto; }
.friendly-body .auth-visual { background: radial-gradient(circle at 70% 20%,#6553a950,transparent 60%),linear-gradient(140deg,#1d233e,#111a30); border-radius: 30px 0 0 30px; overflow: hidden; }
.friendly-body .auth-message h1 { color: #fff; font-size: clamp(35px,3.7vw,57px); line-height: 1.45; text-shadow: 0 3px 0 #060b2540; }
.friendly-body .auth-message p { color: #b7c1d9; }
.friendly-body .auth-form-side { background: #fff; border-radius: 0 30px 30px 0; padding: 45px; }
.friendly-body .auth-form { width: 100%; max-width: 460px; border: 0; box-shadow: none; background: #fff; padding: 10px; transform: none !important; }
.friendly-body .auth-form h2 { font-size: clamp(24px,2.3vw,31px); color: #272c44; }
.friendly-body .auth-form .input-wrap { border-radius: 13px; background: #f6f7fc; border: 1px solid #dce0ec; }
.friendly-body .auth-form .input-wrap input { background: transparent; border: 0; }
.friendly-body .auth-options { gap: 12px; flex-wrap: wrap; }
.friendly-body .auth-note { background: #f3f0fc; border-color: #e5def5; color: #655487; border-radius: 12px; }
@media(min-width:1101px) {
  .friendly-body :where(.system-module-layout,.my-space) { grid-template-columns: 262px minmax(0,1fr); }
  .friendly-body .dashboard-sidebar { width: 262px; }
  .friendly-body .dashboard-main { margin-left: 262px; }
}
@media(max-width:1100px) {
  .friendly-body[data-ui-surface=workspace] { --ui-bar: 68px; }
  .friendly-body .workspace-appbar { gap: 10px; padding-inline: 18px; }
  .friendly-body .workspace-page-name { display: none; }
  .friendly-body .workspace-home { flex: 1; }
  .friendly-body .dashboard-content,.friendly-body .my-main,.friendly-body .operations { padding: 22px 20px 35px; }
  .friendly-body .auth-form-side { padding: 26px; }
  .friendly-body .auth-visual { padding: 36px; }
}
@media(max-width:760px) {
  .friendly-body[data-ui-surface=workspace] { --ui-bar: 66px; }
  .friendly-body .workspace-appbar { gap: 7px; padding-inline: 10px; }
  .friendly-body .workspace-home { font-size: 12px; gap: 7px; }
  .friendly-body .workspace-home>span:first-child { width: 31px; height: 34px; font-size: 21px; }
  .friendly-body .workspace-home small { font-size: 6px; letter-spacing: 1px; }
  .friendly-body .workspace-menu-button { font-size: 12px; padding: 8px; }
  .friendly-body .workspace-menu-button span { display: none; }
  .friendly-body .dashboard-content,.friendly-body .my-main,.friendly-body .operations { padding: 16px 13px 30px; }
  .friendly-body .module-header { padding: 21px 17px; border-radius: 19px; margin-bottom: 18px; }
  .friendly-body .module-header p { font-size: 14px; }
  .friendly-body .module-header>.primary-dash-button { font-size: 14px; width: 100%; min-height: 48px; }
  .friendly-body .my-card { padding: 19px 15px; }
  .friendly-body .my-hero { padding: 22px 17px; border-radius: 20px; }
  .friendly-body .auth-page { padding: 0 14px 22px; }
  .friendly-body .auth-visual { min-height: auto; padding: 26px 22px 56px; border-radius: 23px 23px 0 0; }
  .friendly-body .auth-brand { margin-top: 26px; }
  .friendly-body .auth-message { margin-top: 24px; }
  .friendly-body .auth-message h1 { font-size: 29px; }
  .friendly-body .auth-message p { font-size: 16px; }
  .friendly-body .auth-form-side { padding: 24px 18px; border-radius: 0 0 23px 23px; }
  .friendly-body .auth-form { margin-top: 0; padding: 0; }
  .friendly-body .auth-form-logo { display: none; }
  .friendly-body .auth-options { display: flex; font-size: 14px; }
}
/* หน้าที่: ชั้นทำงานแบบมีมิติ โดยใช้เส้นขอบและเงาคงที่ ไม่เอียงฟอร์มหรือตาราง */
.friendly-body[data-ui-surface=workspace] .workspace-appbar { border-bottom-color: #d5deec; box-shadow: 0 2px 0 #fff,0 7px 24px #1b2d5109; }
.friendly-body[data-ui-surface=workspace] :where(.my-card,.op-panel,.panel) { border-top-color: #fff !important; box-shadow: var(--xp-shadow) !important; }
.friendly-body[data-ui-surface=workspace] :where(.my-card,.op-panel,.panel):focus-within { border-color: #b3b6d8 !important; }
.friendly-body[data-ui-surface=workspace] :where(.module-header,.panel-head,.op-panel-head,.my-section-head) :where(h1,h2,h3) { text-wrap: balance; }
.friendly-body[data-ui-surface=workspace] :where(.module-header p,.my-card p,.op-muted,.my-space label,.my-details dt,.my-details dd,.my-pagination span,.my-filters label,.my-access-row strong,.my-notification p) { font-size: 14px; color: #52627a; }
.friendly-body[data-ui-surface=workspace] :where(.my-space table,.my-space th,.my-space td,.module-toolbar,.module-item p,.op-data) { font-size: 14px; }
.friendly-body[data-ui-surface=workspace] :where(.system-navigation summary,.system-tree-search input,.my-button,.my-primary,.op-primary,.op-actions button) { font-size: 14px; }
.friendly-body[data-ui-surface=workspace] :where(.my-chip,.my-status,.my-stat small,.my-access-row small,.my-notification small,.my-filters small) { font-size: 12px; }
.friendly-body .system-tree summary { gap: 10px; line-height: 1.65; }
.friendly-body .system-navigation .system-leaf[aria-current=page] { box-shadow: inset 3px 0 #c1caff,inset 0 1px 0 #ffffff26,0 4px 0 #0b14232b; }
.friendly-body .my-hero { background: radial-gradient(ellipse at 100% 0,#7594d830,transparent 60%),linear-gradient(118deg,#172b48,#494184); box-shadow: inset 0 1px 0 #aebfe559,0 5px 0 #d6ddea,0 18px 34px #26385515; }
.friendly-body .my-hero :where(.my-chip,.my-identity p) { color: #f1f3ff; }
.friendly-body .op-header { gap: 14px; flex-wrap: wrap; border-radius: 18px; box-shadow: inset 0 1px 0 #ffffff29,0 4px 0 #d6ddea; }
.friendly-body :where(.op-dialog,.my-dialog) form>footer { position: sticky; bottom: -1px; background: #fffffff5; backdrop-filter: blur(12px); border-top: 1px solid #dbe2ef; padding-block: 15px; z-index: 2; }
.friendly-body[data-ui-surface=workspace] :where(.ui-empty,.op-empty,.my-empty) { border: 1px dashed #c7d1e3; border-radius: 18px; background: linear-gradient(140deg,#fafcff,#f1f5fc); padding: 28px 20px; color: #52627a; }
.friendly-body .auth-form :where(label,.auth-options,.auth-note) { font-size: 14px; line-height: 1.8; }
.friendly-body .auth-form-side { box-shadow: inset 0 1px 0 #fff,0 16px 40px #26375508; }
@media(max-width:760px) {
  .friendly-body .workspace-menu-button { min-width: 44px; padding: 10px; }
  .friendly-body .workspace-home small { font-size: 8px; letter-spacing: .5px; }
  .friendly-body .module-header { padding: 18px 16px; }
  .friendly-body .my-details>div { grid-template-columns: minmax(88px,.7fr) minmax(0,1.3fr); }
  .friendly-body :where(.module-toolbar,.my-filters) :where(input,select) { max-width: 100%; }
  .friendly-body :where(.op-dialog,.my-dialog) form>footer { gap: 10px; flex-wrap: wrap; }
  .friendly-body :where(.op-dialog,.my-dialog) form>footer>button { flex: 1 1 120px; }
}
