@charset "UTF-8";
/* ==========================================================================
   Endpoint Management — Operations Console
   Design system v25 — Clear Workspace (presentation layer only)
   Font: Be Vietnam Pro (full Vietnamese diacritics) → Inter → system UI
   Icon: inline SVG, 24×24 grid, stroke 1.75 (Lucide-compatible geometry)
   ========================================================================== */

:root{
  /* Surfaces */
  --bg:#f4f6f8;
  --surface:#ffffff;
  --surface2:#f8fafc;
  --surface3:#eef2f7;
  --line:#e2e8ec;
  --line-soft:#eef2f4;
  --line-strong:#cdd7de;

  /* Text */
  --text:#0f172a;
  --text-2:#33415a;
  --muted:#64748b;
  --muted2:#64758a;

  /* Brand + semantics */
  --brand:#0d7c72;
  --brand-2:#08645d;
  --brand-soft:#edf8f5;
  --brand-line:#bee4dc;
  --green:#0f9d63;
  --green-2:#0a7d4f;
  --green-soft:#e7f8f0;
  --amber:#c47a06;
  --amber-2:#a35f00;
  --amber-soft:#fff6e4;
  --red:#d92d20;
  --red-2:#b42318;
  --red-soft:#fff0ee;
  --purple:#7c3aed;
  --purple-soft:#f2ecff;
  --cyan:#0e8ba8;
  --cyan-soft:#e7f8fc;
  --slate-soft:#eef2f7;

  /* Legacy aliases used by components */
  --online-blue:#0d7c72;
  --online-blue-soft:#eaf1ff;
  --disposed:#b42318;
  --disposed-soft:#fff0ee;

  /* Elevation */
  --shadow-xs:0 1px 2px rgba(15,23,42,.04);
  --shadow-sm:0 2px 6px rgba(15,23,42,.05);
  --shadow:0 10px 28px rgba(15,34,64,.07);
  --shadow-lg:0 26px 70px rgba(9,20,38,.22);

  /* Geometry */
  --radius:16px;
  --radius-md:12px;
  --radius-sm:9px;
  --radius-pill:999px;
  --header-h:64px;

  /* Type scale */
  --fs-9:11px;--fs-10:11px;--fs-11:12px;--fs-12:13px;--fs-13:14px;
  --fs-14:14px;--fs-15:15px;--fs-18:18px;--fs-22:22px;--fs-26:26px;

  /* Type families */
  --font-ui:"Be Vietnam Pro","Inter","Segoe UI Variable Text","Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;
}

