/* 数字东谷 · v4 全站视觉统一层
 * 只覆盖布局与视觉，不改变既有业务字段、接口或权限判断。 */
:root {
  color-scheme: light;
  --brand-primary: #1766D6;
  --brand-primary-hover: #1055B8;
  --brand-primary-soft: #EAF3FF;
  --brand-orange: #F59A00;
  --brand-orange-soft: #FFF3DE;
  --page-bg: #F5F8FD;
  --bg: #F5F8FD;
  --surface: #FFFFFF;
  --surface-solid: #FFFFFF;
  --surface-warm: #FFFCF6;
  --label: #17365F;
  --text-primary: #17365F;
  --secondary: #7186A4;
  --text-secondary: #7186A4;
  --border: #E4ECF7;
  --separator: #E4ECF7;
  --accent: #1766D6;
  --accent-soft: #EAF3FF;
  --warn: #F59A00;
  --warn-soft: #FFF3DE;
  --risk: #E45858;
  --risk-soft: #FDECEC;
  --risk-text: #C84444;
  --radius-card: 16px;
  --shadow-card: 0 2px 12px rgba(23, 54, 95, 0.06);
}

html, body { min-width: 320px; background: var(--page-bg); color: var(--label); }
body { overflow-x: hidden; }
button, input, select, textarea { accent-color: var(--brand-primary); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(23, 102, 214, .28); outline-offset: 2px; }

