:root {
  --ink: #111827;
  --ink-soft: #5f6b7a;
  --muted: #8b95a4;
  --line: #e8ebef;
  --surface: #fff;
  --canvas: #f6f8fb;
  --navy: #17243a;
  --blue: #4268f3;
  --blue-soft: #eef2ff;
  --teal: #0d9f8d;
  --teal-soft: #e7f8f4;
  --amber: #bd7d0c;
  --amber-soft: #fff6df;
  --red: #d4495c;
  --red-soft: #fff0f2;
  --shadow: 0 10px 28px rgba(22, 31, 52, .06);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 1080px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
.eyebrow { font-size: 11px; letter-spacing: .2em; font-weight: 700; color: rgba(255,255,255,.65); }

/* Login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: 1.2fr .8fr; background: #101a2b; }
.login-art { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: clamp(48px, 8vw, 120px); background: radial-gradient(circle at 20% 12%, #375ce7 0, transparent 32%), linear-gradient(145deg, #121e36 0%, #192b50 53%, #1e3d69 100%); }
.login-art:after { content: ""; position: absolute; inset: 12% -14% -20% 14%; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; transform: rotate(-19deg); box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 68px rgba(255,255,255,.025); }
.login-art-copy { z-index: 1; max-width: 540px; color: #fff; }
.login-art h1 { margin: 18px 0 20px; font-size: clamp(42px, 5.3vw, 76px); line-height: 1.08; letter-spacing: -.055em; font-weight: 760; }
.login-art p { margin: 0; color: rgba(255,255,255,.68); font-size: 17px; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .55; }
.orb-a { width: 180px; height: 180px; right: 18%; top: 16%; background: linear-gradient(140deg, #718bff, transparent); }
.orb-b { width: 70px; height: 70px; right: 32%; bottom: 20%; background: #65d5c6; filter: blur(18px); opacity: .3; }
.login-card { align-self: center; width: min(440px, calc(100% - 80px)); margin: auto; padding: 48px 48px 40px; border-radius: 24px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.brand-mark { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark > span, .brand-mark.compact > span { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; font-size: 19px; font-weight: 800; border-radius: 11px; background: linear-gradient(135deg, #4268f3, #6d82f6); box-shadow: 0 7px 16px rgba(66,104,243,.24); }
.brand-mark strong { display: block; font-size: 15px; }
.brand-mark small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.login-card h2 { margin: 43px 0 7px; font-size: 28px; letter-spacing: -.04em; }
.login-card > .muted { margin: 0 0 30px; font-size: 13px; }
label { display: grid; gap: 8px; color: #3c4655; font-size: 12px; font-weight: 650; margin: 0 0 17px; }
input, select, textarea { width: 100%; min-height: 43px; border: 1px solid #dfe4eb; border-radius: 9px; outline: none; padding: 0 13px; color: var(--ink); background: #fff; transition: border .16s, box-shadow .16s; }
textarea { padding-top: 12px; min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(66,104,243,.11); }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-weight: 500; }
.check-row input { width: 15px; min-height: 15px; accent-color: var(--blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 7px 15px rgba(66,104,243,.18); }
.btn-primary:hover { background: #385ce2; }
.btn-secondary { color: #45505f; background: #fff; border-color: #dfe4eb; }
.btn-danger { color: var(--red); background: var(--red-soft); }
.btn-quiet { color: var(--ink-soft); background: transparent; border-color: transparent; }
.btn-success { color: #087e70; background: var(--teal-soft); }
.btn-wide { width: 100%; min-height: 48px; font-size: 13px; margin-top: 5px; }
.button-arrow { margin-left: auto; font-size: 18px; font-weight: 400; }
.demo-link { display: block; width: 100%; margin-top: 16px; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 700; }
.login-foot { margin: 35px 0 0; color: #a0a8b4; text-align: center; font-size: 10px; }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; padding: 25px 16px 15px; color: #d4dbea; background: var(--navy); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 30px; color: #fff; }
.sidebar-brand .brand-mark.compact { flex: 0 0 auto; }
.brand-mark.compact > span { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; background: linear-gradient(135deg, #5878f5, #89a1ff); }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand small { display: block; margin-top: 4px; color: #74839f; font-size: 9px; letter-spacing: .12em; }
.workspace-switch { display: flex; align-items: center; gap: 10px; margin: 0 4px 28px; padding: 12px 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(255,255,255,.045); }
.workspace-switch .status-dot { flex: 0 0 auto; }
.workspace-switch div { flex: 1; min-width: 0; }
.workspace-switch small { display: block; margin-bottom: 5px; color: #7f8da7; font-size: 10px; }
.workspace-switch strong { display: block; overflow: hidden; color: #f4f6fb; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: #8895ad; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2cc4ad; box-shadow: 0 0 0 3px rgba(44,196,173,.14); }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; color: #91a0ba; text-align: left; background: transparent; font-size: 12px; font-weight: 650; }
.nav-item:hover { color: #e9edfb; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #2d4266; box-shadow: inset 3px 0 #758dff; }
.nav-icon { display: grid; place-items: center; width: 18px; color: currentColor; font-size: 17px; font-weight: 400; }
.nav-badge { margin-left: auto; min-width: 19px; padding: 2px 5px; border-radius: 10px; color: #b5c4e7; text-align: center; background: rgba(255,255,255,.09); font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.help-card { margin: 0 3px 20px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.045); }
.help-icon { display: grid; place-items: center; width: 23px; height: 23px; margin-bottom: 10px; border-radius: 7px; color: #9ab0ff; background: rgba(116,143,255,.16); }
.help-card strong { display: block; color: #e9edf7; font-size: 11px; }
.help-card p { margin: 6px 0 10px; color: #7e8ba3; line-height: 1.5; font-size: 10px; }
.help-card button { padding: 0; border: 0; color: #94a9fe; background: transparent; font-size: 10px; font-weight: 700; }
.user-mini { display: flex; align-items: center; gap: 9px; padding: 12px 4px 2px; border-top: 1px solid rgba(255,255,255,.08); }
.user-mini > div:nth-child(2) { flex: 1; min-width: 0; }
.user-mini strong, .user-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-mini strong { color: #eef1f8; font-size: 11px; }
.user-mini small { margin-top: 4px; color: #76849c; font-size: 10px; }
.user-mini button { padding: 4px; border: 0; color: #75829a; background: transparent; font-size: 18px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; color: #526de3; background: #e9edff; font-size: 12px; font-weight: 800; }
.main-content { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 74px; padding: 0 43px; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.breadcrumb span { color: #9aa3b0; }.breadcrumb b { color: #ccd1d9; font-weight: 400; }.breadcrumb strong { color: #293444; }
.top-actions { display: flex; align-items: center; gap: 12px; }.connection-pill { display: flex; align-items: center; gap: 8px; margin-right: 8px; color: #667183; font-size: 11px; }.icon-btn { position: relative; width: 34px; height: 34px; border: 0; color: #7b8491; background: transparent; font-size: 20px; }.icon-btn:hover { color: var(--blue); }.notification i { position: absolute; top: 7px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }.top-avatar { width: 32px; height: 32px; }
.page-container { max-width: 1440px; margin: 0 auto; padding: 38px 43px 60px; }

/* Common page */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 27px; }.page-head h1 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.05em; }.page-head p { margin: 0; color: var(--ink-soft); font-size: 12px; }.head-actions { display: flex; align-items: center; gap: 9px; }
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }.search-wrap { position: relative; flex: 1; max-width: 290px; }.search-wrap input { padding-left: 35px; background: #fff; }.search-icon { position: absolute; top: 12px; left: 13px; color: #929aa7; font-size: 14px; }.filter-bar select { width: 130px; min-height: 43px; }.filter-spacer { flex: 1; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }.card-title { display: flex; align-items: center; justify-content: space-between; padding: 21px 22px; border-bottom: 1px solid var(--line); }.card-title h3 { margin: 0; font-size: 14px; }.card-title small { color: var(--muted); font-size: 11px; }
.table-wrap { overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }.data-table th { padding: 13px 18px; color: #9099a7; text-align: left; background: #fafbfd; font-size: 10px; font-weight: 700; white-space: nowrap; }.data-table td { padding: 15px 18px; border-top: 1px solid #f0f2f5; vertical-align: middle; }.data-table tbody tr:hover { background: #fbfcff; }.data-table .strong { color: #243043; font-weight: 700; }.data-table .sub { display: block; margin-top: 4px; color: #9da6b3; font-size: 10px; }.table-actions { display: flex; justify-content: flex-end; gap: 3px; }.table-action { padding: 6px 7px; border: 0; border-radius: 6px; color: #7b8797; background: transparent; font-size: 11px; }.table-action:hover { color: var(--blue); background: var(--blue-soft); }.table-action.danger:hover { color: var(--red); background: var(--red-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; white-space: nowrap; }.pill .status-dot { width: 5px; height: 5px; box-shadow: none; }.pill.active { color: #087e70; background: var(--teal-soft); }.pill.active .status-dot { background: var(--teal); }.pill.warning { color: var(--amber); background: var(--amber-soft); }.pill.warning .status-dot { background: #df9a18; }.pill.danger { color: var(--red); background: var(--red-soft); }.pill.danger .status-dot { background: var(--red); }.pill.neutral { color: #788493; background: #f1f3f6; }.pill.neutral .status-dot { background: #8c96a5; }
.empty-state { display: grid; place-items: center; gap: 8px; min-height: 180px; color: var(--muted); font-size: 12px; }.empty-state b { color: #cad0da; font-size: 31px; }

/* Overview */
.welcome { display: flex; align-items: center; justify-content: space-between; padding: 29px 31px; margin-bottom: 22px; overflow: hidden; border-radius: var(--radius); color: #fff; background: linear-gradient(120deg, #243858 0%, #2a4674 50%, #4164aa 100%); box-shadow: 0 14px 30px rgba(35,59,99,.16); }.welcome:after { content: ""; width: 190px; height: 190px; margin-right: -40px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.04), 0 0 0 48px rgba(255,255,255,.025); }.welcome h1 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.045em; }.welcome p { margin: 0; color: rgba(255,255,255,.65); font-size: 12px; }.welcome-date { align-self: flex-start; padding: 7px 11px; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; color: rgba(255,255,255,.74); font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }.metric { padding: 20px 20px 17px; }.metric-top { display: flex; align-items: center; justify-content: space-between; color: #7b8798; font-size: 11px; }.metric-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }.metric-icon.blue { color: #5873e5; background: #eef1ff; }.metric-icon.teal { color: #109e8d; background: #e6f8f4; }.metric-icon.amber { color: #c98919; background: #fff5df; }.metric-icon.red { color: #d45466; background: #fff0f2; }.metric-value { margin: 17px 0 11px; font-size: 28px; letter-spacing: -.05em; font-weight: 750; }.metric-bottom { display: flex; gap: 5px; align-items: center; color: #8e98a6; font-size: 10px; }.up { color: var(--teal); font-weight: 700; }.down { color: var(--red); font-weight: 700; }
.overview-grid { display: grid; grid-template-columns: 1.45fr .95fr; gap: 17px; }.activity-list { padding: 4px 22px 10px; }.activity-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0f2f5; }.activity-item:last-child { border-bottom: 0; }.activity-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }.activity-item.green .activity-dot { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }.activity-item.amber .activity-dot { background: #e0a22d; box-shadow: 0 0 0 4px var(--amber-soft); }.activity-item p { margin: 0; color: #4f5b6d; font-size: 11px; line-height: 1.55; }.activity-item time { display: block; margin-top: 5px; color: #a6aeb9; font-size: 10px; }.quick-actions { display: grid; gap: 9px; padding: 18px 22px 23px; }.quick-action { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border: 1px solid #edf0f4; border-radius: 9px; color: #455263; text-align: left; background: #fff; }.quick-action:hover { border-color: #ccd6ff; background: #fbfcff; }.quick-action > span:first-child { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--blue); background: var(--blue-soft); font-size: 15px; }.quick-action strong { display: block; font-size: 11px; }.quick-action small { display: block; margin-top: 4px; color: #a0a9b5; font-size: 10px; }.quick-action > span:last-child { margin-left: auto; color: #adb5c1; }

/* Rooms */
.room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }.room-card { position: relative; padding: 18px; }.room-card.locked { border-color: #f1dfaa; }.room-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }.room-id { color: #7d8795; font-size: 10px; }.room-topic { margin: 6px 0 0; color: #233047; font-size: 16px; font-weight: 750; letter-spacing: -.03em; }.room-meta { display: flex; gap: 19px; margin: 19px 0; color: #8993a0; font-size: 10px; }.room-meta b { display: block; margin-top: 5px; color: #445165; font-size: 13px; }.room-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid #f0f2f5; }.room-card-foot time { color: #9ba4b0; font-size: 10px; }.room-actions { display: flex; gap: 4px; }.room-actions button { padding: 5px 7px; border: 0; border-radius: 5px; color: #727e8e; background: transparent; font-size: 11px; }.room-actions button:hover { color: var(--blue); background: var(--blue-soft); }.room-actions button.danger:hover { color: var(--red); background: var(--red-soft); }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 17px; }.settings-form { padding: 22px; }.form-section + .form-section { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line); }.form-section h3 { margin: 0 0 5px; font-size: 13px; }.form-section > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }.form-grid .span-2 { grid-column: span 2; }.input-with-suffix { display: flex; }.input-with-suffix input { border-radius: 8px 0 0 8px; }.input-suffix { display: grid; place-items: center; min-width: 54px; border: 1px solid #dfe4eb; border-left: 0; border-radius: 0 8px 8px 0; color: var(--muted); background: #f8fafc; font-size: 11px; }.policy-card { padding: 22px; }.policy-list { display: grid; gap: 13px; margin-top: 18px; }.policy-item { display: flex; align-items: flex-start; gap: 10px; }.policy-item > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 12px; }.policy-item strong { display: block; font-size: 11px; }.policy-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

/* Modal / drawer */
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 30px; background: rgba(14,23,39,.44); backdrop-filter: blur(4px); }.modal { width: min(570px, 100%); max-height: calc(100vh - 60px); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 26px 80px rgba(0,0,0,.22); }.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 23px 25px; border-bottom: 1px solid var(--line); }.modal-head h2 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.03em; }.modal-head p { margin: 0; color: var(--muted); font-size: 11px; }.modal-close { border: 0; color: #9aa3af; background: transparent; font-size: 22px; }.modal-body { padding: 23px 25px; }.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 25px 22px; }.drawer-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(14,23,39,.28); }.drawer { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; width: min(510px, 100%); height: 100%; background: #fff; box-shadow: -14px 0 40px rgba(0,0,0,.1); }.drawer .modal-head { flex: 0 0 auto; }.drawer-body { flex: 1; overflow-y: auto; padding: 22px 25px; }.drawer-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 25px 24px; border-top: 1px solid var(--line); }.user-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #f0f2f5; }.user-row .avatar { width: 32px; height: 32px; }.user-row > div:nth-child(2) { flex: 1; }.user-row strong { display: block; font-size: 11px; }.user-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }.user-row button { padding: 6px 9px; border: 0; border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: 10px; font-weight: 700; }
.toast-root { position: fixed; z-index: 50; top: 18px; right: 22px; display: grid; gap: 9px; width: 300px; }.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; color: #354254; background: #fff; box-shadow: 0 12px 28px rgba(23,35,59,.13); font-size: 11px; animation: toast-in .2s ease-out; }.toast b { color: var(--teal); font-size: 14px; }.toast.error b { color: var(--red); }@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.confirm-copy { color: var(--ink-soft); line-height: 1.7; font-size: 12px; }
@media (max-width: 1200px) { .metric-grid { grid-template-columns: repeat(2, 1fr); }.room-grid { grid-template-columns: repeat(2, 1fr); }.overview-grid, .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  body { min-width: 0; }
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card { width: min(440px, calc(100% - 32px)); padding: 34px 27px 28px; }
  .app-shell { grid-template-columns: 72px 1fr; }
  .sidebar { padding: 18px 9px 12px; }
  .sidebar-brand { justify-content: center; padding: 0 0 25px; }
  .sidebar-brand > div:not(.brand-mark) { display: none; }
  .workspace-switch { justify-content: center; margin: 0 0 22px; padding: 12px 0; }
  .workspace-switch > div, .workspace-switch .chevron { display: none; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .nav-item { font-size: 0; }.nav-icon { font-size: 17px; }.nav-badge { display: none; }
  .help-card { display: none; }
  .user-mini { justify-content: center; padding: 13px 0 0; }.user-mini > div:nth-child(2), .user-mini button { display: none; }
  .topbar { padding: 0 20px; }
  .page-container { padding: 27px 20px 45px; }
  .welcome { padding: 23px 22px; }.welcome:after { display: none; }
  .metric-grid { gap: 10px; }.metric { padding: 15px; }.metric-value { font-size: 24px; }
  .room-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }.form-grid .span-2 { grid-column: auto; }
}
