/* ==========================================================================
   OXO Web - Quản lý khách hàng
   ========================================================================== */

:root {
    --ox-bg: #f1f3f7;
    --ox-surface: #ffffff;
    --ox-surface-2: #f5f6f9;
    --ox-border: #e4e7ee;
    --ox-text: #1a2232;
    --ox-muted: #6b7486;
    --ox-primary: #1d3768;
    --ox-primary-hover: #152a52;
    --ox-primary-soft: #e8edf7;
    --ox-blue: #2d6bdc;
    --ox-green: #17956a;
    --ox-red: #c4262e;
    --ox-amber: #b4690e;
    --ox-gray: #7a8294;
    --ox-slate: #94a0b4;
    --ox-red-soft: #fdecec;
    --ox-amber-soft: #fdf3e3;
    --ox-green-soft: #e5f6ef;
    --ox-gray-soft: #eef0f4;
    --ox-radius: 16px;
    --ox-radius-sm: 10px;
    --ox-shadow: 0 1px 2px rgba(20, 30, 55, .04), 0 2px 8px rgba(20, 30, 55, .04);
    --ox-sidebar: 256px;
    --ox-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.ox-app {
    margin: 0;
    background: var(--ox-bg);
    color: var(--ox-text);
    font: 400 14px/1.5 var(--ox-font);
    -webkit-font-smoothing: antialiased;
}

.ox-app a { color: var(--ox-primary); text-decoration: none; }
.ox-app a:hover { color: var(--ox-blue); }
.ox-app h1, .ox-app h2, .ox-app h3 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.ox-app p { margin: 0; }
.ox-app code { font-size: 12px; background: var(--ox-surface-2); padding: 1px 5px; border-radius: 5px; }
.ox-app :focus-visible { outline: 2px solid var(--ox-blue); outline-offset: 2px; }
.ox-icon { flex: none; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.ox-muted { color: var(--ox-muted); }
.ox-text-red { color: var(--ox-red) !important; }
.ox-text-green { color: var(--ox-green) !important; }
.ox-text-amber { color: var(--ox-amber) !important; }
.ox-text-gray, .ox-text-slate { color: var(--ox-gray) !important; }

/* ---------- Khung trang ---------- */
.ox-shell { display: flex; min-height: 100vh; }

.ox-sidebar {
    position: sticky;
    top: 0;
    width: var(--ox-sidebar);
    height: 100vh;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 14px 14px;
    background: var(--ox-surface);
    border-right: 1px solid var(--ox-border);
    overflow-y: auto;
    z-index: 40;
}

.ox-sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 0 4px; }
.ox-sidebar__head .ox-brand { min-width: 0; flex: 1; }
.ox-sidebar__head .ox-logo { max-width: 100%; height: auto; }
.ox-sidebar__close { display: none; }

.ox-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ox-text) !important; }
.ox-logo { display: block; width: auto; max-width: 100%; }
.ox-brand--chip { padding: 10px 16px; border-radius: 14px; background: #fff; align-self: flex-start; }
.ox-brand__mark {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--ox-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}
.ox-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.ox-brand__text strong { font-size: 15px; letter-spacing: .01em; }
.ox-brand__text small { font-size: 11px; color: var(--ox-muted); }
.ox-brand--small { gap: 8px; }
.ox-brand--small .ox-brand__mark { width: 30px; height: 30px; font-size: 10px; border-radius: 8px; }

.ox-bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ox-muted) !important; }
.ox-bell:hover { background: var(--ox-surface-2); }
.ox-bell em {
    position: absolute; top: 0; right: -2px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    background: var(--ox-red); color: #fff;
    font: 600 11px/18px var(--ox-font); font-style: normal; text-align: center;
}

.ox-nav { display: flex; flex-direction: column; gap: 2px; }
.ox-nav hr { width: 100%; margin: 10px 0; border: 0; border-top: 1px solid var(--ox-border); }
.ox-nav__item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: var(--ox-radius-sm);
    color: #3a4356 !important;
    font-weight: 500;
}
.ox-nav__item span { flex: 1; }
.ox-nav__item:hover { background: var(--ox-surface-2); }
.ox-nav__item.is-active { background: var(--ox-gray-soft); color: var(--ox-text) !important; font-weight: 600; }
.ox-nav__item > .ox-icon:last-child:not(:first-child) { color: var(--ox-slate); }
.ox-nav__badge {
    min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 11px;
    background: var(--ox-red); color: #fff;
    font: 600 12px/22px var(--ox-font); font-style: normal; text-align: center;
}

.ox-user {
    margin-top: auto;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 6px 0;
    border-top: 1px solid var(--ox-border);
}
.ox-user__info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ox-user__info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-user__info small { color: var(--ox-muted); }
.ox-avatar {
    display: grid; place-items: center;
    width: 38px; height: 38px; flex: none;
    border-radius: 50%;
    background: var(--ox-text); color: #fff;
    font-weight: 600;
}

.ox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ox-topbar { display: none; }
.ox-content { width: 100%; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 24px; }
.ox-backdrop { display: none; }

/* ---------- Nút ---------- */
.ox-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 16px;
    border: 1px solid var(--ox-border);
    border-radius: var(--ox-radius-sm);
    background: var(--ox-surface);
    color: var(--ox-text) !important;
    font: 600 14px/1.2 var(--ox-font);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.ox-btn:hover { background: var(--ox-surface-2); border-color: #d3d8e2; }
.ox-btn:disabled, .ox-btn.is-loading { opacity: .6; cursor: progress; }
.ox-btn--primary { background: var(--ox-primary); border-color: var(--ox-primary); color: #fff !important; }
.ox-btn--primary:hover { background: var(--ox-primary-hover); border-color: var(--ox-primary-hover); }
.ox-btn--ghost { background: transparent; }
.ox-btn--danger-ghost { background: transparent; border-color: transparent; color: var(--ox-red) !important; }
.ox-btn--danger-ghost:hover { background: var(--ox-red-soft); border-color: transparent; }
.ox-btn--block { width: 100%; }
.ox-btn--lg { min-height: 48px; font-size: 15px; border-radius: 12px; }

.ox-icon-btn {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px; flex: none;
    padding: 0;
    border: 0; border-radius: var(--ox-radius-sm);
    background: transparent;
    color: var(--ox-muted) !important;
    cursor: pointer;
}
.ox-icon-btn:hover { background: var(--ox-surface-2); color: var(--ox-text) !important; }
.ox-icon-btn.is-loading { opacity: .5; cursor: progress; }
.ox-icon-btn.is-done { color: var(--ox-green) !important; }

/* ---------- Card ---------- */
.ox-card {
    background: var(--ox-surface);
    border: 1px solid var(--ox-border);
    border-radius: var(--ox-radius);
    box-shadow: var(--ox-shadow);
    padding: 22px 24px;
    min-width: 0;
}
.ox-card--flush { padding: 0; overflow: hidden; }
.ox-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ox-card__head--col { flex-direction: column; align-items: flex-start; gap: 4px; }
.ox-card__head h2, .ox-card__title { font-size: 17px; }
.ox-card__head a { font-weight: 600; font-size: 13px; }
.ox-app .ox-card__title { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.ox-card__title .ox-icon { color: var(--ox-muted); }
.ox-card > .ox-muted + * { margin-top: 14px; }

.ox-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ox-stack--sm { gap: 12px; }

.ox-count {
    min-width: 26px; height: 24px; padding: 0 8px;
    border-radius: 12px;
    background: var(--ox-gray-soft);
    font-size: 12px; font-weight: 600; line-height: 24px; text-align: center;
}

.ox-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ox-page-head h1 { font-size: 26px; }
.ox-page-head .ox-muted { margin-top: 4px; }
.ox-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ox-muted) !important; }
.ox-back:hover { color: var(--ox-text) !important; }

/* ---------- Tổng quan ---------- */
.ox-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px; }
.ox-hero__title h1 { font-size: 28px; }
.ox-hero__title p { margin-top: 6px; }

.ox-kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.ox-kpis--row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ox-kpi {
    position: relative;
    display: flex; flex-direction: column; gap: 4px;
    min-width: 200px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--ox-surface-2);
    color: var(--ox-text) !important;
}
.ox-kpis--row .ox-kpi { min-width: 0; background: var(--ox-surface); padding: 18px 20px; }
.ox-kpi__label { color: var(--ox-muted); font-size: 13px; }
.ox-kpi__value { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ox-kpi small { color: var(--ox-muted); font-size: 12px; }
.ox-kpi--link { padding-right: 40px; transition: background .15s; }
.ox-kpi--link:hover { background: var(--ox-gray-soft); }
.ox-kpi--link > .ox-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ox-slate); }

.ox-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ox-section__head h2 { font-size: 17px; }
.ox-section__head a { font-weight: 600; font-size: 14px; }

.ox-states { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ox-state {
    display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
    padding: 16px;
    border: 1px solid var(--ox-border);
    border-radius: 14px;
    background: var(--ox-surface);
    box-shadow: var(--ox-shadow);
    color: var(--ox-text) !important;
    transition: border-color .15s, transform .15s;
}
.ox-state:hover { border-color: #cfd5e1; transform: translateY(-1px); }
.ox-state__label { display: flex; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 500; color: #3a4356; line-height: 1.35; }
.ox-state strong { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }

.ox-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ox-slate); transform: translateY(-1px); }
.ox-dot--red { background: var(--ox-red); }
.ox-dot--amber { background: #e39a2b; }
.ox-dot--green { background: var(--ox-green); }
.ox-dot--gray { background: var(--ox-gray); }
.ox-dot--blue { background: var(--ox-blue); }
.ox-todo__icon--blue { background: var(--ox-primary-soft); color: var(--ox-primary); }

.ox-grid-2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.ox-grid-2--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Tổng quan: Việc cần làm | Biểu đồ | Server, các thẻ cao bằng nhau */
.ox-grid-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.ox-grid-3 > .ox-card { display: flex; flex-direction: column; }
.ox-card--chart .ox-legend { margin-bottom: 4px; }
.ox-card--servers .ox-bars a { grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) 28px; }

.ox-todo + .ox-todo { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ox-border); }
.ox-todo__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ox-todo__head h3 { flex: 1; font-size: 14px; font-weight: 600; }
.ox-todo__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ox-gray-soft); color: var(--ox-gray); }
.ox-todo__icon--red { background: var(--ox-red-soft); color: var(--ox-red); }
.ox-todo__icon--amber { background: var(--ox-amber-soft); color: var(--ox-amber); }

.ox-list { list-style: none; margin: 0; padding: 0; }
.ox-list__item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.ox-list__item + .ox-list__item { border-top: 1px dashed var(--ox-border); }
.ox-list__main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ox-text) !important; }
.ox-list__main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-list__main small { color: var(--ox-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-list__main:hover strong { color: var(--ox-blue); }
.ox-list__meta { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.35; }
.ox-list__meta strong { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ox-list__meta small { color: var(--ox-muted); font-size: 12px; }
.ox-list__action { flex: none; padding: 5px 12px; border-radius: 8px; background: var(--ox-amber-soft); color: var(--ox-amber) !important; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ox-list__action:hover { background: #fbe6c4; }
.ox-icon-btn--sm { width: 30px; height: 30px; }
.ox-list__item form { display: contents; }
.ox-restore-checks { margin-top: 10px; }
.ox-link-btn { padding: 0; border: 0; background: none; color: var(--ox-muted); font: 500 12px var(--ox-font); text-decoration: underline; cursor: pointer; }
.ox-link-btn:hover { color: var(--ox-primary); }
.ox-more { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.ox-empty { color: var(--ox-muted); padding: 12px 0; }

.ox-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.ox-legend span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ox-legend b { font-weight: 400; color: var(--ox-muted); }
.ox-swatch { width: 12px; height: 12px; border-radius: 3px; }
.ox-swatch--blue { background: var(--ox-blue); }
.ox-swatch--green { background: var(--ox-green); }

/* Biểu đồ cột HTML: tự giãn theo thẻ, chữ giữ nguyên cỡ */
.ox-bchart { --label: 22px; display: flex; gap: 8px; flex: 1; min-height: 220px; max-height: 340px; margin-top: 16px; }
.ox-bchart__axis { position: relative; width: 34px; flex: none; margin-bottom: var(--label); }
.ox-bchart__axis span { position: absolute; right: 0; transform: translateY(50%); color: var(--ox-muted); font-size: 11px; line-height: 1; white-space: nowrap; }
.ox-bchart__plot { position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.ox-bchart__grid { position: absolute; inset: 0 0 var(--label) 0; display: flex; flex-direction: column-reverse; justify-content: space-between; pointer-events: none; }
.ox-bchart__grid i { display: block; height: 0; border-top: 1px solid var(--ox-border); }
.ox-bchart__col { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 6px; }
.ox-bchart__col:hover { background: rgba(29, 55, 104, .05); }
.ox-bchart__bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.ox-bchart__bars i { display: block; width: min(14px, 38%); border-radius: 3px 3px 0 0; }
.ox-bchart__bars .is-blue { background: var(--ox-blue); }
.ox-bchart__bars .is-green { background: var(--ox-green); }
.ox-bchart__bars .is-red { background: var(--ox-red); }
.ox-swatch--red { background: var(--ox-red); }
.ox-bars__fill.is-red { background: var(--ox-red); }

/* Thống kê theo thời gian */
.ox-period { display: flex; flex-direction: column; gap: 16px; }
.ox-period .ox-section__head { margin-bottom: 0; }
.ox-period__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ox-period__custom { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border-radius: 999px; border: 1px solid var(--ox-border); background: var(--ox-surface); }
.ox-period__custom.is-active { border-color: var(--ox-text); }
.ox-app .ox-period__custom input[type="date"] { width: auto; min-height: 34px; border: 0; padding: 4px 8px; background: transparent; }
.ox-period__custom .ox-btn { min-height: 34px; border-radius: 999px; padding: 4px 14px; }
.ox-kpis--row.ox-kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ox-badge--red a, a.ox-badge--red { color: var(--ox-red) !important; }
.ox-bchart__col > span { height: var(--label); line-height: var(--label); text-align: center; color: var(--ox-muted); font-size: 11px; white-space: nowrap; }

.ox-details { margin-top: 14px; }
.ox-details summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--ox-primary); list-style: none; }
.ox-details summary::-webkit-details-marker { display: none; }
.ox-details summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.ox-details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ox-details[open] > :not(summary) { margin-top: 12px; }

.ox-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ox-bars a { display: grid; grid-template-columns: minmax(110px, 2fr) 3fr 32px; align-items: center; gap: 12px; padding: 6px 0; color: var(--ox-text) !important; }
.ox-bars a:hover .ox-bars__label { color: var(--ox-blue); }
.ox-bars__label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-bars__track { height: 8px; border-radius: 4px; background: var(--ox-gray-soft); overflow: hidden; }
.ox-bars__fill { display: block; height: 100%; border-radius: 4px; background: var(--ox-blue); }
.ox-bars__fill.is-muted { background: var(--ox-slate); }
.ox-bars strong { text-align: right; font-variant-numeric: tabular-nums; }
.ox-bars__row { display: grid; grid-template-columns: minmax(110px, 2fr) 3fr 32px; align-items: center; gap: 12px; padding: 6px 0; }
.ox-bars--wide a, .ox-bars--wide .ox-bars__row { grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 48px; }
.ox-bars__fill.is-green { background: var(--ox-green); }

/* Nhóm khách (phân tích) */
.ox-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ox-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--ox-border); border-radius: 999px;
    background: var(--ox-surface);
    color: var(--ox-text) !important; font-weight: 500;
}
.ox-chip em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ox-muted); background: var(--ox-gray-soft); padding: 1px 8px; border-radius: 999px; }
.ox-chip:hover { border-color: #cfd5e1; }
.ox-chip.is-active { background: var(--ox-text); border-color: var(--ox-text); color: #fff !important; }
.ox-chip.is-active em { background: rgba(255, 255, 255, .18); color: #fff; }
.ox-nowrap { white-space: nowrap; }
.ox-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.ox-table td .ox-badges .ox-badge { margin-top: 0; }
.ox-site-links a { color: var(--ox-muted) !important; }
.ox-site-links a:hover { color: var(--ox-blue) !important; }
.ox-filters--insights, .ox-filters--insights.has-clear { grid-template-columns: minmax(220px, 1fr) 240px; }

/* ---------- Bảng ---------- */
.ox-table-wrap { overflow-x: auto; }
.ox-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ox-table th {
    padding: 12px 16px;
    background: var(--ox-surface-2);
    border-bottom: 1px solid var(--ox-border);
    color: var(--ox-muted);
    font-size: 12px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .03em;
    white-space: nowrap;
}
.ox-table td { padding: 14px 16px; border-bottom: 1px solid var(--ox-border); vertical-align: top; }
.ox-table tbody tr:last-child td { border-bottom: 0; }
.ox-table tbody tr:hover td { background: #fafbfd; }
.ox-table tfoot td { background: var(--ox-surface-2); border-top: 1px solid var(--ox-border); border-bottom: 0; font-weight: 700; }
.ox-table td small { display: block; font-size: 12px; margin-top: 2px; }
.ox-table .ox-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ox-table--compact th, .ox-table--compact td { padding: 8px 10px; }
.ox-table--compact th { text-transform: none; letter-spacing: 0; }
.ox-cell-title { font-weight: 600; color: var(--ox-text) !important; }
.ox-cell-title:hover { color: var(--ox-blue) !important; }
.ox-row-actions { width: 1%; white-space: nowrap; text-align: right; vertical-align: middle !important; }
.ox-table td .ox-badge { margin-top: 4px; }

.ox-table--edit td { padding: 8px; vertical-align: middle; }
.ox-table--edit th { padding: 10px 8px; }
.ox-table--edit input { width: 100%; min-width: 120px; }
.ox-table--edit input[type="date"] { min-width: 140px; }
.ox-table--servers-edit input { min-width: 110px; }
.ox-table--servers-edit td[data-label="Nhà cung cấp"] input { min-width: 180px; }
.ox-table--servers-edit td[data-label="IP / mã server"] input { min-width: 135px; }
.ox-table--servers-edit td[data-label="Link login / email"] input { min-width: 210px; }
.ox-table--servers-edit td[data-label="User"] input { min-width: 140px; }
.ox-table--servers-edit td[data-label="Pass"] input { min-width: 150px; }
.ox-table--servers-edit td[data-label="Giá mua (đ)"] input { min-width: 105px; }

/* Chọn nhiều + thao tác hàng loạt */
.ox-cell-check { width: 1%; padding-right: 0 !important; vertical-align: top; }
.ox-cell-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ox-primary); cursor: pointer; }
.ox-table tbody tr.is-selected td { background: var(--ox-primary-soft); }
.ox-bulk {
    position: sticky; top: 0; z-index: 15;
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 10px 16px;
    background: var(--ox-text); color: #fff;
}
.ox-bulk[hidden] { display: none; }
.ox-bulk__count { margin-right: 4px; }
.ox-bulk__all { padding: 0; border: 0; background: none; color: #9fc0ff; font: 600 13px var(--ox-font); text-decoration: underline; cursor: pointer; }
.ox-bulk__all[hidden] { display: none; }
.ox-app .ox-bulk select { width: auto; min-width: 220px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.ox-app .ox-bulk select[hidden] { display: none; }
.ox-bulk .ox-btn { min-height: 36px; padding: 6px 14px; }
.ox-bulk .ox-btn--primary { background: #fff; border-color: #fff; color: var(--ox-text) !important; }
.ox-bulk .ox-btn--primary:hover { background: var(--ox-gray-soft); }
.ox-bulk .ox-btn--ghost { color: #fff !important; border-color: rgba(255, 255, 255, .3); }
.ox-bulk .ox-btn--ghost:hover { background: rgba(255, 255, 255, .1); }

/* Ô tìm kiếm có gợi ý */
.ox-combo { position: relative; }
.ox-combo__list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
    max-height: 320px; overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--ox-border); border-radius: 12px;
    background: var(--ox-surface);
    box-shadow: 0 12px 32px rgba(20, 30, 55, .14);
}
.ox-combo__list[hidden] { display: none; }
.ox-combo__item { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.4; }
.ox-combo__item strong { font-weight: 600; }
.ox-combo__item small { color: var(--ox-muted); font-size: 12px; }
.ox-combo__item .ox-badge { margin-left: 4px; font-size: 11px; font-style: normal; }
.ox-combo__sites { color: var(--ox-blue) !important; }
.ox-combo__item.is-active, .ox-combo__item:hover { background: var(--ox-primary-soft); }
.ox-combo__empty { padding: 10px; color: var(--ox-muted); font-size: 13px; }

.ox-details--sub { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--ox-border); }
.ox-details--sub summary { font-size: 13px; color: var(--ox-muted); }
.ox-details--sub .ox-hint { margin: 10px 0 12px; }
.ox-person { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--ox-primary-soft); font-size: 13px; }
.ox-person[hidden] { display: none; }
.ox-person__head { display: flex; flex-direction: column; }
.ox-person__head small { color: var(--ox-muted); }
.ox-person__sites span { color: var(--ox-muted); }
.ox-person dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.ox-person dt { color: var(--ox-muted); }
.ox-person dd { margin: 0; font-weight: 500; word-break: break-word; }

/* Ô nhập có nút copy / mở / hiện mật khẩu bên trong */
.ox-input-tools { position: relative; display: block; }
.ox-app .ox-input-tools input[type] { padding-right: 38px; }
.ox-app .ox-input-tools--2 input[type] { padding-right: 70px; }
.ox-tool {
    position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
    display: grid; place-items: center;
    width: 30px; height: 30px; padding: 0;
    border: 0; border-radius: 7px;
    background: transparent; color: var(--ox-slate) !important;
    cursor: pointer;
}
.ox-tool[hidden] { display: none; }
.ox-tool:hover { background: var(--ox-gray-soft); color: var(--ox-primary) !important; }
.ox-tool[data-reveal] { right: 36px; }
.ox-tool.is-on { color: var(--ox-primary) !important; }
.ox-table--edit .ox-cell-state { white-space: nowrap; }

/* Gán server hàng loạt */
.ox-assign { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
.ox-assign__side { display: flex; flex-direction: column; gap: 14px; }
.ox-assign__side .ox-hint { margin: 0; }
.ox-assign__domains textarea { min-height: 240px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.ox-field__label small { font-weight: 400; }

.ox-result { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--ox-surface-2); }
.ox-result__summary { margin-bottom: 12px !important; }
.ox-result__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ox-result__box { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--ox-surface); border-left: 3px solid var(--ox-slate); }
.ox-result__box small { color: var(--ox-muted); font-size: 12px; }
.ox-result__box--green { border-left-color: var(--ox-green); }
.ox-result__box--amber { border-left-color: #e39a2b; }
.ox-result__box--red { border-left-color: var(--ox-red); }
.ox-clean-list { max-height: 260px !important; margin: 8px 0 16px !important; columns: 2 360px; }
.ox-result__list { margin: 6px 0 0; padding: 0 0 0 18px; max-height: 220px; overflow: auto; font-size: 13px; line-height: 1.7; }

.ox-badge {
    display: inline-flex; align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ox-gray-soft); color: #4b5466;
    font-size: 12px; font-weight: 600; line-height: 1.6;
    white-space: nowrap;
}
.ox-badge--red { background: var(--ox-red-soft); color: var(--ox-red); }
.ox-badge--amber { background: var(--ox-amber-soft); color: var(--ox-amber); }
.ox-badge--green { background: var(--ox-green-soft); color: var(--ox-green); }
.ox-badge--slate { background: var(--ox-gray-soft); color: var(--ox-gray); }
.ox-badge--blue { background: var(--ox-primary-soft); color: var(--ox-primary) !important; }
a.ox-badge--blue:hover { background: #d9e2f3; }
.ox-badge--lg { padding: 6px 14px; font-size: 14px; }

.ox-pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--ox-border); }
.ox-pagination .ox-muted { margin-right: auto; }
.ox-page { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; color: var(--ox-text) !important; font-weight: 500; }
.ox-page:hover { background: var(--ox-surface-2); }
.ox-page.is-active { background: var(--ox-primary); color: #fff !important; }

/* ---------- Bộ lọc ---------- */
.ox-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(0, 190px));
    align-items: center;
    gap: 8px;
    padding: 10px;
}
.ox-filters.has-clear { grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(0, 190px)) auto; }
.ox-filters__search { min-width: 0; }
.ox-app .ox-filters select { min-width: 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.ox-app .ox-filters input[type="search"], .ox-app .ox-filters select { min-height: 40px; background-color: var(--ox-surface-2); border-color: transparent; }
.ox-app .ox-filters input[type="search"]:focus, .ox-app .ox-filters select:focus { background-color: var(--ox-surface); border-color: var(--ox-blue); }
.ox-filters__clear {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; padding: 0 12px;
    border-radius: var(--ox-radius-sm);
    color: var(--ox-red) !important;
    font-weight: 600; white-space: nowrap;
}
.ox-filters__clear:hover { background: var(--ox-red-soft); }

/* ---------- Form ---------- */
.ox-app [hidden] { display: none !important; }
.ox-app input[type="text"], .ox-app input[type="email"], .ox-app input[type="tel"], .ox-app input[type="password"], .ox-app input[type="url"],
.ox-app input[type="search"], .ox-app input[type="date"], .ox-app input[type="number"], .ox-app select, .ox-app textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #d7dce5;
    border-radius: var(--ox-radius-sm);
    background: var(--ox-surface);
    color: var(--ox-text);
    font: 400 14px/1.4 var(--ox-font);
    transition: border-color .15s, box-shadow .15s;
}
.ox-app select { padding-right: 32px; appearance: none; background: var(--ox-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7486' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.ox-app textarea { min-height: 96px; resize: vertical; }
.ox-app input:focus, .ox-app select:focus, .ox-app textarea:focus { outline: none; border-color: var(--ox-blue); box-shadow: 0 0 0 3px rgba(45, 107, 220, .15); }
.ox-app input[type="file"] { font: inherit; max-width: 100%; }
.ox-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important; font-size: 12px !important; }

.ox-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ox-field__label { font-size: 13px; font-weight: 600; color: #3a4356; }
.ox-field__label em { color: var(--ox-red); font-style: normal; }
.ox-field small, .ox-hint { color: var(--ox-muted); font-size: 12px; line-height: 1.5; }
.ox-field--full { grid-column: 1 / -1; }
.ox-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.ox-card > .ox-field + .ox-field, .ox-card > .ox-details + .ox-subtitle { margin-top: 16px; }
.ox-app .ox-auth__form h1 { margin: 0; }
.ox-subtitle { margin: 24px 0 12px; font-size: 15px !important; }
.ox-subtitle small { font-weight: 400; color: var(--ox-muted); font-size: 12px; }
.ox-hint { margin-top: 12px; }
.ox-fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.ox-fieldset legend { margin-bottom: 8px; padding: 0; }

.ox-input-icon { position: relative; display: flex; align-items: center; }
.ox-input-icon > .ox-icon { position: absolute; left: 12px; color: var(--ox-slate); pointer-events: none; }
.ox-input-icon input { padding-left: 40px !important; }
.ox-input-icon__toggle { position: absolute; right: 4px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: none; color: var(--ox-slate); cursor: pointer; border-radius: 8px; }
.ox-input-icon__toggle:hover { color: var(--ox-text); }
.ox-input-icon:has(.ox-input-icon__toggle) input { padding-right: 44px !important; }

.ox-input-suffix { position: relative; display: flex; align-items: center; }
.ox-input-suffix input { padding-right: 32px !important; text-align: right; font-variant-numeric: tabular-nums; }
.ox-input-suffix em { position: absolute; right: 12px; font-style: normal; color: var(--ox-muted); pointer-events: none; }

.ox-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.ox-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ox-primary); }

