:root {
  --bg: #fafafa; --surface: #fff; --surface2: #f4f4f5; --border: #e4e4e7;
  --text: #18181b; --text2: #52525b; --text3: #a1a1aa;
  --accent: #6366f1; --accent-hover: #4f46e5; --accent-light: rgba(99,102,241,0.08);
  --green: #16a34a; --green-bg: rgba(22,163,74,0.08);
  --orange: #d97706; --orange-bg: rgba(217,119,6,0.08);
  --red: #dc2626; --red-bg: rgba(220,38,38,0.08);
  --blue: #2563eb; --blue-bg: rgba(37,99,235,0.08);
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.06);
  --radius: 12px; --sidebar-w: 220px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'PingFang SC', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; }

/* Sidebar - Dark Theme */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 24px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo .icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.sidebar-logo span {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
}
.nav-group {
  margin: 8px 12px;
}
.nav-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 12px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 2px;
}
.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.2) 0%, rgba(139,92,246,0.15) 100%);
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,0.3);
}
.nav-item .badge {
  margin-left: auto;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.nav-item .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* Main */
.main { flex: 1; margin-left: var(--sidebar-w); }
.header { padding: 24px 32px 0; }
.header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; color: var(--text); }
.header p { font-size: 14px; color: var(--text3); }
.content { width: 100%; max-width: none; box-sizing: border-box; padding: 20px 32px 32px; }

/* Stats */
.stats { display: flex; gap: 12px; margin-bottom: 24px; }
.stat-card { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.stat-card:hover { box-shadow: var(--shadow-hover); }
.stat-card .label { font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.stat-card .value { font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.stat-card.c-pending .value { color: var(--orange); }
.stat-card.c-done .value { color: var(--green); }
.stat-card.c-total .value { color: var(--accent); }
.stat-card.c-pass .value { color: var(--green); }
.stat-card.c-reject .value { color: var(--red); }
.stat-card.c-wait .value { color: var(--orange); }

/* Card */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }

/* Add */
.add-row { display: flex; gap: 10px; }
.add-row + .add-row { margin-top: 10px; }
.add-row input[type="text"], .add-row textarea { flex: 1; background: var(--surface2); border: 1px solid transparent; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--text); outline: none; transition: all 0.2s; font-family: inherit; }
.add-row input::placeholder, .add-row textarea::placeholder { color: var(--text3); }
.add-row input:focus, .add-row textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-light); }
.add-row input[type="date"] { background: var(--surface2); border: 1px solid transparent; border-radius: 8px; padding: 10px 12px; font-size: 13px; outline: none; width: 150px; }
.add-row input[type="date"]:focus { border-color: var(--accent); background: var(--surface); }
.btn { padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text2); padding: 6px 14px; font-size: 13px; }
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--text3); }
.btn-ghost.active { background: rgba(15, 118, 110, 0.10); border-color: rgba(15, 118, 110, 0.28); color: var(--accent); }

/* Filter */
.filters { display: flex; gap: 6px; margin-bottom: 16px; }
.filter-btn { padding: 6px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; font-size: 13px; color: var(--text2); cursor: pointer; transition: all 0.15s; box-shadow: var(--shadow); }
.filter-btn:hover { border-color: #d4d4d8; color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.3); }

/* Todo */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; transition: all 0.2s; box-shadow: var(--shadow); animation: slideIn 0.25s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.todo-item:hover { box-shadow: var(--shadow-hover); border-color: #d4d4d8; }
.todo-main { display: flex; align-items: center; gap: 12px; }
.checkbox { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; }
.checkbox:hover { border-color: var(--accent); }
.todo-item.done .checkbox { background: var(--green); border-color: var(--green); }
.todo-item.done .checkbox::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 700; }
.text { flex: 1; font-size: 14px; line-height: 1.5; }
.todo-item.done .text { text-decoration: line-through; color: var(--text3); }
.delete { width: 26px; height: 26px; border: none; background: none; color: var(--text3); font-size: 16px; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.15s; }
.todo-item:hover .delete { opacity: 1; }
.delete:hover { background: var(--red-bg); color: var(--red); }
.todo-meta { display: flex; gap: 14px; margin-top: 8px; margin-left: 32px; font-size: 12px; }
.tag { padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.tag.due { background: var(--orange-bg); color: var(--orange); }
.tag.overdue { background: var(--red-bg); color: var(--red); }
.tag.completed { background: var(--green-bg); color: var(--green); }
.memo-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.memo-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.memo-note {
  margin-bottom: 16px;
  padding: 18px;
  border-color: rgba(15,118,110,0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
  box-shadow: 0 10px 30px rgba(15,118,110,0.08);
}
.memo-note-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.memo-note-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: 0; }
.memo-note-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.memo-note-actions { display: flex; align-items: center; gap: 8px; }
.memo-note-status { color: var(--text3); font-size: 12px; min-width: 78px; text-align: right; }
.memo-note-status.saving { color: var(--orange); }
.memo-note-status.saved { color: var(--green); }
.memo-note-status.error { color: var(--red); }
.memo-note-textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid rgba(15,118,110,0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.86);
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  padding: 14px 15px;
  outline: none;
}
.memo-note-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); background: var(--surface); }
.memo-compose { padding: 16px; }
.memo-compose-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 130px auto; gap: 10px; align-items: center; }
.memo-input, .memo-date, .memo-select, .memo-search { width: 100%; height: 42px; background: var(--surface2); border: 1px solid transparent; border-radius: 8px; padding: 0 12px; color: var(--text); font: inherit; outline: none; }
.memo-input:focus, .memo-date:focus, .memo-select:focus, .memo-search:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.memo-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.memo-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.memo-chip:hover { border-color: var(--accent); color: var(--accent); }
.memo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.memo-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.memo-filter { border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: 999px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.memo-filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.memo-list-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 8px; }
.memo-list-title { font-size: 15px; font-weight: 700; }
.memo-list-count { color: var(--text3); font-size: 12px; }
.memo-list { padding: 0 16px 16px; }
.memo-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-top: 10px; box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s; }
.memo-item:hover { border-color: #c5ccd8; box-shadow: var(--shadow-hover); }
.memo-item.done { background: #fafbfc; }
.memo-check { width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 7px; cursor: pointer; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.memo-check:hover { border-color: var(--accent); }
.memo-item.done .memo-check { background: var(--green); border-color: var(--green); color: #fff; }
.memo-item.done .memo-check::after { content: '✓'; font-size: 13px; font-weight: 800; }
.memo-text { font-size: 15px; line-height: 1.45; word-break: break-word; }
.memo-item.done .memo-text { color: var(--text3); text-decoration: line-through; }
.memo-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.memo-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; }
.memo-tag.high { background: var(--red-bg); color: var(--red); }
.memo-tag.normal { background: var(--blue-bg); color: var(--blue); }
.memo-tag.low { background: var(--green-bg); color: var(--green); }
.memo-action { border: 0; background: transparent; color: var(--text3); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.memo-action:hover { background: var(--red-bg); color: var(--red); }
.memo-empty { padding: 44px 16px 52px; text-align: center; color: var(--text3); }
.memo-empty strong { display: block; color: var(--text2); margin-bottom: 6px; font-size: 15px; }

/* OKCC */
.okcc-panel { padding: 20px; }
.okcc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.okcc-panel-title { font-size: 16px; font-weight: 700; }
.okcc-panel-subtitle { color: var(--text3); font-size: 13px; margin-top: 3px; }
.okcc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.okcc-card { position: relative; overflow: hidden; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.okcc-card::after { content: ""; position: absolute; right: -42px; top: -46px; width: 118px; height: 118px; border-radius: 50%; background: rgba(15, 118, 110, 0.08); }
.okcc-card:hover { border-color: rgba(15, 118, 110, 0.35); box-shadow: var(--shadow-hover); }
.okcc-card.is-pending { background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%); }
.okcc-server-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.okcc-server-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18); }
.okcc-server-name { margin-top: 14px; font-size: 18px; font-weight: 800; letter-spacing: 0; }
.okcc-server-domain { margin-top: 4px; color: var(--text3); font-size: 13px; }
.okcc-status { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(22, 163, 74, 0.18); background: var(--green-bg); color: var(--green); border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.okcc-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.okcc-status.pending { border-color: rgba(217, 119, 6, 0.18); background: var(--orange-bg); color: var(--orange); }
.okcc-card-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.okcc-note { color: var(--text3); font-size: 12px; line-height: 1.45; }
.okcc-login-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 104px; height: 38px; }
.okcc-login-btn.is-disabled { pointer-events: none; opacity: 0.58; background: var(--surface2); color: var(--text2); border: 1px solid var(--border); box-shadow: none; }
.okcc-settings-card { padding: 20px; margin-bottom: 16px; }
.okcc-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px 14px; }
.okcc-settings-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.okcc-settings-error { min-height: 20px; margin-top: 10px; color: var(--red); font-size: 13px; }

/* Phone auto query */
.phone-auto-webhook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.phone-auto-settings-grid { display: grid; grid-template-columns: 220px 220px minmax(220px, 1fr); gap: 12px 14px; align-items: end; }
.phone-auto-pause-grid { display: grid; grid-template-columns: 220px 220px minmax(220px, 1fr); gap: 12px 14px; align-items: end; margin-top: 12px; }
.phone-auto-toggle { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text2); font-size: 13px; font-weight: 600; }
.phone-auto-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.wps-settings-flow { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:stretch; margin:16px 0 18px; }
.wps-flow-lane { border:1px solid var(--border); border-radius:8px; background:var(--surface2); padding:12px; display:grid; gap:10px; }
.wps-flow-lane-title { color:var(--text2); font-size:13px; font-weight:800; }
.wps-flow-row { display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:10px; align-items:center; }
.wps-flow-node { min-height:68px; border:1px solid var(--border); border-radius:8px; background:var(--surface2); padding:12px 14px; display:grid; align-content:center; gap:5px; }
.wps-flow-lane .wps-flow-node { background:var(--surface); min-height:64px; }
.wps-flow-node strong { color:var(--text); font-size:15px; }
.wps-flow-node span { color:var(--text3); font-size:12px; }
.wps-flow-arrow { color:var(--accent); font-weight:800; font-size:20px; }
.wps-settings-layout { display:grid; grid-template-columns:minmax(320px,.8fr) minmax(320px,.82fr) minmax(560px,1.28fr); gap:16px; align-items:start; }
.wps-settings-panel { border:1px solid var(--border); border-radius:8px; background:var(--surface); padding:16px; }
.wps-settings-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.wps-settings-panel-head h3 { margin:0 0 4px; font-size:16px; color:var(--text); }
.wps-settings-panel-head p { margin:0; color:var(--text3); font-size:12px; line-height:1.45; }
.wps-settings-switches { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
#page-wpssettings .wecom-contact-panel { min-height:100%; display:grid; gap:12px; }
#page-wpssettings .wecom-contact-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
#page-wpssettings .wecom-contact-head h3 { margin:0 0 4px; font-size:16px; color:var(--text); }
#page-wpssettings .wecom-contact-head small { color:var(--text3); font-size:12px; line-height:1.45; }
#page-wpssettings .wecom-contact-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
#page-wpssettings .wecom-contact-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:end; }
#page-wpssettings .wecom-contact-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
#page-wpssettings .wecom-contact-summary span { min-height:38px; display:flex; align-items:center; padding:0 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface2); color:var(--text3); font-size:12px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#page-wpssettings .wecom-contact-summary strong { margin-left:4px; color:var(--text); font-weight:850; }
.wps-company-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.wps-company-card { border:1px solid var(--border); border-radius:8px; background:var(--surface2); padding:12px; display:grid; gap:8px; }
.wps-company-card h4 { margin:0; font-size:14px; color:var(--text); }
.wps-company-card .account-input { height:38px; }
.wps-settings-status { margin-top:12px; color:var(--text3); font-size:13px; }
.wecom-recharge-toolbar { display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
body:has(#page-wecomrecharge.active) { background:#edf3f9; }
body:has(#page-wecomrecharge.active) .sidebar { background:#f8fbff; border-right:1px solid #d9e4ef; box-shadow:none; }
body:has(#page-wecomrecharge.active) .sidebar-logo { background:#f8fbff; border-bottom:1px solid #d9e4ef; }
body:has(#page-wecomrecharge.active) .sidebar-logo .icon { background:#40a9c8; box-shadow:none; }
body:has(#page-wecomrecharge.active) .sidebar-logo span { color:#0b1b32; }
body:has(#page-wecomrecharge.active) .nav-label { color:#7e8da3; }
body:has(#page-wecomrecharge.active) .nav-item { color:#5f7088; }
body:has(#page-wecomrecharge.active) .nav-item:hover { background:#eef5fb; color:#0b1b32; }
body:has(#page-wecomrecharge.active) .nav-item.active { background:linear-gradient(180deg,#139984 0%,#087d70 100%); color:#fff; box-shadow:0 10px 20px rgba(8,125,112,0.16); }
#page-wecomrecharge.page.active .main { min-height:100vh; background:#edf3f9; }
#page-wecomrecharge .wecom-recharge-appbar { padding:8px 32px 0; }
#page-wecomrecharge .wecom-recharge-appbar-inner { min-height:52px; display:flex; align-items:center; justify-content:flex-end; gap:10px; background:#fff; border:1px solid #d9e4ef; border-radius:10px; padding:10px 12px; box-shadow:0 8px 20px rgba(20,49,88,0.04); }
#page-wecomrecharge .wecom-recharge-appbar-title { margin-right:auto; color:#0b1b32; font-size:14px; font-weight:800; }
#page-wecomrecharge .wecom-recharge-appbar-sub { color:#7e8da3; font-size:12px; font-weight:700; margin-left:8px; }
#page-wecomrecharge .content.wecom-recharge-content { max-width:none; padding:20px 32px 38px; }
.wecom-recharge-overview { background:#fff; border:1px solid #d9e4ef; border-radius:12px; padding:18px; margin-bottom:20px; box-shadow:0 16px 36px rgba(20,49,88,0.06); }
.wecom-recharge-section-title { color:#10223a; font-size:17px; font-weight:900; letter-spacing:.01em; }
.wecom-recharge-section-subtitle { color:#7e8da3; font-size:13px; line-height:1.55; margin-top:4px; }
.wecom-recharge-config-line { display:none; }
.wecom-recharge-status-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-top:18px; }
.wecom-recharge-status-card { min-height:128px; border:1px solid #d9e4ef; border-radius:22px; padding:20px 22px; display:grid; align-content:center; gap:8px; }
.wecom-recharge-status-card.pending { background:linear-gradient(180deg,#fff1f3 0%,#ffe7eb 100%); border-color:#ffc8d1; }
.wecom-recharge-status-card.running { background:linear-gradient(180deg,#fff8ea 0%,#ffedd2 100%); border-color:#ffdca8; }
.wecom-recharge-status-card.success { background:linear-gradient(180deg,#e7fff2 0%,#d1f8df 100%); border-color:#b2ecc8; }
.wecom-recharge-status-card.failure { background:linear-gradient(180deg,#f3f7fb 0%,#e1e9f2 100%); border-color:#cfdae8; }
.wecom-recharge-status-label { color:#263951; font-size:13px; font-weight:900; }
.wecom-recharge-status-value { color:#0d1b31; font-size:38px; line-height:1; font-weight:950; letter-spacing:-1.4px; }
.wecom-recharge-status-note { color:#53667f; font-size:13px; font-weight:700; }
.wecom-recharge-summary { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.wecom-recharge-pill { display:inline-flex; align-items:center; min-height:36px; border:1px solid #d8e4f0; border-radius:999px; background:#f8fbff; color:#53667f; padding:0 14px; font-size:13px; font-weight:800; box-shadow:0 3px 10px rgba(20,49,88,0.03); }
.wecom-recharge-pill strong { color:#10223a; margin-left:4px; }
.wecom-recharge-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; }
.wecom-recharge-queue-card { background:#fff; border:1px solid #d9e4ef; border-radius:12px; padding:18px; box-shadow:0 16px 36px rgba(20,49,88,0.06); }
.wecom-recharge-queue-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:14px; }
.wecom-recharge-filterbar { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.wecom-recharge-filter-group { display:flex; align-items:center; gap:8px; color:#53667f; font-size:13px; font-weight:800; }
.wecom-recharge-filter-label { color:#53667f; font-size:13px; font-weight:900; }
.wecom-recharge-filter-btn { min-height:38px; padding:0 15px; border:1px solid #d8e4f0; border-radius:9px; background:#fff; color:#53667f; font-size:13px; font-weight:900; cursor:pointer; transition:all .15s ease; }
.wecom-recharge-filter-btn:hover { border-color:#a8b8ca; color:#10223a; background:#f8fbff; }
.wecom-recharge-filter-btn.active { background:#0b8f7d; border-color:#0b8f7d; color:#fff; box-shadow:0 8px 18px rgba(11,143,125,.16); }
.wecom-recharge-search { width:250px; height:38px; border:1px solid transparent; border-radius:9px; background:#f5f8fc; padding:0 14px; color:#10223a; font:inherit; font-size:13px; outline:none; }
.wecom-recharge-search:focus { background:#fff; border-color:#0b8f7d; box-shadow:0 0 0 3px rgba(11,143,125,.10); }
.wecom-recharge-table-wrap { border:1px solid #d9e4ef; border-radius:18px; overflow:auto; background:#fff; }
.wecom-recharge-table { width:100%; border-collapse:separate; border-spacing:0; min-width:1240px; font-size:13px; }
.wecom-recharge-table th, .wecom-recharge-table td { padding:14px 15px; border-bottom:1px solid #dce6f1; text-align:left; vertical-align:middle; }
.wecom-recharge-table th { color:#667890; font-size:12px; background:#f7faff; font-weight:900; }
.wecom-recharge-table th { white-space:nowrap; }
.wecom-recharge-table th:nth-child(8), .wecom-recharge-table td:nth-child(8) { min-width:136px; }
.wecom-recharge-table th:nth-child(9), .wecom-recharge-table td:nth-child(9) { min-width:126px; }
.wecom-recharge-table th:first-child { border-top-left-radius:18px; }
.wecom-recharge-table th:last-child { border-top-right-radius:18px; }
.wecom-recharge-table tr:last-child td { border-bottom:none; }
.wecom-recharge-table td { color:#10223a; }
.wecom-recharge-muted { color:#7e8da3; font-size:12px; line-height:1.5; }
.wecom-recharge-business-tag { display:inline-flex; align-items:center; min-height:26px; padding:0 10px; border-radius:999px; border:1px solid #b9edf0; background:#e8fbfd; color:#057783; font-size:12px; font-weight:900; }
.wecom-recharge-business-tag.robot { border-color:#c6defa; background:#edf5ff; color:#1f62c7; }
.wecom-recharge-business-tag.line { border-color:#d6e0ee; background:#f3f7fb; color:#4b617d; }
.wecom-recharge-business-tag.open { border-color:#c8efe0; background:#e9fbf2; color:#0b805f; }
.wecom-recharge-status-tag { display:inline-flex; align-items:center; justify-content:center; min-height:26px; padding:0 10px; border-radius:999px; font-size:12px; font-weight:950; }
.wecom-recharge-status-tag.pending { background:#ffe9ee; color:#e11d48; }
.wecom-recharge-status-tag.running { background:#fff0d4; color:#d97706; }
.wecom-recharge-status-tag.success { background:#dcfce7; color:#15803d; }
.wecom-recharge-status-tag.failure { background:#fee2e2; color:#b91c1c; }
.wecom-recharge-status-tag.neutral { background:#edf2f7; color:#52657d; }
.wecom-recharge-actions { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.wecom-recharge-row-action { min-width:48px; min-height:34px; padding:0 11px; border-radius:9px; border:1px solid #d8e4f0; background:#fff; color:#53667f; font-size:12px; font-weight:900; cursor:pointer; white-space:nowrap; }
.wecom-recharge-row-action.primary { background:#0b8f7d; border-color:#0b8f7d; color:#fff; box-shadow:0 8px 16px rgba(11,143,125,.14); }
.wecom-recharge-row-action:disabled { opacity:.45; cursor:not-allowed; box-shadow:none; }
.wecom-recharge-pager { margin-top:14px; color:#53667f; font-size:13px; font-weight:700; }
.wecom-recharge-preview-box { min-height:96px; border:1px dashed #d9e4ef; border-radius:12px; background:#f7faff; padding:14px; color:#53667f; line-height:1.65; font-size:13px; }
@media (max-width:1100px) {
  .wps-settings-flow { grid-template-columns:1fr; }
  .wps-flow-row { grid-template-columns:1fr; }
  .wps-flow-arrow { display:none; }
  .wps-settings-layout { grid-template-columns:1fr; }
  .wps-company-grid { grid-template-columns:1fr; }
  .wecom-recharge-grid { grid-template-columns:1fr; }
  .wecom-recharge-status-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wecom-recharge-queue-head { display:grid; }
  .wecom-recharge-filterbar { justify-content:flex-start; }
  .wecom-recharge-search { width:100%; }
}
.phone-auto-test-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px 16px; align-items: start; margin-top: 12px; }
.phone-auto-debug-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; }
.phone-auto-debug-hint { color: var(--text3); font-size: 12px; }
.phone-auto-settings-note { margin-top: 10px; color: var(--text3); font-size: 12px; line-height: 1.6; }
.phone-auto-template-box { margin-top: 12px; display: grid; gap: 8px; }
.phone-auto-template-help { color: var(--text3); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.phone-auto-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.phone-auto-status-card { padding: 18px 20px; }
.phone-auto-status-label { color: var(--text3); font-size: 12px; }
.phone-auto-status-value { margin-top: 8px; font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.1; }
.phone-auto-status-sub { margin-top: 6px; color: var(--text3); font-size: 12px; line-height: 1.45; }
.phone-auto-panel-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.phone-auto-panel-grid.layout-balance { grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); }
.phone-auto-log-card { grid-column: 1 / -1; }
.module-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 2px 0 12px; }
.module-section-copy h3 { font-size: 16px; margin: 0 0 4px; }
.module-section-copy p { color: var(--text3); font-size: 12px; line-height: 1.55; margin: 0; }
.phone-auto-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.phone-auto-row:last-child { border-bottom: 0; }
.phone-auto-row-label { color: var(--text3); font-size: 12px; }
.phone-auto-row-value { color: var(--text); font-size: 13px; font-weight: 700; text-align: right; line-height: 1.5; word-break: break-all; }
.phone-auto-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.phone-auto-log-list { display: grid; gap: 10px; max-height: calc(100vh - 320px); overflow: auto; padding-right: 2px; }
.phone-auto-log-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px; box-shadow: var(--shadow); }
.phone-auto-log-item.is-error { border-color: rgba(220,38,38,0.2); background: #fff8f8; }
.phone-auto-log-item.is-success { border-color: rgba(22,163,74,0.18); background: #f7fcf9; }
.phone-auto-log-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.phone-auto-log-title { font-size: 14px; font-weight: 800; color: var(--text); }
.phone-auto-log-time { color: var(--text3); font-size: 12px; }
.phone-auto-log-meta { color: var(--text2); font-size: 13px; line-height: 1.6; }
.phone-auto-log-detail { margin-top: 6px; color: var(--text3); font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.phone-auto-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; }
.phone-auto-badge.success { background: var(--green-bg); color: var(--green); }
.phone-auto-badge.warn { background: var(--orange-bg); color: var(--orange); }
.phone-auto-badge.error { background: var(--red-bg); color: var(--red); }

/* Customer system links */
.customer-link-layout { display: grid; gap: 16px; align-items: start; }
.customer-link-add-panel { padding: 18px 20px; }
.customer-link-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.customer-link-section-title { font-size: 16px; font-weight: 800; color: var(--text); }
.customer-link-section-subtitle { margin-top: 3px; color: var(--text3); font-size: 12px; }
.customer-link-form { display: grid; gap: 12px; }
.customer-link-form-inline { grid-template-columns: minmax(180px, 1.05fr) minmax(180px, 1fr) 130px minmax(220px, 1.15fr) minmax(180px, 1fr) max-content; align-items: start; }
.customer-link-field label { display: block; margin-bottom: 6px; color: var(--text2); font-size: 13px; font-weight: 600; }
.customer-link-input, .customer-link-textarea, .customer-link-search { width: 100%; border: 1px solid var(--border); border-radius: 8px; background: var(--surface2); color: var(--text); font: inherit; outline: none; }
.customer-link-input, .customer-link-search { height: 42px; padding: 0 12px; }
.customer-link-textarea { min-height: 82px; resize: vertical; padding: 10px 12px; line-height: 1.5; }
.customer-link-input:focus, .customer-link-textarea:focus, .customer-link-search:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.customer-link-key-upload { height: 42px; border: 1px dashed var(--border); border-radius: 8px; background: var(--surface2); color: var(--text2); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; cursor: pointer; font-size: 13px; font-weight: 700; }
.customer-link-key-upload:hover { border-color: rgba(15, 118, 110, 0.45); color: var(--accent); background: var(--accent-light); }
.customer-link-key-upload input { display: none; }
.customer-link-key-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-link-key-status { color: var(--text3); font-size: 12px; margin-top: 6px; min-height: 16px; }
.customer-link-field .customer-link-remove-key { display: none; align-items: center; gap: 6px; color: var(--text3); font-size: 12px; margin-top: 4px; }
.customer-link-field .customer-link-remove-key.is-visible { display: flex; }
.customer-link-actions { display: flex; gap: 10px; align-items: center; align-self: start; padding-top: 25px; }
.customer-link-actions .btn, .customer-link-actions .btn-ghost { height: 42px; display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; }
.customer-link-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.customer-link-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.customer-link-summary-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); color: var(--text2); font-size: 12px; font-weight: 700; }
.customer-link-summary-chip.ok { border-color: rgba(22, 163, 74, 0.18); background: var(--green-bg); color: var(--green); }
.customer-link-summary-chip.warn { border-color: rgba(217, 119, 6, 0.18); background: var(--orange-bg); color: var(--orange); }
.customer-link-summary-chip.critical { border-color: rgba(220, 38, 38, 0.18); background: var(--red-bg); color: var(--red); }
.customer-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.customer-link-card { position: relative; overflow: hidden; min-height: 174px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.customer-link-card::after { content: ""; position: absolute; right: -46px; top: -50px; width: 122px; height: 122px; border-radius: 50%; background: rgba(15, 118, 110, 0.08); }
.customer-link-card:hover { border-color: rgba(15,118,110,0.35); box-shadow: var(--shadow-hover); }
.customer-link-card.is-warn { border-color: rgba(217, 119, 6, 0.35); background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%); }
.customer-link-card.is-critical { border-color: rgba(220, 38, 38, 0.35); background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%); }
.customer-link-card.is-offline { border-color: rgba(220, 38, 38, 0.42); background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%); }
.customer-link-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.customer-link-card-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; position: relative; z-index: 1; }
.customer-link-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; box-shadow: 0 6px 14px rgba(15, 118, 110, 0.16); flex: none; }
.customer-link-name { font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.35; }
.customer-link-system { margin-top: 3px; color: var(--text3); font-size: 12px; word-break: break-all; }
.customer-link-status { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(22, 163, 74, 0.18); background: var(--green-bg); color: var(--green); border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; }
.customer-link-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.customer-link-status.warn { border-color: rgba(217, 119, 6, 0.18); background: var(--orange-bg); color: var(--orange); }
.customer-link-status.critical { border-color: rgba(220, 38, 38, 0.18); background: var(--red-bg); color: var(--red); }
.customer-link-status.offline { border-color: rgba(220, 38, 38, 0.18); background: var(--red-bg); color: var(--red); }
.customer-link-status.pending { border-color: rgba(37, 99, 235, 0.18); background: var(--blue-bg); color: var(--blue); }
.customer-link-detail { position: relative; z-index: 1; display: grid; gap: 7px; }
.customer-link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text3); font-size: 12px; }
.customer-link-row strong { color: var(--text); font-size: 13px; text-align: right; word-break: break-all; }
.customer-link-row button { border: none; background: transparent; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; flex: none; }
.customer-link-preview { position: relative; z-index: 1; display: grid; gap: 7px; padding: 10px 11px; border: 1px solid rgba(15, 118, 110, 0.12); border-radius: 10px; background: rgba(255,255,255,0.78); }
.customer-link-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.customer-link-preview-title { color: var(--text3); font-size: 12px; }
.customer-link-preview-label { color: var(--text); font-size: 14px; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.customer-link-preview-time { color: var(--text3); font-size: 11px; text-align: right; }
.customer-link-preview-meta { color: var(--text3); font-size: 12px; line-height: 1.45; }
.customer-link-preview-note { color: var(--orange); font-size: 12px; line-height: 1.45; }
.customer-link-port-list { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-link-port { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); color: var(--text2); font-size: 11px; font-weight: 700; }
.customer-link-port.online { border-color: rgba(22, 163, 74, 0.18); background: var(--green-bg); color: var(--green); }
.customer-link-port.offline { border-color: rgba(220, 38, 38, 0.18); background: var(--red-bg); color: var(--red); }
.customer-link-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.customer-link-metric { border: 1px solid rgba(15, 118, 110, 0.12); border-radius: 10px; background: rgba(255,255,255,0.74); padding: 9px 10px; min-height: 74px; }
.customer-link-metric-label { color: var(--text3); font-size: 11px; line-height: 1.2; }
.customer-link-metric-value { margin-top: 6px; color: var(--text); font-size: 18px; font-weight: 800; line-height: 1.1; }
.customer-link-metric-sub { margin-top: 5px; color: var(--text3); font-size: 11px; line-height: 1.35; }
.customer-link-alerts { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-link-alert { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; }
.customer-link-alert.warn { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(217, 119, 6, 0.18); }
.customer-link-alert.critical { background: var(--red-bg); color: var(--red); border: 1px solid rgba(220, 38, 38, 0.18); }
.customer-link-meta { color: var(--text3); font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.customer-link-buttons { position: relative; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.customer-link-download { text-decoration: none; min-width: 82px; display: inline-flex; align-items: center; justify-content: center; }
.customer-link-download.is-disabled { pointer-events: none; opacity: 0.5; }
.customer-link-empty { padding: 46px 20px; text-align: center; color: var(--text3); border: 1px dashed var(--border); border-radius: 10px; background: var(--surface); }

/* Auth */
body.auth-pending .sidebar,
body.auth-pending .top-hub,
body.auth-pending .page,
body.authenticated .auth-screen { display: none !important; }
.auth-screen { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; background: radial-gradient(circle at top left, rgba(15,118,110,0.12), transparent 34%), var(--bg); padding: 24px; }
body.auth-pending.show-auth-screen .auth-screen { display: grid !important; }
.auth-card { width: min(430px, 100%); background: rgba(255,255,255,0.97); border: 1px solid rgba(223,231,240,0.96); border-radius: 22px; box-shadow: 0 24px 56px rgba(20,31,45,0.12); padding: 30px; }
.auth-logo { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #2f80ed 0%, #33c2b0 100%); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 800; margin-bottom: 18px; }
.auth-card h1 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; letter-spacing: 0; }
.auth-card p { color: var(--text3); font-size: 14px; line-height: 1.7; margin-bottom: 22px; }
.auth-field { display: grid; gap: 7px; margin-bottom: 13px; }
.auth-field label { font-size: 13px; color: var(--text2); font-weight: 600; }
.auth-field input { width: 100%; height: 42px; border: 1px solid transparent; background: var(--surface2); border-radius: 8px; padding: 0 12px; outline: none; font: inherit; }
.auth-field input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.auth-error { min-height: 18px; color: var(--red); font-size: 13px; margin: 4px 0 12px; }
.auth-user { padding: 10px 12px; margin: 0 8px 8px; border-radius: 10px; background: rgba(16,32,51,0.04); color: var(--text3); font-size: 11px; line-height: 1.45; }
.auth-user strong { display: block; color: var(--text2); font-size: 12px; }
.logout-btn { width: calc(100% - 24px); margin: 0 12px 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.74); border-radius: 8px; padding: 9px 10px; cursor: pointer; }
.logout-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* Phone Query */
#page-phone .main {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-phone .content {
  flex: 1;
  min-height: 0;
  max-width: none;
  width: 100%;
  overflow: hidden;
}

.phone-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.phone-header-copy {
  min-width: 0;
}

.phone-input { width: 100%; min-height: 120px; max-height: 220px; resize: vertical; }
.result-table { width: 100%; border-collapse: collapse; }
.result-table th { text-align: left; padding: 10px 14px; font-size: 12px; color: var(--text3); font-weight: 600; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.5px; }
.result-table td { padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--surface2); }
.result-table tr:nth-child(even) td { background: var(--surface2); }
.result-table tr:hover td { background: #eef2ff; }
.status-tag { padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; display: inline-block; }
.status-tag.pass { background: var(--green-bg); color: var(--green); }
.status-tag.reject { background: var(--red-bg); color: var(--red); }
.status-tag.pending { background: var(--orange-bg); color: var(--orange); }
.status-tag.other { background: var(--blue-bg); color: var(--blue); }
.query-tip { font-size: 13px; color: var(--text3); margin-bottom: 12px; line-height: 1.6; }
.loading { text-align: center; padding: 30px; color: var(--text3); }
.loading .spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.phone-layout {
  height: 100%;
  min-height: 0;
}

.phone-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: none;
}

.phone-shortcut {
  width: auto;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text2);
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.phone-shortcut:hover {
  border-color: rgba(15, 118, 110, 0.32);
  color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.phone-shortcut-icon {
  display: none;
}

.phone-shortcut br {
  display: none;
}

.phone-main-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}

#page-phone .stats {
  margin-bottom: 0;
  gap: 10px;
}

#page-phone .stat-card {
  padding: 12px 18px;
  min-height: 92px;
}

#page-phone .stat-card .label {
  margin-bottom: 4px;
  font-size: 11px;
}

#page-phone .stat-card .value {
  font-size: 20px;
  line-height: 1.05;
}

.phone-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  min-height: 0;
  align-items: stretch;
}

.phone-query-pane,
.phone-history-pane {
  min-height: 0;
}

.phone-query-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.phone-query-card {
  margin-bottom: 0;
  padding: 14px;
}

.phone-query-actions {
  flex-wrap: wrap;
}

#queryResult {
  min-height: 0;
  overflow: hidden;
  padding-right: 4px;
}

#queryResult > .card {
  margin-bottom: 0;
  height: 100%;
}

.phone-result-card {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.phone-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.phone-result-titleline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.phone-result-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.phone-result-meta,
.phone-result-count {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
}

.phone-result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.phone-result-actions .btn-ghost {
  min-height: 30px;
  padding: 0 12px;
}

.phone-result-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.phone-result-table-scroll .result-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.phone-result-head-select {
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 8px;
  background: #fff;
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
}

.phone-history-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.phone-history-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.phone-history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.phone-history-search {
  width: 100%;
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  margin-bottom: 12px;
}

#historyBody {
  flex: 1;
  min-height: 0;
  overflow: auto;
  font-size: 13px;
  padding-right: 4px;
}

#historyEmpty {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-upload-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(360px, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.phone-upload-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.phone-upload-file {
  min-height: 44px;
  border: 1px dashed rgba(15,118,110,0.34);
  border-radius: 8px;
  background: rgba(15,118,110,0.06);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  cursor: pointer;
}

.phone-upload-file input { display: none; }

.phone-upload-meta {
  color: var(--text3);
  font-size: 13px;
  line-height: 1.6;
}

.phone-upload-meta strong {
  color: var(--text);
}

.phone-upload-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.phone-upload-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  max-height: calc(100vh - 420px);
  min-height: 260px;
}

#page-phoneupload .main {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-phoneupload .content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 20px;
}

#page-phoneupload {
  height: 100dvh;
  overflow: hidden;
}

#page-phoneupload .card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-phoneupload .phone-upload-table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#page-selfsubmit .content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 20px;
}

#page-selfsubmit {
  height: 100dvh;
  overflow: hidden;
}

#page-selfsubmit .main {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-selfsubmit .selfsubmit-workspace {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 20px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#page-selfsubmit .selfsubmit-frame-card {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 16px 16px;
}

#page-selfsubmit .selfsubmit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#page-selfsubmit .selfsubmit-toolbar strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

#page-selfsubmit .selfsubmit-toolbar span {
  display: block;
  margin-top: 2px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 650;
}

#page-selfsubmit .selfsubmit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#page-selfsubmit .selfsubmit-frame {
  width: 100%;
  flex: 1 1 auto;
  min-height: 500px;
  border: 0;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.76);
}

#page-selfsubmit .selfsubmit-mode-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px;
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.76);
  border: 1px solid rgba(219, 234, 254, 0.9);
}

#page-selfsubmit .selfsubmit-mode-pill {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-mode-pill.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

#page-selfsubmit .selfsubmit-warning {
  display: block;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.78);
  border-color: rgba(20, 184, 166, 0.18);
}

#page-selfsubmit .selfsubmit-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 12px;
  align-items: stretch;
}

#page-selfsubmit .selfsubmit-result-card,
#page-selfsubmit .selfsubmit-helper-card {
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

#page-selfsubmit .selfsubmit-result-card strong,
#page-selfsubmit .selfsubmit-helper-card strong {
  display: block;
  color: #102033;
  font-size: 14px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-result-card pre {
  margin: 8px 0 0;
  max-height: 126px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #64748b;
  font: 800 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#page-selfsubmit .selfsubmit-helper-card p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

#page-selfsubmit .selfsubmit-compact-meta {
  margin-top: 4px;
  color: #8a99ad;
  font-size: 12px;
  font-weight: 800;
}

#page-selfsubmit .selfsubmit-frame-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#page-selfsubmit .selfsubmit-link-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#page-selfsubmit .selfsubmit-link-btn:disabled {
  color: #94a3b8;
  background: rgba(241, 245, 249, 0.72);
  cursor: not-allowed;
  opacity: 0.68;
}

#page-selfsubmit .selfsubmit-mode-tabs {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 4px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

#page-selfsubmit .selfsubmit-mode-tab {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

#page-selfsubmit .selfsubmit-mode-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0f9488 0%, #08766d 100%);
  box-shadow: 0 12px 24px rgba(15, 148, 136, 0.2);
}

#page-selfsubmit .selfsubmit-mode-tab:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

#page-selfsubmit .selfsubmit-hero-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(219, 234, 254, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.18);
  font-size: 12px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-operation-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 12px;
}

#page-selfsubmit .selfsubmit-operation-card {
  padding: 14px 16px;
}

#page-selfsubmit .selfsubmit-operation-card .phone-upload-primary-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#page-selfsubmit .selfsubmit-secondary-action {
  min-height: 72px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  color: #2563eb;
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

#page-selfsubmit .selfsubmit-secondary-action span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

#page-selfsubmit .selfsubmit-mini-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.68);
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.6;
}

#page-selfsubmit .selfsubmit-mini-facts div::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  vertical-align: 2px;
  border-radius: 999px;
  background: #2563eb;
}

#page-selfsubmit .selfsubmit-material-card {
  padding: 14px 16px;
}

#page-selfsubmit .selfsubmit-material-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

#page-selfsubmit .selfsubmit-material-head h3,
#page-selfsubmit .selfsubmit-operation-card h3,
#page-selfsubmit .selfsubmit-batch-card h3 {
  margin: 0;
  color: #102033;
  font-size: 16px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-material-head p,
#page-selfsubmit .selfsubmit-operation-card p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

#page-selfsubmit .selfsubmit-material-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

#page-selfsubmit .selfsubmit-package-box {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

#page-selfsubmit .selfsubmit-package-box.is-warn {
  border-color: rgba(251, 146, 60, 0.32);
  background: rgba(255, 247, 237, 0.52);
}

#page-selfsubmit .selfsubmit-package-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px;
  color: #102033;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-package-title span {
  color: #0f9488;
}

#page-selfsubmit .selfsubmit-package-box.is-warn .selfsubmit-package-title span {
  color: #ea580c;
}

#page-selfsubmit .selfsubmit-package-list {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

#page-selfsubmit .selfsubmit-package-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#page-selfsubmit .selfsubmit-package-list em {
  color: #16a34a;
  font-style: normal;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-package-list .is-missing em {
  color: #ea580c;
}

#page-selfsubmit .selfsubmit-batch-card {
  padding: 14px 16px;
}

#page-selfsubmit .selfsubmit-batch-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

#page-selfsubmit .selfsubmit-batch-table-wrap {
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 16px;
}

#page-selfsubmit .selfsubmit-batch-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

#page-selfsubmit .selfsubmit-batch-table th,
#page-selfsubmit .selfsubmit-batch-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  text-align: left;
}

#page-selfsubmit .selfsubmit-batch-table th {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  background: rgba(248, 250, 252, 0.76);
}

#page-selfsubmit .selfsubmit-batch-table td {
  color: #102033;
  font-size: 13px;
  font-weight: 750;
}

#page-selfsubmit .selfsubmit-batch-table tbody tr:hover td {
  background: rgba(239, 246, 255, 0.72);
}

#page-selfsubmit .selfsubmit-inline-select {
  max-width: 240px;
  min-height: 36px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #102033;
  font-weight: 850;
}

#page-selfsubmit .selfsubmit-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

#page-selfsubmit .selfsubmit-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

#page-selfsubmit .selfsubmit-field input,
#page-selfsubmit .selfsubmit-field textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  color: #0f172a;
  font-weight: 750;
  outline: none;
}

#page-selfsubmit .selfsubmit-field input:focus,
#page-selfsubmit .selfsubmit-field textarea:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

#page-selfsubmit .selfsubmit-primary-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#page-selfsubmit .selfsubmit-company-picker {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

#page-selfsubmit .selfsubmit-company-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

#page-selfsubmit .selfsubmit-company-option {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

#page-selfsubmit .selfsubmit-company-option.is-active {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.82));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12);
}

#page-selfsubmit .selfsubmit-company-option.is-unavailable {
  border-color: rgba(251, 146, 60, 0.28);
  background: rgba(255, 247, 237, 0.78);
}

#page-selfsubmit .selfsubmit-company-option strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-company-option .meta {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

#page-selfsubmit .selfsubmit-company-option .summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#page-selfsubmit .selfsubmit-company-option .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#page-selfsubmit .selfsubmit-company-option .badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.72);
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-company-option .badge.is-ready {
  background: rgba(220, 252, 231, 0.86);
  color: #15803d;
}

#page-selfsubmit .selfsubmit-company-option .badge.is-warn {
  background: rgba(255, 237, 213, 0.9);
  color: #c2410c;
}

#page-selfsubmit .selfsubmit-blocking-card {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 18px;
  background: rgba(255, 251, 235, 0.86);
}

#page-selfsubmit .selfsubmit-blocking-card strong {
  display: block;
  color: #7c2d12;
  font-size: 14px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-blocking-card p {
  margin: 8px 0 0;
  color: #9a3412;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.6;
}

#page-selfsubmit .selfsubmit-blocking-card.is-success {
  border-color: rgba(16, 185, 129, 0.24);
  background: rgba(236, 253, 245, 0.92);
}

