:root{
  --background:#FAFAF9;
  --foreground:#1C1917;
  --card:oklch(1 0 0);
  --primary:#1C1917;
  --primary-btn:#1C1917;
  --primary-foreground:#FAFAF9;
  --secondary:#F5F5F4;
  --secondary-foreground:#292524;
  --muted:#F5F5F4;
  --muted-foreground:#78716C;
  --accent:#F5F5F4;
  --destructive:oklch(0.577 0.245 27.325);
  --success:oklch(0.52 0.14 152);
  --warning:oklch(0.84 0.16 84);
  --warning-foreground:oklch(0.28 0.07 46);
  --info:#57534E;
  --border:#E7E5E4;
  --input:#E7E5E4;
  --ring:#1C1917;
  --tag-bg:#F5F5F4;
  --tag-fg:#44403C;
  --tag-border:#E7E5E4;
  --tint-bg:#FAFAF9;
  --tint-border:#E7E5E4;
  --shadow-sm:0 1px 3px rgb(0 0 0/.1),0 1px 2px -1px rgb(0 0 0/.1);
  --shadow-xs:0 1px 2px rgb(0 0 0/.05);
}
*{box-sizing:border-box}
body{margin:0;font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:var(--background);color:var(--foreground);-webkit-tap-highlight-color:transparent}
::selection{background:var(--primary);color:#fff}
.hidden{display:none!important}
.small{font-size:13px;color:var(--muted-foreground);line-height:1.55}
.muted-sm{font-size:12.5px;color:var(--muted-foreground);white-space:nowrap}
.grow{flex:1;min-width:0}
.center{text-align:center}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px}
b,strong{font-weight:600}