.ox-segment { display: flex; gap: 6px; flex-wrap: wrap; }
.ox-segment label { flex: 1; min-width: 80px; }
.ox-segment input { position: absolute; opacity: 0; pointer-events: none; }
.ox-segment span { display: grid; place-items: center; min-height: 40px; padding: 6px 10px; border: 1px solid #d7dce5; border-radius: var(--ox-radius-sm); font-weight: 500; cursor: pointer; white-space: nowrap; transition: all .15s; }
.ox-segment span:hover { border-color: #b9c1d0; }
.ox-segment input:checked + span { border-color: var(--ox-primary); background: var(--ox-primary-soft); color: var(--ox-primary); font-weight: 600; }
.ox-segment input:focus-visible + span { outline: 2px solid var(--ox-blue); outline-offset: 2px; }

.ox-option { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--ox-border); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.ox-option input { margin-top: 3px; accent-color: var(--ox-primary); }
.ox-option span { display: flex; flex-direction: column; gap: 2px; }
.ox-option small { color: var(--ox-muted); font-size: 12px; }
.ox-option:has(input:checked) { border-color: var(--ox-primary); background: var(--ox-primary-soft); }

.ox-total { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--ox-surface-2); }
.ox-total__row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.ox-total__row span { color: var(--ox-muted); }
.ox-total__row--main { padding-top: 8px; border-top: 1px dashed #d3d8e2; font-size: 16px; }
.ox-total__row--main span { color: var(--ox-text); font-weight: 600; }
.ox-total__row--main strong { color: var(--ox-red); font-size: 18px; }
.ox-total small { font-size: 12px; }
.ox-total [data-total-words] { font-style: italic; }

/* Form gọn: 3-4 cột, tổng tiền và checkbox nằm ngang */
.ox-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ox-form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ox-form-grid--3, .ox-form-grid--4 { gap: 14px 16px; }
.ox-field--half { grid-column: span 2; }
.ox-form-grid--4 .ox-segment { flex-wrap: nowrap; gap: 4px; }
.ox-form-grid--4 .ox-segment label { min-width: 0; }
.ox-form-grid--4 .ox-segment span { padding: 6px 4px; font-size: 13px; }
.ox-total--inline { grid-column: span 2; display: grid; grid-template-columns: repeat(3, auto); gap: 2px 18px; align-content: center; padding: 8px 14px; }
.ox-total--inline .ox-total__row { flex-direction: column; gap: 0; justify-content: flex-start; padding: 0; border: 0; font-size: 14px; }
.ox-total--inline .ox-total__row span { font-size: 12px; }
.ox-total--inline .ox-total__row--main strong { font-size: 16px; }
.ox-total--inline small { grid-column: 1 / -1; }
.ox-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ox-checks label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.ox-checks input { width: 16px; height: 16px; margin: 0; accent-color: var(--ox-primary); }
.ox-profit { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; padding: 8px 14px; border-radius: 12px; background: var(--ox-surface-2); align-self: end; min-height: 42px; }
.ox-profit span { display: flex; flex-direction: column; font-size: 12px; color: var(--ox-muted); }
.ox-profit b { font-size: 15px; color: var(--ox-text); font-variant-numeric: tabular-nums; }
.ox-profit b.ox-text-green { color: var(--ox-green); }
.ox-profit b.ox-text-red { color: var(--ox-red); }
/* Kết nối website khách */
.ox-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.ox-connect__status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 12px; }
.ox-connect__lock { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: var(--ox-surface-2); font-size: 13px; }
.ox-connect__lock strong { display: inline-flex; align-items: center; gap: 6px; }
.ox-connect__lock small { color: var(--ox-muted); }
.ox-connect__lock--on { background: var(--ox-red-soft, #fdeeee); color: var(--ox-red); }
.ox-connect__form { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; margin: 12px 0; }
.ox-connect__form .ox-check { grid-column: 1 / -1; font-size: 13px; }
.ox-connect__form--staff { grid-template-columns: minmax(0, 1fr) auto; }
.ox-table--connect { table-layout: fixed; min-width: 1080px; }
.ox-table--connect td { overflow: hidden; }
.ox-connect__token .ox-input-tools { display: flex; max-width: 100%; }
.ox-connect__token input { width: 100% !important; min-width: 0; font-family: ui-monospace, Consolas, monospace !important; font-size: 12px !important; min-height: 34px !important; padding-right: 38px !important; text-overflow: ellipsis; }
.ox-connect__row-actions > div { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.ox-connect__row-actions form { display: contents; }
.ox-connect__row-actions .ox-btn { margin-right: 4px; }
.ox-connect__row-actions .ox-tool { position: static; transform: none; border: 1px solid var(--ox-line, #e5e7eb); width: 32px; height: 32px; }
.ox-connect__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ox-connect__actions form { display: contents; }

/* Hỗ trợ khách hàng: chat */
.ox-chat { padding: 0; }
.ox-chat__thread { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; padding: 18px 20px; }
.ox-msg { align-self: flex-start; max-width: min(78%, 640px); padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--ox-surface-2); }
.ox-msg--mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--ox-primary-soft); }
.ox-msg--system { align-self: center; max-width: none; padding: 2px 10px; background: none; font-size: 12px; color: var(--ox-muted); }
.ox-msg__meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ox-muted); margin-bottom: 4px; }
.ox-msg__del { margin-left: auto; }
.ox-msg__del button { border: 0; background: none; color: var(--ox-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.ox-msg__del button:hover { color: var(--ox-red); }
.ox-msg__body { overflow-wrap: anywhere; line-height: 1.55; }
.ox-msg__body > :first-child { margin-top: 0; }
.ox-msg__body > :last-child { margin-bottom: 0; }
.ox-msg__body img { max-width: 100%; height: auto; border-radius: 8px; }
.ox-msg__files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ox-msg__files img { display: block; width: 140px; height: 105px; object-fit: cover; border-radius: 8px; }
.ox-msg__files video { width: 280px; max-width: 100%; border-radius: 8px; background: #000; }
.ox-msg__file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--ox-border); font-size: 13px; }
.ox-table tr.is-unread td { background: #f5f8ff; }
.ox-meta-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ox-meta-list li { display: flex; justify-content: space-between; gap: 10px; }
.ox-meta-list span { color: var(--ox-muted); }
.ox-meta-list strong { text-align: right; overflow-wrap: anywhere; }
.ox-notice-item { align-items: center; }
.ox-notice-item .ox-list__main small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.5; }

/* Quản trị website khách (popup) */
.ox-connect__manage { margin: 4px 0 10px; }

/* Duyệt hồ sơ */
.ox-diff__old { color: var(--ox-muted); text-decoration: line-through; }
.ox-diff__new strong { color: var(--ox-green); }
.ox-review { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.ox-review input { flex: 1; min-width: 220px; max-width: 420px; }
details.ox-card > summary { cursor: pointer; list-style: none; margin: 0; }
details.ox-card[open] > summary { margin-bottom: 12px; }

/* Doanh thu dự án */
.ox-card__head--pad { padding: 18px 20px 12px; margin: 0; }
.ox-block { display: block; }
.ox-table .ox-small { font-size: 12px; line-height: 1.5; min-width: 220px; }
.ox-steps-mini { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ox-muted); line-height: 1.5; }
.ox-steps-mini a { font-weight: 600; }
.ox-bars--money .ox-bars__row { grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 64px; }
@media (max-width: 1280px) {
    .ox-form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .ox-form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .ox-field--half, .ox-total--inline { grid-column: 1 / -1; }
}
/* Popup Thêm website */
.ox-modal { width: min(640px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--ox-radius); background: var(--ox-surface); color: var(--ox-text); box-shadow: 0 24px 64px rgba(15, 22, 36, .3); }
.ox-modal::backdrop { background: rgba(15, 22, 36, .45); }
.ox-modal__form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.ox-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--ox-border); }
.ox-app .ox-modal__head h2 { font-size: 19px; }
.ox-modal__body { padding: 18px 22px; overflow-y: auto; }
.ox-modal__body .ox-form-grid { gap: 14px 16px; }
.ox-modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--ox-border); background: var(--ox-surface-2); border-radius: 0 0 var(--ox-radius) var(--ox-radius); }
.ox-modal__more { margin-right: auto; font-size: 13px; font-weight: 600; }
.ox-modal .ox-total { padding: 10px 14px; }
.ox-detail--single { grid-template-columns: minmax(0, 900px); }

/* Kênh thông báo tự động */
.ox-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.ox-channel { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--ox-border); border-radius: 12px; }
.ox-channel .ox-hint { margin: 0; }
.ox-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.ox-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ox-switch__track { position: relative; width: 42px; height: 24px; flex: none; border-radius: 12px; background: #cfd5e1; transition: background .15s; }
.ox-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.ox-switch input:checked + .ox-switch__track { background: var(--ox-green); }
.ox-switch input:checked + .ox-switch__track::after { transform: translateX(18px); }
.ox-switch input:focus-visible + .ox-switch__track { outline: 2px solid var(--ox-blue); outline-offset: 2px; }
.ox-switch.is-disabled { opacity: .5; cursor: not-allowed; }
.ox-channel__name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* Zalo ZNS */
.ox-form-actions.ox-form-actions--start { justify-content: flex-start; flex-wrap: wrap; margin-top: 14px; }
.ox-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; font-size: 14px; }
.ox-dl dt { color: var(--ox-muted); }
.ox-dl dd { margin: 0; font-weight: 500; }
.ox-inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ox-inline-form .ox-field { flex: 1 1 260px; }
.ox-template-name { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px !important; }
.ox-map { display: flex; gap: 8px; }
.ox-app .ox-map select { flex: 0 0 240px; }
.ox-app .ox-map input[hidden] { display: none; }
.ox-table--map td { vertical-align: middle; }
.ox-list--log .ox-dot { flex: none; margin-top: 2px; }
.ox-form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ox-form-actions--sticky { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--ox-bg) 30%); }

.ox-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ox-detail > aside { position: sticky; top: 24px; }
.ox-danger { padding: 0 4px; }

.ox-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--ox-border); display: flex; flex-direction: column; gap: 12px; }
.ox-timeline li { position: relative; display: flex; flex-direction: column; font-size: 13px; }
.ox-timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ox-surface); border: 2px solid var(--ox-slate); }
.ox-timeline small { color: var(--ox-muted); font-size: 12px; }

/* Trình soạn thảo mail (wp_editor) */
.ox-mail-block { display: flex; flex-direction: column; gap: 14px; }
.ox-mail-block + .ox-mail-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--ox-border); }
.ox-app .ox-mail-block .ox-subtitle { margin: 0; }
.ox-vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ox-vars__label { color: var(--ox-muted); font-size: 12px; margin-right: 2px; }
.ox-var {
    padding: 4px 10px;
    border: 1px dashed #c3cad8;
    border-radius: 999px;
    background: var(--ox-surface-2);
    color: var(--ox-primary);
    font: 500 12px/1.4 var(--ox-font);
    cursor: pointer;
}
.ox-var:hover { border-style: solid; border-color: var(--ox-primary); background: var(--ox-primary-soft); }
.ox-editor .wp-editor-wrap { border-radius: var(--ox-radius-sm); }
.ox-editor .wp-editor-container { border: 1px solid #d7dce5; border-radius: 0 0 var(--ox-radius-sm) var(--ox-radius-sm); overflow: hidden; }
.ox-app .ox-editor textarea.wp-editor-area { border: 0; border-radius: 0; min-height: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; line-height: 1.6; box-shadow: none; }
.ox-editor .wp-editor-tabs { float: right; }
.ox-editor .wp-switch-editor { font-family: var(--ox-font); }
.ox-editor .wp-media-buttons .button { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border: 1px solid #d7dce5; border-radius: 8px; background: var(--ox-surface); font: 500 13px var(--ox-font); cursor: pointer; }
.ox-editor .quicktags-toolbar input.button { min-height: 0; padding: 2px 8px; border: 1px solid #d7dce5; border-radius: 6px; background: var(--ox-surface); font: 12px var(--ox-font); cursor: pointer; }

/* ---------- Thông báo ---------- */
.ox-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--ox-green-soft); color: #0f6b4b;
    font-weight: 500;
}
.ox-alert > span { flex: 1; }
.ox-alert .ox-icon { margin-top: 1px; }
.ox-alert--error { background: var(--ox-red-soft); color: #9f1d24; }
.ox-alert--warning { background: var(--ox-amber-soft); color: #8a5009; }
.ox-alert__close { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; opacity: .7; }
.ox-alert__close:hover { opacity: 1; }

.ox-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 100;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--ox-text); color: #fff;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    opacity: 0; pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .2s, transform .2s;
}
.ox-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ox-toast.is-error { background: var(--ox-red); }

.ox-empty-page { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 24px; text-align: center; }
.ox-empty-page h1, .ox-empty-page h2 { font-size: 20px; }
.ox-empty-page p { color: var(--ox-muted); max-width: 420px; }
.ox-empty-page .ox-btn { margin-top: 8px; }
.ox-empty-page__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--ox-gray-soft); color: var(--ox-gray); }