#page-selfsubmit .selfsubmit-blocking-card.is-success strong,
#page-selfsubmit .selfsubmit-blocking-card.is-success p {
  color: #047857;
}

#page-selfsubmit .selfsubmit-blocking-card.is-info {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(239, 246, 255, 0.92);
}

#page-selfsubmit .selfsubmit-blocking-card.is-info strong,
#page-selfsubmit .selfsubmit-blocking-card.is-info p {
  color: #1d4ed8;
}

#page-selfsubmit .selfsubmit-component-list {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

#page-selfsubmit .selfsubmit-component-row {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

#page-selfsubmit .selfsubmit-component-row.is-upload {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.92), rgba(255, 255, 255, 0.76));
}

#page-selfsubmit .selfsubmit-material-tip {
  margin: -2px 0 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

#page-selfsubmit .selfsubmit-component-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#page-selfsubmit .selfsubmit-component-title strong {
  color: #0f172a;
  font-size: 14px;
}

#page-selfsubmit .selfsubmit-component-title span {
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(37, 99, 235, 0.10);
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

#page-selfsubmit .selfsubmit-upload-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#page-selfsubmit .selfsubmit-upload-fileid {
  margin-top: 8px;
  color: #059669;
  font-size: 12px;
  font-weight: 800;
  word-break: break-all;
}

#page-selfsubmit .selfsubmit-material-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.78);
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-material-status.is-ready {
  background: rgba(220, 252, 231, 0.92);
  color: #15803d;
}

#page-selfsubmit .selfsubmit-material-status.is-warn {
  background: rgba(254, 243, 199, 0.94);
  color: #b45309;
}

#page-selfsubmit .selfsubmit-material-status.is-missing {
  background: rgba(254, 226, 226, 0.92);
  color: #b91c1c;
}

#page-selfsubmit .selfsubmit-material-reason {
  margin-top: 8px;
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

#page-selfsubmit .selfsubmit-helper-card button {
  margin-top: 12px;
}

/* 2026-09-15：自备号提交页重构（左侧企业列表 + 右侧业务报备工作区） */
#page-selfsubmit [hidden] { display: none !important; }
#page-selfsubmit .ss2-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; align-items: start; }
#page-selfsubmit .ss2-companies { padding: 14px 16px; position: sticky; top: 10px; z-index: 2; }
#page-selfsubmit .ss2-companies .selfsubmit-company-picker { margin: 12px 0 0; }
#page-selfsubmit .ss2-companies .selfsubmit-company-list { max-height: calc(100vh - 250px); }
#page-selfsubmit .ss2-main,
#page-selfsubmit .ss2-workspace { display: grid; gap: 12px; min-width: 0; }
#page-selfsubmit .ss2-card,
#page-selfsubmit .ss2-overview { padding: 14px 16px; }
#page-selfsubmit .ss2-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#page-selfsubmit .ss2-card-head h3 { margin: 0; color: #102033; font-size: 16px; font-weight: 900; }
#page-selfsubmit .ss2-card-head p { margin: 4px 0 0; color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-selfsubmit .ss2-inline { display: flex; align-items: center; gap: 10px; }
#page-selfsubmit .ss2-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(148, 163, 184, 0.18); background: rgba(226, 232, 240, 0.72); color: #475569; font-size: 12px; font-weight: 900; white-space: nowrap; box-sizing: border-box; }
#page-selfsubmit .ss2-pill.is-ready { background: rgba(220, 252, 231, 0.92); color: #15803d; border-color: rgba(34, 197, 94, 0.2); }
#page-selfsubmit .ss2-pill.is-warn { background: rgba(254, 243, 199, 0.94); color: #b45309; border-color: rgba(251, 191, 36, 0.25); }
#page-selfsubmit .ss2-pill.is-missing { background: rgba(254, 226, 226, 0.92); color: #b91c1c; border-color: rgba(248, 113, 113, 0.25); }
#page-selfsubmit .ss2-pill.is-info { background: rgba(219, 234, 254, 0.82); color: #1d4ed8; border-color: rgba(59, 130, 246, 0.18); }
#page-selfsubmit .ss2-companies .badges .ss2-pill { min-height: 22px; font-size: 11px; }
#page-selfsubmit .ss2-filter { display: flex; flex-wrap: wrap; gap: 6px; }
#page-selfsubmit .ss2-filter-chip { min-height: 28px; padding: 0 10px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 999px; background: rgba(226, 232, 240, 0.72); color: #475569; font-size: 12px; font-weight: 900; white-space: nowrap; cursor: pointer; }
#page-selfsubmit .ss2-filter-chip:hover { color: #0f766e; }
#page-selfsubmit .ss2-filter-chip.is-active { background: rgba(15, 118, 110, 0.1); color: #0f766e; border-color: rgba(15, 118, 110, 0.2); }
#page-selfsubmit .ss2-overview-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
#page-selfsubmit .ss2-overview-main { display: grid; justify-items: start; gap: 6px; min-width: 0; }
#page-selfsubmit .ss2-overview h2 { margin: 0; color: #102033; font-size: 20px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
#page-selfsubmit .ss2-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 4px; }
#page-selfsubmit .ss2-facts div { display: grid; gap: 3px; }
#page-selfsubmit .ss2-facts span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-selfsubmit .ss2-facts strong { color: #102033; font-size: 14px; font-weight: 900; }
#page-selfsubmit .ss2-divider { height: 1px; margin: 16px 0 14px; background: rgba(226, 232, 240, 0.82); }
#page-selfsubmit .ss2-stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
#page-selfsubmit .ss2-step { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
#page-selfsubmit .ss2-step:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 24px); width: calc(100% - 48px); height: 2px; background: rgba(148, 163, 184, 0.28); }
#page-selfsubmit .ss2-step.is-done:not(:last-child)::after { background: rgba(34, 197, 94, 0.45); }
#page-selfsubmit .ss2-step span { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; border: 2px solid rgba(148, 163, 184, 0.32); background: rgba(248, 250, 252, 0.96); color: #64748b; font-size: 13px; font-weight: 900; box-sizing: border-box; }
#page-selfsubmit .ss2-step strong { color: #102033; font-size: 13px; font-weight: 900; }
#page-selfsubmit .ss2-step em { color: #8a99ad; font-size: 11px; font-weight: 800; font-style: normal; }
#page-selfsubmit .ss2-step.is-done span { background: rgba(220, 252, 231, 0.96); border-color: rgba(34, 197, 94, 0.45); color: #15803d; }
#page-selfsubmit .ss2-step.is-done em { color: #15803d; }
#page-selfsubmit .ss2-step.is-current span { background: #eff6ff; border-color: #2563eb; color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
#page-selfsubmit .ss2-step.is-current em { color: #2563eb; }
#page-selfsubmit .ss2-step.is-error span { background: rgba(254, 226, 226, 0.96); border-color: rgba(248, 113, 113, 0.55); color: #b91c1c; }
#page-selfsubmit .ss2-step.is-error em { color: #b91c1c; }
#page-selfsubmit .ss2-step.is-skip span { border-style: dashed; color: #94a3b8; }
#page-selfsubmit .ss2-step.is-skip strong,
#page-selfsubmit .ss2-step.is-skip em { color: #94a3b8; }
#page-selfsubmit .ss2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 14px; font-size: 14px; font-weight: 900; white-space: nowrap; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease; }
#page-selfsubmit .ss2-btn:hover:not(:disabled) { transform: translateY(-1px); }
#page-selfsubmit .ss2-btn:disabled { cursor: not-allowed; opacity: 0.5; filter: grayscale(0.25); box-shadow: none; transform: none; }
#page-selfsubmit .ss2-btn-primary { background: linear-gradient(135deg, #22c1c3 0%, #0f766e 100%); color: #fff; box-shadow: 0 16px 34px rgba(15, 118, 110, 0.18); }
#page-selfsubmit .ss2-btn-blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16); }
#page-selfsubmit .ss2-btn-secondary { padding: 0 16px; border: 1px solid rgba(226, 232, 240, 0.9); background: rgba(255, 255, 255, 0.8); color: #2563eb; font-size: 13px; }
#page-selfsubmit .ss2-material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
#page-selfsubmit .ss2-material { min-width: 0; padding: 12px 14px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 16px; background: rgba(255, 255, 255, 0.76); }
#page-selfsubmit .ss2-material:last-child:nth-child(odd) { grid-column: span 2; }
#page-selfsubmit .ss2-material.is-missing { border-color: rgba(248, 113, 113, 0.3); background: rgba(255, 245, 245, 0.86); }
#page-selfsubmit .ss2-material-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#page-selfsubmit .ss2-material-title strong { color: #0f172a; font-size: 14px; font-weight: 900; }
#page-selfsubmit .ss2-material p { margin: 8px 0 0; color: #8a99ad; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
#page-selfsubmit .ss2-material.is-ready p { color: #059669; }
#page-selfsubmit .ss2-material.is-warn p { color: #b45309; }
#page-selfsubmit .ss2-material.is-missing p { color: #b91c1c; }
#page-selfsubmit .ss2-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
#page-selfsubmit .ss2-summary .phone-upload-summary-item.c-blue .value { color: #2563eb; }
#page-selfsubmit .ss2-fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
#page-selfsubmit .ss2-fact { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(226, 232, 240, 0.82); border-radius: 12px; background: rgba(248, 250, 252, 0.78); }
#page-selfsubmit .ss2-fact span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-selfsubmit .ss2-fact strong { color: #102033; font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
#page-selfsubmit .ss2-fields-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
#page-selfsubmit .ss2-fields-head strong { color: #102033; font-size: 13px; font-weight: 900; }
#page-selfsubmit .ss2-fields-head span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-selfsubmit .ss2-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
#page-selfsubmit .ss2-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 34px; padding: 0 12px; border: 1px solid rgba(226, 232, 240, 0.7); border-radius: 10px; background: rgba(255, 255, 255, 0.86); box-sizing: border-box; }
#page-selfsubmit .ss2-field > span:first-child { overflow: hidden; color: #334155; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
#page-selfsubmit .ss2-field .ss2-pill { min-height: 22px; font-size: 11px; }
#page-selfsubmit .ss2-block { margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(251, 191, 36, 0.26); border-radius: 18px; background: rgba(255, 251, 235, 0.86); }
#page-selfsubmit .ss2-block strong { color: #7c2d12; font-size: 14px; font-weight: 900; }
#page-selfsubmit .ss2-block ol { margin: 10px 0 0; padding-left: 20px; color: #9a3412; font-size: 13px; font-weight: 780; line-height: 1.6; }
#page-selfsubmit .ss2-block.is-error { border-color: rgba(248, 113, 113, 0.3); background: rgba(254, 242, 242, 0.9); }
#page-selfsubmit .ss2-block.is-error strong { color: #991b1b; }
#page-selfsubmit .ss2-block.is-error ol { color: #b91c1c; }
#page-selfsubmit .ss2-success { margin-top: 12px; padding: 16px 18px; border: 1px solid rgba(16, 185, 129, 0.24); border-radius: 18px; background: rgba(236, 253, 245, 0.92); }
#page-selfsubmit .ss2-success > strong { display: block; color: #064e3b; font-size: 16px; font-weight: 900; }
#page-selfsubmit .ss2-success > p { margin: 6px 0 0; color: #047857; font-size: 13px; font-weight: 780; line-height: 1.6; }
#page-selfsubmit .ss2-success .ss2-fact { border-color: rgba(16, 185, 129, 0.16); background: rgba(255, 255, 255, 0.72); }
#page-selfsubmit .ss2-success.is-info { border-color: rgba(59, 130, 246, 0.22); background: rgba(239, 246, 255, 0.92); }
#page-selfsubmit .ss2-success.is-info > strong { color: #1e3a8a; }
#page-selfsubmit .ss2-success.is-info > p { color: #1d4ed8; }
#page-selfsubmit .ss2-success.is-info .ss2-fact { border-color: rgba(59, 130, 246, 0.16); }
#page-selfsubmit .ss2-placeholder { margin-top: 12px; padding: 18px; border: 1px dashed rgba(148, 163, 184, 0.4); border-radius: 16px; color: #64748b; font-size: 13px; line-height: 1.6; }
#page-selfsubmit .ss2-hint { margin: 12px 0 0; color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-selfsubmit .ss2-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-color: rgba(15, 118, 110, 0.14) !important; position: sticky; bottom: 10px; z-index: 3; }
#page-selfsubmit .ss2-actionbar strong { display: block; color: #102033; font-size: 14px; font-weight: 900; }
#page-selfsubmit .ss2-actionbar p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
#page-selfsubmit .ss2-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
#page-selfsubmit .ss2-empty { padding: 8px 20px 20px; }
#page-selfsubmit .ss2-empty-hero { padding: 36px 0 24px; text-align: center; }
#page-selfsubmit .ss2-empty-hero h2 { margin: 0; color: #102033; font-size: 20px; font-weight: 900; }
#page-selfsubmit .ss2-empty-hero p { margin: 6px 0 0; color: #64748b; font-size: 13px; }
#page-selfsubmit .ss2-empty-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#page-selfsubmit .ss2-empty-steps div { display: grid; align-content: start; gap: 8px; padding: 16px; border: 1px solid rgba(226, 232, 240, 0.86); border-radius: 16px; background: rgba(255, 255, 255, 0.8); }
#page-selfsubmit .ss2-empty-steps span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: #2563eb; font-size: 13px; font-weight: 900; }
#page-selfsubmit .ss2-empty-steps strong { color: #102033; font-size: 14px; font-weight: 900; }
#page-selfsubmit .ss2-empty-steps em { color: #64748b; font-size: 12px; font-style: normal; line-height: 1.6; }
#page-selfsubmit .ss2-more { padding: 2px 18px; }
#page-selfsubmit .ss2-more-item + .ss2-more-item { border-top: 1px solid rgba(226, 232, 240, 0.82); }
#page-selfsubmit .ss2-more-item > summary { display: flex; align-items: baseline; gap: 10px; min-height: 48px; padding: 14px 0; box-sizing: border-box; cursor: pointer; list-style: none; }
#page-selfsubmit .ss2-more-item > summary::-webkit-details-marker { display: none; }
#page-selfsubmit .ss2-more-item > summary::after { content: "›"; margin-left: auto; color: #94a3b8; font-size: 18px; font-weight: 900; transition: transform 160ms ease; }
#page-selfsubmit .ss2-more-item[open] > summary::after { transform: rotate(90deg); }
#page-selfsubmit .ss2-more-item > summary strong { color: #334155; font-size: 13px; font-weight: 900; }
#page-selfsubmit .ss2-more-item > summary span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-selfsubmit .ss2-legacy { display: grid; gap: 12px; padding: 0 0 16px; }
#page-selfsubmit .ss2-more .phone-upload-report-status { margin: 0 0 16px; }
@media (max-width: 1180px) {
  #page-selfsubmit .ss2-layout { grid-template-columns: minmax(0, 1fr); }
  #page-selfsubmit .ss2-companies { position: static; }
  #page-selfsubmit .ss2-companies .selfsubmit-company-list { max-height: 320px; }
}
@media (max-width: 760px) {
  #page-selfsubmit .ss2-overview-top,
  #page-selfsubmit .ss2-actionbar { flex-direction: column; align-items: stretch; }
  #page-selfsubmit .ss2-stepper,
  #page-selfsubmit .ss2-summary,
  #page-selfsubmit .ss2-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-selfsubmit .ss2-step::after { display: none; }
  #page-selfsubmit .ss2-material-grid,
  #page-selfsubmit .ss2-fields,
  #page-selfsubmit .ss2-empty-steps { grid-template-columns: minmax(0, 1fr); }
  #page-selfsubmit .ss2-material:last-child:nth-child(odd) { grid-column: auto; }
  #page-selfsubmit .ss2-actionbar { position: static; }
}

/* 号码上传 / 报备处理（2026-09-15 按渲染图重构）：左侧企业列表 + 右侧单企业工作区 */
#page-phoneupload [hidden] { display: none !important; }
#page-phoneupload .pu2-workbench { display: flex; flex-direction: column; gap: 10px; }
#page-phoneupload .pu2-more-menu { position: relative; }
#page-phoneupload .pu2-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 22px; padding: 12px 18px; }
#page-phoneupload .pu2-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; min-width: 0; }
#page-phoneupload .pu2-stat { display: grid; gap: 2px; min-width: 0; }
#page-phoneupload .pu2-stat > span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-stat > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
#page-phoneupload .pu2-stat strong { color: #102033; font-size: 22px; font-weight: 900; line-height: 1.15; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-stat strong.is-amber { color: #b45309; }
#page-phoneupload .pu2-stat strong.is-blue { color: #1d4ed8; }
#page-phoneupload .pu2-stat em { color: #64748b; font-size: 12px; font-weight: 800; font-style: normal; }
#page-phoneupload .pu2-stat em b { font-weight: 800; }
#page-phoneupload .pu2-vline { width: 1px; align-self: stretch; background: rgba(226, 232, 240, 0.9); }
#page-phoneupload .pu2-auto { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; justify-self: end; gap: 10px 18px; padding: 8px 12px 8px 14px; border: 1px solid rgba(226, 232, 240, 0.82); border-radius: 14px; background: rgba(248, 250, 252, 0.8); }
#page-phoneupload .pu2-auto-item { display: grid; gap: 2px; min-width: 0; }
#page-phoneupload .pu2-auto-item > strong { color: #102033; font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-auto-item > span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-auto-item > span i { font-style: normal; }
#page-phoneupload .pu2-auto .phone-upload-auto-submit-control { min-width: 0; }
#page-phoneupload .pu2-auto .phone-upload-auto-submit-switch input:checked + span { background: #0f766e; }
#page-phoneupload .pu2-auto .phone-upload-auto-submit-permission { margin-top: 0; }

#page-phoneupload .pu2-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; align-items: start; }
#page-phoneupload .pu2-companies { position: sticky; top: 10px; z-index: 2; padding: 14px 16px; }
#page-phoneupload .pu2-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
#page-phoneupload .pu2-card-head h3 { flex: none; margin: 0; color: #102033; font-size: 16px; font-weight: 900; }
#page-phoneupload .pu2-card-head p,
#page-phoneupload .pu2-card-head > span { margin: 4px 0 0; color: #8a99ad; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
#page-phoneupload .pu2-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 12px; padding: 4px; border-radius: 12px; background: rgba(226, 232, 240, 0.6); }
#page-phoneupload .pu2-seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; border: 0; border-radius: 9px; background: transparent; color: #64748b; font-size: 13px; font-weight: 900; cursor: pointer; }
#page-phoneupload .pu2-seg button b { font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-seg button.is-active { background: #ffffff; color: #102033; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
#page-phoneupload .pu2-seg button.is-active:first-child b { color: #b45309; }
#page-phoneupload .pu2-seg button:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
#page-phoneupload .pu2-search { display: flex; align-items: center; gap: 8px; height: 40px; margin-top: 10px; padding: 0 12px; border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 14px; background: rgba(255, 255, 255, 0.78); box-sizing: border-box; color: #94a3b8; }
#page-phoneupload .pu2-search:focus-within { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
#page-phoneupload .pu2-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #102033; font-size: 13px; font-weight: 750; box-shadow: none; }
#page-phoneupload .pu2-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#page-phoneupload .pu2-chip { min-height: 28px; padding: 0 10px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 999px; background: rgba(226, 232, 240, 0.72); color: #475569; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; cursor: pointer; }
#page-phoneupload .pu2-chip:hover { color: #0f766e; }
#page-phoneupload .pu2-chip.is-active { border-color: rgba(15, 118, 110, 0.2); background: rgba(15, 118, 110, 0.1); color: #0f766e; }
#page-phoneupload .pu2-company-list { display: flex; flex-direction: column; gap: 8px; min-height: 120px; max-height: calc(100vh - 330px); margin-top: 12px; padding: 2px 4px 6px 2px; overflow-y: auto; }
#page-phoneupload .pu2-company { display: grid; gap: 6px; width: 100%; padding: 11px 14px; border: 1px solid rgba(226, 232, 240, 0.86); border-radius: 16px; background: rgba(255, 255, 255, 0.8); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease; }
#page-phoneupload .pu2-company:hover { border-color: rgba(37, 99, 235, 0.3); }
#page-phoneupload .pu2-company:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
#page-phoneupload .pu2-company.is-warn { border-color: rgba(251, 146, 60, 0.28); background: rgba(255, 247, 237, 0.78); }
#page-phoneupload .pu2-company.is-active { border-color: rgba(37, 99, 235, 0.42); background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.82)); box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12); }
#page-phoneupload .pu2-company strong { color: #0f172a; font-size: 14px; font-weight: 900; line-height: 1.4; overflow-wrap: anywhere; }
#page-phoneupload .pu2-company-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
#page-phoneupload .pu2-company-meta em { color: #64748b; font-size: 12px; font-style: normal; font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-list-foot { margin: 10px 0 0; color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-list-empty { padding: 24px 8px; color: #8a99ad; font-size: 13px; font-weight: 800; text-align: center; }

#page-phoneupload .pu2-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 10px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 999px; background: rgba(226, 232, 240, 0.72); color: #475569; font-size: 11px; font-weight: 900; white-space: nowrap; box-sizing: border-box; }
#page-phoneupload .pu2-pill.is-ready { border-color: rgba(34, 197, 94, 0.2); background: rgba(220, 252, 231, 0.92); color: #15803d; }
#page-phoneupload .pu2-pill.is-info { border-color: rgba(59, 130, 246, 0.18); background: rgba(219, 234, 254, 0.82); color: #1d4ed8; }
#page-phoneupload .pu2-pill.is-warn { border-color: rgba(251, 191, 36, 0.25); background: rgba(254, 243, 199, 0.94); color: #b45309; }
#page-phoneupload .pu2-pill.is-missing { border-color: rgba(248, 113, 113, 0.25); background: rgba(254, 226, 226, 0.92); color: #b91c1c; }
#page-phoneupload .pu2-overview .pu2-overview-main > .pu2-pill { min-height: 28px; font-size: 12px; }

#page-phoneupload .pu2-main,
#page-phoneupload .pu2-workspace { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#page-phoneupload .pu2-card { padding: 14px 16px; }
#page-phoneupload .pu2-overview { padding: 16px 18px; }
#page-phoneupload .pu2-overview-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
#page-phoneupload .pu2-overview-main { display: grid; justify-items: start; gap: 6px; min-width: 0; }
#page-phoneupload .pu2-overview h2 { margin: 0; color: #102033; font-size: 20px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
#page-phoneupload .pu2-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 4px; }
#page-phoneupload .pu2-fact { display: grid; align-content: start; gap: 3px; }
#page-phoneupload .pu2-fact > span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-fact > strong { color: #102033; font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-muted { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-code-edit { display: inline-flex; align-items: center; gap: 6px; }
#page-phoneupload .pu2-code-edit input { width: 120px; height: 30px; padding: 0 10px; border: 1px solid rgba(251, 146, 60, 0.45); border-radius: 9px; background: #ffffff; color: #102033; font-size: 13px; font-weight: 800; box-sizing: border-box; }
#page-phoneupload .pu2-code-edit input:focus { outline: 0; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
#page-phoneupload .pu2-code-edit button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: #2563eb; color: #ffffff; font-size: 12px; font-weight: 900; cursor: pointer; }
#page-phoneupload .pu2-code-edit button:disabled { opacity: 0.5; cursor: not-allowed; }
#page-phoneupload .pu2-divider { height: 1px; margin: 16px 0 14px; background: rgba(226, 232, 240, 0.82); }

#page-phoneupload .pu2-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#page-phoneupload .pu2-step { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
#page-phoneupload .pu2-step:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 24px); width: calc(100% - 48px); height: 2px; background: rgba(148, 163, 184, 0.28); }
#page-phoneupload .pu2-step.is-done:not(:last-child)::after { background: rgba(34, 197, 94, 0.45); }
#page-phoneupload .pu2-step > span { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid rgba(148, 163, 184, 0.32); border-radius: 999px; background: rgba(248, 250, 252, 0.96); color: #64748b; font-size: 13px; font-weight: 900; box-sizing: border-box; }
#page-phoneupload .pu2-step > strong { color: #102033; font-size: 13px; font-weight: 900; }
#page-phoneupload .pu2-step > em { color: #8a99ad; font-size: 11px; font-weight: 800; font-style: normal; overflow-wrap: anywhere; }
#page-phoneupload .pu2-step.is-done > span { border-color: rgba(34, 197, 94, 0.45); background: rgba(220, 252, 231, 0.96); color: #15803d; }
#page-phoneupload .pu2-step.is-done > em { color: #15803d; }
#page-phoneupload .pu2-step.is-current > span,
#page-phoneupload .pu2-step.is-busy > span { border-color: #2563eb; background: #eff6ff; color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
#page-phoneupload .pu2-step.is-current > em,
#page-phoneupload .pu2-step.is-busy > em { color: #2563eb; }
#page-phoneupload .pu2-step.is-busy > span::before { content: ""; width: 12px; height: 12px; border: 2px solid rgba(37, 99, 235, 0.25); border-top-color: #2563eb; border-radius: 999px; box-sizing: border-box; animation: pu2-spin 0.8s linear infinite; }
#page-phoneupload .pu2-step.is-error > span { border-color: rgba(248, 113, 113, 0.55); background: rgba(254, 226, 226, 0.96); color: #b91c1c; }
#page-phoneupload .pu2-step.is-error > em { color: #b91c1c; }
@keyframes pu2-spin { to { transform: rotate(360deg); } }

