/* ==========================================================
   vQuantAi Admin center — Microsoft 365 / Fluent style
   ========================================================== */
:root {
    --brand: #0A1F44;          /* tenant theme: vQuantAi navy */
    --brand-2: #13306A;
    --accent: #0F6CBD;         /* Fluent communication blue */
    --accent-hover: #115EA3;
    --accent-press: #0F548C;
    --accent-soft: #EBF3FC;
    --accent-line: #B4D6FA;
    --text: #242424;
    --text-2: #424242;
    --muted: #616161;
    --muted-2: #707070;
    --line: #E0E0E0;
    --line-2: #D1D1D1;
    --bg: #F5F5F5;
    --nav-bg: #FAFAFA;
    --card: #FFFFFF;
    --hover: #F5F5F5;
    --sel: #EBF3FC;
    --red: #C50F1F;
    --red-soft: #FDF3F4;
    --green: #107C10;
    --amber: #BC4B09;
    --violet: #5B5FC7;
    --radius: 4px;
    --radius-lg: 8px;
    --shadow-2: 0 0 2px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .14);
    --shadow-4: 0 0 2px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .14);
    --shadow-16: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .14);
    --font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    --suite-h: 48px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3 { font-family: var(--font); color: var(--text); margin: 0; font-weight: 600; letter-spacing: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }

