/* ============================================================
   WesingTracker — design system (redesign 2026, tông xanh dương)
   Token & spec: AdminTrackingAccountDesign/design_handoff_wesing_redesign/README.md
   ============================================================ */

:root {
    --wt-accent: #2563eb;
    --wt-accent-soft: #eff4ff;
    --wt-accent-bd: #dbe6ff;
    --wt-pad: 20px;
    --wt-gap: 16px;
    --wt-side-bg: #ffffff;
    --wt-side-bd: #e9edf3;
    --wt-side-fg: #475569;
    --wt-side-muted: #94a3b8;
    --wt-side-active-bg: #eff4ff;
    --wt-side-active-fg: #2563eb;
    --wt-side-hover: #f1f5f9;
    --wt-brand: #0f172a;
    --wt-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

html, body {
    font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
    background: #f6f8fb;
    color: #0f172a;
    font-size: 14px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5dbe4; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b8c1cf; background-clip: content-box; }

@keyframes wt-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
    70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ---------- Khung app: sidebar + main ---------- */
.wt-app {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #f6f8fb;
}

.wt-sidebar {
    width: 246px;
    flex-shrink: 0;
    background: var(--wt-side-bg);
    border-right: 1px solid var(--wt-side-bd);
    display: flex;
    flex-direction: column;
}

.wt-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 20px 20px 16px;
}
.wt-brand-logo {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--wt-accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    box-shadow: 0 4px 12px var(--wt-accent-soft);
    flex-shrink: 0;
}
.wt-brand-name { font-weight: 700; font-size: 15px; color: var(--wt-brand); line-height: 1.1; }
.wt-brand-sub { font-size: 11px; color: var(--wt-side-muted); letter-spacing: .03em; }

.wt-side-label {
    font-size: 10px; font-weight: 700; letter-spacing: .09em;
    color: var(--wt-side-muted);
    padding: 6px 20px 4px;
    display: block;
}

.wt-side-nav {
    padding: 4px 12px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}
.wt-side-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wt-side-fg);
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background .12s, color .12s;
}
.wt-side-link i { font-size: 16px; width: 18px; text-align: center; }
.wt-side-link:hover { background: var(--wt-side-hover); color: var(--wt-side-fg); }
.wt-side-link.active {
    background: var(--wt-side-active-bg);
    color: var(--wt-side-active-fg);
    font-weight: 600;
}

.wt-server-card-wrap { margin-top: auto; padding: 12px 12px 16px; }
.wt-server-card {
    background: var(--wt-side-hover);
    border-radius: 11px;
    padding: 12px 13px;
    display: flex; flex-direction: column; gap: 6px;
}
.wt-server-card .row1 { display: flex; align-items: center; gap: 8px; }
.wt-server-card .row1 span:last-child { font-size: 12px; font-weight: 600; color: var(--wt-side-fg); }
.wt-server-card .row2 { font-size: 11px; color: var(--wt-side-muted); font-family: var(--wt-mono); }

.wt-pulse-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e;
    animation: wt-pulse 1.8s infinite;
    flex-shrink: 0;
    display: inline-block;
}