#page-phoneupload .pu2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 14px; font-size: 14px; font-weight: 900; white-space: nowrap; box-sizing: border-box; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease; }
#page-phoneupload .pu2-btn:hover:not(:disabled) { transform: translateY(-1px); }
#page-phoneupload .pu2-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
#page-phoneupload .pu2-btn:disabled { opacity: 0.45; filter: grayscale(0.3); box-shadow: none; cursor: not-allowed; transform: none; }
#page-phoneupload .pu2-btn-primary { background: linear-gradient(135deg, #22c1c3 0%, #0f766e 100%); color: #ffffff; box-shadow: 0 16px 34px rgba(15, 118, 110, 0.18); }
#page-phoneupload .pu2-btn-blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #ffffff; box-shadow: 0 16px 34px rgba(37, 99, 235, 0.16); }
#page-phoneupload .pu2-btn-secondary { padding: 0 16px; border: 1px solid rgba(226, 232, 240, 0.9); background: rgba(255, 255, 255, 0.8); color: #2563eb; font-size: 13px; }
#page-phoneupload .pu2-btn-sm { min-height: 32px; padding: 0 12px; border-radius: 11px; font-size: 12px; }

#page-phoneupload .pu2-app-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 16px; background: rgba(255, 255, 255, 0.76); }
#page-phoneupload .pu2-app-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-width: 0; }
#page-phoneupload .pu2-app-row strong { color: #0f172a; font-size: 14px; font-weight: 900; }
#page-phoneupload .pu2-app-side > span { color: #8a99ad; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-file { display: inline-flex; align-items: center; gap: 6px; color: #059669; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; white-space: normal; }
#page-phoneupload .pu2-file::before { content: ""; flex: none; width: 10px; height: 12px; border: 1.6px solid currentColor; border-radius: 2px; box-sizing: border-box; }
#page-phoneupload .pu2-file.is-warn { color: #b45309; }
#page-phoneupload .pu2-hint-missing { color: #b91c1c; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-alert { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(251, 191, 36, 0.28); border-radius: 14px; background: rgba(255, 251, 235, 0.9); }
#page-phoneupload .pu2-alert strong { display: block; color: #92400e; font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
#page-phoneupload .pu2-alert p { margin: 3px 0 0; color: #9a3412; font-size: 12px; font-weight: 700; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
#page-phoneupload .pu2-alert.is-error { border-color: rgba(248, 113, 113, 0.28); background: rgba(254, 242, 242, 0.9); }
#page-phoneupload .pu2-alert.is-error strong { color: #b91c1c; }
#page-phoneupload .pu2-alert.is-error p { color: #7f1d1d; }

#page-phoneupload .pu2-table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid rgba(226, 232, 240, 0.9); border-radius: 14px; background: rgba(255, 255, 255, 0.86); }
#page-phoneupload .pu2-table { width: 100%; min-width: 760px; border-collapse: collapse; }
#page-phoneupload .pu2-table th { height: 36px; padding: 0 12px; border-bottom: 1px solid rgba(226, 232, 240, 0.9); background: rgba(248, 250, 252, 0.9); color: #7f8da0; font-size: 12px; font-weight: 800; text-align: left; white-space: nowrap; }
#page-phoneupload .pu2-table td { height: 42px; padding: 6px 12px; border-bottom: 1px solid rgba(226, 232, 240, 0.7); background: transparent; color: #334155; font-size: 13px; font-weight: 700; white-space: nowrap; box-sizing: border-box; }
#page-phoneupload .pu2-table tbody tr:last-child td { border-bottom: 0; }
#page-phoneupload .pu2-table td.is-mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-table td.is-strong { color: #102033; font-weight: 900; }
#page-phoneupload .pu2-table td.is-soft { color: #64748b; }
#page-phoneupload .pu2-table td.is-status { white-space: normal; }
#page-phoneupload .pu2-table td.is-status > span + span { margin-left: 6px; }
#page-phoneupload .pu2-table .is-action { width: 52px; text-align: right; }
#page-phoneupload .pu2-table tr.is-missing td { background: rgba(254, 242, 242, 0.7); }
#page-phoneupload .pu2-table tr.is-warn td { background: rgba(255, 251, 235, 0.72); }
#page-phoneupload .pu2-table td.pu2-table-empty { padding: 28px 12px; color: #8a99ad; text-align: center; }
#page-phoneupload .pu2-link { padding: 0; border: 0; background: none; color: #2563eb; font-size: 12px; font-weight: 900; cursor: pointer; }
#page-phoneupload .pu2-link:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px; }

#page-phoneupload .pu2-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
#page-phoneupload .pu2-metric { display: grid; gap: 8px; min-height: 74px; padding: 12px 14px; border: 1px solid rgba(214, 224, 238, 0.92); border-radius: 12px; background: rgba(255, 255, 255, 0.96); box-sizing: border-box; }
#page-phoneupload .pu2-metric > span { color: #7f8da0; font-size: 12px; font-weight: 800; }
#page-phoneupload .pu2-metric > strong { color: #102033; font-size: 28px; font-weight: 900; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
#page-phoneupload .pu2-metric.is-teal > strong { color: #0f766e; }
#page-phoneupload .pu2-metric.is-ready > strong { color: #15803d; }
#page-phoneupload .pu2-metric.is-info > strong { color: #2563eb; }
#page-phoneupload .pu2-metric.is-warn > strong { color: #b45309; }
#page-phoneupload .pu2-metric.is-missing > strong { color: #b91c1c; }
#page-phoneupload .pu2-metric.is-muted > strong { color: #94a3b8; }

#page-phoneupload .pu2-actionbar { position: sticky; bottom: 10px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-color: rgba(15, 118, 110, 0.14) !important; }
#page-phoneupload .pu2-actionbar strong { display: block; color: #102033; font-size: 14px; font-weight: 900; }
#page-phoneupload .pu2-actionbar p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
#page-phoneupload .pu2-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
#page-phoneupload .pu2-more { padding: 2px 18px; }
#page-phoneupload .pu2-more-item > summary { display: flex; align-items: baseline; gap: 10px; min-height: 48px; padding: 14px 0; box-sizing: border-box; list-style: none; cursor: pointer; }
#page-phoneupload .pu2-more-item > summary::-webkit-details-marker { display: none; }
#page-phoneupload .pu2-more-item > summary::after { content: "›"; margin-left: auto; color: #94a3b8; font-size: 18px; font-weight: 900; transition: transform 160ms ease; }
#page-phoneupload .pu2-more-item[open] > summary::after { transform: rotate(90deg); }
#page-phoneupload .pu2-more-item > summary strong { flex: none; color: #334155; font-size: 13px; font-weight: 900; }
#page-phoneupload .pu2-more-item > summary span { min-width: 0; overflow: hidden; color: #8a99ad; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
#page-phoneupload .pu2-more .phone-upload-report-status { margin: 0 0 16px; }

#page-phoneupload .pu2-empty { padding: 8px 20px 20px; }
#page-phoneupload .pu2-empty-hero { padding: 36px 0 24px; text-align: center; }
#page-phoneupload .pu2-empty-hero h2 { margin: 0; color: #102033; font-size: 20px; font-weight: 900; }
#page-phoneupload .pu2-empty-hero p { margin: 6px 0 0; color: #64748b; font-size: 13px; }
#page-phoneupload .pu2-empty-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#page-phoneupload .pu2-empty-steps div { display: grid; align-content: start; gap: 8px; padding: 16px; border: 1px solid rgba(226, 232, 240, 0.86); border-radius: 16px; background: rgba(255, 255, 255, 0.8); }
#page-phoneupload .pu2-empty-steps span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: #2563eb; font-size: 13px; font-weight: 900; }
#page-phoneupload .pu2-empty-steps strong { color: #102033; font-size: 14px; font-weight: 900; }
#page-phoneupload .pu2-empty-steps em { color: #64748b; font-size: 12px; font-style: normal; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  #page-phoneupload .pu2-step.is-busy > span::before { animation: none; }
  #page-phoneupload .pu2-btn,
  #page-phoneupload .pu2-company { transition: none; }
}
@media (max-width: 1180px) {
  #page-phoneupload .pu2-layout { grid-template-columns: minmax(0, 1fr); }
  #page-phoneupload .pu2-companies { position: static; }
  #page-phoneupload .pu2-company-list { max-height: 320px; }
  #page-phoneupload .pu2-summary { grid-template-columns: minmax(0, 1fr); }
  #page-phoneupload .pu2-auto { justify-content: flex-start; justify-self: stretch; }
}
@media (max-width: 760px) {
  #page-phoneupload .pu2-vline { display: none; }
  #page-phoneupload .pu2-overview-top,
  #page-phoneupload .pu2-actionbar { flex-direction: column; align-items: stretch; }
  #page-phoneupload .pu2-stepper,
  #page-phoneupload .pu2-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-phoneupload .pu2-step::after { display: none; }
  #page-phoneupload .pu2-empty-steps { grid-template-columns: minmax(0, 1fr); }
  #page-phoneupload .pu2-actionbar { position: static; }
  #page-phoneupload .pu2-actions { justify-content: stretch; }
  #page-phoneupload .pu2-actions .pu2-btn { flex: 1 1 auto; }
}

#page-selfsubmit .selfsubmit-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#page-selfsubmit .selfsubmit-json-area {
  min-height: 240px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

#page-selfsubmit .selfsubmit-debug-card {
  margin-top: 14px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.72);
  padding: 0 14px 14px;
}

#page-selfsubmit .selfsubmit-debug-card > summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

#page-selfsubmit .selfsubmit-debug-card > summary::-webkit-details-marker {
  display: none;
}

#page-selfsubmit .selfsubmit-debug-grid {
  margin-bottom: 12px;
}

@media (min-width: 1181px) {
  #page-selfsubmit .content {
    width: calc(100vw - var(--sidebar-w) - 12px) !important;
    max-width: none !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
    padding: 14px 0 24px !important;
  }

  #page-selfsubmit .selfsubmit-workspace {
    width: 100% !important;
    max-width: none !important;
    padding-right: 4px;
    gap: 12px;
  }

  #page-selfsubmit .phone-upload-page-head {
    align-items: flex-start;
    padding: 0 14px 4px;
  }

  #page-selfsubmit .phone-upload-head-meta {
    max-width: min(100%, 460px);
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 4px;
    white-space: normal;
    text-align: right;
  }

  #page-selfsubmit .phone-upload-hero {
    grid-template-columns: 74px minmax(0, 1.34fr) minmax(220px, 0.66fr);
    gap: 12px 16px;
    padding: 12px 14px;
  }

  #page-selfsubmit .phone-upload-hero-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 14px;
  }

  #page-selfsubmit .phone-upload-next-card {
    min-width: 0;
    align-self: stretch;
  }

  #page-selfsubmit .selfsubmit-operation-grid {
    grid-template-columns: minmax(420px, 0.94fr) minmax(0, 1.06fr);
    gap: 14px;
    align-items: start;
  }

  #page-selfsubmit .phone-upload-summary-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) and (max-width: 1560px) {
  #page-selfsubmit .phone-upload-hero-grid,
  #page-selfsubmit .phone-upload-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  #page-selfsubmit .selfsubmit-detail-grid {
    grid-template-columns: 1fr;
  }
  #page-selfsubmit .selfsubmit-operation-grid,
  #page-selfsubmit .selfsubmit-material-grid,
  #page-selfsubmit .selfsubmit-form-grid,
  #page-selfsubmit .selfsubmit-result-grid,
  #page-selfsubmit .selfsubmit-primary-actions {
    grid-template-columns: 1fr;
  }
}

.phone-upload-table {
  width: 100%;
  border-collapse: collapse;
}

.phone-upload-table th,
.phone-upload-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface2);
  text-align: left;
  white-space: nowrap;
}

.phone-upload-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

.phone-upload-filter-head {
  display: grid;
  gap: 6px;
  min-width: var(--phone-filter-min, 88px);
  width: var(--phone-filter-width, 108px);
}

.phone-upload-filter-head.is-customer { --phone-filter-min: 170px; --phone-filter-width: 188px; }
.phone-upload-filter-head.is-code { --phone-filter-width: 104px; }
.phone-upload-filter-head.is-unique { --phone-filter-width: 112px; }
.phone-upload-filter-head.is-card { --phone-filter-width: 92px; }
.phone-upload-filter-head.is-phone { --phone-filter-width: 118px; }
.phone-upload-filter-head.is-name { --phone-filter-width: 92px; }
.phone-upload-filter-head.is-idcard { --phone-filter-width: 148px; }
.phone-upload-filter-head.is-status { --phone-filter-width: 98px; }

.phone-upload-filter-head span {
  line-height: 1;
}

.phone-upload-filter-head.is-readonly::after {
  content: "";
  display: block;
  height: 30px;
}

.phone-upload-column-filter {
  width: 100%;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  outline: none;
}

.phone-upload-column-filter:focus {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
}

.phone-upload-table td {
  color: var(--text);
  font-size: 14px;
}

.phone-upload-table tr:hover td {
  background: var(--surface2);
}

.phone-code-input {
  width: 108px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 9px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.phone-code-input:focus {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
}

.phone-upload-warning {
  display: none;
  margin-bottom: 14px;
  border: 1px solid rgba(180, 83, 9, 0.18);
  background: var(--orange-bg);
  color: var(--orange);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.phone-upload-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-self: start;
}

.phone-upload-summary-item {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(214, 224, 238, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.phone-upload-summary-item .label {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

.phone-upload-summary-item .value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.phone-upload-summary-item.c-wait .value {
  color: var(--orange);
}

.phone-upload-summary-item.c-total .value {
  color: var(--accent);
}

.phone-upload-summary-item.c-pass .value {
  color: var(--green);
}

.phone-upload-report-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at right top, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 252, 251, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.phone-upload-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.phone-upload-report-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.phone-upload-report-head p {
  margin: 4px 0 0;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.5;
}

.phone-upload-report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.phone-upload-report-actions .btn,
.phone-upload-report-actions .btn-ghost {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.phone-upload-report-tip {
  color: var(--text3);
  font-size: 11px;
  line-height: 1.45;
}

.phone-upload-report-status,
.phone-upload-report-lines {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.phone-upload-report-status {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(29, 78, 216, 0.10);
  background: rgba(255, 255, 255, 0.90);
  color: #143b8b;
  font-size: 12px;
  line-height: 1.55;
  max-height: 92px;
  overflow: auto;
}

.phone-upload-report-status.is-error {
  color: #a31e26;
  border-color: rgba(185, 28, 28, 0.16);
  background: rgba(254, 242, 242, 0.92);
}

.phone-upload-report-status.is-success {
  color: #166534;
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(240, 253, 244, 0.94);
}

.phone-upload-report-result {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  background: rgba(255, 255, 255, 0.94);
}

.phone-upload-report-result.empty {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.phone-upload-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.phone-upload-report-metric {
  min-height: 70px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: #fff;
}

.phone-upload-report-metric .label {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

.phone-upload-report-metric .value {
  margin-top: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.phone-upload-report-metric .meta {
  margin-top: 6px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.4;
}

.phone-upload-report-lines {
  color: var(--text2);
  font-size: 11px;
  line-height: 1.5;
  max-height: 112px;
  overflow: auto;
  padding-right: 2px;
}

@media (max-width: 1120px) {
  .phone-upload-summary-strip,
  .phone-upload-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#page-mainphoneimport {
  height: 100dvh;
  overflow: hidden;
}

#page-mainphoneimport .main {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-mainphoneimport .content {
  flex: 1;
  min-height: 0;
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 20px;
}

.main-phone-import-card {
  width: 100%;
  max-width: none;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.main-phone-import-strip {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(150px, 180px) minmax(0, 1fr) 250px;
  gap: 12px;
  align-items: end;
}

.main-phone-import-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.main-phone-import-label {
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.main-phone-import-actions {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: end;
}

.main-phone-import-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-phone-import-buttons .btn-ghost,
.main-phone-import-buttons .btn {
  min-width: 80px;
  height: 42px;
}

.main-phone-import-action-note {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.main-phone-import-warning {
  display: none;
  border: 1px solid rgba(180, 83, 9, 0.18);
  background: rgba(255, 244, 223, 0.92);
  color: var(--orange);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.main-phone-import-bottom {
  min-height: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 12px;
}

.main-phone-import-aux-card,
.main-phone-import-preview-card {
  min-height: 0;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.main-phone-import-aux-card {
  align-content: start;
}

.main-phone-import-preview-card {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.main-phone-import-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.main-phone-import-section-title {
  font-size: 16px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.main-phone-import-section-sub {
  margin-top: 6px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.main-phone-import-mini-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d8e2ec;
  background: #fff;
  color: #526478;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.main-phone-import-status-box {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(31, 138, 76, 0.16);
  background: linear-gradient(180deg, rgba(234, 247, 239, 0.95) 0%, rgba(248, 252, 249, 0.95) 100%);
}

.main-phone-import-status-label {
  color: #5b7a67;
  font-size: 12px;
  font-weight: 850;
}

.main-phone-import-status-value {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.main-phone-import-status-value::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.10);
  flex: 0 0 auto;
}

.main-phone-import-status-note {
  margin-top: 8px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.main-phone-import-manual-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed #cbd8e4;
  background: #f8fbfd;
}

.main-phone-import-manual-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.main-phone-import-manual-desc {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.main-phone-import-manual-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
}

.main-phone-import-mini-input,
.main-phone-import-mini-textarea {
  width: 100%;
  border: 1px solid #cfd9e4;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border-radius: 12px;
  padding: 10px 11px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  outline: none;
}

.main-phone-import-mini-textarea {
  min-height: 64px;
  resize: vertical;
}

.main-phone-import-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.main-phone-import-preview-title {
  font-size: 16px;
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.main-phone-import-preview-meta {
  margin-top: 6px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.main-phone-import-preview-chip {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: rgba(37, 99, 235, 0.06);
  color: #214db0;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.main-phone-import-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.main-phone-import-summary-item {
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  min-width: 0;
  box-shadow: var(--shadow);
}

.main-phone-import-summary-k {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

.main-phone-import-summary-v {
  margin-top: 7px;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-phone-import-summary-v.is-accent { color: var(--accent); }
.main-phone-import-summary-v.is-blue { color: var(--blue); }
.main-phone-import-summary-v.is-green { color: var(--green); }
.main-phone-import-summary-v.is-orange { color: var(--orange); }
.main-phone-import-summary-v.is-red { color: var(--red); }
.main-phone-import-summary-v.is-muted { color: var(--text3); }

.main-phone-import-calibration-note {
  display: none;
  margin-top: -2px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.82);
  color: #1e3a8a;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.main-phone-import-calibration-note.is-warn {
  border-color: rgba(180, 83, 9, 0.20);
  background: rgba(255, 247, 237, 0.92);
  color: #9a3412;
}

.main-phone-import-calibration-note.is-ok {
  border-color: rgba(13, 148, 136, 0.22);
  background: rgba(240, 253, 250, 0.92);
  color: #0f766e;
}

.main-phone-import-preview-table-wrap {
  min-height: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: auto;
  background: var(--surface);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.main-phone-import-preview-table {
  width: 100%;
  border-collapse: collapse;
}

.main-phone-import-preview-table th,
.main-phone-import-preview-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  white-space: nowrap;
}

.main-phone-import-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfd;
  color: var(--text3);
  font-size: 12px;
  font-weight: 900;
}

.main-phone-import-preview-table tbody tr:nth-child(odd) {
  background: #fcfeff;
}

.main-phone-import-preview-table tbody tr:hover {
  background: #f8fcfb;
}

.main-phone-import-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(31, 138, 76, 0.14);
  background: var(--green-bg);
  color: #1d7a46;
  font-size: 12px;
  font-weight: 850;
}

#page-mainphoneimport .account-input {
  width: 100%;
}

#mainPhoneImportCompanyName {
  height: 42px;
}

#mainPhoneImportCompanyCode {
  height: 42px;
}

#mainPhoneImportPhones {
  min-height: 56px;
  height: 56px;
  resize: vertical;
}

#page-mainphoneimport #mainPhoneImportAuth {
  min-height: 84px;
  height: 84px;
  resize: vertical;
}

.phone-upload-search {
  width: 100%;
  max-width: 360px;
  background: var(--surface2);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.account-form-grid {
  display: grid;
  gap: 12px;
}

.access-settings-card {
  margin-top: 18px;
}

.access-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.access-settings-head h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.access-settings-head p {
  color: var(--text3);
  font-size: 13px;
  line-height: 1.45;
}

.access-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.access-module-grid {
  margin-top: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-input,
.account-select {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  outline: none;
}

.account-input:focus,
.account-select:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
}

.permission-check input {
  accent-color: var(--accent);
}

.permission-check:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-row-title {
  font-size: 14px;
  font-weight: 800;
}

.account-row-meta {
  margin-top: 4px;
  color: var(--text3);
  font-size: 12px;
}

.account-permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.account-permission-tags span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 11px;
}

.account-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.log-toolbar {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr 0.9fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.log-field {
  display: grid;
  gap: 6px;
}

.log-field label {
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
}

.log-field input,
.log-field select {
  width: 100%;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  padding: 0 11px;
  font: inherit;
  outline: none;
}

.log-field input:focus,
.log-field select:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.log-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.log-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.log-table th,
.log-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--surface2);
  font-size: 13px;
  text-align: left;
  vertical-align: top;
}

.log-table th {
  color: var(--text3);
  background: #fbfbfc;
  font-size: 12px;
  font-weight: 800;
}

.log-user {
  font-weight: 800;
}

.log-meta {
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
}

.log-module {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.log-detail {
  max-width: 420px;
  color: var(--text2);
  line-height: 1.45;
  word-break: break-word;
}

.log-ip {
  font-weight: 800;
}

/* Operation logs: audit workspace redesign. */
#page-logs .header {
  display: none;
}

#page-logs .content.logs-redesign-content {
  height: 100%;
  max-width: none;
  padding: 10px 18px 18px;
  overflow: hidden;
}

#page-logs .logs-redesign-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(251, 253, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

#page-logs .logs-redesign-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfdff 0%, #f7f9fc 100%);
}

#page-logs .logs-redesign-crumbs {
  color: var(--text3);
  font-size: 13px;
  font-weight: 760;
}

#page-logs .logs-redesign-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 5px;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

#page-logs .logs-redesign-title span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

#page-logs .logs-redesign-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#page-logs .logs-version-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text2);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

#page-logs .logs-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #f7f9fc;
}

#page-logs .logs-metric {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

#page-logs .logs-metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 820;
}

#page-logs .logs-metric-label .ok {
  color: var(--green);
}

#page-logs .logs-metric-label .warn {
  color: var(--orange);
}

#page-logs .logs-metric-label .bad {
  color: var(--red);
}

#page-logs .logs-metric-value {
  color: var(--text);
  font-size: 27px;
  font-weight: 920;
  letter-spacing: 0;
  line-height: 1;
}

#page-logs .logs-metric small {
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
}

#page-logs .logs-redesign-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 14px;
  padding: 14px 18px 18px;
  overflow: hidden;
}

#page-logs .logs-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

#page-logs .logs-panel-head {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(223, 231, 240, 0.78);
}

#page-logs .logs-panel-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

#page-logs .logs-panel-subtitle {
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
}

#page-logs .logs-segmented {
  height: 34px;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

#page-logs .logs-segmented span {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 820;
}

#page-logs .logs-segmented .active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

#page-logs .logs-redesign-table-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
}

#page-logs .logs-redesign-table {
  min-width: 1020px;
  border-collapse: separate;
  border-spacing: 0;
}

#page-logs .logs-redesign-table th {
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
  color: var(--text3);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

#page-logs .logs-redesign-table td {
  min-height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(223, 231, 240, 0.72);
  color: var(--text);
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

#page-logs .logs-redesign-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}

#page-logs .logs-redesign-table .log-detail {
  max-width: 560px;
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-logs .logs-redesign-table .log-meta {
  color: var(--text3);
  font-weight: 680;
}

#page-logs .logs-redesign-table .log-module {
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
  font-weight: 850;
}

#page-logs .log-action-pill,
#page-logs .log-result-pill,
#page-logs .log-risk-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

#page-logs .log-action-pill {
  background: var(--green-bg);
  color: var(--green);
}

#page-logs .log-action-pill.warn {
  background: var(--orange-bg);
  color: var(--orange);
}

#page-logs .log-action-pill.bad {
  background: var(--red-bg);
  color: var(--red);
}

#page-logs .logs-side-stack {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

#page-logs .logs-filter-panel,
#page-logs .logs-risk-panel {
  padding: 14px;
}

#page-logs .logs-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

#page-logs .logs-filter-title strong {
  font-size: 16px;
  font-weight: 900;
}

#page-logs .logs-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

#page-logs .logs-filter-grid .log-field {
  min-width: 0;
}

#page-logs .logs-filter-grid .wide {
  grid-column: 1 / -1;
}

#page-logs .logs-filter-grid .log-field label {
  margin-bottom: 5px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 820;
}

#page-logs .logs-filter-grid .log-field input,
#page-logs .logs-filter-grid .log-field select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

#page-logs .logs-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

#page-logs .logs-risk-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#page-logs .logs-risk-list {
  min-height: 0;
  flex: 1;
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: auto;
  padding-right: 2px;
}

#page-logs .logs-risk-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfcfe;
}

#page-logs .logs-risk-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--orange-bg);
  color: var(--orange);
  font-weight: 900;
}

#page-logs .logs-risk-icon.red {
  background: var(--red-bg);
  color: var(--red);
}

#page-logs .logs-risk-icon.green {
  background: var(--green-bg);
  color: var(--green);
}

#page-logs .logs-risk-copy strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

#page-logs .logs-risk-copy span {
  display: block;
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
}

#page-logs .logs-risk-count {
  color: var(--text2);
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1280px) {
  #page-logs .logs-redesign-layout {
    grid-template-columns: 1fr;
  }

  #page-logs .logs-side-stack {
    display: none;
  }
}

.changelog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.changelog-kicker {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.changelog-version {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--accent);
}

.changelog-list {
  display: grid;
  gap: 12px;
}

.changelog-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  padding: 16px;
  box-shadow: var(--shadow);
}

.changelog-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.changelog-title {
  font-size: 16px;
  font-weight: 850;
  color: var(--text);
}

.changelog-time {
  margin-top: 4px;
  color: var(--text3);
  font-size: 12px;
}

.changelog-tag {
  flex: none;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.changelog-text {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.55;
}

.changelog-points {
  margin: 10px 0 0 18px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.65;
}

.squsage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.squsage-sync {
  color: var(--text3);
  font-size: 13px;
}

.squsage-sync strong {
  color: var(--text);
  font-weight: 600;
}

.squsage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.squsage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.squsage-card .label {
  color: var(--text3);
  font-size: 12px;
  margin-bottom: 8px;
}

.squsage-card .value {
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0;
}

.squsage-card.balance .value { color: var(--green); }
.squsage-card.minutes .value { color: var(--accent); }

.squsage-consumption-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.squsage-consumption-stats.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.squsage-cost-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 16px;
  box-shadow: var(--shadow);
}

.squsage-cost-card .label {
  color: var(--text3);
  font-size: 12px;
  margin-bottom: 8px;
}

.squsage-cost-card .amount {
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.squsage-cost-card .meta {
  margin-top: 7px;
  color: var(--text3);
  font-size: 12px;
}

.squsage-prediction {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.squsage-predict-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow);
  padding: 15px 16px;
}

.squsage-predict-card.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f2fbf8 100%);
}

.squsage-predict-card.warn {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fff8ed 100%);
}

.squsage-predict-card.bad {
  border-color: rgba(220, 38, 38, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
}

.squsage-predict-label {
  color: var(--text3);
  font-size: 12px;
  margin-bottom: 7px;
}

.squsage-predict-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.15;
}

.squsage-predict-meta {
  margin-top: 7px;
  color: var(--text3);
  font-size: 12px;
}

.squsage-predict-status {
  flex: none;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.squsage-predict-status.warn {
  background: var(--orange-bg);
  color: var(--orange);
}

.squsage-predict-status.bad {
  background: var(--red-bg);
  color: var(--red);
}

.squsage-rent-section {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.squsage-rent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface2);
}

.squsage-rent-head h3 {
  margin: 0;
  font-size: 16px;
}

.squsage-rent-total {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.squsage-rent-note {
  color: var(--text3);
  font-size: 12px;
  font-weight: 500;
}

.squsage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
  align-items: start;
}
.supplier-account-side-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.alert-status-card { display: grid; gap: 12px; }
.alert-status-group { display: grid; gap: 10px; }
.alert-status-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 12px 14px;
}
.alert-status-label { color: var(--text3); font-size: 12px; }
.alert-status-value {
  margin-top: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}
.alert-status-meta { margin-top: 5px; color: var(--text3); font-size: 12px; line-height: 1.5; }
.alert-status-item.is-error {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #fff6f6 100%);
}
.alert-status-item.is-error .alert-status-value { color: var(--red); }

.squsage-chart-wrap {
  min-height: 330px;
}

.squsage-chart {
  width: 100%;
  height: 300px;
  overflow: visible;
}

.squsage-chart-host {
  position: relative;
}

.squsage-chart-tooltip {
  position: absolute;
  z-index: 8;
  min-width: 150px;
  max-width: 240px;
  padding: 8px 10px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.13);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  pointer-events: none;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.12s ease;
}

.squsage-chart-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.squsage-chart-hit {
  cursor: crosshair;
}

.squsage-chart text {
  fill: var(--text3);
  font-size: 11px;
}

.squsage-table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.squsage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.squsage-table th,
.squsage-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--surface2);
  text-align: right;
  white-space: nowrap;
}

.squsage-table th:first-child,
.squsage-table td:first-child {
  text-align: left;
}

.squsage-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--text3);
  z-index: 1;
}

.squsage-estimate {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.squsage-error {
  display: none;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--orange-bg);
  color: var(--orange);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  min-width: 0;
}

.dashboard-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-card {
  min-width: 0;
  min-height: 188px;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-card-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-mini {
  min-height: 76px;
  border-radius: 8px;
  padding: 12px;
  background: var(--surface2);
}

.dashboard-mini .label {
  color: var(--text3);
  font-size: 12px;
}

.dashboard-mini .value {
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-mini .meta {
  margin-top: 6px;
  color: var(--text3);
  font-size: 12px;
}

.dashboard-list {
  display: grid;
  gap: 8px;
}

.dashboard-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface2);
}

.dashboard-list-row:last-child {
  border-bottom: 0;
}

.dashboard-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.dashboard-dot.warn { background: var(--orange); }
.dashboard-dot.bad { background: var(--red); }

.dashboard-list-text {
  min-width: 0;
  flex: 1;
}

.dashboard-list-title {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-meta {
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
}

.dashboard-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text2);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.dashboard-tool:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.dashboard-tool:active {
  transform: translateY(1px);
}

.dashboard-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--accent);
}

.dashboard-status-list {
  display: grid;
  gap: 8px;
}

.dashboard-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 12px;
}

.dashboard-status-row strong {
  color: var(--text);
}

.dashboard-supplier-stack {
  display: grid;
  gap: 14px;
}

.dashboard-supplier-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 14px 16px;
}

.dashboard-supplier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-supplier-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.dashboard-supplier-meta {
  color: var(--text3);
  font-size: 12px;
}
.dashboard-alert-summary {
  display: grid;
  gap: 10px;
}
.dashboard-alert-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  padding: 10px 12px;
}
.dashboard-alert-item.is-error {
  border-color: rgba(220, 38, 38, 0.18);
  background: #fff6f6;
}
.dashboard-alert-title {
  color: var(--text3);
  font-size: 12px;
}
.dashboard-alert-value {
  margin-top: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}