*,*::before,*::after{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;overflow:hidden}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font-ui);
  font-size:var(--fs-13);
  line-height:1.45;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-variant-ligatures:contextual;
  text-rendering:optimizeLegibility;
}
button,input,select,textarea{font:inherit;color:inherit}
button,a{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,p,dl,dd,figure{margin:0}
h1,h2,h3{letter-spacing:-.015em}

/* Icons: one set, one geometry */
svg{
  width:1.15em;height:1.15em;flex:0 0 auto;
  fill:none;stroke:currentColor;stroke-width:1.75;
  stroke-linecap:round;stroke-linejoin:round;display:block;
}
[hidden]{display:none!important}
::selection{background:#ccebe2;color:#123e37}

/* Scrollbars */
*{scrollbar-width:thin;scrollbar-color:#c6d3e3 transparent}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:#d3dded;border:3px solid transparent;border-radius:99px;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:#b6c6dc;background-clip:content-box}

/* Focus ring */
:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--brand);
  outline-offset:2px;
  border-radius:6px;
}

/* ==========================================================================
   App shell
   ========================================================================== */
.ops-app{
  height:100dvh;display:grid;
  grid-template-rows:var(--header-h) minmax(0,1fr);
  overflow:hidden;
}

.ops-header{
  height:var(--header-h);
  display:grid;
  grid-template-columns:minmax(210px,auto) minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:0 18px 0 16px;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(15,23,42,.02),0 6px 20px rgba(15,34,64,.035);
  z-index:50;
}

/* Brand */
.ops-brand{display:flex;align-items:center;gap:11px;width:max-content;border-radius:12px;padding:4px 8px 4px 4px;transition:background .15s}
.ops-brand:hover{background:var(--surface2)}
.ops-brand-mark{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  background:linear-gradient(150deg,#15988b 0%,#0d7c72 46%,#08645d 100%);
  color:#fff;
  box-shadow:0 6px 16px rgba(13,124,114,.30),inset 0 1px 0 rgba(255,255,255,.25);
}
.ops-brand-mark svg{width:22px;height:22px;stroke-width:1.9}
.ops-brand-copy{display:grid;line-height:1.1;min-width:0}
.ops-brand strong{font-size:var(--fs-15);font-weight:800;color:var(--text);letter-spacing:-.2px;white-space:nowrap}
.ops-brand small{
  margin-top:3px;font-size:var(--fs-9);font-weight:700;letter-spacing:1.1px;
  text-transform:uppercase;color:var(--muted2);white-space:nowrap;
}

/* Primary navigation */
.ops-main-nav{
  height:100%;display:flex;align-items:center;justify-content:center;
  gap:2px;min-width:0;overflow:hidden;
}
.ops-main-nav a{
  position:relative;
  height:38px;display:flex;align-items:center;gap:7px;
  padding:0 12px;border-radius:10px;
  color:var(--muted);font-weight:600;font-size:var(--fs-12);
  white-space:nowrap;transition:background .15s,color .15s,box-shadow .15s;
}
.ops-main-nav a svg{width:17px;height:17px;stroke-width:1.8;color:var(--muted2);transition:color .15s}
.ops-main-nav a:hover{background:var(--surface3);color:var(--text)}
.ops-main-nav a:hover svg{color:var(--text-2)}
.ops-main-nav a.active{
  color:var(--brand-2);background:var(--brand-soft);
  box-shadow:inset 0 0 0 1px var(--brand-line);
  font-weight:700;
}
.ops-main-nav a.active svg{color:var(--brand)}

/* Header tools */
.ops-header-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px}
.ops-live-indicator{
  height:30px;display:inline-flex;align-items:center;gap:6px;
  padding:0 10px;border-radius:var(--radius-pill);
  background:var(--surface2);border:1px solid var(--line);
  color:var(--muted);font-size:var(--fs-10);font-weight:700;
  letter-spacing:.4px;text-transform:uppercase;
}
.ops-live-indicator i{width:7px;height:7px;border-radius:50%;background:var(--muted2);transition:.2s}
.ops-live-indicator[data-state="connected"]{background:var(--green-soft);border-color:#bfe9d6;color:var(--green-2)}
.ops-live-indicator[data-state="connected"] i{background:#12b76a;box-shadow:0 0 0 3px rgba(18,183,106,.18);animation:ops-pulse 2.4s ease-in-out infinite}
.ops-live-indicator[data-state="reconnecting"]{background:var(--amber-soft);border-color:#f7e0b4;color:var(--amber-2)}
.ops-live-indicator[data-state="reconnecting"] i{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.16)}
.ops-live-indicator[data-state="offline"]{background:var(--red-soft);border-color:#f4cdc9;color:var(--red-2)}
.ops-live-indicator[data-state="offline"] i{background:var(--red)}
@keyframes ops-pulse{0%,100%{opacity:1}50%{opacity:.45}}

.ops-icon-button{
  width:36px;height:36px;border:1px solid transparent;border-radius:10px;
  background:transparent;color:var(--muted);display:grid;place-items:center;
  cursor:pointer;transition:.15s;
}
.ops-icon-button svg{width:18px;height:18px}
.ops-icon-button:hover{background:var(--surface3);color:var(--brand);border-color:var(--line)}
.ops-icon-button:active{transform:scale(.96)}
.ops-icon-button.light{border-color:var(--line);background:var(--surface);color:var(--text-2);box-shadow:var(--shadow-xs)}
.ops-icon-button.light:hover{background:var(--brand-soft);color:var(--brand);border-color:var(--brand-line)}

.ops-user{
  width:34px;height:34px;border-radius:11px;display:grid;place-items:center;
  background:linear-gradient(150deg,#1e293b,#0f172a);color:#e2e8f0;
  font-weight:800;font-size:var(--fs-10);letter-spacing:.4px;
  box-shadow:0 4px 12px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.12);
  cursor:default;
}

/* ==========================================================================
   Page frame
   ========================================================================== */
.ops-main{position:relative;min-height:0;overflow:hidden}
.ops-page{
  height:100%;min-height:0;overflow:hidden;
  padding:18px 20px 18px;display:grid;gap:14px;
}
.ops-page-head{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:18px;min-height:56px;
}
.ops-page-head.compact{align-items:center;min-height:48px}
.ops-kicker{
  display:inline-flex;align-items:center;gap:6px;
  font-size:var(--fs-9);line-height:1;font-weight:800;
  letter-spacing:1.3px;text-transform:uppercase;color:var(--brand);
  background:var(--brand-soft);border:1px solid var(--brand-line);
  padding:5px 8px;border-radius:6px;
}
.ops-page-head h1{
  margin:8px 0 5px;font-size:var(--fs-26);line-height:1.15;
  font-weight:800;letter-spacing:-.7px;color:var(--text);
}
.ops-page-head p{margin:0;color:var(--muted);font-size:var(--fs-12);max-width:76ch;line-height:1.55}
.ops-page-meta{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:var(--fs-11);padding-top:4px}
.ops-sync-label{display:inline-flex;align-items:center;gap:7px;font-weight:600}
.ops-sync-label i{width:7px;height:7px;border-radius:50%;background:#12b76a;box-shadow:0 0 0 4px var(--green-soft)}
.ops-page-meta time{font-variant-numeric:tabular-nums;color:var(--text-2);font-weight:600;font-size:var(--fs-12)}
.ops-page-head-actions{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;justify-content:flex-end;min-width:0}
.ops-search-wide{flex:0 1 auto}

/* ==========================================================================
   Buttons
   ========================================================================== */
.ops-button{
  --btn-h:38px;
  height:var(--btn-h);min-width:0;
  border:1px solid var(--line-strong);border-radius:10px;
  padding:0 14px;font-size:var(--fs-12);font-weight:700;
  background:var(--surface);color:var(--text-2);
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  cursor:pointer;box-shadow:var(--shadow-xs);
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s,transform .1s;
  white-space:nowrap;
}
.ops-button svg{width:16px;height:16px;stroke-width:1.9}
.ops-button:hover{background:var(--surface2);border-color:#bfd0e4;color:var(--text)}
.ops-button:active{transform:translateY(.5px)}
.ops-button.primary{
  background:linear-gradient(180deg,#138a7e,var(--brand));
  border-color:var(--brand-2);color:#fff;
  box-shadow:0 1px 1px rgba(255,255,255,.25) inset,0 6px 16px rgba(13,124,114,.22);
}
.ops-button.primary:hover{background:linear-gradient(180deg,#0e766c,var(--brand-2));color:#fff}
.ops-button.secondary{background:var(--surface);border-color:var(--line-strong);color:var(--text-2)}
.ops-button.danger{
  background:linear-gradient(180deg,#e5483d,var(--red));
  border-color:var(--red-2);color:#fff;
  box-shadow:0 6px 16px rgba(217,45,32,.2);
}
.ops-button.danger:hover{background:var(--red-2);color:#fff}
.ops-button:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}
.ops-button.icon-text{padding:0 12px}

.ops-mini-button{
  height:32px;border:1px solid var(--line-strong);border-radius:9px;
  padding:0 10px;background:var(--surface);color:var(--text-2);
  font-size:var(--fs-10);font-weight:750;cursor:pointer;
  display:inline-flex;align-items:center;gap:5px;transition:.15s;white-space:nowrap;
}
.ops-mini-button svg{width:14px;height:14px}
.ops-mini-button:hover{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-2)}
.ops-mini-button.primary{background:var(--brand);border-color:var(--brand-2);color:#fff}
.ops-mini-button.primary:hover{background:var(--brand-2);color:#fff}
.ops-mini-button.danger{border-color:#f0cac6;background:#fffafa;color:var(--red-2)}
.ops-mini-button.danger:hover{background:var(--red-soft);border-color:#e9b3ad}
.ops-mini-button.icon{width:32px;padding:0;justify-content:center}

.ops-detail-link{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  height:30px;padding:0 11px;border:1px solid var(--brand-line);border-radius:8px;
  background:var(--brand-soft);color:var(--brand-2);
  font-size:var(--fs-10);font-weight:800;white-space:nowrap;transition:.15s;
}
.ops-detail-link:hover{background:#dfeaff;border-color:#a8c8f6;color:#124bc0}

/* ==========================================================================
   Inputs
   ========================================================================== */
.ops-select,
.ops-dialog-card input,
.ops-dialog-card select,
.ops-dialog-card textarea,
.ops-org-form input,
.ops-org-form select,
.ops-org-form textarea,
.ops-warehouse-action-panel input,
.ops-warehouse-action-panel textarea{
  height:38px;border:1px solid var(--line-strong);border-radius:10px;
  background:var(--surface);padding:0 12px;outline:0;color:var(--text);
  font-size:var(--fs-12);transition:border-color .15s,box-shadow .15s;
  width:100%;
}
.ops-select{
  height:38px;padding:0 34px 0 12px;cursor:pointer;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;background-size:15px;
  font-weight:600;min-width:160px;
}
.ops-select:focus,
.ops-dialog-card input:focus,
.ops-dialog-card select:focus,
.ops-dialog-card textarea:focus,
.ops-org-form input:focus,
.ops-org-form select:focus,
.ops-org-form textarea:focus{
  border-color:#9dc0f7;box-shadow:0 0 0 4px rgba(13,124,114,.10);
}
textarea{height:auto!important;padding:9px 12px!important;resize:vertical;line-height:1.5}

.ops-search-wide{
  height:40px;min-width:min(340px,34vw);max-width:520px;
  border:1px solid var(--line-strong);background:var(--surface);border-radius:11px;
  display:flex;align-items:center;gap:9px;padding:0 10px 0 12px;
  box-shadow:var(--shadow-xs);transition:.15s;
}
.ops-search-wide:focus-within{border-color:#9dc0f7;box-shadow:0 0 0 4px rgba(13,124,114,.10)}
.ops-search-wide svg{width:17px;height:17px;color:var(--muted2)}
.ops-search-wide input{
  border:0;outline:0;width:100%;background:transparent;
  font-size:var(--fs-12);height:100%;color:var(--text);
}
.ops-search-wide input::placeholder{color:#697c8d}
.ops-search-wide kbd{
  font-family:var(--font-mono);font-size:var(--fs-9);color:var(--muted);
  background:var(--surface2);border:1px solid var(--line);border-bottom-width:2px;
  border-radius:6px;padding:3px 6px;white-space:nowrap;flex:0 0 auto;
}
.ops-small-search{
  height:34px;width:min(240px,42%);
  border:1px solid var(--line-strong);border-radius:9px;
  display:flex;align-items:center;gap:7px;padding:0 10px;background:var(--surface);
}
.ops-small-search:focus-within{border-color:#9dc0f7;box-shadow:0 0 0 3px rgba(13,124,114,.08)}
.ops-small-search svg{width:15px;height:15px;color:var(--muted2)}
.ops-small-search input{border:0;outline:0;width:100%;background:transparent;font-size:var(--fs-11)}

/* Search inside tree panel */
.ops-tree-search{padding:8px 10px;border-bottom:1px solid var(--line-soft);display:flex;align-items:center;gap:8px;background:var(--surface)}
.ops-tree-search svg{width:15px;height:15px;color:var(--muted2)}
.ops-tree-search input{
  height:30px;width:100%;border:0;outline:0;background:transparent;
  font-size:var(--fs-11);color:var(--text);
}
.ops-tree-search input::placeholder{color:#697c8d}

/* ==========================================================================
   Surfaces / cards
   ========================================================================== */
.ops-surface,.ops-panel{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);min-height:0;overflow:hidden;
  box-shadow:var(--shadow-xs);
  display:grid;grid-template-rows:56px minmax(0,1fr);
}
.ops-surface-head,.ops-panel-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:0 16px;border-bottom:1px solid var(--line-soft);
  background:linear-gradient(180deg,#fff,#ffffff);min-width:0;
}
.ops-surface-head h2,.ops-panel-head h2,.ops-section-title h2,.ops-list-head h2{
  margin:0;font-size:var(--fs-13);font-weight:750;line-height:1.2;color:var(--text);
}
.ops-surface-head small,.ops-panel-head small{color:var(--muted);font-size:var(--fs-10);text-align:right;line-height:1.3}
.ops-title-with-icon{display:flex;align-items:center;gap:10px;min-width:0}
.ops-title-with-icon.mini{gap:8px}
.ops-title-with-icon>div{min-width:0}
.ops-kicker-text,
.ops-surface-head>div>span,
.ops-title-with-icon>div>span,
.ops-section-title>div>span,
.ops-list-head span,
.ops-dialog-card header span,
.ops-org-form header span{
  display:block;font-size:var(--fs-9);line-height:1.3;text-transform:uppercase;
  letter-spacing:.9px;color:var(--muted2);font-weight:800;
}

/* Section icon tiles */
.ops-section-icon{
  width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  background:var(--brand-soft);color:var(--brand);flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgba(13,124,114,.08);
}
.ops-section-icon svg{width:18px;height:18px}
.ops-section-icon.alert{background:var(--red-soft);color:var(--red);box-shadow:inset 0 0 0 1px rgba(217,45,32,.1)}
.ops-section-icon.health{background:var(--green-soft);color:var(--green);box-shadow:inset 0 0 0 1px rgba(15,157,99,.1)}
.ops-section-icon.recent{background:var(--brand-soft);color:var(--brand)}
.ops-section-icon.org{background:var(--slate-soft);color:#4a6280}
.ops-section-icon.warehouse{background:var(--purple-soft);color:var(--purple);box-shadow:inset 0 0 0 1px rgba(124,58,237,.1)}
.ops-section-icon.return{background:var(--brand-soft);color:var(--brand)}
.ops-section-icon.system{background:#edf8f5;color:#3167c9}
.ops-section-icon.hardware{background:var(--purple-soft);color:var(--purple)}
.ops-section-icon.disk{background:var(--cyan-soft);color:var(--cyan)}
.ops-section-icon.software{background:var(--slate-soft);color:#4c6480}

/* ==========================================================================
   Tables
   ========================================================================== */
.ops-table-shell{min-height:0;height:100%;overflow:auto;position:relative;background:var(--surface)}
.ops-table{
  width:100%;border-collapse:separate;border-spacing:0;
  font-size:var(--fs-11);font-variant-numeric:tabular-nums;
}
.ops-table th{
  position:sticky;top:0;z-index:2;
  background:#f7f9fa;
  text-align:left;color:#5b6b84;
  font-size:var(--fs-9);text-transform:uppercase;letter-spacing:.55px;font-weight:800;
  border-bottom:1px solid var(--line);padding:10px 12px;white-space:nowrap;
  box-shadow:inset 0 -1px 0 var(--line);
}
.ops-table td{
  padding:11px 12px;border-bottom:1px solid var(--line-soft);
  vertical-align:middle;color:var(--text-2);
}
.ops-table tbody tr{background:var(--surface);transition:background .12s}
.ops-table tbody tr:last-child td{border-bottom:0}
.ops-table tbody tr:hover{background:#f3faf7}
.ops-table tbody tr[data-href]{cursor:pointer}
.ops-table strong{font-weight:700;color:var(--text)}
.ops-table .mono,.mono{font-family:var(--font-mono);font-size:var(--fs-10);color:#3d4c62;letter-spacing:-.1px}
.ops-table td small{display:block;color:var(--muted2);margin-top:3px;font-size:var(--fs-9);line-height:1.35}
.ops-table.compact{font-size:var(--fs-10)}
.ops-table.compact th{padding:8px 10px;font-size:var(--fs-9)}
.ops-table.compact td{padding:7px 10px}
.ops-empty-row td{text-align:center!important;color:var(--muted);height:120px!important;font-size:var(--fs-11)}

/* Empty state */
.ops-empty{
  display:grid;place-items:center;align-content:center;gap:8px;
  height:100%;min-height:120px;color:var(--muted);text-align:center;padding:26px;
  font-size:var(--fs-11);
}
.ops-empty strong{color:var(--text-2);font-size:var(--fs-12);font-weight:700}
.ops-empty small{font-size:var(--fs-10);max-width:38ch;line-height:1.5}
.ops-empty-icon{
  width:46px;height:46px;border-radius:14px;background:var(--surface3);
  color:#7d8fa6;display:grid;place-items:center;
  box-shadow:inset 0 0 0 1px var(--line);
}
.ops-empty-icon svg{width:21px;height:21px}

/* Device cell icon + status */
.ops-device-cell-icon{
  display:inline-grid;place-items:center;width:30px;height:30px;border-radius:9px;
  background:var(--brand-soft);color:#3d70cd;vertical-align:middle;
  margin-right:9px;flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgba(13,124,114,.07);
}
.ops-device-cell-icon svg{width:16px;height:16px}
.ops-device-cell-icon.online{background:var(--green-soft);color:var(--green);box-shadow:inset 0 0 0 1px rgba(15,157,99,.1)}
.ops-device-cell-icon.offline{background:var(--red-soft);color:var(--red);box-shadow:inset 0 0 0 1px rgba(217,45,32,.09)}
.ops-device-cell-icon.pending{background:var(--amber-soft);color:var(--amber)}
.ops-device-cell-icon.pendingexpired{background:#fff1f2;color:#be123c}
.ops-device-cell-icon.disabled{background:var(--slate-soft);color:#46566d}
.ops-device-cell-icon.revoked{background:var(--red-soft);color:var(--red-2)}
.ops-device-cell-icon.warning{background:var(--amber-soft);color:var(--amber)}
.ops-device-cell-icon.warehouse{background:var(--purple-soft);color:var(--purple)}

.ops-state{
  display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 9px;
  border-radius:var(--radius-pill);font-size:var(--fs-10);font-weight:750;
  white-space:nowrap;line-height:1;letter-spacing:.1px;
}
.ops-state i{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.85;flex:0 0 auto}
.ops-state.online{background:var(--green-soft);color:var(--green-2);box-shadow:inset 0 0 0 1px rgba(15,157,99,.12)}
.ops-state.offline{background:var(--red-soft);color:var(--red-2);box-shadow:inset 0 0 0 1px rgba(217,45,32,.1)}
.ops-state.pending{background:var(--amber-soft);color:var(--amber-2);box-shadow:inset 0 0 0 1px rgba(196,122,6,.13)}
.ops-state.pendingexpired{background:#fff1f2;color:#be123c;box-shadow:inset 0 0 0 1px rgba(190,18,60,.12)}
.ops-state.disabled{background:var(--slate-soft);color:#46566d;box-shadow:inset 0 0 0 1px var(--line)}
.ops-state.revoked{background:var(--red-soft);color:var(--red-2);box-shadow:inset 0 0 0 1px rgba(217,45,32,.1)}
.ops-state.warehouse{background:var(--purple-soft);color:#6d28d9;box-shadow:inset 0 0 0 1px rgba(124,58,237,.12)}
.ops-state.warning{background:var(--amber-soft);color:var(--amber-2);box-shadow:inset 0 0 0 1px rgba(196,122,6,.13)}

/* ==========================================================================
   Toast
   ========================================================================== */
.ops-toast{
  position:absolute;right:20px;top:14px;z-index:80;max-width:min(520px,60vw);
  padding:12px 16px 12px 14px;border-radius:12px;
  box-shadow:var(--shadow-lg);font-weight:650;font-size:var(--fs-12);
  display:flex;align-items:center;gap:10px;line-height:1.45;
  animation:ops-toast-in .22s ease-out;
}
.ops-toast.success{background:#f0fdf7;border:1px solid #b7e8d1;color:var(--green-2)}
.ops-toast.error{background:#fff5f4;border:1px solid #f3c9c4;color:var(--red-2)}
@keyframes ops-toast-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

/* ==========================================================================
   Split workspace + tree panel
   ========================================================================== */
.ops-split-workspace.v21,
.ops-split-workspace.v22,
.ops-org-workspace.v22{
  --split-left:270px;
  min-height:0;display:grid;
  grid-template-columns:var(--split-left) 7px minmax(0,1fr);
  gap:0;align-items:stretch;
}
.ops-org-workspace.v22{--split-left:310px}
.ops-splitter{
  position:relative;width:7px;cursor:col-resize;border-radius:6px;
  display:grid;place-items:center;align-self:stretch;touch-action:none;
}
.ops-splitter:before{
  content:"";width:2px;height:40px;border-radius:2px;background:#dbe4ef;transition:background .15s,height .15s;
}
.ops-splitter:hover:before,.ops-splitter:focus-visible:before,.ops-resizing .ops-splitter:before{background:#7fb0ee;height:64px}
.ops-resizing{cursor:col-resize!important;user-select:none!important}
.ops-resizing *{cursor:col-resize!important}

.ops-tree-panel,.ops-list-panel,.ops-org-detail{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);min-height:0;overflow:hidden;
  box-shadow:var(--shadow-xs);
}
.ops-tree-panel{display:grid;grid-template-rows:54px 47px minmax(0,1fr)}
.ops-tree-panel>header{
  padding:0 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;
  border-bottom:1px solid var(--line-soft);background:linear-gradient(180deg,#fff,#ffffff);
}
.ops-tree-panel>header strong{font-size:var(--fs-12);font-weight:750;color:var(--text)}
.ops-tree-panel>header small{
  color:var(--muted);font-size:var(--fs-9);font-weight:700;
  background:var(--surface3);border-radius:var(--radius-pill);padding:3px 8px;
}
.ops-tree-scroll{min-height:0;overflow:auto;padding:8px}

.ops-tree-node{
  width:100%;height:40px;border:0;background:transparent;border-radius:10px;
  display:grid;grid-template-columns:28px minmax(0,1fr) auto;
  align-items:center;gap:8px;text-align:left;
  padding:0 9px 0 calc(9px + var(--depth,0) * 11px);
  cursor:pointer;color:var(--text-2);font-size:var(--fs-11);
  transition:background .13s,color .13s,box-shadow .13s;
  position:relative;
}
.ops-tree-node:hover{background:#f5f8fc}
.ops-tree-node span:nth-child(2){
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:var(--fs-11);font-weight:600;min-width:0;
}
.ops-tree-node b{
  font-size:var(--fs-9);color:#7a8ba0;font-weight:750;
  min-width:24px;text-align:center;padding:3px 7px;border-radius:var(--radius-pill);
  background:var(--surface3);font-variant-numeric:tabular-nums;flex:0 0 auto;
}
.ops-tree-glyph{
  width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  color:#7b8fa8;background:#f3f6fa;position:relative;flex:0 0 auto;
}
.ops-tree-glyph svg{width:15px!important;height:15px!important}

.ops-tree-node.depth-0{color:#12294a}
.ops-tree-node.depth-0 span:nth-child(2){font-size:var(--fs-12);font-weight:750}
.ops-tree-node.depth-0 .ops-tree-glyph{background:#e9f1ff;color:#1f63c4}
.ops-tree-node.depth-0 b{background:#e9f1ff;color:#1f63c4}
.ops-tree-node.depth-1{color:#2a5f9c}
.ops-tree-node.depth-1 span:nth-child(2){font-size:var(--fs-11);font-weight:700}
.ops-tree-node.depth-1 .ops-tree-glyph{background:#eef6ff;color:#3d80c6}
.ops-tree-node.depth-1 b{background:#eef6ff;color:#2f6fb3}
.ops-tree-node[class*="depth-"]:not(.depth-0):not(.depth-1){color:#5a6f86}
.ops-tree-node[class*="depth-"]:not(.depth-0):not(.depth-1) span:nth-child(2){font-weight:600}

.ops-tree-node.active{
  background:var(--brand-soft);color:var(--brand-2);
  box-shadow:inset 0 0 0 1px var(--brand-line),inset 3px 0 0 var(--brand);
  font-weight:750;
}
.ops-tree-node.active b{background:#dbe9ff;color:var(--brand-2)}
.ops-tree-node.active .ops-tree-glyph{background:#dbe9ff;color:var(--brand);box-shadow:none}

/* Collapse chevron */
.ops-tree-node.has-children .ops-tree-glyph:before{
  content:"";position:absolute;left:-9px;width:6px;height:6px;
  border-right:1.7px solid currentColor;border-bottom:1.7px solid currentColor;
  transform:rotate(45deg) translate(-1px,-1px);opacity:.62;
  transition:transform .15s ease;
}
.ops-tree-node.has-children.collapsed .ops-tree-glyph:before{transform:rotate(-45deg) translate(0,0)}
.ops-tree-node[hidden]{display:none!important}

/* ==========================================================================
   Pagination
   ========================================================================== */
.ops-pagination{
  min-height:52px;border-top:1px solid var(--line-soft);
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;
  padding:0 14px;background:var(--surface);
}
.ops-page-size{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:var(--fs-10);font-weight:600;white-space:nowrap}
.ops-page-size select{
  height:30px;border:1px solid var(--line-strong);border-radius:8px;
  background:var(--surface);padding:0 26px 0 9px;color:var(--text);
  font-size:var(--fs-10);font-weight:700;cursor:pointer;width:auto;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 7px center;background-size:13px;
}
.ops-page-summary{
  font-size:var(--fs-10);color:var(--muted);font-weight:650;text-align:center;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.ops-page-controls{justify-self:end;display:flex;align-items:center;gap:5px}
.ops-page-controls>button,.ops-page-numbers button{
  width:31px;height:31px;border:1px solid var(--line-strong);border-radius:8px;
  background:var(--surface);color:var(--text-2);cursor:pointer;
  font-size:var(--fs-12);font-weight:700;transition:.14s;
  display:inline-grid;place-items:center;font-variant-numeric:tabular-nums;
}
.ops-page-controls>button:hover:not(:disabled),.ops-page-numbers button:hover{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-2)}
.ops-page-controls>button:disabled{opacity:.38;cursor:not-allowed}
.ops-page-numbers{display:flex;gap:5px;align-items:center}
.ops-page-numbers button.active{background:var(--brand);border-color:var(--brand-2);color:#fff;box-shadow:0 4px 10px rgba(13,124,114,.22)}

/* ==========================================================================
   Generic inline messages / notes
   ========================================================================== */
.ops-inline-message{border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:var(--fs-11);font-weight:600;line-height:1.5}
.ops-inline-message.success{background:#f0fdf7;border-color:#b7e8d1;color:var(--green-2)}
.ops-inline-message.danger{background:#fff5f4;border-color:#f3c9c4;color:var(--red-2)}
.ops-inline-link{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 16px;border-top:1px solid var(--line-soft);
  color:var(--brand);font-weight:700;font-size:var(--fs-11);
  height:44px;transition:background .15s;background:#ffffff;
}
.ops-inline-link:hover{background:var(--brand-soft);color:var(--brand-2)}
.ops-inline-link span{font-size:var(--fs-15);line-height:1}
/* ==========================================================================
   Dashboard
   ========================================================================== */
.ops-dashboard-page{grid-template-rows:auto auto minmax(0,1fr)}

.ops-dashboard-summary.v22{
  display:grid;
  grid-template-columns:minmax(360px,1.15fr) minmax(0,2.85fr);
  gap:14px;min-height:0;
}

/* Presence hero */
.ops-presence-card{
  background:linear-gradient(135deg,#ffffff 0%,#fbfdff 60%,#f6faff 100%);
  border:1px solid var(--line);border-radius:var(--radius);
  display:flex;align-items:center;gap:22px;padding:18px 22px;
  box-shadow:var(--shadow-sm);position:relative;overflow:hidden;
  transition:border-color .16s,box-shadow .16s,transform .16s;
}
.ops-presence-card:before{
  content:"";position:absolute;inset:0 auto 0 0;width:3px;
  background:linear-gradient(180deg,#60a5fa,#0d7c72);opacity:.9;
}
.ops-dashboard-link-card{cursor:pointer}
.ops-dashboard-link-card:hover{
  border-color:#c3d7f0;box-shadow:0 12px 30px rgba(24,58,106,.09);transform:translateY(-1px);
}
.ops-presence-donut{
  --online-pct:0;
  position:relative;width:104px;height:104px;border-radius:50%;flex:0 0 auto;
  background:conic-gradient(#0d7c72 0 calc(var(--online-pct) * 1%),#e3e9f2 calc(var(--online-pct) * 1%) 100%);
  display:grid;place-items:center;
  box-shadow:0 6px 18px rgba(13,124,114,.14);
}
.ops-presence-donut:before{
  content:"";position:absolute;inset:14px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 1px #eef2f7;
}
.ops-presence-donut>div{position:relative;z-index:1;display:grid;text-align:center;line-height:1}
.ops-presence-donut strong{
  font-size:var(--fs-26);font-weight:800;color:#10294a;letter-spacing:-1.2px;
  font-variant-numeric:tabular-nums;
}
.ops-presence-donut span{margin-top:5px;font-size:var(--fs-9);color:var(--muted);font-weight:700}
.ops-presence-copy{min-width:0}
.ops-summary-eyebrow{
  display:block;font-size:var(--fs-9);font-weight:800;letter-spacing:1.1px;
  color:var(--brand);text-transform:uppercase;
}
.ops-presence-copy h2{margin:6px 0 12px;font-size:var(--fs-18);font-weight:750;color:var(--text);letter-spacing:-.3px}
.ops-presence-legend{display:grid;gap:6px}
.ops-presence-filter{
  display:grid!important;grid-template-columns:8px minmax(0,1fr) auto 14px;
  align-items:center;gap:9px;color:var(--text-2);text-decoration:none;
  border-radius:9px;padding:6px 8px;margin:0 -8px;
  font-size:var(--fs-11);font-weight:600;transition:background .14s,color .14s;
}
.ops-presence-filter:hover{background:var(--brand-soft);color:var(--brand-2)}
.ops-presence-filter i{width:8px;height:8px;border-radius:50%}
.ops-presence-filter i.online{background:#12b76a;box-shadow:0 0 0 3px rgba(18,183,106,.15)}
.ops-presence-filter i.offline{background:#64758a;box-shadow:0 0 0 3px rgba(148,163,184,.15)}
.ops-presence-filter span{font-weight:650;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-presence-filter strong{
  font-size:var(--fs-15);font-weight:800;color:var(--text);
  font-variant-numeric:tabular-nums;letter-spacing:-.3px;
}
.ops-presence-filter b{font-size:var(--fs-13);color:var(--brand);font-weight:800;opacity:.6;transition:.14s}
.ops-presence-filter:hover b{opacity:1;transform:translateX(2px)}

/* Stat cards */
.ops-dashboard-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;min-width:0}
.ops-dashboard-stat-grid.v237{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ops-stat-card{
  position:relative;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px 18px;display:flex;align-items:center;gap:13px;min-width:0;
  box-shadow:var(--shadow-xs);
  transition:transform .14s,border-color .14s,box-shadow .14s;
}
.ops-stat-card[href]{cursor:pointer;text-decoration:none;color:inherit;padding-right:40px}
.ops-stat-card[href]:hover{
  transform:translateY(-2px);border-color:#c3d7f0;
  box-shadow:0 12px 28px rgba(24,58,106,.09);
}
.ops-stat-icon{
  width:44px;height:44px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;
  background:var(--slate-soft);color:#58708e;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.04);
}
.ops-stat-icon svg{width:21px;height:21px;stroke-width:1.8}
.ops-stat-card.warehouse .ops-stat-icon{background:var(--purple-soft);color:var(--purple);box-shadow:inset 0 0 0 1px rgba(124,58,237,.1)}
.ops-stat-card.warning .ops-stat-icon,.ops-stat-card.pending .ops-stat-icon{background:var(--amber-soft);color:var(--amber);box-shadow:inset 0 0 0 1px rgba(196,122,6,.12)}
.ops-stat-card.disposed .ops-stat-icon{background:var(--disposed-soft);color:var(--disposed)}
.ops-stat-card small{display:block;font-size:var(--fs-11);font-weight:650;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-stat-card strong{
  display:block;margin-top:5px;font-size:var(--fs-26);line-height:1;font-weight:800;
  color:var(--text);letter-spacing:-1px;font-variant-numeric:tabular-nums;
}
.ops-stat-card.warehouse strong{color:#6d28d9}
.ops-stat-card.warning strong,.ops-stat-card.pending strong{color:var(--amber-2)}
.ops-stat-card[href] em{
  display:block;margin-top:6px;color:var(--muted2);font-size:var(--fs-9);
  font-style:normal;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ops-card-arrow{
  position:absolute;right:16px;top:50%;transform:translateY(-50%);
  font-size:var(--fs-15);font-weight:800;color:#a9b8ca;transition:.14s;
}
.ops-stat-card[href]:hover .ops-card-arrow{color:var(--brand);transform:translate(2px,-50%)}

/* Dashboard grids */
.ops-dashboard-grid.v21{
  min-height:0;display:grid;
  grid-template-columns:minmax(0,1.58fr) minmax(300px,.72fr);
  grid-template-rows:minmax(0,.8fr) minmax(0,1.2fr);
  gap:14px;
}
.ops-attention-panel{grid-row:1/3;display:grid;grid-template-rows:58px minmax(0,1fr)}
.ops-status-panel{display:grid;grid-template-rows:58px minmax(0,1fr) 44px}
.ops-recent-panel{display:grid;grid-template-rows:58px minmax(0,1fr)}

.ops-health-summary.v21{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line-soft);align-content:stretch}
.ops-health-summary.v21>div{
  background:var(--surface);padding:14px 16px;
  display:grid;grid-template-columns:1fr auto auto;align-items:baseline;gap:6px;
  transition:background .14s;
}
.ops-health-summary.v21>div:hover{background:#fafcff}
.ops-health-summary.v21 span{color:var(--text-2);font-size:var(--fs-10);font-weight:650;line-height:1.35}
.ops-health-summary.v21 strong{
  font-size:var(--fs-22);font-weight:800;color:var(--text);
  letter-spacing:-.6px;font-variant-numeric:tabular-nums;
}
.ops-health-summary.v21 small{color:var(--muted2);font-size:var(--fs-9);font-weight:600;margin-left:2px}
.ops-attention-table td:nth-child(3){font-weight:800;font-variant-numeric:tabular-nums}
.ops-attention-table .critical{color:var(--red)}
.ops-attention-table .warning{color:var(--amber)}
#ops-health-attention{scroll-margin-top:16px}

/* Dashboard device cell */
.ops-device-primary{display:flex;align-items:center;min-width:0}
.ops-device-primary>div{min-width:0}
.ops-device-primary strong{
  display:block;font-weight:750;color:var(--text);font-size:var(--fs-11);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-device-primary small{
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:270px;
  font-size:var(--fs-9);color:var(--muted2);
}

/* ==========================================================================
   Devices list
   ========================================================================== */
.ops-devices-page{grid-template-rows:auto minmax(0,1fr)}
.ops-list-panel{
  display:grid;grid-template-rows:58px minmax(0,1fr) 52px;
  min-height:0;
}
.ops-list-head{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:0 16px;border-bottom:1px solid var(--line-soft);
  background:linear-gradient(180deg,#fff,#ffffff);min-width:0;
}
.ops-list-head>div{min-width:0}
.ops-list-head span{
  display:block;font-size:var(--fs-9);font-weight:800;letter-spacing:1px;
  text-transform:uppercase;color:var(--muted2);line-height:1.3;
}
.ops-list-head h2{
  margin:3px 0 0;font-size:var(--fs-14);font-weight:750;color:var(--text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-list-count{flex:0 0 auto}
.ops-list-count span{
  height:28px;padding:0 11px;border-radius:var(--radius-pill);
  background:var(--brand-soft);border:1px solid var(--brand-line);
  display:inline-flex;align-items:center;color:var(--brand-2);
  font-size:var(--fs-10);font-weight:800;letter-spacing:0;text-transform:none;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.ops-device-table-shell{position:relative;overflow:auto}

.ops-device-table th.ops-col-stt,.ops-device-table td.ops-device-stt{
  width:58px;text-align:center;color:var(--muted2);
  font-size:var(--fs-10);font-weight:700;font-variant-numeric:tabular-nums;
}
.ops-device-table th.ops-col-detail{width:96px;text-align:center}
.ops-device-table td:last-child{text-align:center;white-space:nowrap}
.ops-device-table tbody tr{cursor:default;transition:background .12s,box-shadow .12s}
.ops-device-table tbody tr:hover{background:#f3faf7;box-shadow:inset 3px 0 0 #b6d4f6}
.ops-device-table tbody td{height:52px}
.ops-device-table .ops-state{font-variant-numeric:tabular-nums}



/* ==========================================================================
   Device detail
   ========================================================================== */
.ops-device-page{
  padding:0;gap:0;grid-template-rows:66px 44px minmax(0,1fr);
  background:var(--bg);
}
.ops-device-head.v21{
  display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;
  gap:12px;padding:0 20px;background:var(--surface);
  border-bottom:1px solid var(--line);
}
.ops-back{
  width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  border:1px solid var(--line-strong);color:var(--text-2);background:var(--surface);
  transition:.15s;box-shadow:var(--shadow-xs);
}
.ops-back svg{width:17px;height:17px;stroke-width:2}
.ops-back:hover{background:var(--brand-soft);color:var(--brand);border-color:var(--brand-line)}
.ops-device-identity{display:flex;align-items:center;gap:12px;min-width:0}
.ops-device-icon{
  width:38px;height:38px;border-radius:11px;background:var(--brand-soft);color:var(--brand);
  display:grid;place-items:center;flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgba(13,124,114,.1);
}
.ops-device-icon svg{width:20px;height:20px}
.ops-device-icon.online{background:var(--green-soft);color:var(--green);box-shadow:inset 0 0 0 1px rgba(15,157,99,.12)}
.ops-device-icon.offline{background:var(--red-soft);color:var(--red);box-shadow:inset 0 0 0 1px rgba(217,45,32,.1)}
.ops-device-icon.warning,.ops-device-icon.pending,.ops-device-icon.pendingexpired{background:var(--amber-soft);color:var(--amber);box-shadow:inset 0 0 0 1px rgba(196,122,6,.14)}
.ops-device-icon.revoked,.ops-device-icon.disabled{background:var(--red-soft);color:var(--red-2)}
.ops-device-icon.warehouse{background:var(--purple-soft);color:var(--purple)}
.ops-device-title-line{display:flex;align-items:center;gap:10px;min-width:0}
.ops-device-title-line h1{
  font-size:var(--fs-18);font-weight:800;color:var(--text);letter-spacing:-.4px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-device-identity p{
  margin:4px 0 0;color:var(--muted);font-size:var(--fs-10);font-weight:550;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

.ops-device-actions{position:relative;justify-self:end}

/* Action menu */
.ops-action-menu{
  position:absolute;right:0;top:44px;z-index:70;width:268px;
  background:var(--surface);border:1px solid var(--line);border-radius:14px;
  box-shadow:var(--shadow-lg);padding:7px;
  animation:ops-menu-in .14s ease-out;
}
@keyframes ops-menu-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.ops-action-menu.v231{width:272px}
.ops-action-group{padding:3px 0}
.ops-action-group + .ops-action-group{border-top:1px solid var(--line-soft);margin-top:4px;padding-top:8px}
.ops-action-group > span{
  display:block;padding:3px 10px 6px;color:var(--muted2);
  font-size:var(--fs-9);font-weight:800;letter-spacing:.85px;text-transform:uppercase;
}
.ops-action-menu button{
  width:100%;height:38px;border:0;background:transparent;border-radius:9px;
  text-align:left;padding:0 10px;cursor:pointer;color:var(--text-2);
  display:flex;align-items:center;gap:9px;font-size:var(--fs-12);font-weight:600;
  transition:background .12s,color .12s;
}
.ops-action-menu button svg{width:16px;height:16px;color:var(--muted);flex:0 0 auto;stroke-width:1.85}
.ops-action-menu button:hover{background:var(--brand-soft);color:var(--brand-2)}
.ops-action-menu button:hover svg{color:var(--brand)}
.ops-action-menu button.danger{color:var(--red-2)}
.ops-action-menu button.danger svg{color:var(--red)}
.ops-action-menu button.danger:hover{background:var(--red-soft)}
.ops-action-menu button.copied{color:var(--green-2);background:var(--green-soft)}
.ops-action-group.danger-zone>span{color:#b06464}
.ops-action-menu hr{border:0;border-top:1px solid var(--line-soft);margin:5px 0}

/* Tabs */
.ops-device-tabs{
  display:flex;align-items:flex-end;gap:2px;padding:0 60px;
  border-bottom:1px solid var(--line);background:var(--surface);
}
.ops-device-tabs button{
  position:relative;height:44px;border:0;background:transparent;padding:0 14px;
  color:var(--muted);font-weight:700;font-size:var(--fs-11);cursor:pointer;
  display:flex;align-items:center;gap:7px;transition:color .14s,background .14s;
  border-radius:9px 9px 0 0;
}
.ops-device-tabs button svg{width:16px;height:16px;stroke-width:1.85}
.ops-device-tabs button:hover{color:var(--text);background:var(--surface2)}
.ops-device-tabs button.active{color:var(--brand-2);background:var(--brand-soft)}
.ops-device-tabs button.active:after{
  content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;
  background:var(--brand);border-radius:3px 3px 0 0;
}

/* Loading / error states */
.ops-device-state{
  display:flex;align-items:center;justify-content:center;gap:10px;
  color:var(--muted);height:100%;font-size:var(--fs-12);font-weight:600;
}
.ops-device-state.error{color:var(--red-2)}
.ops-spinner{
  width:18px;height:18px;border:2px solid #d7e1ec;border-top-color:var(--brand);
  border-radius:50%;animation:ops-spin .75s linear infinite;
}
@keyframes ops-spin{to{transform:rotate(360deg)}}
.ops-device-content{min-height:0;overflow:hidden}
.ops-device-tab{height:100%;min-height:0;display:none}
.ops-device-tab.active{display:block}

/* Overview grid */
.ops-overview-grid.v231{
  height:100%;min-height:0;overflow:hidden;
  display:grid;grid-template-columns:minmax(400px,43fr) minmax(520px,57fr);
  gap:10px;padding:10px 12px 12px;
}
.ops-summary-column.v231{
  min-height:0;overflow:hidden;display:grid;
  grid-template-rows:minmax(0,1.04fr) minmax(0,.96fr);gap:10px;
}
.ops-live-column.v231{
  min-height:0;overflow:hidden;display:grid;
  grid-template-rows:auto minmax(0,.9fr) minmax(0,1.1fr);gap:10px;
}
.ops-overview-card{
  min-height:0;overflow:hidden;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-xs);
  display:grid;
}
.ops-card-head{
  min-height:52px;padding:8px 13px;display:flex;align-items:center;
  justify-content:space-between;gap:12px;border-bottom:1px solid var(--line-soft);
  background:linear-gradient(180deg,#fff,#ffffff);min-width:0;
}
.ops-card-head .ops-title-with-icon{gap:10px}
.ops-card-head h2{margin:3px 0 0;font-size:var(--fs-13);line-height:1.2;font-weight:750;color:var(--text)}
.ops-card-head>small{font-size:var(--fs-9);color:var(--muted2);text-align:right;line-height:1.35;max-width:44%}
.ops-card-head .ops-section-icon{width:32px;height:32px;border-radius:9px}
.ops-card-head .ops-section-icon svg{width:17px;height:17px}
.ops-info-card{grid-template-rows:auto minmax(0,1fr)}
.ops-hardware-card{grid-template-rows:auto minmax(0,1fr)}

/* Key-value grid — block flow so a value tile can never be squeezed or clipped */
.ops-kv,.ops-kv.v231{
  margin:0;padding:10px 10px 11px;display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 8px;
  align-content:start;overflow:auto;min-height:0;
}
.ops-kv>div,.ops-kv.v231>div,.ops-info-item{
  display:block;height:auto;min-height:0;padding:7px 9px;
  border:1px solid var(--line-soft);border-radius:9px;background:var(--surface2);
  min-width:0;overflow:visible;transition:border-color .13s,background .13s;
}
.ops-kv>div:hover,.ops-kv.v231>div:hover,.ops-info-item:hover{border-color:var(--line-strong);background:#fff}
.ops-kv>div.wide,.ops-kv.v231>div.wide{grid-column:1/-1}
.ops-kv dt{
  display:flex;align-items:center;gap:6px;color:var(--muted);
  font-size:9.5px;font-weight:700;min-width:0;line-height:1.4;
}
.ops-kv dt>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-kv dd{
  display:block;margin:3px 0 0 24px;color:var(--text);font-size:var(--fs-11);
  font-weight:700;line-height:1.45;min-width:0;max-width:calc(100% - 24px);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-kv .ops-field-icon,.ops-field-icon{
  width:19px;height:19px;border:0;border-radius:6px;
  background:var(--brand-soft);color:#347bd1;flex:0 0 auto;
  display:grid;place-items:center;
}
.ops-field-icon svg{width:12px;height:12px;stroke-width:1.9}

/* Hardware tiles */
.ops-hardware-grid{
  min-height:0;padding:9px 10px 10px;display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(3,minmax(0,1fr));gap:8px;overflow:auto;
}
.ops-hardware-tile{
  position:relative;min-height:0;padding:9px;
  border:1px solid var(--line-soft);border-radius:10px;
  background:linear-gradient(180deg,#fff,#fbfdff);overflow:hidden;
  transition:border-color .13s,box-shadow .13s;
}
.ops-hardware-tile:hover{border-color:var(--line-strong);box-shadow:var(--shadow-xs)}
.ops-hardware-tile-head{display:grid;grid-template-columns:28px minmax(0,1fr) 24px;gap:7px;align-items:start}
.ops-hardware-icon{
  width:28px;height:28px;border:0;border-radius:8px;display:grid;place-items:center;
  background:var(--brand-soft);color:#367cc9;flex:0 0 auto;
}
.ops-hardware-icon svg{width:15px;height:15px;stroke-width:1.85}
.ops-hardware-tile-head>div>span{
  display:block;color:var(--muted);font-size:var(--fs-9);font-weight:800;
  letter-spacing:.45px;text-transform:uppercase;margin:0 0 3px;
}
.ops-hardware-tile strong{
  display:-webkit-box;color:var(--text);font-size:var(--fs-10);line-height:1.32;
  font-weight:700;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.ops-hardware-tile>small{
  display:block;margin:5px 0 0 35px;color:var(--muted2);font-size:var(--fs-9);
  line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-history-chip{
  width:24px;height:24px;border:1px solid var(--brand-line);border-radius:7px;
  display:grid;place-items:center;color:var(--brand);background:#f5f9ff;
  cursor:pointer;transition:.13s;
}
.ops-history-chip:hover{background:var(--brand-soft);border-color:#a9c3eb;transform:translateY(-1px)}
.ops-history-chip svg{width:13px;height:13px;stroke-width:2}
.ops-history-popover{
  position:fixed;z-index:120;background:#0d1726;color:#e7eef8;
  border:1px solid #263b59;border-radius:12px;box-shadow:var(--shadow-lg);
  padding:12px 13px;
}
.ops-history-popover>div{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;gap:12px}
.ops-history-popover span{font-size:var(--fs-9);color:#93a6bf;text-transform:uppercase;font-weight:800;letter-spacing:.7px}
.ops-history-popover button{
  border:0;background:transparent;color:#8fa2ba;font-size:18px;line-height:1;
  cursor:pointer;padding:0 2px;transition:color .12s;
}
.ops-history-popover button:hover{color:#fff}
.ops-history-popover strong{font-size:var(--fs-11);line-height:1.5;font-weight:600;display:block}

/* Live health */
.ops-live-panel.v231{grid-template-rows:auto minmax(0,1fr)}
.ops-live-metrics.v231{
  min-height:0;padding:9px 10px 10px;display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;
}
.ops-live-metrics.v231 article{
  min-width:0;padding:8px 9px;border:1px solid var(--line-soft);border-radius:10px;
  background:var(--surface2);
  display:grid;grid-template-columns:26px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 5px;
  column-gap:8px;align-items:center;
  transition:background .15s,border-color .15s,box-shadow .15s;
}
.ops-live-metrics.v231 .ops-health-icon{
  width:26px;height:26px;border-radius:8px;display:grid;place-items:center;
  background:#eef5fd;color:#2f80d8;flex:0 0 auto;
}
.ops-live-metrics.v231 .ops-health-icon svg{width:14px;height:14px;stroke-width:1.9}
.ops-live-metrics.v231 article>.ops-health-meta{
  min-width:0;height:auto;background:transparent;border-radius:0;overflow:visible;align-self:center;
}
.ops-live-metrics.v231 .ops-health-meta>span{
  display:block;color:var(--muted);font-size:var(--fs-9);font-weight:750;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ops-live-metrics.v231 .ops-health-meta strong{
  display:block;margin:3px 0 0;color:var(--text);font-size:var(--fs-18);
  line-height:1;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums;
  letter-spacing:-.4px;
}
.ops-live-metrics.v231 article>.ops-health-bar{
  grid-column:1/-1;height:5px;background:#e6ecf4;border-radius:99px;overflow:hidden;margin-top:6px;
}
.ops-live-metrics.v231 .ops-health-bar i{
  display:block;height:100%;width:0;background:linear-gradient(90deg,#4b8df5,#0d7c72);
  border-radius:99px;transition:width .25s ease;
}
.ops-live-metrics.v231 article.health-normal{background:#f5fdf9;border-color:#cfeddf}
.ops-live-metrics.v231 article.health-normal .ops-health-icon{background:#e2f8ed;color:#0b8a5d}
.ops-live-metrics.v231 article.health-normal .ops-health-meta strong{color:#07794c}
.ops-live-metrics.v231 article.health-normal .ops-health-bar i{background:linear-gradient(90deg,#34c98b,#0f9d63)}
.ops-live-metrics.v231 article.health-warning{background:#fffbf2;border-color:#f2dfb8}
.ops-live-metrics.v231 article.health-warning .ops-health-icon{background:#fff2d4;color:#b87800}
.ops-live-metrics.v231 article.health-warning .ops-health-meta strong{color:#a56500}
.ops-live-metrics.v231 article.health-warning .ops-health-bar i{background:linear-gradient(90deg,#f0b429,#d98e04)}
.ops-live-metrics.v231 article.health-danger{background:#fff7f6;border-color:#f1cbc7}
.ops-live-metrics.v231 article.health-danger .ops-health-icon{background:#ffe9e7;color:#d92d20}
.ops-live-metrics.v231 article.health-danger .ops-health-meta strong{color:#c8281d}
.ops-live-metrics.v231 article.health-danger .ops-health-bar i{background:linear-gradient(90deg,#f2685c,#d92d20)}
.ops-live-metrics.v231 article.health-unknown{background:#fafbfd;border-color:#e8edf3}
.ops-live-metrics.v231 article.health-unknown .ops-health-bar i{background:#a8b3c0}

/* Disk panel */
.ops-disk-panel.v231{grid-template-rows:auto minmax(0,1fr);padding:0}
.ops-disk-list.v231{
  min-height:0;overflow:auto;padding:4px 11px 7px;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;align-content:start;
}
.ops-disk-row.v231{display:block;padding:8px 2px;border-bottom:1px solid var(--line-soft);min-width:0}
.ops-disk-row.v231:last-child{border-bottom:0}
.ops-disk-title{display:flex;align-items:center;gap:8px;min-width:0}
.ops-disk-title strong{
  min-width:0;color:var(--text);font-size:var(--fs-10);font-weight:750;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-disk-row.v231 small{
  display:block;margin:3px 0 0;color:var(--muted2);font-size:var(--fs-9);line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ops-disk-health{
  flex:0 0 auto;height:21px;padding:0 8px;border-radius:var(--radius-pill);
  display:inline-flex;align-items:center;gap:5px;
  font-size:var(--fs-9);font-weight:800;letter-spacing:.1px;
}
.ops-disk-health i{width:6px;height:6px;border-radius:50%;background:currentColor}
.ops-disk-health.good{background:var(--green-soft);color:var(--green-2)}
.ops-disk-health.warning{background:var(--amber-soft);color:var(--amber-2)}
.ops-disk-health.bad{background:var(--red-soft);color:var(--red-2)}
.ops-disk-health.unknown{background:var(--slate-soft);color:#68768a}

/* Software panel */
.ops-software-panel.v231{grid-template-rows:auto minmax(0,1fr)}
.ops-software-panel.v231 .ops-card-head{padding:8px 11px}
.ops-software-head .ops-small-search{height:32px;width:min(250px,40%);background:#fff}
.ops-software-panel.v231 .ops-table-shell{min-height:0;height:auto;overflow:auto!important;display:block}
.ops-software-panel.v231 .ops-table{font-size:var(--fs-10)}
.ops-software-panel.v231 .ops-table th{font-size:var(--fs-9);padding:8px 10px}
.ops-software-panel.v231 .ops-table td{padding:6px 10px}
.ops-software-panel.v231 .ops-table td:first-child{font-weight:650;color:var(--text)}
#ops-software-count{font-size:var(--fs-9);color:var(--muted2);font-weight:700}

/* ==========================================================================
   Remote diagnostics workspace
   ========================================================================== */
.ops-remote-workspace.v21{
  height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);
  gap:10px;padding:10px 12px 12px;
}
.ops-remote-toolbar{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:10px 12px;display:flex;align-items:center;justify-content:space-between;
  gap:14px;flex-wrap:wrap;box-shadow:var(--shadow-xs);
}
.ops-command-tabs{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.ops-command-tabs button{
  height:34px;border:1px solid var(--line-strong);border-radius:9px;
  background:var(--surface);color:var(--text-2);padding:0 12px;
  font-size:var(--fs-11);font-weight:700;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;transition:.14s;
}
.ops-command-tabs button svg{width:15px;height:15px;stroke-width:1.9;color:var(--muted)}
.ops-command-tabs button:hover{background:var(--surface2);border-color:#bfd0e4}
.ops-command-tabs button.active{
  background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-2);
}
.ops-command-tabs button.active svg{color:var(--brand)}
.ops-command-tabs button:disabled{opacity:.5;cursor:not-allowed}
.ops-remote-inputs{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap}
.ops-remote-inputs label{display:grid;gap:5px}
.ops-remote-inputs label>span{
  font-size:var(--fs-9);font-weight:800;letter-spacing:.5px;
  text-transform:uppercase;color:var(--muted2);line-height:1;
}
.ops-remote-inputs input{
  height:36px;width:min(240px,32vw);border:1px solid var(--line-strong);border-radius:9px;
  padding:0 11px;outline:0;font-family:var(--font-mono);font-size:var(--fs-11);
  background:var(--surface);transition:.15s;
}
.ops-remote-inputs input:focus{border-color:#9dc0f7;box-shadow:0 0 0 4px rgba(13,124,114,.1)}
.ops-remote-inputs input:disabled{background:var(--surface3);color:var(--muted)}

.ops-terminal{
  min-height:0;display:grid;grid-template-rows:40px minmax(0,1fr);
  background:#0b1523;border:1px solid #1c2c42;border-radius:var(--radius);
  overflow:hidden;box-shadow:var(--shadow);
}
.ops-terminal header{
  display:flex;align-items:center;gap:10px;padding:0 12px;
  background:linear-gradient(180deg,#16233a,#111c2e);
  border-bottom:1px solid #22334c;color:#9fb3cc;font-size:var(--fs-9);
}
.ops-terminal header>span{
  font-size:var(--fs-9);font-weight:800;letter-spacing:.8px;
  padding:3px 8px;border-radius:var(--radius-pill);
  background:rgba(52,211,153,.12);color:#5ee6b0;white-space:nowrap;
}
.ops-terminal header>b{
  font-family:var(--font-mono);font-size:var(--fs-10);font-weight:500;
  color:#8fa6c2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;
}
.ops-terminal header>div{margin-left:auto;display:flex;align-items:center;gap:5px;flex:0 0 auto}
.ops-terminal header button{
  height:26px;border:1px solid #2b3f5c;border-radius:7px;background:#182740;
  color:#a9bdD6;font-size:var(--fs-9);font-weight:700;padding:0 9px;cursor:pointer;
  transition:.14s;
}
.ops-terminal header button:hover{background:#22344f;border-color:#3b5378;color:#dbe7f6}
.ops-terminal pre{
  margin:0;padding:14px 16px;overflow:auto;
  font-family:var(--font-mono);font-size:var(--fs-11);line-height:1.65;
  color:#c8d8ea;white-space:pre-wrap;word-break:break-word;
  background:
    radial-gradient(1200px 400px at 0% 0%,rgba(13,124,114,.10),transparent 60%),
    #0b1523;
}
.ops-terminal pre::selection{background:#2b4a72;color:#fff}

/* ==========================================================================
   Lifecycle / history
   ========================================================================== */
.ops-lifecycle-page{height:100%;min-height:0;padding:10px 12px 12px;overflow:hidden}
.ops-lifecycle-page .ops-surface{height:100%}
.ops-history-scroll{min-height:0;overflow:auto;padding:10px 14px 16px}
.ops-history-item{
  position:relative;padding:11px 13px 11px 34px;
  border:1px solid var(--line-soft);border-radius:10px;margin-bottom:8px;
  background:var(--surface2);transition:.14s;
}
.ops-history-item:hover{border-color:var(--line-strong);background:#fff}
.ops-history-item:before{
  content:"";position:absolute;left:14px;top:16px;width:8px;height:8px;
  border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);
}
.ops-history-item:after{
  content:"";position:absolute;left:17.5px;top:26px;bottom:-9px;width:1px;
  background:var(--line);
}
.ops-history-item:last-child{margin-bottom:0}
.ops-history-item:last-child:after{display:none}
.ops-history-item h3{margin:0;font-size:var(--fs-12);font-weight:750;color:var(--text)}
.ops-history-item p{margin:4px 0 0;color:var(--muted);font-size:var(--fs-10);line-height:1.5}
.ops-history-item time{
  display:block;margin-top:5px;color:var(--muted2);font-size:var(--fs-9);
  font-weight:650;font-variant-numeric:tabular-nums;
}

/* ==========================================================================
   Dialogs
   ========================================================================== */
.ops-dialog{
  border:0;padding:0;background:transparent;max-width:100vw;max-height:100vh;
  color:var(--text);
}
.ops-dialog::backdrop{background:rgba(9,17,31,.55);backdrop-filter:blur(3px)}
.ops-dialog-card{
  width:min(470px,calc(100vw - 32px));
  background:var(--surface);border-radius:18px;padding:0;
  box-shadow:var(--shadow-lg);border:1px solid var(--line);
  display:grid;overflow:hidden;margin:0;
}
.ops-dialog-card.wide{width:min(780px,calc(100vw - 40px))}
.ops-dialog-card>header{
  padding:18px 20px 12px;border-bottom:1px solid var(--line-soft);
  background:linear-gradient(180deg,#fff,#ffffff);
}
.ops-dialog-card>header h2{margin:6px 0 0;font-size:var(--fs-15);font-weight:800;color:var(--text);letter-spacing:-.2px;line-height:1.3}
.ops-dialog-card>p{
  margin:0;padding:14px 20px;color:var(--text-2);font-size:var(--fs-11);
  line-height:1.6;white-space:pre-wrap;
}
.ops-dialog-card>label{
  display:grid;gap:6px;padding:0 20px 12px;
}
.ops-dialog-card>label>span{
  font-size:var(--fs-9);font-weight:800;text-transform:uppercase;
  letter-spacing:.55px;color:var(--muted);
}
.ops-dialog-card footer{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;
  padding:14px 20px 18px;border-top:1px solid var(--line-soft);
  background:var(--surface2);
}
.ops-dialog-card footer .ops-button{height:38px}

/* Feedback dialog */
.ops-feedback-dialog::backdrop{background:rgba(9,17,31,.5);backdrop-filter:blur(3px)}
.ops-feedback-dialog .ops-dialog-card{width:min(480px,calc(100vw - 32px))}
.ops-feedback-dialog.danger .ops-dialog-card{border-top:4px solid var(--red)}
.ops-feedback-dialog.danger header>span{color:var(--red)!important}

/* Danger dialog (organizations) */
.ops-danger-dialog::backdrop{background:rgba(9,17,31,.55);backdrop-filter:blur(3px)}
.ops-danger-dialog .ops-dialog-card{width:min(520px,calc(100vw - 32px));padding:0;overflow:hidden;border-radius:18px}
.ops-danger-dialog-head{
  display:grid!important;grid-template-columns:46px 1fr;gap:13px;align-items:center;
  padding:20px 22px 14px!important;border:0!important;background:transparent!important;
}
/* Căn giữa icon thật sự: selector chung `.ops-dialog-card header span` có độ ưu tiên
   cao hơn `.ops-danger-dialog-icon` và từng làm mất display:grid, đẩy SVG lên đầu ô. */
.ops-danger-dialog .ops-danger-dialog-head .ops-danger-dialog-icon{
  width:44px;height:44px;border-radius:13px;
  display:grid!important;place-items:center;align-self:center;justify-self:center;
  background:var(--red-soft);color:var(--red);box-shadow:inset 0 0 0 1px rgba(217,45,32,.1);
}
.ops-danger-dialog .ops-danger-dialog-icon svg{width:22px;height:22px;display:block;margin:0}
.ops-danger-dialog-head>div>span{color:#c24138!important;font-size:var(--fs-9)!important;font-weight:850;letter-spacing:.9px}
.ops-danger-dialog-head h2{font-size:var(--fs-18)!important;margin:3px 0 0!important;color:var(--text);font-weight:800}
.ops-dialog-message{padding:0 22px;color:var(--text-2);font-size:var(--fs-12);line-height:1.6}
.ops-danger-detail{
  margin:14px 22px 0;padding:12px 13px;border-radius:10px;
  background:#fff7f6;border:1px solid #f2cbc7;color:#8f3b34;
  font-size:var(--fs-11);line-height:1.55;
}
.ops-danger-dialog footer{
  padding:18px 22px 20px!important;border:0!important;
  display:flex;justify-content:flex-end;gap:8px;background:transparent!important;
}

/* Transfer dialog */
.ops-transfer-dialog .ops-dialog-card.wide{width:min(800px,calc(100vw - 40px))}
.ops-transfer-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(250px,.85fr);gap:14px;padding:14px 20px}
.ops-transfer-unit-picker,.ops-transfer-hostname-panel{
  border:1px solid var(--line);border-radius:12px;background:var(--surface2);
  padding:11px;min-height:0;min-width:0;
}
.ops-transfer-search{display:grid;gap:6px}
.ops-transfer-search>span,.ops-transfer-hostname-panel label>span{
  font-size:var(--fs-9);font-weight:800;color:var(--muted);
  text-transform:uppercase;letter-spacing:.5px;
}
.ops-transfer-search>div{
  height:34px;border:1px solid var(--line-strong);border-radius:9px;background:#fff;
  display:flex;align-items:center;gap:7px;padding:0 10px;
}
.ops-transfer-search>div:focus-within{border-color:#9dc0f7;box-shadow:0 0 0 3px rgba(13,124,114,.09)}
.ops-transfer-search svg{width:14px;height:14px;color:var(--muted2)}
.ops-transfer-search input{border:0!important;outline:0;width:100%;height:100%;padding:0!important;background:transparent!important;box-shadow:none!important;font-size:var(--fs-11)}
.ops-transfer-unit-list{margin-top:8px;max-height:210px;overflow:auto;display:grid;gap:3px}
.ops-transfer-unit{
  min-height:36px;border:1px solid transparent;border-radius:9px;background:transparent;
  padding:0 10px;display:flex;align-items:center;justify-content:space-between;
  gap:10px;text-align:left;cursor:pointer;color:var(--text-2);transition:.12s;
}
.ops-transfer-unit:hover{background:#f2f7fd}
.ops-transfer-unit.active{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-2)}
.ops-transfer-unit span{font-size:var(--fs-11);font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-transfer-unit b{
  font-family:var(--font-mono);font-size:var(--fs-9);padding:3px 7px;
  border-radius:var(--radius-pill);background:#eef3f8;color:#567089;flex:0 0 auto;
}
.ops-transfer-unit.active b{background:#d8eaff;color:var(--brand-2)}
.ops-transfer-unit-empty{margin:12px 0 0;color:var(--muted2);font-size:var(--fs-10);text-align:center}
.ops-transfer-hostname-panel{display:grid;align-content:start;gap:10px}
.ops-transfer-hostname-panel label{display:grid;gap:5px}
.ops-transfer-selected{padding:10px 11px;border-radius:9px;background:var(--brand-soft);border:1px solid var(--brand-line)}
.ops-transfer-selected span,.ops-transfer-preview span{
  display:block;font-size:var(--fs-9);font-weight:800;text-transform:uppercase;
  letter-spacing:.5px;color:#64809e;
}
.ops-transfer-selected strong{display:block;margin-top:4px;font-size:var(--fs-11);color:#16324f;font-weight:750}
.ops-transfer-selected small{display:block;margin-top:3px;color:#2f6db1;font-size:var(--fs-9);font-weight:750}
.ops-transfer-hostname-panel input{
  height:36px;text-transform:uppercase;font-family:var(--font-mono);
  font-size:var(--fs-11);letter-spacing:.3px;
}
.ops-transfer-preview{padding:10px 11px;border-radius:9px;border:1px dashed #b9cae0;background:#fff}
.ops-transfer-preview strong{
  display:block;margin-top:5px;color:#155fb5;
  font-family:var(--font-mono);font-size:var(--fs-15);letter-spacing:.4px;font-weight:750;
}
.ops-transfer-preview strong.invalid{color:var(--red)}
.ops-transfer-preview small{display:block;margin-top:5px;color:var(--muted2);font-size:var(--fs-9);line-height:1.4}
.ops-transfer-dialog .ops-dialog-card>label{padding:0 20px 10px}
#ops-transfer-hostname{text-transform:uppercase;font-family:var(--font-mono);letter-spacing:.25px}

/* ==========================================================================
   Warehouse
   ========================================================================== */
.ops-warehouse-page.v234{grid-template-rows:auto auto minmax(0,1fr)}
.ops-warehouse-summary.v234{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ops-warehouse-summary.v234 article{
  background:var(--surface);border:1px solid var(--line);border-radius:14px;
  display:flex;align-items:center;gap:12px;padding:13px 16px;box-shadow:var(--shadow-xs);
}
.ops-summary-icon{
  width:40px;height:40px;border-radius:11px;display:grid;place-items:center;flex:0 0 auto;
  background:var(--slate-soft);color:#58708e;box-shadow:inset 0 0 0 1px rgba(15,23,42,.04);
}
.ops-summary-icon svg{width:19px;height:19px;stroke-width:1.85}
.ops-summary-icon.warehouse{background:var(--purple-soft);color:var(--purple);box-shadow:inset 0 0 0 1px rgba(124,58,237,.1)}
.ops-summary-icon.stored{background:var(--green-soft);color:var(--green);box-shadow:inset 0 0 0 1px rgba(15,157,99,.1)}
.ops-summary-icon.waiting{background:var(--amber-soft);color:var(--amber)}
.ops-summary-icon.issue{background:var(--red-soft);color:var(--red);box-shadow:inset 0 0 0 1px rgba(217,45,32,.09)}
.ops-summary-icon.disposed{background:var(--disposed-soft);color:var(--disposed)}
.ops-warehouse-summary.v234 small{display:block;color:var(--muted);font-size:var(--fs-10);font-weight:650}
.ops-warehouse-summary.v234 strong{
  display:block;margin-top:3px;font-size:var(--fs-18);line-height:1.15;
  font-weight:800;color:var(--text);letter-spacing:-.3px;
}
.ops-warehouse-list-panel.v234{min-height:0;display:grid;grid-template-rows:58px minmax(0,1fr)}
.ops-warehouse-list.v234{min-height:0;overflow:auto;padding:10px}
.ops-warehouse-row.v234{
  display:grid;
  grid-template-columns:minmax(230px,1.35fr) minmax(110px,.6fr) minmax(140px,.75fr)
                     minmax(150px,.8fr) minmax(170px,1fr) auto;
  gap:14px;align-items:center;padding:13px 14px;
  border:1px solid transparent;border-bottom-color:var(--line-soft);border-radius:11px;
  cursor:pointer;transition:.14s;
}
.ops-warehouse-row.v234:hover{background:#fafcff;border-color:#e3ecf7;box-shadow:var(--shadow-xs)}
.ops-warehouse-main{display:flex;align-items:center;min-width:0}
.ops-warehouse-main h3{
  font-size:var(--fs-12);font-weight:750;color:var(--text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-warehouse-main p{
  margin:3px 0 0;color:var(--muted);font-size:var(--fs-10);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-warehouse-main small{
  display:block;margin-top:3px;color:var(--muted2);font-size:var(--fs-9);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-warehouse-meta>span,.ops-warehouse-reason>span,.ops-warehouse-state-stack span{
  display:block;color:var(--muted2);font-size:var(--fs-9);
  text-transform:uppercase;letter-spacing:.55px;font-weight:800;margin-bottom:4px;
}
.ops-warehouse-meta strong,.ops-warehouse-reason strong{
  font-size:var(--fs-10);font-weight:750;color:var(--text);
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-warehouse-meta small,.ops-warehouse-reason small{
  display:block;color:var(--muted2);font-size:var(--fs-9);margin-top:3px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-warehouse-state-stack{display:grid;grid-template-columns:1fr;gap:5px;min-width:0}
.ops-warehouse-state-stack>small{color:var(--muted2);font-size:var(--fs-9);line-height:1.35}
.ops-warehouse-state-stack b{font-weight:750}
.ops-warehouse-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}

/* ==========================================================================
   Settings
   ========================================================================== */
.ops-settings-page{grid-template-rows:auto minmax(0,1fr)}
.ops-settings-grid.v21{
  min-height:0;overflow:auto;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));
  gap:12px;align-content:start;padding-bottom:4px;
}
.ops-settings-grid.v21 article{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px;display:grid;grid-template-columns:42px minmax(0,1fr);
  gap:13px;align-items:start;box-shadow:var(--shadow-xs);
  transition:border-color .15s,box-shadow .15s,transform .15s;
}
.ops-settings-grid.v21 article:hover{
  border-color:#c9dbf1;box-shadow:0 10px 26px rgba(24,58,106,.07);transform:translateY(-1px);
}
.ops-setting-icon{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;
  background:var(--brand-soft);color:var(--brand);box-shadow:inset 0 0 0 1px rgba(13,124,114,.08);
}
.ops-setting-icon svg{width:20px;height:20px;stroke-width:1.85}
.ops-setting-icon.blue{background:var(--brand-soft);color:var(--brand)}
.ops-setting-icon.amber{background:var(--amber-soft);color:var(--amber);box-shadow:inset 0 0 0 1px rgba(196,122,6,.12)}
.ops-setting-icon.green{background:var(--green-soft);color:var(--green);box-shadow:inset 0 0 0 1px rgba(15,157,99,.1)}
.ops-setting-icon.purple{background:var(--purple-soft);color:var(--purple);box-shadow:inset 0 0 0 1px rgba(124,58,237,.1)}
.ops-setting-icon.red{background:var(--red-soft);color:var(--red);box-shadow:inset 0 0 0 1px rgba(217,45,32,.09)}
.ops-settings-grid.v21 article>div>span{
  display:block;font-size:var(--fs-9);font-weight:800;letter-spacing:.9px;
  text-transform:uppercase;color:var(--muted2);line-height:1.4;
}
.ops-settings-grid.v21 h2{
  margin:4px 0 7px;font-size:var(--fs-13);font-weight:750;color:var(--text);
  line-height:1.35;letter-spacing:-.15px;
}
.ops-settings-grid.v21 p{margin:0;color:var(--muted);font-size:var(--fs-11);line-height:1.6}

/* ==========================================================================
   Organizations
   ========================================================================== */
.ops-org-page{grid-template-rows:auto minmax(0,1fr)}
.ops-org-detail{padding:16px 20px;overflow:auto;display:grid;align-content:start;gap:14px}
.ops-org-empty{
  display:grid;place-items:center;align-content:center;gap:7px;text-align:center;
  height:100%;min-height:180px;color:var(--muted);padding:26px;
}
.ops-org-empty strong{color:var(--text-2);font-size:var(--fs-14);font-weight:750}
.ops-org-empty p{margin:0;font-size:var(--fs-11);line-height:1.6;max-width:44ch}
.ops-org-form{display:grid;gap:14px;max-width:920px;width:100%}
.ops-org-form-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding-bottom:12px;border-bottom:1px solid var(--line-soft);
}
.ops-org-form-head>div{min-width:0}
.ops-org-form header h2,.ops-org-form-head h2{
  margin:6px 0 0;font-size:var(--fs-15);font-weight:800;color:var(--text);letter-spacing:-.2px;
}
.ops-org-form-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.ops-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.ops-form-grid label{display:grid;gap:5px;min-width:0}
.ops-form-grid label>span{
  font-size:var(--fs-9);font-weight:800;text-transform:uppercase;
  letter-spacing:.5px;color:var(--muted);line-height:1.3;
}
.ops-form-grid label small{font-size:var(--fs-9);line-height:1.45;color:var(--muted2);font-weight:500;text-transform:none;letter-spacing:0}
.ops-org-form select{
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 11px center;background-size:15px;
  padding-right:34px;cursor:pointer;
}
.ops-org-form input:disabled,.ops-org-form select:disabled{background:var(--surface3);color:var(--muted);cursor:not-allowed}
.ops-org-note{
  padding:11px 13px;border-radius:10px;background:var(--surface2);
  border:1px solid var(--line);color:var(--muted);font-size:var(--fs-10);line-height:1.55;
  display:flex;gap:8px;align-items:flex-start;
}
.ops-org-form footer{display:flex;justify-content:flex-end;padding-top:2px}

/* ==========================================================================
   Responsive
   ========================================================================== */
/* ---- Dashboard: recent-activity table must never overflow its column ---- */
.ops-recent-panel .ops-table{font-size:var(--fs-10)}
.ops-recent-panel .ops-table th,.ops-recent-panel .ops-table td{padding:9px 10px}
.ops-recent-panel .ops-table td:nth-child(2),.ops-recent-panel .ops-table td:nth-child(3){
  max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.ops-recent-panel .ops-table td:last-child,.ops-recent-panel .ops-table th:last-child{
  white-space:nowrap;font-variant-numeric:tabular-nums;
}



/* ---- Dashboard: attention table column balance ---- */
.ops-attention-table th:nth-child(2),.ops-attention-table td:nth-child(2){width:38%}
.ops-attention-table th:nth-child(3),.ops-attention-table td:nth-child(3){width:104px}
.ops-attention-table th:nth-child(4),.ops-attention-table td:nth-child(4){width:96px;white-space:nowrap;color:var(--muted)}

/* ===========================================================================
   CLEAR WORKSPACE / V25
   A complete visual redesign. Original DOM, routes, IDs, data attributes,
   handlers, server-side code and folder/file structure are intentionally intact.
   No new packages, icon fonts, images, network requests or JavaScript required.
   =========================================================================== */
:root{
  --bg:#f4f6f8;--surface:#fff;--surface2:#f8fafb;--surface3:#edf2f4;
  --text:#182735;--text-2:#354a5c;--muted:#526779;--muted2:#627587;
  --brand:#0d7c72;--brand-2:#08645d;--brand-soft:#edf8f5;--brand-line:#bee4dc;
  --green:#15835a;--green-2:#106441;--green-soft:#edf8f0;
  --amber:#a7680a;--amber-2:#8c5506;--amber-soft:#fff7e7;
  --red:#cb3c44;--red-2:#a32932;--red-soft:#fff0f0;
  --purple:#7058b5;--purple-soft:#f3effb;--cyan:#167e98;--cyan-soft:#eef8fa;
  --radius:14px;--radius-md:11px;--radius-sm:8px;
  --shadow-xs:0 1px 2px rgba(24,39,53,.025);
  --shadow-sm:0 2px 5px rgba(24,39,53,.035);
  --shadow:0 8px 24px rgba(24,39,53,.055);
  --shadow-lg:0 20px 60px rgba(14,29,40,.18);
  --rail:218px;
}
body{font-size:13px;line-height:1.5;-webkit-font-smoothing:auto;text-rendering:optimizeLegibility;font-synthesis:none}
svg{stroke-width:1.85}
button,input,select,textarea{font-synthesis:none}
input::placeholder,textarea::placeholder{color:#64788a;opacity:1}
:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #168c80;outline-offset:3px}
.ops-app{height:100vh;height:100dvh;display:grid;grid-template-columns:var(--rail) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.ops-header{
  height:100%;min-height:0;display:flex;flex-direction:column;align-items:stretch;gap:0;
  padding:26px 14px 18px;background:#142c3a;border:0;border-right:1px solid #233f4d;
  box-shadow:none;backdrop-filter:none;position:relative;z-index:50;
}
.ops-brand{width:100%;gap:10px;padding:0 3px 25px;border-radius:0;border-bottom:1px solid #304754;transition:none}
.ops-brand:hover{background:transparent}
.ops-brand-mark{width:35px;height:37px;border-radius:10px;background:#a4e8d1;color:#153c37;box-shadow:none}
.ops-brand-mark svg{width:23px;height:23px;stroke-width:1.8}
.ops-brand-copy{flex:1}
.ops-brand strong{color:#f5fbfd;font-size:12px;font-weight:700;white-space:normal;letter-spacing:-.3px;line-height:1.5}
.ops-brand small{display:block;margin-top:4px;font-size:9px;color:#b4c8d3;letter-spacing:1px;font-weight:500}
.ops-main-nav{height:auto;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:7px;overflow:visible;padding:35px 0 20px;position:relative;flex:1;min-height:0}
.ops-main-nav:before{content:'KHÔNG GIAN QUẢN TRỊ';position:absolute;top:16px;left:12px;font-size:9px;letter-spacing:1.1px;font-weight:600;color:#b0c6d2}
.ops-main-nav a{height:44px;flex-shrink:0;padding:0 12px;gap:12px;border-radius:9px;color:#c5d5df;font-size:12px;font-weight:500;box-shadow:none;transition:background .12s,color .12s}
.ops-main-nav a span{display:inline}
.ops-main-nav a svg{width:20px;height:20px;color:#afc6d3;stroke-width:1.8}
.ops-main-nav a:hover{background:#223f4e;color:#fff}
.ops-main-nav a:hover svg{color:#d7eee7}
.ops-main-nav a.active{background:#a4e8d1;color:#153d37;box-shadow:none;font-weight:700}
.ops-main-nav a.active svg{color:#153d37}
.ops-main-nav a.active:after{content:'';width:5px;height:5px;margin-left:auto;background:#1c6957;border-radius:50%}
.ops-main-nav a:last-child{margin-top:18px}
.ops-header-tools{border-top:1px solid #304754;padding:17px 2px 0;gap:8px;justify-content:flex-start;flex-wrap:wrap}
.ops-live-indicator{height:28px;font-size:10px;letter-spacing:.3px;background:#223f4e;border-color:#385563;color:#d3e1e8;padding:0 8px}
.ops-live-indicator[data-state='connected']{background:#254b43;border-color:#3c6859;color:#c5efda}
.ops-live-indicator[data-state='reconnecting']{background:#4a4030;border-color:#716044;color:#ffdfa4}
.ops-live-indicator[data-state='offline']{background:#513641;border-color:#75505b;color:#ffd3d7}
.ops-live-indicator i{animation:none!important;box-shadow:none!important}
.ops-header-tools .ops-icon-button{width:30px;height:30px;color:#c9dae4}
.ops-header-tools .ops-icon-button:hover{background:#2b4a59;border-color:#4d6877;color:#fff}
.ops-user{width:30px;height:30px;border-radius:50%;margin-left:auto;background:#355362;box-shadow:none;color:#f2f8fa;font-size:10px;font-weight:600}
.ops-main{min-width:0;min-height:0;background:var(--bg)}
.ops-page{min-width:0;min-height:0;padding:26px 28px 24px;gap:20px;overflow:hidden}
.ops-page-head,.ops-page-head.compact{align-items:center;gap:18px;min-width:0;min-height:66px}
.ops-page-head>div:first-child{min-width:0;flex:1}
.ops-kicker{padding:0;border:0;background:none;border-radius:0;font-size:10px;letter-spacing:1.4px;color:var(--brand-2);font-weight:700;line-height:1.4}
.ops-page-head h1{font-size:27px;font-weight:700;line-height:1.25;letter-spacing:-.9px;margin:7px 0 5px;color:var(--text)}
.ops-page-head p{font-size:12px;color:var(--muted);line-height:1.6;max-width:80ch}
.ops-page-meta{align-self:center;flex-direction:column;align-items:flex-end;gap:6px;padding:0;font-size:11px}
.ops-page-meta time{font-size:11px}
.ops-sync-label{font-size:11px}
.ops-sync-label i{box-shadow:none;background:var(--green)}
.ops-page-head-actions{gap:9px;flex-shrink:1;min-width:0}
.ops-search-wide{height:40px;min-width:240px;max-width:360px;flex:1;border-color:#cdd7de;box-shadow:none;border-radius:9px}
.ops-search-wide svg{color:var(--muted);width:18px;height:18px}
.ops-search-wide input{font-size:12px}
.ops-search-wide input::placeholder{color:#627587}
.ops-search-wide kbd{font-size:10px;background:#f6f8fa;border:1px solid var(--line);border-radius:4px}
.ops-select{width:auto;min-width:156px;height:40px;border-radius:9px;font-size:12px}
.ops-button{--btn-h:39px;border-radius:8px;font-size:12px;box-shadow:none;font-weight:600}
.ops-button.primary,.ops-mini-button.primary{background:var(--brand);border-color:var(--brand);box-shadow:none}
.ops-button.primary:hover,.ops-mini-button.primary:hover{background:var(--brand-2)}
.ops-button.danger{background:var(--red);border-color:var(--red);box-shadow:none}
.ops-button:active,.ops-stat-card[href]:hover,.ops-dashboard-link-card:hover,.ops-settings-grid.v21 article:hover{transform:none}
.ops-mini-button,.ops-detail-link{font-size:11px;font-weight:600;border-radius:7px;box-shadow:none}
.ops-surface,.ops-panel,.ops-tree-panel,.ops-list-panel,.ops-org-detail,.ops-overview-card{border-color:var(--line);box-shadow:var(--shadow-xs);border-radius:var(--radius)}
.ops-surface-head,.ops-panel-head,.ops-card-head,.ops-tree-panel>header{background:#fff;border-bottom:1px solid var(--line);padding-left:18px;padding-right:18px}
.ops-surface-head h2,.ops-panel-head h2,.ops-card-head h2,.ops-list-head h2{font-size:13px;font-weight:700}
.ops-title-with-icon>div>span,.ops-list-head>div>span{font-size:10px;font-weight:500;text-transform:none;letter-spacing:.2px;color:var(--muted);margin-bottom:3px}
.ops-title-with-icon{gap:10px}
.ops-section-icon,.ops-stat-icon,.ops-summary-icon,.ops-setting-icon,.ops-device-cell-icon,.ops-device-icon{box-shadow:none!important;border-radius:9px}
.ops-section-icon{width:32px;height:32px;background:var(--brand-soft)}
.ops-section-icon svg{width:19px;height:19px}
.ops-table{font-size:12px}
.ops-table th{background:#f6f8fa;padding:11px 14px;color:#516475;font-size:10px;font-weight:600;letter-spacing:.35px;border-bottom:1px solid var(--line);box-shadow:none}
.ops-table td{padding:11px 14px;color:var(--text-2);line-height:1.45}
.ops-table td small{font-size:11px;color:var(--muted);margin-top:4px}
.ops-table tbody tr:hover,.ops-device-table tbody tr:hover{background:#f1f8f5;box-shadow:none}
.ops-device-primary strong{font-size:12px;font-weight:600}
.ops-device-primary small{font-size:11px;color:var(--muted)}
.ops-device-cell-icon{width:31px;height:31px;margin-right:10px}
.ops-device-cell-icon svg{width:18px;height:18px}
.ops-table .mono,.mono{font-size:11px;letter-spacing:0}
.ops-state{height:25px;font-size:11px;font-weight:600;letter-spacing:0;padding:0 8px;box-shadow:none!important;border-radius:6px;gap:6px}
.ops-state i{width:5px;height:5px;opacity:1}
.ops-detail-link{height:29px;padding:0 10px;background:#fff;border-color:var(--line);color:var(--brand-2)}
.ops-detail-link:hover{background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand-2)}
.ops-empty{font-size:12px;color:var(--muted)}
.ops-empty strong{font-size:13px}.ops-empty small{font-size:11px}
.ops-dashboard-summary.v22{grid-template-columns:minmax(345px,1.3fr) minmax(0,2fr);gap:16px}
.ops-presence-card{min-width:0;gap:19px;padding:19px 20px;background:#fff;box-shadow:var(--shadow-xs);border-color:var(--line)}
.ops-presence-card:before{display:none}
.ops-presence-donut{width:102px;height:102px;box-shadow:none;background:conic-gradient(var(--brand) 0 calc(var(--online-pct)*1%),#e7eeeb calc(var(--online-pct)*1%) 100%)}
.ops-presence-donut:before{inset:9px;box-shadow:none}
.ops-presence-donut strong{font-size:27px;letter-spacing:-1px;color:var(--text);font-weight:700}
.ops-presence-donut span{font-size:8px;font-weight:400;color:var(--muted);max-width:68px;letter-spacing:-.2px;margin-left:auto;margin-right:auto}
.ops-summary-eyebrow{font-size:10px;font-weight:600;letter-spacing:.3px;text-transform:none;color:var(--muted)}
.ops-presence-copy{flex:1;min-width:0}
.ops-presence-copy h2{font-size:14px;font-weight:600;margin:4px 0 9px;letter-spacing:-.3px}
.ops-presence-legend{gap:0}
.ops-presence-filter{padding:4px 7px;font-size:11px;gap:8px}
.ops-presence-filter strong{font-size:13px;font-weight:700}
.ops-presence-filter i{width:6px;height:6px;box-shadow:none!important}
.ops-presence-filter i.online{background:var(--brand)}
.ops-presence-filter i.offline{background:#9daea6}
.ops-dashboard-stat-grid,.ops-dashboard-stat-grid.v237{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ops-stat-card,.ops-stat-card[href]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;padding:17px 16px;box-shadow:var(--shadow-xs);background:#fff;border-color:var(--line)}
.ops-stat-card>div{width:100%;min-width:0}
.ops-stat-icon{width:32px;height:32px}.ops-stat-icon svg{width:19px;height:19px}
.ops-stat-card small{font-size:11px;color:var(--muted);font-weight:500}
.ops-stat-card strong,.ops-stat-card.warehouse strong,.ops-stat-card.warning strong,.ops-stat-card.pending strong{margin-top:7px;font-size:29px;color:var(--text);font-weight:700;letter-spacing:-.7px}
.ops-stat-card[href] em{margin-top:5px;font-size:10px;color:var(--muted);font-weight:400;white-space:normal;line-height:1.5}
.ops-card-arrow{top:24px;right:16px;font-size:16px;transform:none;color:#697e8b}
.ops-stat-card[href]:hover .ops-card-arrow{transform:none;color:var(--brand)}
.ops-stat-card[href]:hover,.ops-dashboard-link-card:hover{border-color:#96c8b9;box-shadow:var(--shadow-sm)}
.ops-dashboard-grid.v21{grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1.22fr);gap:16px}
.ops-attention-panel{grid-column:1;grid-row:1;grid-template-rows:60px minmax(0,1fr)}
.ops-status-panel{grid-column:2;grid-row:1;grid-template-rows:60px minmax(0,1fr) 36px}
.ops-recent-panel{grid-column:1/-1;grid-row:2;grid-template-rows:60px minmax(0,1fr)}
.ops-health-summary.v21>div{padding:8px 16px;gap:5px}
.ops-health-summary.v21 span{font-size:11px}
.ops-health-summary.v21 strong{font-size:20px;font-weight:600}
.ops-health-summary.v21 small{font-size:10px;color:var(--muted)}
.ops-inline-link{height:36px;font-size:11px;background:#fff;font-weight:600}
.ops-recent-panel .ops-table{font-size:12px;table-layout:fixed}
.ops-recent-panel .ops-table th,.ops-recent-panel .ops-table td{padding:9px 16px}
.ops-recent-panel .ops-table th:first-child{width:26%}
.ops-recent-panel .ops-table th:nth-child(2){width:20%}
.ops-recent-panel .ops-table th:nth-child(3){width:18%}
.ops-recent-panel .ops-table th:nth-child(4){width:20%}
.ops-recent-panel .ops-table td{overflow:hidden;text-overflow:ellipsis}
.ops-attention-table th:nth-child(2),.ops-attention-table td:nth-child(2){width:auto}
.ops-attention-table th:nth-child(3),.ops-attention-table td:nth-child(3){width:74px}
.ops-attention-table th:nth-child(4),.ops-attention-table td:nth-child(4){width:90px}
.ops-split-workspace.v21,.ops-split-workspace.v22,.ops-org-workspace.v22{--split-left:252px;grid-template-columns:var(--split-left) 12px minmax(0,1fr)}
.ops-org-workspace.v22{--split-left:292px}
.ops-splitter{width:12px}.ops-splitter:before{background:#bfccd3;height:32px}
.ops-tree-panel{grid-template-rows:60px 48px minmax(0,1fr);min-width:0}
.ops-tree-panel>header{padding:0 13px;gap:6px}
.ops-tree-panel>header strong{font-size:12px}.ops-tree-panel>header small{font-size:10px;padding:2px 6px;white-space:nowrap}
.ops-tree-search{padding:7px 14px;background:#fff;border-color:var(--line)}
.ops-tree-search input{font-size:12px}.ops-tree-search input::placeholder{color:var(--muted)}
.ops-tree-scroll{padding:10px 8px}
.ops-tree-node{height:42px;border-radius:7px;font-size:12px;gap:5px;grid-template-columns:26px minmax(0,1fr) auto}
.ops-tree-node span:nth-child(2){font-size:12px;font-weight:500}
.ops-tree-node b{font-size:10px;background:var(--surface3);color:var(--muted);font-weight:600}
.ops-tree-node .ops-tree-glyph{box-shadow:none;background:transparent;color:#577287}
.ops-tree-node.active{background:#edf8f2;color:#176951;box-shadow:inset 2px 0 0 #19845f}
.ops-tree-node.active .ops-tree-glyph{background:transparent;color:#176951}
.ops-tree-node.active b{background:#d9efe3;color:#176951}
.ops-tree-node.depth-0,.ops-tree-node.depth-1{color:var(--text-2)}
.ops-tree-node.depth-0 .ops-tree-glyph,.ops-tree-node.depth-1 .ops-tree-glyph{background:#f0f4f6;color:#577287;box-shadow:none}
.ops-tree-node.depth-0 b,.ops-tree-node.depth-1 b{background:var(--surface3);color:var(--muted)}
.ops-tree-node.depth-0.active,.ops-tree-node.depth-1.active{color:#176951}
.ops-tree-node.depth-0.active .ops-tree-glyph,.ops-tree-node.depth-1.active .ops-tree-glyph{background:transparent;color:#176951}
.ops-tree-node.depth-0.active b,.ops-tree-node.depth-1.active b{background:#d9efe3;color:#176951}
.ops-list-panel{min-width:0;grid-template-rows:60px minmax(0,1fr) 52px}
.ops-list-head{padding:0 18px;background:#fff;border-bottom:1px solid var(--line)}
.ops-list-count span{height:26px;font-size:11px;background:#f3f6f8;color:var(--text-2);border-color:var(--line);font-weight:600}
.ops-device-table{min-width:1160px}
.ops-device-table td{white-space:nowrap}
.ops-device-table th:nth-child(8),.ops-device-table td:nth-child(8){position:sticky;right:82px;min-width:122px;background:#fff;z-index:3;border-left:1px solid var(--line-soft)}
.ops-device-table th:nth-child(9),.ops-device-table td:nth-child(9){position:sticky;right:0;min-width:82px;width:82px;background:#fff;z-index:3}
.ops-device-table th:nth-child(8),.ops-device-table th:nth-child(9){background:#f6f8fa;z-index:5}
.ops-device-table tbody tr:hover td:nth-child(8),.ops-device-table tbody tr:hover td:nth-child(9){background:#f1f8f5}
.ops-device-table tbody td{height:55px}
.ops-device-table th.ops-col-stt,.ops-device-table td.ops-device-stt{width:42px;font-size:11px}
.ops-pagination{background:#fff;gap:8px;padding:0 15px}
.ops-page-size,.ops-page-summary{font-size:11px;font-weight:500}
.ops-page-size select{font-size:11px}
.ops-page-numbers button.active{background:var(--brand);box-shadow:none}
.ops-page-controls>button,.ops-page-numbers button{width:29px;height:29px;font-size:12px;border-radius:6px}
.ops-warehouse-summary.v234{gap:16px;grid-template-columns:repeat(3,minmax(0,1fr))}
.ops-warehouse-summary.v234 article{padding:17px 18px;border-radius:var(--radius);box-shadow:var(--shadow-xs);gap:14px}
.ops-warehouse-summary.v234 small{font-size:11px;font-weight:500}.ops-warehouse-summary.v234 strong{font-size:19px;font-weight:600;margin-top:6px;line-height:1.3}
.ops-warehouse-list.v234{padding:4px 12px}
.ops-warehouse-row.v234{grid-template-columns:minmax(200px,1.3fr) minmax(105px,.7fr) minmax(130px,.8fr) minmax(140px,.9fr) minmax(130px,.7fr) auto;gap:16px;padding:15px 10px;border-radius:0;min-width:1000px}
.ops-warehouse-row.v234:hover{background:#f3faf7;box-shadow:none;border-color:transparent;border-bottom-color:var(--line)}
.ops-warehouse-main h3{font-size:12px}.ops-warehouse-main p{font-size:11px}
.ops-settings-grid.v21{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;grid-auto-rows:minmax(176px,auto);align-content:start}
.ops-settings-grid.v21 article{display:flex;flex-direction:column;gap:17px;padding:23px;border-radius:var(--radius);box-shadow:var(--shadow-xs)}
.ops-setting-icon{width:36px;height:36px}.ops-setting-icon svg{width:21px;height:21px}
.ops-settings-grid.v21 article>div>span{font-size:10px;font-weight:500;letter-spacing:.6px;color:var(--brand-2)}
.ops-settings-grid.v21 h2{font-size:14px;font-weight:600;margin:5px 0 9px;line-height:1.45}
.ops-settings-grid.v21 p{font-size:12px;line-height:1.7;color:var(--muted)}
.ops-org-detail{padding:22px 24px;gap:20px}
.ops-org-empty .ops-empty-icon{background:var(--brand-soft);color:var(--brand)}
.ops-org-empty h2{font-size:19px;font-weight:600;letter-spacing:-.4px}
.ops-org-empty p{font-size:12px;line-height:1.7;max-width:58ch;color:var(--muted)}
.ops-org-form input,.ops-org-form select,.ops-org-form textarea,.ops-dialog-card input,.ops-dialog-card select,.ops-dialog-card textarea{font-size:13px;border-radius:8px;border-color:var(--line-strong)}
.ops-form-grid label>span{font-size:12px;color:var(--text-2)}
.ops-org-form label>small{font-size:11px;color:var(--muted);line-height:1.6}
.ops-dialog::backdrop,.ops-danger-dialog::backdrop{background:rgba(14,29,40,.48);backdrop-filter:none}
.ops-dialog-card{box-shadow:var(--shadow-lg);border-radius:16px}
.ops-device-page{padding:0;gap:0;grid-template-rows:78px 46px minmax(0,1fr)}
.ops-device-head.v21{padding:0 24px;border-bottom-color:var(--line);gap:14px}
.ops-device-tabs{padding:0 24px;gap:14px}
.ops-device-tabs button{height:46px;border-radius:0;font-size:12px;padding:0 8px;font-weight:600}
.ops-device-tabs button.active{background:transparent;color:var(--brand-2)}
.ops-device-tabs button.active:after{left:8px;right:8px;height:2px}
.ops-device-title-line h1{font-size:20px;font-weight:600}.ops-device-identity p{font-size:11px}
.ops-overview-grid.v231{padding:20px 24px 24px;gap:16px;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}
.ops-summary-column.v231,.ops-live-column.v231{gap:14px}
.ops-kv,.ops-kv.v231{grid-auto-rows:minmax(44px,auto);gap:6px 8px;padding:10px;align-content:start}
.ops-kv>div.wide,.ops-kv.v231>div.wide{grid-column:auto}
.ops-kv dt{font-size:10px;font-weight:500;line-height:1.4}
.ops-kv dd{font-size:11px;font-weight:600;line-height:1.4;margin-top:2px;margin-left:23px;max-width:calc(100% - 23px)}
.ops-kv>div,.ops-kv.v231>div{padding:5px 8px;min-height:44px}
.ops-hardware-grid{grid-template-rows:repeat(3,minmax(78px,1fr))}
.ops-kv>div,.ops-kv.v231>div{background:#f8fafb;border-color:#edf1f3;border-radius:7px}
.ops-hardware-tile{background:#fff;border-radius:8px}.ops-hardware-tile strong{font-size:11px;font-weight:600}
.ops-field-icon,.ops-hardware-icon{color:var(--brand);background:var(--brand-soft)}
.ops-live-metrics.v231 .ops-health-meta>span{font-size:11px;font-weight:500}
.ops-live-metrics.v231 .ops-health-meta strong{font-size:20px;font-weight:600}
.ops-live-metrics.v231 .ops-health-bar i{background:var(--brand)}
.ops-software-panel.v231 .ops-table{font-size:12px}
.ops-software-panel.v231 .ops-table td{padding:8px 12px}
.ops-disk-title strong{font-size:11px}.ops-disk-row.v231 small{font-size:11px}
.ops-remote-workspace.v21{padding:20px 24px 24px;gap:16px}
.ops-remote-toolbar{border-radius:12px;padding:13px 15px;box-shadow:none}
.ops-terminal{background:#142c3a;border-color:#294656;box-shadow:none}
.ops-terminal header{background:#1c3847;border-bottom-color:#365361}
.ops-terminal pre{font-size:12px;line-height:1.7}
.ops-toast{right:24px;top:20px;font-size:13px}
@media(min-width:1600px){
  :root{--rail:236px}.ops-brand strong{font-size:13px}.ops-page{padding:30px 36px;gap:22px}
  .ops-dashboard-summary.v22{grid-template-columns:minmax(390px,1.2fr) minmax(0,2.3fr)}
  .ops-presence-card{padding:24px 28px}.ops-stat-card,.ops-stat-card[href]{padding:22px 24px}
  .ops-dashboard-grid.v21{grid-template-columns:minmax(0,1.4fr) minmax(320px,1fr);gap:20px}
}
@media(max-width:1279px) and (min-width:901px){
  :root{--rail:188px}.ops-header{padding:22px 12px 16px}.ops-brand{gap:8px}.ops-brand strong{font-size:11px}.ops-brand small{font-size:8px}
  .ops-main-nav a{font-size:12px;padding:0 10px;gap:10px}.ops-page{padding:22px 22px 20px;gap:16px}
  .ops-page-head h1{font-size:24px}.ops-page-head p{font-size:11px}
  .ops-page-head-actions{max-width:52%}.ops-search-wide{min-width:190px}.ops-search-wide kbd{display:none}
  .ops-select{min-width:146px;font-size:11px}.ops-dashboard-summary.v22{grid-template-columns:minmax(310px,1.2fr) minmax(0,1.65fr);gap:12px}
  .ops-presence-card{padding:16px;gap:14px}.ops-presence-donut{width:84px;height:84px}.ops-presence-donut:before{inset:8px}
  .ops-presence-donut strong{font-size:24px}.ops-presence-donut span{font-size:8px}.ops-presence-copy h2{font-size:12px}
  .ops-dashboard-stat-grid,.ops-dashboard-stat-grid.v237{gap:10px}.ops-stat-card,.ops-stat-card[href]{padding:14px 12px;gap:10px}
  .ops-stat-card small{white-space:normal;line-height:1.5}.ops-stat-card[href] em{font-size:10px}
  .ops-dashboard-grid.v21{grid-template-columns:minmax(0,1.15fr) minmax(270px,1fr);gap:14px}
  .ops-surface-head{padding:0 13px;gap:8px}.ops-surface-head small{font-size:10px;max-width:42%}
  .ops-split-workspace.v21,.ops-split-workspace.v22{--split-left:220px}.ops-org-workspace.v22{--split-left:260px}
  .ops-settings-grid.v21{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(155px,auto)}
  .ops-settings-grid.v21 article{padding:19px;gap:12px}.ops-settings-grid.v21 p{font-size:11px}
  .ops-overview-grid.v231{padding:14px;gap:12px}.ops-kv dd{font-size:11px}.ops-card-head{padding:9px 12px}.ops-card-head>small{display:none}
}
@media(max-height:800px) and (min-width:901px){
  .ops-page{padding-top:19px;padding-bottom:18px;gap:15px}.ops-page-head,.ops-page-head.compact{min-height:60px}
  .ops-page-head h1{font-size:24px;margin:4px 0}.ops-dashboard-summary.v22{max-height:164px}
  .ops-presence-card{padding:14px 18px}.ops-presence-donut{width:88px;height:88px}
  .ops-stat-card,.ops-stat-card[href]{padding:13px 16px;gap:8px}.ops-stat-icon{width:28px;height:28px}.ops-stat-card strong{font-size:26px;margin-top:4px}
  .ops-stat-card[href] em{margin-top:3px}.ops-dashboard-grid.v21{grid-template-rows:minmax(0,1fr) minmax(0,1.12fr)}
  .ops-attention-panel,.ops-recent-panel{grid-template-rows:50px minmax(0,1fr)}.ops-status-panel{grid-template-rows:50px minmax(0,1fr) 32px}
  .ops-inline-link{height:32px}.ops-health-summary.v21>div{padding:5px 12px}.ops-health-summary.v21 strong{font-size:18px}
  .ops-settings-grid.v21{grid-auto-rows:auto;gap:14px}.ops-settings-grid.v21 article{padding:18px;gap:12px}
  .ops-warehouse-summary.v234 article{padding:13px 16px}.ops-device-page{padding:0;gap:0;grid-template-rows:68px 42px minmax(0,1fr)}
  .ops-device-tabs button{height:42px}.ops-overview-grid.v231{padding:14px 18px;gap:12px}
}
@media(max-width:900px){
  :root{--rail:74px}.ops-header{padding:20px 10px 14px}.ops-brand{justify-content:center;padding:0 0 20px}.ops-brand-copy{display:none}
  .ops-main-nav{padding-top:24px;gap:10px}.ops-main-nav:before{display:none}.ops-main-nav a{padding:0;justify-content:center;height:44px}
  .ops-main-nav a span,.ops-main-nav a.active:after{display:none}.ops-main-nav a svg{width:22px;height:22px}.ops-main-nav a:last-child{margin-top:14px}
  .ops-header-tools{flex-direction:column;padding-top:14px;gap:12px}.ops-user{margin:0}.ops-live-indicator{font-size:0;padding:0;width:28px;justify-content:center}
  .ops-live-indicator span{display:none}.ops-live-indicator i{width:7px;height:7px}
  .ops-page{padding:20px;gap:16px}.ops-page-head{flex-direction:column;align-items:stretch}.ops-page-head.compact{align-items:stretch}
  .ops-page-head h1{font-size:23px}.ops-page-meta{display:none}.ops-page-head-actions{max-width:none;justify-content:flex-start}
  .ops-search-wide{min-width:0;max-width:none;flex:1}.ops-select{min-width:145px}
  .ops-dashboard-summary.v22{grid-template-columns:minmax(280px,1.3fr) minmax(0,1fr);gap:12px}
  .ops-dashboard-stat-grid,.ops-dashboard-stat-grid.v237{grid-template-columns:1fr;gap:7px}
  .ops-stat-card,.ops-stat-card[href]{display:grid;grid-template-columns:28px minmax(0,1fr);padding:9px 12px;gap:10px}
  .ops-stat-icon{width:28px;height:28px}.ops-stat-card>div{display:flex;align-items:center;justify-content:space-between;gap:6px}
  .ops-stat-card strong{font-size:22px!important;margin:0}.ops-stat-card small{font-size:10px}.ops-stat-card[href] em,.ops-card-arrow{display:none}
  .ops-presence-card{padding:15px;gap:12px}.ops-presence-donut{width:86px;height:86px}.ops-presence-donut span{font-size:8px}.ops-presence-copy h2{font-size:12px}
  .ops-dashboard-grid.v21{grid-template-columns:minmax(0,1fr) minmax(230px,.85fr);gap:12px;grid-template-rows:minmax(0,1fr) minmax(0,1fr)}
  .ops-surface-head{padding:0 12px}.ops-surface-head small{display:none}.ops-surface-head h2{font-size:12px}.ops-title-with-icon>div>span{font-size:9px}
  .ops-health-summary.v21>div{padding:8px;gap:3px}.ops-health-summary.v21 span{font-size:10px}.ops-health-summary.v21 strong{font-size:18px}
  .ops-table td,.ops-table th{padding:10px}.ops-attention-table{min-width:410px}
  .ops-split-workspace.v21,.ops-split-workspace.v22{--split-left:195px;grid-template-columns:var(--split-left) 10px minmax(0,1fr)}
  .ops-org-workspace.v22{--split-left:230px;grid-template-columns:var(--split-left) 10px minmax(0,1fr)}.ops-splitter{width:10px}
  .ops-tree-panel>header{padding:0 10px}.ops-tree-panel>header .ops-section-icon{display:none}.ops-tree-panel>header strong{font-size:11px}
  .ops-pagination{grid-template-columns:1fr auto}.ops-page-summary{display:none}.ops-page-size{gap:4px;font-size:10px}.ops-page-numbers{max-width:100px;overflow:auto}
  .ops-settings-grid.v21{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:12px}.ops-settings-grid.v21 article{padding:18px;gap:12px}
  .ops-warehouse-summary.v234{gap:10px}.ops-warehouse-summary.v234 article{padding:14px;gap:8px}.ops-warehouse-summary.v234 .ops-summary-icon{width:30px;height:30px}
  .ops-warehouse-summary.v234 small{font-size:10px}.ops-warehouse-summary.v234 strong{font-size:15px}
  .ops-overview-grid.v231{padding:14px;gap:12px;grid-template-columns:1fr;overflow:auto;align-content:start}
  .ops-summary-column.v231{grid-template-rows:340px 340px;overflow:visible;gap:12px}.ops-live-column.v231{grid-template-rows:auto 220px 260px;overflow:visible;gap:12px}
  .ops-device-head.v21{padding:0 14px;gap:9px}.ops-device-title-line h1{font-size:17px}.ops-device-identity{gap:8px}.ops-device-tabs{padding:0 14px}
  .ops-remote-workspace.v21{padding:14px}.ops-remote-toolbar{align-items:stretch;flex-direction:column}.ops-command-tabs{gap:5px}.ops-command-tabs button{font-size:11px;padding:0 9px}
  .ops-remote-inputs input{width:100%;min-width:0}.ops-remote-inputs label{flex:1;min-width:110px}.ops-transfer-layout{grid-template-columns:1fr}
  .ops-form-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  :root{--rail:0px}
  .ops-app{grid-template-columns:minmax(0,1fr);grid-template-rows:58px minmax(0,1fr)}
  .ops-header{height:58px;padding:0 10px;display:flex;flex-direction:row;align-items:center;gap:8px;border:0;border-bottom:1px solid #304754}
  .ops-brand{width:32px;flex:0 0 32px;padding:0;border:0}.ops-brand-mark{width:30px;height:32px;border-radius:8px}.ops-brand-mark svg{width:21px;height:21px}
  .ops-main-nav{padding:0;flex:1;flex-direction:row;gap:3px;justify-content:space-evenly;overflow:visible}
  .ops-main-nav a{height:36px;width:36px;flex:0 1 36px}.ops-main-nav a svg{width:19px;height:19px}.ops-main-nav a:last-child{margin-top:0}
  .ops-main-nav a:focus-visible:before{content:attr(aria-label);position:absolute;top:40px;padding:5px;background:#142c3a;color:#fff;border-radius:5px;font-size:10px}
  .ops-header-tools{border:0;padding:0;flex-direction:row;gap:0}.ops-header-tools .ops-icon-button,.ops-user{display:none}
  .ops-live-indicator{width:20px;height:20px;border:0;background:transparent!important;padding:0}
  .ops-page{padding:16px 12px 12px;gap:12px}.ops-page-head,.ops-page-head.compact{gap:10px;min-height:0}
  .ops-kicker{font-size:9px;letter-spacing:1px}.ops-page-head h1{font-size:21px;margin:4px 0}.ops-page-head p{font-size:11px;line-height:1.5}
  .ops-page-head-actions{gap:7px;flex-wrap:wrap}.ops-search-wide{height:36px;max-width:none;min-width:0;flex:1 1 160px}.ops-search-wide input{font-size:11px}
  .ops-search-wide kbd{display:none}.ops-select{height:36px;min-width:130px;font-size:11px;padding-left:9px}
  .ops-dashboard-summary.v22{grid-template-columns:1fr;gap:10px}
  .ops-presence-card{padding:12px 15px;gap:16px}.ops-presence-donut{width:78px;height:78px}.ops-presence-donut strong{font-size:23px}.ops-presence-donut span{font-size:7px}
  .ops-presence-copy h2{font-size:13px;margin:2px 0 5px}.ops-summary-eyebrow{font-size:10px}.ops-presence-filter{padding:2px 7px}
  .ops-dashboard-stat-grid,.ops-dashboard-stat-grid.v237{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .ops-stat-card,.ops-stat-card[href]{display:flex;flex-direction:column;gap:8px;align-items:flex-start;padding:11px}
  .ops-stat-card>div{display:block}.ops-stat-card small{font-size:10px;white-space:normal;line-height:1.4}.ops-stat-card strong{margin-top:5px;font-size:23px!important}
  .ops-stat-icon{width:27px;height:27px}.ops-stat-icon svg{width:17px;height:17px}
  .ops-dashboard-grid.v21{grid-template-columns:1fr;grid-template-rows:minmax(0,.9fr) minmax(0,1fr) minmax(0,1.1fr);overflow:hidden;gap:10px}
  .ops-attention-panel{grid-column:1;grid-row:1;grid-template-rows:48px minmax(0,1fr)}
  .ops-status-panel{grid-column:1;grid-row:2;grid-template-rows:48px minmax(0,1fr) 30px}.ops-inline-link{height:30px}
  .ops-recent-panel{grid-column:1;grid-row:3;grid-template-rows:48px minmax(0,1fr)}
  .ops-health-summary.v21>div{padding:5px 12px}.ops-recent-panel .ops-table{min-width:650px}.ops-recent-panel .ops-table th,.ops-recent-panel .ops-table td{padding:8px 12px}
  .ops-split-workspace.v21,.ops-split-workspace.v22,.ops-org-workspace.v22{grid-template-columns:minmax(0,1fr);grid-template-rows:154px minmax(0,1fr);gap:10px}
  .ops-splitter{display:none}.ops-tree-panel{grid-template-rows:40px 36px minmax(0,1fr);max-height:none}
  .ops-tree-panel>header{padding:0 12px}.ops-tree-panel>header .ops-section-icon{display:grid;width:25px;height:25px}.ops-tree-panel>header strong{font-size:12px}
  .ops-tree-search{padding:2px 12px}.ops-tree-search input{font-size:11px}.ops-tree-scroll{padding:5px 7px}.ops-tree-node{height:34px}
  .ops-list-panel{grid-template-rows:46px minmax(0,1fr) 46px}.ops-list-head{padding:0 12px}.ops-list-head h2{font-size:12px}
  .ops-list-head>div>span{font-size:9px}.ops-pagination{padding:0 9px;gap:6px;min-height:46px}.ops-page-size{font-size:10px}
  .ops-page-controls{gap:3px}.ops-page-controls>button,.ops-page-numbers button{width:26px;height:27px}.ops-page-numbers{max-width:82px;gap:3px}
  .ops-warehouse-summary.v234{gap:7px}.ops-warehouse-summary.v234 article{flex-direction:column;align-items:flex-start;padding:11px;gap:7px}
  .ops-warehouse-summary.v234 strong{font-size:13px;line-height:1.4}.ops-warehouse-summary.v234 small{font-size:9px}.ops-warehouse-summary.v234 .ops-summary-icon{width:27px;height:27px}
  .ops-warehouse-list-panel.v234{grid-template-rows:48px minmax(0,1fr)}.ops-warehouse-page .ops-page-head p{max-height:none;font-size:10px}
  .ops-settings-grid.v21{grid-template-columns:1fr;gap:10px}.ops-settings-grid.v21 article{display:grid;grid-template-columns:34px minmax(0,1fr);padding:16px;gap:13px}
  .ops-settings-grid.v21 p{font-size:12px}.ops-settings-grid.v21 h2{font-size:13px;margin:4px 0 7px}.ops-setting-icon{width:34px;height:34px}
  .ops-org-detail{padding:16px}.ops-org-empty{padding:12px}.ops-org-empty h2{font-size:16px}.ops-org-empty p{font-size:11px}
  .ops-org-form input,.ops-org-form select,.ops-org-form textarea,.ops-dialog-card input,.ops-dialog-card select,.ops-dialog-card textarea{font-size:16px}
  .ops-device-page{padding:0;gap:0;grid-template-rows:70px 42px minmax(0,1fr)}
  .ops-device-head.v21{padding:0 10px;gap:8px;grid-template-columns:28px minmax(0,1fr) auto}.ops-back{width:28px;height:30px}.ops-device-icon{display:none}
  .ops-device-title-line{gap:6px;flex-wrap:wrap}.ops-device-title-line h1{font-size:15px}.ops-device-title-line .ops-state{font-size:9px;height:20px}.ops-device-identity p{font-size:10px}
  .ops-device-actions>.ops-button{height:32px;font-size:10px;padding:0 8px;gap:4px}.ops-device-tabs{padding:0 10px;gap:8px;overflow-x:auto}.ops-device-tabs button{height:42px;font-size:11px;white-space:nowrap;gap:5px}
  .ops-device-tabs button svg{width:15px;height:15px}.ops-overview-grid.v231{padding:12px 10px}.ops-live-metrics.v231{gap:6px}
  .ops-remote-workspace.v21{padding:10px}.ops-remote-toolbar{padding:10px}.ops-command-tabs button{font-size:10px;padding:0 7px}
  .ops-terminal pre{font-size:11px;padding:12px}.ops-terminal header{padding:0 9px;gap:5px}.ops-terminal header>b{font-size:9px}
  .ops-dialog-card{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto}.ops-toast{right:12px;left:12px;max-width:none;top:12px;font-size:12px}
}
@media(max-height:580px) and (min-width:621px){
  .ops-page{padding-top:12px;padding-bottom:12px;gap:10px}.ops-page-head p{display:none}
  .ops-dashboard-summary.v22{max-height:128px}.ops-presence-card{padding:10px 14px}.ops-presence-donut{width:74px;height:74px}
  .ops-stat-card[href] em{display:none}.ops-stat-card,.ops-stat-card[href]{gap:6px;padding:10px 14px}
  .ops-dashboard-grid.v21{overflow:auto;grid-template-rows:minmax(170px,1fr) minmax(150px,1fr)}
  .ops-header{padding-top:14px}.ops-brand{padding-bottom:12px}.ops-main-nav{padding-top:29px;gap:3px}.ops-main-nav:before{top:10px}.ops-main-nav a{height:37px}.ops-main-nav a:last-child{margin-top:8px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media print{
  html,body{width:auto;height:auto;overflow:visible;background:#fff}
  .ops-header,.ops-device-tabs,.ops-action-menu,.ops-pagination{display:none!important}
  .ops-app{height:auto;display:block}.ops-main,.ops-page{height:auto;overflow:visible}
  .ops-dashboard-grid.v21,.ops-dashboard-summary.v22,.ops-split-workspace.v22,.ops-org-workspace.v22{display:block}
  .ops-table-shell,.ops-tree-scroll,.ops-warehouse-list.v234,.ops-settings-grid.v21,.ops-org-detail{height:auto;overflow:visible}
  .ops-surface,.ops-panel,.ops-tree-panel,.ops-list-panel{break-inside:avoid;margin-bottom:16px}
}

/* ==========================================================================
   V25.1 UI polish — trạng thái, Dashboard và không gian quản trị thu gọn
   Chỉ thay đổi lớp trình bày; không thay đổi nghiệp vụ/API.
   ========================================================================== */

/* Màu trạng thái thống nhất cho icon máy và badge. */
.ops-device-cell-icon.online{background:var(--green-soft)!important;color:var(--green)!important}
.ops-device-cell-icon.offline{background:var(--red-soft)!important;color:var(--red)!important}
.ops-device-cell-icon.pending{background:var(--purple-soft)!important;color:var(--purple)!important}
.ops-device-cell-icon.pendingexpired{background:#f3e8ff!important;color:#7e22ce!important}
.ops-device-cell-icon.disabled{background:var(--amber-soft)!important;color:#d97706!important;box-shadow:inset 0 0 0 1px rgba(217,119,6,.12)!important}
.ops-device-cell-icon.warehouse{background:#eef2f6!important;color:#64748b!important;box-shadow:inset 0 0 0 1px #dbe3ea!important}
.ops-device-cell-icon.revoked{background:var(--red-soft)!important;color:var(--red-2)!important}
.ops-device-cell-icon.warning{background:var(--amber-soft)!important;color:var(--amber)!important}

.ops-state.pending{background:var(--purple-soft)!important;color:#6d28d9!important;box-shadow:inset 0 0 0 1px rgba(124,58,237,.13)!important}
.ops-state.pendingexpired{background:#f3e8ff!important;color:#7e22ce!important;box-shadow:inset 0 0 0 1px rgba(126,34,206,.13)!important}
.ops-state.disabled{background:var(--amber-soft)!important;color:#b45309!important;box-shadow:inset 0 0 0 1px rgba(217,119,6,.13)!important}
.ops-state.warehouse{background:#eef2f6!important;color:#526273!important;box-shadow:inset 0 0 0 1px #dbe3ea!important}

/* Offline trong donut phải đỏ, không dùng xám. */
.ops-presence-filter i.offline{background:var(--red)!important;box-shadow:0 0 0 3px rgba(217,45,32,.12)!important}

/* Card Dashboard: Đã thu hồi trung tính, Đã khóa màu cam, Chờ duyệt màu tím. */
.ops-stat-card.warehouse .ops-stat-icon{background:#eef2f6!important;color:#64748b!important;box-shadow:inset 0 0 0 1px #dbe3ea!important}
.ops-stat-card.warehouse strong{color:#526273!important}
.ops-stat-card.disabled .ops-stat-icon{background:var(--amber-soft);color:#d97706;box-shadow:inset 0 0 0 1px rgba(217,119,6,.12)}
.ops-stat-card.disabled strong{color:#b45309!important}
.ops-stat-card.pending .ops-stat-icon{background:var(--purple-soft)!important;color:var(--purple)!important;box-shadow:inset 0 0 0 1px rgba(124,58,237,.1)!important}
.ops-stat-card.pending strong{color:#6d28d9!important}

/* Bỏ khối Ngưỡng cảnh báo: hai bảng chính chia đôi không gian Dashboard. */
.ops-dashboard-grid.v21{
  grid-template-columns:minmax(0,1.25fr) minmax(420px,.9fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  gap:16px!important;
}
.ops-attention-panel{grid-column:1!important;grid-row:1!important;grid-template-rows:60px minmax(0,1fr)!important}
.ops-recent-panel{grid-column:2!important;grid-row:1!important;grid-template-rows:60px minmax(0,1fr)!important}
.ops-attention-panel .ops-table-shell,.ops-recent-panel .ops-table-shell{min-height:0;overflow:auto}
.ops-attention-panel .ops-table,.ops-recent-panel .ops-table{min-width:100%;table-layout:fixed}
.ops-attention-panel .ops-title-with-icon,.ops-recent-panel .ops-title-with-icon{align-items:center}
.ops-attention-panel .ops-section-icon,.ops-recent-panel .ops-section-icon{display:grid;place-items:center;align-self:center}

/* Bảng thiết bị: IP/MAC dễ đọc hơn và icon luôn nằm giữa chính xác. */
.ops-device-table td.mono{font-size:12.5px!important;font-weight:550;color:#26374d;line-height:1.35}
.ops-device-table .ops-device-primary{align-items:center!important}
.ops-device-table .ops-device-cell-icon{display:grid!important;place-items:center!important;align-self:center!important;width:34px!important;height:34px!important;margin-right:10px!important;padding:0!important}
.ops-device-table .ops-device-cell-icon svg{width:18px!important;height:18px!important;margin:auto!important}

.ops-shell-toggle{display:grid}

@media (max-width:1180px){
  .ops-dashboard-grid.v21{grid-template-columns:1fr!important;grid-template-rows:minmax(220px,1fr) minmax(220px,1fr)!important}
  .ops-attention-panel{grid-column:1!important;grid-row:1!important}
  .ops-recent-panel{grid-column:1!important;grid-row:2!important}
}


/* ==========================================================================\n   V25.1.1 Sidebar collapse fix\n   - Bỏ nút thu gọn riêng trong header cây Tổ chức/Thiết bị.\n   - Toggle Không gian quản trị thu gọn toàn bộ sidebar và trả lại chiều rộng cho nội dung.\n   ========================================================================== */

/* Sidebar thu gọn thật sự: thay đổi chính cột grid, không chỉ ẩn chữ. */
.ops-app.ops-shell-compact{
  --rail:72px;
}
.ops-app.ops-shell-compact .ops-header{
  padding:20px 10px 16px;
  align-items:center;
}
.ops-app.ops-shell-compact .ops-brand{
  justify-content:center;
  width:100%;
  padding:0 0 20px;
}
.ops-app.ops-shell-compact .ops-brand-copy{display:none!important}
.ops-app.ops-shell-compact .ops-main-nav{
  padding-top:24px;
  gap:9px;
  width:100%;
}
.ops-app.ops-shell-compact .ops-main-nav:before{display:none!important}
.ops-app.ops-shell-compact .ops-main-nav a{
  width:44px;
  height:44px;
  margin-left:auto;
  margin-right:auto;
  padding:0;
  justify-content:center;
  gap:0;
}
.ops-app.ops-shell-compact .ops-main-nav a span,
.ops-app.ops-shell-compact .ops-main-nav a.active:after{display:none!important}
.ops-app.ops-shell-compact .ops-main-nav a svg{width:21px;height:21px}
.ops-app.ops-shell-compact .ops-main-nav a:last-child{margin-top:14px}
.ops-app.ops-shell-compact .ops-header-tools{
  width:100%;
  padding-top:14px;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:10px;
}
.ops-app.ops-shell-compact .ops-live-indicator{
  width:30px;
  padding:0;
  justify-content:center;
  font-size:0;
}
.ops-app.ops-shell-compact .ops-live-indicator span{display:none}
.ops-app.ops-shell-compact .ops-user{margin:0}
.ops-app.ops-shell-compact .ops-shell-toggle svg{transform:none!important}

/* Không còn nút chevron riêng trong đầu cây. */
.ops-tree-panel-toggle{display:none!important}

@media(max-width:900px){
  .ops-app.ops-shell-compact{--rail:74px}
}

/* ==========================================================================
   V25.2 - Device overview: one-screen health-first layout
   --------------------------------------------------------------------------
   Mục tiêu:
   - Hàng đầu: Health realtime + SMART/Disk Health, nhìn một lần biết tình trạng máy.
   - Hàng giữa: Thông tin thiết bị + 6 ô phần cứng, tuyệt đối không scrollbar riêng.
   - Hàng cuối: Phần mềm là khu vực DUY NHẤT được cuộn độc lập.
   ========================================================================== */
.ops-overview-layout.v252{
  height:100%;min-height:0;overflow:hidden;
  display:grid;
  grid-template-rows:minmax(118px,.68fr) minmax(218px,1.22fr) minmax(190px,1.1fr);
  gap:10px;padding:10px 12px 12px;
}
.ops-health-strip.v252,
.ops-facts-strip.v252{
  min-height:0;overflow:hidden;display:grid;gap:10px;
}
.ops-health-strip.v252{grid-template-columns:minmax(0,1.32fr) minmax(360px,.68fr)}
.ops-facts-strip.v252{grid-template-columns:minmax(360px,.86fr) minmax(0,1.14fr)}
.ops-health-strip.v252>.ops-overview-card,
.ops-facts-strip.v252>.ops-overview-card{height:100%;min-height:0}

/* Health realtime nằm trên một hàng 4 chỉ số, không tạo vùng cuộn. */
.ops-live-metrics.v231.v252{
  min-height:0;overflow:hidden;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-rows:minmax(0,1fr);
  gap:7px;padding:7px 9px 9px;
}
.ops-live-metrics.v231.v252 article{padding:7px 8px;grid-template-columns:24px minmax(0,1fr);column-gap:7px}
.ops-live-metrics.v231.v252 .ops-health-icon{width:24px;height:24px;border-radius:7px}
.ops-live-metrics.v231.v252 .ops-health-meta strong{font-size:18px}
.ops-live-metrics.v231.v252 .ops-health-bar{margin-top:5px}

/* SMART/Disk Health đặt cạnh Health realtime; tối đa dùng chính chiều cao card, không scroll. */
.ops-disk-panel.v231.v252{grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.ops-disk-list.v231.v252{
  min-height:0;overflow:hidden!important;
  padding:4px 10px 7px;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:minmax(0,1fr);gap:0 10px;align-content:stretch;
}
.ops-disk-list.v231.v252 .ops-disk-row.v231{
  min-height:0;padding:5px 2px;display:flex;flex-direction:column;justify-content:center;
}
.ops-disk-list.v231.v252 .ops-disk-title{gap:6px}
.ops-disk-list.v231.v252 .ops-disk-title strong{font-size:10.5px}
.ops-disk-list.v231.v252 .ops-disk-row.v231 small{
  margin-top:2px;font-size:9.5px;line-height:1.3;
  white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.ops-disk-list.v231.v252 .ops-disk-health{height:19px;padding:0 6px;font-size:9px}

/* Thông tin máy: bỏ scrollbar, cho phép giá trị dài xuống dòng thay vì che/cắt. */
.ops-info-card.v252{grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.ops-kv.v231.v252{
  min-height:0;overflow:hidden!important;
  padding:7px 9px 8px;gap:5px 7px;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-content:stretch;
}
.ops-kv.v231.v252>div{padding:5px 8px;display:flex;flex-direction:column;justify-content:center}
.ops-kv.v231.v252 dt{font-size:9px;line-height:1.25}
.ops-kv.v231.v252 dd{
  margin:2px 0 0 24px;max-width:calc(100% - 24px);
  font-size:10.5px;line-height:1.3;
  white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}

/* 6 thành phần phần cứng = 3 cột x 2 hàng, không còn overflow:auto. */
.ops-hardware-card.v252{grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.ops-hardware-grid.v252{
  min-height:0;overflow:hidden!important;
  padding:7px 9px 8px;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));
  gap:7px;
}
.ops-hardware-grid.v252 .ops-hardware-tile{padding:7px 8px;overflow:hidden}
.ops-hardware-grid.v252 .ops-hardware-tile-head{grid-template-columns:25px minmax(0,1fr) 22px;gap:6px}
.ops-hardware-grid.v252 .ops-hardware-icon{width:25px;height:25px;border-radius:7px}
.ops-hardware-grid.v252 .ops-hardware-tile-head>div>span{font-size:8.5px;margin-bottom:2px}
.ops-hardware-grid.v252 .ops-hardware-tile strong{
  font-size:10.5px;line-height:1.3;-webkit-line-clamp:3;
}
.ops-hardware-grid.v252 .ops-hardware-tile>small{
  margin:3px 0 0 31px;font-size:9px;line-height:1.25;
  white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.ops-hardware-grid.v252 .ops-history-chip{width:22px;height:22px;border-radius:6px}

/* Phần mềm được ưu tiên thêm chiều cao và là vùng duy nhất có scrollbar. */
.ops-software-panel.v231.v252{min-height:0;overflow:hidden;grid-template-rows:auto minmax(0,1fr)}
.ops-software-panel.v231.v252 .ops-table-shell{
  min-height:0;height:100%;overflow:auto!important;display:block;
  scrollbar-gutter:stable;
}
.ops-software-panel.v231.v252 .ops-table thead{position:sticky;top:0;z-index:2;background:#f7f9fc}

@media(max-width:1279px) and (min-width:901px){
  .ops-overview-layout.v252{grid-template-rows:minmax(112px,.65fr) minmax(215px,1.25fr) minmax(175px,1fr);padding:9px 10px 10px;gap:9px}
  .ops-health-strip.v252{grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr)}
  .ops-facts-strip.v252{grid-template-columns:minmax(330px,.9fr) minmax(0,1.1fr)}
  .ops-hardware-grid.v252{gap:6px;padding:6px 7px}
  .ops-hardware-grid.v252 .ops-hardware-tile strong{font-size:10px}
}

/* Màn hình nhỏ không đủ chiều cao để ép toàn bộ desktop layout vào một viewport.
   Khi đó cho phép trang overview cuộn tự nhiên, nhưng các card bên trong vẫn không có
   scrollbar riêng; bảng Phần mềm tiếp tục cuộn trong vùng của nó. */
@media(max-width:900px){
  .ops-overview-layout.v252{height:auto;overflow:auto;grid-template-rows:auto;align-content:start}
  .ops-health-strip.v252,.ops-facts-strip.v252{grid-template-columns:1fr;overflow:visible}
  .ops-live-metrics.v231.v252{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(76px,1fr))}
  .ops-hardware-grid.v252{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(82px,auto))}
  .ops-disk-list.v231.v252{grid-template-columns:1fr}
  .ops-software-panel.v231.v252{min-height:260px}
}

/* ==========================================================================
   V25.2.1 - Organization count + Device overview fit hotfix
   --------------------------------------------------------------------------
   1) Bỏ chevron CSS âm ra ngoài node cây ("dấu ngoặc" bị thò mép giao diện).
   2) Tăng không gian cho Thông tin người dùng & thiết bị và ép 10 trường thành
      đúng 5 hàng x 2 cột, không scrollbar và không cắt hàng Nhà sản xuất/UUID.
   3) UUID/giá trị dài được phép wrap trong ô thay vì bị clip.
   ========================================================================== */

/* Không dùng pseudo-chevron nằm ngoài mép node; việc mở/đóng vẫn giữ nguyên bằng click node. */
.ops-tree-node.has-children .ops-tree-glyph:before{display:none!important;content:none!important}

/* Cân lại hàng Thông tin / Phần cứng: thông tin cần thêm chiều ngang cho UUID/Manufacturer. */
.ops-facts-strip.v252{
  grid-template-columns:minmax(500px,1.02fr) minmax(0,.98fr)!important;
}

/* 10 trường thông tin = 2 cột x 5 hàng, luôn nằm trọn trong card. */
.ops-kv.v231.v252{
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)!important;
  grid-template-rows:repeat(5,minmax(0,1fr))!important;
  grid-auto-rows:unset!important;
  gap:4px 7px!important;
  padding:6px 8px 7px!important;
  align-content:stretch!important;
}
.ops-kv.v231.v252>div{
  min-height:0!important;
  padding:4px 7px!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.ops-kv.v231.v252 dt{
  flex:0 0 auto;
  font-size:9px!important;
  line-height:1.2!important;
}
.ops-kv.v231.v252 dd{
  flex:0 1 auto;
  min-height:0;
  margin:2px 0 0 23px!important;
  max-width:calc(100% - 23px)!important;
  font-size:10.5px!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
  word-break:break-word;
  -webkit-line-clamp:2!important;
}

/* Hàng cuối thường chứa Manufacturer + SMBIOS UUID; cho phép hiển thị đủ nội dung dài. */
.ops-kv.v231.v252>div:nth-child(9) dd,
.ops-kv.v231.v252>div:nth-child(10) dd{
  -webkit-line-clamp:2!important;
  overflow-wrap:anywhere!important;
}

@media(max-width:1279px) and (min-width:901px){
  .ops-facts-strip.v252{grid-template-columns:minmax(430px,1fr) minmax(0,1fr)!important}
  .ops-kv.v231.v252{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important}
}

/* =========================================================
   V25.3 - WEB ADMIN AUTHORIZATION / USER MANAGEMENT
   ========================================================= */
.ops-auth-body{margin:0;min-height:100vh;background:#edf2f5;color:#162b38;font-family:Inter,Arial,sans-serif;display:grid;place-items:center}.ops-auth-shell{width:min(100%,1040px);padding:28px}.ops-auth-card{width:min(100%,430px);margin:auto;background:#fff;border:1px solid #d9e3e9;border-radius:18px;box-shadow:0 20px 55px rgba(24,47,61,.12);padding:28px}.ops-auth-card.wide{width:min(100%,720px)}.ops-auth-brand{display:flex;gap:12px;align-items:center;margin-bottom:28px}.ops-auth-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#173c4e;color:#fff}.ops-auth-mark svg{width:24px;fill:none;stroke:currentColor;stroke-width:1.8}.ops-auth-brand div{display:grid}.ops-auth-brand strong{font-size:15px}.ops-auth-brand small{color:#6d7f89}.ops-auth-card header span{font-size:10px;letter-spacing:.14em;color:#73858e;font-weight:800}.ops-auth-card header h1{font-size:26px;margin:5px 0 6px}.ops-auth-card header p{margin:0 0 20px;color:#647780}.ops-auth-form{display:grid;gap:14px}.ops-auth-form label{display:grid;gap:6px}.ops-auth-form label>span{font-size:11px;font-weight:800;color:#536973}.ops-auth-form input{height:42px;border:1px solid #cad7dd;border-radius:10px;padding:0 12px;font:inherit;outline:none}.ops-auth-form input:focus{border-color:#29789c;box-shadow:0 0 0 3px rgba(41,120,156,.11)}.ops-auth-form label small{font-size:10px;color:#7b8b93}.ops-auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ops-auth-error{padding:10px 12px;border-radius:10px;background:#fff0f0;color:#a82c2c;border:1px solid #f1c7c7;font-size:12px;font-weight:700}.ops-admin-warning{padding:12px 14px;border-radius:12px;background:#fff8ed;border:1px solid #efd3a5;display:grid;gap:3px}.ops-admin-warning strong{color:#9a5c00}.ops-admin-warning span{font-size:11px;color:#785f3a}.ops-logout-form{margin:0;display:inline-flex}.ops-users-surface{min-height:0}.ops-users-table-shell{overflow:auto;max-height:calc(100vh - 220px)}.ops-users-table{width:100%;border-collapse:collapse}.ops-users-table th,.ops-users-table td{padding:11px 12px;border-bottom:1px solid #e7edf0;text-align:left;font-size:11px}.ops-users-table th{position:sticky;top:0;background:#f7fafb;z-index:1;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#71828b}.ops-user-cell{display:flex;align-items:center;gap:10px}.ops-user-avatar{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#e7f0f4;color:#24566d;font-size:11px;font-weight:900}.ops-user-cell div{display:grid}.ops-user-cell small,.ops-muted{color:#74868f}.ops-role-badge{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:900}.ops-role-badge.admin{background:#fee8e6;color:#b43a31}.ops-role-badge.user{background:#e7f2f7;color:#28657f}.ops-account-state{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800}.ops-account-state i{width:7px;height:7px;border-radius:50%}.ops-account-state.active{color:#23724d}.ops-account-state.active i{background:#2aa56d}.ops-account-state.locked{color:#a35d19}.ops-account-state.locked i{background:#d9842f}.ops-user-actions{white-space:nowrap}.ops-user-dialog{width:min(1100px,94vw)}.ops-user-dialog.small{width:min(520px,94vw)}.ops-user-dialog .ops-dialog-card{width:100%;max-height:88vh;overflow:auto}.ops-user-form{display:grid;gap:14px}.ops-user-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ops-user-form-grid.one{grid-template-columns:1fr}.ops-user-form-grid label,.ops-admin-confirm label{display:grid;gap:5px}.ops-user-form-grid label>span,.ops-admin-confirm label>span{font-size:10px;font-weight:800;color:#536973}.ops-user-form-grid input,.ops-admin-confirm input{height:38px;border:1px solid #ccd8de;border-radius:9px;padding:0 10px;font:inherit}.ops-admin-switch{display:flex;gap:10px;align-items:flex-start;border:1px solid #d9e3e8;border-radius:12px;padding:11px 12px;background:#f8fbfc}.ops-admin-switch span{display:grid;gap:2px}.ops-admin-switch strong{font-size:11px}.ops-admin-switch small{font-size:10px;color:#74858e}.ops-user-access-editor{display:grid;grid-template-columns:1.1fr .9fr;gap:12px;min-height:0}.ops-user-access-editor>section{border:1px solid #dce5e9;border-radius:12px;padding:12px;min-height:0}.ops-user-access-editor>section>header{display:grid;margin-bottom:8px}.ops-user-access-editor>section>header strong{font-size:11px}.ops-user-access-editor>section>header small{font-size:9px;color:#798990}.ops-permission-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ops-permission-groups fieldset{margin:0;border:1px solid #e4eaed;border-radius:9px;padding:8px;display:grid;gap:5px}.ops-permission-groups legend{font-size:9px;font-weight:900;color:#61757e;padding:0 4px}.ops-permission-groups label,.ops-scope-tree label,.ops-scope-descendants{display:flex;align-items:center;gap:7px;font-size:10px}.ops-scope-descendants{padding:7px 8px;background:#f2f7f9;border-radius:8px;margin-bottom:7px}.ops-scope-tree{max-height:285px;overflow:auto;border-top:1px solid #e7edef;padding-top:5px}.ops-scope-tree label{padding:5px 6px 5px calc(6px + var(--depth)*14px);border-radius:7px}.ops-scope-tree label:hover{background:#f2f6f8}.ops-scope-tree label span{flex:1}.ops-scope-tree label small{font-size:9px;color:#7a8b93}.ops-admin-confirm{border:1px solid #efb9b5;background:#fff1f0;border-radius:12px;padding:12px;display:grid;gap:7px}.ops-admin-confirm strong{color:#a62f28;font-size:12px}.ops-admin-confirm p{margin:0;color:#784944;font-size:10px}.ops-admin-confirm[hidden],.ops-user-access-editor[hidden]{display:none!important}
@media(max-width:800px){.ops-auth-grid,.ops-user-form-grid,.ops-user-access-editor,.ops-permission-groups{grid-template-columns:1fr}.ops-users-table-shell{max-height:none}}

/* ==========================================================================
   V25.3.1 - USER MANAGEMENT UI POLISH
   Fix grid stretch on page, checkbox sizing and compact permission dialog.
   ========================================================================== */
.ops-users-page{
  grid-template-rows:auto minmax(0,1fr)!important;
  align-content:stretch!important;
}
.ops-users-page>.ops-page-head{align-self:start}
.ops-users-surface{
  min-height:0!important;
  display:grid!important;
  grid-template-rows:58px minmax(0,1fr)!important;
  overflow:hidden!important;
}
.ops-users-table-shell{
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
}
.ops-users-table{table-layout:fixed}
.ops-users-table th:nth-child(1){width:22%}
.ops-users-table th:nth-child(2){width:10%}
.ops-users-table th:nth-child(3){width:13%}
.ops-users-table th:nth-child(4){width:25%}
.ops-users-table th:nth-child(5){width:18%}
.ops-users-table th:nth-child(6){width:84px}
.ops-users-table td{vertical-align:middle}
.ops-user-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  white-space:nowrap;
}
.ops-user-actions .ops-icon-button{flex:0 0 auto}

/* Dialog frame: fixed header/footer, body fills the available area. */
.ops-user-dialog:not(.small){width:min(1040px,calc(100vw - 40px))!important}
.ops-user-dialog:not(.small) .ops-dialog-card{
  width:100%!important;
  height:min(790px,calc(100dvh - 44px))!important;
  max-height:calc(100dvh - 44px)!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  gap:0!important;
  border-radius:16px!important;
}
.ops-user-dialog-head{
  min-height:74px;
  padding:15px 18px 13px!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:14px!important;
}
.ops-user-dialog-head>div{min-width:0}
.ops-user-dialog-head>div>span{font-size:9px!important;letter-spacing:1.1px!important;color:var(--brand-2)!important;font-weight:800!important}
.ops-user-dialog-head h2{font-size:18px!important;margin:3px 0 2px!important;line-height:1.25!important}
.ops-user-dialog-head p{margin:0;color:var(--muted);font-size:10.5px;line-height:1.45}
.ops-dialog-close-x{
  width:30px;height:30px;flex:0 0 30px;border:1px solid var(--line);border-radius:8px;
  background:#fff;color:var(--muted);font-size:20px;line-height:1;cursor:pointer;display:grid;place-items:center;
}
.ops-dialog-close-x:hover{background:var(--surface2);color:var(--text)}
.ops-user-form-body{
  min-height:0;
  overflow:hidden;
  padding:12px 16px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#fbfcfd;
}
.ops-user-identity-card{
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  padding:10px 12px;
}
.ops-user-identity-card.compact{padding:9px 12px}
.ops-user-form-grid{gap:8px 10px!important}
.ops-user-form-grid label{gap:4px!important;min-width:0}
.ops-user-form-grid label>span,.ops-admin-confirm label>span{
  font-size:9.5px!important;font-weight:700!important;color:var(--text-2)!important;
}
.ops-user-form-grid input,.ops-admin-confirm input{
  height:35px!important;border-radius:8px!important;padding:0 10px!important;font-size:12px!important;background:#fff!important;
}

/* IMPORTANT: generic dialog input rules must never stretch checkboxes. */
.ops-user-dialog input[type="checkbox"]{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  max-width:16px!important;
  flex:0 0 16px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:3px!important;
  box-shadow:none!important;
  accent-color:var(--brand)!important;
  cursor:pointer;
}

.ops-admin-switch{
  flex:0 0 auto;
  min-height:52px;
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center!important;
  gap:10px!important;
  padding:9px 12px!important;
  border:1px solid #cfe0e5!important;
  border-radius:11px!important;
  background:#f4f9fa!important;
}
.ops-admin-switch>span{display:grid!important;gap:1px!important;min-width:0}
.ops-admin-switch strong{font-size:11px!important;color:var(--text)!important}
.ops-admin-switch small{font-size:9.5px!important;color:var(--muted)!important;line-height:1.35}
.ops-admin-switch em{
  font-style:normal;font-size:9px;font-weight:800;color:#9b473e;background:#fff0ed;
  border:1px solid #f2d0ca;border-radius:999px;padding:4px 8px;white-space:nowrap;
}

.ops-user-access-editor{
  flex:1 1 auto;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.38fr) minmax(310px,.82fr)!important;
  gap:10px!important;
}
.ops-access-panel{
  min-height:0!important;
  overflow:hidden!important;
  border:1px solid var(--line)!important;
  border-radius:11px!important;
  background:#fff!important;
  padding:0!important;
  display:grid!important;
}
.ops-permission-panel{grid-template-rows:48px minmax(0,1fr)!important}
.ops-scope-panel{grid-template-rows:48px auto 38px minmax(0,1fr)!important}
.ops-access-panel>header{
  min-height:48px;margin:0!important;padding:9px 11px!important;border-bottom:1px solid var(--line-soft);
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;background:#fbfcfd;
}
.ops-access-panel>header>div{display:grid;gap:1px;min-width:0}
.ops-access-panel>header strong{font-size:11px!important;color:var(--text)!important}
.ops-access-panel>header small{font-size:9px!important;color:var(--muted)!important;line-height:1.35}
.ops-access-count{
  flex:0 0 auto;font-size:9px;font-weight:800;color:var(--brand-2);background:var(--brand-soft);
  border:1px solid var(--brand-line);border-radius:999px;padding:3px 7px;
}

.ops-permission-groups{
  min-height:0;
  overflow:auto;
  padding:9px 10px 10px;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-content:start;
  gap:8px!important;
}
.ops-permission-groups fieldset{
  margin:0!important;
  min-width:0;
  border:1px solid #e1e8ec!important;
  border-radius:9px!important;
  padding:6px 7px 7px!important;
  display:grid!important;
  gap:2px!important;
  background:#fff;
}
.ops-permission-groups legend{
  font-size:9px!important;font-weight:800!important;color:#526a75!important;padding:0 5px!important;
}
.ops-permission-groups label{
  min-height:27px;
  padding:4px 5px;
  border-radius:6px;
  display:flex!important;
  align-items:flex-start!important;
  gap:7px!important;
  font-size:10px!important;
  line-height:1.35;
  color:var(--text-2);
  cursor:pointer;
}
.ops-permission-groups label:hover{background:#f3f8f7;color:var(--text)}
.ops-permission-groups label input{margin-top:1px!important}
.ops-permission-groups label span{min-width:0;overflow-wrap:anywhere}

.ops-scope-descendants{
  margin:8px 9px 6px!important;
  padding:7px 8px!important;
  min-height:42px;
  display:grid!important;
  grid-template-columns:16px minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
  background:#f3f8f7!important;
  border:1px solid #dbe9e5;
  border-radius:8px!important;
  cursor:pointer;
}
.ops-scope-descendants>span{display:grid;gap:0}
.ops-scope-descendants strong{font-size:9.5px;color:var(--text)}
.ops-scope-descendants small{font-size:8.5px;color:var(--muted)}
.ops-scope-search{
  margin:0 9px 6px;
  height:32px;
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  padding:0 9px!important;
  border:1px solid var(--line)!important;
  border-radius:8px!important;
  background:#fff!important;
}
.ops-scope-search svg{width:14px;height:14px;flex:0 0 14px;fill:none;stroke:var(--muted);stroke-width:1.8}
.ops-scope-search input[type="search"]{
  width:100%!important;height:30px!important;min-width:0!important;padding:0!important;border:0!important;
  background:transparent!important;box-shadow:none!important;font-size:10px!important;outline:0!important;
}
.ops-scope-tree{
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  border-top:1px solid var(--line-soft)!important;
  padding:5px 7px 8px!important;
}
.ops-scope-tree .ops-scope-row{
  min-height:30px;
  padding:4px 6px 4px calc(6px + var(--depth)*13px)!important;
  display:grid!important;
  grid-template-columns:16px minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:7px!important;
  border-radius:6px!important;
  font-size:10px!important;
  cursor:pointer;
}
.ops-scope-tree .ops-scope-row:hover{background:#f3f7f8!important}
.ops-scope-tree .ops-scope-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-scope-tree .ops-scope-row>small{
  font-size:8.5px!important;font-weight:700;color:#657b86!important;background:#eef3f5;border-radius:999px;padding:2px 6px;
}
.ops-scope-row[hidden]{display:none!important}

.ops-admin-confirm{
  flex:0 0 auto;
  padding:9px 11px!important;
  grid-template-columns:minmax(0,1fr) minmax(220px,300px)!important;
  align-items:center!important;
  column-gap:14px!important;
  row-gap:3px!important;
}
.ops-admin-confirm>strong,.ops-admin-confirm>p{grid-column:1}
.ops-admin-confirm>label{grid-column:2;grid-row:1/3}
.ops-user-form>footer{
  min-height:60px;
  padding:10px 16px!important;
  background:#fff!important;
  border-top:1px solid var(--line)!important;
}
.ops-user-footer-spacer{flex:1}

/* Reset password dialog remains compact and does not inherit the large-body layout. */
.ops-user-dialog.small .ops-dialog-card{width:100%!important;max-height:calc(100dvh - 40px)!important;overflow:hidden!important}
.ops-user-dialog.small .ops-user-form-grid{padding:14px 18px 4px}

@media(max-width:900px){
  .ops-users-page{overflow:auto!important;grid-template-rows:auto auto!important}
  .ops-users-surface{min-height:460px}
  .ops-user-dialog:not(.small) .ops-dialog-card{height:calc(100dvh - 24px)!important;max-height:calc(100dvh - 24px)!important}
  .ops-user-form-body{overflow:auto!important}
  .ops-user-access-editor{grid-template-columns:1fr!important;flex:0 0 auto}
  .ops-access-panel{min-height:300px!important}
  .ops-admin-confirm{grid-template-columns:1fr!important}
  .ops-admin-confirm>strong,.ops-admin-confirm>p,.ops-admin-confirm>label{grid-column:1!important;grid-row:auto!important}
}


/* ==========================================================================
   V25.3.2 - WIDE USER ACCESS + SELF PASSWORD
   - Quyền chức năng hiển thị đầy đủ, không có scrollbar trên desktop.
   - Chỉ cây CQTT/phạm vi tổ chức được scroll khi danh sách dài.
   ========================================================================== */
@media(min-width:901px){
  .ops-user-dialog:not(.small){
    width:min(1480px,calc(100vw - 24px))!important;
    max-width:none!important;
  }
  .ops-user-dialog:not(.small) .ops-dialog-card{
    height:min(840px,calc(100dvh - 24px))!important;
    max-height:calc(100dvh - 24px)!important;
  }
  .ops-user-form-body{
    padding:10px 14px 12px!important;
    gap:8px!important;
  }
  .ops-user-access-editor{
    grid-template-columns:minmax(0,1fr) minmax(390px,440px)!important;
    gap:10px!important;
  }
  .ops-permission-panel{
    overflow:hidden!important;
    grid-template-rows:46px minmax(0,1fr)!important;
  }
  .ops-permission-groups{
    min-height:0!important;
    overflow:hidden!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:max-content!important;
    align-content:start!important;
    padding:8px 9px 9px!important;
    gap:7px!important;
  }
  .ops-permission-groups fieldset{
    align-content:start!important;
    padding:5px 7px 6px!important;
  }
  .ops-permission-groups label{
    min-height:25px!important;
    padding:3px 5px!important;
    font-size:9.7px!important;
  }
  .ops-scope-panel{
    min-height:0!important;
    overflow:hidden!important;
    grid-template-rows:46px auto 36px minmax(0,1fr)!important;
  }
  .ops-scope-tree{
    min-height:0!important;
    height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    scrollbar-gutter:stable;
  }
}

.ops-change-password-link{
  text-decoration:none!important;
}
.ops-password-page{
  width:min(100%,760px);
  margin:0 auto;
  display:grid;
  gap:16px;
  align-content:start;
}
.ops-password-card{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 12px 34px rgba(27,54,68,.07);
  overflow:hidden;
}
.ops-password-card>header{
  padding:16px 18px;
  border-bottom:1px solid var(--line-soft);
  display:flex;
  align-items:center;
  gap:11px;
  background:#fbfcfd;
}
.ops-password-icon{
  width:36px;height:36px;flex:0 0 36px;border-radius:10px;display:grid;place-items:center;
  background:var(--brand-soft);color:var(--brand-2);
}
.ops-password-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ops-password-card>header>div{display:grid;gap:2px}
.ops-password-card>header strong{font-size:13px;color:var(--text)}
.ops-password-card>header small{font-size:10px;color:var(--muted)}
.ops-password-card>.ops-auth-error{margin:14px 18px 0}
.ops-password-form{padding:16px 18px 18px;display:grid;gap:12px}
.ops-password-form>label{display:grid;gap:5px}
.ops-password-form>label>span{font-size:10px;font-weight:800;color:var(--text-2)}
.ops-password-form input[type="password"]{
  width:100%;height:40px;border:1px solid var(--line);border-radius:9px;padding:0 11px;font:inherit;font-size:12px;outline:none;background:#fff;
}
.ops-password-form input[type="password"]:focus{border-color:#4387a3;box-shadow:0 0 0 3px rgba(40,117,150,.10)}
.ops-password-note{font-size:10px;color:var(--muted);padding:9px 10px;border-radius:9px;background:#f5f8fa;border:1px solid var(--line-soft)}
.ops-password-form>footer{display:flex;justify-content:flex-end;gap:8px;padding-top:3px}
.ops-password-form>footer .ops-button{text-decoration:none}


/* =========================================================
   V25.3.3 - FIX: Thông tin người dùng & thiết bị bị cắt dòng
   ========================================================= */

/* Cho hàng Thông tin + Phần cứng cao thêm */
.ops-overview-layout.v252 {
    grid-template-rows: minmax(112px, .62fr) minmax(260px, 1.45fr) minmax(180px, 1fr) !important;
}

/* 5 hàng thông tin phải có chiều cao tối thiểu */
.ops-kv.v231.v252 {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
    grid-template-rows: repeat(5, minmax(36px, 1fr)) !important;
    gap: 5px 7px !important;
    padding: 6px 8px 8px !important;
    overflow: hidden !important;
}

/* Mỗi ô không được ép quá thấp */
.ops-kv.v231.v252 > div {
    min-height: 36px !important;
    padding: 4px 8px !important;
    overflow: hidden !important;
    justify-content: center !important;
}

/* Tên trường */
.ops-kv.v231.v252 dt {
    font-size: 9px !important;
    line-height: 1.15 !important;
    flex-shrink: 0;
}

/* Giá trị */
.ops-kv.v231.v252 dd {
    margin: 2px 0 0 23px !important;
    max-width: calc(100% - 23px) !important;
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
}

/* Nhà sản xuất + SMBIOS UUID được ưu tiên hiển thị đủ */
.ops-kv.v231.v252 > div:nth-child(9),
.ops-kv.v231.v252 > div:nth-child(10) {
    min-height: 40px !important;
}

/* Giữ responsive cũ trên màn hình nhỏ; block fix trên dành cho desktop. */
@media(max-width:900px){
    .ops-overview-layout.v252{height:auto!important;overflow:auto!important;grid-template-rows:auto!important;align-content:start!important}
    .ops-kv.v231.v252{grid-template-rows:none!important}
}


/* ==========================================================================
   V25.3.5 - UI REBALANCE
   - User/permission dialog: credential fields compact; organization scope starts high.
   - Device overview: left = user/device info + hardware; right = software (only scroll area).
   - Remote diagnostics: commands on row 1; target + Run on row 2.
   - Organization create form compact and visually centered.
   - Dashboard Offline donut segment is red.
   ========================================================================== */

/* Dashboard presence: Online = brand green, Offline = red. */
.ops-presence-donut{
  background:conic-gradient(
    var(--brand) 0 calc(var(--online-pct)*1%),
    var(--red) calc(var(--online-pct)*1%) 100%
  )!important;
}
.ops-presence-filter i.offline{
  background:var(--red)!important;
  box-shadow:0 0 0 3px rgba(217,45,32,.12)!important;
}

/* --------------------------------------------------------------------------
   Device overview
   Health + SMART remain at the top. The main work area below is two columns:
   left stacks System information over Hardware; right is Software and is the
   only area allowed to scroll independently.
   -------------------------------------------------------------------------- */
@media(min-width:901px){
  .ops-overview-layout.v252{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    display:grid!important;
    grid-template-columns:minmax(520px,.96fr) minmax(560px,1.04fr)!important;
    grid-template-rows:minmax(108px,.30fr) minmax(0,1fr)!important;
    gap:9px!important;
    padding:9px 10px 10px!important;
  }
  .ops-health-strip.v252{
    grid-column:1/-1!important;
    grid-row:1!important;
    min-height:0!important;
  }
  .ops-facts-strip.v252{
    grid-column:1!important;
    grid-row:2!important;
    min-height:0!important;
    overflow:hidden!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(205px,1.08fr) minmax(185px,.92fr)!important;
    gap:9px!important;
  }
  .ops-software-panel.v231.v252{
    grid-column:2!important;
    grid-row:2!important;
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    grid-template-rows:auto minmax(0,1fr)!important;
  }
  .ops-software-panel.v231.v252 .ops-table-shell{
    min-height:0!important;
    height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    scrollbar-gutter:stable;
  }

  /* System info must never get its own scrollbar. */
  .ops-info-card.v252,
  .ops-hardware-card.v252{
    min-height:0!important;
    overflow:hidden!important;
  }
  .ops-kv.v231.v252{
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr)!important;
    grid-template-rows:repeat(5,minmax(34px,1fr))!important;
    gap:4px 6px!important;
    padding:5px 7px 7px!important;
  }
  .ops-kv.v231.v252>div{
    min-height:34px!important;
    padding:4px 7px!important;
  }
  .ops-kv.v231.v252>div:nth-child(9),
  .ops-kv.v231.v252>div:nth-child(10){min-height:36px!important}

  /* Hardware cards are intentionally more compact than the previous version. */
  .ops-hardware-card.v252 .ops-card-head{
    min-height:45px!important;
    padding:6px 10px!important;
  }
  .ops-hardware-card.v252 .ops-card-head>small{font-size:8.5px!important}
  .ops-hardware-grid.v252{
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,minmax(64px,1fr))!important;
    gap:5px!important;
    padding:5px 7px 7px!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-tile{
    min-height:0!important;
    padding:5px 6px!important;
    border-radius:7px!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-tile-head{
    grid-template-columns:22px minmax(0,1fr) 20px!important;
    gap:5px!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-icon{
    width:22px!important;height:22px!important;border-radius:6px!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-tile-head>div>span{
    font-size:8px!important;margin-bottom:1px!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-tile strong{
    font-size:9.6px!important;line-height:1.2!important;-webkit-line-clamp:3!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-tile>small{
    margin:2px 0 0 27px!important;font-size:8.3px!important;line-height:1.2!important;
    -webkit-line-clamp:2!important;
  }
  .ops-hardware-grid.v252 .ops-history-chip{
    width:20px!important;height:20px!important;border-radius:5px!important;
  }
}

/* --------------------------------------------------------------------------
   Remote diagnostics
   Row 1 = command buttons. Row 2 = target input and Run button.
   -------------------------------------------------------------------------- */
.ops-remote-toolbar{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:auto auto!important;
  align-items:start!important;
  gap:10px!important;
}
.ops-command-tabs{
  grid-row:1!important;
  justify-content:flex-start!important;
}
.ops-remote-inputs{
  grid-row:2!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(260px,420px) auto!important;
  justify-content:start!important;
  align-items:end!important;
  gap:9px!important;
}
.ops-remote-inputs label{
  width:100%!important;
  min-width:0!important;
}
.ops-remote-inputs input{
  width:100%!important;
  min-width:0!important;
}
.ops-remote-inputs .ops-button{align-self:end!important;white-space:nowrap}

/* --------------------------------------------------------------------------
   User / permission dialog
   Organization scope begins at the top-right. Credentials are compact on the
   left and no longer consume the full modal width. Only the organization tree
   is scrollable on desktop.
   -------------------------------------------------------------------------- */
@media(min-width:901px){
  .ops-user-dialog:not(.small){
    width:min(1480px,calc(100vw - 28px))!important;
  }
  .ops-user-dialog:not(.small) .ops-dialog-card{
    height:min(820px,calc(100dvh - 28px))!important;
  }
  .ops-user-form-body{
    min-height:0!important;
    overflow:hidden!important;
    padding:10px 14px 12px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(360px,430px)!important;
    grid-template-rows:auto auto minmax(0,1fr) auto!important;
    gap:8px 10px!important;
    align-items:stretch!important;
  }
  .ops-user-identity-card{
    grid-column:1!important;
    grid-row:1!important;
    align-self:start!important;
    padding:9px 11px!important;
  }
  .ops-user-identity-card .ops-user-form-grid{
    grid-template-columns:repeat(2,minmax(220px,340px))!important;
    justify-content:start!important;
    gap:7px 10px!important;
  }
  .ops-user-identity-card.compact .ops-user-form-grid.one{
    grid-template-columns:minmax(240px,360px)!important;
  }
  .ops-user-form-grid input{
    width:100%!important;
    height:34px!important;
  }
  .ops-admin-switch{
    grid-column:1!important;
    grid-row:2!important;
    min-height:48px!important;
    padding:8px 11px!important;
  }

  /* Let the permission/scope children join the body grid directly. */
  .ops-user-access-editor{
    display:contents!important;
  }
  .ops-user-access-editor[hidden]{display:none!important}
  .ops-permission-panel{
    grid-column:1!important;
    grid-row:3!important;
    min-height:0!important;
    overflow:hidden!important;
    grid-template-rows:44px minmax(0,1fr)!important;
  }
  .ops-scope-panel{
    grid-column:2!important;
    grid-row:1 / span 3!important;
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    grid-template-rows:44px auto 36px minmax(0,1fr)!important;
  }
  .ops-permission-groups{
    min-height:0!important;
    overflow:hidden!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:max-content!important;
    align-content:start!important;
    gap:6px!important;
    padding:7px 8px 8px!important;
  }
  .ops-permission-groups fieldset{padding:5px 6px 6px!important}
  .ops-permission-groups label{
    min-height:24px!important;
    padding:3px 4px!important;
    font-size:9.5px!important;
  }
  .ops-scope-tree{
    min-height:0!important;
    height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    scrollbar-gutter:stable;
  }
  .ops-admin-confirm{
    grid-column:1!important;
    grid-row:4!important;
  }
  .ops-user-form>footer{
    min-height:58px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:14px!important;
    padding:9px 16px!important;
  }
  .ops-user-form>footer .ops-user-footer-spacer{flex:1!important}
}

/* --------------------------------------------------------------------------
   Organization create form
   Compact card instead of a large empty editor canvas.
   -------------------------------------------------------------------------- */
#ops-org-create-form{
  max-width:860px!important;
  margin:4px auto 0!important;
  padding:18px 20px 16px!important;
  border:1px solid var(--line)!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 10px 26px rgba(27,54,68,.06)!important;
  gap:13px!important;
}
#ops-org-create-form header{
  padding-bottom:10px!important;
  border-bottom:1px solid var(--line-soft)!important;
}
#ops-org-create-form .ops-form-grid{
  grid-template-columns:repeat(2,minmax(240px,1fr))!important;
  gap:11px 14px!important;
}
#ops-org-create-form footer{
  margin-top:3px!important;
  padding-top:12px!important;
  border-top:1px solid var(--line-soft)!important;
  display:flex!important;
  justify-content:flex-end!important;
  gap:12px!important;
}

@media(max-width:900px){
  .ops-remote-inputs{grid-template-columns:minmax(0,1fr) auto!important}
  #ops-org-create-form{margin:0!important;padding:14px!important}
  #ops-org-create-form .ops-form-grid{grid-template-columns:1fr!important}
}

/* ========================================================================== 
   V25.3.6 - FINAL UI POLISH
   - Fix 10 system-info tiles being clipped.
   - SMART shows max 2 disks; extra disks open in a dedicated dialog.
   - Organization create form keeps first-row inputs perfectly aligned.
   - Sidebar shows signed-in account identity and groups password/logout actions.
   ========================================================================== */

@media(min-width:901px){
  /* Give the information card enough real height for five complete rows. */
  .ops-facts-strip.v252{
    grid-template-rows:minmax(264px,1.36fr) minmax(150px,.64fr)!important;
  }
  .ops-info-card.v252 .ops-card-head{
    min-height:46px!important;
    padding:6px 10px!important;
  }
  .ops-kv.v231.v252{
    grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)!important;
    grid-template-rows:repeat(5,minmax(38px,1fr))!important;
    gap:5px 7px!important;
    padding:6px 8px 8px!important;
    align-content:stretch!important;
    overflow:hidden!important;
  }
  .ops-kv.v231.v252>div{
    min-height:38px!important;
    padding:5px 8px!important;
    overflow:hidden!important;
    align-content:center!important;
  }
  .ops-kv.v231.v252 dt{
    font-size:9px!important;
    line-height:1.15!important;
    min-height:12px!important;
  }
  .ops-kv.v231.v252 dd{
    margin:2px 0 0 23px!important;
    max-width:calc(100% - 23px)!important;
    font-size:10.5px!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
  }
  .ops-kv.v231.v252>div:nth-child(9),
  .ops-kv.v231.v252>div:nth-child(10){min-height:40px!important}

  /* Hardware stays compact so extra height is spent on the clipped information fields. */
  .ops-hardware-grid.v252{
    grid-template-rows:repeat(2,minmax(58px,1fr))!important;
  }
}

/* SMART summary never grows with disk count. */
.ops-disk-panel.v231.v252{
  grid-template-rows:auto minmax(0,1fr) auto!important;
}
.ops-disk-more{
  justify-self:center;
  margin:0 0 5px;
  min-height:24px;
  padding:2px 10px;
  border:1px solid var(--brand-line);
  border-radius:999px;
  background:var(--brand-soft);
  color:var(--brand-2);
  font-size:9.5px;
  font-weight:800;
  cursor:pointer;
}
.ops-disk-more:hover{background:#dff3ee;border-color:#9fd7cc}
.ops-disk-dialog{width:min(760px,calc(100vw - 32px))}
.ops-disk-dialog .ops-dialog-card{width:100%;max-height:min(720px,calc(100dvh - 40px));overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.ops-disk-dialog-list{min-height:0;overflow-y:auto;padding:8px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.ops-disk-dialog-list .ops-disk-row{padding:10px 2px;border-bottom:1px solid var(--line-soft)}
.ops-disk-dialog-list .ops-disk-row small{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;display:block!important;-webkit-line-clamp:unset!important}

/* Organization create: all controls in the same grid row share an identical control baseline. */
#ops-org-create-form .ops-form-grid{align-items:start!important}
#ops-org-create-form .ops-form-grid>label{
  grid-template-rows:auto 38px auto!important;
  align-content:start!important;
  align-self:start!important;
  row-gap:5px!important;
}
#ops-org-create-form .ops-form-grid>label>input,
#ops-org-create-form .ops-form-grid>label>select{grid-row:2!important;height:38px!important}
#ops-org-create-form .ops-form-grid>label>small{grid-row:3!important;margin:0!important}

/* Signed-in account identity at the bottom of the management rail. */
.ops-account-shell{
  position:relative;
  flex:1 0 100%;
  width:100%;
  min-width:0;
  margin-top:3px;
}
.ops-account-trigger{
  width:100%;
  min-height:46px;
  border:1px solid #365463;
  border-radius:10px;
  background:#1b3746;
  color:#eef7fa;
  padding:6px 8px;
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 14px;
  align-items:center;
  gap:8px;
  text-align:left;
  cursor:pointer;
}
.ops-account-trigger:hover{background:#223f4e;border-color:#4a6775}
.ops-account-trigger .ops-user,
.ops-account-menu-head .ops-user{margin:0!important;width:32px;height:32px;display:grid;place-items:center;background:#355c6d}
.ops-account-copy{display:grid;min-width:0;gap:1px}
.ops-account-copy strong{font-size:10.5px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff}
.ops-account-copy small{font-size:8.5px;line-height:1.3;color:#bcd0da;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-account-chevron{width:13px;height:13px;color:#9fb8c5;transition:transform .15s}
.ops-account-trigger[aria-expanded="true"] .ops-account-chevron{transform:rotate(180deg)}
.ops-account-menu{
  position:absolute;
  left:0;
  bottom:calc(100% + 8px);
  z-index:180;
  width:100%;
  min-width:205px;
  padding:7px;
  border:1px solid #d7e1e6;
  border-radius:12px;
  background:#fff;
  color:var(--text);
  box-shadow:0 18px 44px rgba(8,24,34,.25);
}
.ops-account-menu-head{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:8px;padding:5px 6px 9px;border-bottom:1px solid var(--line-soft);margin-bottom:5px}
.ops-account-menu-head>div{display:grid;min-width:0}
.ops-account-menu-head strong{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-account-menu-head small{font-size:8.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ops-account-menu-item{
  width:100%;height:34px;border:0;border-radius:8px;background:transparent;color:var(--text-2);
  padding:0 9px;display:flex;align-items:center;gap:8px;font-size:10px;font-weight:700;cursor:pointer;text-align:left;
}
.ops-account-menu-item svg{width:15px;height:15px}
.ops-account-menu-item:hover{background:var(--brand-soft);color:var(--brand-2)}
.ops-account-menu-item.danger:hover{background:var(--red-soft);color:var(--red-2)}
.ops-account-menu .ops-logout-form{display:block;width:100%}
.ops-unsaved-dialog{width:min(460px,calc(100vw - 32px))}
.ops-unsaved-dialog .ops-dialog-card{width:100%}
.ops-unsaved-dialog p{margin:0;padding:4px 0 2px;color:var(--muted);line-height:1.55}

.ops-app.ops-shell-compact .ops-account-shell{width:auto;flex:0 0 auto;margin-top:0}
.ops-app.ops-shell-compact .ops-account-trigger{width:40px;height:40px;min-height:40px;padding:4px;display:grid;grid-template-columns:1fr;place-items:center}
.ops-app.ops-shell-compact .ops-account-trigger .ops-user{width:30px;height:30px}
.ops-app.ops-shell-compact .ops-account-copy,
.ops-app.ops-shell-compact .ops-account-chevron{display:none!important}
.ops-app.ops-shell-compact .ops-account-menu{left:calc(100% + 10px);bottom:0;width:230px}

@media(max-width:900px){
  .ops-disk-dialog-list{grid-template-columns:1fr}
  .ops-account-copy,.ops-account-chevron{display:none!important}
  .ops-account-shell{flex:0 0 auto;width:auto;margin-top:0}
  .ops-account-trigger{width:38px;height:38px;min-height:38px;padding:3px;grid-template-columns:1fr;place-items:center}
  .ops-account-menu{left:calc(100% + 10px);bottom:0;width:230px}
}
@media(max-width:620px){
  .ops-account-shell{display:none!important}
}

/* ========================================================================== 
   V25.3.6.1 - HARDWARE HEIGHT HOTFIX
   The hardware card was over-compressed after the V25.3.6 information-card
   fix. Give the second row enough real height for two complete hardware rows
   while keeping System information fully visible and scrollbar-free.
   ========================================================================== */
@media(min-width:901px){
  .ops-facts-strip.v252{
    grid-template-rows:minmax(252px,1.18fr) minmax(180px,.82fr)!important;
  }

  .ops-info-card.v252 .ops-card-head,
  .ops-hardware-card.v252 .ops-card-head{
    min-height:42px!important;
    padding:5px 10px!important;
  }

  .ops-kv.v231.v252{
    grid-template-rows:repeat(5,minmax(36px,1fr))!important;
    gap:4px 7px!important;
    padding:5px 8px 7px!important;
  }
  .ops-kv.v231.v252>div{
    min-height:36px!important;
    padding:4px 8px!important;
  }
  .ops-kv.v231.v252>div:nth-child(9),
  .ops-kv.v231.v252>div:nth-child(10){min-height:40px!important}

  .ops-hardware-grid.v252{
    grid-template-rows:repeat(2,minmax(58px,1fr))!important;
    gap:5px!important;
    padding:5px 7px 7px!important;
    overflow:hidden!important;
  }
  .ops-hardware-grid.v252 .ops-hardware-tile{
    min-height:58px!important;
  }
}

/* =========================================================
   V25.4 - ONE-TIME AGENT ENROLLMENT TOKENS
   ========================================================= */
.ops-enrollment-page{display:grid;gap:14px;min-height:0}
.ops-enrollment-create-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ops-enrollment-create-card{min-height:0}
.ops-enrollment-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;padding:12px 14px 14px}
.ops-enrollment-form label{display:grid;gap:5px;min-width:0}
.ops-enrollment-form label>span{font-size:11px;font-weight:800;color:#52677a;text-transform:uppercase;letter-spacing:.04em}
.ops-enrollment-form label:first-child{grid-column:1/-1}
.ops-enrollment-form input,.ops-enrollment-form select{width:100%;height:38px;border:1px solid #d8e1e7;border-radius:9px;background:#fff;padding:0 10px;color:#203847;font:inherit;outline:none}
.ops-enrollment-form input:focus,.ops-enrollment-form select:focus{border-color:#6f97aa;box-shadow:0 0 0 3px rgba(69,126,151,.10)}
.ops-enrollment-form .ops-btn{justify-self:end;align-self:end}
.ops-enrollment-note{margin:0;align-self:center;font-size:11px;line-height:1.45;color:#6a7d8b}
.ops-enrollment-list-card{min-height:0}
.ops-enrollment-list-card .ops-table-shell{max-height:360px;overflow:auto}
.ops-token-status{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}
.ops-token-status.active{background:#e5f7ed;color:#1d7044}
.ops-token-status.closed{background:#edf1f4;color:#687986}
.ops-token-created-page{display:grid;place-items:center;min-height:calc(100vh - 110px)}
.ops-token-created-card{width:min(760px,94vw);padding:26px;border:1px solid #d9e4ea;border-radius:16px;background:#fff;box-shadow:0 18px 50px rgba(31,59,73,.10)}
.ops-token-created-card h1{margin:5px 0 8px;font-size:24px;color:#173646}
.ops-token-created-card>p{margin:0 0 18px;color:#667b89}
.ops-token-secret-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px;border:1px solid #c9dce5;border-radius:12px;background:#f6fafc}
.ops-token-secret-row code{overflow-wrap:anywhere;font-size:15px;font-weight:800;color:#1f5268}
.ops-token-created-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}
.ops-token-created-meta>div{padding:9px 11px;border:1px solid #e3e9ed;border-radius:10px;background:#fbfcfd}
.ops-token-created-meta dt{font-size:9px;font-weight:900;color:#71828d;text-transform:uppercase}
.ops-token-created-meta dd{margin:3px 0 0;font-weight:750;color:#243e4c}
.ops-token-warning{margin:12px 0 16px;padding:11px 12px;border-radius:10px;background:#fff4dd;color:#79571d;font-size:12px;line-height:1.5}
@media(max-width:980px){.ops-enrollment-create-grid{grid-template-columns:1fr}.ops-enrollment-form{grid-template-columns:1fr}.ops-enrollment-form label:first-child{grid-column:auto}.ops-token-created-meta{grid-template-columns:1fr}}

/* V25.5 - Phát hành nhiều Enrollment Token trong một lần, không thay đổi cơ chế 1 token/Agent. */
.ops-enrollment-form .ops-enrollment-full-row{grid-column:1/-1}
.ops-enrollment-form textarea{width:100%;min-height:90px;resize:vertical;border:1px solid #d8e1e7;border-radius:9px;background:#fff;padding:10px;color:#203847;font:inherit;outline:none}
.ops-enrollment-form textarea:focus{border-color:#6f97aa;box-shadow:0 0 0 3px rgba(69,126,151,.10)}
.ops-enrollment-batch-card{width:min(1100px,96vw);padding:24px;border:1px solid #d9e4ea;border-radius:16px;background:#fff;box-shadow:0 18px 50px rgba(31,59,73,.10)}
.ops-enrollment-batch-card h1{margin:5px 0 8px;font-size:24px;color:#173646}
.ops-enrollment-batch-card>p{margin:0 0 14px;color:#667b89}
.ops-enrollment-batch-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:12px 0}
.ops-enrollment-batch-scroll{max-height:52vh;overflow:auto;border:1px solid #e3e9ed;border-radius:10px}
.ops-enrollment-batch-scroll table{width:100%;min-width:670px;border-collapse:collapse}
.ops-enrollment-batch-scroll th,.ops-enrollment-batch-scroll td{padding:9px 12px;text-align:left;border-bottom:1px solid #e9eef2}
.ops-enrollment-batch-scroll thead th{position:sticky;top:0;background:#f6f9fb;color:#516878;font-size:11px}
.ops-enrollment-batch-scroll code{overflow-wrap:anywhere;font-size:12px;font-weight:700;color:#1f5268}
.ops-enrollment-batch-foot{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:14px}
@media(max-width:980px){.ops-enrollment-form .ops-enrollment-full-row{grid-column:auto}}

/* V25.7.1 — Organization create form: fixed parent, no overlapping root checkbox. */
#ops-org-create-form .ops-form-grid { align-items:start!important; }
#ops-org-create-form .ops-form-grid > label { display:flex!important; flex-direction:column!important; align-items:stretch!important; gap:6px!important; min-width:0!important; grid-template-rows:none!important; }
#ops-org-create-form .ops-form-grid > label > input { grid-row:auto!important; min-height:40px!important; }
#ops-org-create-form .ops-org-create-parent-display { min-width:0; }
#ops-org-create-form .ops-org-parent-readonly { display:flex; align-items:center; padding:10px 12px; min-height:40px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface3); font-weight:650; overflow-wrap:anywhere; }
#ops-org-create-root-button { margin-left:8px; }

#ops-approve-unit-row[hidden] { display:none!important; }

/* V25.7.2 — Excel export dialog (permission-scoped, selected fields). */
.ops-export-trigger{white-space:nowrap;min-height:38px}
.ops-export-dialog{width:min(690px,calc(100vw - 32px));padding:0;border:1px solid #dbe5e9;border-radius:16px;background:#fff;box-shadow:0 24px 75px #102c3840;color:#163346;max-height:calc(100vh - 40px);overflow:auto}
.ops-export-dialog::backdrop{background:#102a3a80}
.ops-export-form{display:flex;flex-direction:column;gap:0}
.ops-export-head{padding:22px 24px 16px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #e1e8ec}
.ops-export-head span{font-size:10px;letter-spacing:.1em;color:#087f78;font-weight:900}.ops-export-head h2{margin:4px 0 5px;font-size:20px}.ops-export-head p{margin:0;color:#60798b;font-size:12px}
.ops-export-close{border:0;background:transparent;color:#64798a;font-size:24px;cursor:pointer}
.ops-export-fields-toolbar{display:flex;gap:12px;align-items:center;padding:15px 24px 6px;flex-wrap:wrap}
.ops-export-fields-toolbar strong{font-size:13px}.ops-export-fields-toolbar span{color:#6a7d8b;font-size:12px;margin-right:auto}
.ops-export-text-btn{border:0;background:transparent;color:#047c74;font-weight:750;cursor:pointer;font-size:12px}
.ops-export-fields{padding:12px 24px 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ops-export-fields label{display:flex;align-items:center;gap:9px;border:1px solid #e4ebee;border-radius:9px;padding:11px;font-size:12px;font-weight:650;cursor:pointer}
.ops-export-fields input{accent-color:#087f78;width:16px;height:16px;flex-shrink:0}
.ops-export-note{background:#f4f8f9;padding:12px 16px;margin:0 24px 14px;border-radius:8px;color:#566c7c;font-size:12px}
.ops-export-form footer{padding:14px 24px;border-top:1px solid #e3ebed;display:flex;justify-content:flex-end;gap:10px}
@media(max-width:620px){.ops-export-fields{grid-template-columns:1fr}.ops-export-fields-toolbar{gap:8px}}

/* V25.7.2 — Compact enrollment token management. */
.ops-enrollment-page{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:12px;height:auto;min-height:0}
.ops-enrollment-page>.ops-page-head{margin-bottom:0;padding-bottom:4px}
.ops-enrollment-workbench{padding:0!important;overflow:hidden;flex-shrink:0}
.ops-enrollment-tabs{display:flex;gap:5px;padding:12px 16px 0;border-bottom:1px solid #e2eaee;background:#fcfdfd}
.ops-enrollment-tabs button{padding:11px 18px;border:0;border-bottom:3px solid transparent;background:transparent;color:#64788a;font-size:13px;font-weight:750;cursor:pointer}
.ops-enrollment-tabs button.active{color:#067d76;border-bottom-color:#07877b}
.ops-token-form-panel{padding:16px 20px 18px}
.ops-token-form-panel[hidden]{display:none!important}
.ops-token-form-head strong{font-size:15px;color:#143448}
.ops-token-form-head p{font-size:12px;color:#677b88;margin:4px 0 14px}
.ops-token-form-inline{display:grid;grid-template-columns:minmax(160px,280px) minmax(150px,220px) auto;align-items:end;gap:12px;max-width:960px}
.ops-token-form-inline label{display:grid;gap:6px;min-width:0}
.ops-token-form-inline label span{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#587080;font-weight:850}
.ops-token-form-inline select,.ops-token-form-inline input{border:1px solid #d3e0e6;border-radius:9px;background:#fff;min-width:0;width:100%;height:42px;padding:0 12px;font:inherit;color:#193648}
.ops-token-form-inline .ops-button{height:42px;white-space:nowrap}
.ops-token-form-inline:has(.ops-token-agent-choice){grid-template-columns:minmax(230px,430px) minmax(150px,220px) auto}
.ops-enrollment-list-card{padding:0!important;min-height:0;flex:0 0 auto}
.ops-enrollment-list-card .ops-card-head{padding:16px 20px 12px!important}
.ops-token-history-header{display:flex;justify-content:space-between;align-items:center;gap:10px}
.ops-token-history-header small{font-size:11px;color:#758795}
.ops-token-filters.v2572{display:flex;align-items:center;gap:10px;padding:10px 20px 14px;margin:0;flex-wrap:wrap;border-top:1px solid #e8edef}
.ops-token-filters.v2572 select,.ops-token-filters.v2572 input{height:38px;background:#fff;border:1px solid #d5e2e8;border-radius:8px;padding:0 12px;color:#234156;font:inherit}
.ops-token-filters.v2572 input{flex:1;min-width:200px;max-width:440px}
.ops-token-filters.v2572 .ops-button{height:38px}
.ops-enrollment-list-card .ops-table-shell{max-height:min(360px,40vh)}
@media(max-width:770px){.ops-token-form-inline,.ops-token-form-inline:has(.ops-token-agent-choice){grid-template-columns:1fr}.ops-token-history-header small{display:none}.ops-enrollment-tabs button{flex:1;padding:10px 5px}}

/* V25.7.1-based UI consistency: responsive icon alignment for shared Devices/Đã thu hồi. */
.ops-devices-page .ops-page-head-actions .ops-button,
.ops-devices-page .ops-title-with-icon,
.ops-enrollment-page .ops-button {display:inline-flex;align-items:center;justify-content:center;gap:8px}
.ops-devices-page .ops-page-head-actions .ops-button svg,
.ops-devices-page .ops-tree-glyph svg {display:block;flex:0 0 auto;stroke:currentColor;fill:none}
.ops-devices-page .ops-page-head-actions .ops-button svg {width:17px;height:17px}
.ops-devices-page .ops-tree-node {min-width:0;align-items:center}
.ops-devices-page .ops-tree-node > span:not(.ops-tree-glyph) {min-width:0;overflow:hidden;text-overflow:ellipsis}
.ops-warehouse-page .ops-device-table td {vertical-align:middle}
.ops-warehouse-page .ops-device-table td:nth-child(7){max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-warehouse-page .ops-device-table .ops-device-primary {min-width:160px}
.ops-enrollment-page .ops-enrollment-list-card {margin-top:12px}
.ops-devices-page .ops-export-trigger {white-space:nowrap}
@media(max-width:950px){.ops-warehouse-page .ops-device-table-shell{overflow-x:auto}.ops-warehouse-page .ops-device-table{min-width:900px}}

/* V25.7.5 — Bộ chọn quyền không bị che và hộp xuất Excel gọn.
   Quyền chức năng, phạm vi xem và phạm vi xuất có vùng cuộn độc lập. */
.ops-user-dialog:not(.small) .ops-dialog-card{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 28px)!important;height:min(900px,calc(100dvh - 28px))!important;overflow:hidden!important}
.ops-user-dialog .ops-user-dialog-head{flex:0 0 auto!important}
.ops-user-dialog .ops-user-form-body{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;gap:10px!important;padding:12px 16px!important}
.ops-user-dialog .ops-user-access-editor{display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(0,.85fr)!important;gap:12px!important;flex:none!important;min-height:360px!important;height:min(515px,65vh)!important}
.ops-user-dialog .ops-access-panel{min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.ops-user-dialog .ops-permission-panel{grid-column:1!important;grid-row:1 / span 2!important}
.ops-user-dialog .ops-scope-panel{grid-column:2!important;grid-row:1!important}
.ops-user-dialog .ops-export-scope-panel{grid-column:2!important;grid-row:2!important;min-height:125px!important}
.ops-user-dialog .ops-permission-groups{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:max-content!important;gap:9px!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:start!important;padding:10px!important}
.ops-user-dialog .ops-permission-groups fieldset{min-width:0!important;padding:10px!important}
.ops-user-dialog .ops-permission-groups label{font-size:11px!important;line-height:1.4!important;min-height:30px!important;padding:5px!important}
.ops-user-dialog .ops-scope-tree,.ops-user-dialog .ops-export-scope-list{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:7px!important}
.ops-user-dialog .ops-export-scope-list label{display:flex;align-items:center;gap:8px;padding:6px 5px 6px calc(5px + var(--depth)*12px);font-size:11px;cursor:pointer}
.ops-user-dialog .ops-export-scope-list label:hover{background:#f1f7f8}
.ops-user-dialog .ops-user-form>footer{flex:0 0 auto!important;position:relative!important;z-index:2!important;border-top:1px solid #dce5e9!important;background:#fff!important}
.ops-export-dialog{width:min(850px,calc(100vw - 32px));overflow:hidden;max-height:calc(100dvh - 40px)}
.ops-export-form{max-height:calc(100dvh - 40px);overflow:hidden}
.ops-export-scroll{overflow-y:auto;min-height:0;padding:14px 20px}
.ops-export-title{display:grid;gap:6px;font-size:12px;font-weight:750}
.ops-export-title input{border:1px solid #cbd8de;border-radius:9px;height:38px;padding:0 12px;max-width:100%;font:inherit}
.ops-export-title-info{font-size:11px;color:#617785;margin-top:6px}
.ops-export-units-panel{margin-top:12px;padding:0 0 10px;border:1px solid #e1e9ed;border-radius:10px}
.ops-export-fields-toolbar{padding:12px 12px 7px!important}
.ops-export-units{padding:5px 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:125px;overflow-y:auto}
.ops-export-units label{display:flex;align-items:center;gap:8px;padding:5px 8px;background:#f5f9fa;border-radius:7px;font-size:12px;cursor:pointer}
.ops-export-fields{padding:6px 0 12px!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.ops-export-fields label{padding:8px!important;font-size:11px!important}
.ops-export-note{margin:0!important}
@media(max-width:900px){.ops-user-dialog .ops-user-access-editor{height:auto!important;display:flex!important;flex-direction:column!important}.ops-user-dialog .ops-permission-groups{max-height:320px!important}.ops-user-dialog .ops-scope-tree,.ops-user-dialog .ops-export-scope-list{max-height:190px!important}.ops-export-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.ops-export-fields,.ops-export-units{grid-template-columns:1fr!important}}

/* V25.7.5: lịch sử chẩn đoán tách khỏi kết quả hiện tại; không tạo thêm tiến trình Agent. */
.ops-diagnostic-history{border:1px solid #dce5e9;border-radius:10px;margin-top:12px;padding:12px;background:#f8fbfc;display:grid;gap:8px}
.ops-diagnostic-history[hidden]{display:none!important}
.ops-diagnostic-history strong{font-size:12px;color:#173e4e}
.ops-diagnostic-history select{height:36px;border-radius:8px;border:1px solid #ccdce2;padding:0 9px;min-width:0;max-width:100%}
.ops-diagnostic-history-output{white-space:pre-wrap;overflow:auto;max-height:185px;font-size:11px;line-height:1.5;padding:10px;border-radius:8px;background:#eaf2f5;color:#1b3a49}


/* V25.7.5.2 — Popup xuất Excel: 2 cột gọn, checkbox tối giản, lỗi hiển thị rõ.
   Chỉ áp dụng cho hộp xuất; không ảnh hưởng CSS các trang quản trị khác. */
.ops-export-dialog{width:min(1040px,calc(100vw - 32px))!important;max-height:calc(100dvh - 36px)!important;overflow:hidden!important;border-radius:15px!important}
.ops-export-dialog .ops-export-form{display:flex!important;flex-direction:column!important;max-height:calc(100dvh - 36px)!important;min-height:0!important;overflow:hidden!important}
.ops-export-dialog .ops-export-head{flex:0 0 auto;padding:16px 22px 13px!important;gap:16px;align-items:center}
.ops-export-dialog .ops-export-head h2{font-size:21px!important;line-height:1.25!important;margin:3px 0 3px!important}
.ops-export-dialog .ops-export-head p{font-size:12px!important;line-height:1.5}
.ops-export-dialog .ops-export-close{display:grid;place-items:center;width:34px;height:34px;border:1px solid #d9e4e7;border-radius:9px;background:#fff;font-size:22px;line-height:1;flex:0 0 auto}
.ops-export-dialog .ops-export-close:hover{background:#f1f6f7}
.ops-export-dialog .ops-export-body{display:grid;grid-template-columns:minmax(280px,.93fr) minmax(0,1.5fr);gap:0;flex:1 1 auto;min-height:0;overflow:hidden}
.ops-export-dialog .ops-export-sidebar,.ops-export-dialog .ops-export-main{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:17px 19px 20px}
.ops-export-dialog .ops-export-sidebar{border-right:1px solid #e0e8eb;background:#f9fbfc;display:flex;flex-direction:column}
.ops-export-dialog .ops-export-main{background:#fff}
.ops-export-dialog .ops-export-title{font-size:12px;font-weight:750;gap:7px}
.ops-export-dialog .ops-export-title input{width:100%;height:39px;font-size:12px;font-weight:650;background:#fff}
.ops-export-dialog .ops-export-title-info{font-size:11px;line-height:1.5;margin:7px 0 15px}
.ops-export-dialog .ops-export-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}
.ops-export-dialog .ops-export-section-heading strong{font-size:13px;font-weight:850;color:#173e50}
.ops-export-dialog .ops-export-section-heading span{font-size:11px;color:#587280;white-space:nowrap}
.ops-export-dialog .ops-export-unit-search{height:36px;width:100%;padding:0 10px;border:1px solid #cddde2;border-radius:8px;background:#fff;color:#1b3a48;font-size:12px}
.ops-export-dialog .ops-export-actions{display:flex;gap:13px;align-items:center;justify-content:flex-end;margin:7px 0 9px}
.ops-export-dialog .ops-export-text-btn{padding:3px 0!important;font-size:11px!important;font-weight:750;color:#087d77}
.ops-export-dialog .ops-export-text-btn:hover{text-decoration:underline}
.ops-export-dialog .ops-export-units{display:flex!important;flex-direction:column!important;gap:1px!important;max-height:none!important;overflow:visible!important;padding:0!important}
.ops-export-dialog .ops-export-unit-option{display:flex;align-items:center;gap:8px;padding:7px 5px;background:transparent!important;border-radius:5px;font-size:12px;cursor:pointer;min-height:32px}
.ops-export-dialog .ops-export-unit-option:hover{background:#eaf2f4!important}
.ops-export-dialog .ops-export-unit-option[hidden]{display:none!important}
.ops-export-dialog .ops-export-unit-option span{min-width:0;overflow-wrap:anywhere}
.ops-export-dialog input[type=checkbox]{accent-color:#087f78;width:15px;height:15px;flex:0 0 15px;cursor:pointer;margin:0}
.ops-export-dialog .ops-export-main>.ops-export-actions{justify-content:flex-start;margin-top:-3px;margin-bottom:12px}
.ops-export-dialog .ops-export-fields{padding:0!important;display:block!important}
.ops-export-dialog .ops-export-field-group{min-width:0;border:0;border-top:1px solid #e7edef;border-radius:0;padding:12px 0 13px;margin:0}
.ops-export-dialog .ops-export-field-group legend{font-size:12px;font-weight:850;letter-spacing:.01em;color:#234a5b;padding-right:10px}
.ops-export-dialog .ops-export-field-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px 10px}
.ops-export-dialog .ops-export-field-list label{display:flex;align-items:center;gap:9px;min-width:0;padding:7px 5px!important;border:0!important;border-radius:5px!important;background:transparent;font-weight:550!important;font-size:12px!important;line-height:1.35;cursor:pointer;min-height:31px}
.ops-export-dialog .ops-export-field-list label:hover{background:#f1f7f8}
.ops-export-dialog .ops-export-field-list span{overflow-wrap:anywhere}
.ops-export-dialog .ops-export-error:not([hidden]){flex:0 0 auto;margin:0;padding:11px 22px;background:#fff2ef;border-top:1px solid #ffd3c8;color:#9c372d;font-weight:600;font-size:12px;line-height:1.45;max-height:110px;overflow:auto}
.ops-export-dialog .ops-export-footer{flex:0 0 auto;display:flex;justify-content:space-between!important;align-items:center;gap:14px;padding:12px 20px!important;border-top:1px solid #dbe5e8;background:#fff}
.ops-export-dialog .ops-export-footer-summary{color:#5d7280;font-size:12px;font-weight:650}
.ops-export-dialog .ops-export-footer-buttons{display:flex;align-items:center;gap:9px;flex:0 0 auto}
.ops-export-dialog .ops-export-footer button{min-height:38px}
.ops-export-dialog .ops-export-footer button:disabled{cursor:wait;opacity:.65}
@media(max-width:760px){.ops-export-dialog .ops-export-body{display:block;overflow-y:auto}.ops-export-dialog .ops-export-sidebar,.ops-export-dialog .ops-export-main{overflow:visible;padding:14px 16px}.ops-export-dialog .ops-export-sidebar{border-right:0;border-bottom:1px solid #e1e9ec}.ops-export-dialog .ops-export-field-list{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-export-dialog .ops-export-footer{flex-wrap:wrap}}
@media(max-width:430px){.ops-export-dialog .ops-export-field-list{grid-template-columns:1fr}.ops-export-dialog .ops-export-head{padding:14px!important}.ops-export-dialog .ops-export-footer{padding:10px 13px!important}}


/* ======================================================================
   V25.7.6 — Giao diện cấp quyền và cây xuất Excel.
   Các phần dùng chung chiều cao thực tế, không có ô cấp quyền xuất riêng.
   ====================================================================== */
.ops-user-dialog:not(.small){width:min(1210px,calc(100vw - 24px))!important}
.ops-user-dialog:not(.small) .ops-dialog-card{height:min(830px,calc(100dvh - 24px))!important;max-height:calc(100dvh - 24px)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
.ops-user-dialog .ops-user-form-body{display:grid!important;grid-template-columns:minmax(0,1.38fr) minmax(300px,1fr)!important;grid-template-rows:auto auto minmax(0,1fr) auto auto!important;gap:10px 14px!important;overflow:hidden!important;min-height:0!important;flex:1 1 auto!important;align-content:stretch!important;padding:12px 16px!important}
.ops-user-dialog .ops-user-identity-card{grid-column:1!important;grid-row:1!important;min-width:0!important}
.ops-user-dialog .ops-user-identity-card .ops-user-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.ops-user-dialog .ops-user-identity-card.compact .ops-user-form-grid.one{grid-template-columns:minmax(0,1fr)!important}
.ops-user-dialog .ops-user-quick-switches{grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;min-width:0!important}
.ops-user-dialog .ops-admin-switch{grid-column:auto!important;grid-row:auto!important;display:flex!important;min-width:0!important;min-height:62px!important;align-items:center!important;padding:9px 10px!important;gap:8px!important;overflow:hidden!important}
.ops-user-dialog .ops-admin-switch>span{flex:1 1 auto!important;min-width:0!important}
.ops-user-dialog .ops-admin-switch small{font-size:10px!important;line-height:1.3!important}
.ops-user-dialog .ops-admin-switch em{display:none!important}
.ops-user-dialog .ops-user-access-editor{display:contents!important;height:auto!important;min-height:0!important;flex:none!important}
.ops-user-dialog .ops-user-access-editor[hidden]{display:none!important}
.ops-user-dialog .ops-permission-panel{grid-column:1!important;grid-row:3!important;min-height:0!important;height:auto!important;display:flex!important;flex-direction:column!important}
.ops-user-dialog .ops-scope-panel{grid-column:2!important;grid-row:1 / span 3!important;min-height:0!important;height:auto!important;display:flex!important;flex-direction:column!important}
.ops-user-dialog .ops-permission-toolbar{flex:0 0 auto!important;padding:8px 11px!important;background:#f9fbfc;border-bottom:1px solid #e7edef}
.ops-user-dialog .ops-permission-toolbar label{font-size:11px;font-weight:700;display:flex;align-items:center;gap:8px;cursor:pointer}
.ops-user-dialog .ops-permission-groups{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:max-content!important;align-content:start!important;gap:8px!important;padding:10px!important}
.ops-user-dialog .ops-permission-groups fieldset{min-width:0!important;padding:9px!important;min-height:0!important;display:grid!important;gap:4px!important}
.ops-user-dialog .ops-permission-groups label{font-size:11px!important;min-height:26px!important;padding:4px 3px!important;align-items:flex-start!important}
.ops-user-dialog .ops-permission-groups label[hidden],.ops-user-dialog .ops-permission-groups fieldset[hidden]{display:none!important}
.ops-user-dialog .ops-scope-descendants{flex:0 0 auto!important}
.ops-user-dialog .ops-scope-search{flex:0 0 auto!important}
.ops-user-dialog .ops-scope-tree{flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow-y:auto!important;overflow-x:hidden!important;padding:5px 7px!important}
.ops-user-dialog .ops-scope-node{display:flex;align-items:center;gap:3px;min-width:0;padding:0 4px 0 calc(4px + var(--depth)*16px);min-height:31px;border-radius:6px}
.ops-user-dialog .ops-scope-node:hover{background:#eff7f8}
.ops-user-dialog .ops-scope-node[hidden]{display:none!important}
.ops-user-dialog .ops-tree-expand{width:20px;height:25px;border:0;background:transparent;color:#537383;cursor:pointer;padding:0;flex:0 0 20px;font-size:14px}
.ops-user-dialog .ops-tree-expand.is-leaf{visibility:hidden}
.ops-user-dialog .ops-scope-row{min-width:0!important;display:flex!important;align-items:center!important;flex:1 1 auto!important;gap:7px!important;padding:3px 2px!important;cursor:pointer;font-size:11px!important}
.ops-user-dialog .ops-scope-row span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-user-dialog .ops-scope-row small{white-space:nowrap;font-size:9px;color:#6c8795}
.ops-user-dialog .ops-mfa-confirm{grid-column:1!important;grid-row:4!important}
.ops-user-dialog .ops-admin-confirm{grid-column:1!important;grid-row:5!important}
.ops-user-dialog .ops-admin-confirm[hidden],.ops-user-dialog .ops-mfa-confirm[hidden]{display:none!important}
.ops-user-dialog .ops-user-form>footer{flex:0 0 auto!important;position:relative!important;z-index:3!important}
/* Tổ tiên ngoài phạm vi vẫn có dòng riêng và chỉ hiển thị dấu chọn một phần. */
.ops-export-dialog .ops-export-unit-node{display:flex;align-items:center;min-height:33px;gap:3px;padding:1px 2px 1px calc(2px + var(--depth)*14px);border-radius:6px;min-width:0}
.ops-export-dialog .ops-export-unit-node:hover{background:#eaf2f4}
.ops-export-dialog .ops-export-unit-node[hidden]{display:none!important}
.ops-export-dialog .ops-export-expand{width:21px;height:28px;flex:0 0 21px;padding:0;border:0;background:transparent;color:#497384;font-size:14px;cursor:pointer}
.ops-export-dialog .ops-export-expand:disabled{opacity:.32;cursor:default}
.ops-export-dialog .ops-export-unit-node .ops-export-unit-option{flex:1 1 auto;min-width:0;min-height:30px!important;padding:3px 2px!important;font-size:12px!important}
.ops-export-dialog .ops-export-context-node{display:flex;align-items:center;gap:8px;font-size:11px;color:#607886;min-width:0;overflow-wrap:anywhere}
.ops-export-dialog .ops-export-context-check{width:15px;flex:0 0 15px;color:#158378;font-size:17px;line-height:1}
@media(max-width:890px){
 .ops-user-dialog .ops-user-form-body{display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important}
 .ops-user-dialog .ops-user-access-editor{display:flex!important;flex-direction:column!important}
 .ops-user-dialog .ops-user-access-editor[hidden]{display:none!important}
 .ops-user-dialog .ops-scope-panel{order:0!important;flex:0 0 auto!important;max-height:300px}
 .ops-user-dialog .ops-permission-panel{order:1!important;flex:0 0 auto!important;max-height:360px}
 .ops-user-dialog .ops-user-quick-switches{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .ops-user-dialog .ops-permission-groups{max-height:260px!important}
 .ops-user-dialog .ops-scope-tree{max-height:200px!important}
}
@media(max-width:480px){.ops-user-dialog .ops-user-quick-switches{grid-template-columns:1fr!important}.ops-user-dialog .ops-permission-groups{grid-template-columns:1fr!important}}

/* V25.7.6.1: Ghi rõ điều kiện cấp quyền Xuất Excel Đã thu hồi ở nhóm chức năng. */
.ops-user-dialog .ops-permission-dependency-note{margin:4px 0 0;padding:7px 8px;border-radius:7px;background:#f0f7fa;color:#446171;font-size:10px;line-height:1.5;grid-column:1/-1}

/* Cảnh báo quyền xuất mồ côi từ dữ liệu SQL cũ; không âm thầm nâng quyền. */
.ops-user-dialog .ops-permission-warning{padding:9px 11px;border:1px solid #f0c991;border-radius:9px;background:#fff8ed;color:#76501a;font-size:11px;font-weight:600;line-height:1.5}
.ops-user-dialog .ops-permission-warning[hidden]{display:none!important}

/* V25.7.6.3: banner là một hàng grid thật, không còn ép vào hàng nội dung.
   Không đổi grid khi không chuyển giao để giữ nguyên bố cục trang cũ. */
.ops-device-page.has-transfer-progress{
  padding:0;gap:0;
  grid-template-rows:78px auto 46px minmax(0,1fr);
}
.ops-transfer-progress{
  display:flex;align-items:flex-start;gap:11px;
  min-width:0;min-height:0;margin:9px 16px 8px;padding:11px 14px;
  border:1px solid #edc886;border-radius:10px;
  background:#fff9ec;color:#684711;
  font-size:12px;line-height:1.5;box-sizing:border-box;
}
.ops-transfer-progress[hidden]{display:none!important}
.ops-transfer-progress-icon{
  display:grid;place-items:center;flex:0 0 28px;
  width:28px;height:28px;border-radius:8px;
  background:#fff0cc;color:#a76a10;
}
.ops-transfer-progress-icon svg{
  width:17px;height:17px;fill:none;stroke:currentColor;
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.ops-transfer-progress-body{
  display:flex;flex-direction:column;gap:2px;
  min-width:0;flex:1 1 auto;overflow-wrap:anywhere;
}
.ops-transfer-progress-body strong{font-size:13px;font-weight:750;line-height:1.4}
.ops-transfer-progress-body>span{font-size:12px;font-weight:500;line-height:1.5}
.ops-transfer-progress[data-state="failed"]{
  border-color:#efb4b4;background:#fff2f2;color:#8d2424;
}
.ops-transfer-progress[data-state="failed"] .ops-transfer-progress-icon{
  color:#b42318;background:#ffe2e0;
}
/* Các điểm ngắt này phải khớp với chiều cao header/tab đang dùng của trang chi tiết. */
@media (max-height:800px) and (min-width:901px){
  .ops-device-page.has-transfer-progress{grid-template-rows:68px auto 42px minmax(0,1fr)}
}
@media (max-width:620px){
  .ops-device-page.has-transfer-progress{grid-template-rows:70px auto 42px minmax(0,1fr)}
  .ops-transfer-progress{margin:8px 10px;padding:10px;gap:8px}
  .ops-transfer-progress-icon{width:24px;height:24px;flex-basis:24px}
  .ops-transfer-progress-body strong{font-size:11px}
  .ops-transfer-progress-body>span{font-size:10px}
}
@media print{
  .ops-device-page.has-transfer-progress{grid-template-rows:78px auto 46px auto}
}


/* =========================================================
   V25.7.6.5 - PENDING APPROVAL + DEVICE INFO UI POLISH
   - Phê duyệt Agent không còn chọn đơn vị thủ công trong popup.
   - Ô Thông tin người dùng & thiết bị tăng chiều cao để không cắt chữ.
   ========================================================= */
.ops-dialog-note{
  margin:2px 0 0;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(15,118,110,.16);
  background:rgba(15,118,110,.06);
  color:#115e59;
  font-size:13px;
  line-height:1.5;
}

@media(min-width:901px){
  .ops-info-card.v252 .ops-kv.v231.v252{
    grid-template-rows:repeat(5,minmax(42px,auto))!important;
    gap:6px 8px!important;
    padding:8px 10px 10px!important;
    overflow:visible!important;
  }

  .ops-info-card.v252 .ops-kv.v231.v252>div{
    min-height:42px!important;
    padding:7px 10px 8px!important;
    overflow:visible!important;
    justify-content:flex-start!important;
  }

  .ops-info-card.v252 .ops-kv.v231.v252>div.wide,
  .ops-info-card.v252 .ops-kv.v231.v252>div:nth-child(9),
  .ops-info-card.v252 .ops-kv.v231.v252>div:nth-child(10){
    min-height:48px!important;
  }

  .ops-info-card.v252 .ops-kv.v231.v252 dt{
    font-size:10px!important;
    line-height:1.3!important;
  }

  .ops-info-card.v252 .ops-kv.v231.v252 dd{
    margin:3px 0 0 24px!important;
    max-width:calc(100% - 24px)!important;
    min-height:16px!important;
    font-size:12px!important;
    line-height:1.35!important;
    display:block!important;
    -webkit-line-clamp:unset!important;
    overflow:visible!important;
  }
}


/* V25.7.6.7: Xóa thiết bị đã thu hồi - quyền riêng, không thay đổi layout trang Thiết bị. */
.ops-warehouse-delete-button {
  background:#fff5f5; border:1px solid #fecaca; color:#b42318;
  font:inherit; font-size:12px; font-weight:700; border-radius:8px;
  padding:7px 12px; cursor:pointer; transition:background .15s;
}
.ops-warehouse-delete-button:hover {background:#fee2e2;}
.ops-warehouse-delete-button:focus-visible {outline:2px solid #b42318;outline-offset:2px;}
.ops-warehouse-page .ops-device-table th:nth-child(8),
.ops-warehouse-page .ops-device-table td:nth-child(8),
.ops-warehouse-page .ops-device-table th:nth-child(9),
.ops-warehouse-page .ops-device-table td:nth-child(9) {
  position:static!important;right:auto!important;min-width:0!important;width:auto!important;
  box-shadow:none!important;
}
.ops-warehouse-page .ops-device-table th.ops-col-delete,
.ops-warehouse-page .ops-device-table td:last-child {min-width:78px!important;text-align:center;}
.ops-warehouse-page[data-can-warehouse-delete="true"] .ops-device-table {min-width:1130px;}
.ops-warehouse-delete-dialog .ops-dialog-card {max-width:480px;}
.ops-warehouse-delete-dialog .ops-dialog-card p {line-height:1.6;}
.ops-warehouse-delete-dialog .ops-dialog-card label input {text-transform:uppercase;}
.ops-delete-error {color:#b42318!important;background:#fff2f2;padding:8px 10px;border-radius:8px;}


/* ============================================================================
   V25.7.6.8 - DEVICE DETAILS / SYSTEM INFO TILES
   Scope: only the 10 user/device summary tiles in tab Tong quan.
   Reason: CSS hotfix V25.7.6.5 changed to overflow:visible and min-height:48px
   while the card still had five constrained grid rows: text could touch/escape
   borders and the last line could be cropped. Keep 2 columns x 5 rows.
   ============================================================================ */
@media (min-width:901px){
  .ops-info-card.v252{
    grid-template-rows:auto minmax(0,1fr);
    overflow:hidden!important;
  }
  .ops-info-card.v252 .ops-kv.v231.v252{
    box-sizing:border-box;
    height:100%!important;
    min-height:0!important;
    grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr)!important;
    grid-template-rows:repeat(5,minmax(0,1fr))!important;
    gap:5px 7px!important;
    padding:6px 9px 8px!important;
    align-content:stretch!important;
    overflow:hidden!important;
  }
  .ops-info-card.v252 .ops-kv.v231.v252>div,
  .ops-info-card.v252 .ops-kv.v231.v252>div:nth-child(9),
  .ops-info-card.v252 .ops-kv.v231.v252>div:nth-child(10){
    box-sizing:border-box;
    min-width:0!important;
    min-height:0!important;
    max-height:100%;
    padding:3px 8px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  /* 'wide' is a presentation hint only: do not span across both columns. */
  .ops-info-card.v252 .ops-kv.v231.v252>div.wide{
    grid-column:auto!important;
  }
  .ops-info-card.v252 .ops-kv.v231.v252 dt{
    min-width:0;
    min-height:0!important;
    flex:0 0 auto;
    font-size:10px!important;
    line-height:1.35!important;
  }
  .ops-info-card.v252 .ops-kv.v231.v252 dd{
    box-sizing:border-box;
    min-width:0;
    min-height:0!important;
    max-width:calc(100% - 24px)!important;
    margin:2px 0 0 24px!important;
    flex:0 1 auto;
    color:var(--text);
    font-size:11.5px!important;
    font-weight:700;
    line-height:1.35!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    overflow:hidden!important;
  }
}
/* If the left column is narrow, keep the complete SMBIOS UUID readable on
   one line rather than letting its second line be cropped. */
.ops-info-card.v252{container-type:inline-size}
@container (max-width:580px){
  .ops-info-card.v252 .ops-kv.v231.v252>div:nth-child(10) dd{
    font-size:10px!important;
    letter-spacing:-.15px;
    margin-left:18px!important;
    max-width:calc(100% - 18px)!important;
  }
}
/* Short screens: let the overview page scroll as a whole, never put a separate
   scrollbar inside the system-info card. Hardware and diagnostics are intact. */
@media (min-width:901px) and (max-height:700px){
  .ops-device-tab[data-panel="overview"]{overflow-y:auto!important;overflow-x:hidden!important}
  .ops-device-tab[data-panel="overview"] .ops-overview-layout.v252{
    height:auto!important;
    min-height:630px!important;
    overflow:visible!important;
  }
}

/* V25.7.6.10: Nhận diện đơn vị tạm ẩn còn thiết bị, không che thiết bị khỏi cây tra cứu. */
.ops-tree-node.org-inactive .ops-tree-glyph{color:#a66e26!important;background:#fff5e7!important}
.ops-tree-node.org-inactive .ops-org-hidden-tag{display:inline-block;margin-left:5px;padding:1px 5px;border-radius:5px;background:#fff1da;color:#91601e;font-size:9px;font-weight:700;vertical-align:middle}
.ops-unit-hidden-inline{display:inline-block;margin-left:5px;color:#996622;font-size:10px;font-weight:700;white-space:nowrap}