/* ---------- Đăng nhập ---------- */
.ox-auth__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.ox-auth__brand {
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px;
    background: var(--ox-primary) radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .08), transparent 45%);
    color: #dfe6f3;
}
.ox-brand--light, .ox-brand--light .ox-brand__text small { color: #fff !important; }
.ox-brand--light .ox-brand__text small { opacity: .7; }
.ox-brand--light .ox-brand__mark { background: #fff; color: var(--ox-primary); }
.ox-auth__pitch { max-width: 440px; }
.ox-auth__pitch h2 { color: #fff; font-size: 28px !important; line-height: 1.3 !important; margin-bottom: 28px !important; }
.ox-auth__pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ox-auth__pitch li { display: flex; gap: 12px; align-items: flex-start; }
.ox-auth__pitch li .ox-icon { margin-top: 2px; color: #9fb4dc; }
.ox-auth__brand > small { opacity: .6; }

.ox-auth__panel { display: grid; place-items: center; padding: 32px 20px; background: var(--ox-surface); }
.ox-auth__form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.ox-auth__form h1 { font-size: 26px; }
.ox-auth__form > .ox-muted { margin-top: -10px; }
.ox-auth__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ox-auth__row a { font-weight: 600; }
.ox-auth__foot { text-align: center; font-size: 13px; margin-top: 8px !important; }
.ox-auth__mobile-brand { display: none !important; }
.ox-auth .ox-input-icon input { min-height: 46px; }

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
    .ox-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ox-grid-3 > .ox-card--servers { grid-column: 1 / -1; }
}

@media (max-width: 1280px) {
    .ox-states { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ox-filters, .ox-filters.has-clear { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ox-filters__search { grid-column: 1 / -1; }
    .ox-filters.has-clear .ox-filters__search { grid-column: 1 / 4; }
    .ox-filters.has-clear .ox-filters__clear { grid-column: 4; grid-row: 1; justify-self: end; }
    .ox-filters.ox-filters--insights { grid-template-columns: minmax(0, 1fr) 220px; }
    .ox-filters--insights .ox-filters__search { grid-column: auto; }
    .ox-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .ox-detail { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1024px) {
    .ox-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 0 0 40px rgba(0, 0, 0, .15);
    }
    .ox-sidebar__close { display: inline-grid; }
    .ox-sidebar__head .ox-bell { margin-left: auto; }
    body.nav-open .ox-sidebar { transform: none; }
    body.nav-open .ox-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15, 22, 36, .4); }
    body.nav-open { overflow: hidden; }

    .ox-topbar {
        position: sticky; top: 0; z-index: 20;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 10px 12px;
        background: var(--ox-surface);
        border-bottom: 1px solid var(--ox-border);
    }
    .ox-content { padding: 20px 16px 40px; gap: 20px; }
    .ox-detail { grid-template-columns: minmax(0, 1fr); }
    .ox-detail > aside { position: static; }
    .ox-kpis--row, .ox-kpis--row.ox-kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ox-card { padding: 18px 16px; }
    .ox-card--flush { padding: 0; }
    .ox-hero { padding: 20px 16px; }
    .ox-hero__title h1, .ox-page-head h1 { font-size: 22px; }
    .ox-kpis { width: 100%; }
    .ox-kpi { min-width: 0; flex: 1 1 100%; }
    .ox-states { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ox-state { padding: 14px; }
    .ox-state strong { font-size: 22px; }
    .ox-form-grid, .ox-grid-2--even, .ox-grid-3, .ox-assign, .ox-channels { grid-template-columns: minmax(0, 1fr); }
    .ox-modal .ox-form-grid { grid-template-columns: minmax(0, 1fr); }
    .ox-modal__more { display: none; }
    .ox-assign__domains { order: -1; }
    .ox-filters, .ox-filters.has-clear { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ox-filters.has-clear .ox-filters__search { grid-column: 1 / -1; }
    .ox-filters.has-clear .ox-filters__clear { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; }
    .ox-filters.ox-filters--insights { grid-template-columns: minmax(0, 1fr); }
    .ox-page-head > .ox-btn { width: 100%; }

    /* Bảng chuyển thành thẻ */
    .ox-table--customers thead, .ox-table--servers thead, .ox-table--edit thead { display: none; }
    .ox-table--customers tr, .ox-table--servers tr, .ox-table--edit tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; padding: 14px 16px; border-bottom: 1px solid var(--ox-border); }
    .ox-table--customers td, .ox-table--servers td, .ox-table--edit td { display: block; padding: 0; border: 0; background: none !important; text-align: left; }
    .ox-table--customers td::before, .ox-table--servers td::before, .ox-table--edit td::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--ox-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
    .ox-table--customers td:first-child, .ox-table--servers td:first-child { grid-column: 1 / -1; }
    .ox-table--customers td:first-child::before, .ox-table--servers td:first-child::before { display: none; }
    .ox-table--selectable tr { position: relative; }
    .ox-table--selectable td.ox-cell-check { position: absolute; top: 14px; right: 16px; width: auto; grid-column: auto; }
    .ox-table--selectable td[data-label="Website"] { grid-column: 1 / -1; padding-right: 32px; }
    .ox-table--selectable td[data-label="Website"]::before { display: none; }
    .ox-table--customers td.ox-row-actions, .ox-table--edit td.ox-row-actions { grid-column: 1 / -1; width: auto; text-align: right; border-top: 1px dashed var(--ox-border); padding-top: 6px; }
    .ox-table .ox-num { text-align: left; }
    .ox-table--servers tfoot tr { background: var(--ox-surface-2); }
    .ox-table--servers tfoot td:first-child { grid-column: 1 / -1; }
    .ox-table--edit tr { padding: 12px 0; }
    .ox-table--edit tbody tr:first-child { padding-top: 0; }

    .ox-bars a { grid-template-columns: minmax(0, 1fr) 80px 28px; }

    .ox-auth__wrap { grid-template-columns: minmax(0, 1fr); }
    .ox-auth__brand { display: none; }
    .ox-auth__mobile-brand { display: inline-flex !important; margin-bottom: 12px; }
    .ox-auth__panel { align-items: start; padding-top: 48px; }

    .ox-lookup__card { padding: 22px 16px; }
    .ox-lookup__form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

/* ---------- Menu con kiểu WordPress ---------- */
.ox-nav__sub { display: flex; flex-direction: column; margin: 2px 0 6px 30px; padding-left: 12px; border-left: 1px solid var(--ox-border); }
.ox-nav__sub a { padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ox-muted) !important; }
.ox-nav__sub a:hover { color: var(--ox-text) !important; background: var(--ox-surface-2); }
.ox-nav__sub a.is-active { color: var(--ox-primary) !important; font-weight: 600; }
.ox-text-blue { color: var(--ox-blue) !important; }

/* ---------- Danh sách bài viết / thông báo ---------- */
.ox-subsubsub { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 14px 0 12px; font-size: 13.5px; }
.ox-subsubsub a { color: var(--ox-muted) !important; font-weight: 500; }
.ox-subsubsub a span { color: var(--ox-slate); font-weight: 400; }
.ox-subsubsub a.is-active { color: var(--ox-text) !important; font-weight: 600; }
.ox-subsubsub a + a::before { content: "|"; margin-right: 14px; color: var(--ox-border); }
.ox-filters--content { grid-template-columns: minmax(220px, 1fr) 220px 200px; }
.ox-table--posts td { vertical-align: top; }
.ox-post-cell { display: flex; gap: 12px; align-items: flex-start; }
.ox-post-cell__thumb { flex: none; display: grid; place-items: center; width: 64px; height: 42px; border-radius: 8px; background: var(--ox-surface-2) center / cover no-repeat; border: 1px solid var(--ox-border); color: var(--ox-slate); }
div.ox-row-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12.5px; opacity: 0; transition: opacity .12s; }
div.ox-row-actions form { display: contents; }
tr:hover div.ox-row-actions, div.ox-row-actions:focus-within { opacity: 1; }
.ox-link-danger { padding: 0; border: 0; background: none; color: var(--ox-red) !important; font: inherit; font-size: 13px; cursor: pointer; }
.ox-link-danger:hover { text-decoration: underline; }
.ox-row-tools { white-space: nowrap; }
.ox-row-tools form { display: inline; }
.ox-row-tools .ox-tool { position: static; transform: none; display: inline-grid; vertical-align: middle; }
.ox-table tr.is-selected td { background: var(--ox-primary-soft); }
.ox-table tr.is-danger td:first-child { position: relative; }
/* Vạch đỏ dòng đang khoá: ngắn, tách riêng từng dòng (các dòng khoá liền nhau không dính thành 1 khối) */
.ox-table tr.is-danger td:first-child::after { content: ""; position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--ox-red); }
.ox-table tbody tr.is-danger > td { background: #fff8f7; }
.ox-table tbody tr.is-danger + tr.is-danger > td { border-top: 1px solid #f6dcd8; }

/* ---------- Trang soạn bài ---------- */
.ox-app .ox-title-input { width: 100%; min-height: 56px !important; padding: 10px 18px !important; border: 1px solid var(--ox-border); border-radius: var(--ox-radius-sm); background: var(--ox-surface); font-size: 21px !important; font-weight: 600; color: var(--ox-text); }
.ox-app .ox-title-input:focus { outline: 0; border-color: var(--ox-primary); box-shadow: 0 0 0 3px var(--ox-primary-soft); }
.ox-radios { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--ox-border); border-radius: var(--ox-radius-sm); }
.ox-radios label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.ox-radios input { margin: 0; accent-color: var(--ox-primary); }
.ox-small-link { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--ox-blue) !important; cursor: pointer; }
.ox-form-actions--split { justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--ox-border); }
.ox-thumb-pick { display: flex; flex-direction: column; gap: 8px; }
.ox-thumb-pick__img { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border: 1px dashed #c6ccd8; border-radius: var(--ox-radius-sm); background: var(--ox-surface-2) center / cover no-repeat; color: var(--ox-muted); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.ox-thumb-pick__img span { display: inline-flex; align-items: center; gap: 6px; }
.ox-thumb-pick__img:hover { border-color: var(--ox-primary); }
.ox-site-picks { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--ox-border); border-radius: var(--ox-radius-sm); }
.ox-site-picks label { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; cursor: pointer; }
.ox-site-picks input { margin-top: 3px; accent-color: var(--ox-primary); }
.ox-site-picks small { color: var(--ox-muted); }
.ox-detail aside .ox-app select, .ox-detail aside select { width: 100%; }

/* ---------- Danh mục ---------- */
.ox-detail .ox-form-grid { align-items: end; }
.ox-terms { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }

/* ---------- Khoá website ---------- */
.ox-lock-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ox-app .ox-lock-form select { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; font-size: 13px; }
.ox-inline-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ox-muted); }
.ox-kpi.is-active { box-shadow: 0 0 0 2px var(--ox-primary); }