.dashboard-alert-meta {
  margin-top: 4px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.load-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.load-guide-status-grid,
.load-guide-current-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.load-guide-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.load-guide-chip.high {
  background: #fee2e2;
  color: #b91c1c;
}

.load-guide-chip.medium {
  background: #fef3c7;
  color: #b45309;
}

.load-guide-chip.low {
  background: #dcfce7;
  color: #15803d;
}

.load-guide-chip.cpu {
  background: #e0f2fe;
  color: #0f766e;
}

.load-guide-chip.memory {
  background: #ede9fe;
  color: #6d28d9;
}

.load-guide-chip.network {
  background: #fce7f3;
  color: #be185d;
}

.load-guide-list {
  display: grid;
  gap: 10px;
}

.load-guide-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

.load-guide-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.load-guide-item p {
  margin: 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.6;
}

.load-guide-item .meta {
  margin-top: 8px;
  color: var(--text3);
  font-size: 12px;
}

.load-guide-summary-note {
  margin-top: 12px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.6;
}

.load-guide-table-wrap {
  max-height: 420px;
}

/* Phase 1f: shared compact components for the remaining pages */
.demo-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-inline-actions.compact {
  gap: 8px;
}

.demo-inline-actions.end {
  justify-content: flex-end;
}

.demo-inline-actions.between {
  justify-content: space-between;
}

.demo-subtle-text {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.demo-section-head-compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.demo-section-head-compact.tight {
  margin-bottom: 8px;
}

.demo-section-head-copy h3,
.demo-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.demo-section-head-copy p,
.demo-section-copy {
  margin: 4px 0 0;
}

.demo-box-note {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text3);
  font-size: 12px;
  line-height: 1.65;
  padding: 12px 14px;
}

.demo-box-note.tight {
  padding: 11px 12px;
}

.demo-box-note strong {
  color: var(--text2);
}

.demo-input-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.demo-toolbar-meta {
  color: var(--text3);
  font-size: 12px;
}

.demo-table-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.demo-table-empty {
  text-align: center;
  color: var(--text3);
}

.demo-flex-fill {
  flex: 1;
  min-width: 0;
}

.nav-item.is-protected {
  position: relative;
  padding-right: 30px;
}

.nav-lock-badge {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
  flex: none;
}

.nav-item.active .nav-lock-badge {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.dashboard-tool {
  position: relative;
}

.dashboard-tool.is-protected {
  padding-right: 28px;
}

.dashboard-tool-lock {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

.page.page-protected .header h1 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-lock-badge {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  vertical-align: middle;
}

#page-phoneauto .demo-phoneauto-status,
#page-phoneauto .demo-phoneauto-alerts,
#page-phoneauto .demo-phoneauto-logs {
  padding: 20px;
}

#page-phoneauto .demo-phoneauto-card-head,
#page-phoneauto .demo-phoneauto-log-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#page-phoneupload .phone-upload-list-head h3,
#page-accounts .demo-panel-toolbar h3,
#page-changelog .demo-panel-toolbar h3,
#page-customerlinks .customer-link-toolbar h3 {
  font-size: 16px;
  margin: 0;
}

#page-profit .content > .profit-shell,
#page-soukebao .content > .sk-shell {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

#page-profit .tool-card-title,
#page-soukebao .tool-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
}

#page-profit .tool-field,
#page-soukebao .tool-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

#page-soukebao .tool-field.is-wide {
  margin-bottom: 20px;
}

#page-profit .tool-field:last-child,
#page-soukebao .tool-field:last-child {
  margin-bottom: 0;
}

#page-profit .tool-field-row,
#page-soukebao .tool-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#page-profit .tool-label,
#page-soukebao .tool-label {
  display: block;
  color: var(--text2);
  font-size: 13px;
  font-weight: 700;
}

#page-soukebao .tool-label.is-sm {
  font-size: 12px;
}

#page-profit .tool-input,
#page-soukebao .tool-input,
#page-soukebao .sk-date-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
}

#page-profit .tool-input {
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
}

#page-soukebao .tool-input,
#page-soukebao .sk-date-input {
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

#page-profit .tool-input:focus,
#page-soukebao .tool-input:focus,
#page-soukebao .sk-date-input:focus {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
}

#page-profit .metric-kpi {
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

#page-profit .metric-kpi.kpi-green { background: var(--green-bg); }
#page-profit .metric-kpi.kpi-accent { background: var(--accent-light); }
#page-profit .metric-kpi.kpi-orange { background: var(--orange-bg); }
#page-profit .metric-kpi.kpi-blue { background: var(--blue-bg); }

#page-profit .metric-kpi-label {
  color: var(--text3);
  font-size: 12px;
  margin-bottom: 4px;
}

#page-profit .metric-kpi-value {
  font-size: 28px;
  font-weight: 700;
}

#page-profit .metric-kpi-value.is-green { color: var(--green); }
#page-profit .metric-kpi-value.is-accent { color: var(--accent); }
#page-profit .metric-kpi-value.is-orange { color: var(--orange); }
#page-profit .metric-kpi-value.is-blue { color: var(--blue); }

#page-profit .profit-breakdown-row {
  border-bottom: 1px solid var(--surface2);
}

#page-profit .profit-breakdown-row:last-child {
  border-bottom: 0;
}

#page-profit .profit-breakdown-label {
  color: var(--text2);
}

#page-profit .profit-breakdown-value {
  text-align: right;
  font-weight: 600;
}

#page-profit .profit-breakdown-value.is-positive { color: var(--green); }
#page-profit .profit-breakdown-value.is-negative { color: var(--red); }

#page-profit .profit-diff-result {
  text-align: center;
  margin-bottom: 14px;
}

#page-profit .profit-diff-label,
#page-profit .profit-diff-unit {
  color: var(--text3);
  font-size: 12px;
}

#page-profit .profit-diff-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--orange);
}

#page-profit .profit-diff-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

#page-profit .profit-diff-meta-row:last-child {
  margin-bottom: 0;
}

#page-profit .profit-diff-meta-label {
  color: var(--text3);
}

#page-profit .profit-diff-meta-value {
  font-weight: 600;
  color: var(--text);
}

#page-profit .profit-diff-formula {
  color: var(--text3);
  font-size: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

#page-soukebao .tool-subtitle {
  color: var(--text2);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

#page-soukebao .sk-tier-head {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

#page-soukebao .sk-tier-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--text3);
  font-size: 12px;
}

#page-soukebao .sk-tier-meta strong {
  color: var(--text);
  font-weight: 700;
}

#page-soukebao .sk-tier-meta strong.is-green {
  color: var(--green);
}

#page-soukebao .sk-total-card {
  text-align: center;
  margin-bottom: 16px;
}

#page-soukebao .sk-total-label,
#page-soukebao .sk-total-unit,
#page-soukebao .sk-date-range-title,
#page-loadguide .card-head-meta {
  color: var(--text3);
  font-size: 12px;
}

#page-soukebao .sk-total-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--green);
}

#page-soukebao .sk-result-table thead th {
  text-align: right;
}

#page-soukebao .sk-result-table thead th:first-child,
#page-soukebao .sk-result-table tbody td:first-child {
  text-align: left;
}

#page-soukebao .sk-result-table tbody td,
#page-soukebao .sk-result-table tfoot td {
  text-align: right;
}

#page-soukebao .sk-result-table .accent-cell {
  color: var(--accent);
}

#page-soukebao .sk-result-table .green-cell {
  color: var(--green);
}

#page-soukebao .sk-result-table .is-summary {
  background: var(--surface2);
}

#page-soukebao .sk-date-range-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

#page-soukebao .sk-date-sep {
  color: var(--text3);
}

#page-logs .log-toolbar.compact {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

#page-okcc .okcc-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  #page-profit .content > .profit-shell,
  #page-soukebao .content > .sk-shell {
    flex-direction: column;
  }

  #page-profit .tool-field-row,
  #page-soukebao .tool-field-row,
  #page-soukebao .sk-date-range-grid {
    grid-template-columns: 1fr;
  }
}

/* Page */
.page { display: none; }
.page.active { display: block; }

/* Empty */
.empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty .icon { font-size: 48px; margin-bottom: 12px; }

/* Responsive */
@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 920px) {
  .dashboard-section-grid,
  .dashboard-side,
  .demo-system-layout,
  .demo-resource-layout,
  .demo-system-bottom,
  .demo-resource-bottom {
    grid-template-columns: 1fr;
  }
  .dashboard-card {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .content, .header { padding-left: 16px; padding-right: 16px; }
  .stats { flex-direction: column; }
  .account-layout { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr; }
  .access-settings-head { flex-direction: column; }
  .access-settings-head .btn { width: 100%; }
  .access-settings-grid { grid-template-columns: 1fr; }
  .access-module-grid { grid-template-columns: 1fr; }
  .log-toolbar { grid-template-columns: 1fr; }
  .phone-shortcuts {
    width: 100%;
    justify-content: flex-start;
  }
  .phone-shortcut {
    width: 100%;
    min-height: 30px;
  }
  .phone-header-bar,
  .phone-workspace {
    display: grid;
    grid-template-columns: 1fr;
  }
  .memo-note-head { align-items: flex-start; flex-direction: column; }
  .memo-note-actions { width: 100%; justify-content: space-between; }
  .memo-compose-grid { grid-template-columns: 1fr; }
  .memo-toolbar { align-items: stretch; flex-direction: column; }
  .memo-search { max-width: none; }
  .memo-item { grid-template-columns: 26px minmax(0, 1fr) 28px; }
  .okcc-panel-head { align-items: flex-start; flex-direction: column; }
  .phone-auto-webhook-grid,
  .okcc-settings-grid { grid-template-columns: 1fr; }
  .phone-auto-settings-grid,
  .phone-auto-pause-grid,
  .phone-auto-test-row,
  .phone-auto-status-grid,
  .phone-auto-panel-grid { grid-template-columns: 1fr; }
  .okcc-grid { grid-template-columns: 1fr; }
  .okcc-card-bottom { align-items: stretch; flex-direction: column; }
  .okcc-login-btn { width: 100%; }
  .customer-link-layout,
  .demo-system-layout,
  .demo-resource-layout,
  .demo-system-bottom,
  .demo-resource-bottom { grid-template-columns: 1fr; }
  .customer-link-form-inline { grid-template-columns: 1fr; }
  .customer-link-actions { padding-top: 0; }
  .customer-link-toolbar { align-items: stretch; flex-direction: column; }
  .customer-link-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-upload-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .phone-upload-actions { justify-content: flex-start; }
  .phone-upload-summary-strip { grid-template-columns: 1fr; }
  .phone-upload-search { max-width: none; }
  .load-guide-grid,
  .load-guide-status-grid,
  .load-guide-current-grid { grid-template-columns: 1fr; }
  .squsage-toolbar { align-items: flex-start; flex-direction: column; }
  .squsage-stats, .squsage-consumption-stats, .squsage-prediction, .squsage-grid, .supplier-account-side-grid { grid-template-columns: 1fr; }
  .dashboard-grid, .dashboard-section-grid { grid-template-columns: 1fr; }
  .dashboard-tool-grid { grid-template-columns: 1fr; }
}

/* Visual refresh: keep the single-file app intact, but make it feel like a compact work console. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface2: #f2f4f7;
  --border: #d9dee7;
  --text: #17202a;
  --text2: #536171;
  --text3: #8893a3;
  --accent: #0f766e;
  --accent-hover: #0b5f59;
  --accent-light: rgba(15, 118, 110, 0.1);
  --green: #15803d;
  --green-bg: rgba(21, 128, 61, 0.1);
  --orange: #b45309;
  --orange-bg: rgba(180, 83, 9, 0.1);
  --red: #b91c1c;
  --red-bg: rgba(185, 28, 28, 0.1);
  --blue: #1d4ed8;
  --blue-bg: rgba(29, 78, 216, 0.1);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-hover: 0 10px 24px rgba(16, 24, 40, 0.08);
  --radius: 8px;
  --sidebar-w: 214px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 340px),
    linear-gradient(180deg, #fbfcfd 0%, var(--bg) 280px);
  color: var(--text);
  font-size: 14px;
  overflow-x: hidden;
}

.sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(16, 24, 40, 0.02);
  backdrop-filter: blur(16px);
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(136, 147, 163, 0.5) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(136, 147, 163, 0.35);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-logo {
  min-height: 64px;
  padding: 14px 16px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo .icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
}

.sidebar-logo span {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}

.nav-group {
  margin: 8px 10px;
}

.nav-label {
  color: var(--text3);
  letter-spacing: 0.04em;
}

.nav-item {
  min-height: 36px;
  gap: 9px;
  color: var(--text2);
  border: 1px solid transparent;
  border-radius: 8px;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
  border-color: rgba(15, 118, 110, 0.16);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef1f5;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text3);
  font-size: 12px !important;
  font-weight: 700;
  opacity: 1;
}

.nav-item.active .nav-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.nav-item .badge {
  background: var(--accent);
  border-radius: 999px;
  box-shadow: none;
}

.main {
  min-height: 100vh;
  width: auto;
}

.page {
  width: 100%;
}

.header {
  padding: 28px 36px 0;
}

.header h1 {
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.25;
}

.header p {
  color: var(--text2);
  margin-top: 6px;
}

.content {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  padding: 22px 36px 36px;
}

.top-hub {
  position: fixed;
  top: 18px;
  right: 32px;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hub-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.hub-button:hover {
  border-color: #c5ccd8;
  box-shadow: var(--shadow-hover);
}

.server-preview {
  order: 1;
  min-width: 238px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px !important;
  text-align: left;
}

.server-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--text3);
  box-shadow: 0 0 0 4px rgba(136, 147, 163, 0.12);
  flex-shrink: 0;
}

.server-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-bg);
}

.server-dot.warn {
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-bg);
}

.server-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-bg);
}

.server-preview-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.server-preview-meta {
  display: block;
  margin-top: 2px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.2;
}

.message-button {
  order: 2;
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px !important;
  font-size: 18px;
}

.message-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  display: none;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid #fff;
}

.message-badge.show {
  display: grid;
}

.demo-system-layout,
.demo-resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.demo-system-side,
.demo-resource-side,
.demo-system-bottom,
.demo-resource-bottom {
  display: grid;
  gap: 12px;
}

.demo-system-bottom,
.demo-resource-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.demo-system-main-card,
.demo-resource-main-card {
  min-height: 560px;
}

.demo-mini-table-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.demo-mini-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.demo-mini-table th,
.demo-mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  font-size: 12px;
  vertical-align: top;
}

.demo-mini-table th {
  color: var(--text3);
  font-weight: 700;
  background: #fbfcfe;
}

.demo-mini-table tr:last-child td {
  border-bottom: 0;
}

.demo-mini-table .ok {
  color: var(--green);
  font-weight: 700;
}

.demo-mini-table .bad {
  color: var(--red);
  font-weight: 700;
}

.demo-update-list,
.demo-todo-preview-list,
.demo-risk-preview-list,
.demo-server-preview-list {
  display: grid;
  gap: 8px;
}

.demo-update-item,
.demo-todo-item,
.demo-risk-item,
.demo-server-item {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfe;
}

.demo-update-top,
.demo-server-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-update-title,
.demo-todo-title,
.demo-risk-title,
.demo-server-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.demo-update-meta,
.demo-todo-meta,
.demo-risk-meta,
.demo-server-meta {
  margin-top: 3px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.demo-version-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.demo-todo-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
}

.demo-todo-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.demo-todo-dot.warn {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.12);
}

.demo-risk-item.critical {
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(185, 28, 28, 0.04);
}

.demo-risk-item.warn {
  border-color: rgba(180, 83, 9, 0.2);
  background: rgba(180, 83, 9, 0.04);
}

.demo-server-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.demo-server-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.demo-server-status.pending {
  color: var(--orange);
}

.demo-server-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.demo-server-actions .btn-ghost {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.top-account {
  order: 3;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.top-account-info {
  min-width: 0;
}

.top-account-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.top-account-name {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.top-account-role {
  display: block;
  margin-top: 2px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.top-account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-account-action {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.top-account-action:hover {
  background: var(--accent);
  color: #fff;
}

.top-account-action.logout {
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
}

.top-account-action.logout:hover {
  background: var(--red);
  color: #fff;
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}

.password-modal[hidden] {
  display: none;
}

.password-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.password-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.password-card-title {
  font-size: 18px;
  font-weight: 800;
}

.password-card-subtitle {
  margin-top: 4px;
  color: var(--text3);
  font-size: 13px;
  line-height: 1.45;
}

.password-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  font-size: 18px;
}

.password-close:hover {
  background: var(--red-bg);
  color: var(--red);
}

.app-dialog-card {
  width: min(460px, 100%);
}

.app-dialog-message {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-dialog-input-wrap {
  margin-top: 14px;
}

.app-dialog-input-wrap[hidden] {
  display: none;
}

.app-dialog-input {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  background: var(--surface2);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  font: inherit;
}

.app-dialog-input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.settings-dialog-card {
  width: min(980px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
}

.settings-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-dialog-section {
  grid-column: 1 / -1;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.settings-dialog-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.settings-dialog-section h4 {
  margin: 0 0 8px;
  font-size: 15px;
}

.settings-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.settings-dialog-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
}

.settings-dialog-field input {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  background: var(--surface2);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  font: inherit;
}

.settings-dialog-field input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.settings-dialog-toggle {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  font-weight: 700;
}

.settings-dialog-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.settings-dialog-hint {
  font-size: 12px;
  color: var(--text3);
}

.settings-dialog-route-card {
  grid-column: span 1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.wecom-okcc-mode-card {
  grid-column: 1 / -1;
  gap: 12px;
  border-color: #cfe2f0;
  background: linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
}

.wecom-okcc-mode-copy {
  display: grid;
  gap: 4px;
}

.wecom-okcc-mode-title {
  font-size: 14px;
  font-weight: 900;
  color: #10223a;
}

.wecom-okcc-mode-subtitle {
  color: #6b7e96;
  font-size: 12px;
  line-height: 1.55;
}

.wecom-okcc-mode-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.wecom-okcc-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid #d7e3ee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.wecom-okcc-mode-option:hover {
  border-color: #9cb8cc;
  background: #fbfdff;
}

.wecom-okcc-mode-option:has(input:checked) {
  border-color: #0b8f7d;
  background: #effbf8;
  box-shadow: 0 0 0 3px rgba(11, 143, 125, .10);
}

.wecom-okcc-mode-option input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #0b8f7d;
  flex: 0 0 auto;
}

.wecom-okcc-mode-option strong,
.wecom-okcc-mode-option small {
  display: block;
}

.wecom-okcc-mode-option strong {
  color: #10223a;
  font-size: 13px;
}

.wecom-okcc-mode-option small {
  margin-top: 3px;
  color: #6b7e96;
  font-size: 12px;
  line-height: 1.45;
}

.wecom-okcc-mode-warning {
  color: #9a6700;
  font-size: 12px;
  line-height: 1.5;
}

.settings-dialog-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-dialog-route-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}

.settings-dialog-route-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-dialog-route-fields .settings-dialog-field {
  min-width: 0;
}

.settings-dialog-route-fields .settings-dialog-field.full {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .settings-dialog-grid,
  .settings-dialog-route-fields,
  .wecom-okcc-mode-options {
    grid-template-columns: 1fr;
  }

  .settings-dialog-route-card {
    grid-column: 1 / -1;
  }
}

.password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.hub-panel {
  position: absolute;
  top: 52px;
  right: 0;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 84px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.hub-panel[hidden] {
  display: none;
}

.hub-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.hub-panel-title {
  font-size: 15px;
  font-weight: 700;
}

.hub-panel-subtitle {
  margin-top: 2px;
  color: var(--text3);
  font-size: 12px;
}

.hub-panel-body {
  overflow-y: auto;
  padding: 12px;
}

.server-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.server-metric {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.server-metric-label {
  color: var(--text3);
  font-size: 11px;
  margin-bottom: 4px;
}

.server-metric-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  word-break: break-all;
}

.metric-bar {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface2);
}

.metric-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
}

.metric-bar.warn span {
  background: var(--orange);
}

.metric-bar.bad span {
  background: var(--red);
}

.server-services {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.server-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 12px;
}

.message-list {
  display: grid;
  gap: 8px;
}

.message-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.message-item.read {
  opacity: 0.62;
}

.message-item.warn {
  border-left-color: var(--orange);
}

.message-item.bad {
  border-left-color: var(--red);
}

.message-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.message-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.message-detail {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.45;
}

.message-time {
  color: var(--text3);
  font-size: 11px;
}

.message-action {
  border: 0;
  background: transparent;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
}

.message-action:hover {
  color: var(--accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card,
.card,
.todo-item {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 96px;
  padding: 16px;
}

.stat-card .label {
  color: var(--text2);
  font-size: 12px;
}

.stat-card .value {
  margin-top: 2px;
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1.1;
}

.card {
  padding: 20px;
  margin-bottom: 18px;
}

.card h3,
.card > div:first-child[style*="font-size:16px"],
.card > div:first-child[style*="font-size:15px"] {
  color: var(--text);
  letter-spacing: 0;
}

input,
textarea,
select {
  border-radius: 8px !important;
  color: var(--text);
  font-family: inherit;
}

.add-row input[type="text"],
.add-row textarea,
.add-row input[type="date"],
#historySearch {
  background: var(--surface2) !important;
  border: 1px solid transparent !important;
}

.add-row input[type="text"]:focus,
.add-row textarea:focus,
.add-row input[type="date"]:focus,
#historySearch:focus {
  background: var(--surface) !important;
  border-color: var(--accent) !important;
}

.btn,
.btn-ghost,
.filter-btn,
button,
a.btn {
  border-radius: 8px !important;
  letter-spacing: 0;
}

.btn {
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.18);
  min-height: 40px;
  padding: 9px 16px;
  font-weight: 600;
}

.btn:hover {
  background: var(--accent-hover);
  transform: none;
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  min-height: 38px;
  padding: 8px 14px;
  font-weight: 600;
}

.btn-ghost:hover {
  background: var(--surface2);
  border-color: #c5ccd8;
  transform: none;
}

.filter-btn {
  border-radius: 999px !important;
  box-shadow: none;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

.todo-item {
  padding: 13px 14px;
}

.delete {
  opacity: 1;
}

.tag,
.status-tag {
  border-radius: 999px;
}

.result-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.result-table th {
  background: #eef1f5;
  color: var(--text2);
  letter-spacing: 0;
}

.result-table tr:nth-child(even) td {
  background: #fafbfc;
}

.result-table tr:hover td {
  background: rgba(15, 118, 110, 0.06);
}

.empty {
  color: var(--text3);
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.auth-error:not(:empty),
.okcc-settings-error:not(:empty),
.squsage-error:not(:empty) {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: 10px;
  background: #fff6f6;
  color: var(--red);
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .content > div[style*="display:flex;gap:20px;align-items:flex-start;"],
  .content > div[style*="display:flex;gap:20px;align-items:flex-start"] {
    flex-wrap: wrap;
  }

  .content div[style*="width:380px"],
  .content div[style*="width:420px"],
  .content div[style*="width:320px"] {
    width: min(100%, 420px) !important;
  }

  .content div[style*="max-width:calc(100% - 440px)"] {
    max-width: 100% !important;
  }
}

@media (max-width: 760px) {
  body {
    display: block;
  }

  .sidebar {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 64px;
    bottom: auto;
    right: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
    align-items: center;
    z-index: 30;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar-logo {
    min-width: 128px;
    min-height: 64px;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    padding: 12px 14px;
  }

  .sidebar-logo .icon {
    width: 30px;
    height: 30px;
  }

  .nav-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 8px 0 0;
  }

  .nav-group[style*="margin-top:auto"] {
    display: none;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    min-width: max-content;
    min-height: 40px;
    margin: 0;
    padding: 8px 10px;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }

  .main {
    margin-left: 0;
    padding-top: 70px;
  }

  .top-hub {
    top: 76px;
    right: 12px;
    left: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .server-preview {
    min-width: 0;
    max-width: 100%;
    flex: 1;
  }

  .top-account {
    order: 3;
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
  }

  .hub-panel {
    top: 52px;
    width: calc(100vw - 24px);
  }

  .server-grid {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 18px 16px 0;
  }

  .header h1 {
    font-size: 22px;
  }

  .content {
    padding: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .content div[style*="width:380px"],
  .content div[style*="width:420px"],
  .content div[style*="width:320px"] {
    width: 100% !important;
    position: static !important;
  }

  .content div[style*="display:flex;gap:20px;align-items:flex-start;"],
  .content div[style*="display:flex;gap:20px;align-items:flex-start"] {
    flex-direction: column;
  }

  .header[style*="display:flex"] {
    flex-direction: column;
    gap: 12px;
  }

  .result-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 460px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .add-row {
    flex-direction: column;
  }

  .btn,
  .btn-ghost {
    width: 100%;
  }
}
/* Mobile fit pass */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .main {
    width: 100%;
    max-width: 100vw;
  }

  .header,
  .content {
    width: 100%;
    max-width: 100vw;
  }

  .top-hub {
    position: static;
    width: auto;
    margin: 10px 16px 0;
    justify-content: stretch;
  }

  .server-preview,
  .top-account,
  .message-button {
    min-width: 0;
    width: 100%;
  }

  .message-button {
    justify-content: center;
  }

  .card,
  .stat-card,
  .squsage-card,
  .squsage-cost-card,
  .squsage-predict-card,
  .dashboard-card {
    max-width: 100%;
  }

  .phone-upload-actions,
  .customer-link-actions,
  .memo-note-actions,
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .phone-upload-file,
  .phone-upload-actions .btn,
  .phone-upload-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .phone-upload-table-wrap,
  .squsage-table-wrap,
  .log-table-wrap,
  .result-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .phone-upload-table,
  .squsage-table {
    min-width: 680px;
  }

  .squsage-rent-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .squsage-rent-total {
    align-self: stretch;
    text-align: left;
  }

  .squsage-chart-wrap {
    min-width: 0;
    overflow-x: auto;
  }

  .squsage-chart {
    min-width: 620px;
  }

  #page-phone .main,
  #page-phone .content {
    height: auto;
    overflow: visible;
  }

  .phone-main-panel,
  .phone-workspace,
  .phone-query-pane {
    height: auto;
  }

  .phone-workspace {
    gap: 16px;
  }

  .phone-history-card {
    max-height: 420px;
  }
}

@media (max-width: 420px) {
  .header h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .content {
    padding: 12px;
  }

  .card {
    padding: 12px;
  }
}

/* Scheme C overhaul: keep logic and IDs intact, rebuild the shell and key surfaces. */
:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface2: #f6f8fc;
  --border: #dbe3ee;
  --text: #102033;
  --text2: #526275;
  --text3: #7f8da0;
  --accent: #0f766e;
  --accent-hover: #0a5f58;
  --accent-light: rgba(15, 118, 110, 0.10);
  --green: #15803d;
  --green-bg: rgba(21, 128, 61, 0.08);
  --orange: #c26b0a;
  --orange-bg: rgba(194, 107, 10, 0.10);
  --red: #c2410c;
  --red-bg: rgba(194, 65, 12, 0.10);
  --blue: #2563eb;
  --blue-bg: rgba(37, 99, 235, 0.10);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --sidebar-w: 248px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
  color: var(--text);
}

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #111c2d 54%, #142133 100%);
  box-shadow: 10px 0 36px rgba(15, 23, 42, 0.18);
}

.sidebar-logo {
  padding: 24px 22px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
}

.sidebar-logo .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  box-shadow: 0 10px 22px rgba(20, 184, 166, 0.24);
}

.sidebar-logo span {
  font-size: 17px;
  font-weight: 700;
}

.nav-group {
  margin: 6px 14px;
}

.nav-label {
  padding: 14px 12px 8px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.9px;
}

.nav-item {
  min-height: 42px;
  border-radius: 10px;
  padding: 10px 12px;
  color: rgba(255,255,255,0.7);
}

.nav-item:hover {
  background: rgba(255,255,255,0.10);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(15,118,110,0.28) 0%, rgba(45,212,191,0.18) 100%);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.18);
}

.nav-item .nav-icon {
  width: 26px;
  font-size: 16px;
  font-weight: 700;
}

.main {
  margin-left: var(--sidebar-w);
}

.header {
  padding: 34px 36px 0;
}

.header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.header p {
  font-size: 14px;
  color: var(--text3);
}

.content {
  max-width: 1440px;
  padding: 22px 36px 40px;
}

.top-hub {
  top: 18px;
  right: 22px;
  gap: 10px;
}