/* ---------- Buttons (Fluent) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; font: 600 14px/20px var(--font); padding: 5px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; text-decoration: none !important; transition: background .1s, border-color .1s; white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: #C7C7C7; color: var(--text); }
.btn:active { background: #E0E0E0; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; border-color: transparent; }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { background: #fff; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--line-2); }
.btn-danger:hover { background: var(--red-soft); border-color: #EEACB2; color: var(--red); }
.btn-sm { min-height: 24px; padding: 2px 8px; font-size: 12px; font-weight: 400; line-height: 16px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.f { display: block; margin-bottom: 16px; }
.f > span { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.f input, .f select, .f textarea, .search { width: 100%; font: inherit; font-size: 14px; color: var(--text); min-height: 32px; padding: 5px 10px; border: 1px solid var(--line-2); border-bottom-color: #616161; border-radius: var(--radius); background: #fff; transition: border-color .1s; }
.f textarea { resize: vertical; line-height: 20px; padding: 6px 10px; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: #C7C7C7; border-bottom-color: #575757; }
.f input:focus, .f select:focus, .f textarea:focus, .search:focus { outline: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.f textarea:focus { padding-bottom: 5px; }
.f input[type=checkbox], .f input[type=file], .f input[type=radio] { width: auto; min-height: 0; padding: 0; border: 0; background: none; }
.f small { display: block; color: var(--red); font-size: 12px; margin-top: 4px; }
.has-err input, .has-err textarea { border-color: var(--red); }
.help { display: block; font-style: normal; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 16px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; vertical-align: middle; }
.alert { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.alert-error { background: #FDF3F4; color: #751D1F; border-color: #EEACB2; }
.alert-error::before { background: var(--red); box-shadow: inset 0 0 0 4px #FDF3F4; }
.alert-ok { background: #F1FAF1; color: #0E4A0E; border-color: #9FD89F; }
.alert-ok::before { background: var(--green); box-shadow: inset 0 0 0 4px #F1FAF1; }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--brand-2), var(--brand)); color: #B9C6DE; display: flex; flex-direction: column; justify-content: center; padding: 48px 8%; }
.auth-side img { width: min(320px, 100%); margin-bottom: 20px; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: #fff; padding: 44px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.auth-card h1 { font-size: 24px; line-height: 32px; margin-bottom: 4px; }
.auth-card > p { margin: 0 0 24px; }
.auth-card .btn-block { margin-top: 8px; min-height: 36px; }
.auth-back { margin-top: 24px; color: var(--muted); font-size: 13px; }

/* ---------- Suite header ---------- */
.suite { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--suite-h); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 0; background: var(--brand); color: #fff; }
.suite-brand { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 16px; color: #fff; text-decoration: none !important; }
.suite-brand img { width: 96px; }
.suite-app { font-size: 16px; font-weight: 600; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .35); line-height: 20px; color: #fff; white-space: nowrap; }
.suite-search { flex: 1; max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; background: #fff; border-radius: var(--radius); color: var(--muted); }
.suite-search svg { width: 16px; height: 16px; }
.suite-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 14px; color: var(--text); background: transparent; min-width: 0; }
.suite-right { display: flex; align-items: center; margin-left: auto; height: 100%; }
.suite-btn { position: relative; display: grid; place-items: center; width: 48px; height: var(--suite-h); color: #fff; background: none; border: 0; cursor: pointer; text-decoration: none !important; }
.suite-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.suite-btn svg { width: 20px; height: 20px; }
.suite-badge { position: absolute; top: 8px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #D13438; color: #fff; font-size: 10px; line-height: 16px; font-weight: 600; text-align: center; }
.suite-me { display: grid; place-items: center; width: 48px; height: var(--suite-h); text-decoration: none !important; }
.suite-me:hover { background: rgba(255, 255, 255, .1); }
.menu-btn { display: none; }

.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #5B5FC7; color: #fff; font-weight: 600; font-size: 13px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; padding-top: var(--suite-h); }
.sidebar { position: fixed; top: var(--suite-h); bottom: 0; left: 0; width: 228px; background: var(--nav-bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 0; z-index: 40; transition: transform .2s ease; overflow-y: auto; }
.side-nav { display: flex; flex-direction: column; padding: 0 4px; }
.side-label { display: block; padding: 16px 12px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.side-nav a, .side-foot a, .side-foot button { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--radius); color: var(--text); font: 400 14px/20px var(--font); text-decoration: none !important; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.side-nav a svg, .side-foot svg { width: 20px; height: 20px; color: var(--text-2); }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: #EBEBEB; color: var(--text); }
.side-nav a.on { background: #fff; font-weight: 600; box-shadow: var(--shadow-2); }
.side-nav a.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.side-nav a.on svg { color: var(--accent); }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; font-weight: 600; text-align: center; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 8px 4px 0; }
.side-foot form { margin: 0; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; }
.side-user b { display: block; font-weight: 600; font-size: 13px; line-height: 18px; }
.side-user small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.scrim { display: none; }

.main { flex: 1; margin-left: 228px; min-width: 0; }
.page-top { padding: 20px 32px 4px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: #9E9E9E; }
.page-top h1 { font-size: 24px; line-height: 32px; font-weight: 600; }
.content { padding: 16px 32px 40px; }

/* ---------- Cards ---------- */
.box { background: var(--card); border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow-4); }
.box h3 { font-size: 16px; line-height: 22px; margin-bottom: 16px; }
.box.flush { padding: 0; overflow: hidden; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.box-head h2 { font-size: 16px; line-height: 22px; }
.box-head small { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; }
.box-head.pad { padding: 16px 24px; margin: 0; border-bottom: 1px solid var(--line); }
.box + .box { margin-top: 16px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 20px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); font-size: 16px; font-weight: 600; }
.empty.sm { padding: 12px 0; }
.empty-ic { width: 40px; height: 40px; color: #9E9E9E; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.page-intro { color: var(--muted); margin: 0 0 20px; max-width: 820px; }

/* ---------- Home / dashboard ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 20px 24px; margin-bottom: 16px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-4); border-left: 4px solid var(--accent); }
.welcome h2 { font-size: 20px; line-height: 28px; margin-bottom: 2px; }
.welcome p { margin: 0; color: var(--muted); }
.welcome b { color: var(--text); }
.welcome-actions { display: flex; gap: 8px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: var(--radius-lg); padding: 16px 20px; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-4); transition: box-shadow .15s; }
a.kpi:hover { box-shadow: var(--shadow-16); color: var(--text); }
.kpi-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); background: var(--kb); color: var(--k); flex: none; }
.kpi-ic svg { width: 20px; height: 20px; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-body small { font-size: 14px; color: var(--muted); }
.kpi-body b { font-size: 28px; font-weight: 600; line-height: 36px; color: var(--text); }
.kpi-body em { font-style: normal; font-size: 12px; line-height: 16px; color: var(--muted); }
.k-blue { --k: #0F6CBD; --kb: #EBF3FC; }
.k-amber { --k: #BC4B09; --kb: #FDF6F3; }
.k-violet { --k: #5B5FC7; --kb: #F1F1FA; }
.k-green { --k: #107C10; --kb: #F1FAF1; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.dash-col, .dash-side { display: grid; gap: 16px; min-width: 0; }
.dash-col .box + .box, .dash-side .box + .box { margin-top: 0; }

.pipeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pipeline a { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; margin-bottom: 4px; }
.pipeline a:hover .pl-label { color: var(--accent); text-decoration: underline; }
.pipeline b { margin-left: auto; font-weight: 600; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; }
.pl-track { display: block; height: 4px; background: #EBEBEB; border-radius: 2px; overflow: hidden; }
.pl-fill { display: block; height: 100%; }
.s-new { background: #0F6CBD; }
.s-read { background: #8A8A8A; }
.s-progress { background: #DA3B01; }
.s-replied { background: #5B5FC7; }
.s-closed { background: #107C10; }

.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #F0F0F0; }
.kv-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-list li:first-child { padding-top: 0; }
.kv-list span { color: var(--muted); }
.kv-list b { font-weight: 600; text-align: right; }
.ellip { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.actions a { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius); color: var(--text); text-decoration: none !important; border: 1px solid var(--line); transition: background .1s, border-color .1s; }
.actions a:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.actions svg { width: 20px; height: 20px; color: var(--accent); }
.actions b { display: block; font-weight: 600; }
.actions small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: var(--radius-lg); padding: 16px 20px; box-shadow: var(--shadow-4); color: var(--text); text-decoration: none !important; }
.stat span { display: block; color: var(--muted); }
.stat b { display: block; font-size: 28px; line-height: 36px; font-weight: 600; }

/* ---------- Status (Fluent badge + dot) ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 13px; font-weight: 400; white-space: nowrap; color: var(--text); background: none; border: 0; }
.pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, #8A8A8A); flex: none; }
.pill-new { --dot: #0F6CBD; font-weight: 600; }
.pill-read { --dot: #8A8A8A; }
.pill-progress { --dot: #DA3B01; }
.pill-replied { --dot: #5B5FC7; }
.pill-closed { --dot: #107C10; }

/* ---------- Command bar & pivots ---------- */
.cmdbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; padding: 4px 8px; margin-bottom: 8px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.cmd-group { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; min-width: 0; }
.cmd { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius); background: none; color: var(--text); font: 400 14px var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.cmd svg { width: 18px; height: 18px; color: var(--accent); }
.cmd:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.cmd:disabled { color: #BDBDBD; cursor: default; }
.cmd:disabled svg { color: #BDBDBD; }
.cmd-danger svg { color: var(--red); }
.cmd-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.sel-info { margin-left: 8px; color: var(--muted); font-size: 13px; }
.cmd-search { display: flex; align-items: center; gap: 6px; width: 280px; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-bottom-color: #616161; border-radius: var(--radius); background: #fff; color: var(--muted); }
.cmd-search:focus-within { border-bottom: 2px solid var(--accent); }
.cmd-search svg { width: 16px; height: 16px; }
.cmd-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; color: var(--text); }

.pivots { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 4px 0 12px; }
.pivots a { position: relative; padding: 8px 10px; color: var(--muted); font-size: 14px; text-decoration: none !important; border-radius: var(--radius); }
.pivots a:hover { color: var(--text); background: #EBEBEB; }
.pivots a.on { color: var(--text); font-weight: 600; }
.pivots a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 2px; background: var(--accent); }
.pivots em { font-style: normal; color: var(--muted); font-weight: 400; margin-left: 2px; }
.pivot-note { margin-left: auto; color: var(--muted); font-size: 13px; }

/* Legacy tabs/toolbar (other pages) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.tabs a { position: relative; padding: 8px 10px; color: var(--muted); text-decoration: none !important; }
.tabs a.on { color: var(--text); font-weight: 600; }
.tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 2px; background: var(--accent); }
.tabs em { font-style: normal; margin-left: 2px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 280px; width: auto; }
.toolbar .push { margin-left: auto; }

/* ---------- Data grid + reading pane ---------- */
.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.grid-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-4); overflow: hidden; min-width: 0; }
.table-wrap { overflow-x: auto; }
.grid, .table { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th, .table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0 12px; height: 40px; border-bottom: 1px solid var(--line); background: #fff; white-space: nowrap; }
.grid td, .table td { padding: 8px 12px; height: 52px; border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
.grid th:first-child, .grid td:first-child, .table th:first-child, .table td:first-child { padding-left: 16px; }
.grid th:last-child, .grid td:last-child, .table th:last-child, .table td:last-child { padding-right: 16px; }
.grid tbody tr, .table tbody tr { cursor: pointer; transition: background .08s; }
.grid tbody tr:hover, .table tbody tr:hover { background: var(--hover); }
.grid tbody tr.is-checked { background: #F5F9FE; }
.grid tbody tr.is-sel { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.grid tbody tr:last-child td, .table tbody tr:last-child td { border-bottom: 0; }
.grid .ck { width: 44px; padding-right: 0; }
.t-name { font-weight: 400; color: var(--text); }
.t-name:hover { color: var(--accent); }
.t-sub { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.t-msg { color: var(--muted); max-width: 360px; }
tr.is-new .t-name { font-weight: 600; }
tr.is-new .t-name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.grid-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 48px; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.reading-pane { position: sticky; top: calc(var(--suite-h) + 16px); max-height: calc(100vh - var(--suite-h) - 32px); overflow-y: auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-4); }
.pane-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 360px; padding: 32px; text-align: center; color: var(--muted); }
.pane-empty b { color: var(--text); font-size: 16px; font-weight: 600; }
.pane-loading { padding: 40px; text-align: center; color: var(--muted); }
.pane-inner { padding: 20px 24px 24px; }
.pane-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pane-title { flex: 1; min-width: 0; }
.pane-title h2 { font-size: 20px; line-height: 28px; overflow-wrap: anywhere; }
.pane-title p { margin: 0; color: var(--muted); font-size: 12px; line-height: 16px; }
.pane-tools { display: flex; gap: 2px; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.pane-cmd { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px 0; margin: 0 -10px 12px; border-bottom: 1px solid var(--line); }
.props { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; margin: 0 0 16px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; overflow-wrap: anywhere; }
.pane-sub { font-size: 14px; font-weight: 600; margin: 20px 0 8px; }
.msg-body { padding: 12px 14px; background: #FAFAFA; border: 1px solid #F0F0F0; border-radius: var(--radius); overflow-wrap: anywhere; line-height: 22px; }
.pane-form { margin-top: 4px; }
.pane-actions { display: flex; gap: 8px; }
.pane-delete { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.page-pane { max-width: 860px; padding: 0; }
.page-pane .pane-inner { padding: 24px 28px 28px; }

.pager-wrap { margin-top: 16px; }
.pagination { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; padding: 0; margin: 0; }
.pagination a { display: block; min-width: 32px; height: 32px; padding: 0 8px; line-height: 32px; text-align: center; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.pagination a:hover { background: var(--hover); }
.pagination .active a { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Legacy recent list */
.recent { list-style: none; margin: 0; padding: 0; }
.r-msg { display: block; color: var(--muted); font-size: 13px; }
.bars { list-style: none; padding: 0; margin: 0; }

/* ---------- Detail pages ---------- */
.detail-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.detail-nav span { display: flex; gap: 6px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.detail-side { display: grid; gap: 16px; }
.detail-side .box + .box { margin-top: 0; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Website content (CMS) ---------- */
.group-title { font-size: 16px; font-weight: 600; margin: 28px 0 12px; }
.group-title:first-of-type { margin-top: 0; }
.section-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sec-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border-radius: var(--radius-lg); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-4); transition: box-shadow .15s; }
.sec-card:hover { box-shadow: var(--shadow-16); color: var(--text); }
.sec-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); flex: none; color: var(--accent); background: var(--accent-soft); }
.sec-main { flex: 1; min-width: 0; }
.sec-main b { display: block; font-weight: 600; }
.sec-main small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-card .pill { font-size: 12px; }

.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.quick span { color: var(--muted); }
.quick a { padding: 4px 10px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line-2); color: var(--text); text-decoration: none; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.f-wide { grid-column: 1 / -1; }
.form-foot { display: flex; gap: 8px; margin: 8px -24px -20px; padding: 12px 24px; border-top: 1px solid var(--line); background: #FAFAFA; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.box.narrow, .narrow-form { max-width: 760px; }
.narrow-form { margin-top: 16px; }

.switch { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; cursor: pointer; color: var(--text); }
.switch input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; width: 40px; height: 20px; border-radius: 10px; border: 1px solid #616161; background: #fff; transition: background .15s, border-color .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #616161; transition: transform .15s, background .15s; }
.switch input:checked + .switch-ui { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--text); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 8px; }

.img-field { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.img-prev { width: 220px; height: 88px; border-radius: var(--radius); border: 1px solid var(--line); display: grid; place-items: center; padding: 12px; background: repeating-conic-gradient(#F0F0F0 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.img-prev.dark { background: var(--brand); border-color: var(--brand); }
.img-prev img { max-height: 100%; max-width: 100%; object-fit: contain; }
.img-actions { display: flex; flex-direction: column; gap: 4px; }
.img-actions input[type=file] { font: inherit; font-size: 13px; }

.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 24px; border-bottom: 1px solid #F0F0F0; }
.items li:hover { background: #FAFAFA; }
.items li:last-child { border-bottom: 0; }
.items li.is-off .it-main, .items li.is-off .it-ic { opacity: .5; }
.move { display: flex; flex-direction: column; gap: 2px; }
.move form { margin: 0; line-height: 0; }
.move button { width: 24px; height: 16px; border: 1px solid var(--line-2); background: #fff; border-radius: 2px; font-size: 8px; color: var(--muted); cursor: pointer; }
.move button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.move button:disabled { opacity: .35; cursor: default; }
.it-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); flex: none; }
.it-ic svg { width: 18px; height: 18px; }
.it-main { flex: 1; min-width: 0; color: var(--text); text-decoration: none !important; }
.it-main:hover { color: var(--text); }
.it-main:hover b { color: var(--accent); text-decoration: underline; }
.it-main b { display: block; font-weight: 600; }
.it-main small { display: block; color: var(--muted); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.it-actions { display: flex; gap: 4px; flex: none; }
.it-actions form { margin: 0; }

.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; }
.icon-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.icon-pick span { display: grid; place-items: center; height: 40px; border-radius: var(--radius); border: 1px solid var(--line-2); background: #fff; color: var(--text-2); cursor: pointer; }
.icon-pick span:hover { background: var(--hover); }
.icon-pick input:checked + span { background: var(--accent-soft); color: var(--accent); border: 2px solid var(--accent); }
.icon-pick input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
    .list-layout { grid-template-columns: minmax(0, 1fr) 360px; }
    .hide-md { display: none; }
}
@media (max-width: 1280px) {
    .actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
    .kpis, .stats { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .detail, .dash-grid { grid-template-columns: 1fr; }
    .list-layout { grid-template-columns: 1fr; }
    .reading-pane { display: none; }
    .list-layout.pane-open .reading-pane { display: block; position: fixed; top: var(--suite-h); right: 0; bottom: 0; width: min(480px, 100%); max-height: none; border-radius: 0; box-shadow: var(--shadow-16); z-index: 45; }
    .suite-search { max-width: 320px; }
}
@media (max-width: 860px) {
    .menu-btn { display: grid; }
    .suite-brand { padding: 0 8px 0 0; }
    .suite-search { display: none; }
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    .sidebar.open { transform: none; box-shadow: var(--shadow-16); }
    .scrim.open { display: block; position: fixed; inset: var(--suite-h) 0 0 0; background: rgba(0, 0, 0, .4); z-index: 30; }
    .main { margin-left: 0; }
    .page-top { padding: 16px 16px 0; }
    .content { padding: 12px 16px 32px; }
    .auth { grid-template-columns: 1fr; }
    .auth-side { padding: 28px 20px; }
    .auth-side img { width: 200px; margin-bottom: 8px; }
    .auth-side p { margin: 0; font-size: 13px; }
    .auth-card { padding: 28px 22px; }
    .hide-sm { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .items li { flex-wrap: wrap; padding: 10px 16px; }
    .it-actions { width: 100%; justify-content: flex-end; }
    .cmd-search { width: 100%; }
    .box-head.pad { padding: 14px 16px; }
}
@media (max-width: 560px) {
    .suite-app { display: none; }
    .kpis, .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .kpi { padding: 14px; gap: 10px; flex-direction: column; }
    .kpi-body b { font-size: 22px; line-height: 28px; }
    .actions { grid-template-columns: 1fr; }
    .hide-xs { display: none; }
    .welcome-actions { width: 100%; }
    .welcome-actions .btn { flex: 1; }
    .cmd span.lbl { display: none; }
}