/* ===== Nút (Button shadcn) ===== */
button{font:inherit;font-size:14px;font-weight:500;height:36px;padding:0 16px;border-radius:10px;border:1px solid transparent;background:var(--primary-btn);color:var(--primary-foreground);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;transition:background-color .15s,opacity .15s}
button:hover{background:#292524}
button:disabled{opacity:.5;pointer-events:none}
button:focus-visible{outline:none;box-shadow:0 0 0 3px rgb(28 25 23/.35)}
button svg{width:16px;height:16px;flex-shrink:0}
button.ghost,button.btn-outline{background:var(--background);color:var(--foreground);border-color:var(--border);box-shadow:var(--shadow-xs)}
button.ghost:hover,button.btn-outline:hover{background:var(--accent)}
button.btn-ghost{background:transparent;color:var(--foreground);border-color:transparent;box-shadow:none}
button.btn-ghost:hover{background:var(--accent)}
button.danger,button.btn-destructive{background:var(--destructive);color:#fff}
button.danger:hover,button.btn-destructive:hover{background:oklch(0.577 0.245 27.325/.9)}
button.small,button.btn-sm{height:32px;padding:0 12px}
button.btn-pill{height:40px;border-radius:9999px;width:100%;padding:0 24px}
button.btn-block{width:100%}
button.muted{color:var(--muted-foreground)}
button.link-btn{background:transparent;border:0;box-shadow:none;color:var(--primary);height:auto;padding:0;font-size:12px;font-weight:500;gap:4px}
button.link-btn:hover{background:transparent;text-decoration:underline}
button.link-btn svg{width:14px;height:14px}

/* ===== Form ===== */
label{display:block;font-size:14px;font-weight:500;color:var(--foreground);margin-bottom:8px}
.field{display:flex;flex-direction:column;gap:8px}
.field>label{margin-bottom:0}
.form-col{display:flex;flex-direction:column;gap:12px}
input,select,textarea{width:100%;height:36px;padding:0 12px;border:1px solid var(--input);border-radius:10px;background:transparent;font:inherit;font-size:14px;color:var(--foreground);box-shadow:var(--shadow-xs);outline:none;transition:border-color .15s,box-shadow .15s}
textarea{height:auto;min-height:64px;padding:8px 12px;line-height:1.5}
select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:34px}
input::placeholder,textarea::placeholder{color:var(--muted-foreground)}
input:focus,select:focus,textarea:focus{border-color:var(--ring);box-shadow:0 0 0 3px rgb(28 25 23/.18)}
input.otp{text-align:center;font-size:18px;font-weight:600;letter-spacing:.4em}
.row{display:flex;gap:12px;flex-wrap:wrap}
.row>*{flex:1;min-width:160px}
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.actions.end{justify-content:flex-end}
.mt{margin-top:14px}

/* ===== Hộp thông báo (ErrorBox/SuccessBox/notice) ===== */
.msg{display:none;border-radius:16px;padding:8px 12px;font-size:14px;line-height:1.5}
.msg.ok{display:block;background:oklch(0.52 0.14 152/.1);border:1px solid oklch(0.52 0.14 152/.3);color:oklch(0.52 0.14 152)}
.msg.err{display:block;background:oklch(0.577 0.245 27.325/.1);border:1px solid oklch(0.577 0.245 27.325/.3);color:oklch(0.577 0.245 27.325)}
.msg.info{display:block;background:var(--tint-bg);border:1px solid var(--tint-border);color:var(--foreground)}

/* ===== Thẻ (Card) ===== */
.card{background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow-sm);padding:14px 12px;display:flex;flex-direction:column;gap:12px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.card-head.col{flex-direction:column;align-items:flex-start;gap:4px}
.card-title{font-size:14px;font-weight:600;margin:0;display:flex;align-items:center;gap:6px}
.card-title svg{width:16px;height:16px}
.card-title.warn-fg{color:var(--warning-foreground)}
.card-title-lg{font-size:18px;font-weight:600;margin:0;display:flex;align-items:center;gap:8px;line-height:1.2}
.card-title-lg svg{width:20px;height:20px;color:var(--primary)}
.card-title-md{font-size:16px;font-weight:600;margin:0;display:flex;align-items:center;gap:8px}
.card-title-md svg{width:18px;height:18px;color:var(--primary)}
.card-desc{font-size:14px;color:var(--muted-foreground);margin:0;line-height:1.55}
.tint-warn{border-color:oklch(0.84 0.16 84/.5);background:oklch(0.84 0.16 84/.05)}

/* ===== Khung auth / MFA (AuthLayout) ===== */
.auth-wrap{max-width:448px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column;justify-content:center;gap:20px;padding:16px}
@media(min-width:640px){.auth-wrap{padding:24px}}
.auth-brand{display:flex;flex-direction:column;align-items:center;text-align:center}
.auth-tile{width:44px;height:44px;border-radius:16px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center}
.auth-tile svg{width:24px;height:24px}
.auth-brand h1{font-size:30px;font-weight:700;letter-spacing:-.02em;margin:12px 0 0;line-height:1.15}
.auth-brand h1.sm{font-size:24px}
.auth-brand p{margin:4px 0 0;font-size:14px;color:var(--muted-foreground)}
.qrbox{display:flex;justify-content:center;padding:4px 0}
.qrbox img{width:200px;height:200px;background:#fff;border:1px solid var(--border);border-radius:16px;padding:10px}
.secret{background:var(--muted);border-radius:13px;padding:10px 12px;font-family:ui-monospace,Menlo,monospace;font-size:16px;font-weight:600;letter-spacing:.18em;text-align:center;word-break:break-all}

/* ===== Khung quản trị (AdminShell) ===== */
.sidebar{display:none}
@media(min-width:1024px){
  .sidebar{display:flex;position:fixed;top:0;bottom:0;left:0;width:256px;flex-direction:column;background:var(--background);border-right:1px solid var(--border);z-index:40}
  .content-wrap{padding-left:256px}
}
.side-brand{display:flex;align-items:center;gap:10px;padding:16px;border-bottom:1px solid var(--border)}
.brand-tile{width:36px;height:36px;border-radius:10px;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.brand-tile svg{width:20px;height:20px}
.brand-tile.sm{width:32px;height:32px}
.brand-tile.sm svg{width:18px;height:18px}
.brand-texts{display:flex;flex-direction:column;min-width:0}
.brand-name{font-size:15px;font-weight:700;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-sub{font-size:12px;color:var(--muted-foreground);line-height:1.3}
.side-role{padding:12px 16px 0}
.badge-role{display:inline-flex;align-items:center;background:var(--secondary);color:var(--secondary-foreground);border-radius:9999px;padding:2px 8px;font-size:12px;font-weight:500}
.whoami{display:block;margin-top:6px;font-size:12px;color:var(--muted-foreground);word-break:break-all}
.side-nav{flex:1;overflow-y:auto;padding:12px}
.side-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
button.side-item{display:flex;align-items:center;gap:12px;width:100%;height:auto;padding:8px 14px;border-radius:9999px;background:transparent;border:0;box-shadow:none;color:oklch(0.21 0.006 285.885/.8);font-size:14px;font-weight:500;text-align:left;justify-content:flex-start}
button.side-item:hover{background:oklch(0.9524 0.0013 286.37/.6)}
button.side-item.on{background:var(--primary-btn);color:var(--primary-foreground);font-weight:600}
button.side-item svg{width:18px;height:18px}
.side-badge{margin-left:auto;background:var(--destructive);color:#fff;min-width:20px;height:20px;padding:0 6px;border-radius:9999px;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.side-foot{border-top:1px solid var(--border);padding:12px}
.mobile-header{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:10px;background:oklch(1 0 0/.95);backdrop-filter:blur(8px);border-bottom:1px solid var(--border);padding:12px 16px}
@media(min-width:1024px){.mobile-header{display:none}}
.page{max-width:none;margin:0 auto;display:flex;flex-direction:column;gap:16px;padding:16px 16px 96px}
@media(min-width:1024px){.page{padding:32px}}
.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--card);border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding-bottom:env(safe-area-inset-bottom)}
@media(min-width:1024px){.bottom-nav{display:none}}
button.bnav-btn{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;height:auto;padding:8px 2px;background:transparent;border:0;box-shadow:none;border-radius:0;color:var(--muted-foreground);font-size:11px;font-weight:500}
button.bnav-btn:hover{background:transparent}
button.bnav-btn.on{color:var(--primary)}
button.bnav-btn svg{width:20px;height:20px}
button.bnav-btn span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 4px}
.bdot{position:absolute;top:4px;right:calc(50% - 18px);background:var(--destructive);color:#fff;min-width:16px;height:16px;padding:0 4px;border-radius:9999px;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center}
.sheet-overlay{position:fixed;inset:0;z-index:50;background:rgb(0 0 0/.5);display:flex;align-items:flex-end}
.sheet{background:var(--card);width:100%;border-radius:16px 16px 0 0;padding:16px 16px calc(24px + env(safe-area-inset-bottom))}
.sheet h3{font-size:16px;font-weight:600;margin:0 0 12px}
.sheet ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
button.sheet-item{display:flex;align-items:center;gap:12px;width:100%;height:auto;padding:10px 14px;border-radius:9999px;background:transparent;border:0;box-shadow:none;color:var(--foreground);font-size:14px;font-weight:500;text-align:left;justify-content:flex-start}
button.sheet-item:hover{background:oklch(0.9524 0.0013 286.37/.6)}
button.sheet-item.on{background:var(--accent);font-weight:600}
button.sheet-item svg{width:18px;height:18px;color:var(--primary)}

/* ===== Tổng quan ===== */
.grid-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:640px){.grid-stats{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1280px){.grid-stats{grid-template-columns:repeat(4,1fr)}}
.stat{background:var(--card);border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow-sm);padding:14px 12px}
.stat .n{font-size:24px;font-weight:700;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;line-height:1.25}
.stat .t{margin-top:2px;font-size:12px;font-weight:500;color:var(--muted-foreground);line-height:1.45}
.stat.warn .n,.stat.bad .n{color:var(--destructive)}
.list-rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.list-row{display:flex;align-items:center;gap:10px;padding:6px 4px;border-radius:13px;flex-wrap:wrap}
.row-title{font-size:14px;font-weight:600}
.row-sub{font-size:12px;color:var(--muted-foreground);margin-top:1px}
.reason-tags{display:flex;gap:6px;flex-wrap:wrap}
.recent-item{display:flex;gap:12px;padding:8px 0;border-bottom:1px solid var(--border)}
.recent-item:last-child{border-bottom:0}
.recent-text{font-size:14px;line-height:1.55}

/* ===== Chip / tag trạng thái (pastel như Vahavi) ===== */
.tag{display:inline-flex;align-items:center;border-radius:9999px;border:1px solid transparent;padding:2px 8px;font-size:12px;font-weight:600;white-space:nowrap}
.tag.pro{background:var(--tag-bg);color:var(--tag-fg);border-color:var(--tag-border)}
.tag.business{background:var(--tag-bg);color:var(--tag-fg);border-color:var(--tag-border)}
.tag.active{background:#D1FAE5;color:#065F46}
.tag.revoked{background:#FFE4E6;color:#BE123C}
.tag.warn{background:#FEF3C7;color:#92400E}
.tag.bad{background:#FFE4E6;color:#BE123C}
.tag.ord-pending{background:#FEF3C7;color:#92400E}
.tag.ord-paid{background:var(--tag-bg);color:var(--tag-fg);border-color:var(--tag-border)}
.tag.ord-issued{background:#D1FAE5;color:#065F46}
.tag.ord-expired{background:#E4E4E7;color:#52525B}
.tag.ord-cancelled{background:#FFE4E6;color:#BE123C}
.badge-destructive{display:inline-flex;align-items:center;background:var(--destructive);color:#fff;border-radius:9999px;padding:2px 8px;font-size:12px;font-weight:500;white-space:nowrap}
.badge-warn{display:inline-flex;align-items:center;background:#FEF3C7;color:#92400E;border-radius:9999px;padding:2px 8px;font-size:12px;font-weight:600;white-space:nowrap}
.badge-code{display:inline-flex;align-items:center;background:var(--secondary);color:var(--secondary-foreground);border-radius:9999px;padding:2px 8px;font-size:11px;font-weight:500;font-family:ui-monospace,Menlo,monospace;white-space:nowrap}
.tag.sup-open{background:#FEF3C7;color:#92400E}
.tag.sup-answered{background:#D1FAE5;color:#065F46}
.tag.sup-closed{background:#E4E4E7;color:#52525B}
.tag.src-app{background:var(--tag-bg);color:var(--tag-fg);border-color:var(--tag-border)}
.tag.src-web{background:var(--tag-bg);color:var(--tag-fg);border-color:var(--tag-border)}

/* ===== Hỗ trợ khách hàng (Đợt 111): khung chat ===== */
.chat-wrap{display:flex;flex-direction:column;gap:8px;background:oklch(0.967 0.001 286.375/.7);border-radius:22px;padding:14px 12px;margin-top:14px;max-height:480px;overflow-y:auto}
.chat-msg{max-width:85%;padding:10px 12px;border-radius:16px;font-size:14px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.chat-msg.cust{align-self:flex-start;background:#fff;border:1px solid var(--border);border-bottom-left-radius:6px}
.chat-msg.admin{align-self:flex-end;background:#DBEAFE;border:1px solid #BFDBFE;border-bottom-right-radius:6px}
.chat-time{font-size:11px;color:var(--muted-foreground);margin-top:4px}

/* ===== Bảng (shadcn) ===== */
.tbl-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:14px}
thead tr{border-bottom:1px solid var(--border)}
th{height:40px;padding:0 8px;text-align:left;font-weight:500;color:var(--foreground);white-space:nowrap}
td{padding:8px;vertical-align:middle;border-bottom:1px solid var(--border)}
tbody tr{transition:background-color .1s}
tbody tr:hover{background:oklch(0.967 0.001 286.375/.5)}
tbody tr:last-child td{border-bottom:0}
table.diff td:first-child{width:170px;color:var(--muted-foreground);font-weight:500}
.strike{color:var(--muted-foreground)}
.right{text-align:right}

/* ===== Phân trang ===== */
.pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;flex-wrap:wrap}
.pager.left{justify-content:flex-start}
.pager-btns{display:flex;gap:6px}

/* ===== Sổ bản quyền: master-detail ===== */
.md-layout{display:grid;gap:16px;align-items:start}
@media(min-width:1280px){.md-layout{grid-template-columns:380px minmax(0,1fr)}}
.lic-list{display:flex;flex-direction:column;gap:8px}
button.lic-item{display:block;width:100%;height:auto;text-align:left;justify-content:flex-start;background:var(--card);color:var(--foreground);border:1px solid var(--border);border-radius:12px;padding:14px 12px;box-shadow:var(--shadow-sm);font-weight:400;white-space:normal}
button.lic-item:hover{background:oklch(0.9524 0.0013 286.37/.6)}
button.lic-item.selected{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.lic-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.lic-name{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lic-badges{display:flex;gap:6px;flex-shrink:0;align-items:center}
.lic-meta{display:block;margin-top:4px;font-size:12px;color:var(--muted-foreground);line-height:1.55}
#licDetail{display:flex;flex-direction:column;gap:16px;min-width:0}

/* ===== Chi tiết mã ===== */
.detailbox{background:var(--tint-bg);border:1px solid var(--tint-border);border-radius:12px;box-shadow:var(--shadow-sm);padding:16px 12px}
.detailbox .dt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.detailbox .dt-title{font-size:14px;font-weight:600}
.plan-panel{display:flex;align-items:center;justify-content:space-between;gap:8px;background:oklch(0.967 0.001 286.375/.7);border-radius:22px;padding:10px 12px;margin:12px 0 6px}
.pp-label{font-size:12px;color:var(--muted-foreground)}
.pp-value{font-size:16px;font-weight:700;margin-top:1px}
.kv{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:7px 0;font-size:13.5px;border-bottom:1px solid oklch(0.92 0.004 286.32/.7)}
.kv:last-child{border-bottom:0}
.kv .k{color:var(--muted-foreground);flex-shrink:0}
.kv .v{font-weight:500;text-align:right}
.sub-title{font-size:12px;font-weight:700;color:var(--muted-foreground);margin:14px 0 6px}
.subbox{background:oklch(0.967 0.001 286.375/.7);border-radius:22px;padding:14px 12px;margin-top:14px}
.subbox h3{font-size:14px;font-weight:600;margin:0 0 10px}
.preview-box{background:oklch(0.967 0.001 286.375/.7);border-radius:22px;padding:12px;font-size:14px;line-height:1.65}
.codebox{background:var(--muted);border-radius:12px;padding:14px 16px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14.5px;line-height:1.7;word-break:break-all}
.noteItem{border-left:2px solid var(--primary);background:var(--tint-bg);border-radius:10px;padding:8px 10px;margin-top:10px;font-size:13.5px;line-height:1.55}

/* ===== Timeline nhật ký (AuditTimeline) ===== */
.timeline{position:relative;display:flex;flex-direction:column}
.timeline::before{content:"";position:absolute;top:8px;bottom:8px;left:17px;width:1px;background:var(--border)}
.tl-item{position:relative;display:flex;gap:12px;padding:10px 0}
.bubble{width:36px;height:36px;border-radius:9999px;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 0 0 4px #fff;position:relative;z-index:1}
.bubble svg{width:16px;height:16px}
.bubble.b-blue{background:#DBEAFE;color:#1D4ED8}
.bubble.b-emerald{background:#D1FAE5;color:#047857}
.bubble.b-amber{background:#FEF3C7;color:#B45309}
.bubble.b-rose{background:#FFE4E6;color:#BE123C}
.bubble.b-violet{background:#EDE9FE;color:#6D28D9}
.bubble.b-sky{background:#E0F2FE;color:#0369A1}
.bubble.b-zinc{background:#F4F4F5;color:#71717A}
.tl-card{flex:1;min-width:0;background:var(--card);border:1px solid var(--border);border-radius:28px;padding:10px 14px}
.tl-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.tl-title{font-size:14px;font-weight:600}
.tl-time{flex-shrink:0;text-align:right;font-size:12px;color:var(--muted-foreground)}
.tl-rel{display:block;font-weight:500;color:oklch(0.21 0.006 285.885/.7)}
.tl-abs{display:block;font-variant-numeric:tabular-nums}
.tl-actor{margin-top:2px;font-size:12px;color:var(--muted-foreground);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-detail{margin-top:8px;font-size:13px;line-height:1.55}
.tl-detailbox{margin:0 0 4px 48px;background:var(--muted);border-radius:13px;padding:12px;overflow-x:auto}
details.diffbox{margin-top:8px}
details.diffbox summary{cursor:pointer;color:var(--primary);font-size:12.5px;font-weight:600}

/* ===== Kích hoạt ===== */
.act-list{display:flex;flex-direction:column}
.act-row{display:flex;gap:12px;align-items:center;padding:10px 8px;border-bottom:1px solid var(--border);border-radius:13px}
.act-row:last-child{border-bottom:0}
.act-row.anom{background:oklch(0.577 0.245 27.325/.06)}
.act-times{font-size:12px;color:var(--muted-foreground);text-align:right;flex-shrink:0;line-height:1.6}

/* ===== Bộ lọc / xác nhận / bảo mật ===== */
.filter-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
.filter-bar .field{min-width:150px}
.filter-bar .f-grow{flex:1;min-width:200px}
.confirm-panel{background:var(--tint-bg);border:1px solid var(--tint-border);border-radius:12px;padding:14px 12px;display:flex;flex-direction:column;gap:12px}
.confirm-title{font-size:14px;font-weight:700;margin:0}
.sec-wrap{max-width:672px;display:flex;flex-direction:column;gap:16px}
.info-rows{font-size:14px;line-height:1.75}

/* ===== ĐỢT 136 — khung mới + hàng đợi việc + chuẩn nền ===== */
html,body{overflow-x:clip}
button:active{transform:translateY(1px)}
button:disabled{transform:none}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;box-shadow:0 0 0 3px rgb(28 25 23/.18)}
.side-group{list-style:none;font-size:12px;font-weight:600;color:var(--muted-foreground);padding:16px 12px 6px}
.topbar136{display:none}
@media(min-width:1024px){
  .topbar136{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:30;background:var(--background);padding:12px 24px;border-bottom:1px solid var(--border)}
}
.gsearch136{position:relative;flex:1;max-width:520px;display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--border);border-radius:10px;padding:0 12px;height:36px}
.gsearch136 svg{width:16px;height:16px;color:var(--muted-foreground);flex:0 0 16px}
.gsearch136 input{border:0;background:none;flex:1;font:inherit;height:auto;padding:0;box-shadow:none}
.gsearch136 input:focus-visible{box-shadow:none}
.gresults136{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--card);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px oklch(0 0 0/.12);padding:6px;z-index:50;max-height:340px;overflow:auto}
.gres-head{font-size:12px;font-weight:600;color:var(--muted-foreground);padding:6px 10px 2px}
.gres-item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:transparent;color:var(--foreground);border:0;height:auto;padding:8px 10px;border-radius:8px;justify-content:flex-start;white-space:normal}
.gres-item:hover{background:var(--accent)}
.gres-item .grow{flex:1;min-width:0}
.gres-empty{padding:8px 10px;font-size:13px;color:var(--muted-foreground)}
.qrow136{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--border)}
.qrow136:first-of-type{border-top:0}
.qdot136{width:8px;height:8px;border-radius:99px;flex:0 0 8px}
.qrow136 .grow{flex:1;min-width:0}
.qrow136 .qt{font-weight:600}
.qrow136 .qs{font-size:13px;color:var(--muted-foreground)}
.chips136{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.chip136{height:32px;padding:0 14px;border-radius:999px;background:var(--card);color:var(--foreground);border:1px solid var(--border);box-shadow:none}
.chip136:hover{background:var(--accent)}
.chip136.on{background:var(--foreground);color:var(--background);border-color:var(--foreground)}
.issue-layout136{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
@media(max-width:1100px){.issue-layout136{grid-template-columns:1fr}}
.issue-sum136{position:sticky;top:16px}
@media(min-width:1024px){.issue-sum136{top:76px}}
.srcbar136{background:var(--accent);border-radius:8px;padding:8px 10px;font-size:13px;margin-bottom:10px}
.sum-total136{border-top:1px solid var(--border);padding-top:8px;margin-top:4px}
.sum-total136 .v{font-weight:700}

/* ===== ĐỢT 162 — Mobile: Tổng quan / Đơn hàng / Khách hàng ===== */
@media(max-width:1023.98px){
  input,select,textarea{font-size:16px}
  input.otp{font-size:18px}
  button.lic-item{min-height:58px;padding:13px 14px}
  .lic-name{font-size:15px}
  .lic-meta{line-height:1.55}
  .detailbox{padding:14px}
  .detailbox .row{flex-wrap:wrap}
  .detailbox .row>button{flex:1 1 150px;min-height:44px}
  button.sheet-item{min-height:48px}
  .tbl-wrap:has(>table.mtbl){overflow-x:visible}
  table.mtbl thead{display:none}
  table.mtbl tbody tr{display:block;background:var(--card);border:1px solid var(--border);border-radius:12px;padding:8px 12px;margin-bottom:10px}
  table.mtbl tbody tr:hover{background:var(--card)}
  table.mtbl td{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:6px 0;border-bottom:1px dashed var(--border);text-align:right}
  table.mtbl tbody tr td:last-child{border-bottom:0}
  table.mtbl td::before{content:attr(data-label);color:var(--muted-foreground);font-weight:500;text-align:left;white-space:nowrap}
  table.mtbl td.right{justify-content:flex-end}
  table.mtbl td.right::before{content:none}
}

/* ===== ĐỢT 163 — Mobile: 7 màn còn lại ===== */
@media(max-width:1023.98px){
  .act-row{flex-wrap:wrap}
  .act-row .grow{flex:1 1 100%}
  .act-times{text-align:left;display:flex;gap:6px 14px;flex-wrap:wrap}
  table.diff td{white-space:normal;word-break:break-word}
  table.diff td:first-child{width:104px}
  .codebox{word-break:break-all}
  .lic-badges{flex-wrap:wrap;justify-content:flex-end}
}

/* ===== ĐỢT 164 — Chuông + khung thông báo ===== */
.bell-btn{position:relative;width:38px;height:38px;padding:0;border-radius:10px;background:var(--card);border:1px solid var(--border);color:var(--foreground);flex:none;box-shadow:none}
.bell-btn svg{width:19px;height:19px}
.bell-badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:9999px;background:var(--destructive);color:#fff;font-size:10.5px;font-weight:700;display:flex;align-items:center;justify-content:center}
.notif-overlay{position:fixed;inset:0;z-index:60;background:rgb(0 0 0/.5);display:flex;align-items:flex-end;justify-content:center}
.notif-box{background:var(--card);width:100%;max-height:78vh;overflow-y:auto;border-radius:16px 16px 0 0;padding:16px}
@media(min-width:1024px){
  .notif-overlay{align-items:flex-start;justify-content:flex-end;padding:64px 24px 0;background:rgb(0 0 0/.25)}
  .notif-box{width:430px;border-radius:16px}
}
.notif-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.notif-head h3{font-size:16px;font-weight:700;margin:0}
.notif-all{background:transparent;border:0;color:var(--primary);font-size:13px;font-weight:600;height:auto;padding:6px 2px;box-shadow:none;white-space:nowrap}
.notif-item{display:flex;gap:11px;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--border);border-radius:0;padding:11px 4px;height:auto;box-shadow:none;color:var(--foreground);font-weight:400;white-space:normal;align-items:flex-start}
.notif-item .n-ic{font-size:19px;flex:none;width:26px;text-align:center;line-height:1.3}
.notif-item .n-main{display:flex;flex-direction:column;min-width:0;flex:1}
.notif-item .n-tt{font-size:14px;font-weight:600;line-height:1.4}
.notif-item.unread .n-tt{font-weight:700}
.notif-item .n-ds{font-size:12.5px;color:var(--muted-foreground);line-height:1.45;margin-top:1px}
.notif-item .n-tm{font-size:11.5px;color:var(--muted-foreground);margin-top:2px}
.notif-item .n-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--destructive);margin-top:6px}

/* ===== ĐỢT 165 — Công tắc thông báo đẩy ===== */
.notif-pushrow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px 12px;border-bottom:1px solid var(--border);margin-bottom:4px}
.notif-pushrow .np-tt{font-size:14px;font-weight:600}
.push-toggle{flex:none;width:52px;height:28px;border-radius:9999px;background:var(--muted);color:var(--muted-foreground);font-size:11.5px;font-weight:700;border:1px solid var(--border);box-shadow:none;padding:0}
.push-toggle.on{background:var(--primary);color:#fff;border-color:var(--primary)}
.push-toggle:disabled{opacity:.55}

/* ===== ĐỢT 166 — giao diện mobile đúng mockup gốc ===== */
@media(min-width:1024px){#tab-more{display:none!important}}
.notif-item{position:relative;background:var(--card);border:1px solid var(--border);border-radius:14px;padding:12px 13px;margin-bottom:9px}
.notif-item.unread{border-color:var(--foreground)}
.notif-item.read{opacity:.62}
.n-ic-chip{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:16px;flex:none;background:#F5F5F4}
.n-ic-chip.amber{background:#FEF3C7}.n-ic-chip.green{background:#DCFCE7}.n-ic-chip.blue{background:#DBEAFE}.n-ic-chip.red{background:#FEE2E2}.n-ic-chip.grey{background:#F5F5F4}
.m-ov166,.m-ordhead166{display:none}
@media(max-width:1023.98px){
  .mobile-header{background:var(--background);border-bottom:0;padding:10px 16px 6px}
  .mh-brand{display:flex;align-items:center;gap:9px}
  .mh-logo{width:30px;height:30px;border-radius:9px;background:#181713;color:#F5C518;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:800}
  .mh-name{font-weight:800;font-size:17px;letter-spacing:-.02em}
  .mh-actions{margin-left:auto;display:flex;align-items:center;gap:12px}
  .mobile-header .bell-btn{width:38px;height:38px;border-radius:12px;background:#fff;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;padding:0}
  .mobile-header .bell-btn svg{width:19px;height:19px}
  .mh-avatar{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#44403C,#181713);color:#fff;font-weight:700;font-size:14px;border:0;box-shadow:none;padding:0}
  .bnav-ic{font-size:20px;line-height:1}
  button.bnav-btn{font-weight:600;color:#A8A29E;gap:3px}
  button.bnav-btn.on{color:var(--foreground)}
  .bdot{top:-3px;right:calc(50% - 19px);min-width:17px;height:17px;font-size:10.5px;border:2px solid var(--card)}
  #tab-overview>.card{display:none}
  .m-ov166{display:block}
  .m-date166{font-size:13px;color:var(--muted-foreground);margin:2px 2px 12px}
  .m-stats166{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px}
  .m-stat166{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:13px 14px}
  .m-stat166 .k{font-size:12.5px;color:var(--muted-foreground);display:flex;align-items:center;gap:6px}
  .m-stat166 .v{font-size:23px;font-weight:800;margin-top:3px;letter-spacing:-.02em}
  .m-stat166 .s{font-size:12px;color:#A8A29E;margin-top:1px}
  .m-stat166.hot .v{color:#B45309}
  .m-sec166{font-size:14px;font-weight:700;margin:14px 2px 9px;display:flex;justify-content:space-between;align-items:center}
  .m-link166{background:none;border:0;box-shadow:none;color:#57534E;font-size:12.5px;font-weight:600;height:auto;padding:0}
  .m-row166{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:12px 13px;display:flex;gap:11px;align-items:flex-start;margin-bottom:9px}
  .m-row166.tap{cursor:pointer}
  .m-ic166{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:16px;flex:none;background:#F5F5F4}
  .m-ic166.amber{background:#FEF3C7}.m-ic166.green{background:#DCFCE7}.m-ic166.blue{background:#DBEAFE}.m-ic166.red{background:#FEE2E2}.m-ic166.grey{background:#F5F5F4}
  .m-rtt{font-size:14px;font-weight:600;line-height:1.35}
  .m-rds{font-size:12.5px;color:var(--muted-foreground);margin-top:1px;line-height:1.4}
  .m-rtm{font-size:11.5px;color:#A8A29E;margin-left:auto;flex:none;padding-top:2px;white-space:nowrap}
  .m-ordhead166{display:block}
  .m-pagetitle166{font-size:20px;font-weight:800;letter-spacing:-.02em;padding:2px 2px 10px}
  .m-filters166{display:flex;gap:8px;margin-bottom:13px;flex-wrap:wrap}
  .m-filters166 .f{font-size:13px;font-weight:600;padding:7px 13px;border-radius:9999px;background:var(--card);border:1px solid var(--border);color:#57534E;height:auto;box-shadow:none}
  .m-filters166 .f.on{background:#181713;color:#fff;border-color:#181713}
  #tab-orders>.card{background:transparent;border:0;box-shadow:none;padding:0}
  #tab-orders>.card .card-head{display:none}
  #tab-orders>.card.tint-warn{background:var(--card);border:1px solid var(--border);padding:16px;margin-top:14px}
  #tab-orders>.card.tint-warn .card-head{display:block}
  .m-ocard166{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:14px;margin-bottom:11px;cursor:pointer}
  .m-ocard166.dim{opacity:.65}
  .m-ol1{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}
  .m-ocode{font-size:13px;font-weight:700;color:#57534E}
  .m-chip166{display:inline-flex;align-items:center;font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:9999px}
  .m-chip166.amber{background:#FEF3C7;color:#B45309}.m-chip166.green{background:#DCFCE7;color:#15803D}.m-chip166.grey{background:#F5F5F4;color:#57534E}.m-chip166.red{background:#FEE2E2;color:#B91C1C}
  .m-oshop{font-size:15.5px;font-weight:700}
  .m-ometa{font-size:13px;color:var(--muted-foreground);margin-top:2px}
  .m-amtrow{margin-top:7px;margin-bottom:0}
  .m-oamt{font-size:17px;font-weight:800}
  .m-obtns166{display:flex;gap:9px;margin-top:12px}
  .m-obtn166{flex:1;height:44px;border-radius:12px;font-size:14px;font-weight:700;background:#fff;color:#44403C;border:1px solid var(--border);box-shadow:none;padding:0}
  .m-obtn166.black{background:#181713;color:#fff;border-color:#181713}
  .m-obtn166.wide{flex:none;width:100%}
  .m-acct166{background:#181713;border-radius:16px;padding:15px;display:flex;gap:12px;align-items:center;margin-bottom:16px}
  .m-acct-av{background:#F5C518;color:#181713;width:44px;height:44px;border-radius:13px;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:none}
  .m-acct-name{color:#fff;font-size:15.5px;font-weight:700}
  .m-acct-sub{color:#A8A29E;font-size:12.5px;margin-top:1px}
  .m-grid166{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .m-tile166{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:15px 14px;text-align:left;height:auto;box-shadow:none;display:flex;flex-direction:column;align-items:flex-start;color:var(--foreground)}
  .m-tile-ic{width:38px;height:38px;border-radius:11px;background:#F5F5F4;display:flex;align-items:center;justify-content:center;font-size:17px;margin-bottom:9px;position:relative}
  .m-tile-badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--destructive);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
  .m-tile-name{font-size:14px;font-weight:700}
  .m-tile-sub{font-size:12px;color:#A8A29E;margin-top:1px;font-weight:400}
  .m-logout166{margin-top:16px;width:100%;background:var(--card);border:1px solid var(--border);border-radius:14px;height:48px;font-size:14px;font-weight:700;color:#B91C1C;box-shadow:none}
  .notif-overlay{bottom:0;background:transparent;align-items:stretch}
  .notif-box{flex:1;width:100%;max-width:none;max-height:none;height:auto;overflow:auto;border-radius:0;padding:16px 16px calc(84px + env(safe-area-inset-bottom))}
  .bottom-nav{z-index:70}
}

/* ================= ĐỢT 167 — HỖ TRỢ KIỂU CHAT (đúng mockup support-chat-v1) ================= */
.m-suphead167{display:none}
.sup-chips167{display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px;margin-bottom:9px}
.sup-chips167::-webkit-scrollbar{display:none}
.sup-chips167 .f{font-size:13px;font-weight:600;padding:7px 13px;border-radius:999px;background:#fff;border:1px solid #E7E5E4;color:#57534E;white-space:nowrap;cursor:pointer;font-family:inherit;flex:none}
.sup-chips167 .f.on{background:#1C1917;color:#fff;border-color:#1C1917}
.sup-chips167.sm .f{font-size:12px;padding:5px 11px}
.sup-rf167{margin-left:auto;width:32px;height:32px;border-radius:50%;background:#fff;border:1px solid #E7E5E4;color:#57534E;display:flex;align-items:center;justify-content:center;font-size:15px;cursor:pointer;flex:none;font-family:inherit}
.sup-list167{display:flex;flex-direction:column;gap:9px}
.sup-conv167{background:#fff;border:1px solid #E7E5E4;border-radius:16px;padding:12px 13px;display:flex;gap:11px;align-items:flex-start;text-align:left;width:100%;cursor:pointer;font-family:inherit;color:inherit}
.sup-conv167.selected{border-color:#1C1917}
.sup-conv167.dim{opacity:.6}
.sup-gava167{width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:16px}
.sup-gava167.sm{width:40px;height:40px;font-size:15px}
.sup-gava167.g1{background:linear-gradient(135deg,#F59E0B,#B45309)}
.sup-gava167.g2{background:linear-gradient(135deg,#0EA5E9,#0369A1)}
.sup-gava167.g3{background:linear-gradient(135deg,#10B981,#047857)}
.sup-gava167.g4{background:linear-gradient(135deg,#8B5CF6,#6D28D9)}
.sup-gava167.g5{background:linear-gradient(135deg,#F43F5E,#BE123C)}
.sup-cmain167{flex:1;min-width:0;display:flex;flex-direction:column}
.sup-l1167{display:flex;align-items:baseline;gap:8px}
.sup-nm167{font-size:14.5px;font-weight:600;color:#1C1917;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sup-nm167.bold{font-weight:800}
.sup-tm167{font-size:11.5px;color:#A8A29E;margin-left:auto;flex:none}
.sup-pv167{font-size:13px;color:#78716C;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sup-pv167 b{color:#44403C;font-weight:600}
.sup-l3167{font-size:11.5px;color:#A8A29E;margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sup-pill167{margin-left:2px;flex:none;font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;align-self:center}
.sup-pill167.wait{background:#FEE2E2;color:#B91C1C}
.sup-pill167.done{background:#DCFCE7;color:#15803D}
.sup-pill167.closed{background:#F5F5F4;color:#57534E}
/* Phòng chat */
.sup-room167{display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px}
.sup-rhead167{display:flex;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid #E7E5E4;margin-bottom:10px}
.sup-back167{font-size:24px;background:none;border:none;cursor:pointer;width:30px;flex:none;color:#1C1917;line-height:1;padding:0;font-family:inherit}
.sup-rhmain167{min-width:0;display:flex;flex-direction:column}
.sup-rhn167{font-size:15px;font-weight:800;color:#1C1917;line-height:1.25}
.sup-rhs167{font-size:12px;color:#A8A29E;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sup-call167{margin-left:auto;width:38px;height:38px;border-radius:12px;background:#fff;border:1px solid #E7E5E4;display:flex;align-items:center;justify-content:center;font-size:16px;text-decoration:none;flex:none}
.sup-strip167{font-size:12px;color:#78716C;background:#F4F3F1;border-radius:12px;padding:8px 12px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.sup-strip167 b{color:#44403C}
.sup-chipst167{display:inline-flex;font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:999px;flex:none}
.sup-chipst167.st-open{background:#FEF3C7;color:#B45309}
.sup-chipst167.st-answered{background:#DCFCE7;color:#15803D}
.sup-chipst167.st-closed{background:#F5F5F4;color:#57534E}
.sup-day167{text-align:center;font-size:11.5px;color:#A8A29E;margin:8px 0 10px}
.sup-day167 span{background:#E7E5E4;border-radius:999px;padding:3px 10px;font-weight:600}
.sup-room167 .chat-wrap{background:transparent;border-radius:0;padding:2px 0;gap:2px;margin-top:0;max-height:520px}
.sup-room167 .chat-msg{max-width:80%;padding:0;border:none;background:transparent;display:flex;flex-direction:column;margin-bottom:8px}
.sup-room167 .chat-msg.cust{align-self:flex-start;align-items:flex-start}
.sup-room167 .chat-msg.admin{align-self:flex-end;align-items:flex-end}
.sup-bb167{padding:9px 12px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word;border-radius:18px}
.chat-msg.cust .sup-bb167{background:#fff;border:1px solid #E7E5E4;border-bottom-left-radius:6px;color:#1C1917}
.chat-msg.admin .sup-bb167{background:#1C1917;color:#fff;border-bottom-right-radius:6px}
.sup-room167 .chat-time{font-size:11px;color:#A8A29E;margin-top:3px}
.sup-composer167{display:flex;gap:9px;align-items:flex-end;padding-top:10px;border-top:1px solid #E7E5E4;margin-top:4px}
.sup-composer167 textarea{flex:1;border:1px solid #E7E5E4;border-radius:22px;padding:11px 15px;font-size:14px;resize:none;max-height:120px;font-family:inherit;background:#fff;color:var(--foreground);line-height:1.4}
.sup-send167{width:44px;height:44px;border-radius:50%;background:#1C1917;color:#fff;border:none;font-size:16px;flex:none;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.sup-send167:disabled{opacity:.5}
.sup-closeln167{text-align:center;font-size:12.5px;font-weight:600;color:#B91C1C;padding:10px 0 2px;background:none;border:none;cursor:pointer;width:100%;font-family:inherit}
.sup-closeln167.dark{color:#1C1917}
@media (max-width:1023.98px){
  #tab-support .card:has(#supRows){background:transparent;border:none;box-shadow:none;padding:0;border-radius:0}
  #tab-support .card:has(#supRows) .card-head{display:none}
  .m-suphead167{display:flex;justify-content:space-between;align-items:center;padding:2px 2px 10px}
  .m-suptitle167{font-size:20px;font-weight:800;color:#1C1917;letter-spacing:-.02em}
  .m-supcnt167{font-size:12.5px;font-weight:700;background:#FEE2E2;color:#B91C1C;border-radius:999px;padding:3px 10px}
  #supDetail{display:none}
  #supLayout167.sup-open167 #supDetail{display:block}
  #supLayout167.sup-open167 .card:has(#supRows){display:none}
  .sup-room167{background:transparent;border:none;border-radius:0;padding:0}
  .sup-strip167{background:#fff;border:1px solid #E7E5E4}
  .sup-room167 .chat-wrap{max-height:none;overflow:visible}
  .sup-composer167{position:sticky;bottom:calc(74px + env(safe-area-inset-bottom, 0px));background:var(--background);z-index:5;padding-bottom:4px}
}

/* ĐỢT 167 — vá: nút gốc của hệ thống có height:36px + white-space:nowrap, phải gỡ cho thẻ hội thoại;
   lưới md-layout cần cột minmax(0,1fr) + min-width:0 cho các ô con, tránh bị nội dung nowrap thổi phồng. */
.md-layout{grid-template-columns:minmax(0,1fr)}
#supLayout167>*{min-width:0}
.sup-conv167{height:auto;white-space:normal}
.sup-room167{min-width:0}
.sup-rhead167{min-width:0}
.sup-list167{min-width:0}

/* ================= ĐỢT 168 — THANH DƯỚI CÙNG KÍCH THƯỚC VỚI APP BÁN HÀNG PPOS =================
   Số đo lấy nguyên từ #botnav của app PPOS: nút cao tối thiểu 4.15rem, icon 1.45rem,
   chữ .78rem đậm 700, khoảng đệm thanh .35rem (+ vùng an toàn). */
.bottom-nav{padding:.35rem .25rem calc(.35rem + env(safe-area-inset-bottom));box-shadow:0 -2px 12px rgba(16,42,67,.05)}
button.bnav-btn{min-height:4.15rem;padding:.35rem 0;gap:.18rem;font-size:.78rem;font-weight:700}
.bnav-ic{font-size:1.45rem}
@media (max-width:1023.98px){
  .sup-composer167{bottom:calc(84px + env(safe-area-inset-bottom, 0px))}
  .notif-box{padding-bottom:calc(92px + env(safe-area-inset-bottom))}
}
button.bnav-btn span{padding:0 1px}

/* ================= ĐỢT 169 — KHÁCH HÀNG KIỂU HỘP THƯ (đúng mockup customers-v1) ================= */
.m-custhead169{display:none}
.cust-search169{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #E7E5E4;border-radius:999px;padding:0 14px;margin-bottom:12px}
.cust-search-ic169{font-size:14px;flex:none}
.cust-search169 input{flex:1;border:none;background:transparent;font-size:14px;padding:10px 0;font-family:inherit;color:var(--foreground);outline:none;min-width:0}
.cust-sum169{display:none}
#custChips136 .chip136{font-size:13px;font-weight:600;height:auto;padding:7px 13px}
#custLayout169>*{min-width:0}
.cust-list169{display:flex;flex-direction:column;gap:9px;min-width:0}
.cust-conv169{background:#fff;border:1px solid #E7E5E4;border-radius:16px;padding:12px 13px;display:flex;gap:11px;align-items:flex-start;text-align:left;width:100%;cursor:pointer;font-family:inherit;color:inherit;height:auto;white-space:normal}
.cust-conv169.selected{border-color:#1C1917}
.cust-gava169{width:44px;height:44px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:16px}
.cust-gava169.lg{width:52px;height:52px;font-size:19px}
.cust-gava169.g1{background:linear-gradient(135deg,#F59E0B,#B45309)}
.cust-gava169.g2{background:linear-gradient(135deg,#0EA5E9,#0369A1)}
.cust-gava169.g3{background:linear-gradient(135deg,#10B981,#047857)}
.cust-gava169.g4{background:linear-gradient(135deg,#8B5CF6,#6D28D9)}
.cust-gava169.g5{background:linear-gradient(135deg,#F43F5E,#BE123C)}
.cust-cmain169{flex:1;min-width:0;display:flex;flex-direction:column}
.cust-l1169{display:flex;align-items:center;gap:8px}
.cust-nm169{font-size:14.5px;font-weight:700;color:#1C1917;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cust-new169{font-size:10.5px;font-weight:700;background:#E0F2FE;color:#0369A1;border-radius:999px;padding:1px 7px;flex:none}
.cust-tm169{font-size:11.5px;color:#A8A29E;margin-left:auto;flex:none}
.cust-pv169{font-size:13px;color:#78716C;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cust-l3169{font-size:11.5px;color:#A8A29E;margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cust-plan169{margin-left:2px;flex:none;font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;align-self:center}
.cust-plan169.biz{background:#FEF3C7;color:#B45309}
.cust-plan169.pro{background:#DBEAFE;color:#1D4ED8}
.cust-plan169.free{background:#F5F5F4;color:#57534E}
.cust-plan169.trial{background:#FEE2E2;color:#B91C1C}
/* Hồ sơ khách */
.cust-room169{display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px;min-width:0}
.cust-phead169{display:flex;align-items:center;gap:11px;padding-bottom:12px}
.cust-back169{font-size:24px;background:none;border:none;cursor:pointer;width:26px;flex:none;color:#1C1917;line-height:1;padding:0;font-family:inherit}
.cust-phmain169{min-width:0;display:flex;flex-direction:column}
.cust-pn169{font-size:17px;font-weight:800;color:#1C1917;line-height:1.25;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cust-pn169 .cust-plan169{margin-left:0}
.cust-ps169{font-size:12.5px;color:#A8A29E;margin-top:2px}
.cust-acts169{display:flex;gap:9px;margin-bottom:12px}
.cust-pri169{flex:1;background:#1C1917;color:#fff;font-size:14px;font-weight:700;border-radius:13px;height:48px;border:none;cursor:pointer;font-family:inherit}
.cust-call169{width:52px;height:48px;background:#fff;border:1px solid #E7E5E4;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:18px;text-decoration:none;flex:none}
.cust-info169{background:#F4F3F1;border-radius:16px;padding:6px 14px;margin-bottom:12px}
.cust-irow169{display:flex;gap:10px;padding:9px 0;font-size:13.5px;border-bottom:1px solid #E9E6E1}
.cust-irow169:last-child{border-bottom:none}
.cust-irow169 .k{color:#A8A29E;width:132px;flex:none;white-space:nowrap}
.cust-irow169 .v{color:#1C1917;font-weight:600}
.cust-sec169{font-size:13px;font-weight:800;color:#1C1917;margin:4px 2px 8px;display:flex;justify-content:space-between}
.cust-sec169 span{color:#A8A29E;font-weight:600}
.cust-lic169{width:100%;display:flex;align-items:center;gap:10px;background:#F4F3F1;border:1px solid transparent;border-radius:14px;padding:11px 13px;margin-bottom:8px;height:auto;white-space:normal;text-align:left;cursor:pointer;color:inherit;font-family:inherit}
.cust-licmain169{flex:1;min-width:0;display:flex;flex-direction:column}
.cust-lk169{font-size:14px;font-weight:800;color:#1C1917;letter-spacing:.02em}
.cust-lm169{font-size:12px;color:#78716C;margin-top:2px}
.cust-go169{color:#A8A29E;font-size:18px;flex:none}
.cust-ord169{display:flex;align-items:center;gap:8px;font-size:13px;padding:9px 2px;border-bottom:1px solid #E7E5E4}
.cust-ord169:last-of-type{border-bottom:none}
.cust-ordmain169{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cust-amt169{margin-left:auto;font-weight:700;color:#1C1917;flex:none}
.cust-pwrow169{display:flex;gap:8px}
.cust-pwrow169 input{flex:1;min-width:0}
@media (max-width:1023.98px){
  #tab-customers .card:has(#custRows){background:transparent;border:none;box-shadow:none;padding:0;border-radius:0}
  #tab-customers .card:has(#custRows) .card-head{display:none}
  #custStats{display:none}
  .m-custhead169{display:flex;justify-content:space-between;align-items:center;padding:2px 2px 10px}
  .m-custtitle169{font-size:20px;font-weight:800;color:#1C1917;letter-spacing:-.02em}
  .m-custnew169{font-size:12.5px;font-weight:700;background:#E0F2FE;color:#0369A1;border-radius:999px;padding:3px 10px}
  .cust-sum169{display:block;font-size:12.5px;color:#78716C;padding:0 2px 10px}
  #custChips136{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  #custChips136::-webkit-scrollbar{display:none}
  #custChips136 .chip136{flex:none}
  .cust-sum169 b{color:#44403C}
  #custDetail{display:none}
  #custLayout169.cust-open169 #custDetail{display:block}
  #custLayout169.cust-open169 .card:has(#custRows){display:none}
  .cust-room169{background:transparent;border:none;border-radius:0;padding:0}
  .cust-info169{background:#fff;border:1px solid #E7E5E4}
  .cust-lic169{background:#fff;border-color:#E7E5E4}
}

/* ================= ĐỢT 170 — TỔNG QUAN MOBILE CHIA MỤC (đúng mockup overview-v2) ================= */
.m-sec170{display:flex;justify-content:space-between;align-items:center;margin:16px 2px 9px;font-size:13px;font-weight:800;letter-spacing:.06em;color:#78716C;text-transform:uppercase}
.m-sec170 .m-link166{letter-spacing:0;text-transform:none}
.m-ov166 .m-sec170:first-of-type{margin-top:2px}
.m-card170{background:#fff;border:1px solid #E7E5E4;border-radius:16px;padding:6px 14px}
.m-card170.m-rev170{padding-bottom:12px}
.m-irow170{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #F5F5F4;font-size:13.5px}
.m-irow170:last-child{border-bottom:none}
.m-iic170{font-size:15px;width:22px;text-align:center;flex:none}
.m-ik170{color:#57534E}
.m-iv170{margin-left:auto;font-weight:800;color:#1C1917;text-align:right}
.m-iv170 small{display:block;font-weight:600;color:#A8A29E;font-size:11.5px}
.m-iv170.red{color:#B91C1C}
.m-revtotal170{padding:12px 2px 2px}
.m-revn170{font-size:24px;font-weight:800;color:#1C1917;letter-spacing:-.02em}
.m-revs170{font-size:12px;color:#A8A29E;margin-top:2px}
.m-revsplit170{display:flex;gap:8px;padding:10px 0 4px}
.m-sp170{flex:1;background:#F4F3F1;border-radius:11px;padding:8px 11px;font-size:12px;color:#78716C}
.m-sp170 b{display:block;font-size:14.5px;color:#1C1917;margin-top:1px}
.m-chart170{display:flex;align-items:flex-end;gap:10px;height:118px;padding:14px 2px 0}
.m-col170{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;height:100%;justify-content:flex-end;min-width:0}
.m-cval170{font-size:10.5px;font-weight:700;color:#57534E}
.m-bar170{width:100%;max-width:34px;border-radius:6px 6px 3px 3px;background:#1C1917}
.m-bar170.cur{background:#B45309}
.m-cmo170{font-size:11px;color:#A8A29E}
.m-qrow170{background:#fff;border:1px solid #E7E5E4;border-radius:14px;padding:11px 13px;display:flex;gap:11px;align-items:center;margin-bottom:8px;width:100%;text-align:left;cursor:pointer;font-family:inherit;color:inherit;height:auto;white-space:normal}
.m-qmain170{flex:1;min-width:0;display:flex;flex-direction:column}
.m-qrow170 .cust-plan169{margin-left:0}
.m-days170{margin-left:auto;font-weight:800;font-size:13px;color:#1C1917;flex:none}
.m-days170.red{color:#B91C1C}
.m-calm170{font-size:13px;color:#78716C;padding:2px 2px 4px}
@media (max-width:1023.98px){
  .m-ov166 .m-row166{background:#fff;border:1px solid #E7E5E4;border-radius:14px;padding:11px 13px;margin-bottom:8px}
}

/* ===== ĐỢT 171: thanh tiến trình tải ở đỉnh màn hình ===== */
#loadBar171{position:fixed;top:0;left:0;right:0;height:3px;z-index:300;pointer-events:none;opacity:0;transition:opacity .25s ease}
#loadBar171.on{opacity:1}
#loadBar171 i{display:block;height:100%;background:var(--foreground,#181713);transform-origin:0 50%;animation:lb171 1.15s ease-in-out infinite}
@keyframes lb171{0%{transform:scaleX(.06)}55%{transform:scaleX(.68)}100%{transform:scaleX(.94)}}