.hub-button,
.top-account {
  min-height: 44px;
  border-radius: 14px !important;
  border-color: rgba(219, 227, 238, 0.95);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.top-account {
  border-radius: 16px !important;
  padding: 8px 10px 8px 12px;
}

.top-account-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.card,
.stat-card,
.squsage-card,
.squsage-cost-card,
.squsage-predict-card,
.dashboard-card,
.phone-auto-log-item,
.account-row,
.customer-link-card,
.okcc-card,
.memo-item {
  border-radius: 16px !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.card,
.dashboard-card,
.phone-auto-log-item,
.account-row,
.memo-item {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
}

.stats {
  gap: 14px;
}

.stat-card {
  min-height: 104px;
  padding: 18px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--text3);
}

.stat-card .value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

.card {
  padding: 20px;
  margin-bottom: 20px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.dashboard-section-grid {
  gap: 18px;
}

.dashboard-card {
  min-height: 0;
}

.dashboard-card-head {
  margin-bottom: 14px;
}

.dashboard-card-head h3,
.module-section-copy h3,
.access-settings-head h3,
.squsage-rent-head h3,
.hub-panel-title,
.okcc-panel-title,
.memo-list-title,
.password-card-title {
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-mini,
.dashboard-alert-item,
.dashboard-status-row,
.phone-auto-row,
.server-metric,
.message-item,
.alert-status-item,
.squsage-cost-card,
.squsage-predict-card,
.squsage-card,
.okcc-settings-card,
.customer-link-preview,
.customer-link-metric {
  border-radius: 12px !important;
}

.dashboard-mini,
.dashboard-alert-item,
.dashboard-status-row {
  background: var(--surface2);
}

.dashboard-tool-grid {
  gap: 10px;
}

.dashboard-tool {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
}

.dashboard-tool-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(15, 118, 110, 0.10);
  color: var(--accent);
}

.btn,
.btn-ghost,
.message-action,
.top-account-action,
.memo-chip,
.memo-filter,
.filter-btn {
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s, transform 0.08s;
}

.btn {
  background: linear-gradient(180deg, #15857c 0%, #0f766e 100%);
  box-shadow: 0 10px 18px rgba(15,118,110,0.16);
}

.btn:hover {
  background: linear-gradient(180deg, #0f766e 0%, #0b5f59 100%);
}

.btn-ghost {
  background: #fff;
}

.btn:active,
.btn-ghost:active,
.dashboard-tool:active,
.message-action:active {
  transform: translateY(1px);
}

.empty {
  padding: 34px 20px;
  font-size: 13px;
  line-height: 1.6;
}

.squsage-toolbar,
.phone-upload-toolbar,
.customer-link-toolbar,
.memo-toolbar,
.hub-panel-header {
  gap: 14px;
}

.squsage-error {
  background: rgba(194, 107, 10, 0.10);
  color: var(--orange);
}

.phone-auto-log-item.is-error,
.alert-status-item.is-error,
.dashboard-alert-item.is-error {
  border-color: rgba(194, 65, 12, 0.18) !important;
  background: linear-gradient(180deg, #fff 0%, #fff5f0 100%) !important;
}

.account-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.customer-link-grid,
.okcc-grid {
  gap: 16px;
}

@media (max-width: 1280px) {
  .content {
    max-width: 100%;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .account-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .header,
  .content {
    padding-left: 22px;
    padding-right: 22px;
  }
  .dashboard-side,
  .dashboard-section-grid,
  .supplier-account-side-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Demo layout rebuild */
.demo-page-head,
.demo-panel-head,
.demo-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-page-head h1,
.demo-panel-head h3,
.demo-preview-title {
  margin: 0;
}

.demo-page-head p {
  margin: 6px 0 0;
  color: var(--text3);
}

.demo-dashboard-content {
  max-width: 1460px;
}

.demo-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.demo-stat-card {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  min-height: 136px;
}

.demo-stat-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.demo-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.demo-stat-icon.sq { background: linear-gradient(135deg, #16a085 0%, #0f766e 100%); }
.demo-stat-icon.lx { background: linear-gradient(135deg, #4f8df7 0%, #2f6ee5 100%); }
.demo-stat-icon.auto { background: linear-gradient(135deg, #2bbf7f 0%, #0f9b62 100%); }
.demo-stat-icon.change { background: linear-gradient(135deg, #ff9f43 0%, #ff7a00 100%); }

.demo-stat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.demo-stat-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.demo-stat-foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-stat-meta,
.demo-reminder-time,
.demo-preview-kpis em {
  font-size: 12px;
  color: var(--text3);
  font-style: normal;
}

.demo-reminder-time {
  min-width: 44px;
  text-align: right;
}

.demo-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(15, 118, 110, 0.10);
  color: var(--accent);
  white-space: nowrap;
}

.demo-status-pill.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.demo-status-pill.warn {
  background: rgba(255, 159, 67, 0.14);
  color: #c26b0a;
}

.demo-status-pill.bad {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.demo-dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34%;
  gap: 14px;
  margin-bottom: 14px;
}

.demo-dashboard-main,
.demo-dashboard-side {
  display: grid;
  gap: 14px;
}

.demo-panel {
  padding: 0;
  overflow: hidden;
}

.demo-panel-head {
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(223, 231, 240, 0.9);
  background: rgba(255,255,255,0.98);
}

.demo-panel-head h3 {
  font-size: 16px;
  font-weight: 800;
}

.demo-panel-head .btn-ghost {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.demo-reminder-list,
.demo-panel-link {
  padding: 0 18px 16px;
}

.demo-reminder-list {
  min-height: 128px;
}

.demo-reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(223, 231, 240, 0.75);
}

.demo-reminder-row:last-child {
  border-bottom: 0;
}

.demo-reminder-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.5;
}

.demo-reminder-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 auto;
}

.demo-reminder-dot.ok { background: #10b981; }
.demo-reminder-dot.warn { background: #f59e0b; }
.demo-reminder-dot.bad { background: #ef4444; }

.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.demo-table th,
.demo-table td {
  padding: 10px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(223, 231, 240, 0.75);
  vertical-align: top;
}

.demo-table th {
  color: var(--text3);
  font-weight: 700;
  background: rgba(247, 249, 252, 0.7);
  font-size: 12px;
}

.demo-table td {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.demo-table tbody tr:last-child td {
  border-bottom: 0;
}

.demo-panel-link {
  display: flex;
  justify-content: flex-end;
}

.demo-quick-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.demo-quick-grid .dashboard-tool {
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  border-radius: 12px;
  padding: 0 9px;
}

.demo-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.demo-preview-card {
  padding: 0;
  overflow: hidden;
  min-height: 274px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(223, 231, 240, 0.95);
}

.demo-preview-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(223, 231, 240, 0.9);
  background: rgba(255,255,255,0.98);
}

.demo-preview-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.demo-preview-summary {
  padding: 14px;
  flex: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
}

.demo-preview-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.demo-preview-head {
  align-items: center;
}

.demo-preview-head > .demo-preview-title {
  margin-left: auto;
}

.demo-preview-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.demo-preview-kpis div {
  padding: 12px 11px;
  border: 1px solid rgba(223, 231, 240, 0.8);
  border-radius: 12px;
  background: rgba(247, 249, 252, 0.8);
  min-height: 78px;
}

.demo-preview-kpis span {
  display: block;
  font-size: 12px;
  color: var(--text3);
}

.demo-preview-kpis strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.demo-preview-kpis em {
  display: block;
  margin-top: 5px;
}

.demo-preview-actions {
  padding: 0 14px 14px;
  display: flex;
  justify-content: flex-start;
}

.demo-preview-actions .btn-ghost {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

.demo-preview-card.is-wide {
  grid-column: auto;
  min-height: 292px;
}

.demo-preview-card.is-wide .demo-preview-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-account-content,
.demo-phoneauto-content {
  max-width: 1460px;
}

.demo-account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.demo-account-main,
.demo-side-card {
  margin-bottom: 0;
}

.demo-account-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 86px;
}

.demo-phoneauto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.demo-phoneauto-config {
  grid-row: span 2;
}

.demo-phoneauto-logs {
  grid-column: 1 / -1;
}

.dashboard-tool {
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-tool span:last-child {
  white-space: nowrap;
}

.dashboard-tool-icon {
  background: transparent;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 16px;
  color: var(--accent);
}

.demo-account-main .squsage-toolbar,
.demo-phoneauto-content .module-section-head {
  margin-bottom: 14px;
}

.demo-account-main .squsage-grid,
.demo-account-main .squsage-consumption-stats,
.demo-account-main .squsage-prediction,
.demo-phoneauto-grid,
.phone-auto-status-grid {
  gap: 14px;
}

.demo-side-card .module-section-copy h3,
.demo-side-card .access-settings-head h3 {
  font-size: 16px;
}

.demo-account-main .squsage-stats,
.phone-auto-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.demo-account-main .squsage-card,
.phone-auto-status-card {
  min-height: 98px;
  padding: 16px 16px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
}

.demo-account-main .squsage-card .label,
.phone-auto-status-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 700;
}

.demo-account-main .squsage-card .value,
.phone-auto-status-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.phone-auto-status-sub,
.demo-account-main .squsage-card .meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

.demo-account-main .squsage-consumption-stats,
.demo-account-main .squsage-prediction {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.demo-account-main .squsage-cost-card,
.demo-account-main .squsage-predict-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(247,249,252,0.78);
  box-shadow: none;
}

.demo-account-main .squsage-cost-card {
  padding: 16px 14px;
}

.demo-account-main .squsage-cost-card .label,
.demo-account-main .squsage-predict-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 700;
}

.demo-account-main .squsage-cost-card .amount,
.demo-account-main .squsage-predict-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.demo-account-main .squsage-cost-card .meta,
.demo-account-main .squsage-predict-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

.demo-account-main .squsage-chart-wrap,
.demo-account-main .squsage-rent-section,
.demo-account-main .squsage-table-wrap,
.demo-phoneauto-config,
.demo-phoneauto-status,
.demo-phoneauto-alerts,
.demo-phoneauto-logs,
.demo-side-card {
  border-radius: 16px;
}

.demo-account-main .squsage-rent-section {
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.96);
}

.demo-account-main .squsage-rent-head h3,
.demo-account-main .squsage-chart-wrap h3,
.demo-account-main .squsage-grid h3,
.demo-phoneauto-content h3 {
  font-size: 16px;
  font-weight: 800;
}

.demo-account-main .squsage-table-wrap,
.demo-phoneauto-log-card,
.demo-phoneauto-config,
.demo-phoneauto-status,
.demo-phoneauto-alerts {
  border: 1px solid rgba(223,231,240,0.9);
}

.demo-phoneauto-config .access-settings-head,
.demo-phoneauto-status > div:first-child,
.demo-phoneauto-alerts .module-section-copy,
.demo-phoneauto-log-card > div:first-child {
  margin-bottom: 12px;
}

.demo-phoneauto-config,
.demo-phoneauto-status,
.demo-phoneauto-alerts,
.demo-phoneauto-logs {
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
}

.demo-phoneauto-status,
.demo-phoneauto-alerts,
.demo-phoneauto-logs,
.demo-side-card {
  padding: 16px !important;
}

.demo-side-card {
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
}

.phone-auto-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(223,231,240,0.75);
}

.phone-auto-row:last-child {
  border-bottom: 0;
}

.phone-auto-row-label {
  font-size: 13px;
  color: var(--text3);
  font-weight: 700;
}

.phone-auto-row-value {
  flex: 1;
  text-align: right;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.phone-auto-log-item {
  border-radius: 14px !important;
  margin-bottom: 10px;
  padding: 14px;
}

.phone-auto-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.phone-auto-log-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.phone-auto-log-time,
.phone-auto-log-meta,
.phone-auto-log-detail {
  font-size: 12px;
  line-height: 1.6;
}

.phone-auto-log-meta {
  color: var(--text3);
  margin-bottom: 6px;
}

.phone-auto-log-detail {
  color: var(--text2);
}

.alert-status-group {
  display: grid;
  gap: 10px;
}

.alert-status-item {
  padding: 14px;
  border: 1px solid rgba(223,231,240,0.85);
  background: rgba(247,249,252,0.82);
}

.alert-status-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 700;
}

.alert-status-value {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.alert-status-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

.access-settings-grid .auth-field label,
.phone-auto-webhook-grid .auth-field label,
.phone-auto-settings-grid .auth-field label,
.phone-auto-pause-grid .auth-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
}

.access-settings-grid .account-input,
.phone-auto-webhook-grid .account-input,
.phone-auto-settings-grid .account-input,
.phone-auto-pause-grid .account-input,
.phone-auto-settings-grid .account-select {
  min-height: 42px;
  border-radius: 12px;
}

@media (max-width: 1280px) {
  .demo-stat-grid,
  .demo-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .demo-dashboard-columns,
  .demo-account-layout,
  .demo-phoneauto-grid {
    grid-template-columns: 1fr;
  }
  .demo-account-side {
    position: static;
  }
}

@media (max-width: 980px) {
  .demo-stat-grid,
  .demo-preview-grid,
  .demo-preview-kpis,
  .demo-quick-grid {
    grid-template-columns: 1fr;
  }
}

/* Demo-direction correction: align shell with the earliest mockup. */
:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface2: #f7f9fc;
  --border: #dfe7f0;
  --text: #102033;
  --text2: #5f6f82;
  --text3: #8a99aa;
  --accent: #0f766e;
  --accent-hover: #0a5f58;
  --accent-light: rgba(15, 118, 110, 0.08);
  --green: #15803d;
  --green-bg: rgba(21, 128, 61, 0.08);
  --orange: #c26b0a;
  --orange-bg: rgba(194, 107, 10, 0.10);
  --red: #c2410c;
  --red-bg: rgba(194, 65, 12, 0.10);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.10);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 28px rgba(15, 23, 42, 0.07);
  --radius: 15px;
  --sidebar-w: 188px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.06), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
}

.sidebar {
  width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(223, 231, 240, 0.9);
  box-shadow: none;
}

.sidebar-logo {
  padding: 10px 12px 8px;
  background: transparent;
  border-bottom: 1px solid rgba(223, 231, 240, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(135deg, #2f80ed 0%, #33c2b0 100%);
  box-shadow: none;
  color: transparent;
  position: relative;
  overflow: hidden;
}

.sidebar-logo .icon::before,
.sidebar-logo .icon::after {
  content: "";
  position: absolute;
  border-radius: 9px;
  background: rgba(255,255,255,0.96);
}

.sidebar-logo .icon::before {
  width: 7px;
  height: 15px;
  left: 4px;
  top: 2px;
  transform: skewX(-12deg);
}

.sidebar-logo .icon::after {
  width: 7px;
  height: 9px;
  right: 4px;
  bottom: 2px;
  transform: skewX(-12deg);
}

.sidebar-logo span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.nav-group {
  margin: 4px 6px;
}

.nav-group + .nav-group {
  margin-top: 6px;
}

.nav-item.active span:last-child {
  font-weight: 700;
}

.nav-label {
  padding: 7px 9px 4px;
  color: var(--text2);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  font-weight: 700;
}

.nav-item {
  min-height: 34px;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--text2);
  margin-bottom: 4px;
  font-size: 13px;
}

.nav-item:hover {
  background: rgba(47, 128, 237, 0.06);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(180deg, #178e87 0%, #0f766e 100%);
  color: #fff;
  box-shadow: 0 5px 12px rgba(15, 118, 110, 0.11);
}

.nav-item .nav-icon {
  width: 20px;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(16, 32, 51, 0.04);
}

.main {
  margin-left: var(--sidebar-w);
  padding-top: 66px;
}

.top-hub {
  top: 8px;
  right: 10px;
  left: calc(var(--sidebar-w) + 8px);
  min-height: 42px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(223, 231, 240, 0.95);
  border-radius: 11px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.032);
  justify-content: flex-end;
  z-index: 15;
}

.top-hub-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hub-button,
.top-account {
  min-height: 32px;
  border-radius: 8px !important;
  border-color: rgba(223, 231, 240, 0.95);
  background: #fff;
  box-shadow: none;
}

.top-account {
  position: relative;
  gap: 7px;
  padding: 3px 7px;
  align-items: center;
  min-width: 128px;
}

.top-account-avatar {
  background: linear-gradient(135deg, #2f80ed 0%, #33c2b0 100%);
  width: 19px;
  height: 19px;
  font-size: 8px;
}

.hub-icon-button {
  width: 30px;
  min-width: 30px;
  padding: 0;
  justify-content: center;
  position: relative;
  font-size: 12px;
  color: var(--text2);
}

.hub-icon-button .server-dot {
  position: absolute;
  top: 4px;
  left: 4px;
}

.top-account-caret {
  color: var(--text3);
  font-size: 12px;
}

.top-account-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.top-account-role {
  font-size: 11px;
  color: var(--text3);
}

.help-button {
  font-weight: 700;
  font-size: 13px;
}

.server-preview {
  width: auto;
  min-width: 230px;
  padding: 3px 8px 3px 6px;
  justify-content: flex-start;
  gap: 3px;
  color: var(--text);
  font-size: 11px;
}

.server-preview > span[aria-hidden="true"] {
  display: none;
}

.server-preview .server-dot {
  position: static;
  margin-right: 2px;
}

.server-preview-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
}

.server-preview-meta {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

.top-account-actions {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  min-width: 128px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(223, 231, 240, 0.95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  z-index: 20;
}

.top-account:hover .top-account-actions,
.top-account:focus-within .top-account-actions {
  display: grid;
  gap: 6px;
}

.top-account-action {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
}

.header {
  padding: 6px 20px 0;
}

.header h1 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 2px;
}

.header p {
  font-size: 13px;
  color: #96a1b2;
}

.page > .main > .header {
  padding: 0 20px;
}

.page > .main > .header h1,
.page > .main > .header p,
.page > .main > .header .demo-title-tag {
  display: none !important;
}

.page > .main > .header .demo-page-head {
  justify-content: flex-end;
  min-height: 0;
}

.page > .main > .header .phone-header-copy {
  display: none !important;
}

.page > .main > .header .phone-header-bar {
  justify-content: flex-end;
}

.page > .main > .header + .content {
  padding-top: 6px;
}

.demo-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.demo-title-tag {
  font-size: 12px;
  color: var(--text3);
  font-weight: 600;
}

.content {
  max-width: 1480px;
  padding: 10px 20px 18px;
}

.demo-dashboard-content {
  max-width: 1480px;
}

.demo-stat-grid {
  gap: 7px;
  margin-bottom: 8px;
}

.demo-stat-card {
  border-radius: 16px;
  padding: 12px 14px;
  min-height: 88px;
}

.demo-stat-head {
  gap: 9px;
}

.demo-stat-icon {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.demo-stat-title {
  font-size: 13px;
}

.demo-stat-value {
  margin-top: 5px;
  font-size: 16px;
}

.demo-stat-foot {
  margin-top: 7px;
}

.demo-dashboard-columns {
  grid-template-columns: minmax(0, 1fr) 32%;
  gap: 6px;
  margin-bottom: 8px;
}

.demo-dashboard-main,
.demo-dashboard-side {
  gap: 6px;
}

.demo-panel-head {
  padding: 12px 14px 10px;
}

.demo-panel-head .btn-ghost {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.demo-reminder-list,
.demo-panel-link {
  padding: 0 14px 10px;
}

.demo-reminder-row {
  padding: 8px 0;
}

.demo-reminder-copy {
  font-size: 14px;
}

.demo-table th,
.demo-table td {
  padding: 10px 14px;
}

.demo-table th {
  font-size: 13px;
}

.demo-table td {
  font-size: 14px;
}

.demo-table th {
  font-size: 13px;
}

.demo-table td {
  font-size: 14px;
}

.demo-quick-grid {
  padding: 10px;
  gap: 8px;
}

.demo-quick-grid .dashboard-tool {
  min-height: 42px;
  font-size: 13px;
  padding: 7px 8px;
  border-radius: 11px;
}

.demo-preview-grid {
  gap: 8px;
}

.demo-preview-card {
  min-height: 202px;
}

.demo-preview-head {
  padding: 7px 9px 6px;
}

.demo-preview-summary {
  padding: 5px;
}

.demo-preview-kpis {
  gap: 7px;
}

.demo-preview-kpis div {
  min-height: 44px;
  padding: 4px 4px;
}

.demo-preview-kpis strong {
  font-size: 12px;
}

.demo-preview-title {
  font-size: 13px;
}

.card,
.stat-card,
.dashboard-card,
.phone-auto-log-item,
.memo-item,
.customer-link-card,
.okcc-card,
.account-row,
.squsage-card,
.squsage-cost-card,
.squsage-predict-card {
  border-radius: 16px !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.stats {
  gap: 10px;
}

.stat-card {
  min-height: 82px;
  padding: 12px;
}

.stat-card .label {
  font-size: 13px;
  color: var(--text3);
}

.stat-card .value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
}

.card {
  padding: 14px;
  margin-bottom: 12px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 6px;
}

.dashboard-section-grid,
.customer-link-grid,
.okcc-grid,
.account-layout {
  gap: 6px;
}

.account-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.dashboard-card-head,
.module-section-copy,
.access-settings-head,
.squsage-rent-head,
.hub-panel-header {
  margin-bottom: 8px;
}

.dashboard-card-head h3,
.module-section-copy h3,
.access-settings-head h3,
.squsage-rent-head h3,
.hub-panel-title,
.okcc-panel-title,
.memo-list-title,
.password-card-title {
  font-weight: 700;
}

.dashboard-mini,
.dashboard-alert-item,
.dashboard-status-row,
.phone-auto-row,
.server-metric,
.message-item,
.alert-status-item,
.customer-link-preview,
.customer-link-metric {
  background: var(--surface2);
  border-radius: 12px !important;
}

.dashboard-tool-grid {
  gap: 3px;
}

.dashboard-tool {
  min-height: 38px;
  padding: 6px 7px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid rgba(223, 231, 240, 0.9);
}

.dashboard-tool-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.10);
  color: var(--accent);
}

.dashboard-tool span:last-child {
  line-height: 1.25;
}

.btn,
.btn-ghost,
.message-action,
.top-account-action,
.memo-chip,
.memo-filter,
.filter-btn {
  font-size: 13px;
}

.btn {
  background: linear-gradient(180deg, #1f948b 0%, #0f766e 100%);
  box-shadow: none;
}

.btn:hover {
  background: linear-gradient(180deg, #0f766e 0%, #0a5f58 100%);
}

.btn-ghost,
.message-action,
.top-account-action,
.memo-chip,
.memo-filter,
.filter-btn {
  background: #fff;
}

.empty {
  padding: 15px 12px;
  font-size: 11px;
  line-height: 1.6;
}

#page-dashboard.page.active .main {
  height: 100vh;
  overflow: hidden;
}

#page-dashboard > .main > .header {
  display: none;
}

#page-dashboard .demo-dashboard-content {
  max-width: none;
  height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  grid-template-rows: 82px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 18px 10px;
  overflow: hidden;
}

#page-dashboard .demo-stat-grid {
  grid-column: 1 / -1;
  grid-row: 1;
  gap: 8px;
  margin: 0;
  min-height: 0;
}

#page-dashboard .demo-stat-card {
  min-height: 0;
  height: 82px;
  padding: 8px 12px;
  border-radius: 14px;
}

#page-dashboard .demo-stat-icon {
  width: 30px;
  height: 30px;
}

#page-dashboard .demo-stat-title {
  font-size: 12px;
}

#page-dashboard .demo-stat-value {
  margin-top: 3px;
  font-size: 16px;
}

#page-dashboard .demo-stat-foot {
  margin-top: 5px;
}

#page-dashboard .demo-dashboard-columns {
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

#page-dashboard .demo-dashboard-main,
#page-dashboard .demo-dashboard-side {
  min-height: 0;
  gap: 8px;
}

#page-dashboard .demo-dashboard-main {
  grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

#page-dashboard .demo-dashboard-side {
  grid-template-rows: auto minmax(0, 1fr);
}

#page-dashboard .demo-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

#page-dashboard .demo-panel-head {
  padding: 8px 10px 7px;
  flex: 0 0 auto;
}

#page-dashboard .demo-panel-head h3 {
  font-size: 15px;
}

#page-dashboard .demo-panel-head .btn-ghost {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

#page-dashboard #dash-recent,
#page-dashboard #dash-phone-stats,
#page-dashboard #dash-alert-summary {
  min-height: 0;
  overflow: hidden;
}

#page-dashboard .demo-reminder-list {
  min-height: 0;
  padding: 0 10px 7px;
}

#page-dashboard .demo-reminder-row {
  padding: 6px 0;
}

#page-dashboard .demo-reminder-copy {
  font-size: 13px;
  line-height: 1.35;
}

#page-dashboard .demo-table th,
#page-dashboard .demo-table td {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.35;
}

#page-dashboard .demo-panel-link,
#page-dashboard .demo-preview-actions {
  display: none;
}

#page-dashboard .demo-quick-grid {
  padding: 8px;
  gap: 6px;
}

#page-dashboard .demo-quick-grid .dashboard-tool {
  min-height: 36px;
  font-size: 12px;
  padding: 5px 6px;
}

#page-dashboard .demo-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-items: stretch;
}

#page-dashboard .demo-dashboard-alert-panel {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  margin-bottom: 0;
}

#page-dashboard .demo-preview-card,
#page-dashboard .demo-preview-card.is-wide {
  min-height: 0;
  height: auto;
  margin-bottom: 0;
}

#page-dashboard .demo-preview-head {
  padding: 8px 10px 7px;
  flex: 0 0 auto;
}

#page-dashboard .demo-preview-title {
  font-size: 14px;
}

#page-dashboard .demo-preview-summary {
  padding: 8px;
  min-height: 0;
  overflow: hidden;
}

#page-dashboard .demo-preview-kpis {
  gap: 6px;
}

#page-dashboard .demo-preview-kpis div {
  min-height: 0;
  padding: 7px 8px;
  border-radius: 10px;
}

#page-dashboard .demo-preview-kpis span {
  font-size: 11px;
}

#page-dashboard .demo-preview-kpis strong {
  margin-top: 4px;
  font-size: 14px;
}

#page-dashboard .demo-preview-kpis em {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
}

#page-dashboard .empty {
  padding: 12px !important;
}

.phone-auto-log-item.is-error,
.alert-status-item.is-error,
.dashboard-alert-item.is-error {
  border-color: rgba(194, 65, 12, 0.18) !important;
  background: linear-gradient(180deg, #fff 0%, #fff5f0 100%) !important;
}

@media (max-width: 1280px) {
  .top-hub {
    left: 0;
  }
  .content {
    max-width: 100%;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .account-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .header,
  .content {
    padding-left: 18px;
    padding-right: 18px;
  }
  .dashboard-side,
  .dashboard-section-grid,
  .supplier-account-side-grid,
  .account-layout {
    grid-template-columns: 1fr;
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phase 1: render + showcase shell for the live app */
:root {
  --sidebar-w: 184px;
}

body {
  background: #f3f6fc;
  color: var(--text);
}

.sidebar {
  width: var(--sidebar-w);
  padding: 14px 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid rgba(223, 231, 240, 0.96);
  box-shadow: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  margin-bottom: 8px;
  padding: 0 2px 14px;
  background: transparent;
  border-bottom: 1px solid rgba(223, 231, 240, 0.96);
}

.sidebar-logo .icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  box-shadow: none;
}

.sidebar-logo span {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-group {
  margin: 0 0 6px;
}

.nav-label {
  padding: 10px 8px 4px;
  color: #8292a6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.nav-item {
  min-height: 32px;
  margin-bottom: 3px;
  padding: 0 10px;
  gap: 8px;
  border-radius: 8px;
  color: #53657a;
  font-size: 13px;
  font-weight: 800;
}

.nav-item:hover {
  background: rgba(47, 128, 237, 0.06);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(180deg, #159383 0%, #0f766e 100%);
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.12);
}

.nav-item .nav-icon {
  width: 18px;
  font-size: 12px;
  background: transparent;
}

.nav-item .badge {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef3fb;
  color: #5f6f82;
  font-size: 11px;
  font-weight: 800;
}

.nav-item.active .badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.auth-user {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f5f8fc;
  color: var(--text3);
}

.auth-user strong {
  color: var(--text);
  font-size: 12px;
}

.main {
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding-top: 56px;
}

.top-hub {
  top: 8px;
  left: calc(var(--sidebar-w) + 10px);
  right: 10px;
  min-height: 40px;
  padding: 4px 8px;
  gap: 8px;
  justify-content: flex-end;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(223, 231, 240, 0.96);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
}

.top-hub-actions {
  gap: 8px;
}

.hub-button,
.top-account {
  min-height: 30px;
  border-radius: 8px !important;
  border-color: rgba(223, 231, 240, 0.96);
  background: #fff;
  box-shadow: none;
}

.hub-icon-button {
  width: 30px;
  min-width: 30px;
  font-size: 12px;
}

.top-account {
  min-width: 136px;
  padding: 4px 8px;
  gap: 8px;
}

.top-account-avatar {
  width: 20px;
  height: 20px;
  font-size: 9px;
  background: linear-gradient(135deg, #2f80ed 0%, #33c2b0 100%);
}

.top-account-name {
  font-size: 12px;
  font-weight: 800;
}

.top-account-role,
.top-account-caret,
.server-preview-meta,
.server-preview-title {
  font-size: 11px;
}

.server-preview {
  min-width: 226px;
  max-width: 320px;
  padding: 3px 8px 3px 7px;
}

.header {
  padding: 0 16px;
}

.page > .main > .header {
  display: none;
}

#page-wecomrecharge > .main > .wecom-recharge-appbar {
  display: block;
  padding: 8px 32px 0;
}

.content {
  width: 100%;
  max-width: none;
  padding: 10px 14px 16px;
}

.card,
.stat-card,
.dashboard-card,
.phone-auto-log-item,
.memo-item,
.customer-link-card,
.okcc-card,
.account-row,
.squsage-card,
.squsage-cost-card,
.squsage-predict-card {
  border-radius: 10px !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.card,
.dashboard-card,
.phone-auto-log-item,
.memo-item,
.customer-link-card,
.okcc-card,
.account-row {
  background: rgba(255, 255, 255, 0.98);
}

#page-dashboard.page.active .main {
  height: 100vh;
  overflow: hidden;
}

#page-dashboard .demo-dashboard-content {
  height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, 0.66fr);
  grid-template-rows: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px 14px;
  overflow: hidden;
}

#page-dashboard .demo-stat-grid {
  grid-column: 1 / -1;
  grid-row: 1;
  gap: 10px;
  margin: 0;
  min-height: 0;
}

#page-dashboard .demo-stat-card {
  min-height: 0;
  height: 86px;
  padding: 10px 12px;
  border-radius: 10px;
}

#page-dashboard .demo-stat-head {
  gap: 10px;
}

#page-dashboard .demo-stat-icon {
  width: 32px;
  height: 32px;
}

#page-dashboard .demo-stat-title {
  font-size: 12px;
}

#page-dashboard .demo-stat-value {
  margin-top: 4px;
  font-size: 16px;
}

#page-dashboard .demo-stat-foot {
  margin-top: 6px;
}

#page-dashboard .demo-dashboard-columns {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

#page-dashboard .demo-dashboard-main,
#page-dashboard .demo-dashboard-side {
  display: grid;
  min-height: 0;
  gap: 10px;
}

#page-dashboard .demo-dashboard-main {
  grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

#page-dashboard .demo-dashboard-side {
  grid-template-rows: minmax(0, 1fr);
}

#page-dashboard .demo-panel,
#page-dashboard .demo-dashboard-alert-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}

#page-dashboard .demo-dashboard-alert-panel {
  grid-column: 2;
  grid-row: 2;
}

#page-dashboard .demo-panel-head,
#page-dashboard .demo-preview-head {
  padding: 10px 12px 8px;
  flex: 0 0 auto;
}

#page-dashboard .demo-panel-head h3,
#page-dashboard .demo-preview-title {
  font-size: 15px;
}

#page-dashboard .demo-panel-head .btn-ghost {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

#page-dashboard .demo-panel-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

#page-dashboard #dash-recent,
#page-dashboard #dash-phone-stats,
#page-dashboard #dash-alert-summary,
#page-dashboard #dash-squsage-summary,
#page-dashboard #dash-quick-tools,
#page-dashboard #dash-server-summary {
  min-height: 0;
  overflow: hidden;
}

#page-dashboard .demo-reminder-list {
  min-height: 0;
  padding: 0 12px 10px;
}

#page-dashboard .demo-reminder-row {
  padding: 7px 0;
}

#page-dashboard .demo-reminder-copy {
  font-size: 13px;
  line-height: 1.38;
}

#page-dashboard .demo-table th,
#page-dashboard .demo-table td {
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.35;
}

#page-dashboard .demo-panel-link,
#page-dashboard .demo-preview-actions {
  display: none;
}

#page-dashboard .demo-status-stack {
  display: grid;
  grid-template-rows: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
  min-height: 0;
  padding: 0 12px 12px;
}

#page-dashboard .demo-status-block {
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

#page-dashboard .demo-status-block h4 {
  margin: 0 0 8px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
}

#page-dashboard .dashboard-status-list,
#page-dashboard .demo-table {
  width: 100%;
}

#page-dashboard .dashboard-status-row {
  padding: 8px 10px;
  font-size: 12px;
}

#page-dashboard .demo-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#page-dashboard .demo-preview-card:only-child {
  grid-row: 1 / -1;
}

#page-dashboard .dashboard-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

#page-dashboard .dashboard-tool {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 12px;
}

#page-dashboard .dashboard-tool-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 11px;
}

#page-dashboard .demo-preview-card,
#page-dashboard .demo-preview-card.is-wide {
  min-height: 0;
  height: auto;
  margin-bottom: 0;
}

#page-dashboard .demo-preview-summary {
  padding: 8px;
  min-height: 0;
  overflow: hidden;
}

#page-dashboard .demo-preview-kpis {
  gap: 7px;
}

#page-dashboard .demo-preview-kpis div {
  min-height: 0;
  padding: 8px;
  border-radius: 8px;
}

#page-dashboard .demo-preview-kpis span {
  font-size: 11px;
}

#page-dashboard .demo-preview-kpis strong {
  margin-top: 4px;
  font-size: 14px;
}

#page-dashboard .demo-preview-kpis em {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
}

#page-dashboard .empty {
  padding: 12px !important;
}

@media (max-width: 1360px) {
  .server-preview {
    min-width: 178px;
  }

  #page-dashboard .demo-dashboard-content {
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  }

  #page-dashboard .demo-dashboard-columns {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  }
}

@media (max-width: 1180px) {
  .top-hub {
    left: calc(var(--sidebar-w) + 8px);
  }

  #page-dashboard .demo-dashboard-content {
    height: auto;
    min-height: calc(100vh - 56px);
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow: auto;
  }

  #page-dashboard .demo-dashboard-columns,
  #page-dashboard .demo-dashboard-alert-panel {
    grid-column: 1;
    grid-row: auto;
  }

  #page-dashboard .demo-dashboard-columns {
    height: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar {
    width: 164px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .main {
    margin-left: 164px;
  }

  .top-hub {
    left: 172px;
    right: 8px;
  }

  .content {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Phase 1b: compact phone workspace + supplier pages */
#page-phone.page.active .main {
  height: 100vh;
  overflow: hidden;
}

#page-phone .content {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 12px;
}

#page-phone .phone-layout {
  flex: 1;
  min-height: 0;
}

#page-phone .phone-main-panel {
  grid-template-rows: 82px minmax(0, 1fr);
  gap: 10px;
}

#page-phone .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#page-phone .stat-card {
  height: 82px;
  min-height: 0;
  padding: 10px 14px;
}

#page-phone .stat-card .label {
  margin-bottom: 2px;
  font-size: 11px;
}

#page-phone .stat-card .value {
  margin-top: 6px;
  font-size: 22px;
}

#page-phone .phone-workspace {
  grid-template-columns: minmax(0, 1.42fr) 350px;
  gap: 12px;
}

#page-phone .phone-query-pane {
  gap: 10px;
  height: 100%;
}

#page-phone .phone-query-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

#page-phone .phone-query-card .add-row {
  margin-bottom: 0;
}

#page-phone .query-tip {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.55;
}

#page-phone .phone-input {
  min-height: 104px;
  max-height: 132px;
  padding: 10px 12px;
  border-radius: 8px;
}

#page-phone .phone-query-actions {
  gap: 8px;
}

#page-phone .phone-query-actions .btn,
#page-phone .phone-query-actions .btn-ghost,
#page-phone .phone-history-actions .btn-ghost {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

#page-phone #phoneSyncMetaHint {
  margin-top: 0 !important;
  gap: 8px 10px;
}

#page-phone #phoneSyncMetaHint span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(247, 249, 252, 0.88);
}

#page-phone #queryResult {
  display: flex;
}

#page-phone #queryResult > .card {
  width: 100%;
}

#page-phone #queryResult:empty {
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(160, 174, 192, 0.48);
  border-radius: 10px;
  background: rgba(247, 249, 252, 0.8);
}

#page-phone #queryResult:empty::before {
  content: "查询结果会显示在这里";
  font-size: 13px;
  color: var(--text3);
}

#page-phone .phone-result-card {
  padding: 10px;
  border-radius: 10px;
}

#page-phone .phone-result-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(160, 174, 192, 0.48);
  background: rgba(247, 249, 252, 0.8);
  min-height: 100%;
}

#page-phone .phone-result-empty .empty {
  padding: 24px;
}

#page-phone .phone-result-head {
  align-items: start;
  gap: 8px 12px;
  margin-bottom: 8px;
}

#page-phone .phone-result-titleline {
  flex-wrap: wrap;
  gap: 6px 10px;
}

#page-phone .phone-result-title {
  font-size: 14px;
}

#page-phone .phone-result-meta,
#page-phone .phone-result-count {
  white-space: normal;
  line-height: 1.45;
}

#page-phone .phone-result-actions {
  gap: 8px;
  flex-wrap: wrap;
}

#page-phone .phone-result-table-scroll {
  border: 1px solid rgba(223, 231, 240, 0.96);
  border-radius: 10px;
  background: #fff;
}

#page-phone .phone-result-table-scroll .result-table th {
  top: 0;
  background: #fff;
  box-shadow: inset 0 -1px 0 rgba(223, 231, 240, 0.96);
}

#page-phone .result-table th {
  padding: 10px 12px;
  font-size: 11px;
  letter-spacing: 0.28px;
}

#page-phone .result-table td {
  padding: 10px 12px;
  font-size: 13px;
}

#page-phone .phone-history-card {
  gap: 10px;
  padding: 12px;
}

#page-phone .phone-history-pane {
  height: 100%;
}

#page-phone .phone-history-toolbar {
  margin-bottom: 0;
}

#page-phone .phone-history-titlegroup {
  display: grid;
  gap: 2px;
}

#page-phone .phone-history-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

#page-phone .phone-history-count {
  font-size: 12px;
  color: var(--text3);
}

#page-phone .phone-history-search {
  margin-bottom: 0;
}

#page-phone #historyBody {
  display: grid;
  gap: 8px;
  align-content: start;
}

#page-phone .phone-history-item {
  padding: 10px 12px;
  border: 1px solid rgba(223, 231, 240, 0.96);
  border-radius: 10px;
  background: rgba(247, 249, 252, 0.9);
}

#page-phone .phone-history-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#page-phone .phone-history-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

#page-phone .phone-history-time {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text3);
}

#page-phone .phone-history-reason {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--red);
}

#page-phone #historyEmpty {
  min-height: 124px;
  border: 1px dashed rgba(160, 174, 192, 0.48);
  border-radius: 10px;
  background: rgba(247, 249, 252, 0.8);
}

.demo-account-layout {
  grid-template-columns: minmax(0, 1.06fr) 330px;
  gap: 12px;
}

.demo-account-side {
  gap: 10px;
  top: 74px;
}

.demo-account-main {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.demo-account-main > * {
  margin: 0;
}

.demo-account-main .squsage-toolbar {
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(223, 231, 240, 0.92);
}

.demo-account-main .squsage-sync {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text2);
}