/* ---------- Tài khoản ---------- */
.ox-avatar--sm { width: 34px; height: 34px; font-size: 12px; }
.ox-role-picks { display: flex; flex-direction: column; gap: 6px; }
.ox-role-picks label { position: relative; cursor: pointer; }
.ox-role-picks input { position: absolute; opacity: 0; }
.ox-role-picks span { display: flex; flex-direction: column; padding: 9px 12px 9px 36px; border: 1px solid var(--ox-border); border-radius: var(--ox-radius-sm); position: relative; }
.ox-role-picks span::before { content: ""; position: absolute; left: 12px; top: 12px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #c6ccd8; }
.ox-role-picks strong { font-size: 13.5px; }
.ox-role-picks small { color: var(--ox-muted); font-size: 12px; }
.ox-role-picks input:checked + span { border-color: var(--ox-primary); background: var(--ox-primary-soft); }
.ox-role-picks input:checked + span::before { border: 4px solid var(--ox-primary); }
.ox-role-picks input:focus-visible + span { outline: 2px solid var(--ox-blue); outline-offset: 2px; }

@media (max-width: 1100px) {
    .ox-terms { grid-template-columns: minmax(0, 1fr); }
    .ox-filters--content { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ox-filters--content .ox-filters__search { grid-column: 1 / -1; }
    div.ox-row-actions { opacity: 1; }
}

/* ---------- Menu nhóm (mục cha + mục con) ---------- */
.ox-nav__item.has-kids .ox-nav__caret { display: inline-flex; margin-left: 4px; color: var(--ox-slate); transition: transform .15s; font-style: normal; }
.ox-nav__item.has-kids.is-open .ox-nav__caret { transform: rotate(90deg); }
.ox-nav__item.has-kids.is-active { background: transparent; font-weight: 600; }
.ox-nav__item.has-kids.is-active > .ox-icon:first-child { color: var(--ox-primary); }
.ox-nav__sub a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ox-nav__sub a.is-active { background: var(--ox-gray-soft); }
.ox-nav__sub .ox-nav__badge { margin-left: auto; }

/* ==========================================================================
   GIAO DIỆN 2.0 – đồng bộ với OXO Hỗ Trợ bên khách
   Màu chính cam OXO, nền ấm + trống đồng chìm, thẻ trắng bo lớn, icon tròn pastel
   ========================================================================== */
:root {
    --ox-bg: #f7f5f2;
    --ox-surface: #ffffff;
    --ox-surface-2: #faf8f6;
    --ox-border: #efe9e4;
    --ox-text: #17202e;
    --ox-muted: #6b7686;
    --ox-primary: #e8401c;
    --ox-primary-hover: #c93412;
    --ox-primary-soft: #fff1ea;
    --ox-brand-2: #ff7a2e;
    --ox-blue: #2563eb;
    --ox-green: #12915f;
    --ox-red: #d1291c;
    --ox-amber: #c2700c;
    --ox-gray: #6b7686;
    --ox-slate: #9aa3b2;
    --ox-red-soft: #fff0ee;
    --ox-amber-soft: #fff6e5;
    --ox-green-soft: #e9f8f1;
    --ox-blue-soft: #eef4ff;
    --ox-gray-soft: #f3efeb;
    --ox-radius: 18px;
    --ox-radius-sm: 11px;
    --ox-shadow: 0 1px 2px rgba(23, 32, 46, .04), 0 8px 22px -14px rgba(23, 32, 46, .16);
    --ox-grad: linear-gradient(135deg, #ff7a2e, #e8401c);
}

/* Nền ấm + trống đồng chìm ở đầu vùng nội dung */
body.ox-app { background: var(--ox-bg); }
.ox-main { position: relative; isolation: isolate; }
.ox-main::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -620px; width: 1500px; height: 1500px; transform: translateX(-50%); border-radius: 50%; pointer-events: none;
    background:
        repeating-conic-gradient(from 3deg at 50% 50%, rgba(232, 64, 28, .06) 0deg 2.5deg, transparent 2.5deg 9deg),
        repeating-radial-gradient(circle at 50% 50%, transparent 0 28px, rgba(232, 64, 28, .045) 28px 30px);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 22%, #000 23%, #000 52%, transparent 66%); mask-image: radial-gradient(circle at 50% 50%, transparent 22%, #000 23%, #000 52%, transparent 66%); }
.ox-main::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 520px; width: 900px; height: 407px; transform: translateX(-50%); background: url('../portal/oxo-mark.png') center / contain no-repeat; opacity: .025; pointer-events: none; }
.ox-content { padding: 26px 32px 48px; }

.ox-app a { color: var(--ox-primary-hover); }
.ox-app a:hover { color: var(--ox-primary); }
.ox-app :focus-visible { outline-color: var(--ox-primary); }

/* Menu trái */
.ox-sidebar { background: #fff; border-right: 1px solid var(--ox-border); box-shadow: 4px 0 24px -20px rgba(23, 32, 46, .25); }
.ox-sidebar > .ox-btn--primary { min-height: 46px; border-radius: 14px; }
.ox-nav__item { color: #4a5363 !important; border-radius: 12px; transition: background .15s, color .15s; }
.ox-nav__item .ox-icon { color: #8a93a3; transition: color .15s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.ox-nav__item:hover { background: var(--ox-surface-2); color: var(--ox-text) !important; }
.ox-nav__item:hover > .ox-icon:first-child { transform: scale(1.1); color: var(--ox-primary); }
.ox-nav__item.is-active { position: relative; background: var(--ox-primary-soft); color: var(--ox-primary-hover) !important; font-weight: 600; }
.ox-nav__item.is-active > .ox-icon:first-child { color: var(--ox-primary); }
.ox-nav__item.is-active:not(.has-kids)::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ox-grad); }
.ox-nav__item.has-kids.is-active { background: transparent; color: var(--ox-text) !important; }
.ox-nav__sub { border-left-color: #f1d9cd; }
.ox-nav__sub a.is-active { background: var(--ox-primary-soft); color: var(--ox-primary-hover) !important; }
.ox-nav__badge { background: var(--ox-red); box-shadow: 0 0 0 2px #fff; }
.ox-bell em { background: var(--ox-red); }
.ox-user { border-top-color: var(--ox-border); }
.ox-avatar { background: var(--ox-grad); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #ffd9c4; }

/* Đầu trang */
.ox-page-head h1 { font-size: 26px; letter-spacing: -.02em; }
.ox-page-head .ox-muted { font-size: 13.5px; }
.ox-back { color: var(--ox-slate) !important; }
.ox-back:hover { color: var(--ox-primary) !important; }

/* Nút */
.ox-btn { border-radius: 11px; transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s; }
.ox-btn:hover { background: var(--ox-surface-2); border-color: #e4dcd5; }
.ox-btn--primary { position: relative; overflow: hidden; background: var(--ox-grad); border-color: transparent; box-shadow: 0 8px 18px -10px rgba(232, 64, 28, .75); }
.ox-btn--primary:hover { background: var(--ox-grad); border-color: transparent; transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(232, 64, 28, .85); }
.ox-btn--primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent); transform: skewX(-20deg); transition: left .6s; pointer-events: none; }
.ox-btn--primary:hover::after { left: 130%; }
.ox-btn:active { transform: scale(.98); }
.ox-icon-btn:hover { background: var(--ox-primary-soft); color: var(--ox-primary) !important; }

/* Thẻ + ô số liệu */
.ox-card { border-color: var(--ox-border); box-shadow: var(--ox-shadow); }
.ox-card__title .ox-icon { color: var(--ox-primary); }
.ox-card__head a { color: var(--ox-primary) !important; }
.ox-kpis--row .ox-kpi { border-radius: 18px; transition: transform .2s, box-shadow .2s; }
.ox-kpi--link:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 14px 26px -16px rgba(23, 32, 46, .3); }
.ox-kpi__label { font-weight: 500; }
.ox-kpi__value { font-size: 24px; }
.ox-count { background: var(--ox-primary-soft); color: var(--ox-primary-hover); }

/* Bảng */
.ox-table th { background: var(--ox-surface-2); color: var(--ox-muted); }
.ox-table tbody tr { transition: background .15s; }
.ox-table tbody tr:hover td { background: #fffaf6; }
.ox-table tr.is-selected td { background: var(--ox-primary-soft); }

/* Nhãn trạng thái dạng viên thuốc có chấm */
.ox-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; font-weight: 600; }
.ox-badge--green, .ox-badge--red, .ox-badge--amber, .ox-badge--blue { border: 0; }
.ox-badge--green::before, .ox-badge--red::before, .ox-badge--amber::before, .ox-badge--blue::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Ô nhập */
.ox-app input[type="text"]:focus, .ox-app input[type="search"]:focus, .ox-app input[type="email"]:focus, .ox-app input[type="url"]:focus,
.ox-app input[type="number"]:focus, .ox-app input[type="date"]:focus, .ox-app input[type="password"]:focus, .ox-app input[type="tel"]:focus,
.ox-app select:focus, .ox-app textarea:focus { border-color: #ffb08a !important; box-shadow: 0 0 0 3px rgba(232, 64, 28, .12) !important; outline: 0; }
.ox-segment input:checked + span, .ox-role-picks input:checked + span { border-color: var(--ox-primary); background: var(--ox-primary-soft); color: var(--ox-primary-hover); }
.ox-checks input, .ox-radios input, .ox-site-picks input { accent-color: var(--ox-primary); }
.ox-subsubsub a.is-active { color: var(--ox-primary-hover) !important; }

/* Tab viên thuốc (dùng chung) */
.ox-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 14px; background: #fff; border: 1px solid var(--ox-border); box-shadow: var(--ox-shadow); }
.ox-pills a, .ox-pills button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 10px; background: none; color: var(--ox-muted) !important; font: 600 13.5px/1.2 var(--ox-font); cursor: pointer; white-space: nowrap; }
.ox-pills a:hover, .ox-pills button:hover { background: var(--ox-surface-2); color: var(--ox-text) !important; }
.ox-pills .is-active { background: var(--ox-grad) !important; color: #fff !important; box-shadow: 0 6px 14px -8px rgba(232, 64, 28, .8); }
.ox-pills em { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--ox-gray-soft); color: var(--ox-text); font-style: normal; font-size: 11.5px; line-height: 20px; text-align: center; }
.ox-pills .is-active em { background: rgba(255, 255, 255, .25); color: #fff; }

/* Ô icon tròn màu (dùng chung) */
.ox-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; }
.ox-ic--brand { background: var(--ox-primary-soft); color: var(--ox-primary); }
.ox-ic--blue { background: var(--ox-blue-soft); color: var(--ox-blue); }
.ox-ic--green { background: var(--ox-green-soft); color: var(--ox-green); }
.ox-ic--amber { background: var(--ox-amber-soft); color: var(--ox-amber); }
.ox-ic--red { background: var(--ox-red-soft); color: var(--ox-red); }

/* Thông báo sau thao tác */
.ox-alert { border-radius: 14px; }

@media (prefers-reduced-motion: reduce) { .ox-app *, .ox-app *::before, .ox-app *::after { transition: none !important; animation: none !important; } }
.ox-chip { transition: background .15s, border-color .15s, color .15s; }
.ox-chip:hover { border-color: #ffc6a8; color: var(--ox-primary-hover) !important; }
.ox-chip.is-active { background: var(--ox-grad); border-color: transparent; color: #fff !important; box-shadow: 0 6px 14px -8px rgba(232, 64, 28, .8); }
.ox-page.is-active { background: var(--ox-grad); }

/* ---------- Đường dẫn "⌂ Tổng quan › ..." trước tiêu đề trang ---------- */
.ox-crumb { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-right: 10px; vertical-align: middle; font-size: 15px; font-weight: 500; }
.ox-crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--ox-slate) !important; }
.ox-crumb a:hover { color: var(--ox-primary) !important; }
.ox-crumb__sep { display: inline-flex; color: #cdd2da; }
.ox-crumb + h1 { display: inline; vertical-align: middle; }
.ox-page-head div:has(> .ox-crumb) > .ox-back { display: none; }
.ox-page-head div:has(> .ox-crumb) > .ox-muted, .ox-page-head div:has(> .ox-crumb) > p { margin-top: 8px; }
.ox-page-head .ox-muted { max-width: 860px; color: var(--ox-slate); }

/* ---------- Ô số liệu: icon tròn pastel, mỗi ô 1 màu ---------- */
.ox-kpis--row .ox-kpi { --k-bg: var(--ox-primary-soft); --k-fg: var(--ox-primary); --k-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m7 15 4-4 3 3 6-6'/%3E%3C/svg%3E"); padding-left: 78px; min-height: 96px; justify-content: center; }
.ox-kpis--row .ox-kpi::before { content: ""; position: absolute; left: 20px; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: var(--k-bg); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ox-kpis--row .ox-kpi::after { content: ""; position: absolute; left: 32px; top: 50%; width: 20px; height: 20px; margin-top: -10px; background: var(--k-fg); -webkit-mask: var(--k-ic) center / contain no-repeat; mask: var(--k-ic) center / contain no-repeat; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ox-kpis--row .ox-kpi:hover::before, .ox-kpis--row .ox-kpi:hover::after { transform: scale(1.1) rotate(-8deg); }
.ox-kpis--row .ox-kpi:nth-child(5n+2) { --k-bg: var(--ox-blue-soft); --k-fg: var(--ox-blue); --k-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M2 21v-2a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4v2M16 3.1a4 4 0 0 1 0 7.8M22 21v-2a4 4 0 0 0-3-3.9'/%3E%3C/svg%3E"); }
.ox-kpis--row .ox-kpi:nth-child(5n+3) { --k-bg: var(--ox-green-soft); --k-fg: var(--ox-green); --k-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2v-2'/%3E%3Cpath d='M21 7h-6a3 3 0 0 0 0 6h6z'/%3E%3C/svg%3E"); }
.ox-kpis--row .ox-kpi:nth-child(5n+4) { --k-bg: var(--ox-amber-soft); --k-fg: var(--ox-amber); --k-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ox-kpis--row .ox-kpi:nth-child(5n+5) { --k-bg: var(--ox-red-soft); --k-fg: var(--ox-red); --k-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.ox-kpis--row .ox-kpi .ox-kpi__label { font-size: 12.5px; }
.ox-kpis--row .ox-kpi .ox-kpi__value { line-height: 1.2; }

/* ---------- Tiêu đề thẻ: icon trong ô cam nhạt, không icon thì vạch cam ---------- */
.ox-app .ox-card__title > .ox-icon:first-child { box-sizing: content-box; width: 17px; height: 17px; padding: 7px; border-radius: 10px; background: var(--ox-primary-soft); color: var(--ox-primary); }
.ox-card__head h2:not(:has(.ox-icon))::before, .ox-section__head h2:not(:has(.ox-icon))::before { content: ""; display: inline-block; width: 4px; height: 17px; margin-right: 10px; border-radius: 4px; background: var(--ox-grad); vertical-align: -2px; }
.ox-card__head h2, .ox-section__head h2 { font-size: 16.5px; }

/* ---------- Link trong bảng: chữ đậm màu tối, rê chuột mới cam ---------- */
.ox-table td a:not(.ox-btn):not(.ox-tool):not(.ox-icon-btn) { color: var(--ox-text) !important; font-weight: 600; transition: color .15s; }
.ox-table td a:not(.ox-btn):not(.ox-tool):not(.ox-icon-btn):hover { color: var(--ox-primary) !important; }
.ox-table td a:not(.ox-btn) + small, .ox-table td small.ox-block { color: var(--ox-slate); }

/* Logo chìm nhạt hơn cho trang ít nội dung */
.ox-main::after { opacity: .018; }

/* Khối đường dẫn + tiêu đề trang */
.ox-page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.ox-page-title .ox-crumb { margin-right: 0; }
.ox-page-title h1 { margin: 0; }
.ox-page-head div:has(> .ox-page-title) > .ox-back { display: none; }
.ox-page-head div:has(> .ox-page-title) > .ox-muted, .ox-page-head div:has(> .ox-page-title) > p { margin-top: 8px; }

/* Ô chọn file đồng bộ nút */
.ox-app input[type="file"] { width: 100%; padding: 10px; border: 1.5px dashed #e3d6cc; border-radius: 12px; background: var(--ox-surface-2); color: var(--ox-muted); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s; }
.ox-app input[type="file"]:hover { border-color: var(--ox-primary); }
.ox-app input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 9px; background: var(--ox-grad); color: #fff; font: 600 13px var(--ox-font); cursor: pointer; }

/* Hàng lọc "Tất cả (n) | ..." => tab viên thuốc */
.ox-subsubsub { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; padding: 5px; border-radius: 14px; background: #fff; border: 1px solid var(--ox-border); box-shadow: var(--ox-shadow); align-self: flex-start; }
.ox-subsubsub a { padding: 8px 14px; border-radius: 10px; color: var(--ox-muted) !important; font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; }
.ox-subsubsub a + a::before { content: none; }
.ox-subsubsub a:hover { background: var(--ox-surface-2); color: var(--ox-text) !important; }
.ox-subsubsub a span { color: inherit; opacity: .75; font-weight: 500; }
.ox-subsubsub a.is-active { background: var(--ox-grad); color: #fff !important; box-shadow: 0 6px 14px -8px rgba(232, 64, 28, .8); }

/* ---------- Trang website: bảng điều khiển có tab ở cột phải ---------- */
.ox-side-sticky { position: sticky; top: 20px; align-self: start; }
.ox-panel { padding: 0; overflow: hidden; }
.ox-panel__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px; margin: 0; background: var(--ox-surface-2); border-bottom: 1px solid var(--ox-border); }
.ox-panel__tabs button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border: 0; border-radius: 11px; background: none; color: var(--ox-muted); font: 600 12.5px var(--ox-font); cursor: pointer; transition: background .15s, color .15s; }
.ox-panel__tabs button:hover { background: #fff; color: var(--ox-text); }
.ox-panel__tabs button.is-active { background: #fff; color: var(--ox-primary-hover); box-shadow: 0 2px 8px -4px rgba(23, 32, 46, .25); }
.ox-panel__tabs button.is-active .ox-icon { color: var(--ox-primary); }
.ox-panel__pane { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.ox-panel__pane[hidden] { display: none; }
.ox-panel__pane > .ox-muted:first-child { padding: 10px 12px; border-radius: 12px; background: var(--ox-primary-soft); color: #8a3a1f; font-size: 13px; }
.ox-panel__sep { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px dashed var(--ox-border); }
.ox-panel__sep span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.ox-panel__sep .ox-icon { color: var(--ox-primary); }
.ox-panel__sep small { color: var(--ox-slate); font-size: 12px; overflow-wrap: anywhere; }
.ox-panel__mail { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ox-panel__mail form { grid-column: 1 / -1; margin: 0; }
/* Thẻ con nằm trong tab: bỏ khung + tiêu đề trùng */
.ox-panel .ox-card { padding: 0; border: 0; box-shadow: none; background: none; }
.ox-panel .ox-card > .ox-card__title { display: none; }
.ox-panel .ox-timeline { max-height: 420px; overflow-y: auto; }
/* Mục gập trong tab Khác */
.ox-acc { border: 1px solid var(--ox-border); border-radius: 14px; background: #fff; }
.ox-acc > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; list-style: none; }
.ox-acc > summary::-webkit-details-marker { display: none; }
.ox-acc > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ox-slate); border-bottom: 2px solid var(--ox-slate); transform: rotate(45deg); transition: transform .2s; }
.ox-acc[open] > summary::after { transform: rotate(-135deg); }
.ox-acc > summary .ox-icon { color: var(--ox-primary); }
.ox-acc > summary .ox-badge { font-style: normal; font-size: 11px; }
.ox-acc > :not(summary) { padding: 0 14px 14px; }
.ox-acc#ngung > summary .ox-icon { color: var(--ox-red); }
.ox-panel__more .ox-danger { padding: 0; }
.ox-detail-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
@media (max-width: 1100px) { .ox-side-sticky { position: static; } }

/* Chú thích nút icon */
.ox-tip { position: fixed; z-index: 10000; max-width: 260px; padding: 6px 10px; border-radius: 8px; background: #17202e; color: #fff; font: 500 12.5px/1.4 var(--ox-font); pointer-events: none; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); animation: oxTip .12s ease-out; }
.ox-tip[hidden] { display: none; }
@keyframes oxTip { from { opacity: 0; transform: translateY(3px); } }

/* ==========================================================================
   MENU NGANG NỔI KIỂU CAFFI (máy tính ≥ 1025px) – đồng bộ thanh tab bên khách
   logo · [+] · các icon (mục đang mở = vòng tròn cam) · chuông · tài khoản
   ========================================================================== */
.ox-nav__subtitle { display: none; }
@media (min-width: 1025px) {
    .ox-shell { display: block; }
    .ox-sidebar { position: sticky; top: 12px; z-index: 50; display: flex; flex-direction: row; align-items: center; gap: 6px; width: auto; max-width: 1640px; height: auto; margin: 12px auto 0; padding: 7px 10px; border: 1px solid var(--ox-border); border-radius: 999px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -18px rgba(23, 32, 46, .35); overflow: visible; }
    .ox-sidebar__head { order: 1; flex: none; gap: 4px; padding: 0 6px 0 10px; }
    .ox-sidebar__head .ox-logo { height: 34px; width: auto; }
    .ox-sidebar__head .ox-bell { display: none; }
    .ox-sidebar__add { order: 2; flex: none; width: 40px; min-height: 40px !important; height: 40px; padding: 0; border-radius: 50% !important; }
    .ox-sidebar__add span { display: none; }
    .ox-nav { order: 3; flex: 1; flex-direction: row; align-items: center; justify-content: center; gap: 2px; min-width: 0; }
    .ox-nav hr { width: 1px; height: 24px; margin: 0 6px; border: 0; background: var(--ox-border); }
    .ox-nav__group { position: relative; }
    .ox-nav__item { position: relative; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; }
    .ox-nav__item > span, .ox-nav__caret { display: none; }
    .ox-nav__item .ox-icon { width: 19px; height: 19px; }
    .ox-nav__item.is-active, .ox-nav__item.has-kids.is-active { background: var(--ox-grad); box-shadow: 0 8px 16px -8px rgba(232, 64, 28, .8); }
    .ox-nav__item.is-active > .ox-icon:first-child, .ox-nav__item.is-active .ox-icon { color: #fff !important; }
    .ox-nav__item.is-active:not(.has-kids)::before { content: none; }
    .ox-nav__item:hover > .ox-icon:first-child { transform: scale(1.12); }
    .ox-nav__item .ox-nav__badge { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
    /* Menu con thả xuống */
    .ox-nav__sub { position: absolute; left: 50%; top: calc(100% + 10px); z-index: 60; display: flex; flex-direction: column; gap: 2px; min-width: 230px; margin: 0; padding: 8px; border: 1px solid var(--ox-border); border-left: 1px solid var(--ox-border); border-radius: 16px; background: #fff; box-shadow: 0 22px 44px -18px rgba(23, 32, 46, .35); opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .15s, transform .15s, visibility .15s; }
    .ox-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
    .ox-nav__group:hover .ox-nav__sub, .ox-nav__group:focus-within .ox-nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
    .ox-nav__subtitle { display: block; padding: 6px 10px 8px; color: var(--ox-slate); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
    .ox-nav__sub a { padding: 9px 12px; border-radius: 10px; white-space: nowrap; }
    /* Tài khoản bên phải */
    .ox-user { order: 4; flex: none; margin: 0; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--ox-border); }
    .ox-user__info { max-width: 130px; }
    .ox-user .ox-avatar { width: 34px; height: 34px; font-size: 13px; }
    .ox-main::before { top: -660px; }
    .ox-content { max-width: 1680px; margin: 0 auto; padding: 22px 28px 48px; }
}
@media (min-width: 1025px) and (max-width: 1280px) {
    .ox-user__info { display: none; }
    .ox-nav__item { width: 38px; height: 38px; }
}
@media (min-width: 1025px) {
    .ox-nav__item.has-kids .ox-nav__caret, .ox-nav__item > .ox-icon:last-child:not(:first-child) { display: none !important; }
    .ox-nav__item { gap: 0; }
    .ox-sidebar__head .ox-bell { display: grid; width: 38px; height: 38px; border-radius: 50%; }
    .ox-sidebar__head .ox-bell:hover { background: var(--ox-primary-soft); color: var(--ox-primary) !important; }
}

@media (max-width: 1024px) { .ox-nav__group:not(.is-open) > .ox-nav__sub { display: none; } }


/* ==================== HỖ TRỢ KHÁCH HÀNG ==================== */
.ox-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ox-code-chip { display: inline-flex; padding: 2px 9px; border-radius: 8px; background: var(--ox-gray-soft); color: var(--ox-text); font-weight: 600; font-size: 12.5px; }
.ox-board-filter { display: grid; grid-template-columns: minmax(200px, 1fr) repeat(3, minmax(0, 200px)) auto; gap: 10px; align-items: center; padding: 10px; }
.ox-board-filter .ox-input-icon input { width: 100%; }
/* Cột */
.ox-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.ox-board__col { display: flex; flex-direction: column; min-height: 200px; border-radius: 18px; background: rgba(255, 255, 255, .55); border: 1px solid var(--ox-border); transition: background .15s, box-shadow .15s; }
.ox-board__col.is-over { background: var(--ox-primary-soft); box-shadow: inset 0 0 0 2px var(--ox-primary); }
.ox-board__col > header { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.ox-board__col > header i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ox-slate)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #999) 18%, transparent); }
.ox-board__col > header b { flex: 1; font-size: 14px; }
.ox-board__col > header em { min-width: 26px; height: 22px; padding: 0 8px; border-radius: 99px; background: #fff; border: 1px solid var(--ox-border); font-style: normal; font-weight: 700; font-size: 12px; line-height: 20px; text-align: center; }
.ox-board__col--blue { --c: var(--ox-blue); }
.ox-board__col--amber { --c: var(--ox-amber); }
.ox-board__col--slate { --c: #8a6bdc; }
.ox-board__col--green { --c: var(--ox-green); }
.ox-board__cards { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 4px 10px 12px; }
.ox-board__cards--row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ox-board__empty { display: none; margin: 0; padding: 18px 10px; border: 1.5px dashed var(--ox-border); border-radius: 12px; color: var(--ox-slate); font-size: 12.5px; text-align: center; }
.ox-board__cards:not(:has(.ox-kcard:not([hidden]))) .ox-board__empty { display: block; }
.ox-board__more { padding: 0 16px 12px; color: var(--ox-slate); font-size: 12px; }
.ox-board__cancelled { margin-top: 4px; }
/* Thẻ phiếu */
.ox-kcard { display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--ox-border); box-shadow: 0 2px 6px -4px rgba(23, 32, 46, .2); color: var(--ox-text) !important; cursor: grab; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ox-kcard[hidden] { display: none; }
.ox-kcard:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -14px rgba(23, 32, 46, .35); border-color: #f1d9cd; }
.ox-kcard.is-dragging { opacity: .45; transform: rotate(2deg); }
.ox-kcard.is-moved { animation: oxMoved .9s ease-out; }
@keyframes oxMoved { 0% { box-shadow: 0 0 0 3px rgba(18, 145, 95, .5); } 100% { box-shadow: 0 0 0 0 rgba(18, 145, 95, 0); } }
.ox-kcard.is-late { border-color: #ffc9c3; box-shadow: inset 3px 0 0 var(--ox-red); }
.ox-kcard.is-unread { background: #fffaf6; }
.ox-kcard__top { display: flex; align-items: center; gap: 6px; }
.ox-kcard__top small { flex: 1; color: var(--ox-slate); font-size: 11.5px; font-weight: 600; }
.ox-kcard__top .ox-badge { font-size: 10.5px; padding: 1px 7px; }
.ox-kcard__top .ox-nav__badge { min-width: 18px; height: 18px; font-size: 10.5px; line-height: 18px; animation: oxPulse 1.6s ease-out infinite; }
@keyframes oxPulse { 0% { box-shadow: 0 0 0 0 rgba(209, 41, 28, .5); } 70% { box-shadow: 0 0 0 7px rgba(209, 41, 28, 0); } 100% { box-shadow: 0 0 0 0 rgba(209, 41, 28, 0); } }
.ox-kcard__title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.ox-kcard__site { display: inline-flex; align-items: center; gap: 5px; color: var(--ox-muted); font-size: 12.5px; }
.ox-kcard__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ox-kcard__tags:empty { display: none; }
.ox-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; background: var(--ox-gray-soft); color: var(--ox-muted); font-size: 11.5px; font-weight: 600; }
.ox-tag.is-red { background: var(--ox-red-soft); color: var(--ox-red); }
.ox-kcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--ox-border); }
.ox-kcard__foot small { color: var(--ox-slate); font-size: 11.5px; }
.ox-kcard__foot small.is-client { color: var(--ox-primary-hover); font-weight: 600; }
.ox-avatar--xs { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px #fff; }
/* Chat nhanh: danh sách + khung chat */
.ox-inbox-2 { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; height: calc(100vh - 210px); min-height: 520px; }
.ox-inbox-2__list { display: flex; flex-direction: column; min-height: 0; }
.ox-inbox-2__search { padding: 12px; border-bottom: 1px solid var(--ox-border); }
.ox-inbox-2__search input { width: 100%; }
.ox-inbox-2__items { flex: 1; overflow-y: auto; padding: 6px; }
.ox-inbox-2__item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ox-text) !important; transition: background .15s; }
.ox-inbox-2__item[hidden] { display: none; }
.ox-inbox-2__item:hover { background: var(--ox-surface-2); }
.ox-inbox-2__item.is-active { background: var(--ox-primary-soft); }
.ox-inbox-2__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ox-inbox-2__text strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-inbox-2__text small { color: var(--ox-slate); font-size: 12px; }
.ox-inbox-2__item.is-unread strong { font-weight: 800; }
.ox-inbox-2__item.is-unread small { color: var(--ox-primary-hover); font-weight: 600; }
.ox-conv { display: flex; flex-direction: column; min-height: 0; }
.ox-inbox-2 .ox-conv { height: 100%; }
.ox-conv__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ox-border); }
.ox-conv__head > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ox-conv__head small { color: var(--ox-slate); font-size: 12.5px; }
.ox-conv__thread { flex: 1; min-height: 260px; overflow-y: auto; padding: 20px; background: linear-gradient(180deg, #fbf9f7, #f6f3ef); max-height: none; }
.ox-detail > .ox-conv .ox-conv__thread { max-height: 62vh; }
.ox-conv__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: auto; padding: 40px 20px; color: var(--ox-muted); text-align: center; }
.ox-conv__empty .ox-icon { color: var(--ox-primary); }
.ox-conv__empty strong { color: var(--ox-text); font-size: 15px; }
.ox-conv__compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--ox-border); background: #fff; }
.ox-conv__compose textarea { flex: 1; min-height: 44px; max-height: 160px; padding: 11px 14px; border-radius: 14px; resize: none; }
.ox-conv__compose .ox-btn { width: 46px; height: 46px; padding: 0; border-radius: 14px; }
.ox-attach-icon { position: relative; width: 44px; height: 44px; cursor: pointer; }
.ox-attach-icon input, .ox-attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ox-attach-icon.is-on { background: var(--ox-primary-soft); color: var(--ox-primary) !important; }
.ox-conv__reply { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-top: 1px solid var(--ox-border); background: #fff; }
.ox-conv__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ox-conv__bar select { flex: 1; min-width: 200px; }
.ox-attach { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 11px; border: 1.5px dashed #e3d6cc; color: var(--ox-muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.ox-attach:hover, .ox-attach.is-on { border-color: var(--ox-primary); color: var(--ox-primary); }
.ox-danger-row { display: flex; justify-content: center; gap: 6px; }
/* Tin nhắn CRM: bong bóng OXO cam */
.ox-msg { border-radius: 4px 16px 16px 16px; }
.ox-msg--mine { border-radius: 16px 4px 16px 16px; background: linear-gradient(135deg, #ff8a3d, #e8401c); border-color: transparent; color: #fff; }
.ox-msg--mine .ox-msg__meta, .ox-msg--mine .ox-msg__meta strong, .ox-msg--mine .ox-msg__body, .ox-msg--mine .ox-msg__body a { color: #fff !important; }
.ox-msg--mine .ox-msg__del button { color: rgba(255, 255, 255, .8); }
@media (max-width: 1100px) {
    .ox-board-filter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ox-board { grid-template-columns: repeat(4, 260px); }
    .ox-inbox-2 { grid-template-columns: minmax(0, 1fr); height: auto; }
    .ox-inbox-2__items { max-height: 260px; }
    .ox-inbox-2 .ox-conv { height: 70vh; }
}

/* Ô số liệu trên điện thoại: gọn, không xuống dòng lộn xộn */
@media (max-width: 760px) {
    .ox-kpis--row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ox-kpis--row .ox-kpi { min-height: 0; padding: 12px 12px 12px 58px; }
    .ox-kpis--row .ox-kpi::before { left: 12px; width: 36px; height: 36px; margin-top: -18px; }
    .ox-kpis--row .ox-kpi::after { left: 21px; width: 18px; height: 18px; margin-top: -9px; }
    .ox-kpis--row .ox-kpi .ox-kpi__value { font-size: 18px; }
    .ox-kpis--row .ox-kpi small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Bảng điều khiển website: gọn chữ + dòng thời gian không bị cắt chấm */
.ox-panel__note { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 12px; background: var(--ox-primary-soft); color: #8a3a1f; font-size: 13px; }
.ox-panel .ox-hint { margin: 0 0 10px; color: var(--ox-muted); font-size: 12.5px; }
.ox-panel [data-pane="log"] { max-height: 480px; overflow-y: auto; }
.ox-panel .ox-timeline { max-height: none; overflow: visible; margin-left: 6px; padding-left: 18px; }
.ox-timeline li::before { left: -24px; top: 4px; }
.ox-panel .ox-timeline li::before { left: -26px; background: #fff; border-color: var(--ox-primary); }

/* ==================== CHỐNG RỚT DÒNG MỒ CÔI (CRM) ==================== */
.ox-app h1, .ox-app h2, .ox-app h3, .ox-app strong, .ox-card__title, .ox-kpi__label, .ox-btn, .ox-badge { text-wrap: balance; }
.ox-app p, .ox-app small, .ox-app li, .ox-app td, .ox-app dd, .ox-app .ox-hint, .ox-app .ox-muted { text-wrap: pretty; }
.ox-btn, .ox-badge, .ox-chip, .ox-pills a, .ox-pills button, .ox-panel__tabs button, .ox-tag, .ox-nav__sub a, .ox-crumb a { white-space: nowrap; }
.ox-segs { display: inline-flex; flex-wrap: wrap; align-items: center; row-gap: 2px; }
.ox-segs > span { white-space: nowrap; }
.ox-segs > span + span::before { content: "·"; margin: 0 6px; color: var(--ox-slate); }
.ox-segs { display: flex; flex-wrap: wrap; overflow: hidden; margin-left: -14px; padding: 1px 0; }
.ox-segs > span { position: relative; margin-left: 14px; }
.ox-segs > span + span::before, .ox-segs > span::before { content: "·"; position: absolute; left: -10px; margin: 0; color: var(--ox-slate); }

/* Tab "Khác" của trang website: các mục gập đồng đều, tiêu đề 1 dòng, nội dung cùng lề */
.ox-panel__more { gap: 10px; }
.ox-panel .ox-acc { border-radius: 14px; overflow: hidden; }
.ox-panel .ox-acc > summary { min-height: 48px; padding: 12px 14px; font-size: 13.5px; }
.ox-panel .ox-acc > summary > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-panel .ox-acc > summary::after { margin-left: 8px; flex: none; }
.ox-panel .ox-acc[open] > summary { border-bottom: 1px solid var(--ox-border); background: var(--ox-surface-2); }
.ox-panel .ox-acc > .ox-card, .ox-panel .ox-acc > form { display: flex; flex-direction: column; gap: 12px; padding: 14px !important; margin: 0; }
.ox-panel .ox-acc .ox-hint { margin: 0; }
.ox-panel .ox-acc .ox-details--sub { margin: 4px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--ox-border); }
.ox-panel .ox-acc .ox-details--sub > summary { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--ox-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ox-panel .ox-acc .ox-details--sub > summary:hover { color: var(--ox-primary); }
.ox-panel .ox-acc .ox-details--sub[open] > summary { margin-bottom: 10px; color: var(--ox-text); }
.ox-panel .ox-acc .ox-btn--danger-ghost { align-self: stretch; }
.ox-panel__more > .ox-danger { margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--ox-border); }
/* Dòng nhiều cụm: dấu "·" nằm trong khoảng cách giữa các cụm; cụm đầu dòng có dấu ở ngoài khung nên bị ẩn */
.ox-segs { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 2px; overflow: hidden; margin-left: 0; padding: 1px 0; }
.ox-segs > span { position: relative; margin-left: 0; white-space: nowrap; }
.ox-segs > span::before, .ox-segs > span + span::before { content: "·"; position: absolute; left: -10px; margin: 0; }

/* ==================== MENU CRM v3: viên gọn ở giữa (như bên khách) + tab dưới đáy trên điện thoại ==================== */
.ox-tabbar, .ox-sheet, .ox-topbar__add { display: none; }
.ox-nav__add { display: none; }
@media (min-width: 1025px) {
    .ox-sidebar { width: fit-content; max-width: calc(100% - 24px); gap: 4px; padding: 6px 8px 6px 14px; }
    .ox-sidebar__head { padding: 0 8px 0 0; margin-right: 4px; border-right: 1px solid var(--ox-border); }
    .ox-sidebar__head .ox-logo { height: 30px; }
    .ox-nav { flex: none; justify-content: flex-start; }
    .ox-nav__add { display: grid; place-items: center; width: 40px; height: 40px; margin-left: 6px; border-radius: 50%; background: var(--ox-grad); color: #fff !important; box-shadow: 0 8px 16px -8px rgba(232, 64, 28, .8); transition: transform .2s; }
    .ox-nav__add span { display: none; }
    .ox-nav__add:hover { transform: rotate(90deg) scale(1.06); }
    .ox-user { padding-left: 8px; gap: 4px; }
    .ox-user__info { display: none; }
}
@media (max-width: 1024px) {
    .ox-sidebar, .ox-backdrop { display: none !important; }
    body.ox-app { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .ox-topbar { display: flex; align-items: center; gap: 8px; position: static; margin: 10px 12px 0; padding: 6px 8px 6px 14px; border: 1px solid var(--ox-border); border-radius: 18px; background: rgba(255, 255, 255, .95); box-shadow: 0 8px 24px -16px rgba(23, 32, 46, .3); }
    .ox-topbar .ox-brand { margin-right: auto; }
    .ox-topbar .ox-logo { height: 32px; width: auto; }
    .ox-topbar__add { display: grid; width: 38px; height: 38px; border-radius: 50%; background: var(--ox-grad); color: #fff !important; }
    .ox-avatar--sm { width: 34px; height: 34px; font-size: 13px; }
    .ox-content { padding: 14px 12px 24px; }
    .ox-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); border-top: 1px solid var(--ox-border); box-shadow: 0 -8px 24px -16px rgba(23, 32, 46, .35); }
    .ox-tabbar__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; border: 0; background: none; color: #8a93a3 !important; font: 600 11px/1.2 var(--ox-font); white-space: nowrap; cursor: pointer; }
    .ox-tabbar__item.is-active { color: var(--ox-primary) !important; }
    .ox-tabbar__item.is-active::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--ox-grad); }
    .ox-tabbar__item em { position: absolute; top: 0; left: 52%; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--ox-red); color: #fff; font: 700 10px/17px var(--ox-font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px #fff; }
    .ox-sheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; background: rgba(15, 22, 36, 0); transition: background .2s; }
    .ox-sheet[hidden] { display: none; }
    .ox-sheet.is-open { background: rgba(15, 22, 36, .45); }
    .ox-sheet__panel { width: 100%; max-height: 85vh; overflow-y: auto; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: #fff; transform: translateY(100%); transition: transform .22s cubic-bezier(.2, .8, .3, 1); }
    .ox-sheet.is-open .ox-sheet__panel { transform: none; }
    .ox-sheet__grip { display: block; width: 40px; height: 4px; margin: 2px auto 12px; border-radius: 4px; background: #e2ddd8; }
    .ox-sheet__panel header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
    .ox-sheet__panel header strong { flex: 1; font-size: 16px; }
    .ox-sheet__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ox-grad); color: #fff; }
    .ox-sheet__panel header button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--ox-gray-soft); color: var(--ox-muted); }
    .ox-sheet__add { margin-bottom: 6px; }
    .ox-sheet__group { margin-top: 12px; }
    .ox-sheet__group > b { display: block; margin: 0 2px 8px; color: var(--ox-slate); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
    .ox-sheet__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .ox-sheet__item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--ox-border); border-radius: 14px; color: var(--ox-text) !important; font-size: 11px; font-weight: 600; line-height: 1.25; text-align: center; text-wrap: balance; }
    .ox-sheet__item.is-active { border-color: #ffc6a8; background: var(--ox-primary-soft); }
    .ox-sheet__icon { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
    .ox-sheet__icon em { position: absolute; top: -5px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--ox-red); color: #fff; font: 700 10px/17px var(--ox-font); font-style: normal; box-shadow: 0 0 0 2px #fff; }
    .ox-tone--orange { background: #fff1ea; color: #e8401c; } .ox-tone--blue { background: #eef4ff; color: #2563eb; } .ox-tone--green { background: #e9f8f1; color: #12915f; } .ox-tone--amber { background: #fff6e5; color: #c2700c; }
    .ox-tone--violet { background: #f1edff; color: #6d4bd8; } .ox-tone--pink { background: #fdeef4; color: #d6336c; } .ox-tone--sky { background: #e8f7fd; color: #0b8ac0; } .ox-tone--slate { background: #f1f3f6; color: #4a5363; }
    .ox-sheet__foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--ox-border); }
    .ox-sheet__foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--ox-muted) !important; font-weight: 600; font-size: 13px; }
    html.ox-noscroll, html.ox-noscroll body { overflow: hidden; }
    .ox-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ==================== HỒ SƠ CÁ NHÂN ==================== */
.ox-avatar.has-img { padding: 0; overflow: hidden; background: #fff; }
.ox-avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ox-user__me { display: inline-flex; border-radius: 50%; transition: transform .2s; }
.ox-user__me:hover { transform: scale(1.06); }
.me-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.me-card { position: sticky; top: 92px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 0 12px; overflow: hidden; text-align: center; }
.me-card__cover { width: 100%; height: 86px; background: var(--ox-grad); position: relative; }
.me-card__cover::after { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255,255,255,.12) 0 4deg, transparent 4deg 12deg); }
.me-card__avatar { width: 92px !important; height: 92px !important; margin-top: -46px; font-size: 30px !important; box-shadow: 0 0 0 5px #fff, 0 10px 24px -10px rgba(232,64,28,.6) !important; position: relative; }
.me-card__name { font-size: 18px; margin-top: 4px; }
.me-card__meta { list-style: none; width: 100%; margin: 10px 0 0; padding: 12px 20px; border-top: 1px dashed var(--ox-border); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.me-card__meta li { display: flex; align-items: center; gap: 10px; color: var(--ox-muted); font-size: 13px; min-width: 0; }
.me-card__meta li .ox-icon { color: var(--ox-primary); flex: none; }
.me-card__meta li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card__nav { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 0; border-top: 1px solid var(--ox-border); }
.me-card__nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ox-text) !important; font-weight: 600; font-size: 13.5px; }
.me-card__nav a:hover { background: var(--ox-surface-2); }
.me-card__nav a.is-active { background: var(--ox-primary-soft); color: var(--ox-primary-hover) !important; box-shadow: inset 3px 0 0 var(--ox-primary); }
.me-card__nav a.is-out { color: var(--ox-red) !important; }
.me-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.me-form { display: flex; flex-direction: column; gap: 18px; }
.me-form__head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--ox-border); }
.me-form__head h2 { font-size: 17px; }
.me-avatar { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 16px; background: var(--ox-surface-2); }
.me-avatar__img { width: 72px !important; height: 72px !important; font-size: 24px !important; flex: none; }
.me-avatar > div { display: flex; flex-direction: column; gap: 2px; }
.me-avatar__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.me-avatar__acts .ox-btn { cursor: pointer; }
.me-avatar__rm { color: var(--ox-red); font-size: 13px; }
.me-strength { display: flex; align-items: center; gap: 4px; margin-top: -6px; }
.me-strength i { width: 40px; height: 5px; border-radius: 4px; background: var(--ox-gray-soft); transition: background .2s; }
.me-strength span { margin-left: 8px; color: var(--ox-muted); font-size: 12px; }
.me-strength.is-1 i:nth-child(-n+1) { background: var(--ox-red); } .me-strength.is-2 i:nth-child(-n+2) { background: #e0a106; }
.me-strength.is-3 i:nth-child(-n+3) { background: var(--ox-green); } .me-strength.is-4 i { background: var(--ox-green); }
.me-sessions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.me-sessions li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ox-border); border-radius: 12px; }
.me-sessions li > div { display: flex; flex-direction: column; }
@media (max-width: 1000px) { .me-layout { grid-template-columns: minmax(0, 1fr); } .me-card { position: static; } }

/* ==================== ĐĂNG NHẬP ==================== */
body.ox-auth { min-height: 100vh; background: #f7f5f2; }
.ox-auth2 { position: relative; display: flex !important; min-height: 100vh; align-items: center; justify-content: center; padding: 32px 16px; overflow: hidden; isolation: isolate; grid-template-columns: none !important; }
.ox-auth2::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 1500px; height: 1500px; transform: translate(-50%, -50%); border-radius: 50%;
    background: repeating-conic-gradient(from 3deg, rgba(232,64,28,.07) 0deg 2.5deg, transparent 2.5deg 9deg), repeating-radial-gradient(circle, transparent 0 28px, rgba(232,64,28,.05) 28px 30px);
    -webkit-mask-image: radial-gradient(circle, transparent 18%, #000 19%, #000 50%, transparent 66%); mask-image: radial-gradient(circle, transparent 18%, #000 19%, #000 50%, transparent 66%); }
.ox-auth2::after { content: ""; position: absolute; z-index: -1; inset: auto -10% -40% -10%; height: 60%; background: radial-gradient(ellipse at center, rgba(255,122,46,.18), transparent 60%); }
.ox-auth2 .ox-auth__panel { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; max-width: 440px; padding: 0 !important; background: none !important; }
.ox-auth2 .ox-auth__form { width: 100%; max-width: none; display: flex; flex-direction: column; gap: 16px; padding: 34px 32px 28px; border: 1px solid var(--ox-border); border-radius: 24px; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); box-shadow: 0 30px 60px -30px rgba(23,32,46,.35); position: relative; overflow: hidden; }
.ox-auth2 .ox-auth__form::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--ox-grad); }
.ox-auth2__logo { display: flex; justify-content: center; }
.ox-auth2__logo .ox-logo { height: 46px; width: auto; }
.ox-auth2__title { text-align: center; }
.ox-auth2__title h1 { font-size: 22px; letter-spacing: -.01em; }
.ox-auth2__title p { margin-top: 4px; font-size: 13.5px; }
.ox-auth2 .ox-input-icon input { height: 48px; border-radius: 12px; }
.ox-auth2 .ox-btn--lg { height: 50px; border-radius: 12px; font-size: 15px; }
.ox-auth2 .ox-auth__row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.ox-auth2 .ox-auth__foot { margin: 2px 0 0; padding-top: 14px; border-top: 1px dashed var(--ox-border); text-align: center; }
.ox-auth2 .ox-auth__foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--ox-muted) !important; font-size: 13px; font-weight: 600; }
.ox-auth2 .ox-auth__foot a:hover { color: var(--ox-primary) !important; }
.ox-auth2__copy { color: var(--ox-slate); font-size: 12px; text-align: center; }
.ox-auth2 .ox-auth__mobile-brand { display: none !important; }
@media (max-width: 500px) { .ox-auth2 .ox-auth__form { padding: 28px 20px 22px; border-radius: 20px; } }

/* Phần tử nền cam: rê chuột / bấm vẫn giữ chữ + icon trắng */
.ox-pills a.is-active, .ox-pills button.is-active, .ox-pills a.is-active:hover, .ox-pills button.is-active:hover, .ox-pills .is-active:focus,
.ox-pills .is-active *, .ox-subsubsub a.is-active, .ox-subsubsub a.is-active:hover, .ox-subsubsub a.is-active *,
.ox-chip.is-active, .ox-chip.is-active:hover, .ox-chip.is-active *, .ox-page.is-active, .ox-page.is-active:hover,
.ox-btn--primary, .ox-btn--primary:hover, .ox-btn--primary:focus, .ox-btn--primary *,
.ox-nav__item.is-active, .ox-nav__item.is-active:hover, .ox-nav__add, .ox-nav__add:hover, .ox-topbar__add, .ox-topbar__add:hover,
.ox-panel__tabs button.is-active:hover, .ox-tabbar__item em, .ox-sheet__ic { color: #fff !important; }
.ox-pills .is-active em, .ox-pills .is-active:hover em { background: rgba(255, 255, 255, .25) !important; color: #fff !important; }
.ox-panel__tabs button.is-active, .ox-panel__tabs button.is-active:hover { color: var(--ox-primary-hover) !important; }
.ox-pills a:not(.is-active):hover, .ox-pills button:not(.is-active):hover { background: var(--ox-primary-soft); color: var(--ox-primary-hover) !important; }
@media (min-width: 1025px) { .ox-nav__item.is-active .ox-nav__badge { box-shadow: 0 0 0 2px #fff; } } @media (max-width: 1024px) { .ox-nav__group.is-open > .ox-nav__item .ox-nav__badge { display: none; } }

/* Chặn tràn ngang trên điện thoại: nội dung rộng không được nới khung nhìn (làm thanh dưới / popup lệch) */
@media (max-width: 1024px) {
    html, body.ox-app { max-width: 100%; overflow-x: clip; }
    .ox-main, .ox-content { min-width: 0; max-width: 100vw; overflow-x: clip; }
    .ox-content img, .ox-content svg, .ox-content video, .ox-content table { max-width: 100%; }
    .ox-modal { max-width: calc(100vw - 16px) !important; margin: auto !important; }
}

/* ==================== ĐIỆN THOẠI v2 (kiểu app, như Caffi) ==================== */
.ox-topbar__search, .ox-msheet, .ox-filter-toggle { display: none; }
@media (max-width: 1024px) {
    /* Thanh trên: dính, mờ nền, tự ẩn khi cuộn xuống */
    .ox-topbar { position: sticky; top: 8px; z-index: 800; gap: 6px; margin: 8px 10px 0; padding: 6px 6px 6px 14px; transition: transform .25s ease, opacity .25s; }
    .ox-topbar.is-hidden { transform: translateY(-120%); opacity: 0; }
    .ox-topbar .ox-icon-btn { width: 38px; height: 38px; border-radius: 50%; }
    .ox-topbar__search { display: grid; background: var(--ox-surface-2); color: var(--ox-text) !important; }
    .ox-topbar .ox-logo { height: 28px; }
    .ox-content { padding: 12px 12px 20px; gap: 14px; }

    /* Đầu trang: nút ← về mục cha + tiêu đề lớn, mô tả 1 dòng */
    .ox-page-head { align-items: flex-start; gap: 10px; }
    .ox-page-head > div:first-child { min-width: 0; flex: 1; }
    .ox-page-title { flex-direction: column; align-items: flex-start; gap: 4px; }
    .ox-crumb { font-size: 12.5px; gap: 0; }
    .ox-crumb > a:not(:nth-last-child(2)), .ox-crumb__sep { display: none !important; }
    .ox-crumb > a:nth-last-child(2) { padding: 4px 10px 4px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--ox-border); color: var(--ox-muted) !important; font-weight: 600; }
    .ox-crumb > a:nth-last-child(2)::before { content: "‹"; margin-right: 4px; font-size: 16px; line-height: 1; color: var(--ox-primary); }
    .ox-crumb > a:nth-last-child(2) .ox-icon { display: none; }
    .ox-page-head h1, .ox-page-title h1 { font-size: 22px !important; line-height: 1.25; }
    .ox-page-head .ox-muted, .ox-page-head p { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .ox-head-actions { gap: 6px; }
    .ox-page-head .ox-btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
    /* Nút "Thêm website" to trên trang Khách hàng: đã có nút ＋ ở thanh trên */
    .ox-page-head > a.ox-btn--primary[href*="khach-hang/them"], .ox-cus-add { display: none !important; }

    /* Bảng trượt dùng chung */
    .ox-msheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; background: rgba(15, 22, 36, 0); transition: background .2s; }
    .ox-msheet[hidden] { display: none; }
    .ox-msheet.is-open { background: rgba(15, 22, 36, .45); }
    .ox-msearch { display: flex; gap: 8px; align-items: center; }
    .ox-msearch .ox-input-icon { flex: 1; }
    .ox-msearch input { width: 100%; height: 46px; border-radius: 14px; font-size: 16px; }
    .ox-msearch__quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
    .ox-msearch__quick a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--ox-border); border-radius: 99px; color: var(--ox-text) !important; font-size: 13px; font-weight: 600; }
    .ox-msearch__quick a .ox-icon { color: var(--ox-primary); }
    .ox-msearch__quick em { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--ox-red); color: #fff; font-style: normal; font-size: 10.5px; line-height: 18px; text-align: center; }
    .ox-mquick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .ox-mquick a { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--ox-border); border-radius: 16px; color: var(--ox-text) !important; }
    .ox-mquick a:active { background: var(--ox-surface-2); }
    .ox-mquick span { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 12px; }
    .ox-mquick b { font-size: 14px; }
    .ox-mquick small { color: var(--ox-muted); font-size: 12px; }

    /* Popup → bảng trượt từ dưới lên */
    dialog.ox-modal { width: 100% !important; max-width: 100% !important; max-height: 92vh !important; margin: auto 0 0 !important; border-radius: 22px 22px 0 0 !important; animation: oxSheetUp .25s cubic-bezier(.2, .8, .3, 1); }
    dialog.ox-modal::backdrop { background: rgba(15, 22, 36, .5); }
    dialog.ox-modal .ox-modal__form { max-height: 92vh; }
    dialog.ox-modal .ox-modal__head { position: relative; padding: 20px 18px 12px; }
    dialog.ox-modal .ox-modal__head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #e2ddd8; }
    dialog.ox-modal .ox-modal__head h2 { font-size: 17px !important; }
    dialog.ox-modal .ox-modal__body { padding: 14px 18px; }
    dialog.ox-modal .ox-modal__foot { position: sticky; bottom: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fff; flex-wrap: wrap; }
    dialog.ox-modal .ox-modal__foot .ox-btn { flex: 1; min-height: 46px; }
    dialog.ox-modal .ox-form-grid, dialog.ox-modal .ox-form-grid--3 { grid-template-columns: 1fr 1fr; }
    dialog.ox-modal .ox-field--full { grid-column: 1 / -1; }

    /* Bộ lọc gọn: ô tìm + nút Lọc */
    .has-filter-toggle { display: flex !important; flex-wrap: wrap; gap: 8px !important; align-items: center; }
    .has-filter-toggle > .ox-input-icon, .has-filter-toggle > .ox-filters__search, .has-filter-toggle > label.ox-input-icon { flex: 1; min-width: 0; order: 0; }
    .has-filter-toggle > select, .has-filter-toggle > .ox-inline-check, .has-filter-toggle > .ox-filters__clear { display: none; flex: 1 1 calc(50% - 4px); order: 2; }
    .has-filter-toggle.is-filter-open > select, .has-filter-toggle.is-filter-open > .ox-inline-check, .has-filter-toggle.is-filter-open > .ox-filters__clear { display: flex; }
    .ox-filter-toggle { display: inline-flex; order: 1; min-height: 42px; padding: 0 14px; gap: 6px; }
    .ox-filter-toggle.has-on, .is-filter-open .ox-filter-toggle { border-color: #ffc6a8; background: var(--ox-primary-soft); color: var(--ox-primary-hover) !important; }
    .ox-filter-toggle em { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--ox-primary); color: #fff; font-style: normal; font-size: 11px; line-height: 18px; }
    .ox-card.ox-filters { padding: 10px !important; }

    /* Tab trạng thái: cuộn ngang mượt, không xuống dòng */
    .ox-pills { max-width: 100%; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .ox-pills::-webkit-scrollbar { display: none; }
    .ox-pills > * { flex: none; scroll-snap-align: start; }

    /* Chạm dễ */
    .ox-btn { min-height: 40px; }
    .ox-icon-btn { min-width: 38px; min-height: 38px; }
    input, select, textarea { font-size: 16px !important; }
}
@keyframes oxSheetUp { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 1024px) {
    .ox-page-head { flex-direction: column; align-items: stretch; }
    .ox-page-head > .ox-head-actions, .ox-page-head > .ox-btn, .ox-page-head > a.ox-btn, .ox-page-head > .ox-badge { align-self: flex-start; }
    .ox-head-actions { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .ox-head-actions > * { flex: none; }
}
@media (max-width: 760px) {
    /* Tổng quan: chú thích tình trạng 3 cột, nhãn 1 dòng */
    .oxd-chips { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px 8px !important; }
    .oxd-chips > * { min-width: 0; }
    .oxd-chips small, .oxd-chips span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
    /* Trang website: bảng thao tác lên đầu, form bên dưới */
    .ox-detail { display: flex !important; flex-direction: column; }
    .ox-detail > aside { order: -1; }
    .ox-panel__tabs { position: sticky; top: 0; z-index: 5; }
    .ox-panel__tabs button { flex-direction: row; justify-content: center; gap: 5px; padding: 10px 4px; font-size: 12px; }
}
@media (max-width: 760px) {
    /* Ô chỉ số (Phân tích, Doanh thu dự án): icon trên, nhãn 2 dòng, không cắt chữ */
    .ins-kpis { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .ins-kpi { flex-direction: column; align-items: flex-start !important; gap: 8px !important; padding: 12px 14px !important; }
    .ins-kpi .ox-ic { width: 34px; height: 34px; }
    .ins-kpi small, .ins-kpi em { white-space: normal !important; overflow: visible !important; line-height: 1.3; }
    .ins-kpi strong { font-size: 18px !important; }
    .ins-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center !important; }
    .ins-head { flex-direction: column; align-items: flex-start; gap: 2px; }
    .ins-head small { white-space: normal; }
    .ins-life__grid { gap: 8px; }
    .ins-life__grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    /* Chọn kỳ: tab cuộn ngang, ô ngày tuỳ chọn gọn 1 hàng */
    .ox-period__bar { display: flex; flex-direction: column; align-items: stretch !important; gap: 8px; }
    .ox-period__custom { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 6px; width: 100%; padding: 6px 8px !important; }
    .ox-period__custom input[type="date"] { min-width: 0; width: 100%; padding: 6px 4px !important; font-size: 13px !important; }
    .ox-period__custom .ox-btn { min-height: 34px; padding: 0 10px; }
    /* Ô trống gọn */
    .prj-empty { min-height: 110px; }
}
.ox-board-tabs, .ox-conv__back { display: none !important; }
@media (max-width: 760px) {
    .ox-board-tabs { display: flex !important; align-self: stretch; }
    .ox-board { display: block !important; overflow: visible; }
    .ox-board__col { display: none; min-height: 0; border: 0; background: none; }
    .ox-board__col.is-mcol { display: flex; }
    .ox-board__col > header { display: none; }
    .ox-board__cards { padding: 0; }
    /* Chat nhanh: danh sách hoặc khung chat toàn màn */
    .ox-inbox-2 { display: block !important; height: auto !important; }
    .ox-inbox-2.has-cur > .ox-inbox-2__list { display: none; }
    .ox-inbox-2:not(.has-cur) > .ox-conv { display: none; }
    .ox-inbox-2__items { max-height: none !important; }
    .ox-inbox-2 .ox-conv { height: calc(100dvh - 210px) !important; min-height: 380px; }
    .ox-inbox-2.has-cur ~ * { display: none; }
    .ox-conv__back { display: grid !important; margin-left: -6px; }
    .ox-conv__head { padding: 10px 12px; gap: 8px; }
    .ox-conv__head .ox-avatar { width: 34px; height: 34px; }
    .ox-conv__head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ox-conv__thread { padding: 14px; }
    .ox-conv__compose { padding: 8px 10px; }
    .ox-msg { max-width: 88%; }
    /* Đầu trang Hỗ trợ: ẩn nút Tạo yêu cầu (đã có ở nút ＋) */
    .ox-head-actions > [data-dialog-open="#ox-new-ticket"] { display: none; }
}
@media (max-width: 760px) { .ox-inbox-2 .ox-conv { height: calc(100dvh - 330px - env(safe-area-inset-bottom)) !important; min-height: 340px; } }
@media (max-width: 760px) {
    .ox-kpis--row .ox-kpi { padding: 56px 14px 12px !important; min-height: 0; justify-content: flex-start; }
    .ox-kpis--row .ox-kpi::before { left: 14px !important; top: 12px !important; margin-top: 0 !important; width: 34px !important; height: 34px !important; }
    .ox-kpis--row .ox-kpi::after { left: 22px !important; top: 20px !important; margin-top: 0 !important; width: 18px !important; height: 18px !important; }
    .ox-kpis--row .ox-kpi .ox-kpi__label { white-space: normal; line-height: 1.3; }
    .ox-kpis--row .ox-kpi .ox-kpi__value { font-size: 17px !important; white-space: nowrap; letter-spacing: -.02em; }
    .ox-kpis--row .ox-kpi small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
    .ox-kpis--row .ox-kpi--link > .ox-icon { top: 18px; transform: none; }
    /* Thẻ đơn hàng: nút Bill lên góc */
    .ox-bl-table tr { position: relative; }
    .ox-bl-table td.ox-bill-act { position: absolute !important; top: 10px; right: 10px; width: auto !important; padding: 0 !important; border: 0 !important; }
    .ox-bl-table td.ox-bill-act::before { content: none !important; }
    .ox-bl-table td.ox-bill-act .ox-btn { min-height: 34px; padding: 0 12px; }
}
@media (max-width: 760px) {
    .ox-subsubsub { display: flex !important; flex-wrap: nowrap !important; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .ox-subsubsub::-webkit-scrollbar { display: none; }
    .ox-subsubsub a { flex: none; white-space: nowrap; }
    .ox-kpis--row > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .ox-detail > aside { order: 0; width: 100% !important; position: static !important; }
    .ox-detail:has(.ox-panel) > aside { order: -1; }
    .ox-detail > * { width: 100%; min-width: 0; }
    .ox-detail > .ox-conv .ox-conv__thread { max-height: 60vh; }
    .ox-danger-row { justify-content: flex-start; }
}

/* ==================== ĐIỆN THOẠI v3: cỡ chữ đồng đều, thẻ dạng hàng, chat kiểu Messenger ==================== */
.ox-mlabel { display: none; }
.ox-perpage { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--ox-border); font-size: 13px; }
.ox-perpage select { height: 34px; padding: 0 28px 0 10px; border-radius: 9px; font-size: 13px; }
.ox-perpage .ox-muted { margin-left: auto; }
/* Thẻ File, ảnh & liên kết */
.ox-media__tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 12px; background: var(--ox-surface-2); }
.ox-media__tabs button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px; border: 0; border-radius: 9px; background: none; color: var(--ox-muted); font: 600 12px var(--ox-font); cursor: pointer; }
.ox-media__tabs button em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--ox-text); }
.ox-media__tabs button.is-active { background: #fff; color: var(--ox-primary-hover); box-shadow: 0 2px 8px -4px rgba(23, 32, 46, .25); }
.ox-media__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ox-media__grid a { aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--ox-surface-2); }
.ox-media__grid img, .ox-media__grid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ox-media__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ox-media__list a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--ox-text) !important; }
.ox-media__list a:hover { background: var(--ox-surface-2); }
.ox-media__list .ox-ic { width: 34px; height: 34px; border-radius: 10px; }
.ox-media__list a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ox-media__list b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-media__list small { color: var(--ox-slate); font-size: 11.5px; }
.ox-media__empty { margin: 0; padding: 16px; border-radius: 10px; background: var(--ox-surface-2); color: var(--ox-slate); font-size: 13px; text-align: center; }
.ox-danger-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px !important; }
.ox-danger-row::before { content: "Dọn dữ liệu"; width: 100%; color: var(--ox-slate); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
/* Bong bóng chat kiểu Messenger (mọi kích thước) */
.ox-conv__thread { display: flex; flex-direction: column; gap: 6px; }
.ox-msg { align-self: flex-start; max-width: 78%; padding: 8px 13px !important; border: 0 !important; border-radius: 18px !important; background: #eef0f3 !important; box-shadow: none !important; }
.ox-msg--mine { align-self: flex-end; border-radius: 18px !important; background: linear-gradient(135deg, #ff8a3d, #e8401c) !important; }
.ox-msg__meta { font-size: 11px !important; opacity: .75; margin-bottom: 2px; }
.ox-msg__body { font-size: 14px; line-height: 1.45; }
.ox-msg__body p { margin: 0; }
.ox-msg--system { align-self: center; max-width: 90%; padding: 3px 12px !important; background: none !important; }
.ox-msg--system span { color: var(--ox-slate); font-size: 11.5px; }
.ox-msg__files img { border-radius: 12px; }

@media (max-width: 760px) {
    /* Cỡ chữ đồng đều kiểu Caffi */
    body.ox-app { font-size: 13.5px; }
    .ox-page-head h1, .ox-page-title h1 { font-size: 20px !important; }
    .ox-card__title, .ox-card__head h2, .ins-head h2, .ox-section__head h2 { font-size: 15px !important; }
    .ox-card { padding: 16px; border-radius: 16px; }
    .ox-card--flush { padding: 0; }
    input, select, textarea { font-size: 14px !important; }
    select, input[type="search"], input[type="text"], input[type="email"], input[type="tel"], input[type="date"] { height: 40px; }
    .ox-input-icon input::placeholder { font-size: 13px; }
    .ox-pills a, .ox-pills button, .ox-subsubsub a { padding: 7px 12px !important; font-size: 12.5px !important; }
    .ox-badge { font-size: 11px; padding: 2px 8px; }
    .ox-btn { font-size: 13px; }
    /* Tổng quan: chọn kỳ xuống dòng (menu Khác không bị cắt) */
    .oxd-period__pills { flex-wrap: wrap !important; overflow: visible !important; width: 100%; }

    /* Mọi bảng → thẻ: tiêu đề trên cùng, các dòng "nhãn ····· giá trị" có gạch đứt */
    .ox-table:not(.ox-table--edit) thead { display: none !important; }
    .ox-table:not(.ox-table--edit), .ox-table:not(.ox-table--edit) tbody { display: block !important; width: 100% !important; }
    .ox-table:not(.ox-table--edit) tbody tr { position: relative; display: flex !important; flex-direction: column !important; gap: 0 !important; margin: 0 !important; padding: 12px 14px !important; border: 0 !important; border-bottom: 8px solid var(--ox-bg) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; grid-template-columns: none !important; }
    .ox-table:not(.ox-table--edit) tbody tr:last-child { border-bottom: 0 !important; }
    .ox-table:not(.ox-table--edit) tbody td { display: flex !important; flex-direction: row !important; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px 8px; width: auto !important; min-width: 0; padding: 7px 0 !important; border: 0 !important; border-top: 1px dashed #ece4dd !important; text-align: right !important; font-size: 13px; grid-column: auto !important; position: static !important; }
    .ox-table:not(.ox-table--edit) tbody td::before { content: attr(data-label); position: static !important; margin-right: auto; padding-right: 10px; color: var(--ox-muted); font-size: 12px; font-weight: 500; text-transform: none !important; letter-spacing: 0 !important; text-align: left; white-space: nowrap; }
    .ox-table:not(.ox-table--edit) tbody td:not([data-label])::before { content: none; }
    .ox-table:not(.ox-table--edit) tbody td > small, .ox-table:not(.ox-table--edit) tbody td .ox-block { display: block; width: 100%; text-align: right; font-size: 11.5px; }
    /* Ô đầu = tiêu đề thẻ */
    .ox-table:not(.ox-table--edit) tbody td[data-label]:first-child, .ox-table:not(.ox-table--edit) tbody td.ox-cell-check + td[data-label] { display: block !important; padding: 0 64px 8px 0 !important; border-top: 0 !important; text-align: left !important; font-size: 14.5px; }
    .ox-table:not(.ox-table--edit) tbody td[data-label]:first-child::before, .ox-table:not(.ox-table--edit) tbody td.ox-cell-check + td[data-label]::before { content: none; }
    .ox-table:not(.ox-table--edit) tbody td[data-label]:first-child > small, .ox-table:not(.ox-table--edit) tbody td.ox-cell-check + td[data-label] > small { text-align: left; }
    .ox-table:not(.ox-table--edit) tbody td.ox-cell-check { position: absolute !important; top: 12px; right: 14px; padding: 0 !important; border: 0 !important; }
    /* Hàng thao tác cuối thẻ: nút có chữ */
    .ox-table:not(.ox-table--edit) tbody td:not([data-label]):not(.ox-cell-check):last-child { justify-content: flex-end; gap: 6px; padding-top: 10px !important; }
    .ox-table tbody td:not([data-label]):last-child .ox-icon-btn { width: auto; min-width: 38px; padding: 0 12px; border: 1px solid var(--ox-border); border-radius: 10px; gap: 6px; color: var(--ox-text) !important; font: 600 12.5px var(--ox-font); }
    .ox-mlabel { display: inline; }
    .ox-perpage { padding: 10px 14px; }

    /* Phiếu hỗ trợ: ô trả lời gọn */
    .ox-conv__reply { padding: 10px; }
    .ox-conv__reply .wp-editor-tools { display: flex; justify-content: space-between; }
    .ox-conv__reply .mce-toolbar .mce-btn button { padding: 3px 4px; }
    .ox-conv__bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
    .ox-conv__bar select { min-width: 0; height: 40px; font-size: 13px !important; }
    .ox-conv__bar .ox-btn--primary { grid-column: 1 / -1; min-height: 44px; }
    .ox-attach { padding: 0 12px; }
    .ox-msg { max-width: 86%; }
}
@media (max-width: 760px) {
    .ox-table tbody td:not([data-label]):last-child .ox-icon-btn { display: inline-flex !important; flex-direction: row !important; align-items: center; height: 36px; }
    .ox-table tbody td:not([data-label]):last-child .ox-icon-btn .ox-icon { width: 16px; height: 16px; }
    /* Ô đầu tiên (kể cả không có nhãn) luôn là tiêu đề thẻ, căn trái */
    .ox-table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check) { justify-content: flex-start !important; align-items: flex-start; flex-wrap: nowrap !important; gap: 12px !important; padding: 0 76px 10px 0 !important; border-top: 0 !important; text-align: left !important; }
    .ox-table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check)::before { content: none !important; }
    .ox-table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check) * { text-align: left; }
    .ox-table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check) > :not(img):not(.ox-cx-thumb) { min-width: 0; }
    .ox-table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check) strong, .ox-table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check) a { font-size: 14px; line-height: 1.35; }
}
.ox-conv__reply .quicktags-toolbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 5px !important; border-radius: 10px 10px 0 0; background: var(--ox-surface-2) !important; }
.ox-conv__reply .quicktags-toolbar input.button { min-height: 0 !important; height: 28px; margin: 0 !important; padding: 0 8px !important; border: 1px solid var(--ox-border) !important; border-radius: 7px !important; background: #fff !important; color: var(--ox-text) !important; font: 600 12px var(--ox-font) !important; box-shadow: none !important; }
.ox-conv__reply .wp-editor-container { border-radius: 10px; overflow: hidden; border-color: var(--ox-border) !important; }
.ox-conv__reply .wp-switch-editor { border-radius: 7px 7px 0 0; font-size: 12px; }

/* Điện thoại: danh sách bài viết / thông báo dạng hàng gọn (ảnh nhỏ · tiêu đề · 1 dòng nhãn) */
@media (max-width: 760px) {
    .ox-table.ox-cx-cards tbody tr { flex-direction: row !important; flex-wrap: wrap !important; align-items: center; gap: 6px !important; padding: 12px 14px 12px !important; border-bottom: 1px solid var(--ox-border) !important; }
    .ox-table.ox-cx-cards tbody tr:last-child { border-bottom: 0 !important; }
    .ox-table.ox-cx-cards tbody td:first-child { flex: 0 0 100%; padding: 0 70px 0 0 !important; }
    .ox-cx-cards .ox-post-cell { display: flex; align-items: center; gap: 10px; }
    .ox-cx-cards .ox-post-cell__thumb { width: 52px !important; height: 52px !important; flex: none; border-radius: 12px !important; background-size: cover; background-position: center; }
    .ox-cx-cards .ox-cx-title strong { font-size: 13.5px !important; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .ox-cx-cards .ox-cx-pin { font-size: 10.5px; padding: 1px 6px; margin-left: 4px; }
    .ox-cx-cards .ox-cx-sub { font-size: 11.5px !important; }
    /* Các nhãn thành 1 hàng chip ngay dưới tiêu đề */
    .ox-table.ox-cx-cards tbody td[data-label] { flex: none !important; padding: 0 !important; border: 0 !important; font-size: 12px; }
    .ox-table.ox-cx-cards tbody td[data-label]::before { content: none !important; }
    .ox-table.ox-cx-cards tbody td[data-label]:nth-child(2) { margin-left: 62px; }
    .ox-cx-cards td[data-label] a, .ox-cx-cards td[data-label] .ox-cx-muted { display: inline-flex; padding: 2px 9px; border-radius: 99px; background: var(--ox-surface-2); color: var(--ox-muted) !important; font-size: 11px; font-weight: 600; }
    .ox-cx-cards td[data-label] .ox-badge { font-size: 10.5px; padding: 2px 8px; }
    .ox-cx-cards td[data-label] > small, .ox-cx-cards td[data-label] .ox-block, .ox-cx-cards td[data-label] .ox-cx-bar { display: none !important; }
    /* Nút sửa / xoá: góc phải trên */
    .ox-table.ox-cx-cards tbody td.ox-cx-actions { position: absolute !important; top: 12px; right: 12px; padding: 0 !important; border: 0 !important; }
    .ox-cx-cards .ox-cx-tools { display: flex; gap: 4px; }
    .ox-cx-cards .ox-cx-tools .ox-tool, .ox-cx-cards .ox-cx-tools button { width: 30px; height: 30px; min-height: 0; padding: 0; }
}
/* Bảng quyền theo vai trò: giữ dạng bảng nhỏ gọn trên điện thoại */
@media (max-width: 760px) {
    .ox-table.sy-perm__table { display: table !important; width: 100% !important; table-layout: fixed; }
    .ox-table.sy-perm__table thead { display: table-header-group !important; }
    .ox-table.sy-perm__table tbody { display: table-row-group !important; }
    .ox-table.sy-perm__table tr, .ox-table.sy-perm__table tbody tr { display: table-row !important; padding: 0 !important; border: 0 !important; background: none !important; }
    .ox-table.sy-perm__table th, .ox-table.sy-perm__table tbody td { display: table-cell !important; padding: 8px 4px !important; border: 0 !important; border-top: 1px dashed #ece4dd !important; font-size: 12px !important; text-align: center !important; vertical-align: middle; position: static !important; }
    .ox-table.sy-perm__table th:first-child, .ox-table.sy-perm__table tbody td:first-child { width: 42%; padding-left: 0 !important; text-align: left !important; }
    .ox-table.sy-perm__table tbody td::before { content: none !important; }
    .ox-table.sy-perm__table th { border-top: 0 !important; font-size: 10.5px !important; }
    .ox-table.sy-perm__table th .ox-badge, .ox-table.sy-perm__table th span { font-size: 10px; padding: 2px 6px; }
    .ox-table.sy-perm__table td:first-child .ox-icon, .ox-table.sy-perm__table td:first-child [data-tip], .ox-table.sy-perm__table td:first-child .ox-cus-help { display: none; }
    .ox-table.sy-perm__table td .ox-icon { width: 15px; height: 15px; }
}
@media (max-width: 760px) { .ox-table.sy-perm__table .sy-perm__col { width: 19% !important; white-space: nowrap; } .ox-table.sy-perm__table th:first-child, .ox-table.sy-perm__table tbody td:first-child { width: 43% !important; padding-left: 16px !important; } .ox-table.sy-perm__table th:last-child, .ox-table.sy-perm__table tbody td:last-child { padding-right: 12px !important; } .sy-perm__area { font-size: 12.5px; gap: 6px; } .sy-perm__mark { width: 20px; height: 20px; } }
@media (max-width: 760px) { .ox-table.sy-perm__table:not(.ox-table--edit) tbody td:first-child:not(.ox-cell-check) { display: table-cell !important; padding: 9px 4px 9px 16px !important; border-top: 1px dashed #ece4dd !important; } .ox-table.sy-perm__table thead th:first-child { padding-left: 16px !important; } }
.ox-cx-mline, .ox-cx-mcat { display: none; }
@media (max-width: 760px) {
    .ox-cx-posts .ox-cx-sub, .ox-cx-posts .ox-cx-dpin { display: none !important; }
    .ox-table.ox-cx-posts tbody td[data-label] { display: none !important; }
    .ox-cx-posts .ox-post-cell { align-items: flex-start; }
    .ox-cx-posts .ox-post-cell > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .ox-cx-mline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--ox-slate); font-size: 11.5px; }
    .ox-cx-mline i { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; font-style: normal; font-weight: 600; font-size: 10.5px; }
    .ox-cx-mline .is-pin { background: var(--ox-amber-soft); color: #b45309; }
    .ox-cx-mline .is-yt { background: var(--ox-red-soft); color: var(--ox-red); }
    .ox-cx-mline .is-post { background: var(--ox-blue-soft); color: var(--ox-blue); }
    .ox-cx-mline .is-on { background: var(--ox-green-soft); color: var(--ox-green); }
    .ox-cx-mline .is-off { background: var(--ox-gray-soft); color: var(--ox-muted); }
    .ox-cx-mcat { display: inline-flex; align-items: center; gap: 4px; color: var(--ox-muted); font-size: 11.5px; font-weight: 600; }
    .ox-cx-mcat .ox-icon { color: var(--ox-primary); }
    .ox-cx-posts .ox-post-cell__thumb { width: 60px !important; height: 60px !important; }
}
@media (max-width: 760px) {
    .ox-table.ox-cx-posts tbody td:first-child:not(.ox-cell-check) { padding-right: 0 !important; }
    .ox-cx-posts .ox-cx-title { padding-right: 70px; }
    .ox-cx-mline { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
    .ox-cx-mline > * { flex: none; }
}

/* ===== Thẻ dữ liệu mobile dùng chung (mc) – thay kiểu "nhãn trái / giá trị phải" ===== */
.mc { display: none; }
@media (max-width: 760px) {
    .ox-table.has-mc:not(.ox-table--edit) tbody tr { padding: 14px !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td[data-label]:not(.mc-cell):not(.mc-keep) { display: none !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td.mc-cell { display: block !important; padding: 0 !important; border: 0 !important; font-size: 13px; text-align: left !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td.mc-cell::before { content: none !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td.mc-cell > :not(.mc):not(template) { display: none !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td.mc-keep { display: block !important; padding: 10px 0 0 !important; border: 0 !important; text-align: left !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td.mc-keep::before { content: none !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td:not([data-label]):not(.ox-cell-check):not(.mc-cell):last-child { display: flex !important; justify-content: flex-end; gap: 6px; margin-top: 12px; padding: 10px 0 0 !important; border-top: 1px dashed #ece4dd !important; }
    .ox-table.has-mc:not(.ox-table--edit) tbody td:not([data-label]):not(.ox-cell-check):not(.mc-cell):last-child:empty { display: none !important; }

    .mc { display: block; --c: var(--ox-green); --cs: var(--ox-green-soft); text-align: left; }
    .mc--amber { --c: var(--ox-amber); --cs: var(--ox-amber-soft); }
    .mc--red { --c: var(--ox-red); --cs: var(--ox-red-soft); }
    .mc--gray, .mc--slate { --c: #6b7486; --cs: #f2f3f6; }
    .mc--blue { --c: var(--ox-blue); --cs: var(--ox-blue-soft); }
    .mc--brand { --c: var(--ox-primary); --cs: var(--ox-primary-soft); }
    .ox-table td .mc a.mc__id { text-decoration: none; }
    /* Vạch đỏ dòng đang khoá: đặt ở mép thẻ, không đè lên nội dung */
    .ox-app .ox-table.has-mc tr.is-danger td:first-child { box-shadow: none !important; }
    .ox-app .ox-table.has-mc tbody tr.is-danger { box-shadow: inset 3px 0 0 var(--ox-red) !important; }
    .ox-table td .mc a.mc__tag--count { align-self: center; padding: 3px 10px; background: var(--cs); color: var(--c) !important; font-size: 11.5px; font-weight: 700; text-decoration: none; }
    .ox-cx-cards td[data-label] .mc a.mc__id { display: flex; padding: 0; border-radius: 0; background: none; color: inherit !important; font-size: inherit; }
    .mc__tag--count::before { content: none !important; }
    .mc * { text-align: left; }

    .mc__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .ox-table td .mc a.mc__head:not(.ox-btn), .ox-table td .mc .mc__head a:not(.ox-btn) { color: var(--ox-text) !important; text-decoration: none; }
    .mc__ava { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #ff8a3d, #e8401c); color: #fff; font-size: 16px; font-weight: 800; }
    .mc__ava--ic { background: var(--cs); color: var(--c); }
    .mc__id { display: flex; flex: 1; flex-direction: column; min-width: 0; }
    .ox-table td .mc .mc__id strong, .ox-table td .mc .mc__id b { overflow: hidden; color: var(--ox-text); font-size: 14.5px !important; font-weight: 700; line-height: 1.3 !important; white-space: nowrap; text-overflow: ellipsis; }
    .mc__id small { overflow: hidden; color: var(--ox-muted); font-size: 12px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
    .mc__tag { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--cs); color: var(--c); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
    .mc__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

    .mc__kv { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); margin-top: 12px; border-radius: 12px; background: var(--cs); }
    .mc__kv > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 9px 12px; }
    .mc__kv > div + div { border-left: 1px dashed color-mix(in srgb, var(--c) 30%, transparent); }
    .mc__kv small { color: var(--ox-muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
    .mc__kv b { overflow: hidden; color: var(--ox-text); font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
    .mc__kv b.is-up { color: var(--ox-green); }
    .mc__kv b.is-down { color: var(--ox-red); }
    .mc__kv em { display: inline-flex; align-items: center; gap: 5px; color: var(--c); font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; }
    .mc__kv em::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
    .mc__kv span { overflow: hidden; color: var(--ox-muted); font-size: 11px; letter-spacing: -.1px; white-space: nowrap; text-overflow: ellipsis; }
    .mc__kv--plain { background: #f7f5f3; }

    .mc__info { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
    .mc__info li { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--ox-text); font-size: 12.5px; line-height: 1.4; }
    .mc__info li > svg { flex: none; color: var(--ox-slate); }
    .mc__info li > span { overflow: hidden; min-width: 0; white-space: nowrap; text-overflow: ellipsis; }
    .mc__info li > small { flex: none; margin-left: auto; color: var(--ox-muted); font-size: 11.5px; }
    .ox-table td .mc .mc__info a.mc__pill:not(.ox-btn), .mc__pill { flex: none; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 9px; border-radius: 99px; background: var(--ox-primary-soft); color: var(--ox-primary) !important; font-size: 12px !important; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
    .mc__pill.is-red { background: var(--ox-red-soft); color: var(--ox-red) !important; }
    .mc__pill.is-amber { background: var(--ox-amber-soft); color: var(--ox-amber) !important; }
    .mc__pill.is-gray { background: #f2f3f6; color: #6b7486 !important; }
    .mc__note { margin: 8px 0 0; color: var(--ox-muted); font-size: 12px; line-height: 1.45; }
}
@media (max-width: 760px) {
    .mc__kv em.c-red { color: var(--ox-red); } .mc__kv em.c-amber { color: var(--ox-amber); } .mc__kv em.c-green { color: var(--ox-green); }
    .mc__kv em.c-blue { color: var(--ox-blue); } .mc__kv em.c-gray, .mc__kv em.c-slate { color: #6b7486; }
    .ox-table.has-mc tbody td:last-child .ox-icon-btn:has(.ox-mlabel), .ox-table.has-mc tbody td:last-child .ox-btn { flex: 1; justify-content: center; width: auto; height: 34px; gap: 6px; font-size: 12.5px; }
    .ox-table.has-mc tbody td.ox-connect__row-actions:has(> div:empty) { display: none !important; }
    .ox-table.has-mc tbody td.ox-connect__row-actions > div { display: flex; flex: 1; justify-content: flex-end; gap: 6px; }
}
@media (max-width: 760px) {
    /* mc thắng các luật bảng cũ (ox-cx-cards, selectable…) */
    .ox-app .ox-table.has-mc tbody tr > td.mc-cell { flex: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .ox-app .ox-table.has-mc tbody tr > td.mc-keep { flex: none !important; width: 100% !important; margin: 0 !important; }
    .ox-app .ox-table.has-mc.ox-cx-cards tbody tr { display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 0 !important; padding: 14px !important; }
    .ox-app .ox-table.has-mc.ox-cx-cards tbody tr > td:last-child:not(.mc-cell):not(.mc-keep) { position: static !important; display: flex !important; justify-content: flex-end; gap: 6px; width: 100% !important; margin-top: 10px !important; padding: 10px 0 0 !important; border-top: 1px dashed #ece4dd !important; }
    .ox-app .ox-table.has-mc.ox-cx-cards tbody tr > td:last-child > div { display: flex; gap: 6px; margin-left: auto; }
    .ox-app .ox-table.has-mc.ox-cx-cards tbody tr > td.ox-connect__row-actions:has(> div:empty) { display: none !important; }
    .ox-app .ox-table.has-mc tbody tr > td.mc-keep .ox-input-tools { display: flex; width: 100%; }
    .ox-app .ox-table.has-mc tbody tr > td.mc-keep .ox-input-tools input { flex: 1; min-width: 0; height: 36px; font-size: 12px; }
    .ox-app .ox-table.has-mc .ox-lock-form { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
    .ox-app .ox-table.has-mc .ox-lock-form select { width: 100%; min-width: 0; height: 36px; font-size: 12.5px; }
    .ox-app .ox-table.has-mc .ox-lock-form .ox-inline-check { grid-column: 1 / -1; font-size: 12px; }
    .ox-app .ox-table.has-mc .ox-lock-form .ox-btn { grid-column: 1 / -1; justify-content: center; height: 34px; }
    .ox-app .ox-table.has-mc tbody tr > td.ox-cx-actions .ox-cx-tools { display: flex; gap: 6px; margin-left: auto; }
    .ox-app .ox-table.has-mc .mc a.mc__head { padding-right: 0; }
    .ox-app .ox-cus-table.has-mc .mc a.mc__head { padding-right: 34px; }
}
@media (max-width: 760px) {
    .ox-app .ox-table.has-mc.ox-cx-cards tbody tr > td.ox-connect__row-actions:last-child:not(.mc-cell):not(.mc-keep):has(> div:empty) { display: none !important; }
    .ox-app .ox-table.has-mc .ox-lock-form select { padding-left: 10px; padding-right: 26px; font-size: 12px; text-overflow: ellipsis; }
}
@media (max-width: 760px) { .ox-app .ox-table.has-mc .ox-lock-form { grid-template-columns: 1.3fr 1fr; } }

/* ===== Thẻ yêu cầu hỗ trợ (kanban) – bản gọn ===== */
.ox-kcard { gap: 7px; }
.ox-kcard__top { gap: 8px; }
.ox-kcard__ava { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #ff8a3d, #e8401c); color: #fff; font-size: 11.5px; font-weight: 800; }
.ox-kcard__top .ox-kcard__site { flex: 1; overflow: hidden; min-width: 0; color: var(--ox-muted); font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.ox-kcard__top small.ox-kcard__time { flex: none; display: inline-flex; align-items: center; gap: 3px; color: var(--ox-slate); font-size: 11px; font-weight: 500; }
.ox-kcard__top small.ox-kcard__time.is-client { color: var(--ox-primary); font-weight: 700; }
.ox-kcard__title { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ox-kcard__title .ox-nav__badge { position: static; display: inline-block; min-width: 18px; height: 18px; margin-left: 2px; padding: 0 5px; font-size: 10.5px; line-height: 18px; vertical-align: 1px; animation: oxPulse 1.6s ease-out infinite; }
.ox-kcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ox-kcard__code { color: var(--ox-slate); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ox-kcard__meta .ox-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; font-size: 10.5px; }
.ox-kcard__meta .ox-avatar { margin-left: auto; }
.ox-kcard__wait { display: flex; align-items: center; gap: 6px; margin: 2px -13px -12px; padding: 6px 13px; border-radius: 0 0 13px 13px; background: var(--ox-primary-soft); color: var(--ox-primary); font-size: 11.5px; font-weight: 600; }
.ox-kcard__wait::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: oxPulse 1.6s ease-out infinite; }
.ox-kcard { overflow: hidden; }
.ox-kcard.is-late { box-shadow: inset 3px 0 0 var(--ox-red); }
.ox-sp-alert { display: none; }
@media (max-width: 760px) {
    .ox-sp-kpis { display: none !important; }
    .ox-sp-alert { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 9px 12px; border-radius: 12px; background: var(--ox-red-soft); color: var(--ox-red); font-size: 12.5px; }
    .ox-sp-alert svg { flex: none; }
    .ox-board-filter.ox-card { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
    .ox-board-filter .ox-input-icon input { height: 40px; border-radius: 12px; background: #fff; }
    .ox-kcard { padding: 12px 13px; border-radius: 14px; }
}

/* ===== Ô thống kê mobile gọn: icon trái, 2 hàng (nhãn / số · phụ) ===== */
@media (max-width: 760px) {
    .ox-kpis--row { gap: 8px !important; }
    .ox-kpis--row .ox-kpi { display: grid !important; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 6px; row-gap: 1px; min-height: 0 !important; padding: 10px 10px 10px 52px !important; border-radius: 14px !important; }
    .ox-kpis--row .ox-kpi::before { left: 10px !important; top: 50% !important; width: 34px !important; height: 34px !important; margin-top: -17px !important; }
    .ox-kpis--row .ox-kpi::after { left: 18px !important; top: 50% !important; width: 18px !important; height: 18px !important; margin-top: -9px !important; }
    .ox-kpis--row .ox-kpi .ox-kpi__label { grid-column: 1 / -1; overflow: hidden; margin: 0; font-size: 11.5px !important; line-height: 1.3; white-space: nowrap !important; text-overflow: ellipsis; }
    .ox-kpis--row .ox-kpi .ox-kpi__value { margin: 0; font-size: 16px !important; line-height: 1.25 !important; }
    .ox-kpis--row .ox-kpi > small { overflow: hidden; min-width: 0; margin: 0; font-size: 10.5px; white-space: nowrap; text-overflow: ellipsis; }
    .ox-kpis--row .ox-kpi--link > .ox-icon { top: 10px !important; right: 8px; width: 13px; height: 13px; }
    .ox-kpis--row > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .ox-kpis--row .ox-kpi { display: flex !important; flex-wrap: wrap; align-items: baseline; }
    .ox-kpis--row .ox-kpi .ox-kpi__label { flex: 0 0 100%; }
    .ox-kpis--row .ox-kpi > small { flex: 1 1 60px; }
    /* Tổng quan */
    .oxd-kpis { gap: 8px !important; }
    .oxd-kpi { position: relative; display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px !important; min-height: 0 !important; padding: 10px 12px !important; border-radius: 14px !important; }
    .oxd-kpi > .ox-ic { flex: none; width: 34px !important; height: 34px !important; margin: 0 !important; }
    .oxd-kpi > .ox-ic svg { width: 17px; height: 17px; }
    .oxd-kpi__body { display: flex !important; flex-direction: column; gap: 0 !important; min-width: 0; }
    .oxd-kpi__label { overflow: hidden; font-size: 11.5px !important; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
    .oxd-kpi__value { font-size: 15.5px !important; line-height: 1.3 !important; white-space: nowrap; letter-spacing: -.02em; }
    .oxd-kpi__body small { overflow: hidden; font-size: 10.5px !important; white-space: nowrap; text-overflow: ellipsis; }
    .oxd-kpi--link > svg:last-child { position: absolute; top: 8px; right: 6px; width: 13px; height: 13px; margin: 0 !important; }
}
@media (max-width: 760px) {
    .ox-app .ox-kpis--row .ox-kpi { flex-direction: row !important; flex-wrap: wrap !important; justify-content: flex-start !important; align-content: center; column-gap: 6px !important; row-gap: 0 !important; min-height: 0 !important; padding: 10px 10px 10px 52px !important; text-align: left !important; }
    .ox-app .ox-kpis--row .ox-kpi .ox-kpi__label { flex: 0 0 100% !important; text-align: left; }
    .ox-app .ox-kpis--row .ox-kpi .ox-kpi__value { flex: none; font-size: 16px !important; overflow-wrap: normal; white-space: nowrap; }
    .ox-app .ox-kpis--row .ox-kpi > small { flex: 1 1 60px !important; font-size: 10.5px !important; line-height: 1.5 !important; }
}
@media (max-width: 760px) {
    /* Không cắt chữ: dòng phụ thiếu chỗ thì xuống hàng riêng */
    .ox-app .ox-kpis--row .ox-kpi > small { flex: 1 0 auto !important; max-width: 100%; white-space: nowrap; }
    .ox-app .ox-kpis--row .ox-kpi .ox-kpi__label { white-space: normal !important; overflow: visible; }
    .oxd-kpi__label { white-space: normal !important; overflow: visible !important; }
}
@media (max-width: 760px) {
    .ox-sp-kpis { display: grid !important; }
    .ox-page-head .ox-muted, .ox-page-head p { white-space: normal !important; overflow: visible !important; text-wrap: pretty; line-height: 1.45; }
    /* Phân tích / Doanh thu dự án: icon trái, 3 dòng gọn */
    .ins-kpis { gap: 8px !important; }
    .ins-kpi { flex-direction: row !important; align-items: center !important; gap: 10px !important; padding: 10px 12px !important; border-radius: 14px !important; }
    .ins-kpi .ox-ic { flex: none; width: 34px !important; height: 34px !important; }
    .ins-kpi small { font-size: 11.5px !important; line-height: 1.3; white-space: nowrap !important; }
    .ins-kpi strong { font-size: 15.5px !important; line-height: 1.3 !important; letter-spacing: -.02em; }
    .ins-kpi em { font-size: 10.5px !important; line-height: 1.4; white-space: nowrap !important; }
    .oxd-kpi__label { white-space: nowrap !important; }
    .oxd-stbar span, .ox-dot + span { white-space: nowrap; overflow: visible !important; text-overflow: clip !important; }
}
@media (max-width: 760px) {
    .sy-stats { gap: 8px !important; }
    .sy-stat { gap: 10px !important; min-height: 0 !important; padding: 10px 12px !important; border-radius: 14px !important; }
    .sy-stat .ox-ic, .sy-stat > span:first-child:not(.sy-stat__txt) { flex: none; width: 34px !important; height: 34px !important; }
    .sy-stat__txt strong { font-size: 16px !important; line-height: 1.25 !important; }
    .sy-stat__txt small { font-size: 11.5px !important; }
}
@media (max-width: 760px) {
    /* Bớt khoảng trống: đáy trang sát menu dưới, khoảng cách khối đều 12px */
    body.ox-app { padding-bottom: calc(58px + env(safe-area-inset-bottom)) !important; }
    .ox-app .ox-content { padding: 12px 12px 12px !important; gap: 12px !important; }
    .ox-app .ox-card { padding: 14px; }
    .ox-app .ox-card--flush { padding: 0; }
    .ox-app .ox-page-head { margin-bottom: 0; }
}

/* ===== Chi tiết phiếu: 3 cột (khách + xử lý | chat | ảnh · video · liên kết) ===== */
.ox-tk3 { display: grid; grid-template-columns: 280px minmax(0, 1fr) 280px; grid-template-areas: "info chat side"; gap: 16px; align-items: start; }
.ox-tk3__info { grid-area: info; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 96px; }
.ox-tk3 > .ox-conv { grid-area: chat; }
.ox-tk3__side { grid-area: side; position: sticky; top: 96px; }
.ox-tk3 > .ox-conv .ox-conv__thread { min-height: 380px; max-height: calc(100vh - 380px); }
.ox-tk3 .ox-card { padding: 16px; }
.ox-tk3 .ox-card__title { margin: 0 0 4px; font-size: 14.5px; }
.ox-tk3__who { display: flex; align-items: center; gap: 10px; color: var(--ox-text) !important; text-decoration: none; }
.ox-tk3__ava { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #ff8a3d, #e8401c); color: #fff; font-size: 17px; font-weight: 800; }
.ox-tk3__who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ox-tk3__who strong { overflow: hidden; font-size: 14.5px; white-space: nowrap; text-overflow: ellipsis; }
.ox-tk3__who small { overflow: hidden; color: var(--ox-muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.ox-tk3__rows { display: grid; gap: 0; margin: 12px 0; padding: 0; list-style: none; }
.ox-tk3__rows li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 0; border-top: 1px dashed #ece4dd; font-size: 12.5px; }
.ox-tk3__rows li:first-child { border-top: 0; }
.ox-tk3__rows li > svg { flex: none; color: var(--ox-slate); }
.ox-tk3__rows li > span { overflow: hidden; min-width: 0; color: var(--ox-text); white-space: nowrap; text-overflow: ellipsis; }
.ox-tk3__rows li > b { flex: none; margin-left: auto; font-size: 12px; }
.ox-tk3__rows a { color: var(--ox-primary) !important; font-weight: 600; }
.ox-tk3__proc { display: flex; flex-direction: column; gap: 10px; }
.ox-tk3__proc .ox-field__label { font-size: 12px; }
.ox-tk3__proc select, .ox-tk3__proc input { height: 38px; font-size: 13px; }
.ox-tk3__two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ox-tk3__side .ox-media__tabs { margin-top: 0; }
@media (max-width: 1280px) {
    .ox-tk3 { grid-template-columns: 270px minmax(0, 1fr); grid-template-areas: "info chat" "side chat"; }
    .ox-tk3__info { position: static; }
    .ox-tk3__side { position: static; }
}
@media (max-width: 860px) {
    .ox-tk3 { display: flex; flex-direction: column; gap: 12px; }
    .ox-tk3 > .ox-conv { order: -1; }
    .ox-tk3__info, .ox-tk3__side { width: 100%; }
    .ox-tk3 > .ox-conv .ox-conv__thread { min-height: 300px; max-height: 60vh; }
}
/* Nút xem thêm từng cột */
.ox-kcard.is-clip { display: none !important; }
.ox-board__morebtn { display: block; width: calc(100% - 20px); margin: 0 10px 10px; padding: 8px; border: 1px dashed #f1c9b6; border-radius: 10px; background: #fffaf6; color: var(--ox-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ox-board__morebtn:hover { background: var(--ox-primary); border-color: var(--ox-primary); color: #fff; }
.ox-board__morebtn[hidden] { display: none; }
.ox-sp-period { align-self: flex-start; }
@media (max-width: 760px) { .ox-sp-period { overflow-x: auto; max-width: 100%; scrollbar-width: none; } .ox-sp-period a { white-space: nowrap; } }
/* Chat hẹp lại, cột phương tiện rộng hơn */
.ox-tk3 { grid-template-columns: 270px minmax(0, 1fr) 360px; }
.ox-tk3__side .ox-media__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ox-tk3__side .ox-media__tabs button { white-space: nowrap; }
@media (max-width: 1440px) { .ox-tk3 { grid-template-columns: 260px minmax(0, 1fr) 320px; } }
@media (max-width: 1280px) { .ox-tk3 { grid-template-columns: 270px minmax(0, 1fr); } }

/* Phương tiện: giới hạn số mục + popup xem */
.ox-media .is-more { display: none !important; }
.ox-media__all { display: block; width: 100%; margin-top: 10px; padding: 8px; border: 1px dashed #f1c9b6; border-radius: 10px; background: #fffaf6; color: var(--ox-primary); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ox-media__all:hover { background: var(--ox-primary); border-color: var(--ox-primary); color: #fff; }
.ox-media__grid a[data-lb] { cursor: zoom-in; }
.ox-mall { width: min(760px, 94vw); }
.ox-mall .ox-modal__body { max-height: 70vh; overflow-y: auto; }
.ox-mall .ox-media__grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
html.ox-lb-open { overflow: hidden; }
.ox-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(12, 14, 20, .92); }
.ox-lb[hidden] { display: none; }
.ox-lb__stage { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 56px 72px 64px; }
.ox-lb__stage img, .ox-lb__stage video { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.ox-lb__x { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.ox-lb__nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .15s; }
.ox-lb__nav:hover, .ox-lb__x:hover { background: var(--ox-primary); }
.ox-lb__nav.is-prev { left: 16px; } .ox-lb__nav.is-next { right: 16px; }
.ox-lb__nav[hidden] { display: none; }
.ox-lb__bar { position: absolute; bottom: 16px; left: 50%; display: flex; align-items: center; gap: 14px; transform: translateX(-50%); padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; }
.ox-lb__open { color: #fff !important; font-weight: 600; text-decoration: underline; }
@media (max-width: 760px) { .ox-lb__stage { padding: 56px 8px 64px; } .ox-lb__nav { top: auto; bottom: 10px; margin: 0; width: 42px; height: 42px; } .ox-lb__nav.is-prev { left: 12px; } .ox-lb__nav.is-next { right: 12px; } }
.ox-lock-protect { white-space: nowrap; font-size: 12.5px; }
/* Thanh số dòng / trang: không kéo giãn ô chọn, chữ không rớt dòng */
.ox-app .ox-perpage { flex-wrap: nowrap; }
.ox-app .ox-perpage > span { flex: none; white-space: nowrap; }
.ox-app .ox-perpage select { flex: none; width: auto !important; min-width: 0; max-width: 140px; }
.ox-connect__src { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px 8px; align-items: end; margin: 10px 0; padding-top: 10px; border-top: 1px dashed #ece4dd; }
.ox-connect__src > .ox-field__label { grid-column: 1 / -1; }
.ox-connect__src label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ox-connect__src label small { color: var(--ox-muted); font-size: 11.5px; }
.ox-connect__src select { width: 100%; min-width: 0; height: 34px; font-size: 12.5px; }
.sy-smtp__on { margin-bottom: 14px; }
/* Cách gửi mail: 3 thẻ chọn, chỉ hiện phần cấu hình của cách đang chọn */
.sy-mode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.sy-mode__opt { position: relative; cursor: pointer; }
.sy-mode__opt input { position: absolute; opacity: 0; pointer-events: none; }
.sy-mode__card { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--ox-border); border-radius: 12px; background: var(--ox-surface, #fff); transition: border-color .15s, box-shadow .15s; }
.sy-mode__card b { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sy-mode__card b em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--ox-green-soft); color: var(--ox-green); }
.sy-mode__card small { color: var(--ox-slate, #64748b); font-size: 12px; line-height: 1.4; }
.sy-mode__card i { font-style: normal; font-size: 11.5px; color: var(--ox-slate, #64748b); margin-top: 2px; overflow-wrap: anywhere; }
.sy-mode__opt input:checked + .sy-mode__card { border-color: var(--ox-primary, #f15a24); box-shadow: 0 0 0 3px rgba(241, 90, 36, .12); }
.sy-mode__opt input:focus-visible + .sy-mode__card { outline: 2px solid var(--ox-primary, #f15a24); outline-offset: 2px; }
.sy-pane { display: none; margin-bottom: 14px; }
#smtp:has(input[value="gmail"]:checked) .sy-pane--gmail,
#smtp:has(input[value="smtp"]:checked) .sy-pane--smtp { display: grid; }
.sy-pane--gmail { gap: 12px; grid-template-columns: minmax(0, 1fr); }
.sy-pane > *, .sy-mode > * { min-width: 0; }
.sy-gm__state { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.sy-gm__state.is-ok { background: var(--ox-green-soft); color: var(--ox-green); }
.sy-gm__state.is-warn { background: #fff6e5; color: #a15c00; }
.sy-gm__act { display: flex; flex-wrap: wrap; gap: 8px; }
.sy-gm__guide { border: 1px dashed var(--ox-border); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.sy-gm__guide summary { cursor: pointer; font-weight: 600; }
.sy-gm__guide ol { margin: 10px 0 2px; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.sy-smtp__from { margin-top: 4px; }
@media (max-width: 720px) { .sy-mode { grid-template-columns: 1fr; } }
.sy-smtp__port { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
.sy-smtp__test { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ox-border); }
/* Sửa / xoá đơn · lịch sử gia hạn */
.ox-bill-act { white-space: nowrap; }
.ox-bill-act .ox-order-edit { width: 32px; height: 32px; margin-left: 4px; vertical-align: middle; color: var(--ox-muted); }
.ox-order-modal { width: min(520px, 96vw); }
.ox-order-del { margin-right: auto; }
.ox-renew-hist { display: flex; flex-direction: column; margin: 0 0 6px; padding: 0; list-style: none; }
.ox-renew-hist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #ece4dd; }
.ox-renew-hist li > span { display: flex; flex-direction: column; min-width: 0; }
.ox-renew-hist b { font-size: 12.5px; }
.ox-renew-hist small { color: var(--ox-muted); font-size: 11.5px; }
.ox-renew-hist form { display: flex; flex: none; align-items: center; gap: 4px; }
.ox-renew-hist .ox-icon-btn { width: 28px; height: 28px; color: var(--ox-slate); }
.ox-invq__drop { display: inline-flex; margin: 0; }
.ox-invq__drop .ox-icon-btn { width: 30px; height: 30px; color: var(--ox-slate); }
.ox-app td.ox-bill-act { width: 1%; white-space: nowrap !important; }
.ox-app td.ox-bill-act > .ox-btn, .ox-app td.ox-bill-act > .ox-order-edit { display: inline-flex !important; vertical-align: middle; }
.sy-cron__state { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; font-size: 13px; }
.sy-cron__state.is-ok { background: var(--ox-green-soft); color: var(--ox-green); }
.sy-cron__state.is-warn { background: var(--ox-amber-soft); color: var(--ox-amber); }
.sy-cron__state span { color: var(--ox-text); } .sy-cron__state b { color: inherit; }
.sy-cron__state.is-ok b { color: var(--ox-green); } .sy-cron__state.is-warn b { color: var(--ox-amber); }
.sy-cron__steps { margin: 12px 0 14px; padding-left: 20px; color: var(--ox-text); font-size: 13px; line-height: 1.7; }
.sy-cron__steps code { padding: 1px 6px; border-radius: 6px; background: var(--ox-surface-2); font-size: 12px; }
.sy-cron__jobs td { font-size: 13px; }
.sy-mail-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; padding: 10px 12px; border-radius: 10px; background: #fffaf6; border: 1px solid #f6dfd2; color: var(--ox-text); font-size: 12.5px; }
.sy-mail-hint a { font-weight: 700; }

/* ===== Popup gửi mail: xem trước + gửi thử ===== */
.ox-ms { width: min(1080px, 96vw); max-height: 92vh; padding: 0; border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(23, 32, 46, .5); }
.ox-ms[open] { display: flex; flex-direction: column; }
.ox-ms::backdrop { background: rgba(15, 18, 26, .5); backdrop-filter: blur(3px); }
.ox-ms__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ox-border); }
.ox-ms__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #ff7a2e, var(--ox-primary)); color: #fff; }
.ox-ms__head h2 { margin: 0; font-size: 17px; }
.ox-ms__head small { color: var(--ox-muted); font-size: 13px; }
.ox-ms__head .ox-icon-btn { margin-left: auto; font-size: 22px; }
.ox-ms__body { display: grid; grid-template-columns: 320px minmax(0, 1fr); flex: 1; min-height: 0; }
.ox-ms__side { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-right: 1px solid var(--ox-border); background: #fcfbf9; overflow-y: auto; }
.ox-ms__seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #f1ece7; }
.ox-ms__seg button { padding: 9px 6px; border: 0; border-radius: 9px; background: none; color: var(--ox-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ox-ms__seg button.is-active { background: #fff; color: var(--ox-primary); box-shadow: 0 2px 8px -4px rgba(23, 32, 46, .3); }
.ox-ms__block { display: flex; flex-direction: column; gap: 6px; }
.ox-ms__block > small { color: var(--ox-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ox-ms__block > b { font-size: 14px; line-height: 1.45; }
.ox-ms__to { display: flex; flex-direction: column; gap: 6px; }
.ox-ms__chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--ox-border); border-radius: 10px; background: #fff; font-size: 13px; word-break: break-all; }
.ox-ms__chip em { flex: none; padding: 1px 8px; border-radius: 99px; background: var(--ox-surface-2); color: var(--ox-muted); font-size: 11px; font-style: normal; font-weight: 700; }
.ox-ms__chip.is-client em { background: var(--ox-primary-soft); color: var(--ox-primary); }
.ox-ms__chip.is-miss { border-style: dashed; color: var(--ox-red); }
.ox-ms__test { margin-top: auto; padding: 14px; border-radius: 14px; background: #fff; border: 1px dashed #f1c9b6; }
.ox-ms__testrow { display: flex; gap: 6px; }
.ox-ms__testrow input { flex: 1; min-width: 0; height: 36px; font-size: 13px; }
.ox-ms__preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #ece7e2; }
.ox-ms__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #e2dbd4; }
.ox-ms__dots { display: flex; gap: 6px; }
.ox-ms__dots i { width: 10px; height: 10px; border-radius: 50%; background: #d8cfc7; }
.ox-ms__devices { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #fff; }
.ox-ms__devices button { padding: 5px 12px; border: 0; border-radius: 8px; background: none; color: var(--ox-muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ox-ms__devices button.is-active { background: var(--ox-primary); color: #fff; }
.ox-ms__frame { position: relative; flex: 1; display: flex; justify-content: center; min-height: 520px; padding: 16px; overflow: auto; }
.ox-ms__frame iframe { width: 100%; max-width: 680px; height: 100%; min-height: 560px; border: 0; border-radius: 12px; background: #f5f2ee; box-shadow: 0 12px 30px -18px rgba(23, 32, 46, .45); opacity: 0; transition: opacity .2s, max-width .25s; }
.ox-ms__frame.is-ready iframe { opacity: 1; }
.ox-ms__frame.is-mobile iframe { max-width: 390px; border: 8px solid #17202e; border-radius: 28px; }
.ox-ms__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ox-muted); font-size: 13px; }
.ox-ms__frame.is-ready .ox-ms__loading { display: none; }
.ox-ms__foot { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--ox-border); background: #fff; }
.ox-ms__foot small { margin-right: auto; color: var(--ox-muted); font-size: 12.5px; }
.ox-ms .is-loading { opacity: .6; pointer-events: none; }
.sy-mail-hint .ox-btn { margin-left: auto; }
@media (max-width: 860px) {
    .ox-ms { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .ox-ms__body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
    .ox-ms__side { border-right: 0; border-bottom: 1px solid var(--ox-border); }
    .ox-ms__test { margin-top: 0; }
    .ox-ms__frame { min-height: 70vh; padding: 10px; }
    .ox-ms__frame iframe { min-height: 68vh; }
    .ox-ms__foot small { display: none; }
    .ox-ms__foot .ox-btn { flex: 1; justify-content: center; }
}
/* Popup gửi mail – bản hoàn thiện */
.ox-ms[open] { animation: msIn .28s cubic-bezier(.2, .8, .3, 1); }
@keyframes msIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ox-ms__side { gap: 16px; }
.ox-ms__seg button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.ox-ms__seg button i { width: 8px; height: 8px; border-radius: 50%; }
.ox-ms__seg button i.is-amber { background: #f59e0b; } .ox-ms__seg button i.is-green { background: #10b981; }
.ox-ms__sum { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; background: linear-gradient(135deg, #fff4ee, #ffe8da); border: 1px solid #ffe0cf; }
.ox-ms__sum > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.ox-ms__sum > div + div { border-left: 1px dashed #f5c9b1; }
.ox-ms__sum small { color: var(--ox-muted); font-size: 11.5px; }
.ox-ms__sum b { font-size: 16px; font-weight: 800; white-space: nowrap; }
.ox-ms__sum b.is-red { color: var(--ox-red); } .ox-ms__sum b.is-amber { color: #c2700c; } .ox-ms__sum b.is-green { color: var(--ox-green); }
.ox-ms__subject { padding: 10px 12px; border: 1px solid var(--ox-border); border-radius: 10px; background: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.ox-ms__chip { justify-content: flex-start; gap: 10px; padding: 7px 10px; word-break: normal; }
.ox-ms__chip > i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ox-surface-2); color: var(--ox-muted); font-size: 12px; font-style: normal; font-weight: 800; }
.ox-ms__chip.is-client > i { background: linear-gradient(135deg, #ff7a2e, var(--ox-primary)); color: #fff; }
.ox-ms__chip > span { overflow: hidden; flex: 1; min-width: 0; white-space: nowrap; text-overflow: ellipsis; }
.ox-ms__test { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding: 14px; border: 1px dashed #f1c9b6; border-radius: 14px; background: #fff; }
.ox-ms__testhead { display: flex; flex-direction: column; }
.ox-ms__testhead b { font-size: 13.5px; }
.ox-ms__testhead small { color: var(--ox-muted); font-size: 12px; }
.ox-ms__sent { margin: 0; padding: 8px 10px; border-radius: 9px; background: var(--ox-green-soft); color: var(--ox-green); font-size: 12px; font-weight: 600; }
.ox-ms__sent[hidden] { display: none; }
.ox-ms__sent.is-error { background: var(--ox-red-soft, #fdecec); color: var(--ox-red, #d93025); line-height: 1.5; }
.ox-ms__sent.is-wait { background: var(--ox-bg, #f4f5f7); color: var(--ox-slate, #64748b); }
.ox-ms__note { color: var(--ox-slate) !important; }
.ox-ms__foot .ox-btn--primary { gap: 8px; padding: 0 20px; }
.ox-ms__bar { padding: 10px 16px 10px 18px; }
.ox-ms__frame { background: radial-gradient(circle at 50% 0, #f3eee9, #e7e0d9); }
@media (max-width: 860px) {
    .ox-ms__note { display: none; }
    .ox-ms__sum b { font-size: 14.5px; }
}

/* Nút mở nhanh bill ở danh sách khách hàng (website sắp / đã hết hạn có đơn chờ thanh toán) */
.ox-icon-btn.ox-cus-bill { border-color: color-mix(in srgb, var(--ox-primary) 35%, transparent); background: var(--ox-primary-soft); color: var(--ox-primary); }
.ox-app .ox-icon-btn.ox-cus-bill:hover, .ox-app .ox-icon-btn.ox-cus-bill:focus-visible { border-color: #ffb48f !important; background: #ffe3d3 !important; color: #c9370f !important; transform: translateY(-1px); }
.ox-app .ox-icon-btn.ox-cus-bill:hover svg { color: #c9370f !important; stroke: currentColor; }

/* ===== Khoá website trên điện thoại: thẻ tách rời, form gọn, nút có chữ ===== */
.ox-lk-lbl { display: none; }
@media (max-width: 760px) {
    .ox-app .ox-table--locks.has-mc tbody tr { margin: 0 0 10px !important; border: 1px solid var(--ox-border) !important; border-radius: 14px !important; overflow: hidden; }
    .ox-app .ox-table--locks.has-mc tbody tr:last-child { margin-bottom: 0 !important; }
    .ox-app .ox-table--locks.has-mc tbody tr.is-danger { border-color: #f3cfc9 !important; }
    .ox-app .ox-table--locks.has-mc tbody tr.is-danger::before { top: 14px; bottom: 14px; }
    .ox-table--locks.has-mc tbody { display: block; padding: 10px !important; background: var(--ox-bg); }
    /* Form: 2 ô chọn 1 hàng; "Chặn plugin" + Lưu 1 hàng */
    .ox-app .ox-table--locks.has-mc .ox-lock-form { grid-template-columns: 1fr 1fr !important; align-items: center; gap: 8px !important; }
    .ox-app .ox-table--locks.has-mc .ox-lock-form .ox-inline-check { grid-column: 1 / 2 !important; margin: 0; font-size: 12px; line-height: 1.3; }
    .ox-app .ox-table--locks.has-mc .ox-lock-form .ox-inline-check:not(.ox-lock-protect) { grid-column: 1 / -1 !important; }
    .ox-app .ox-table--locks.has-mc .ox-lock-form .ox-btn { grid-column: 2 / 3 !important; justify-self: end; width: auto !important; min-width: 96px; height: 34px; }
    /* 3 nút xem: chia đều hàng, có chữ */
    .ox-app .ox-table--locks.has-mc tbody tr > td.ox-cx-actions { margin-top: 10px !important; padding-top: 10px !important; }
    .ox-app .ox-table--locks.has-mc tbody tr > td.ox-cx-actions .ox-cx-tools { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 0; }
    .ox-app .ox-table--locks.has-mc .ox-cx-tools .ox-tool { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; height: 34px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
    .ox-app .ox-table--locks.has-mc .ox-cx-tools .ox-tool .ox-lk-lbl { display: inline; }
}
/* Bill kỳ này (trang chi tiết website) */
.ox-cus-billbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding: 10px 12px; border: 1px dashed var(--ox-border); border-radius: 12px; font-size: 13px; line-height: 1.45; }
.ox-cus-billbox > span { flex: 1 1 180px; min-width: 0; }
.ox-cus-billbox > span small { display: block; color: var(--ox-muted); font-size: 12px; }
.ox-cus-billbox form { margin: 0; }
.ox-btn.ox-cus-bill { border-color: color-mix(in srgb, var(--ox-primary) 35%, transparent); background: var(--ox-primary-soft); color: var(--ox-primary); }
/* ===== Trang Kết nối – thẻ điện thoại gọn: tên + tình trạng / 1 dòng chip thông tin / Copy mã + thao tác cùng 1 hàng ===== */
.cxm, .cxm-lbl { display: none; }
@media (max-width: 760px) {
    .ox-cn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
    .ox-cn-kpis .ox-kpi { min-height: 0 !important; padding: 10px 12px !important; gap: 0 !important; }
    .ox-cn-kpis .ox-kpi:last-child { grid-column: 1 / -1; }
    .ox-cn-kpis .ox-kpi__value { font-size: 18px !important; line-height: 1.25; }
    .ox-cn-kpis .ox-kpi small { font-size: 11px; }
    .ox-app .ox-table--connect.has-mc.ox-cx-cards tbody tr { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; gap: 10px 8px !important; padding: 12px 14px !important; }
    .ox-app .ox-table--connect.has-mc .mc__ava { display: none; }
    .ox-app .ox-table--connect.has-mc .mc__id strong { font-size: 14px; }
    .ox-app .ox-table--connect.has-mc .mc__id small { font-size: 12px; }
    .ox-table--connect .cxm { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
    .ox-table--connect .cxm > span { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--ox-surface-2); color: var(--ox-muted); font-size: 11.5px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
    .ox-table--connect .cxm > span.is-red { background: var(--ox-red-soft, #fdecea); color: var(--ox-red); font-weight: 600; }
    .ox-table--connect .cxm svg { flex: none; opacity: .8; }
    .ox-app .ox-table--connect.has-mc tbody tr > td.mc-keep { flex: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; }
    .ox-app .ox-table--connect.has-mc tbody tr > td.mc-keep .ox-input-tools { display: block; width: auto; }
    .ox-app .ox-table--connect.has-mc tbody tr > td.mc-keep .ox-input-tools input { display: none; }
    .ox-app .ox-table--connect.has-mc tbody tr > td.mc-keep .ox-tool[data-copy], .ox-app .ox-table--connect.has-mc .ox-cx-create { position: static; transform: none; display: inline-flex; align-items: center; gap: 6px; width: auto; height: 34px; padding: 0 12px; border: 1px solid var(--ox-border); border-radius: 10px; background: #fff; color: var(--ox-text) !important; font: 600 12.5px/1 var(--ox-font); }
    .ox-table--connect .cxm-lbl { display: inline; }
    .ox-app .ox-table--connect.has-mc.ox-cx-cards tbody tr > td.ox-connect__row-actions:last-child:not(.mc-cell):not(.mc-keep) { flex: 1 1 auto !important; width: auto !important; margin: 0 !important; padding: 0 !important; border-top: 0 !important; }
    .ox-app .ox-table--connect.has-mc tbody tr > td.ox-connect__row-actions > div { gap: 6px; margin-left: auto; }
    .ox-app .ox-table--connect.has-mc .ox-connect__row-actions .ox-tool { width: 34px; height: 34px; }
}