/* Shared app shell */
.app {
  grid-template-columns: 240px minmax(0, 1fr); height: 100vh; height: 100dvh;
  min-height: 0; overflow: hidden; background: var(--page-bg);
}
.side {
  position: fixed; inset: 0 auto 0 0; z-index: 130; display: flex; flex-direction: column;
  grid-column: 1; width: 240px; height: 100vh; height: 100dvh; box-sizing: border-box;
  overflow-y: auto; overscroll-behavior-y: contain; padding: 22px 14px 14px;
  background: var(--surface-warm); border-right: 1px solid var(--border);
}
.side-brand {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 2px 6px 4px;
  color: var(--label); text-decoration: none;
}
.company-logo { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.25; }
.side-brand .name { font-size: 18px; font-weight: 750; letter-spacing: .02em; color: #17365F; }
.brand-sub { margin-top: 3px; color: var(--secondary); font-size: 11px; white-space: nowrap; }
.side-status { display: flex; align-items: center; gap: 6px; margin: 12px 6px 24px; color: var(--secondary); font-size: 11px; }
.side-status > span { margin-left: auto; color: #90A1B8; }
.side-status .dot-on { background: #28A36A; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; color: #294767; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.side-nav a .ico { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; color: #1766D6; }
.side-nav a .ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a .ico svg .ico-fill { fill: currentColor; stroke: none; }
.side-nav a:hover { background: #FFF3DE; color: #A76500; }
.side-nav a:hover .ico { color: #A76500; }
.side-nav a.active { background: #FF9F1C; color: #FFFFFF; box-shadow: 0 5px 14px rgba(245, 154, 0, .18); }
.side-nav a.active .ico { color: #FFFFFF; }
.side-user {
  display: flex; align-items: center; gap: 10px; min-height: 58px; margin-top: auto; padding: 12px 6px 2px;
  border-top: 1px solid var(--border); color: inherit; text-decoration: none;
}
.side-user .avatar, .rail-profile .avatar {
  width: 36px; height: 36px; border: 2px solid #FFF0D2; border-radius: 50%;
  background: #EAF3FF; color: var(--brand-primary); font-weight: 700;
}
.side-user .who { display: flex; flex-direction: column; gap: 2px; }
.side-user .nm { color: var(--label); font-size: 13px; }
.side-user .dept { color: var(--secondary); font-size: 11px; }
.side-role { margin-left: auto; color: #9AAAC0; font-size: 10px; white-space: nowrap; }
.workspace {
  grid-column: 2; display: flex; width: 100%; height: 100vh; height: 100dvh;
  min-width: 0; min-height: 0; flex-direction: column; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior-y: contain;
}
.app-topbar {
  position: sticky; top: 0; z-index: 125; display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 0 28px; background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--border); backdrop-filter: blur(14px);
}
.mobile-brand { display: none; align-items: center; gap: 7px; color: var(--label); font-size: 14px; font-weight: 700; white-space: nowrap; }
.mobile-brand img { width: 28px; height: 28px; object-fit: contain; }
.global-search { position: relative; display: flex; align-items: center; width: min(680px, 68%); min-width: 220px; height: 38px; }
.global-search .search-icon { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--brand-primary); stroke-width: 1.8; stroke-linecap: round; }
.global-search input {
  width: 100%; height: 38px; padding: 0 14px 0 40px; border: 1px solid transparent; border-radius: 999px;
  background: #F3F7FC; color: var(--label); font-size: 13px; outline: 0;
}
.global-search input::placeholder { color: #8DA0B9; }
.global-search input:focus { border-color: #B8D3F5; background: #FFFFFF; box-shadow: 0 0 0 3px rgba(23, 102, 214, .08); }
.global-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 300; max-height: min(70vh, 440px); overflow-y: auto;
  padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; box-shadow: 0 16px 38px rgba(23, 54, 95, .16);
}
.global-search-results[hidden] { display: none; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--label); text-decoration: none; }
.search-result:hover, .search-result:focus { background: var(--accent-soft); outline: 0; }
.search-result > span:first-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.search-result strong { font-size: 13px; }
.search-result small { overflow: hidden; color: var(--secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.result-arrow { color: var(--brand-primary); }
.search-empty { padding: 16px 12px; color: var(--secondary); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topbar-icon { position: relative; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; color: var(--label); overflow: visible; }
.topbar-icon:hover { background: var(--accent-soft); color: var(--brand-primary); }
.topbar-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.topbar-icon svg .ico-fill { fill: currentColor; stroke: none; }
.topbar-badge {
  position: absolute; top: -1px; right: -4px; z-index: 1;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #E45858; color: #fff; font-size: 9px; font-weight: 700; line-height: 16px;
  text-align: center; box-sizing: border-box; pointer-events: none;
}
.topbar-profile { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid #F2DEB8; border-radius: 50%; background: #FFF6E6; color: #8B5A08; font-size: 13px; font-weight: 700; text-decoration: none; }
.main { flex: 1; min-width: 0; background: var(--page-bg); }
.page-head { align-items: center; min-width: 0; padding: 22px 28px 10px !important; background: transparent !important; border: 0 !important; }
.page-head h1 { color: #17365F; font-size: 22px; font-weight: 750; }
.page-subtitle { margin-top: 3px; color: var(--secondary); font-size: 12px; line-height: 1.5; }
.page-body { width: 100%; max-width: 1400px; min-width: 0; margin: 0 auto; padding: 16px 28px 40px; }
.page-body .box, .page-body .card, .home-rail-card, .more-card {
  border: 1px solid var(--border); border-radius: 16px; background: #FFFFFF; box-shadow: var(--shadow-card);
}
.page-body .box { box-shadow: var(--shadow-card); }
.page-body .tbl { min-width: 620px; }
.page-body .box:has(> .tbl), .page-body .box:has(> .ad-wrap), .page-body .ad-wrap { min-width: 0; max-width: 100%; }
/* 管理页双栏详情表格按各自卡片宽度排版；全局列表表格仍保留可读的最小宽度。 */
.page-body .ad-grid .tbl { min-width: 0; }
.page-body table th { color: #7186A4; }
.page-body table td { color: #294767; }
.page-body input:not([type="checkbox"]):not([type="radio"]), .page-body select, .page-body textarea {
  border-color: #D9E5F3; border-radius: 9px;
}
.btn-primary { background: var(--brand-primary); }
.btn-primary:hover:not(:disabled) { background: var(--brand-primary-hover); }
.pill-accent { background: var(--brand-primary-soft); color: var(--brand-primary); }

/* More: all low-frequency routes remain available and keep their existing permission gates. */
.more-page { padding-top: 10px; }
.more-groups { display: grid; gap: 22px; }
.more-group { min-width: 0; }
.more-group-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.more-group-head h2 { color: var(--label); font-size: 16px; line-height: 1.35; }
.more-group-head p { margin-top: 3px; color: var(--secondary); font-size: 12px; }
.more-group-head > span { color: #94A5BC; font-size: 11px; white-space: nowrap; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.more-card { display: flex; align-items: center; gap: 12px; min-height: 82px; padding: 14px; color: inherit; text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.more-card:hover { transform: translateY(-2px); border-color: #C4D9F5; box-shadow: 0 8px 22px rgba(23, 102, 214, .10); }
.more-card-icon { display: inline-flex; width: 40px; height: 40px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 12px; background: var(--accent-soft); color: var(--brand-primary); }
.more-card-icon svg { width: 20px; height: 20px; }
.more-card-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.more-card-copy strong { overflow: hidden; color: var(--label); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.more-card-copy small { overflow: hidden; color: var(--secondary); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; }
.more-card-arrow { color: #9AAAC0; font-size: 20px; }

/* Assistant landing page: keep the real chat composer, message history, file upload and review hooks. */
.chat-home { display: grid; grid-template-columns: minmax(0, 1fr) 286px; align-items: start; gap: 18px; max-width: 1500px; padding-top: 8px; }
.chat-primary { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.chat-primary.is-empty .stream { display: none; }
.chat-primary.is-history .welcome-panel,
.chat-primary.is-history .home-quick-grid { display: none; }
.chat-primary.is-history .stream { display: flex; flex: 1 1 auto; min-height: 180px; max-height: min(58vh, 680px); }
.chat-primary.is-history .composer-wrap { position: sticky; bottom: 0; z-index: 12; }
.chat-home-return { flex: 0 0 auto; white-space: nowrap; }
.welcome-panel { display: flex; align-items: center; gap: 20px; min-height: 224px; overflow: hidden; padding: 18px 24px; border: 1px solid #DCE9F8; border-radius: 20px; background: linear-gradient(115deg, #E7F1FF 0%, #F5F9FF 56%, #FFF9EF 100%); }
.welcome-mascot { width: 180px; height: 180px; flex: 0 0 auto; object-fit: contain; }
.welcome-copy { min-width: 0; }
.welcome-kicker { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #FFF2D8; color: #AA6800; font-size: 11px; font-weight: 700; }
.welcome-copy h2 { margin-top: 13px; color: #173F7B; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.25; }
.welcome-copy p { margin-top: 5px; color: #17365F; font-size: 16px; }
.welcome-copy small { display: block; margin-top: 9px; color: var(--secondary); font-size: 12px; line-height: 1.5; }
.home-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.home-quick { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px; background: #FFFFFF; color: var(--brand-primary); box-shadow: 0 2px 8px rgba(23, 54, 95, .035); font-size: 13px; font-weight: 650; text-align: left; }
.home-quick:hover { border-color: #B9D3F4; background: #F8FBFF; }
.quick-icon { display: inline-flex; width: 28px; height: 28px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 8px; background: var(--accent-soft); font-size: 19px; }
.quick-arrow { margin-left: auto; color: #A2B1C4; font-size: 14px; }
.composer-wrap { margin: 12px 0 0; padding: 0; border: 0; background: transparent; }
.composer { max-width: none; padding: 8px 12px 10px; border: 1px solid #DCE6F2; border-radius: 14px; background: #FFFFFF; box-shadow: 0 3px 12px rgba(23, 54, 95, .045); }
.composer textarea { min-height: 62px; max-height: 150px; padding: 8px 4px; border: 0; resize: vertical; }
.composer textarea:focus { border: 0; box-shadow: none; }
.send-row { gap: 8px; }
.send-row .tip { font-size: 11px; }
.mode-toggle { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: #F8FAFD; color: var(--secondary); font-size: 11px; }
.send { width: 40px; height: 40px; border-radius: 12px; background: #FF9F1C; color: #FFFFFF; }
.send:hover:not(:disabled) { filter: brightness(.97); }
.foot-note { max-width: none; margin-top: 6px; text-align: center; font-size: 10px; }
.stream { width: 100%; max-width: none; max-height: 34vh; min-height: 70px; margin: 12px auto 0; overflow-y: auto; padding: 12px 10px 24px; border-radius: 12px; background: rgba(255,255,255,.58); }
.pool-reg-filter-fold summary { display: none; }
.offline-banner { max-width: none; }
.home-rail { display: grid; min-width: 0; gap: 12px; }
.home-rail-card { position: relative; min-width: 0; padding: 15px; }
.rail-card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--label); font-size: 14px; font-weight: 750; }
.rail-accent { width: 4px; height: 16px; flex: 0 0 auto; border-radius: 999px; background: var(--brand-orange); }
.rail-profile { display: flex; align-items: center; gap: 10px; }
.rail-profile > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.rail-profile strong { overflow: hidden; color: var(--label); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rail-profile small { overflow: hidden; color: var(--secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rail-profile-hint { margin-top: 11px; color: var(--secondary); font-size: 11px; line-height: 1.55; }
.rail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; }
.rail-actions a { padding: 7px 4px; border-radius: 8px; background: var(--accent-soft); color: var(--brand-primary); font-size: 11px; font-weight: 650; text-align: center; }
.me-help-link { display: inline-flex; align-items: center; padding: 0 10px; color: var(--brand-primary); font-size: 12px; text-decoration: none; white-space: nowrap; }
.rail-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; margin-left: auto; padding: 0 6px; border-radius: 999px; background: var(--brand-orange-soft); color: #A76500; font-size: 11px; }
.rail-more { margin-left: auto; color: var(--brand-primary); font-size: 11px; font-weight: 600; }
.rail-count + .rail-more { margin-left: 0; }
.rail-todo { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #EDF2F8; color: var(--label); text-decoration: none; }
.rail-todo-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--brand-primary); }
.rail-todo > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.rail-todo strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rail-todo small { color: var(--secondary); font-size: 10px; }
.rail-todo-arrow { color: #A2B1C4; }
.rail-empty, .rail-loading { padding: 8px 0; color: var(--secondary); font-size: 11px; }
.rail-sample { margin-top: 6px; color: #98A8BC; font-size: 10px; }
.rail-retry { margin-top: 4px; color: var(--brand-primary); font-size: 11px; }
.rail-link { display: flex; align-items: center; gap: 8px; min-height: 34px; border-top: 1px solid #EDF2F8; color: #365879; font-size: 11px; }
.rail-link > span:nth-child(2) { flex: 1; }
.rail-link-icon { display: inline-flex; color: var(--brand-primary); }
.rail-link-icon svg { width: 15px; height: 15px; }

/* Login: warm brand stage plus the real backend-supported WeCom flow. */
.login-screen {
  display: grid; min-height: 100vh; min-height: 100svh; align-items: center;
  background: radial-gradient(ellipse at 12% 20%, rgba(213, 232, 255, .34), transparent 36%),
    radial-gradient(ellipse at 92% 78%, rgba(255, 237, 204, .25), transparent 32%), #FFFCF6;
}
.login-layout {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(500px, .92fr);
  align-items: stretch; gap: clamp(24px, 2.5vw, 40px); width: min(1600px, 100%); min-height: 100vh; min-height: 100svh;
  box-sizing: border-box; margin: 0 auto; padding: clamp(24px, 4.5vw, 60px);
}
.login-brand-panel {
  position: relative; isolation: isolate; display: flex; min-width: 0; min-height: min(820px, calc(100svh - 120px));
  box-sizing: border-box; flex-direction: column; overflow: hidden; padding: clamp(30px, 4.1vw, 62px); border: 1px solid #DCE9F8;
  border-radius: 20px; background: linear-gradient(135deg, #E8F3FF 0%, #F4F9FF 56%, #FFF8EA 100%);
}
.login-brand-panel::before {
  position: absolute; inset: 0; z-index: 1; background: linear-gradient(110deg, rgba(239, 247, 255, .84) 0%, rgba(244, 249, 255, .58) 48%, rgba(255, 252, 244, .12) 100%);
  content: ""; pointer-events: none;
}
.login-scene { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 53% 50%; }
.login-brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 14px; width: fit-content; color: var(--label); text-decoration: none; }
.login-brand img { width: 54px; height: 54px; object-fit: contain; }
.login-brand span { display: flex; flex-direction: column; gap: 4px; }
.login-brand strong { color: #123F7C; font-size: 26px; line-height: 1.1; letter-spacing: .02em; }
.login-brand small { color: #5879A7; font-size: 13px; }
.login-brand-copy { position: relative; z-index: 2; max-width: 500px; margin: clamp(38px, 4.4vw, 64px) 0 0; }
.login-brand-copy h1 { color: #1766D6; font-size: clamp(36px, 4vw, 58px); font-weight: 760; line-height: 1.32; letter-spacing: .025em; }
.login-brand-copy p { margin-top: 14px; color: #5879A7; font-size: 17px; line-height: 1.8; }
.login-mascot-card { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; height: 48%; pointer-events: none; }
.login-mascot-card img { position: absolute; right: 11%; bottom: 4%; width: min(46%, 380px); height: 96%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 14px 18px rgba(60, 100, 150, .12)); }
.card-login {
  display: flex; width: 100%; min-width: 0; max-width: 650px; min-height: min(820px, calc(100svh - 120px)); flex-direction: column;
  box-sizing: border-box; justify-self: center; padding: clamp(28px, 3.3vw, 48px); border: 1.5px solid #CFE2FA; border-radius: 18px;
  background: rgba(255, 255, 255, .97); box-shadow: 0 10px 30px rgba(23, 102, 214, .055); text-align: left;
}
.login-form-head { display: flex; align-items: flex-start; gap: 12px; }
.login-form-head .rail-accent { width: 5px; height: 32px; margin-top: 2px; border-radius: 5px; }
.login-form-head h2 { color: #173F7B; font-size: clamp(22px, 2vw, 30px); font-weight: 750; line-height: 1.25; }
.login-form-head p { margin-top: 7px; color: #7186A4; font-size: 15px; line-height: 1.5; }
.login-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 28px 0 0; padding: 4px; border: 1px solid #DFEAF8; border-radius: 999px; background: #F5F9FE; }
.login-method {
  display: inline-flex; min-width: 0; min-height: 48px; align-items: center; justify-content: center; gap: 9px; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 999px; background: transparent; color: #5D7DA7; font: inherit; font-size: 14px; font-weight: 650; white-space: nowrap;
}
.login-method svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-method.active { background: linear-gradient(105deg, #1766D6, #2C78DF); color: #FFFFFF; box-shadow: 0 2px 7px rgba(23, 102, 214, .16); }
.login-method.disabled { border-color: transparent; background: transparent; color: #7186A4; cursor: not-allowed; }
.login-method.disabled:disabled { opacity: 1; }
.card-login .qr { width: 100%; height: clamp(230px, 29vh, 292px); flex: 0 0 auto; margin: 26px auto 0; padding: 0; border: 0; background: transparent; }
.qr-action {
  display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 1.5px dashed #BCD8FA; border-radius: 15px; background: linear-gradient(135deg, #FBFDFF, #F5F9FF); color: var(--brand-primary);
  cursor: pointer; font: inherit; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.qr-action:hover:not(:disabled) { border-color: #87B6F1; background: #F2F8FF; box-shadow: inset 0 0 0 1px rgba(23, 102, 214, .04); }
.qr-action:disabled { cursor: progress; }
.qr-action.is-loading { background: #F4F8FD; }
.qr-symbol { display: grid; width: 112px; height: 112px; place-items: center; border-radius: 50%; background: #EAF3FF; color: #1766D6; }
.qr-symbol svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.qr-action-title { color: #1766D6; font-size: 17px; font-weight: 700; }
.qr-action-subtitle { color: #7186A4; font-size: 12px; }
.login-hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 17px; color: #617FA6; font-size: 13px; line-height: 1.6; text-align: center; }
.login-hint svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-test-slot { min-height: 42px; margin-top: 14px; }
.login-policy { margin-top: auto; padding-top: 18px; border-top: 1px solid #E4ECF7; color: #617FA6; font-size: 12px; line-height: 1.8; text-align: center; }
.login-policy span { color: #617FA6; }
.login-sample { margin-top: 8px; color: #617FA6; font-size: 12px; line-height: 1.5; text-align: center; }
.login-err { min-height: 0; margin-top: 8px; color: #C84444; font-size: 13px; line-height: 1.5; text-align: center; }
.login-err:empty { display: none; }
.login-footer { display: none; }
.login-err { margin-top: 10px; }

/* Detail/list pages: shared card edges and safe narrow-screen table containment. */
.cus-row, .pj-row, .todo-item, .crm-item, .project-item { border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; box-shadow: 0 2px 8px rgba(23,54,95,.045); }
.page-body .tbl th { white-space: nowrap; }
.page-body .tbl td { overflow-wrap: anywhere; }
.page-body .notice { border: 1px solid #E4ECF7; }
.page-body .seg-filter, .page-body .pj-filter { max-width: 100%; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .side { width: 220px; padding-right: 12px; padding-left: 12px; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-home { grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; }
  .welcome-mascot { width: 150px; height: 150px; }
}

@media (max-width: 1024px) {
  .chat-home { grid-template-columns: minmax(0, 1fr); }
  .home-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-business { display: block; }
  .page-body { padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 1050px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); width: min(760px, 100%); min-height: auto; gap: 16px; padding: 24px; }
  .login-brand-panel { min-height: 310px; }
  .login-brand-copy { margin-top: 28px; }
  .login-brand-copy h1 { font-size: clamp(34px, 5vw, 46px); }
  .login-mascot-card { height: 62%; }
  .login-mascot-card img { right: 6%; width: min(38%, 300px); height: 94%; }
  .card-login { max-width: none; min-height: 0; }
}

@media (max-width: 860px) {
  .app { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .side { display: none !important; }
  .workspace { width: auto; height: auto; min-height: 100vh; overflow: visible; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .app-topbar { position: sticky; min-height: 58px; gap: 9px; padding: 0 12px; }
  .mobile-brand { display: inline-flex; }
  .mobile-brand span { max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
  .global-search { width: auto; min-width: 70px; flex: 1; }
  .global-search input { height: 36px; padding-left: 34px; font-size: 12px; }
  .global-search .search-icon { left: 10px; width: 16px; height: 16px; }
  .topbar-actions { gap: 4px; }
  .topbar-icon { width: 30px; height: 30px; }
  .topbar-profile { width: 31px; height: 31px; flex: 0 0 auto; }
  .main { min-height: calc(100vh - 58px); }
  .page-head { padding: 14px 16px 8px !important; }
  .page-head h1 { font-size: 19px; }
  .page-body { padding: 10px 16px 28px; }
  .page-body .box { padding: 14px; }
  .chat-home { display: block; padding: 6px 14px 24px; }
  .welcome-panel { min-height: 180px; gap: 10px; padding: 14px; }
  .welcome-mascot { width: clamp(96px, 28vw, 132px); height: clamp(96px, 28vw, 132px); }
  .welcome-copy h2 { margin-top: 9px; font-size: 22px; }
  .welcome-copy p { font-size: 14px; }
  .welcome-copy small { font-size: 11px; }
  .home-quick-grid { gap: 8px; margin: 10px 0; }
  .home-quick { min-height: 46px; padding: 8px; font-size: 11px; }
  .quick-icon { width: 25px; height: 25px; }
  .home-rail { display: none; }
  .stream { max-height: 28vh; margin-top: 10px; padding-bottom: 24px; }
  .chat-primary.is-history .stream { min-height: 120px; max-height: 42vh; }
  .chat-primary.is-history .composer-wrap { bottom: calc(64px + env(safe-area-inset-bottom)); padding: 8px 0; background: linear-gradient(to bottom, rgba(245,248,253,.8), #F5F8FD 12px); }
  .composer-wrap { padding-bottom: 0; }
  .composer { padding: 7px 9px; }
  .composer textarea { min-height: 54px; }
  .send-row .tip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .assistant-pills { padding: 8px 14px 0; }
  .bottom-tabs { display: flex; position: fixed; right: 0; bottom: 0; left: 0; z-index: 160; justify-content: space-around; padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255,255,255,.96) !important; }
  .bottom-tabs .bt { flex: 1; min-width: 0; padding: 2px 0; color: var(--secondary); }
  .bottom-tabs .bt.active { color: var(--brand-orange) !important; }
  .bottom-tabs .bt-ico { display: flex; justify-content: center; }
  .bottom-tabs .bt-ico svg { width: 19px; height: 19px; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-layout { width: min(760px, 100%); min-height: auto; gap: 14px; padding: 18px; }
  .login-brand-panel { min-height: 260px; padding: 24px; }
  .login-brand-copy { max-width: 64%; margin: 23px 0 0; }
  .login-brand-copy h1 { font-size: clamp(30px, 5vw, 38px); }
  .login-brand-copy p { font-size: 14px; }
  .login-mascot-card { height: 62%; }
  .login-mascot-card img { right: 4%; width: min(39%, 250px); height: 94%; max-height: none; }
  .card-login { max-width: none; min-height: 0; padding: 26px; }
  .card-login .qr { height: 232px; margin-top: 18px; }
  .login-policy { margin-top: 20px; }
}

@media (min-width: 1051px) and (max-height: 800px) {
  .login-layout { min-height: 100svh; padding-top: 28px; padding-bottom: 28px; }
  .login-brand-panel, .card-login { min-height: min(820px, calc(100svh - 56px)); }
  .login-brand-panel { padding-top: 32px; }
  .login-brand-copy { margin-top: 30px; }
  .login-brand-copy h1 { font-size: clamp(34px, 3.4vw, 48px); }
  .login-methods { margin-top: 18px; }
  .card-login .qr { height: clamp(190px, 27vh, 220px); margin-top: 16px; }
  .qr-symbol { width: 84px; height: 84px; }
  .qr-symbol svg { width: 42px; height: 42px; }
  .login-test-slot { min-height: 36px; margin-top: 8px; }
  .login-policy { padding-top: 12px; font-size: 11px; line-height: 1.6; }
}

@media (max-width: 520px) {
  .app-topbar { gap: 6px; padding: 0 8px; }
  .mobile-brand { gap: 4px; font-size: 12px; }
  .mobile-brand img { width: 24px; height: 24px; }
  .mobile-brand span { max-width: 58px; }
  .topbar-actions { gap: 1px; }
  .topbar-icon { width: 27px; height: 29px; }
  .topbar-profile { width: 29px; height: 29px; }
  .global-search { min-width: 50px; }
  .global-search input { padding-right: 7px; font-size: 11px; }
  .chat-head { align-items: flex-start; }
  .chat-head .spacer { display: none; }
  .chat-head .review-toggle { margin-left: auto; }
  .chat-head .sample-strip { flex-basis: 100%; }
  .page-head { gap: 8px; }
  .page-body { padding-right: 12px; padding-left: 12px; }
  .chat-home { padding-right: 10px; padding-left: 10px; }
  .welcome-panel { min-height: 158px; padding: 10px; }
  .welcome-mascot { width: 92px; height: 110px; }
  .welcome-copy h2 { font-size: 19px; }
  .welcome-copy p { font-size: 12px; }
  .welcome-copy small { display: none; }
  .welcome-kicker { padding: 4px 7px; font-size: 10px; }
  .home-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-quick { gap: 6px; min-height: 44px; font-size: 10px; }
  .quick-icon { width: 22px; height: 22px; font-size: 15px; }
  .quick-arrow { display: none; }
  .pool-reg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .pool-reg-stat { gap: 8px; padding: 9px; }
  .pool-reg-stat i { width: 31px; height: 31px; flex-basis: 31px; border-radius: 10px; }
  .pool-reg-stat strong { font-size: 17px; }
  .pool-reg-columns { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pool-reg-card { padding: 12px; }
  .pool-reg-filter-fold summary { display: block; margin: 0 0 8px; padding: 9px 10px; border: 1px solid #e3ebf6; border-radius: 9px; color: #1766d6; font-size: 11px; font-weight: 700; }
  .pool-reg-filter-fold:not([open]) .pool-reg-filters { display: none; }
  .pool-reg-filters { flex-direction: column; }
  .pool-reg-search, .pool-reg-select { width: 100%; flex: 0 0 36px; }
  .pool-reg-detail { position: static; }
  .pool-reg-card:last-child { padding-bottom: 76px; }
  .pool-reg-actions { position: fixed; right: 12px; bottom: calc(62px + env(safe-area-inset-bottom)); left: 12px; z-index: 150; justify-content: stretch; margin: 0; padding: 9px 12px; border: 1px solid #e4ecf7; border-radius: 12px; box-shadow: 0 6px 24px rgba(23,54,95,.12); }
  .pool-reg-actions button { flex: 1; min-width: 0; padding: 0 7px; font-size: 10px; }
  .composer .tip { display: none; }
  .send-row { justify-content: flex-end; }
  .mode-toggle { margin-right: auto; }
  .more-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .more-card { min-height: 70px; }
  .more-group-head { align-items: start; }
  .more-group-head h2 { font-size: 15px; }
  .more-group-head p { max-width: 240px; }
  .page-body .tbl { min-width: 620px; }
  .page-body .box:has(.tbl) { overflow-x: auto; }
  .login-layout { gap: 12px; padding: 12px; }
  .login-brand-panel { min-height: 180px; padding: 18px; border-radius: 16px; }
  .login-scene { object-position: 55% 65%; }
  .login-brand { gap: 9px; }
  .login-brand img { width: 38px; height: 38px; }
  .login-brand strong { font-size: 19px; }
  .login-brand small { font-size: 11px; }
  .login-brand-copy { max-width: 66%; margin-top: 14px; }
  .login-brand-copy h1 { font-size: 23px; line-height: 1.3; }
  .login-brand-copy p { margin-top: 6px; font-size: 12px; line-height: 1.55; }
  .login-mascot-card { height: 100%; }
  .login-mascot-card img { right: 1%; bottom: 0; width: 36%; height: 88%; max-height: none; }
  .card-login { min-height: 0; padding: 20px 16px; border-radius: 16px; }
  .login-form-head h2 { font-size: 20px; }
  .login-form-head p { font-size: 13px; }
  .login-methods { gap: 2px; margin-top: 15px; padding: 3px; }
  .login-method { min-height: 42px; gap: 5px; padding: 6px 5px; font-size: 12px; }
  .login-method svg { width: 17px; height: 17px; }
  .card-login .qr { height: 210px; margin-top: 16px; }
  .qr-symbol { width: 78px; height: 78px; }
  .qr-symbol svg { width: 40px; height: 40px; }
  .qr-action-title { font-size: 14px; }
  .qr-action-subtitle { font-size: 11px; }
  .login-hint { margin-top: 12px; font-size: 12px; }
  .login-test-slot { min-height: 36px; margin-top: 8px; }
  .login-policy { margin-top: 14px; padding-top: 14px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Employee center and task overview: responsive, API-backed summaries. */
.me-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.me-summary-card { position: relative; display: flex; min-width: 0; min-height: 98px; flex-direction: column; justify-content: center; gap: 5px; overflow: hidden; padding: 14px 16px 14px 19px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.me-summary-card::before { position: absolute; top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-primary); content: ''; }
.me-summary-card.accent-orange::before { background: #F59A00; }
.me-summary-card.accent-teal::before { background: #17A99B; }
.me-summary-card.accent-purple::before { background: #8056D8; }
.me-summary-card > span { color: var(--secondary); font-size: 12px; }
.me-summary-card strong { color: var(--brand-primary); font-size: 25px; line-height: 1; }
.me-summary-card.accent-orange strong { color: #E88700; }
.me-summary-card.accent-teal strong { color: #159A8E; }
.me-summary-card.accent-purple strong { color: #8056D8; }
.me-summary-card small { color: #94A5BC; font-size: 10px; }
.me-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.me-overview-grid > .box { min-width: 0; margin: 0; }
.me-privacy-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 17px 20px; border: 1px solid #F2DEB8; border-radius: 14px; background: #FFFAF1; }
.me-privacy-card strong { color: #A76500; font-size: 13px; }
.me-privacy-card p { margin-top: 5px; color: var(--label); font-size: 12px; line-height: 1.6; }
.me-privacy-card a { flex: 0 0 auto; color: var(--brand-primary); font-size: 12px; text-decoration: none; }
.me-more-link { color: var(--brand-primary); font-size: 12px; text-decoration: none; white-space: nowrap; }
.me-recent-todos { margin-top: 10px; }
.me-recent-task { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 2px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.me-recent-task > span:first-child { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.me-recent-task strong { overflow: hidden; color: var(--label); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.me-recent-task small { color: var(--secondary); font-size: 11px; }
.me-task-arrow { color: #A2B1C4; font-size: 19px; }
.me-recent-task:hover strong { color: var(--brand-primary); }
.tdg-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.tdg-metric { min-width: 0; padding: 15px 17px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.tdg-metric strong { display: block; color: var(--brand-primary); font-size: 25px; line-height: 1.2; }
.tdg-metric:nth-child(2) strong { color: #24A45A; }
.tdg-metric:nth-child(3) strong { color: #D85050; }
.tdg-metric span { display: block; margin-top: 4px; color: var(--secondary); font-size: 12px; }
.cr8-empty-note { padding: 12px 14px; border-radius: 10px; background: #F5F8FD; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.lk-connect-preview { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; padding: 17px 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow-card); }
.lk-connect-copy { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 14px; }
.lk-connect-heading { display: flex; min-width: 0; align-items: flex-start; gap: 11px; }
.lk-connect-mark { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #EAF3FF; color: var(--brand-primary); font-size: 20px; font-weight: 700; }
.lk-connect-heading h2 { margin: 0; color: var(--label); font-size: 15px; font-weight: 700; }
.lk-connect-heading p { margin: 4px 0 0; color: var(--secondary); font-size: 12px; line-height: 1.55; }
.lk-connect-state { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #F2DEB8; border-radius: 999px; background: #FFFAF1; color: #A76500; font-size: 11px; }
.intg-modal-backdrop { position: fixed; inset: 0; z-index: 780; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(25,45,72,.38); }
.intg-modal { display: flex; width: min(820px,100%); max-height: min(86vh,760px); flex-direction: column; overflow: hidden; border: 1px solid #DCE7F5; border-radius: 22px; background: #fff; box-shadow: 0 24px 80px rgba(25,45,72,.22); }
.intg-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; background: #FFFCF6; }
.intg-modal-head h2 { margin: 0; color: #17365F; font-size: 19px; }
.intg-modal-head p { margin: 4px 0 0; color: #8295AE; font-size: 11px; line-height: 1.5; }
.intg-modal-close { width: 32px; height: 32px; border: 0; background: transparent; color: #7186A4; font-size: 24px; line-height: 1; cursor: pointer; }
.intg-modal-body { overflow: auto; padding: 22px 24px; flex: 1; }
.intg-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 22px; }
.intg-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.intg-field.full { grid-column: 1/-1; }
.intg-field label { color: #7186A4; font-size: 12px; font-weight: 650; }
.intg-field input,.intg-field select,.intg-field textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid #D9E5F3; border-radius: 10px; background: #F8FAFD; color: #58708D; font: inherit; font-size: 13px; opacity: 1; }
.intg-field textarea { min-height: 68px; resize: none; line-height: 1.5; }
.intg-field :disabled { color: #58708D; opacity: 1; }
.intg-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 18px; border-top: 1px solid #EDF2F8; }
.intg-modal-footer small { color: #8A9CB4; font-size: 10px; line-height: 1.5; }
.intg-modal-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.intg-modal-actions .btn { min-height: 38px; border-radius: 10px; }
.intg-modal-actions .btn-primary { border-color: #F49A19 !important; background: #F49A19 !important; color: #fff !important; }
.intg-modal-actions .btn:disabled { opacity: .52; cursor: not-allowed; }
.ep-modal-backdrop { position: fixed; inset: 0; z-index: 790; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(25,45,72,.38); }
.ep-modal { display: flex; width: min(820px,100%); max-height: min(86vh,760px); flex-direction: column; overflow: hidden; border: 1px solid #DCE7F5; border-radius: 22px; background: #fff; box-shadow: 0 24px 80px rgba(25,45,72,.22); }
.ep-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; background: #FFFCF6; }
.ep-modal-head h2 { margin: 0; color: #17365F; font-size: 19px; }
.ep-modal-head p { margin: 4px 0 0; color: #8295AE; font-size: 11px; line-height: 1.5; }
.ep-modal-close { width: 32px; height: 32px; border: 0; background: transparent; color: #7186A4; font-size: 24px; line-height: 1; cursor: pointer; }
.ep-modal-body { overflow: auto; padding: 28px 24px; flex: 1; }
.ep-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 22px; }
.ep-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.ep-field.full { grid-column: 1/-1; }
.ep-field label { color: #7186A4; font-size: 12px; font-weight: 650; }
.ep-field input,.ep-field textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid #D9E5F3; border-radius: 10px; background: #fff; color: #17365F; font: inherit; font-size: 13px; opacity: 1; }
.ep-field textarea { min-height: 68px; resize: none; line-height: 1.5; }
.ep-field input.is-missing,.ep-field textarea.is-missing { color: #96A6BA; }
.ep-field input:focus,.ep-field textarea:focus { outline: 2px solid rgba(23,102,214,.16); outline-offset: 1px; }
.ep-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px 18px; border-top: 1px solid #EDF2F8; }
.ep-modal-footer small { color: #8A9CB4; font-size: 10px; line-height: 1.5; }
.ep-modal-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.ep-modal-actions .btn { min-height: 38px; border-radius: 10px; }
.ep-modal-actions .btn-primary { border-color: #F49A19 !important; background: #F49A19 !important; color: #fff !important; }
.ep-modal-actions .btn:disabled { opacity: .52; cursor: not-allowed; }

/* Notification-center route: matches the approved list layout without inventing notification rows. */
.nc-head { align-items: flex-start; }
.nc-tabs { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.nc-tab { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid #DFE8F4; border-radius: 999px; background: #F8FAFD; color: #7186A4; font-size: 12px; font-weight: 650; white-space: nowrap; }
.nc-tab.active { border-color: #FFE3B3; background: #FFF3DE; color: #B46E00; }
.nc-toolbar { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(110px, .65fr)) 82px; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; }
.nc-search { display: flex; min-width: 0; height: 38px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #E1EAF5; border-radius: 9px; color: #91A4BC; }
.nc-search > span { font-size: 21px; line-height: 1; }
.nc-search input { width: 100%; min-width: 0; border: 0 !important; background: transparent !important; color: #7186A4 !important; font-size: 12px !important; outline: 0; }
.nc-search input::placeholder { color: #94A5BC; }
.nc-toolbar select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #E1EAF5; border-radius: 9px; background: #FFFFFF; color: #8A9CB4; font-size: 11px; }
.nc-toolbar :disabled { opacity: .78; cursor: not-allowed; }
.nc-toolbar .btn { min-height: 36px; padding: 0 12px; font-size: 11px; }
.nc-head > .btn:disabled { border-color: #A9BCD2 !important; background: #A9BCD2 !important; color: #FFFFFF !important; opacity: .72; cursor: not-allowed; }
.nc-list { min-height: 492px; overflow: hidden; padding: 0 !important; }
.nc-table-wrap { width: 100%; }
.nc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.nc-table th { height: 44px; padding: 0 14px; background: #F3F7FC; color: #7186A4; font-size: 11px; font-weight: 700; text-align: left; }
.nc-table th:first-child { width: 44%; }
.nc-table th:nth-child(2) { width: 22%; }
.nc-table th:nth-child(3) { width: 16%; }
.nc-table th:nth-child(4) { width: 18%; }
.nc-table td { padding: 0; border-top: 1px solid #E9EFF7; }
.nc-empty { display: flex; min-height: 440px; align-items: center; justify-content: center; flex-direction: column; padding: 24px; text-align: center; }
.nc-empty-icon { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: 14px; border-radius: 16px; background: #EAF3FF; color: var(--brand-primary); }
.nc-empty-icon svg { width: 24px; height: 24px; }
.nc-empty strong { color: var(--label); font-size: 15px; }
.nc-empty p { max-width: 440px; margin: 7px 0 12px; color: var(--secondary); font-size: 12px; line-height: 1.65; }
.nc-empty a { color: var(--brand-primary); font-size: 12px; font-weight: 650; text-decoration: none; }
.nc-empty a:hover { text-decoration: underline; }
.nc-footnote { margin-top: 10px; padding-right: 64px; color: #8A9CB4; font-size: 11px; line-height: 1.6; }

@media (max-width: 600px) {
  .nc-head { align-items: flex-start; }
  .nc-head > .btn { min-height: 34px; padding: 0 9px; font-size: 10px; white-space: nowrap; }
  .nc-page { padding-top: 12px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .nc-tabs { gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .nc-tab { min-height: 30px; padding: 0 10px; font-size: 10px; }
  .nc-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 8px; }
  .nc-search { grid-column: 1/-1; }
  .nc-toolbar .btn { min-height: 36px; }
  .nc-list { min-height: 340px; }
  .nc-table th { height: 38px; padding: 0 7px; font-size: 9px; }
  .nc-table th:first-child { width: 42%; }
  .nc-table th:nth-child(2) { width: 22%; }
  .nc-table th:nth-child(3) { width: 17%; }
  .nc-table th:nth-child(4) { width: 19%; }
  .nc-empty { min-height: 300px; padding: 18px 14px; }
  .nc-empty p { max-width: 300px; font-size: 11px; }
  .nc-footnote { font-size: 10px; }
  .lk-connect-preview { align-items: stretch; flex-direction: column; gap: 12px; padding: 14px; }
  .lk-connect-copy { align-items: flex-start; }
  .lk-connect-state { white-space: nowrap; }
  .lk-connect-preview > .btn { width: 100%; min-height: 40px; }
  .intg-modal-backdrop { align-items: flex-end; padding: 8px; }
  .intg-modal { width: 100%; max-height: calc(100dvh - 16px); border-radius: 18px; }
  .intg-modal-head { padding: 16px 17px 12px; }
  .intg-modal-head h2 { font-size: 17px; }
  .intg-modal-body { padding: 16px; }
  .intg-form { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .intg-field.full { grid-column: auto; }
  .intg-modal-footer { align-items: stretch; flex-direction: column; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .intg-modal-footer small { text-align: center; }
  .intg-modal-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .intg-modal-actions .btn { min-width: 0; padding: 8px 6px; font-size: 11px; }
  .ep-modal-backdrop { align-items: flex-end; padding: 8px; }
  .ep-modal { width: 100%; max-height: calc(100dvh - 16px); border-radius: 18px; }
  .ep-modal-head { padding: 16px 17px 12px; }
  .ep-modal-head h2 { font-size: 17px; }
  .ep-modal-body { padding: 16px; }
  .ep-form { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .ep-field.full { grid-column: auto; }
  .ep-modal-footer { align-items: stretch; flex-direction: column; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .ep-modal-footer small { text-align: center; }
  .ep-modal-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .ep-modal-actions .btn { min-width: 0; padding: 8px 6px; font-size: 11px; }
}
@media (max-width: 1024px) {
  .me-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .me-summary-grid { gap: 8px; }
  .me-summary-card { min-height: 86px; padding: 11px 10px 11px 14px; }
  .me-summary-card strong { font-size: 22px; }
  .me-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .me-privacy-card { align-items: flex-start; flex-direction: column; gap: 9px; padding: 13px; }
  .tdg-metrics { gap: 7px; }
  .tdg-metric { padding: 12px 9px; }
  .tdg-metric strong { font-size: 21px; }
  .tdg-metric span { font-size: 10px; }
}

/* Route-level backend availability: visible without implying sample data is live. */
.backend-status-banner { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 15px; border: 1px solid #F3D49A; border-left: 4px solid #EFA126; border-radius: 13px; background: #FFF9ED; color: #6D542B; font-size: 12px; line-height: 1.65; }
.backend-status-label { flex: 0 0 auto; color: #A66B10; font-size: 12px; font-weight: 750; white-space: nowrap; }
@media (max-width: 600px) { .backend-status-banner { gap: 7px; margin-bottom: 11px; padding: 10px 11px; font-size: 11px; line-height: 1.6; } .backend-status-label { font-size: 11px; } }