.demo-account-main .squsage-sync span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(247, 249, 252, 0.86);
}

.demo-account-main .squsage-stats,
.demo-account-main .squsage-consumption-stats,
.demo-account-main .squsage-prediction,
.demo-account-main .squsage-grid {
  gap: 10px;
}

.demo-account-main .squsage-card {
  min-height: 92px;
  padding: 14px;
}

.demo-account-main .squsage-card .value {
  font-size: 22px;
}

#page-squsage .demo-account-main .squsage-consumption-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#page-lixiaorobot .demo-account-main .squsage-consumption-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.demo-account-main .squsage-cost-card,
.demo-account-main .squsage-predict-card {
  min-height: 106px;
  padding: 14px;
}

.demo-account-main .squsage-cost-card .amount,
.demo-account-main .squsage-predict-value {
  font-size: 18px;
}

.demo-account-main .squsage-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: start;
}

.demo-account-main .squsage-grid > div:last-child,
.demo-account-main .squsage-grid > div {
  min-width: 0;
}

.demo-account-main .squsage-chart-wrap,
.demo-account-main .squsage-rent-section {
  padding: 14px;
}

.demo-account-main .squsage-chart-wrap,
.demo-account-main .squsage-grid > div:last-child,
.demo-account-main .squsage-rent-section {
  border: 1px solid rgba(223, 231, 240, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
}

.demo-account-main .squsage-chart-wrap {
  min-height: 316px;
}

.demo-account-main .squsage-table-wrap {
  max-height: 340px;
  overflow: auto;
}

.demo-account-main .squsage-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.demo-account-main .squsage-table td,
.demo-account-main .squsage-table th {
  white-space: nowrap;
}

#page-squsage .squsage-rent-section .squsage-table-wrap {
  max-height: 240px !important;
}

#page-squsage .squsage-alert-center-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px !important;
  overflow: hidden;
}

#page-squsage .squsage-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#page-squsage .squsage-alert-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

#page-squsage .squsage-alert-title p {
  margin: 5px 0 0;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

#page-squsage .squsage-alert-save {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
}

#page-squsage .squsage-alert-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#page-squsage .squsage-alert-mini {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(247, 249, 252, 0.9);
}

#page-squsage .squsage-alert-mini span {
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
}

#page-squsage .squsage-alert-mini strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

#page-squsage .squsage-alert-mini.is-warn strong {
  color: var(--orange);
}

#page-squsage .squsage-alert-section {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
}

#page-squsage .squsage-alert-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

#page-squsage .squsage-alert-section-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

#page-squsage .squsage-alert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

#page-squsage .squsage-alert-badge.is-warn {
  background: var(--orange-bg);
  color: var(--orange);
}

#page-squsage .squsage-alert-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-squsage .squsage-alert-field-grid.one {
  grid-template-columns: 1fr;
}

#page-squsage .squsage-alert-field-grid .auth-field {
  min-width: 0;
  margin-bottom: 0;
}

#page-squsage .squsage-alert-field-grid .auth-field label {
  margin-bottom: 5px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 850;
}

#page-squsage .squsage-alert-field-grid .account-input,
#page-squsage .squsage-threshold-card .account-input {
  min-height: 34px;
  height: 34px;
  border-color: rgba(223, 231, 240, 0.88);
  border-radius: 9px;
  background: #f8fafc;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
}

#page-squsage .squsage-alert-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

#page-squsage .squsage-alert-action-row .btn-ghost {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
}

#page-squsage .squsage-alert-window-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  margin-top: 8px;
}

#page-squsage .squsage-alert-window-row .dash {
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text3);
  font-weight: 900;
}

#page-squsage .squsage-alert-window-note {
  margin-top: 8px;
  min-height: 32px;
  border: 0;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

#page-squsage .squsage-threshold-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#page-squsage .squsage-threshold-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 12px;
}

#page-squsage .squsage-threshold-card.is-warn {
  border: 1px solid rgba(217, 119, 6, 0.24);
  background: var(--orange-bg);
}

#page-squsage .squsage-threshold-card.is-danger {
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: var(--red-bg);
}

#page-squsage .squsage-threshold-card label {
  color: var(--text2);
  font-size: 11px;
  font-weight: 850;
}

#page-squsage .squsage-alert-note {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

#page-squsage .squsage-alert-records {
  display: grid;
  gap: 8px;
}

#page-squsage .squsage-alert-records .alert-status-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-radius: 11px;
  background: rgba(247, 249, 252, 0.9);
}

#page-squsage .squsage-alert-record-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 900;
}

#page-squsage .squsage-alert-record-icon.is-warn {
  background: var(--orange-bg);
  color: var(--orange);
}

#page-squsage .squsage-alert-record-icon.is-danger {
  background: var(--red-bg);
  color: var(--red);
}

#page-squsage .squsage-alert-records .alert-status-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

#page-squsage .squsage-alert-records .alert-status-value {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
}

#page-squsage .squsage-alert-records .alert-status-meta {
  margin-top: 2px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.35;
}

#page-squsage .squsage-alert-record-state {
  color: var(--text2);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#page-squsage .squsage-alert-center-card .okcc-settings-error {
  margin-top: 0;
}

#page-lixiaorobot .demo-account-layout {
  grid-template-columns: minmax(0, 1fr) 390px;
}

#page-lixiaorobot .lixiao-alert-center-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px !important;
  overflow: hidden;
}

#page-lixiaorobot .squsage-alert-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#page-lixiaorobot .squsage-alert-title {
  min-width: 0;
}

#page-lixiaorobot .squsage-alert-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
}

#page-lixiaorobot .squsage-alert-title p {
  margin: 5px 0 0;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

#page-lixiaorobot .squsage-alert-save {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
}

#page-lixiaorobot .squsage-alert-status-strip {
  min-width: 0;
  display: flex;
  gap: 8px;
}

#page-lixiaorobot .squsage-alert-mini {
  flex: 1 1 0;
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(247, 249, 252, 0.9);
}

#page-lixiaorobot .squsage-alert-mini span,
#page-lixiaorobot .squsage-alert-mini strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-lixiaorobot .squsage-alert-mini span {
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
}

#page-lixiaorobot .squsage-alert-mini strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

#page-lixiaorobot .squsage-alert-mini.is-warn strong {
  color: var(--orange);
}

#page-lixiaorobot .squsage-alert-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
}

#page-lixiaorobot .squsage-alert-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

#page-lixiaorobot .squsage-alert-section-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

#page-lixiaorobot .squsage-alert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

#page-lixiaorobot .squsage-alert-badge.is-warn {
  background: var(--orange-bg);
  color: var(--orange);
}

#page-lixiaorobot .squsage-alert-field-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-lixiaorobot .squsage-alert-field-grid.one {
  grid-template-columns: 1fr;
}

#page-lixiaorobot .squsage-alert-field-grid .auth-field {
  min-width: 0;
  margin-bottom: 0;
}

#page-lixiaorobot .squsage-alert-field-grid .auth-field label {
  margin-bottom: 5px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 850;
}

#page-lixiaorobot .squsage-alert-field-grid .account-input,
#page-lixiaorobot .squsage-threshold-card .account-input {
  min-width: 0;
  min-height: 34px;
  height: 34px;
  border-color: rgba(223, 231, 240, 0.88);
  border-radius: 9px;
  background: #f8fafc;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
}

#page-lixiaorobot .squsage-alert-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

#page-lixiaorobot .squsage-alert-action-row .btn-ghost {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-lixiaorobot .squsage-threshold-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#page-lixiaorobot .squsage-threshold-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 12px;
}

#page-lixiaorobot .squsage-threshold-card.is-warn {
  border: 1px solid rgba(217, 119, 6, 0.24);
  background: var(--orange-bg);
}

#page-lixiaorobot .squsage-threshold-card.is-danger {
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: var(--red-bg);
}

#page-lixiaorobot .squsage-threshold-card label {
  color: var(--text2);
  font-size: 11px;
  font-weight: 850;
}

#page-lixiaorobot .squsage-alert-note {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

#page-lixiaorobot .squsage-alert-records {
  display: grid;
  gap: 6px;
}

#page-lixiaorobot .squsage-alert-records .alert-status-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px;
  border-radius: 11px;
  background: rgba(247, 249, 252, 0.9);
}

#page-lixiaorobot .squsage-alert-record-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 900;
}

#page-lixiaorobot .squsage-alert-record-icon.is-warn {
  background: var(--orange-bg);
  color: var(--orange);
}

#page-lixiaorobot .squsage-alert-record-icon.is-danger {
  background: var(--red-bg);
  color: var(--red);
}

#page-lixiaorobot .squsage-alert-records .alert-status-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

#page-lixiaorobot .squsage-alert-records .alert-status-value {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
}

#page-lixiaorobot .squsage-alert-records .alert-status-meta {
  margin-top: 2px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.35;
}

#page-lixiaorobot .squsage-alert-record-state {
  color: var(--text2);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#page-lixiaorobot .lixiao-alert-center-card .okcc-settings-error {
  margin-top: 0;
}

.squsage-cost-card.is-clickable,
.squsage-card.is-clickable {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.squsage-cost-card.is-clickable:hover,
.squsage-card.is-clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.10);
}

.squsage-callstats-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.squsage-callstats-head,
.squsage-callstats-filters,
.squsage-callstats-panel,
.squsage-callstats-rank {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.squsage-callstats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

#page-lixiaorecharges .squsage-callstats-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

#page-lixiaorecharges .squsage-callstats-head-summary {
  flex: 0 0 280px;
  min-width: 240px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbfa 100%);
}

#page-lixiaorecharges .squsage-callstats-head-summary span {
  color: var(--text3);
  font-size: 12px;
  font-weight: 820;
}

#page-lixiaorecharges .squsage-callstats-head-summary strong {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

#page-lixiaorecharges .squsage-callstats-head-summary em {
  color: var(--text3);
  font-style: normal;
  font-size: 12px;
}

.squsage-callstats-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.squsage-callstats-sub {
  margin-top: 6px;
  color: var(--text3);
  font-size: 13px;
  font-weight: 650;
}

.squsage-callstats-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.squsage-callstats-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.squsage-callstats-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 820;
}

.squsage-callstats-control {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 10px;
  color: var(--text2);
  font-weight: 760;
}

.squsage-callstats-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 12px;
  overflow: hidden;
}

.squsage-callstats-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.squsage-callstats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.squsage-callstats-kpi {
  min-height: 84px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.squsage-callstats-kpi span {
  color: var(--text3);
  font-size: 12px;
  font-weight: 820;
}

.squsage-callstats-kpi strong {
  font-size: 24px;
  line-height: 1;
  color: var(--text);
}

.squsage-callstats-kpi em {
  color: var(--text3);
  font-style: normal;
  font-size: 12px;
}

.squsage-callstats-kpi.primary strong { color: var(--accent); }
.squsage-callstats-kpi.blue strong { color: #2563eb; }

.squsage-callstats-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.squsage-callstats-table-title {
  font-size: 15px;
  font-weight: 900;
}

.squsage-callstats-table-meta {
  color: var(--text3);
  font-size: 12px;
  font-weight: 760;
}

.squsage-callstats-table-zone {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.squsage-callstats-table-wrap {
  min-height: 0;
  overflow: auto;
}

.squsage-callstats-table td:nth-child(2) {
  max-width: 270px;
  white-space: normal;
  line-height: 1.35;
  font-weight: 760;
}

.squsage-callstats-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  border-radius: 999px;
  color: var(--accent);
  background: #e9f7f4;
  font-size: 12px;
  font-weight: 880;
}

.squsage-callstats-rank {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.squsage-callstats-rank-head {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.squsage-callstats-rank-head h3 {
  margin: 0;
  font-size: 16px;
}

.squsage-callstats-rank-head p {
  margin: 5px 0 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.squsage-callstats-rank-list {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.squsage-callstats-rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfe;
}

.squsage-callstats-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #2563eb;
  font-weight: 900;
  font-size: 12px;
}

.squsage-callstats-rank-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squsage-callstats-rank-code {
  color: var(--text3);
  font-size: 12px;
  margin-top: 3px;
}

.squsage-callstats-rank-value {
  color: var(--accent);
  font-weight: 900;
  text-align: right;
}

.demo-account-side .btn,
.demo-account-side .btn-ghost {
  min-height: 34px;
}

@media (max-width: 1280px) {
  #page-phone.page.active .main,
  #page-phone .content {
    height: auto;
    overflow: visible;
  }

  #page-phone .phone-main-panel {
    grid-template-rows: auto auto;
  }

  #page-phone .phone-workspace {
    grid-template-columns: 1fr;
  }

  #page-phone .phone-history-card {
    max-height: none;
  }

  #page-squsage .demo-account-main .squsage-consumption-stats,
  #page-lixiaorobot .demo-account-main .squsage-consumption-stats,
  .demo-account-main .squsage-prediction,
  .demo-account-main .squsage-grid,
  .squsage-callstats-filters,
  .squsage-callstats-layout,
  .squsage-callstats-kpis {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  #page-phone .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phase 1c: unify remaining pages into the same console shell */
#page-phoneauto .content,
#page-phoneupload .content,
#page-accounts .content,
#page-loadguide .content,
#page-changelog .content,
#page-logs .content,
#page-okcc .content,
#page-customerlinks .content,
#page-memo .content,
#page-exam .content,
#page-profit .content,
#page-soukebao .content,
#page-idcard .content {
  display: grid;
  gap: 12px;
  align-content: start;
}

#page-phoneauto .demo-phoneauto-content,
#page-phoneupload .content,
#page-accounts .content,
#page-customerlinks .content,
#page-loadguide .content,
#page-changelog .content,
#page-logs .content,
#page-memo .content,
#page-exam .content,
#page-profit .content,
#page-soukebao .content {
  max-width: none;
}

#page-phoneauto .phone-auto-status-grid,
#page-phoneauto .demo-phoneauto-grid,
#page-phoneupload .phone-upload-summary-strip,
#page-accounts .demo-system-stat-grid,
#page-customerlinks .demo-resource-stat-grid {
  gap: 10px;
}

#page-phoneauto .phone-auto-status-card,
#page-phoneupload .phone-upload-summary-item,
#page-memo .stats .stat-card,
#page-exam .stats .stat-card {
  min-height: 92px;
  padding: 14px;
}

#page-phoneauto .demo-phoneauto-config,
#page-phoneauto .demo-phoneauto-status,
#page-phoneauto .demo-phoneauto-alerts,
#page-phoneauto .demo-phoneauto-logs,
#page-phoneupload .card,
#page-accounts .demo-system-main-card,
#page-accounts .demo-system-side > .card,
#page-accounts .demo-system-bottom > .card,
#page-loadguide .card,
#page-changelog .card,
#page-logs .card,
#page-okcc .card,
#page-customerlinks .demo-resource-main-card,
#page-customerlinks .demo-resource-side > .card,
#page-customerlinks .demo-resource-bottom > .card,
#page-memo .memo-panel,
#page-exam .card,
#page-profit .card,
#page-soukebao .card {
  padding: 14px;
}

#page-phoneauto .demo-phoneauto-grid {
  grid-template-columns: minmax(0, 1.08fr) 330px;
  gap: 12px;
}

#page-phoneauto .demo-phoneauto-config {
  grid-row: span 2;
}

#page-phoneauto .phone-auto-status-grid {
  margin: 0;
}

#page-phoneauto .phone-auto-actions {
  margin-top: 0;
}

#page-phoneauto .phone-auto-log-list {
  max-height: 420px;
}

#page-phoneauto .phone-auto-row {
  padding: 12px 0;
}

#page-phoneupload .content {
  height: 100vh;
  overflow: hidden;
  padding-top: 12px;
}

#page-phoneupload .card {
  gap: 12px;
}

#page-phoneupload .phone-upload-toolbar {
  margin-bottom: 0;
  grid-template-columns: minmax(220px, 320px) minmax(360px, 1fr) auto;
  gap: 12px;
}

#page-phoneupload .phone-upload-summary-strip {
  align-self: stretch;
}

#page-phoneupload .phone-upload-actions .btn,
#page-phoneupload .phone-upload-actions .btn-ghost,
#page-phoneupload .phone-upload-file {
  min-height: 34px;
}

#page-phoneupload .phone-upload-summary-item {
  min-height: 84px;
}

#page-phoneupload .phone-upload-table-wrap {
  border-radius: 14px;
  background: #fff;
}

#page-phoneupload .phone-upload-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 -1px 0 rgba(223, 231, 240, 0.96);
}

#page-phoneupload .phone-upload-table td,
#page-phoneupload .phone-upload-table th {
  white-space: nowrap;
}

#page-accounts .demo-system-layout,
#page-customerlinks .demo-resource-layout {
  grid-template-columns: minmax(0, 1.06fr) 340px;
  gap: 12px;
}

#page-accounts .demo-system-side,
#page-customerlinks .demo-resource-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 74px;
}

#page-accounts .account-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

#page-accounts .account-row,
#page-accounts .account-form-grid,
#page-customerlinks .customer-link-add-panel,
#page-customerlinks .demo-resource-main-card,
#page-customerlinks .demo-resource-bottom > .card {
  border-radius: 14px;
}

#page-accounts .permission-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#page-loadguide .load-guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-loadguide .load-guide-table-wrap,
#page-logs .log-table-wrap,
#page-accounts .demo-mini-table-wrap {
  border-radius: 14px;
  background: #fff;
}

#page-loadguide .squsage-table th,
#page-logs .log-table th,
#page-accounts .demo-mini-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

#page-loadguide .load-guide-item {
  padding: 12px 14px;
  border: 1px solid rgba(223, 231, 240, 0.92);
  border-radius: 12px;
  background: rgba(247, 249, 252, 0.84);
}

#page-loadguide .load-guide-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--text);
}

#page-loadguide .load-guide-item p {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.55;
}

#page-loadguide .load-guide-summary-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(247, 249, 252, 0.84);
}

#page-changelog .changelog-summary {
  padding: 18px;
  border-radius: 14px;
}

#page-changelog .changelog-list {
  gap: 10px;
}

#page-changelog .changelog-item {
  border-radius: 14px;
}

#page-logs .log-toolbar {
  margin-bottom: 10px;
}

#page-logs .log-table-wrap {
  max-height: 620px;
}

#page-logs .log-table th,
#page-logs .log-table td {
  white-space: nowrap;
}

#page-logs .log-detail {
  max-width: 520px;
  white-space: normal;
}

#page-okcc .content,
#page-customerlinks .content {
  gap: 12px;
}

#page-okcc .okcc-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

#page-okcc .okcc-card {
  min-height: 176px;
  border-radius: 14px;
}

#page-customerlinks .customer-link-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

#page-customerlinks .customer-link-toolbar {
  margin-bottom: 0;
}

#page-customerlinks .customer-link-summary {
  margin-bottom: 0;
}

#page-customerlinks .customer-link-form-inline {
  grid-template-columns: 1fr;
}

#page-customerlinks .customer-link-actions {
  padding-top: 0;
}

#page-memo .stats,
#page-exam .stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

#page-memo .memo-shell {
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
}

#page-memo .memo-panel {
  margin: 0;
}

#page-memo .memo-list {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

#page-exam .filters {
  gap: 8px;
  margin: 0;
}

#page-exam .filter-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
}

#page-exam #examList {
  display: grid;
  gap: 10px;
}

#page-exam .exam-item {
  border-radius: 14px !important;
  overflow: hidden;
}

#page-exam .exam-detail {
  background: rgba(247, 249, 252, 0.5);
}

#page-profit .content > div:first-child {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 12px !important;
  align-items: start !important;
}

#page-profit .content > div:first-child > div,
#page-soukebao .content > div:first-child > div {
  width: auto !important;
  min-width: 0;
}

#page-profit .content input,
#page-soukebao .content input {
  width: 100% !important;
  min-height: 40px;
  border-radius: 10px !important;
}

#page-profit .content table,
#page-soukebao .content table {
  width: 100% !important;
}

#page-soukebao .content > div:first-child {
  display: grid !important;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  gap: 12px !important;
  align-items: start !important;
}

#page-idcard .content {
  padding: 0 12px 12px;
  overflow: hidden;
}

#page-idcard .header {
  display: none;
}

#page-idcard #idcardFrame {
  height: calc(100dvh - 24px) !important;
  min-height: 0 !important;
  border-radius: 14px !important;
}

@media (max-width: 1380px) {
  #page-phoneauto .demo-phoneauto-grid,
  #page-accounts .demo-system-layout,
  #page-customerlinks .demo-resource-layout,
  #page-memo .memo-shell,
  #page-profit .content > div:first-child,
  #page-soukebao .content > div:first-child {
    grid-template-columns: 1fr !important;
  }

  #page-accounts .demo-system-side,
  #page-customerlinks .demo-resource-side {
    position: static;
  }
}

@media (max-width: 1100px) {
  #page-phoneauto .phone-auto-status-grid,
  #page-phoneupload .phone-upload-summary-strip,
  #page-memo .stats,
  #page-exam .stats,
  #page-loadguide .load-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  #page-phoneauto .phone-auto-status-grid,
  #page-phoneupload .phone-upload-summary-strip,
  #page-memo .stats,
  #page-exam .stats,
  #page-loadguide .load-guide-grid,
  #page-accounts .permission-grid {
    grid-template-columns: 1fr;
  }

  #page-phoneupload .phone-upload-toolbar {
    grid-template-columns: 1fr;
  }

  #page-logs .log-toolbar {
    grid-template-columns: 1fr !important;
  }
}

/* Phase 1d: full-height work surfaces + remaining page polish */
#page-phoneauto.page.active .main,
#page-accounts.page.active .main,
#page-customerlinks.page.active .main,
#page-memo.page.active .main,
#page-exam.page.active .main,
#page-profit.page.active .main,
#page-soukebao.page.active .main,
#page-loadguide.page.active .main,
#page-logs.page.active .main,
#page-okcc.page.active .main,
#page-changelog.page.active .main,
#page-idcard.page.active .main {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-phoneauto .content,
#page-accounts .content,
#page-customerlinks .content,
#page-memo .content,
#page-exam .content,
#page-profit .content,
#page-soukebao .content,
#page-loadguide .content,
#page-logs .content,
#page-okcc .content,
#page-changelog .content,
#page-idcard .content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 20px;
  scrollbar-gutter: stable;
}

#page-phoneupload .phone-upload-list-head,
#page-accounts .demo-panel-toolbar,
#page-changelog .demo-panel-toolbar,
#page-exam .exam-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#page-phoneupload .phone-upload-list-head,
#page-accounts .demo-panel-toolbar {
  flex-wrap: wrap;
}

#page-accounts .demo-panel-toolbar h3,
#page-changelog .demo-panel-toolbar h3,
#page-phoneupload .phone-upload-list-head h3 {
  margin: 0;
  font-size: 16px;
}

#page-exam .exam-list-head {
  margin-bottom: 14px;
}

#page-accounts .demo-system-main-card,
#page-customerlinks .demo-resource-main-card {
  min-height: calc(100vh - 226px);
  display: flex;
  flex-direction: column;
}

#page-accounts .account-list,
#page-customerlinks .customer-link-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

#page-customerlinks .customer-link-grid {
  max-height: none;
}

#page-accounts .demo-system-bottom > .card,
#page-customerlinks .demo-resource-bottom > .card {
  min-height: 220px;
}

#page-loadguide .content > section.card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

#page-loadguide .load-guide-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#page-logs .content > section.card {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

#page-logs .log-table-wrap {
  min-height: 0;
  max-height: none;
}

#page-changelog .content > section.card:last-child {
  min-height: calc(100vh - 168px);
  display: flex;
  flex-direction: column;
}

#page-changelog .changelog-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

#page-okcc .okcc-panel {
  min-height: calc(100vh - 168px);
}

#page-okcc .okcc-grid {
  align-items: stretch;
}

#page-okcc .okcc-card {
  height: 100%;
  margin-bottom: 0;
}

#page-memo .memo-panel:last-child {
  min-height: calc(100vh - 280px);
  display: flex;
  flex-direction: column;
}

#page-memo .memo-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}

#page-exam .card {
  min-height: calc(100vh - 250px);
  display: flex;
  flex-direction: column;
}

#page-exam #examList {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

#page-profit .profit-column,
#page-soukebao .sk-column {
  width: auto !important;
  min-width: 0;
  flex-shrink: 1 !important;
}

#page-profit .profit-card,
#page-soukebao .sk-card {
  height: 100%;
  margin-bottom: 0;
}

#page-profit .profit-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

#page-profit .profit-result-grid > div,
#page-profit .profit-diff-result,
#page-profit .profit-diff-meta,
#page-soukebao .sk-total-card,
#page-soukebao .sk-tier-card,
#page-soukebao .sk-date-range {
  border: 1px solid rgba(223, 231, 240, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

#page-profit .profit-result-grid > div {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#page-profit .profit-breakdown-table,
#page-soukebao .sk-result-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

#page-profit .profit-breakdown-table td,
#page-soukebao .sk-result-table th,
#page-soukebao .sk-result-table td {
  padding: 10px 8px;
}

#page-soukebao .sk-result-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface2);
}

#page-profit .profit-clear-btn,
#page-soukebao .sk-clear-btn {
  min-height: 38px;
  margin-top: auto;
}

@media (max-width: 1280px) {
  #page-accounts .demo-system-main-card,
  #page-customerlinks .demo-resource-main-card,
  #page-logs .content > section.card,
  #page-changelog .content > section.card:last-child,
  #page-okcc .okcc-panel,
  #page-memo .memo-panel:last-child,
  #page-exam .card {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  #page-profit .profit-result-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 1e: compact showcase cards on the remaining pages */
#page-dashboard .demo-dashboard-main {
  grid-template-rows: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

#page-dashboard .dashboard-tool-grid {
  grid-auto-rows: minmax(58px, 1fr);
  gap: 10px;
}

#page-dashboard .dashboard-tool {
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
}

#page-dashboard .dashboard-tool-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 10px;
}

#page-dashboard .demo-status-block {
  padding: 9px 10px;
}

#page-dashboard .demo-reminder-list {
  padding-bottom: 8px;
}

#page-okcc .okcc-panel {
  display: flex;
  flex-direction: column;
}

#page-okcc .okcc-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-content: start;
}

#page-okcc .okcc-card {
  min-height: 158px;
  padding: 16px;
  gap: 10px;
}

#page-okcc .okcc-card::after {
  right: -38px;
  top: -42px;
  width: 104px;
  height: 104px;
}

#page-okcc .okcc-server-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

#page-okcc .okcc-card-bottom {
  margin-top: 14px;
  gap: 10px;
  align-items: flex-end;
}

#page-okcc .okcc-note {
  max-width: 20ch;
  line-height: 1.55;
}

#page-okcc .okcc-login-btn {
  min-width: 110px;
  height: 36px;
}

#page-customerlinks .customer-link-toolbar {
  align-items: flex-end;
  gap: 10px;
}

#page-customerlinks .customer-link-search {
  min-width: 260px;
}

#page-customerlinks .customer-link-card {
  min-height: 0;
  padding: 12px;
  gap: 10px;
}

#page-customerlinks .customer-link-card::after {
  right: -40px;
  top: -42px;
  width: 108px;
  height: 108px;
}

#page-customerlinks .customer-link-preview {
  padding: 9px 10px;
  gap: 6px;
}

#page-customerlinks .customer-link-detail {
  gap: 6px;
}

#page-customerlinks .customer-link-row {
  align-items: flex-start;
}

#page-customerlinks .customer-link-row strong {
  max-width: 60%;
}

#page-customerlinks .customer-link-buttons {
  justify-content: flex-start;
  gap: 6px;
}

#page-customerlinks .customer-link-buttons .btn-ghost,
#page-customerlinks .customer-link-buttons .customer-link-download {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

#page-customerlinks .customer-link-summary {
  row-gap: 6px;
}

#page-customerlinks .customer-link-add-panel .customer-link-field label,
#page-okcc .customer-link-field label {
  font-size: 12px;
}

#page-changelog .changelog-list {
  align-content: start;
}

#page-changelog .changelog-item {
  display: grid;
  gap: 10px;
  padding: 18px 18px 16px;
}

#page-changelog .changelog-item-head {
  margin-bottom: 0;
}

#page-changelog .changelog-title {
  font-size: 18px;
}

#page-changelog .changelog-text {
  max-width: 88ch;
  line-height: 1.65;
}

#page-changelog .changelog-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

@media (max-width: 1120px) {
  #page-customerlinks .customer-link-search {
    min-width: 0;
    width: 100%;
  }

  #page-knowledgehub .kh-layout,
  #page-knowledgehub .kh-bottom-layout,
  #page-knowledgehub .kh-summary-grid,
  #page-knowledgehub .kh-job-stats,
  #page-knowledgehub .kh-debug-grid {
    grid-template-columns: 1fr;
  }
}

#page-knowledgehub .content {
  display: grid;
  gap: 16px;
}

#page-knowledgehub .kh-summary-grid,
#page-knowledgehub .kh-job-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#page-knowledgehub .kh-metric,
#page-knowledgehub .kh-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#page-knowledgehub .kh-metric {
  padding: 16px 18px;
}

#page-knowledgehub .kh-metric label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 8px;
}

#page-knowledgehub .kh-metric strong {
  display: block;
  font-size: 22px;
  color: var(--text);
}

#page-knowledgehub .kh-metric span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text3);
}

#page-knowledgehub .kh-layout,
#page-knowledgehub .kh-bottom-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 16px;
}

#page-knowledgehub .kh-card {
  padding: 18px;
}

#page-knowledgehub .kh-card-head,
#page-knowledgehub .kh-card-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#page-knowledgehub .kh-card-head h3,
#page-knowledgehub .kh-card-subhead h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text);
}

#page-knowledgehub .kh-card-head p,
#page-knowledgehub .kh-card-subhead p,
#page-knowledgehub .kh-note,
#page-knowledgehub .kh-inline-note {
  margin: 0;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.55;
}

#page-knowledgehub .kh-actions,
#page-knowledgehub .kh-inline-actions,
#page-knowledgehub .kh-chip-row,
#page-knowledgehub .kh-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#page-knowledgehub .kh-status-line {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text2);
  font-size: 12px;
}

#page-knowledgehub .kh-source-table-wrap,
#page-knowledgehub .kh-jobs-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

#page-knowledgehub .kh-source-table,
#page-knowledgehub .kh-jobs-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

#page-knowledgehub .kh-source-table th,
#page-knowledgehub .kh-source-table td,
#page-knowledgehub .kh-jobs-table th,
#page-knowledgehub .kh-jobs-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 12px;
  vertical-align: top;
}

#page-knowledgehub .kh-source-table th,
#page-knowledgehub .kh-jobs-table th {
  background: var(--surface2);
  color: var(--text2);
  font-weight: 800;
}

#page-knowledgehub .kh-source-table tbody tr:hover,
#page-knowledgehub .kh-jobs-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

#page-knowledgehub .kh-source-meta strong,
#page-knowledgehub .kh-match-title strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}

#page-knowledgehub .kh-source-meta span,
#page-knowledgehub .kh-match-title span {
  display: block;
  margin-top: 4px;
  color: var(--text3);
}

#page-knowledgehub .kh-chip,
#page-knowledgehub .kh-tag,
#page-knowledgehub .kh-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

#page-knowledgehub .kh-chip {
  background: var(--blue-bg);
  color: var(--blue);
}

#page-knowledgehub .kh-chip.warn {
  background: var(--orange-bg);
  color: var(--orange);
}

#page-knowledgehub .kh-chip.ok {
  background: var(--green-bg);
  color: var(--green);
}

#page-knowledgehub .kh-chip.bad {
  background: var(--red-bg);
  color: var(--red);
}

#page-knowledgehub .kh-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-knowledgehub .kh-form-grid .wide {
  grid-column: 1 / -1;
}

#page-knowledgehub .kh-form-grid label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text2);
  font-weight: 700;
}

#page-knowledgehub .kh-form-grid input,
#page-knowledgehub .kh-form-grid select,
#page-knowledgehub .kh-debug-box textarea,
#page-knowledgehub .kh-debug-box input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}

#page-knowledgehub .kh-debug-box textarea {
  min-height: 108px;
  resize: vertical;
}

#page-knowledgehub .kh-debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-knowledgehub .kh-output {
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text2);
  white-space: pre-wrap;
  line-height: 1.6;
}

#page-knowledgehub .kh-match-list {
  display: grid;
  gap: 10px;
}

#page-knowledgehub .kh-match-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

#page-knowledgehub .kh-match-item p {
  margin: 8px 0 0;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.6;
}

#page-knowledgehub .kh-empty {
  padding: 28px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--text3);
  background: var(--surface2);
}

#page-knowledgehub .kh-error {
  color: var(--red);
}

/* Account permissions: first redesign preview, adapted to the live workbench. */
#page-accounts .content {
  padding-top: 10px;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  overflow: hidden !important;
  padding-bottom: 14px;
}

#page-accounts .account-redesign-shell {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

#page-accounts .account-redesign-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

#page-accounts .account-redesign-crumbs {
  color: var(--text3);
  font-size: 13px;
  font-weight: 650;
}

#page-accounts .account-redesign-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 5px;
  color: var(--text);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.1;
}

#page-accounts .account-redesign-title span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
}

#page-accounts .account-redesign-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

#page-accounts .account-redesign-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text2);
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
}

#page-accounts .account-redesign-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(440px, 1fr) minmax(330px, 0.88fr);
  gap: 14px;
  padding: 14px;
  overflow: hidden;
}

#page-accounts .account-redesign-panel {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
}

#page-accounts .account-redesign-panel-head,
#page-accounts .account-redesign-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#page-accounts .account-redesign-panel h3,
#page-accounts .account-redesign-card h3,
#page-accounts .account-redesign-card-head strong {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 780;
}