/* ---------- Main + topbar + content ---------- */
.wt-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wt-topbar {
    height: 64px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e9edf3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 12px;
}
.wt-topbar-titles { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.wt-title { font-size: 17px; font-weight: 700; color: #0f172a; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-subtitle { font-size: 12.5px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-topbar-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.wt-live {
    display: flex; align-items: center; gap: 7px;
    background: #ecfdf3;
    padding: 5px 11px;
    border-radius: 999px;
}
.wt-live span:last-child { font-size: 11px; font-weight: 700; letter-spacing: .05em; color: #16a34a; }
.wt-updated { font-size: 12.5px; color: #94a3b8; display: flex; align-items: center; gap: 6px; }
.wt-vr { width: 1px; height: 22px; background: #e9edf3; }
.wt-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; font-weight: 500; }
.wt-user i { font-size: 21px; color: #cbd5e1; }

.wt-content {
    flex: 1;
    overflow-y: auto;
    padding: 26px 28px 40px;
}
.wt-page {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--wt-gap);
}
.wt-page-narrow { max-width: 760px; }
.wt-page-slim { max-width: 460px; }

/* ---------- Card ---------- */
.wt-card {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 14px;
}
.wt-card-clip { overflow: hidden; }
.wt-card-h {
    padding: 15px var(--wt-pad);
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.wt-card-h .ttl { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.wt-card-h .note { font-size: 12px; color: #94a3b8; font-weight: 400; }
.wt-card-b { padding: var(--wt-pad); }

/* ---------- Section heading ---------- */
.wt-sect {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
}
.wt-sect i { color: var(--wt-accent); font-size: 17px; }
.wt-sect .ttl { font-weight: 600; font-size: 15px; }
.wt-sect .right { margin-left: auto; font-size: 12.5px; color: #94a3b8; display: flex; align-items: center; gap: 10px; }

/* ---------- Stat cards ---------- */
.wt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
    gap: var(--wt-gap);
}
.wt-stat {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 14px;
    padding: var(--wt-pad);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wt-stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.wt-stat-label {
    font-size: 11px; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase;
    color: #94a3b8;
}
.wt-tile {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.wt-stat-val { font-family: var(--wt-mono); font-size: 27px; font-weight: 600; line-height: 1; color: #0f172a; }
.wt-stat-sub { font-size: 12px; color: #94a3b8; }

/* Tông màu cho ô icon */
.tone-blue  { background: #eff4ff; color: #2563eb; }
.tone-slate { background: #f1f5f9; color: #475569; }
.tone-cyan  { background: #ecfeff; color: #0891b2; }
.tone-green { background: #ecfdf3; color: #16a34a; }
.tone-red   { background: #fef2f2; color: #dc2626; }
.tone-amber { background: #fffbeb; color: #d97706; }

/* ---------- Banner thông báo (Dashboard) ---------- */
.wt-banner {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 13px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.wt-banner.on { border-left: 3px solid #22c55e; }
.wt-banner.off { background: #fffbeb; border-color: #fde68a; border-left: 3px solid #f59e0b; }
.wt-banner-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wt-banner-ic {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.wt-banner.on .wt-banner-ic { background: #ecfdf3; color: #16a34a; }
.wt-banner.off .wt-banner-ic { background: #fef3c7; color: #d97706; }
.wt-banner-txt { display: flex; flex-direction: column; }
.wt-banner.on .wt-banner-txt .t { font-weight: 600; color: #166534; }
.wt-banner.off .wt-banner-txt .t { font-weight: 600; color: #92400e; }
.wt-banner.on .wt-banner-txt .s { font-size: 12.5px; color: #94a3b8; }
.wt-banner.off .wt-banner-txt .s { font-size: 12.5px; color: #a16207; }
.wt-banner-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.wt-btn {
    height: 34px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 0 13px;
    font-size: 12.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s, filter .12s;
}
.wt-btn:disabled { opacity: .55; cursor: not-allowed; }
a.wt-btn:hover { text-decoration: none; }

.wt-btn-ghost { border-color: #e2e8f0; background: #fff; color: #475569; }
.wt-btn-ghost:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e1; color: #475569; }

.wt-btn-accent { border: none; background: var(--wt-accent); color: #fff; font-weight: 600; }
.wt-btn-accent:hover:not(:disabled) { filter: brightness(.93); color: #fff; }

.wt-btn-accent-soft { border-color: var(--wt-accent-bd); background: var(--wt-accent-soft); color: var(--wt-accent); font-weight: 600; }
.wt-btn-accent-soft:hover:not(:disabled) { filter: brightness(.97); color: var(--wt-accent); }

.wt-btn-green { border: none; background: #16a34a; color: #fff; font-weight: 600; }
.wt-btn-green:hover:not(:disabled) { background: #15803d; color: #fff; }

.wt-btn-danger-soft { border-color: #fecaca; background: #fef2f2; color: #dc2626; font-weight: 600; }
.wt-btn-danger-soft:hover:not(:disabled) { background: #fee2e2; color: #dc2626; }

.wt-btn-danger-ghost { border-color: #fecaca; background: #fff; color: #dc2626; font-weight: 600; }
.wt-btn-danger-ghost:hover:not(:disabled) { background: #fef2f2; color: #dc2626; }

.wt-btn-dashed { border: 1px dashed var(--wt-accent-bd); background: var(--wt-accent-soft); color: var(--wt-accent); font-weight: 600; }
.wt-btn-dashed:hover:not(:disabled) { filter: brightness(.97); color: var(--wt-accent); }

.wt-btn-lg { height: 40px; border-radius: 10px; padding: 0 22px; font-size: 13.5px; font-weight: 600; }
.wt-btn-sm { height: 31px; border-radius: 8px; padding: 0 12px; }
.wt-btn-block { width: 100%; }

.wt-icon-btn {
    width: 31px; height: 31px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
    transition: background .12s;
}
.wt-icon-btn:hover { background: #f8fafc; }
.wt-icon-btn.danger { border-color: #fecaca; color: #dc2626; }
.wt-icon-btn.danger:hover { background: #fef2f2; }

/* ---------- Badge / pill ---------- */
.wt-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    white-space: nowrap;
}
.b-green { background: #ecfdf3; color: #16a34a; }
.b-red   { background: #fef2f2; color: #dc2626; }
.b-amber { background: #fffbeb; color: #d97706; }
.b-slate { background: #f1f5f9; color: #475569; }
.b-cyan  { background: #ecfeff; color: #0891b2; }
.b-crit  { background: #fee2e2; color: #b91c1c; }
.b-mute  { background: #f1f5f9; color: #94a3b8; }

.wt-count {
    background: #fef2f2; color: #dc2626;
    font-size: 12px; font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    font-family: var(--wt-mono);
}
.wt-count.zero { background: #ecfdf3; color: #16a34a; }

/* ---------- Chấm trạng thái ---------- */
.wt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.wt-dot.on { background: #22c55e; }
.wt-dot.off { background: #ef4444; }

/* ---------- Machine card (Dashboard) ---------- */
.wt-machines {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(316px, 1fr));
    gap: var(--wt-gap);
}
.wt-mcard {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 14px;
    padding: var(--wt-pad);
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    transition: box-shadow .15s, transform .15s;
}
.wt-mcard:hover { box-shadow: 0 10px 26px rgba(16,24,40,.09); transform: translateY(-2px); color: inherit; text-decoration: none; }
.wt-mcard.offline { border-color: #f4c4bd; }
.wt-mcard-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wt-mcard-h .name-wrap { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wt-mcard-h .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wt-chips { display: flex; gap: 8px; }
.wt-chip {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #eef1f5;
    border-radius: 9px;
    padding: 8px 6px;
    text-align: center;
    min-width: 0;
}
.wt-chip b { display: block; font-family: var(--wt-mono); font-size: 16px; font-weight: 600; }
.wt-chip span { display: block; font-size: 9.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.n-slate { color: #475569; } .n-cyan { color: #0891b2; } .n-green { color: #16a34a; } .n-red { color: #dc2626; }

.wt-rate { display: flex; flex-direction: column; gap: 6px; }
.wt-rate-row { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; }
.wt-rate-row b { font-weight: 700; font-family: var(--wt-mono); }
.wt-bar { height: 7px; border-radius: 5px; background: #eef1f5; overflow: hidden; }
.wt-bar > span { display: block; height: 100%; border-radius: 5px; transition: width .4s ease; }

.wt-meta {
    display: flex; flex-direction: column; gap: 5px;
    font-size: 12.5px; color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    min-width: 0;
}
.wt-meta .mrow { display: flex; justify-content: space-between; gap: 8px; }
.wt-meta .mrow .v { color: #475569; min-width: 0; }
.wt-meta .mrow .v.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-meta .merr { color: #dc2626; line-height: 1.4; display: flex; gap: 5px; overflow-wrap: anywhere; }
.wt-meta .merr i { margin-top: 2px; flex-shrink: 0; }
.wt-meta .merr span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Hàng 2 cột Dashboard (chart + cảnh báo) ---------- */
.wt-grid-2 {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: var(--wt-gap);
    align-items: start;
}
.wt-grid-2.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .wt-grid-2, .wt-grid-2.even { grid-template-columns: 1fr; } }

.wt-legend { display: flex; gap: 14px; }
.wt-legend span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.wt-legend .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

.wt-alert-row {
    padding: 13px var(--wt-pad);
    border-bottom: 1px solid #f6f8fb;
    display: flex;
    gap: 11px;
    align-items: flex-start;
}
.wt-alert-row:last-child { border-bottom: none; }
.wt-alert-ic {
    width: 26px; height: 26px;
    flex-shrink: 0;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}
.wt-alert-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.wt-alert-top { display: flex; justify-content: space-between; gap: 8px; }
.wt-alert-top .m { font-weight: 600; font-size: 13px; color: #0f172a; }
.wt-alert-top .ago { font-size: 11px; color: #b0bac9; white-space: nowrap; }
.wt-alert-msg { font-size: 12.5px; color: #64748b; line-height: 1.4; overflow-wrap: anywhere; }

/* ---------- Bảng ---------- */
.wt-table-wrap { overflow-x: auto; }
.wt-table { width: 100%; border-collapse: collapse; }
.wt-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #fbfcfe;
    border-bottom: 1px solid #eef1f5;
    white-space: nowrap;
}
.wt-table th:first-child, .wt-table td:first-child { padding-left: 18px; }
.wt-table th:last-child, .wt-table td:last-child { padding-right: 18px; }
.wt-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #f4f6f9;
    font-size: 13px;
    vertical-align: middle;
}
.wt-table tbody tr { transition: background .12s; }
.wt-table tbody tr:hover { background: #fbfcfe; }
.wt-table tbody tr:last-child td { border-bottom: none; }
.wt-table .compact td { padding-top: 9px; padding-bottom: 9px; }

.wt-table-foot {
    padding: 13px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 8px;
}
.wt-table-foot .info { font-size: 12.5px; color: #94a3b8; }
.wt-pager { display: flex; gap: 8px; }
.wt-pager .wt-btn { height: 32px; border-radius: 8px; }
.wt-pager .wt-btn:disabled { background: #f8fafc; color: #cbd5e1; border-color: #e2e8f0; opacity: 1; }

/* Tiện ích text */
.mono { font-family: var(--wt-mono); }
.ta-c { text-align: center !important; }
.ta-r { text-align: right !important; }
.c-slate { color: #475569; } .c-cyan { color: #0891b2; } .c-green { color: #16a34a; } .c-red { color: #dc2626; }
.c-mute { color: #94a3b8; } .c-dim { color: #64748b; }
.fs-12 { font-size: 12px; } .fs-125 { font-size: 12.5px; }
.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wt-link { color: var(--wt-accent); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.wt-link:hover { text-decoration: underline; color: var(--wt-accent); }

/* ---------- Form: input / select / label ---------- */
.wt-input, .wt-select {
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 0 12px;
    font-size: 13px;
    font-family: inherit;
    color: #334155;
    background: #fff;
    width: 100%;
    transition: border-color .12s, box-shadow .12s;
}
.wt-select { padding-right: 30px; cursor: pointer; }
.wt-input:focus, .wt-select:focus {
    outline: none;
    border-color: var(--wt-accent);
    box-shadow: 0 0 0 3px var(--wt-accent-soft);
}
.wt-input:disabled, .wt-select:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.wt-input-sm { height: 33px; border-radius: 8px; padding: 0 10px; font-size: 12.5px; }
.wt-input::placeholder { color: #b0bac9; }

.wt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wt-label { font-size: 12.5px; font-weight: 600; color: #475569; }
.wt-label-sm { font-size: 11.5px; font-weight: 600; color: #64748b; }
.wt-label i { margin-right: 2px; }

.wt-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.wt-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .wt-form-grid { grid-template-columns: 1fr; } }

/* ---------- Thanh bộ lọc (Accounts) ---------- */
.wt-filterbar {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 14px;
    padding: 16px var(--wt-pad);
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.wt-filterbar .wt-input, .wt-filterbar .wt-select { height: 36px; }
.wt-filterbar .wt-field { flex-shrink: 0; }
.wt-filterbar .grow { flex: 1; min-width: 200px; }

.wt-search { position: relative; display: flex; align-items: center; flex: 1; }
.wt-search i { position: absolute; left: 12px; color: #cbd5e1; font-size: 13px; pointer-events: none; }
.wt-search .wt-input { padding-left: 33px; }

/* ---------- Toggle switch ---------- */
.wt-switch {
    appearance: none;
    -webkit-appearance: none;
    width: 42px; height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    border: none;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    transition: background .15s;
}
.wt-switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.15);
    transition: left .15s;
}
.wt-switch:checked { background: var(--wt-accent); }
.wt-switch:checked::after { left: 21px; }
.wt-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--wt-accent-soft); }

.wt-switch-sm { width: 36px; height: 20px; }
.wt-switch-sm::after { width: 16px; height: 16px; top: 2px; left: 2px; }
.wt-switch-sm:checked::after { left: 18px; }

.wt-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wt-toggle-row .txt { display: flex; flex-direction: column; min-width: 0; }
.wt-toggle-row .txt .t { font-weight: 600; font-size: 13.5px; color: #0f172a; }
.wt-toggle-row .txt .s { font-size: 12px; color: #94a3b8; }
.wt-divider { height: 1px; background: #f1f5f9; }

/* ---------- Ghi chú / thông báo trạng thái ---------- */
.wt-note {
    border-radius: 11px;
    padding: 11px 15px;
    font-size: 13px;
    line-height: 1.45;
}
.wt-note.ok { background: #ecfdf3; color: #15803d; }
.wt-note.err { background: #fef2f2; color: #b91c1c; }
.wt-note.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.wt-note.info { background: var(--wt-accent-soft); color: var(--wt-accent); }

.wt-hint { font-size: 12.5px; color: #94a3b8; }

/* ---------- Rooms ---------- */
.wt-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--wt-gap);
}
.wt-room-card { display: flex; flex-direction: column; overflow: hidden; }
.wt-room-card .wt-card-b { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.wt-room-card .foot { padding: 0 var(--wt-pad) var(--wt-pad); }

/* ---------- Thanh lưu ---------- */
.wt-savebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 0 8px; }

/* ---------- Chart ---------- */
.wt-chart-box { position: relative; height: 210px; }

/* ---------- Trang đăng nhập ---------- */
.wt-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(1100px 560px at 50% -10%, #eff4ff 0%, #f6f8fb 55%);
}
.wt-login-box {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.wt-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.wt-login-logo { width: 46px; height: 46px; border-radius: 13px; font-size: 23px; }
.wt-login-brand .t { font-size: 19px; font-weight: 700; color: #0f172a; line-height: 1; }
.wt-login-brand .s { font-size: 12.5px; color: #94a3b8; }
.wt-login-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ---------- Responsive: mobile ---------- */
.wt-side-collapse { display: flex; flex-direction: column; flex: 1; min-height: 0; }

@media (max-width: 768px) {
    .wt-app { flex-direction: column; height: auto; overflow: visible; min-height: 100vh; }
    .wt-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--wt-side-bd); position: relative; }
    .wt-main { overflow: visible; }
    .wt-content { overflow-y: visible; padding: 18px 14px 32px; }
    .wt-topbar { height: auto; min-height: 56px; padding: 10px 14px; flex-wrap: wrap; }
    .wt-updated, .wt-vr { display: none; }
    .wt-brand { padding: 14px 16px; }
    .wt-side-label { display: none; }
    .wt-server-card-wrap { padding: 8px 12px 12px; }
    /* nav thu gọn — mở bằng toggler */
    .wt-side-collapse { display: none; }
    .wt-nav-toggler:checked ~ .wt-side-collapse { display: flex; }
}

/* Toggler (chỉ hiện trên mobile) */
.wt-nav-toggler {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    width: 42px; height: 36px;
    position: absolute;
    top: 14px; right: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23475569' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.4rem #fff;
    display: none;
    margin: 0;
}
.wt-nav-toggler:checked { background-color: #f1f5f9; }
@media (max-width: 768px) {
    .wt-nav-toggler { display: block; }
}