#page-accounts .account-redesign-panel small,
#page-accounts .account-redesign-card-head small {
  color: var(--text3);
  font-size: 12px;
  font-weight: 650;
}

#page-accounts .account-redesign-role-list,
#page-accounts .account-list {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

#page-accounts .account-row.account-redesign-role-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface2);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

#page-accounts .account-row.account-redesign-role-card:hover,
#page-accounts .account-row.account-redesign-role-card.active {
  border-color: rgba(99, 102, 241, 0.28);
  background: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.14);
  transform: translateY(-1px);
}

#page-accounts .account-redesign-role-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 780;
}

#page-accounts .account-redesign-badge,
#page-accounts .account-redesign-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

#page-accounts .account-redesign-meta,
#page-accounts .account-row-meta {
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

#page-accounts .account-redesign-tags,
#page-accounts .account-permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#page-accounts .account-redesign-tags span,
#page-accounts .account-permission-tags span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #52525b;
  font-size: 11px;
  font-weight: 650;
}

#page-accounts .account-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

#page-accounts .account-redesign-form-grid .auth-field,
#page-accounts .account-redesign-form-grid .account-input,
#page-accounts .account-redesign-form-grid .account-select {
  min-width: 0;
}

#page-accounts .account-row-actions .btn-ghost {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}

#page-accounts .account-redesign-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

#page-accounts .account-redesign-stat {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  padding: 10px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 650;
}

#page-accounts .account-redesign-stat strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

#page-accounts .account-redesign-main-panel {
  gap: 12px;
}

#page-accounts .account-redesign-card {
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
  padding: 14px;
}

#page-accounts .account-redesign-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-accounts .account-redesign-form-grid .wide,
#page-accounts .account-redesign-form-grid .auth-field.wide {
  grid-column: 1 / -1;
}

#page-accounts .account-redesign-permission-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#page-accounts .account-redesign-permission-card .permission-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

#page-accounts .account-redesign-perm-grid,
#page-accounts .permission-grid.account-redesign-perm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

#page-accounts .permission-check.account-redesign-perm-item {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#page-accounts .permission-check.account-redesign-perm-item.is-disabled {
  cursor: not-allowed;
  opacity: .66;
}

#page-accounts .account-redesign-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#page-accounts .account-redesign-switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #e4e4e7;
  transition: background .18s ease;
}

#page-accounts .account-redesign-switch-ui::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

#page-accounts .account-redesign-switch-input:checked + .account-redesign-switch-ui {
  background: linear-gradient(120deg, var(--green), #4ade80);
}

#page-accounts .account-redesign-switch-input:checked + .account-redesign-switch-ui::before {
  transform: translateX(20px);
}

#page-accounts .account-redesign-side {
  gap: 12px;
  overflow: auto;
}

#page-accounts .account-redesign-side .account-redesign-card {
  flex: 0 0 auto;
}

#page-accounts .account-redesign-access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#page-accounts .account-redesign-timeline,
#page-accounts .demo-update-list {
  display: grid;
  gap: 10px;
}

#page-accounts .account-redesign-timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

#page-accounts .account-redesign-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .16);
}

#page-accounts .account-redesign-timeline-item span {
  display: block;
  margin-top: 2px;
  color: var(--text3);
  font-size: 11px;
}

#page-accounts .account-redesign-hint {
  margin-top: 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 10px 12px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.6;
}

#page-accounts .account-redesign-card .auth-error {
  margin-top: 10px;
}

@media (max-width: 1460px) {
  #page-accounts .account-redesign-layout {
    grid-template-columns: 300px minmax(420px, 1fr) 320px;
  }
}

@media (max-width: 1220px) {
  #page-accounts .account-redesign-shell {
    overflow: hidden;
  }

  #page-accounts .account-redesign-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  #page-accounts .account-redesign-panel {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  #page-accounts .account-redesign-topbar,
  #page-accounts .account-redesign-card-head,
  #page-accounts .account-redesign-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  #page-accounts .account-redesign-form-grid,
  #page-accounts .permission-grid.account-redesign-perm-grid,
  #page-accounts .account-redesign-stat-row {
    grid-template-columns: 1fr;
  }
}

/* Account permissions: merged account form and permission panel. */
#page-accounts .account-redesign-layout {
  grid-template-columns: 320px minmax(620px, 1.22fr) minmax(360px, 0.78fr);
}

#page-accounts .account-merged-panel {
  padding: 16px;
  gap: 0;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
}

#page-accounts .account-merged-form {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#page-accounts .account-merged-head,
#page-accounts .account-merged-permission-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#page-accounts .account-merged-head {
  margin-bottom: 10px;
}

#page-accounts .account-merged-head strong,
#page-accounts .account-merged-permission-head strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
}

#page-accounts .account-merged-head span {
  margin-left: 8px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
}

#page-accounts .account-identity-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

#page-accounts .account-identity-strip .auth-field {
  min-width: 0;
  margin-bottom: 0;
}

#page-accounts .account-identity-strip .auth-field label {
  margin-bottom: 0;
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

#page-accounts .account-identity-strip .account-input,
#page-accounts .account-identity-strip .account-select {
  height: 34px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  border-color: rgba(223, 231, 240, 0.85);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 760;
}

#page-accounts .account-merged-permission-head {
  margin-bottom: 10px;
}

#page-accounts .account-merged-form > #accountPermissionGrid {
  flex: 1;
  min-height: 0;
  align-content: start;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(44px, auto);
  gap: 9px;
  overflow: visible;
  padding-right: 0;
}

#page-accounts .account-merged-form > #accountPermissionGrid .permission-check.account-redesign-perm-item {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 13px;
}

#page-accounts .account-merged-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

#page-accounts .account-redesign-side {
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding-top: 0;
}

#page-accounts .account-redesign-log-card {
  flex: 0 1 auto !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#page-accounts .account-redesign-side > .account-redesign-card,
#page-accounts .account-redesign-side > .access-settings-card {
  min-height: 0;
  overflow: hidden;
}

#page-accounts .account-redesign-side > .access-settings-card {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding: 12px;
}

#page-accounts .account-redesign-side .access-settings-head {
  align-items: center;
  margin-bottom: 8px;
}

#page-accounts .account-redesign-side .access-settings-head h3 {
  margin-bottom: 2px;
  font-size: 15px;
}

#page-accounts .account-redesign-side .access-settings-head small {
  font-size: 11px;
  line-height: 1.25;
}

#page-accounts .account-redesign-side .access-settings-head .btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

#page-accounts .account-redesign-side .account-redesign-access-grid {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
}

#page-accounts .account-redesign-side .account-redesign-access-grid .auth-field {
  margin-bottom: 0;
}

#page-accounts .account-redesign-side .account-redesign-access-grid .auth-field label {
  margin-bottom: 0;
  font-size: 11px;
}

#page-accounts .account-redesign-side .account-redesign-access-grid .account-input {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

#page-accounts .account-redesign-side .access-module-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#page-accounts .account-redesign-side .access-module-grid .permission-check.account-redesign-perm-item {
  min-height: 30px;
  padding: 4px 7px;
  gap: 6px;
  font-size: 12px;
  line-height: 1.15;
}

#page-accounts .account-redesign-side .access-module-grid .permission-check.account-redesign-perm-item span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.15;
}

#page-accounts .account-redesign-side .access-module-grid .account-redesign-switch-ui {
  width: 32px;
  height: 18px;
}

#page-accounts .account-redesign-side .access-module-grid .account-redesign-switch-ui::before {
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
}

#page-accounts .account-redesign-side .access-module-grid .account-redesign-switch-input:checked + .account-redesign-switch-ui::before {
  transform: translateX(14px);
}

#page-accounts .account-redesign-log-card #accountLogsPreview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 4px;
}

#page-accounts .account-redesign-log-card .account-redesign-hint {
  flex: 0 0 auto;
}

@media (max-width: 1500px) {
  #page-accounts .account-redesign-layout {
    grid-template-columns: 300px minmax(560px, 1fr) 340px;
  }

  #page-accounts .account-merged-form > #accountPermissionGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1220px) {
  #page-accounts .account-identity-strip,
  #page-accounts .account-merged-form > #accountPermissionGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phone auto query: first-demo layout implementation. */
#page-phoneauto .content.phone-auto-demo-v1 {
  height: calc(100dvh - 56px);
  max-width: none;
  display: grid;
  grid-template-rows: 38px 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px 16px;
  overflow: hidden;
}

#page-phoneauto .phone-auto-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 38px;
}

#page-phoneauto .phone-auto-top-actions[hidden] {
  display: none !important;
}

#page-phoneauto .phone-auto-top-actions .btn,
#page-phoneauto .phone-auto-top-actions .btn-ghost,
#page-phoneauto .phone-auto-actions .btn,
#page-phoneauto .phone-auto-actions .btn-ghost {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 850;
}

#page-phoneauto .phone-auto-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  min-height: 0;
}

#page-phoneauto .phone-auto-status-card {
  min-height: 0;
  height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
  margin: 0;
}

#page-phoneauto .phone-auto-status-label {
  color: #8b9bb0;
  font-size: 12px;
  font-weight: 850;
}

#page-phoneauto .phone-auto-status-value {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 24px;
  font-weight: 920;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-phoneauto .phone-auto-status-card:nth-child(4) .phone-auto-status-value {
  color: var(--orange);
}

#page-phoneauto .phone-auto-status-value.is-paused {
  color: var(--orange);
}

#page-phoneauto .phone-auto-status-sub {
  margin: 0;
  color: #8b9bb0;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-phoneauto .demo-phoneauto-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(520px, 1.05fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  overflow: hidden;
}

#page-phoneauto .phone-auto-settings-card {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  padding: 12px !important;
  margin: 0;
  align-self: stretch;
  overflow: hidden;
}

#page-phoneauto .demo-phoneauto-template {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  display: none !important;
}

#page-phoneauto .demo-phoneauto-template[hidden],
#page-phoneauto .demo-phoneauto-config[hidden],
#page-phoneauto .phone-auto-template-hidden {
  display: none !important;
}

#page-phoneauto .phone-auto-settings-card .access-settings-head,
#page-phoneauto .demo-phoneauto-template h3,
#page-phoneauto .demo-phoneauto-log-headline {
  min-height: 0;
  margin: 0;
}

#page-phoneauto .phone-auto-settings-card .access-settings-head h3,
#page-phoneauto .demo-phoneauto-template h3,
#page-phoneauto .demo-phoneauto-log-headline h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px !important;
  font-weight: 900;
  line-height: 1.2;
}

#page-phoneauto .phone-auto-settings-card .access-settings-head p {
  margin: 5px 0 0;
  color: #7e8fa9;
  font-size: 12px;
  line-height: 1.45;
}

#page-phoneauto .phone-auto-channel-list {
  min-height: 0;
  display: grid;
  gap: 7px;
  align-content: start;
  overflow: hidden;
}

#page-phoneauto .phone-auto-channel-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 64px 52px;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #f9fbfd 100%);
}

#page-phoneauto .phone-auto-company {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

#page-phoneauto .phone-auto-company span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

#page-phoneauto .phone-auto-channel-row .account-input {
  min-height: 0;
  height: 36px;
  resize: none;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #f5f8fb;
  color: #66778c;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

#page-phoneauto .phone-auto-channel-status {
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

#page-phoneauto .phone-auto-channel-status.ok {
  background: var(--green-bg);
  color: var(--green);
}

#page-phoneauto .phone-auto-channel-status.warn {
  background: var(--red-bg);
  color: var(--red);
}

#page-phoneauto .phone-auto-edit-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

#page-phoneauto .phone-auto-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
  align-content: start;
  align-self: stretch;
  height: 100%;
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

#page-phoneauto .phone-auto-settings-grid .auth-field,
#page-phoneauto .phone-auto-template-box .auth-field {
  margin: 0;
}

#page-phoneauto .phone-auto-template-box .auth-field {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#page-phoneauto .phone-auto-settings-grid .auth-field label,
#page-phoneauto .phone-auto-template-box .auth-field label {
  margin-bottom: 3px;
  color: #8b9bb0;
  font-size: 10px;
  font-weight: 850;
}

#page-phoneauto .phone-auto-settings-grid .account-input,
#page-phoneauto .phone-auto-settings-grid .account-select,
#page-phoneauto .phone-auto-toggle {
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  background: #f7fafc;
  font-size: 12px;
  font-weight: 820;
}

#page-phoneauto .wecom-contact-panel {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  align-self: stretch;
  height: 100%;
}

#page-phoneauto .wecom-contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#page-phoneauto .wecom-contact-head small {
  color: #7e8fa9;
  font-size: 11px;
  font-weight: 800;
}

#page-phoneauto .wecom-contact-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

#page-phoneauto .wecom-contact-actions {
  display: flex;
  gap: 6px;
}

#page-phoneauto .wecom-contact-actions .btn,
#page-phoneauto .wecom-contact-actions .btn-ghost {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

#page-phoneauto .wecom-contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
  align-content: start;
}

#page-phoneauto .wecom-contact-fields .auth-field {
  margin: 0;
}

#page-phoneauto .wecom-contact-fields .auth-field label {
  margin-bottom: 3px;
  color: #8b9bb0;
  font-size: 10px;
  font-weight: 850;
}

#page-phoneauto .wecom-contact-fields .account-input,
#page-phoneauto .wecom-contact-fields .phone-auto-toggle {
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  background: #f7fafc;
  font-size: 12px;
  font-weight: 820;
}

#page-phoneauto .wecom-contact-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

#page-phoneauto .wecom-contact-summary span,
#page-phoneauto .wecom-contact-search {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  background: #f7fafc;
  color: #6f819b;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-phoneauto .wecom-contact-summary strong {
  margin-left: 4px;
  color: var(--text);
  font-weight: 920;
}

#page-phoneauto .wecom-contact-search {
  width: 100%;
  border: 1px solid transparent;
}

#page-phoneauto .wecom-contact-list {
  max-height: 96px;
  overflow: auto;
  display: grid;
  gap: 5px;
}

#page-phoneauto .wecom-contact-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

#page-phoneauto .wecom-contact-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-phoneauto .wecom-contact-meta {
  color: #71839a;
}

#page-phoneauto .wecom-contact-empty {
  padding: 10px;
  color: #8b9bb0;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#page-phoneauto .phone-auto-range-field {
  min-width: 0;
}

#page-phoneauto .phone-auto-time-range {
  height: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

#page-phoneauto .phone-auto-time-range .account-input {
  width: 100%;
  min-width: 0;
  padding: 0 6px;
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

#page-phoneauto .phone-auto-time-range span {
  color: #8b9bb0;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

#page-phoneauto .phone-auto-toggle {
  padding: 0 11px;
  border-color: var(--border);
  color: var(--text);
}

#page-phoneauto .phone-auto-toggle input {
  position: relative;
  width: 34px;
  height: 20px;
  flex: none;
  appearance: none;
  border-radius: 999px;
  background: #dfe3e9;
  transition: background .16s ease;
}

#page-phoneauto .phone-auto-toggle input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  transition: transform .16s ease;
}

#page-phoneauto .phone-auto-toggle input:checked {
  background: var(--accent);
}

#page-phoneauto .phone-auto-toggle input:checked::before {
  transform: translateX(14px);
}

#page-phoneauto .phone-auto-log-card {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px !important;
  margin: 0;
  align-self: stretch;
  height: 100%;
  overflow: hidden;
}

#page-phoneauto .demo-phoneauto-log-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#page-phoneauto .phone-auto-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#page-phoneauto .phone-auto-log-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-phoneauto .phone-auto-log-kpi {
  min-height: 72px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

#page-phoneauto .phone-auto-log-kpi-label {
  color: #93a2b8;
  font-size: 12px;
  font-weight: 850;
}

#page-phoneauto .phone-auto-log-kpi-value {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
}

#page-phoneauto .phone-auto-log-kpi-meta {
  color: #7e8fa9;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

#page-phoneauto .phone-auto-log-table-head,
#page-phoneauto .phone-auto-log-item {
  display: block;
}

#page-phoneauto .phone-auto-log-table-head {
  display: none;
}

#page-phoneauto .phone-auto-log-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none;
  overflow: auto;
  padding: 0 2px 0 0;
  align-items: stretch;
}

#page-phoneauto .phone-auto-log-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  flex: 0 0 auto !important;
  gap: 4px;
  min-height: 132px !important;
  height: fit-content !important;
  max-height: none !important;
  margin: 0;
  padding: 12px 14px;
  box-sizing: border-box;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#page-phoneauto .phone-auto-log-item > * {
  margin: 0 !important;
  position: static !important;
  inset: auto !important;
  float: none !important;
}

#page-phoneauto .phone-auto-log-line {
  display: block !important;
  width: 100%;
  color: var(--text);
  font-size: 13px;
  line-height: 20px !important;
  font-weight: 820;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-height: 20px;
  height: auto !important;
}

#page-phoneauto .phone-auto-log-line.is-head {
  font-size: 14px;
  line-height: 22px !important;
  min-height: 22px;
  font-weight: 900;
}

#page-phoneauto .phone-auto-log-line.is-meta {
  color: #6f819b;
  font-size: 12px;
  font-weight: 780;
}

#page-phoneauto .phone-auto-log-line.is-detail {
  color: var(--text2);
  font-size: 12px;
  font-weight: 760;
}

#page-phoneauto .phone-auto-contract-cache,
#page-phoneauto .phone-auto-hidden-contract {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

#page-phoneauto .phone-auto-settings-card > .okcc-settings-error {
  grid-column: 1 / -1;
  min-height: 0;
  margin-top: 0;
}

#page-phoneauto .phone-auto-settings-card > .okcc-settings-error:not(:empty) {
  margin-top: 10px;
}

@media (max-width: 1380px) {
  #page-phoneauto .demo-phoneauto-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow: auto;
  }

  #page-phoneauto .phone-auto-log-card {
    grid-column: 1;
    grid-row: auto;
  }

  #page-phoneauto .phone-auto-settings-card {
    grid-column: 1;
  }
}

@media (max-width: 980px) {
  #page-phoneauto .content.phone-auto-demo-v1 {
    height: auto;
    min-height: calc(100dvh - 56px);
    overflow: auto;
  }

  #page-phoneauto .phone-auto-status-grid,
  #page-phoneauto .phone-auto-settings-grid,
  #page-phoneauto .phone-auto-channel-row,
  #page-phoneauto .wecom-contact-fields,
  #page-phoneauto .wecom-contact-summary,
  #page-phoneauto .wecom-contact-row,
  #page-phoneauto .phone-auto-log-summary,
  #page-phoneauto .phone-auto-log-table-head,
  #page-phoneauto .phone-auto-log-item {
    grid-template-columns: 1fr;
  }

  #page-phoneauto .phone-auto-log-item .phone-auto-badge {
    margin-top: 6px;
  }
}
/* Memo page approved compact redesign */
#page-memo .content {
  display: grid;
  grid-template-rows: 238px 54px minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  padding-top: 12px;
  padding-bottom: 14px;
}

#page-memo .memo-panel {
  border-radius: 12px;
  border-color: rgba(210, 221, 234, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

#page-memo .memo-note {
  margin: 0;
  padding: 14px 16px 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf9 100%);
}

#page-memo .memo-note-head {
  min-height: 32px;
  margin-bottom: 9px;
}

#page-memo .memo-note-title {
  font-size: 18px;
  font-weight: 900;
}

#page-memo .memo-note-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

#page-memo .memo-note-actions {
  flex-wrap: nowrap;
}

#page-memo .memo-note-status {
  min-width: 92px;
  color: var(--green);
  font-weight: 800;
}

#page-memo .memo-note-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 12px;
}

#page-memo .memo-note-textarea {
  min-height: 0;
  height: 100%;
  resize: none;
  padding: 12px 14px;
  border-radius: 10px;
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.45;
}

#page-memo .memo-note-side {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-memo .memo-note-tile {
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 10px;
  background: #fff;
}

#page-memo .memo-note-tile span {
  display: block;
  margin-bottom: 8px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

#page-memo .memo-note-tile strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

#page-memo .memo-overview {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 180px);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

#page-memo .memo-overview-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

#page-memo .memo-overview-title strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

#page-memo .memo-overview-title span:not(.memo-overview-dot) {
  display: block;
  margin-top: 2px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
}

#page-memo .memo-overview-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e6911a;
  box-shadow: 0 0 0 6px #fff4de;
}

#page-memo .memo-overview-metric {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(210, 221, 234, 0.95);
}

#page-memo .memo-overview-metric span {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

#page-memo .memo-overview-metric strong {
  font-size: 26px;
  line-height: 1;
}

#page-memo .memo-overview-metric.c-pending strong { color: var(--orange); }
#page-memo .memo-overview-metric.c-done strong { color: var(--green); }
#page-memo .memo-overview-metric.c-total strong { color: var(--accent); }

#page-memo .memo-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: 405px minmax(0, 1fr);
  gap: 12px;
}

#page-memo .memo-compose,
#page-memo .memo-list-panel {
  min-height: 0;
  margin: 0;
}

#page-memo .memo-compose {
  padding: 14px;
  display: flex;
  flex-direction: column;
}

#page-memo .memo-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

#page-memo .memo-compose-head strong,
#page-memo .memo-list-heading strong {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
}

#page-memo .memo-compose-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

#page-memo .memo-compose-grid .btn {
  min-height: 42px;
  width: 100%;
}

#page-memo .memo-compose-grid .memo-date,
#page-memo .memo-compose-grid .memo-select {
  min-width: 0;
}

#page-memo .memo-compose-grid > .memo-date,
#page-memo .memo-compose-grid > .memo-select {
  grid-column: auto;
}

#page-memo .memo-compose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
}

#page-memo .memo-compose-grid .memo-input,
#page-memo .memo-compose-grid .btn {
  grid-column: 1 / -1;
}

#page-memo .memo-input,
#page-memo .memo-date,
#page-memo .memo-select,
#page-memo .memo-search {
  height: 42px;
  border-radius: 9px;
  background: #f4f7fb;
}

#page-memo .memo-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

#page-memo .memo-chip,
#page-memo .memo-filter {
  border-radius: 8px;
  font-weight: 800;
}

#page-memo .memo-quick .memo-chip {
  height: 34px;
  padding: 0 10px;
}

#page-memo .memo-insight {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 10px;
  background: #fbfdff;
}

#page-memo .memo-insight > span {
  display: block;
  margin-bottom: 8px;
  color: var(--text3);
  font-size: 12px;
  font-weight: 900;
}

#page-memo .memo-insight p {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 7px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

#page-memo .memo-insight i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

#page-memo .memo-insight strong {
  margin-left: auto;
}

#page-memo .memo-insight i.bad { background: var(--red); }
#page-memo .memo-insight i.warn { background: var(--orange); }
#page-memo .memo-insight i.ok { background: var(--green); }

#page-memo .memo-side-lines {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

#page-memo .memo-side-lines div {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

#page-memo .memo-side-lines strong {
  min-width: 0;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-memo .memo-list-panel {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

#page-memo .memo-toolbar {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 0 12px;
}

#page-memo .memo-list-heading {
  display: grid;
  gap: 2px;
  min-width: 142px;
}

#page-memo .memo-list-heading span {
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

#page-memo .memo-filters {
  flex-wrap: nowrap;
  gap: 7px;
}

#page-memo .memo-filter {
  height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

#page-memo .memo-list-head {
  padding: 12px 0 8px;
  border-top: 1px solid rgba(223, 231, 240, 0.95);
}

#page-memo .memo-list-title {
  font-size: 14px;
  font-weight: 900;
}

#page-memo .memo-list-count {
  font-weight: 800;
}

#page-memo .memo-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 0 3px 0 0;
}

#page-memo .memo-item {
  margin-top: 9px;
  padding: 12px;
  border-radius: 10px;
  box-shadow: none;
}

#page-memo .memo-text {
  font-size: 14px;
  font-weight: 800;
}

#page-memo .memo-meta {
  margin-top: 7px;
}

@media (max-width: 1380px) {
  #page-memo .content {
    overflow: auto;
    grid-template-rows: auto auto auto;
  }

  #page-memo .memo-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  #page-memo .memo-note-body,
  #page-memo .memo-overview {
    grid-template-columns: 1fr;
  }

  #page-memo .memo-toolbar {
    grid-template-columns: 1fr;
  }

  #page-memo .memo-filters {
    flex-wrap: wrap;
  }
}

/* Mobile shell: keeps desktop contracts intact while giving phones native navigation. */
.mobile-topbar,
.mobile-bottom-nav,
.mobile-backdrop,
.mobile-more-drawer,
.mobile-account-sheet,
.mobile-user-sheet {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    display: block;
    background: #f4f7fb;
  }

  .page,
  .main,
  .content {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  body.auth-pending .mobile-topbar,
  body.auth-pending .mobile-bottom-nav,
  body.auth-pending .mobile-backdrop,
  body.auth-pending .mobile-more-drawer,
  body.auth-pending .mobile-account-sheet,
  body.auth-pending .mobile-user-sheet {
    display: none !important;
  }

  .sidebar,
  .top-hub {
    display: none !important;
  }

  .mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: calc(62px + env(safe-area-inset-top));
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    border-bottom: 1px solid rgba(217, 226, 239, 0.92);
    background: rgba(244, 247, 251, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-icon-btn,
  .mobile-user-btn,
  .mobile-tab,
  .mobile-drawer-item,
  .mobile-sheet-option,
  .mobile-sheet-action {
    font: inherit;
  }

  .mobile-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow);
  }

  .mobile-title-wrap {
    min-width: 0;
  }

  .mobile-title {
    display: block;
    color: var(--text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-subtitle {
    display: block;
    margin-top: 3px;
    color: var(--text3);
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-user-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    box-shadow: var(--shadow);
  }

  .mobile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    flex: none;
  }

  .mobile-user-name {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    display: none;
  }

  .page.active .main,
  #page-phone.page.active .main,
  #page-phoneupload.page.active .main,
  #page-mainphoneimport.page.active .main,
  #page-phoneauto.page.active .main,
  #page-accounts.page.active .main,
  #page-customerlinks.page.active .main,
  #page-memo.page.active .main,
  #page-exam.page.active .main,
  #page-profit.page.active .main,
  #page-soukebao.page.active .main,
  #page-loadguide.page.active .main,
  #page-logs.page.active .main,
  #page-okcc.page.active .main,
  #page-changelog.page.active .main,
  #page-idcard.page.active .main {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: 100dvh !important;
    height: auto !important;
    padding-top: calc(66px + env(safe-area-inset-top)) !important;
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
  }

  .page .header,
  #page-logs .header {
    padding: 12px 12px 0 !important;
  }

  .page .header h1 {
    font-size: 20px !important;
    line-height: 1.25;
  }

  .page .header p {
    font-size: 12px;
  }

  .page .content,
  #page-phone .content,
  #page-phoneupload .content,
  #page-mainphoneimport .content,
  #page-phoneauto .content,
  #page-accounts .content,
  #page-customerlinks .content,
  #page-memo .content,
  #page-exam .content,
  #page-profit .content,
  #page-soukebao .content,
  #page-loadguide .content,
  #page-logs .content,
  #page-okcc .content,
  #page-changelog .content,
  #page-idcard .content {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 12px 12px calc(92px + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
    scrollbar-gutter: auto !important;
  }

  .stats,
  .demo-stat-grid,
  .dashboard-grid,
  .dashboard-section-grid,
  .dashboard-tool-grid,
  .phone-auto-status-grid,
  .phone-auto-panel-grid,
  .phone-upload-summary-strip,
  .phone-upload-toolbar,
  .phone-workspace,
  .main-phone-import-strip,
  .main-phone-import-bottom,
  .demo-phoneauto-grid,
  .squsage-stats,
  .squsage-consumption-stats,
  .squsage-prediction,
  .squsage-grid,
  .supplier-account-side-grid,
  .demo-account-shell,
  .demo-account-layout,
  .demo-system-layout,
  .demo-resource-layout,
  .demo-system-bottom,
  .demo-resource-bottom,
  .customer-link-layout,
  .customer-link-form-inline,
  .memo-shell,
  .okcc-grid,
  .load-guide-grid,
  .load-guide-status-grid,
  .load-guide-current-grid,
  .logs-redesign-layout,
  .logs-summary-row,
  .logs-filter-grid,
  .account-layout,
  .access-settings-grid,
  .access-module-grid,
  .permission-grid,
  #page-profit .content > div:first-child,
  #page-soukebao .content > div:first-child,
  #page-soukebao .sk-date-range-grid,
  #page-profit .tool-field-row,
  #page-soukebao .tool-field-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .stats,
  .demo-stat-grid,
  .phone-auto-status-grid,
  .phone-upload-summary-strip,
  .squsage-stats,
  .squsage-consumption-stats,
  .supplier-account-side-grid,
  .logs-summary-row {
    grid-template-columns: 1fr !important;
  }

  .card,
  .dashboard-card,
  .demo-panel,
  .demo-account-card,
  .demo-system-card,
  .demo-resource-card,
  .memo-panel,
  .okcc-panel,
  .phone-query-card,
  .phone-result-card,
  .phone-history-card,
  .main-phone-import-card,
  .main-phone-import-aux-card,
  .main-phone-import-preview-card,
  .logs-panel,
  .logs-filter-panel,
  .logs-risk-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 10px !important;
  }

  .content > div,
  .content > section,
  .content form,
  .content table,
  .content input,
  .content textarea,
  .content select {
    max-width: 100% !important;
  }

  .content div[style*="width:"],
  .content section[style*="width:"],
  .content aside[style*="width:"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  .add-row,
  .dashboard-card-head,
  .demo-panel-head,
  .phone-query-actions,
  .phone-result-actions,
  .phone-auto-actions,
  .phone-upload-actions,
  .customer-link-actions,
  .okcc-card-bottom,
  .memo-note-actions,
  .logs-filter-actions,
  .account-row-actions,
  .demo-panel-toolbar,
  .phone-upload-list-head,
  .customer-link-toolbar,
  .module-section-head {
    min-width: 0 !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  .btn,
  .btn-ghost,
  .phone-shortcut,
  .customer-link-actions .btn,
  .customer-link-actions .btn-ghost,
  .phone-auto-actions .btn,
  .phone-auto-actions .btn-ghost,
  .phone-upload-actions .btn,
  .phone-upload-actions .btn-ghost {
    max-width: 100%;
    min-height: 40px;
    white-space: normal;
  }

  .add-row .btn,
  .phone-shortcut,
  .okcc-login-btn,
  .main-phone-import-buttons .btn,
  .main-phone-import-buttons .btn-ghost {
    width: 100% !important;
  }

  .result-table,
  .squsage-table,
  .log-table,
  .logs-redesign-table,
  .demo-mini-table,
  .sk-result-table {
    min-width: 680px;
  }

  .result-table,
  .result-table-scroll,
  .phone-result-table-scroll,
  .phone-upload-table-wrap,
  .squsage-table-wrap,
  .log-table-wrap,
  .logs-redesign-table-wrap,
  .load-guide-table-wrap,
  .scroll,
  .table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .phone-auto-log-list,
  .memo-list,
  .account-list,
  .customer-link-grid,
  .changelog-list {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  #page-idcard #idcardFrame {
    height: calc(100dvh - 160px) !important;
    min-height: 560px !important;
    border-radius: 10px !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(217, 226, 239, 0.94);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
  }

  .mobile-tab {
    min-width: 0;
    height: 48px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text3);
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-tab-icon {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eef2f8;
    color: var(--text2);
    font-size: 12px;
    line-height: 1;
  }

  .mobile-tab.active {
    background: #eaf7f5;
    color: var(--accent);
  }

  .mobile-tab.active .mobile-tab-icon {
    background: var(--accent);
    color: #fff;
  }

  .mobile-tab[hidden] {
    display: none !important;
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.36);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  body.mobile-layer-open .mobile-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-more-drawer,
  .mobile-account-sheet,
  .mobile-user-sheet {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 95;
    max-height: min(72dvh, 620px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  body.mobile-more-open .mobile-more-drawer,
  body.mobile-account-open .mobile-account-sheet,
  body.mobile-user-open .mobile-user-sheet {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-drawer-head,
  .mobile-sheet-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .mobile-drawer-head strong,
  .mobile-sheet-head strong {
    font-size: 16px;
  }

  .mobile-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text2);
    font-size: 18px;
  }

  .mobile-drawer-list {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .mobile-drawer-group {
    display: grid;
    gap: 8px;
  }

  .mobile-drawer-label {
    color: var(--text3);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.06em;
  }

  .mobile-drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-drawer-item,
  .mobile-sheet-option,
  .mobile-sheet-action {
    min-width: 0;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
  }

  .mobile-drawer-item span,
  .mobile-sheet-option span,
  .mobile-sheet-action span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-drawer-empty {
    padding: 22px 14px;
    color: var(--text3);
    text-align: center;
  }

  .mobile-sheet-body {
    display: grid;
    gap: 8px;
    padding: 14px;
  }

  .mobile-sheet-option[hidden] {
    display: none !important;
  }

  .mobile-sheet-action.logout {
    color: var(--red);
    background: var(--red-bg);
    border-color: rgba(220, 38, 38, 0.18);
  }
}

@media (min-width: 520px) and (max-width: 760px) {
  .mobile-user-name {
    display: inline;
  }

  .stats,
  .demo-stat-grid,
  .phone-auto-status-grid,
  .phone-upload-summary-strip,
  .squsage-stats,
  .squsage-consumption-stats,
  .supplier-account-side-grid,
  .logs-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 420px) {
  .mobile-drawer-grid {
    grid-template-columns: 1fr !important;
  }

  .mobile-title {
    font-size: 17px;
  }
}

/* Phone upload report workspace visual refresh */
#page-phoneupload {
  background:
    radial-gradient(circle at 18% 8%, rgba(96, 165, 250, 0.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(196, 181, 253, 0.24), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #f7f7ff 42%, #fbfcff 100%);
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body:has(#page-phoneupload.active) {
  overflow-y: auto;
}

body:has(#page-selfsubmit.active) {
  overflow-y: auto;
}

#page-phoneupload .main {
  background: transparent;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

#page-phoneupload .content {
  width: auto;
  max-width: none;
  margin: 0 12px;
  padding: 18px 0 24px;
  display: block;
  height: auto;
  min-height: auto;
  overflow: visible;
}

#page-selfsubmit .content {
  width: auto;
  max-width: none;
  margin: 0 12px;
  padding: 18px 0 24px;
  display: block;
  height: auto;
  min-height: auto;
  overflow: visible;
}

#page-selfsubmit .main {
  background: transparent;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

.phone-upload-workbench {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  animation: phoneUploadFadeIn 360ms ease both;
}

@keyframes phoneUploadFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phone-upload-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 0 18px 2px;
}

.phone-upload-page-head h1 {
  margin: 0;
  color: #102033;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.phone-upload-page-head p,
.phone-upload-section-title p,
.phone-upload-action-head p {
  margin: 4px 0 0;
  color: #6b7280;
  line-height: 1.55;
}

.phone-upload-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.phone-upload-head-meta strong {
  color: #102033;
  font-weight: 800;
}

.phone-upload-auto-submit-bar{display:grid;grid-template-columns:minmax(220px,1.3fr) repeat(3,minmax(150px,1fr)) auto;gap:12px;align-items:center;padding:14px 16px}.phone-upload-auto-submit-title strong,.phone-upload-auto-submit-item strong{display:block;color:#102033;font-size:14px;font-weight:900}.phone-upload-auto-submit-title span,.phone-upload-auto-submit-item span,.phone-upload-auto-submit-permission{display:block;margin-top:3px;color:#64748b;font-size:12px;line-height:1.45}.phone-upload-auto-submit-control{display:inline-flex;align-items:center;justify-content:flex-end;gap:10px;min-width:150px}.phone-upload-auto-submit-switch{position:relative;width:48px;height:28px;flex:0 0 auto}.phone-upload-auto-submit-switch input{position:absolute;inset:0;opacity:0;cursor:pointer}.phone-upload-auto-submit-switch span{position:absolute;inset:0;border-radius:999px;background:#cbd5e1;pointer-events:none}.phone-upload-auto-submit-switch span:after{content:'';position:absolute;width:22px;height:22px;top:3px;left:3px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.2)}.phone-upload-auto-submit-switch input:checked+span{background:#2563eb}.phone-upload-auto-submit-switch input:checked+span:after{transform:translateX(20px)}
.phone-upload-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #2563eb;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.phone-upload-icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
}

.phone-upload-glass {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 20px;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.phone-upload-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.1);
  border-color: rgba(99, 102, 241, 0.14);
}

.phone-upload-warning {
  display: none;
  padding: 14px 18px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 16px;
  background: rgba(254, 242, 242, 0.86);
  color: #b91c1c;
  font-weight: 800;
  backdrop-filter: blur(18px);
}

.phone-upload-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  overflow: hidden;
  position: relative;
}

.phone-upload-hero::before {
  content: "";
  position: absolute;
  inset: auto 8% -42% 38%;
  height: 160px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.18), transparent 62%);
  pointer-events: none;
}

.phone-upload-hero-art {
  position: relative;
  min-height: 68px;
}

.phone-upload-doc-card {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(145deg, #93c5fd 0%, #2563eb 100%);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
  transform: rotate(9deg);
}

.phone-upload-doc-check {
  position: absolute;
  left: 42px;
  bottom: 2px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #60a5fa;
  color: #fff;
  border: 4px solid rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

.phone-upload-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  position: relative;
  z-index: 1;
}

.phone-upload-hero-field,
.phone-upload-progress-field {
  min-width: 0;
}

.phone-upload-hero-field span,
.phone-upload-next-card span,
.phone-upload-progress-top span,
.phone-upload-summary-item .label,
.phone-upload-report-metric .label {
  display: block;
  color: #8a99ad;
  font-size: 12px;
  font-weight: 800;
}

.phone-upload-hero-field strong {
  display: block;
  margin-top: 3px;
  color: #102033;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.phone-upload-state-tag,
.phone-upload-status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  color: #166534;
  background: rgba(187, 247, 208, 0.72);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.phone-upload-status-tag.is-reviewing {
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.86);
  border-color: rgba(59, 130, 246, 0.22);
}

.phone-upload-status-tag.is-rejected {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.86);
  border-color: rgba(248, 113, 113, 0.25);
}

.phone-upload-state-tag.is-rejected {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.86);
  border-color: rgba(248, 113, 113, 0.25);
}

.phone-upload-status-tag.is-pending,
.phone-upload-state-tag.is-pending {
  color: #b45309;
  background: rgba(254, 243, 199, 0.84);
  border-color: rgba(251, 191, 36, 0.25);
}

.phone-upload-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.phone-upload-progress-top strong {
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
}

.phone-upload-progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.82);
  overflow: hidden;
}

.phone-upload-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  transition: width 260ms ease;
}

.phone-upload-next-card {
  min-height: 74px;
  padding: 11px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(245, 243, 255, 0.82));
  border: 1px solid rgba(59, 130, 246, 0.08);
}

.phone-upload-next-card strong {
  display: block;
  margin-top: 5px;
  color: #102033;
  font-size: 14px;
  font-weight: 900;
}

.phone-upload-next-card p {
  margin: 3px 0 7px;
  color: #64748b;
  line-height: 1.35;
  font-size: 12px;
}

.phone-upload-next-btn,
.phone-upload-more-menu summary {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.phone-upload-next-btn {
  width: 100%;
  min-height: 30px;
}

.phone-upload-next-btn:hover,
.phone-upload-action-main:hover,
.phone-upload-more-menu summary:hover {
  transform: translateY(-3px);
  filter: brightness(1.04);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
}

.phone-upload-stepper-card,
.phone-upload-action-panel,
.phone-upload-stats-card,
.phone-upload-table-section {
  padding: 12px 16px;
}

.phone-upload-action-panel {
  position: relative;
  z-index: 40;
}

.phone-upload-stats-card,
.phone-upload-table-section {
  position: relative;
  z-index: 1;
}

.phone-upload-stepper-card h3,
.phone-upload-action-head h3,
.phone-upload-section-title h3,
.phone-upload-list-head h3 {
  margin: 0;
  color: #102033;
  font-size: 16px;
  font-weight: 900;
}

.phone-upload-stepper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phone-upload-flow-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.82);
  border: 1px solid rgba(59, 130, 246, 0.18);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.phone-upload-flow-status.is-success {
  color: #166534;
  background: rgba(187, 247, 208, 0.74);
  border-color: rgba(34, 197, 94, 0.2);
}

.phone-upload-flow-status.is-error {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.86);
  border-color: rgba(248, 113, 113, 0.25);
}

.phone-upload-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.phone-upload-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #8a99ad;
  text-align: center;
}

.phone-upload-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 2px;
  background: rgba(148, 163, 184, 0.28);
}

.phone-upload-step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
  border: 2px solid rgba(148, 163, 184, 0.32);
  color: #64748b;
  font-weight: 900;
  z-index: 1;
}

.phone-upload-step strong {
  color: #102033;
  font-size: 12px;
  font-weight: 900;
}

.phone-upload-step em {
  color: #8a99ad;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.phone-upload-step.is-done span {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.phone-upload-step.is-done:not(:last-child)::after {
  background: rgba(34, 197, 94, 0.42);
}

.phone-upload-step.is-current span {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.12), 0 12px 28px rgba(37, 99, 235, 0.22);
}

.phone-upload-step.is-busy span {
  position: relative;
  color: transparent;
  background: #fff;
  border: 2px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.10), 0 12px 28px rgba(37, 99, 235, 0.18);
}

.phone-upload-step.is-busy span::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(37, 99, 235, 0.20);
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: phoneUploadStepSpin 0.72s linear infinite;
}

@keyframes phoneUploadStepSpin {
  to {
    transform: rotate(360deg);
  }
}

.phone-upload-step.is-error span {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.11), 0 12px 28px rgba(239, 68, 68, 0.16);
}

.phone-upload-step.is-error strong,
.phone-upload-step.is-error em {
  color: #b91c1c;
}

.phone-upload-action-head,
.phone-upload-section-title,
.phone-upload-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.phone-upload-primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.phone-upload-task-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.phone-upload-task-summary div {
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.74);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.phone-upload-task-summary span {
  display: block;
  color: #8a99ad;
  font-size: 11px;
  font-weight: 900;
}

.phone-upload-task-summary strong {
  display: block;
  margin-top: 3px;
  color: #102033;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.phone-upload-action-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.phone-upload-action-step {
  min-height: 136px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 10px;
}

.phone-upload-action-step.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.12);
}

.phone-upload-action-step.is-complete {
  border-color: rgba(34, 197, 94, 0.22);
}

.phone-upload-action-step.is-ready {
  border-color: rgba(34, 197, 94, 0.24);
  box-shadow: 0 20px 42px rgba(34, 197, 94, 0.10);
}

.phone-upload-action-step.is-warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.58);
}

.phone-upload-action-step.is-error {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(254, 242, 242, 0.62);
}

.phone-upload-step-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.phone-upload-step-title h4 {
  margin: 0;
  color: #102033;
  font-size: 15px;
  font-weight: 900;
}

.phone-upload-step-title span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  font-weight: 900;
}

.phone-upload-step-title em {
  font-style: normal;
  color: #52627a;
  background: rgba(241, 245, 249, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.phone-upload-action-step.is-complete .phone-upload-step-title em,
.phone-upload-action-step.is-ready .phone-upload-step-title em {
  color: #166534;
  background: rgba(220, 252, 231, 0.78);
  border-color: rgba(34, 197, 94, 0.20);
}

.phone-upload-action-step.is-warn .phone-upload-step-title em {
  color: #b45309;
  background: rgba(254, 243, 199, 0.86);
  border-color: rgba(245, 158, 11, 0.22);
}

.phone-upload-action-step.is-error .phone-upload-step-title em {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.86);
  border-color: rgba(248, 113, 113, 0.25);
}

.phone-upload-action-step p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.phone-upload-action-step-note {
  min-height: 66px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: #52627a;
  font-size: 12px;
  line-height: 1.6;
}

.phone-upload-action-step-note strong {
  color: #102033;
  font-weight: 900;
}

.phone-upload-action-step-note.is-warn {
  background: rgba(255, 247, 237, 0.76);
  border-color: rgba(251, 146, 60, 0.34);
  color: #9a3412;
}

.phone-upload-action-step-note.is-good {
  background: rgba(240, 253, 244, 0.72);
  border-color: rgba(34, 197, 94, 0.24);
  color: #166534;
}

.phone-upload-step-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.phone-upload-step-actions .phone-upload-action-main {
  min-height: 52px;
}

.phone-upload-step-secondary {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: #52627a;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.phone-upload-step-secondary:hover {
  color: #2563eb;
  background: rgba(239, 246, 255, 0.92);
}

.phone-upload-material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phone-upload-material-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.phone-upload-material-card {
  min-height: 126px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(248, 255, 251, 0.74);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.phone-upload-material-card.is-warn {
  background: rgba(255, 247, 237, 0.74);
  border-color: rgba(251, 146, 60, 0.30);
}

.phone-upload-material-card.is-empty {
  background: rgba(248, 250, 252, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

.phone-upload-material-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.phone-upload-material-card-head strong {
  color: #059669;
  font-size: 14px;
  font-weight: 900;
}

.phone-upload-material-card.is-warn .phone-upload-material-card-head strong {
  color: #ea580c;
}

.phone-upload-material-card-head em {
  font-style: normal;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}

.phone-upload-material-row {
  min-height: 24px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  color: #52627a;
  font-size: 12px;
  font-weight: 800;
}

.phone-upload-material-row span:first-child {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.phone-upload-material-row.is-warn span:first-child {
  background: #f97316;
}

.phone-upload-material-row.is-empty span:first-child {
  background: #cbd5e1;
}

.phone-upload-material-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-weight: 900;
}

.phone-upload-material-row-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.phone-upload-material-row-copy small {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.phone-upload-material-row em {
  font-style: normal;
  color: #059669;
  font-weight: 900;
  white-space: nowrap;
  align-self: center;
}

.phone-upload-material-row.is-warn em {
  color: #d97706;
}

.phone-upload-material-row.is-empty em {
  color: #94a3b8;
}

.phone-upload-action-result {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.phone-upload-result-summary {
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px dashed rgba(148, 163, 184, 0.30);
  color: #52627a;
  font-size: 12px;
  line-height: 1.55;
}

.phone-upload-result-summary strong {
  color: #102033;
  font-weight: 900;
}

.phone-upload-result-summary .is-good {
  color: #16a34a;
  font-weight: 900;
}

.phone-upload-result-summary .is-warn {
  color: #d97706;
  font-weight: 900;
}

.phone-upload-result-summary .is-bad {
  color: #dc2626;
  font-weight: 900;
}

.phone-upload-debug-details {
  margin-top: 10px;
}

.phone-upload-debug-details summary {
  width: max-content;
  min-height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(99, 102, 241, 0.14);
  color: #52627a;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.phone-upload-action-main {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.phone-upload-action-main span {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 900;
}

.phone-upload-action-main strong {
  font-size: 14px;
  font-weight: 900;
}

.phone-upload-action-main em {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-style: normal;
}

.phone-upload-action-main.is-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.phone-upload-action-main.is-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.phone-upload-action-main.is-teal {
  background: linear-gradient(135deg, #22c1c3 0%, #0f766e 100%);
}

.phone-upload-action-main:disabled,
.phone-upload-step-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
  filter: grayscale(0.25);
  box-shadow: none;
}

.phone-upload-more-menu {
  position: relative;
  z-index: 60;
}

.phone-upload-more-menu summary {
  list-style: none;
  min-width: 132px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.74);
  color: #52627a;
  border: 1px solid rgba(99, 102, 241, 0.14);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.phone-upload-more-menu summary::-webkit-details-marker {
  display: none;
}

.phone-upload-more-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 70;
  width: 220px;
  padding: 10px;
  display: grid;
  gap: 6px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

.phone-upload-more-menu button,
.phone-upload-more-menu .phone-upload-file {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #52627a;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.phone-upload-more-menu button:hover,
.phone-upload-more-menu .phone-upload-file:hover {
  background: rgba(239, 246, 255, 0.92);
  color: #2563eb;
}

.phone-upload-more-menu .phone-upload-file input {
  display: none;
}

.phone-upload-report-status {
  margin-top: 8px;
  padding: 12px 14px;
  min-height: 94px;
  max-height: 156px;
  overflow: auto;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.84);
  border: 1px dashed rgba(148, 163, 184, 0.30);
  color: #52627a;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .phone-upload-task-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phone-upload-action-steps,
  .phone-upload-action-result {
    grid-template-columns: 1fr;
  }
  .phone-upload-step-actions {
    grid-template-columns: 1fr;
  }
  .phone-upload-material-grid {
    grid-template-columns: 1fr;
  }
}

.phone-upload-summary-strip,
.phone-upload-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.phone-upload-summary-item,
.phone-upload-report-metric {
  min-height: 58px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.phone-upload-summary-item .value,
.phone-upload-report-metric .value {
  margin-top: 3px;
  color: #2563eb;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.phone-upload-summary-item .meta,
.phone-upload-report-metric .meta {
  margin-top: 2px;
  color: #8a99ad;
  font-size: 12px;
  line-height: 1.4;
}

.phone-upload-summary-item.c-pass .value,
.phone-upload-report-metric.is-success .value {
  color: #16a34a;
}

.phone-upload-summary-item.c-wait .value {
  color: #d97706;
}

.phone-upload-report-result {
  margin-top: 10px;
  display: none !important;
}

.phone-upload-report-result.empty {
  min-height: 0;
  display: none;
  place-items: center;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  color: #8a99ad;
  background: rgba(248, 250, 252, 0.54);
  font-weight: 800;
}

.phone-upload-report-lines {
  margin-top: 14px;
  padding: 14px 16px;
  max-height: 170px;
  overflow: auto;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.04);
  color: #52627a;
  font-size: 12px;
  line-height: 1.6;
}

.phone-upload-list-head .demo-inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.phone-upload-list-head .btn-ghost {
  min-height: 32px;
  border-radius: 12px;
  border-color: rgba(99, 102, 241, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #52627a;
  font-weight: 900;
}

.phone-upload-list-head .btn-ghost.active {
  color: #0f766e;
  background: rgba(204, 251, 241, 0.64);
  border-color: rgba(20, 184, 166, 0.24);
}

.phone-upload-search {
  min-width: 320px;
  height: 34px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: #102033;
  padding: 0 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.phone-upload-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  background: rgba(255, 255, 255, 0.58);
}

.phone-upload-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
  min-width: 1080px;
}

.phone-upload-table th {
  padding: 8px 10px 5px;
  color: #8a99ad;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  border: 0;
  background: transparent;
}

.phone-upload-table td {
  padding: 10px 10px;
  color: #102033;
  font-size: 13px;
  font-weight: 700;
  border-top: 1px solid rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  background: rgba(255, 255, 255, 0.74);
  transition: background 160ms ease, transform 160ms ease;
}

.phone-upload-table td:first-child {
  border-left: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 14px 0 0 14px;
}

.phone-upload-table td:last-child {
  border-right: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 0 14px 14px 0;
}

.phone-upload-table tr:hover td {
  background: rgba(239, 246, 255, 0.9);
}

.phone-upload-column-filter,
.phone-code-input {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.82);
  color: #102033;
}

.phone-upload-filter-head {
  display: grid;
  gap: 7px;
}

.phone-upload-filter-head.is-actions {
  min-width: 128px;
}

.phone-upload-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.phone-upload-row-actions button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: rgba(239, 246, 255, 0.88);
  color: #2563eb;
  font-weight: 900;
  cursor: pointer;
}

.phone-upload-row-actions button:hover {
  background: #2563eb;
  color: #fff;
}

@media (max-width: 1180px) {
  .phone-upload-hero {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .phone-upload-next-card {
    grid-column: 1 / -1;
  }

  .phone-upload-primary-actions,
  .phone-upload-summary-strip,
  .phone-upload-report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #page-phoneupload .content {
    width: calc(100vw - 20px);
    padding: 18px 0 28px;
  }

  .phone-upload-page-head,
  .phone-upload-action-head,
  .phone-upload-list-head {
    display: grid;
  }

  .phone-upload-page-head h1 {
    font-size: 24px;
  }

  .phone-upload-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .phone-upload-hero-art {
    display: none;
  }

  .phone-upload-hero-grid,
  .phone-upload-stepper,
  .phone-upload-primary-actions,
  .phone-upload-summary-strip,
  .phone-upload-report-metrics {
    grid-template-columns: 1fr !important;
  }

  .phone-upload-step:not(:last-child)::after {
    display: none;
  }

  .phone-upload-search {
    min-width: 0;
    width: 100%;
  }
}

/* Final desktop page-width override: keep all major workbench pages using the full app viewport. */
@media (min-width: 761px) {
  #page-selfsubmit.page.active {
    flex: 0 0 100vw !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    position: relative !important;
  }

  .page.active {
    width: 100% !important;
    max-width: none !important;
  }

  .page.active > .main {
    width: calc(100vw - var(--sidebar-w)) !important;
    max-width: calc(100vw - var(--sidebar-w)) !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .page.active > .main > .content {
    width: calc(100vw - var(--sidebar-w) - 24px) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
    box-sizing: border-box !important;
  }

  .demo-dashboard-content,
  .demo-account-content,
  .demo-phoneauto-content,
  #page-phoneupload .phone-upload-workbench,
  #page-selfsubmit .selfsubmit-workspace,
  #page-accounts .account-redesign-shell,
  #page-logs .logs-redesign-shell,
  #page-memo .memo-shell,
  #page-profit .profit-shell,
  #page-soukebao .sk-shell {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  #page-selfsubmit.active > .main {
    width: calc(100vw - var(--sidebar-w, 220px)) !important;
    max-width: calc(100vw - var(--sidebar-w, 220px)) !important;
    min-width: 0 !important;
    margin-left: var(--sidebar-w, 220px) !important;
    box-sizing: border-box !important;
  }

  #page-selfsubmit.active > .main > .content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 24px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  #page-selfsubmit .selfsubmit-workspace {
    gap: 10px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    align-content: start !important;
  }

  #page-selfsubmit .phone-upload-page-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 6px !important;
    padding: 0 8px 2px !important;
  }

  #page-selfsubmit .phone-upload-head-meta {
    max-width: none !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    row-gap: 4px !important;
    white-space: normal !important;
    text-align: left !important;
  }

  #page-selfsubmit .phone-upload-hero {
    grid-template-columns: 64px minmax(0, 1fr) 260px !important;
    gap: 10px 12px !important;
    padding: 10px 12px !important;
    align-items: stretch !important;
    min-height: 156px !important;
  }

  #page-selfsubmit .phone-upload-hero-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px 10px !important;
  }

  #page-selfsubmit .phone-upload-next-card {
    grid-column: 3 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 9px 10px !important;
    align-self: stretch !important;
  }

  #page-selfsubmit .selfsubmit-operation-grid {
    grid-template-columns: minmax(500px, 1.12fr) minmax(340px, 0.88fr) !important;
    gap: 12px !important;
    align-items: start !important;
  }

  #page-selfsubmit .selfsubmit-detail-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr) !important;
    gap: 10px !important;
  }

  #page-selfsubmit .selfsubmit-company-list {
    max-height: 168px !important;
  }

  #page-selfsubmit .selfsubmit-component-list {
    max-height: 280px !important;
  }

  #page-selfsubmit .phone-upload-summary-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #page-selfsubmit .phone-upload-stepper-card,
  #page-selfsubmit .phone-upload-action-panel,
  #page-selfsubmit .phone-upload-table-section {
    padding: 10px 12px !important;
  }

  #page-selfsubmit .phone-upload-stepper-head {
    gap: 8px !important;
  }

  #page-selfsubmit .phone-upload-flow-status {
    min-height: 24px !important;
    padding: 2px 9px !important;
    font-size: 11px !important;
  }

  #page-selfsubmit .phone-upload-stepper {
    margin-top: 6px !important;
    gap: 4px !important;
  }

  #page-selfsubmit .phone-upload-step strong {
    font-size: 11px !important;
  }

  #page-selfsubmit .phone-upload-step em {
    font-size: 9px !important;
  }

  #page-selfsubmit .selfsubmit-operation-card,
  #page-selfsubmit .selfsubmit-material-card,
  #page-selfsubmit .selfsubmit-batch-card {
    padding: 12px 14px !important;
  }

  #page-selfsubmit .selfsubmit-operation-card .phone-upload-primary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #page-selfsubmit .phone-upload-action-main {
    min-height: 48px !important;
    padding: 8px 12px !important;
  }

  #page-selfsubmit .phone-upload-action-main strong {
    font-size: 13px !important;
  }

  #page-selfsubmit .phone-upload-action-main em {
    font-size: 9px !important;
  }

  #page-selfsubmit .phone-upload-report-status {
    min-height: 74px !important;
    max-height: 118px !important;
    margin-top: 6px !important;
    padding: 10px 12px !important;
  }

  #page-selfsubmit .selfsubmit-blocking-card,
  #page-selfsubmit .selfsubmit-mini-facts {
    margin-top: 10px !important;
    padding: 10px 12px !important;
  }

  #page-selfsubmit .selfsubmit-mini-facts {
    gap: 6px 14px !important;
  }

  #page-selfsubmit .selfsubmit-company-picker {
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  #page-selfsubmit .selfsubmit-operation-card h3,
  #page-selfsubmit .selfsubmit-material-head h3,
  #page-selfsubmit .selfsubmit-batch-card h3,
  #page-selfsubmit .phone-upload-stepper-card h3 {
    font-size: 15px !important;
  }

  #page-selfsubmit .selfsubmit-material-head,
  #page-selfsubmit .selfsubmit-batch-head,
  #page-selfsubmit .phone-upload-action-head,
  #page-selfsubmit .phone-upload-section-title {
    margin-bottom: 8px !important;
  }

  #page-selfsubmit .phone-upload-summary-item {
    min-height: 52px !important;
    padding: 8px 10px !important;
  }

  #page-selfsubmit .phone-upload-summary-item .value {
    font-size: 18px !important;
  }

  #page-selfsubmit .selfsubmit-result-card pre,
  #page-selfsubmit .selfsubmit-helper-card p {
    margin-top: 6px !important;
  }

  #page-selfsubmit .selfsubmit-result-card pre {
    max-height: 96px !important;
  }
}

@media (min-width: 761px) {
  body:has(#page-selfsubmit.active) {
    overflow: hidden !important;
  }

  #page-selfsubmit.page.active {
    flex-basis: 100vw !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  #page-selfsubmit.active > .main {
    width: calc(100vw - var(--sidebar-w, 220px)) !important;
    max-width: calc(100vw - var(--sidebar-w, 220px)) !important;
    margin-left: var(--sidebar-w, 220px) !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  #page-selfsubmit.active > .main > .content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #page-selfsubmit.active .selfsubmit-workspace {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }
}

@media (min-width: 761px) and (max-width: 1560px) {
  #page-selfsubmit .phone-upload-hero {
    grid-template-columns: 64px minmax(0, 1fr) 220px !important;
  }

  #page-selfsubmit .phone-upload-hero-grid,
  #page-selfsubmit .phone-upload-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .page.active > .main,
  .page.active > .main > .content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
#page-invoicebusiness .invoice-shell {
  display: grid;
  gap: 16px;
}

#page-invoicebusiness .invoice-alert {
  padding: 14px 16px;
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 800;
  line-height: 1.6;
}

#page-invoicebusiness .invoice-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
}

#page-invoicebusiness .invoice-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-invoicebusiness .invoice-form-grid .wide {
  grid-column: 1 / -1;
}

#page-invoicebusiness .invoice-status-row,
#page-invoicebusiness .invoice-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#page-invoicebusiness .invoice-status-card,
#page-invoicebusiness .invoice-preview-item {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

#page-invoicebusiness .invoice-status-card span,
#page-invoicebusiness .invoice-preview-item span {
  display: block;
  color: var(--text3);
  font-size: 12px;
  font-weight: 800;
}

#page-invoicebusiness .invoice-status-card strong,
#page-invoicebusiness .invoice-preview-item strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  word-break: break-all;
}

#page-invoicebusiness .invoice-result {
  min-height: 110px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

#page-invoicebusiness .invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#page-invoicebusiness .invoice-danger-zone {
  border-color: rgba(220, 38, 38, 0.22);
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
}

#page-invoicebusiness .invoice-danger-zone .invoice-card-title {
  color: #991b1b;
}

#page-invoicebusiness .invoice-confirm-input {
  border-color: rgba(220, 38, 38, 0.35);
}

@media (max-width: 980px) {
  #page-invoicebusiness .invoice-grid,
  #page-invoicebusiness .invoice-form-grid,
  #page-invoicebusiness .invoice-status-row,
  #page-invoicebusiness .invoice-preview-grid {
    grid-template-columns: 1fr;
  }
}

.remote-audit-fields{display:grid;grid-template-columns:minmax(250px,1.8fr) repeat(4,minmax(120px,1fr)) auto;gap:10px}.remote-audit-fields input,.remote-audit-fields select{height:40px;border:1px solid var(--border);border-radius:8px;padding:0 12px;background:var(--surface2);color:var(--text);font:inherit}.remote-audit-note{margin-top:10px;color:var(--text3);font-size:12px}.remote-audit-chips,.remote-audit-stats{display:flex;gap:10px;margin:14px 0}.remote-audit-stats{display:grid;grid-template-columns:repeat(4,1fr)}.remote-audit-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,45%);min-height:620px;overflow:hidden}.remote-audit-list{border-right:1px solid var(--border)}.remote-audit-table-head,.remote-audit-row{display:grid;grid-template-columns:96px 90px minmax(120px,1.2fr) minmax(100px,1fr) 58px minmax(170px,1.6fr) 55px 66px 35px;gap:10px;padding:12px 16px;align-items:center}.remote-audit-table-head{color:var(--text3);font-size:12px;background:var(--surface2);border-bottom:1px solid var(--border)}.remote-audit-rows{max-height:650px;overflow:auto}.remote-audit-row{border-bottom:1px solid var(--border);cursor:pointer}.remote-audit-row:hover,.remote-audit-row.active{background:var(--surface2)}.remote-audit-row small{display:block;color:var(--text3);margin-top:4px}.remote-audit-detail{padding:18px;overflow:auto}.remote-audit-detail h3{margin:0 0 6px}.remote-audit-kv{display:grid;grid-template-columns:110px 1fr;gap:8px;font-size:12px;margin:14px 0}.remote-audit-kv dt{color:var(--text3)}.remote-audit-kv dd{margin:0;word-break:break-all}.remote-audit-pre{max-height:260px;overflow:auto;background:#101923;color:#dbe7f2;border-radius:8px;padding:12px;font:12px/1.55 ui-monospace,monospace;white-space:pre-wrap;word-break:break-all}.remote-audit-copy{float:right;border:1px solid var(--border);background:var(--surface);border-radius:6px;padding:5px 8px;cursor:pointer}@media(max-width:1100px){.remote-audit-fields{grid-template-columns:1fr 1fr}.remote-audit-layout{grid-template-columns:1fr}.remote-audit-list{border-right:0;border-bottom:1px solid var(--border)}.remote-audit-detail{min-height:460px}.remote-audit-stats{grid-template-columns:repeat(2,1fr)}}
.remote-audit-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.remote-audit-live{background:#e6f5ed;color:#23845b;padding:7px 11px;border-radius:999px;font-size:12px;white-space:nowrap}
.remote-audit-chips .chip{appearance:none;-webkit-appearance:none;border:1px solid #e3e8ef;background:#fff;color:#667386;border-radius:999px;padding:7px 12px;font:13px/1.2 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;cursor:pointer;box-shadow:none}.remote-audit-chips .chip:hover{border-color:#aac0ff;color:#3d6ff3}.remote-audit-chips .chip.active{border-color:#aac0ff;background:#edf2ff;color:#3d6ff3}.remote-audit-stats .stat{background:#fff;border:1px solid #e3e8ef;border-radius:10px;padding:14px;min-height:72px}.remote-audit-stats .stat small{color:#7a8492}.remote-audit-stats .stat b{display:block;font-size:22px;margin-top:4px}
  .ops-native-page { max-width: none !important; padding: 22px 28px 40px !important; }
  .ops-native-page .page-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:18px; }
  .ops-native-page .eyebrow { color:#0b7f72; font-size:12px; font-weight:800; letter-spacing:.08em; margin:0 0 5px; }
  .ops-native-page .page-head h1 { margin:0; color:#132337; font-size:28px; }
  .ops-native-page .page-sub { color:#78879a; margin:6px 0 0; }
  .ops-native-page .page-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
  .ops-native-page .ops-monitor-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
  .ops-native-page .ops-monitor-stat { background:#fff; border:1px solid #dce5ef; border-radius:14px; padding:18px; box-shadow:0 8px 24px rgba(20,49,88,.05); }
  .ops-native-page .ops-monitor-stat small { display:block; color:#77869a; font-size:12px; font-weight:700; }
  .ops-native-page .ops-monitor-stat strong { display:block; margin-top:8px; font-size:30px; color:#17253a; }
  .ops-native-page .ops-monitor-stat.is-good strong { color:#16845b; }
  .ops-native-page .ops-monitor-stat.is-warn strong { color:#c27614; }
  .ops-native-page .ops-monitor-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
  .ops-native-page .ops-monitor-card { background:#fff; border:1px solid #dce5ef; border-radius:14px; padding:16px; box-shadow:0 8px 24px rgba(20,49,88,.05); }
  .ops-native-page .ops-monitor-card-head { display:flex; justify-content:space-between; gap:12px; }
  .ops-native-page .ops-monitor-card-head strong { display:block; color:#17253a; }
  .ops-native-page .ops-monitor-card-head small { display:block; color:#8b98a8; margin-top:5px; }
  .ops-native-page .ops-monitor-dot { display:block; flex:0 0 auto; width:10px; height:10px; margin-top:5px; border-radius:50%; background:#20a06b; box-shadow:0 0 0 4px #e3f5ed; }
  .ops-native-page .ops-monitor-dot.is-offline { background:#c43b45; box-shadow:0 0 0 4px #fce8ea; }
  .ops-native-page .ops-monitor-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:18px; }
  .ops-native-page .ops-monitor-metrics span { color:#8491a1; font-size:12px; }
  .ops-native-page .ops-monitor-metrics b { display:block; color:#24364d; font-size:15px; margin-top:3px; }
  .ops-native-page .ops-monitor-last { display:block; color:#98a3b2; margin-top:16px; font-size:11px; }
  .ops-native-page .ops-monitor-empty { padding:60px 20px; text-align:center; color:#8b98a8; background:#fff; border:1px dashed #cbd6e2; border-radius:14px; }
  .ops-native-page .ops-monitor-empty.is-error { color:#b9343e; }
  .ops-native-page .ops-monitor-tabs { display:flex; gap:8px; margin-bottom:16px; }
  #modalRoot .modal-backdrop { z-index:10000; }
  @media (max-width: 760px) {
    .ops-native-page { padding:12px 12px 96px !important; }
    .ops-native-page .page-head { display:block; }
    .ops-native-page .page-actions { margin-top:12px; justify-content:flex-start; }
    .ops-native-page .ops-monitor-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .ops-native-page .ops-monitor-grid { grid-template-columns:1fr; }
  }
