/* ============ Components ============ */
/* Work card */
.work-card { border-left: 4px solid var(--line); }
.work-card.prio-critical { border-left-color: var(--danger); }
.work-card.prio-overdue { border-left-color: var(--warn); }
.work-card.prio-need-approval { border-left-color: #7a5cff; }
.work-card.prio-today { border-left-color: var(--info); }
.work-card.prio-upcoming { border-left-color: var(--brand-soft); }
.work-id { color: var(--ink-soft); font-size: 12px; margin-right: 6px; }
.work-fields { display: grid; grid-template-columns: 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.work-fields > div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.work-fields dt { color: var(--ink-soft); font-size: 12px; }
.work-fields dd { margin: 0; }
.next-action { font-weight: 600; color: var(--brand); }

/* Alerts */
.alert-card { border-left: 4px solid var(--line); }
.alert-card.level-critical { border-left-color: var(--danger); }
.alert-card.level-warning { border-left-color: var(--warn); }
.alert-card.level-info { border-left-color: var(--info); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-top: 6px; flex: 0 0 auto; }
.level-critical .alert-dot { background: var(--danger); }
.level-warning .alert-dot { background: var(--warn); }
.level-info .alert-dot { background: var(--info); }

/* Approvals */
.approval-meta { display: flex; gap: 16px; font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; flex-wrap: wrap; }
.approval-actions { display: flex; gap: 8px; }

/* KPI */
.kpi-name { font-weight: 650; font-size: 13px; }
.kpi-value-row { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.kpi-current { font-size: 22px; font-weight: 750; }
.kpi-target { font-size: 12px; color: var(--ink-soft); }
.kpi-meta { font-size: 11px; color: var(--ink-soft); }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: flex; gap: 10px; align-items: flex-start; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: 0 0 auto; }
.feed-text { font-size: 13px; }
.feed-time { font-size: 11px; color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-ghost { background: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-send { border-radius: 0 8px 8px 0; }

/* Tabs */
.tab-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-soft);
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { color: var(--ink-soft); font-size: 13px; padding: 8px 0; }

/* Chat */
.chat-view { display: flex; flex-direction: column; }
.chat-panel { display: flex; flex-direction: column; height: calc(100vh - 130px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-mock-note { font-size: 11px; color: var(--warn); }
.chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { display: flex; gap: 10px; }
.chat-message.from-user { flex-direction: row-reverse; }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.from-user .chat-avatar { background: var(--brand); color: #fff; }
.from-system .chat-avatar { background: #e8eaed; color: var(--ink-soft); }
.chat-bubble { max-width: 78%; }
.chat-sender { font-size: 11px; color: var(--ink-soft); margin-bottom: 2px; }
.from-user .chat-bubble { text-align: right; }
.chat-text { background: var(--brand); color: #fff; padding: 9px 13px; border-radius: 12px 12px 2px 12px; display: inline-block; margin: 0; }
.from-system .chat-text { background: #f1f3f4; color: var(--ink); border-radius: 2px 12px 12px 12px; }
.response-group { display: flex; flex-direction: column; gap: 10px; }
.response-group p { margin: 0 0 2px; font-size: 13px; }
.type-tag { margin-top: 6px; font-size: 10px; color: var(--ink-soft); letter-spacing: .05em; }
.text-response { background: #f1f3f4; padding: 9px 13px; border-radius: 2px 12px 12px 12px; margin: 0; font-size: 13px; }
.chat-trace { padding: 8px 16px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--ink-soft); letter-spacing: .02em; }
.chat-form { display: flex; border-top: 1px solid var(--line); }
.chat-input { flex: 1; border: 0; padding: 14px 16px; font-size: 14px; outline: none; }
.confirm-buttons { display: flex; gap: 8px; }

/* Owner desk */
.owner-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-label { font-size: 12px; color: var(--ink-soft); }
.stat-value { font-size: 20px; font-weight: 750; margin: 2px 0; }
.stat-trend { font-size: 12px; color: var(--ok); }
.owner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.risk-li { color: var(--danger); }

/* Setup workspace */
.setup-workspace { display: flex; flex-direction: column; gap: 18px; }
.setup-progress { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.setup-progress-head { display: flex; justify-content: space-between; align-items: center; }
.progress-pct { font-weight: 750; font-size: 18px; color: var(--brand); }
.progress-bar { height: 8px; background: #ececec; border-radius: 999px; margin: 10px 0 14px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.setup-step { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; background: #fafafa; }
.setup-step.current { border-color: var(--brand); background: var(--brand-soft); }
.step-no { font-weight: 750; color: var(--brand); }
.step-label { flex: 1; }
.setup-step-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.step-hint { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-soft); }
.form-field input, .form-field textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.form-note { font-size: 11px; color: var(--warn); }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.goal-label { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.goal-value { font-weight: 650; margin: 4px 0; }
.goal-target { font-size: 12px; color: var(--ink-soft); }
.framework-list { display: flex; flex-direction: column; gap: 8px; }
.framework-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.framework-key { color: var(--ink-soft); font-size: 11px; }
.framework-rename { margin-left: auto; font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; width: 180px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.table th { background: #fafafa; font-size: 12px; color: var(--ink-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: #fff; }
.chip-row .chip { background: #fafafa; }
.classify-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.data-asset .card-title { margin-bottom: 6px; }
.asset-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.intake-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.intake-btn { justify-content: center; padding: 14px; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone-icon { font-size: 26px; }
.dropzone-title { font-weight: 650; margin: 6px 0 2px; }
.dropzone-types { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }

/* Wizard */
.wizard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.wizard-phases { display: flex; gap: 4px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.phase-tab { padding: 8px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fafafa; font-size: 12px; font-weight: 650; cursor: pointer; color: var(--ink-soft); }
.phase-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.wizard-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.gate-card { border-left: 4px solid var(--brand); }
.gate-no { font-weight: 750; color: var(--brand); font-size: 12px; }
.gate-question { font-size: 13px; margin: 4px 0 0; color: var(--ink-soft); }
.placeholder-block { padding: 30px; text-align: center; color: var(--ink-soft); }
.ai-asset-card p { font-size: 13px; color: var(--ink-soft); margin: 4px 0 8px; }

/* ============ One-page: communication zone (mục 07-10) ============ */
.comm-zone { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ctx-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 34px; }
.ctx-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft);
  color: var(--brand); border: 1px solid #c6cdf5; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.ctx-clear { border: 0; background: transparent; color: var(--brand); font-size: 14px; cursor: pointer; padding: 0 2px; }
.ctx-hint { font-size: 11px; color: var(--ink-soft); }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chat-message { display: flex; gap: 8px; }
.chat-message.from-user { flex-direction: row-reverse; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.from-user .chat-avatar { background: var(--brand); color: #fff; }
.from-system .chat-avatar { background: #e8eaed; color: var(--ink-soft); }
.chat-bubble { max-width: 84%; min-width: 0; }
.chat-sender { font-size: 11px; color: var(--ink-soft); margin-bottom: 2px; }
.from-user .chat-bubble { text-align: right; }
.chat-text { background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 12px 12px 2px 12px; display: inline-block; margin: 0; font-size: 13px; }
.from-system .chat-text { background: #f1f3f4; color: var(--ink); border-radius: 2px 12px 12px 12px; }
.response-group { display: flex; flex-direction: column; gap: 8px; }
.response-group p { margin: 0 0 2px; font-size: 13px; }
.type-tag { margin-top: 4px; font-size: 10px; color: var(--ink-soft); letter-spacing: .05em; }
.text-response { background: #f1f3f4; padding: 8px 12px; border-radius: 2px 12px 12px 12px; margin: 0; font-size: 13px; }
.chat-trace { padding: 6px 14px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--ink-soft); letter-spacing: .02em; }
.chat-form { display: flex; border-top: 1px solid var(--line); }
.chat-input { flex: 1; border: 0; padding: 12px 14px; font-size: 14px; outline: none; min-width: 0; }
.btn-send { border-radius: 0; }
.confirm-buttons { display: flex; gap: 8px; }
.chat-mock-note { font-size: 11px; color: var(--warn); }

/* Context action buttons (mục 09) */
.card-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.btn-context {
  font-size: 11px; padding: 5px 10px; border-radius: 999px; font-weight: 700;
  background: var(--brand-soft); color: var(--brand); border: 1px solid #c6cdf5; cursor: pointer;
}
.btn-context:hover { background: var(--brand); color: #fff; }

/* Payment / customer cards */
.payment-card .kpi-value-row { margin-top: 4px; }
.customer-meta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* Phase 7: Business Builder */
.bb-intake { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.form-input, .form-textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.form-textarea { resize: vertical; }
.bb-result { background: var(--brand-soft); border: 1px solid #c6cdf5; border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.bb-step { padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; margin: 4px 0; font-size: 13px; }
.bb-list { display: flex; flex-direction: column; gap: 6px; }
.bb-process-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Phase 5: Connector setup */
.connector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 14px; }
.connector-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.connector-card.status-connected { border-left: 4px solid var(--ok); }
.connector-card.status-configured { border-left: 4px solid var(--info); }
.connector-card.status-not-configured { border-left: 4px solid var(--line); }
.connector-card.status-degraded, .connector-card.status-failed { border-left: 4px solid var(--warn); }
.connector-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.connector-name { font-weight: 650; font-size: 13px; }
.connector-code { font-size: 11px; color: var(--ink-soft); }
.connector-meta { font-size: 11px; color: var(--ink-soft); margin: 6px 0; }
.connector-caps { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.connector-caps .chip { font-size: 10px; padding: 2px 6px; }
.connector-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Phase 6 — AI Automation & Reports */
.btn-ok { background: #1a7f37; color: #fff; border-color: #1a7f37; }
.btn-danger { background: #cf222e; color: #fff; border-color: #cf222e; }
.run-card { display: flex; flex-direction: column; gap: 6px; }
.run-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.run-meta { color: var(--muted, #667); font-size: 12px; margin: 0; }
.run-steps { font-size: 12px; color: #334; margin: 0; }
.status-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef; }
.status-chip.approval_required { background: #fff3cd; }
.status-chip.completed { background: #d4edda; }
.status-chip.failed { background: #f8d7da; }
.status-chip.partial { background: #fff3cd; }
.status-chip.rejected { background: #f8d7da; }
.step-actions { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.step-act { display: inline-flex; align-items: center; gap: 4px; }
.row-actions { display: flex; gap: 8px; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.overlay-box { background: #fff; border-radius: 12px; padding: 20px; max-width: 640px; width: 90%; max-height: 80vh; overflow: auto; }
.report-content { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.6; }

/* Phase 9 — CEO Control Tower */
.health-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.health-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f4f4f8; border: 1px solid #ddd; cursor: help; }
.issue-card { gap: 4px; }
.executive-section h4 { margin: 10px 0 6px; }
/* ============================================================
   LOGIN — SBH Tailor branding (cân giữa · tối ưu mobile)
   Đỏ chủ đạo #D12132 · Cam nhấn #FF4136 · Indigo phụ #2E3192
   ============================================================ */
.login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fdf2f3 48%, #f3f2fb 100%);
  overflow: hidden;
}
.login-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  pointer-events: none;
}
.login-bg--1 { width: 430px; height: 430px; background: #D12132; top: -130px; right: -110px; }
.login-bg--2 { width: 390px; height: 390px; background: #2E3192; bottom: -150px; left: -100px; }

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(45, 22, 28, 0.16);
  overflow: hidden;
}
.login-card::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg, #D12132 0%, #FF4136 52%, #2E3192 100%);
}

/* ---- Thương hiệu: logo CÂN GIỮA ---- */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 32px 24px 16px;
}
.login-brand__badge {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #D12132 0%, #FF4136 55%, #2E3192 145%);
  box-shadow: 0 10px 24px rgba(209, 33, 50, 0.35);
  margin: 0 auto;
}
.login-brand h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #2E3192;
  letter-spacing: 0.3px;
}
.login-sub {
  margin: 2px 0 0;
  font-size: 19px;
  color: #8a8284;
}

/* ---- Panel đăng nhập ---- */
.login-panel {
  padding: 10px 30px 32px;
}
.login-heading {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #D12132;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.login-input {
  height: 54px;
  padding: 0 18px;
  border: 1.5px solid #e5dcde;
  border-radius: 12px;
  font-size: 17px;
  color: #333333;
  background: #fcfafa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.login-input:focus {
  border-color: #D12132;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(209, 33, 50, 0.12);
}
.login-input::placeholder { color: #b5a8ab; }

.btn-login {
  width: 100%;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #D12132 0%, #FF4136 100%);
  color: #28288C;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 8px 20px rgba(209, 33, 50, 0.30);
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(209, 33, 50, 0.40);
}
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.6; cursor: wait; transform: none; }

.login-error {
  color: #D12132;
  font-size: 13px;
  margin: 0;
  line-height: 1.45;
  text-align: center;
}
.login-hint {
  font-size: 13.5px;
  color: #9a9294;
  line-height: 1.55;
  margin: 10px 0 0;
  text-align: center;
}

.login-logo {
  max-width: 190px;
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
}
/* ============================================================
   MOBILE — tối ưu màn hình nhỏ (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .login-page {
    padding: 10px;
    align-items: center;
  }
  .login-card {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(45, 22, 28, 0.14);
  }
  .login-brand {
    padding: 26px 20px 12px;
    gap: 8px;
  }
  .login-brand__badge {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    font-size: 24px;
    box-shadow: 0 8px 18px rgba(209, 33, 50, 0.3);
  }
  .login-brand h1 { font-size: 23px; }
  .login-sub { font-size: 17px; }
  .login-panel { padding: 8px 20px 26px; }
  .login-logo { max-width: 150px; }
  .login-heading { margin-bottom: 14px; letter-spacing: 2.5px; }
  .login-form { gap: 11px; }
  .login-input { height: 52px; font-size: 16px; }
  .btn-login { height: 54px; font-size: 16px; }
}
/* ============================================================
   SBH THEME — toàn bộ trang sau đăng nhập
   Đỏ #D12132 · Cam #FF4136 · Indigo #2E3192 (khớp cổng đăng nhập)
   ============================================================ */
:root {
  --brand-2: #FF4136;
  --brand-indigo: #2E3192;
  --brand-soft: #fdecee;
  --brand-indigo-soft: #f0f0fb;
  --bg: #faf8f8;
}

/* ---------- Header (context-header) ---------- */
.context-header {
  background: #ffffff;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #D12132 0%, #FF4136 50%, #2E3192 100%) 1;
  box-shadow: 0 2px 10px rgba(45, 22, 28, 0.06);
}
.ch-logo {
  background: linear-gradient(135deg, #D12132 0%, #FF4136 55%, #2E3192 145%) !important;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(209, 33, 50, 0.3);
}
.ch-name { color: #2E3192; }
.btn-setup { background: linear-gradient(135deg, #D12132, #FF4136); border-color: transparent; }
.ch-icon-btn { border-radius: 8px; }
.ch-icon-btn:hover { border-color: #D12132; color: #D12132; }
.user-avatar-sm { background: linear-gradient(135deg, #D12132, #2E3192); }

/* ---------- Zone / section titles ---------- */
.zone-head h2 {
  color: #D12132;
  padding-left: 10px;
  border-left: 4px solid #D12132;
  letter-spacing: .03em;
}
.section-title { color: #2E3192; font-weight: 700; }
.zone-sub { color: #8a8284; }

/* ---------- Nút ---------- */
.btn {
  border-radius: 10px;
  border: 1.5px solid #e5dcde;
}
.btn:hover { border-color: #D12132; color: #D12132; }
.btn-primary {
  background: linear-gradient(135deg, #D12132 0%, #FF4136 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(209, 33, 50, 0.25);
}
.btn-primary:hover { color: #fff; box-shadow: 0 6px 16px rgba(209, 33, 50, 0.35); transform: translateY(-1px); }
.btn-context { background: var(--brand-soft); color: #D12132; border-color: #f2c4c9; }
.btn-context:hover { background: linear-gradient(135deg, #D12132, #FF4136); color: #fff; border-color: transparent; }
.btn-send { background: linear-gradient(135deg, #D12132, #FF4136); border-color: transparent; color: #fff; }

/* ---------- Tabs ---------- */
.tab { border-radius: 999px; }
.tab.active {
  background: linear-gradient(135deg, #D12132, #FF4136);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(209, 33, 50, 0.25);
}

/* ---------- Thẻ (card) ---------- */
.card {
  background: #fff;
  border: 1px solid #eee4e6;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(45, 22, 28, 0.05);
  transition: transform .15s, box-shadow .2s;
}
.card:hover { box-shadow: 0 6px 18px rgba(45, 22, 28, 0.10); transform: translateY(-1px); }
.work-card.prio-high { border-left: 4px solid #D12132; }
.work-card.prio-medium { border-left: 4px solid #FF4136; }
.work-card.prio-low { border-left: 4px solid #2E3192; }

/* ---------- Badge chủ ---------- */
.badge-owner { background: linear-gradient(135deg, #D12132, #FF4136); border-color: transparent; }

/* ---------- Chat ---------- */
.chat-panel { border-radius: 14px; }
.chat-head { border-bottom: 2px solid #f0e3e5; }
.chat-head h2 { color: #D12132; }
.from-user .chat-avatar { background: linear-gradient(135deg, #D12132, #FF4136); }
.from-system .chat-avatar { background: linear-gradient(135deg, #2E3192, #4b50c9); color: #fff; }
.chat-message.from-user .chat-bubble {
  background: #fdecee;
  border: 1px solid #f5d3d7;
  border-radius: 12px 12px 4px 12px;
  padding: 8px 12px;
}
.chat-message.from-system .chat-bubble {
  background: #f4f4fc;
  border: 1px solid #e0e0f5;
  border-radius: 12px 12px 12px 4px;
  padding: 8px 12px;
}
.chat-input {
  border: 1.5px solid #e5dcde;
  border-radius: 10px 0 0 10px;
}
.chat-input:focus { border-color: #D12132; box-shadow: 0 0 0 3px rgba(209, 33, 50, 0.10); }

/* ---------- Bảng ---------- */
table { border-radius: 10px; overflow: hidden; }
tbody tr:hover { background: #fdf3f4; }

/* ---------- Liên kết / highlight ---------- */
a { color: #D12132; }
mark, .hl { background: #fdecee; color: #D12132; }
.status-chip.completed { background: #e6f4ea; color: #1e7d43; }
.status-chip.partial { background: #fff4e0; color: #9a6b00; }

/* ---------- Thanh cuộn ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #e0c9cc; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #D12132; }

/* ---------- Input ---------- */
input, select, textarea {
  border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  border-color: #D12132 !important;
  box-shadow: 0 0 0 3px rgba(209, 33, 50, 0.10) !important;
}

/* ---------- KPI / WIG ---------- */
.pilot-wig { color: #2E3192; font-weight: 700; }
.summary-stat .value { color: #D12132; }
/* ============================================================
   SBH INNER DESIGN — các trang nội dung sau đăng nhập
   ============================================================ */

/* ---------- Layout tổng ---------- */
.one-page-body { gap: 0; }
.data-col { padding: 20px 22px 40px; }
.comm-col { background: #fbf9f9; }

/* ---------- Section headers ---------- */
.zone-head { margin-bottom: 16px; }
.zone-head h2 { font-size: 17px; font-weight: 800; }
.zone-sub { font-size: 12.5px; }
.section-title { font-size: 14px; margin: 18px 0 10px; letter-spacing: .02em; }

/* ---------- Thống kê (WIG) ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 6px;
}
.stat {
  background: #fff;
  border: 1px solid #eee4e6;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(45, 22, 28, 0.05);
  text-align: center;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #D12132;
  line-height: 1.15;
}
.stat-label { font-size: 12.5px; color: #8a8284; margin-top: 2px; }
.stat-trend { font-size: 11px; color: #b5a8ab; }

/* ---------- Card grid ---------- */
.card-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.card {
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(45, 22, 28, 0.06);
  border: 1px solid #eee4e6;
}
.card-head { padding: 12px 14px 6px; }
.card-title { font-weight: 700; font-size: 13.5px; color: #2E3192; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.card-foot { padding: 0 14px 12px; }

/* ---------- Work cards ---------- */
.work-card { position: relative; overflow: hidden; }
.work-card.prio-critical,
.work-card.prio-overdue { border-left: 5px solid #D12132; }
.work-card.prio-today { border-left: 5px solid #FF4136; }
.work-card.prio-upcoming { border-left: 5px solid #2E3192; }
.work-card.prio-need_approval { border-left: 5px solid #FFB100; }
.work-card .work-id { color: #b5a8ab; font-size: 11px; font-weight: 700; }
.work-card .next-action {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fdecee;
  color: #D12132;
  font-size: 11.5px;
  font-weight: 600;
}
.work-fields { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 0 0; }
.work-fields dt { color: #b5a8ab; font-size: 11px; }
.work-fields dd { margin: 0; font-size: 12.5px; color: #4a4244; }

/* ---------- KPI ---------- */
.kpi-grid { gap: 12px; }
.kpi-card { text-align: left; }
.kpi-name { font-size: 12.5px; color: #8a8284; font-weight: 600; }
.kpi-current { font-size: 26px; font-weight: 800; color: #D12132; }
.kpi-target { font-size: 12px; color: #b5a8ab; }
.kpi-meta { font-size: 11px; color: #b5a8ab; }
.kpi-card::after {
  content: '';
  display: block;
  height: 4px;
  border-radius: 99px;
  margin-top: 8px;
  background: linear-gradient(90deg, #D12132 0%, #FF4136 60%, #f0dfe1 60%);
}

/* ---------- Cảnh báo / quyết định ---------- */
.alert-card.level-critical { border-left: 5px solid #D12132; background: #fffafa; }
.alert-card.level-warning { border-left: 5px solid #FFB100; background: #fffdf7; }
.alert-card.level-info { border-left: 5px solid #2E3192; background: #fafaff; }
.approval-card { border-left: 5px solid #FF4136; }
.issue-card { border-left: 5px solid #2E3192; }
.decision-card { border-left: 5px solid #FFB100; }

/* ---------- Health ---------- */
.health-row { gap: 8px; }
.health-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #eee4e6;
  background: #fff;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(45, 22, 28, 0.05);
}

/* ---------- Báo cáo / automation ---------- */
.run-steps { color: #6a6163; }

/* ---------- Trống ---------- */
.empty {
  border: 1.5px dashed #e5dcde;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  color: #b5a8ab;
  background: #fff;
  font-size: 13px;
}

/* ---------- Chat zone ---------- */
.comm-zone { background: #fbf9f9; }
.chat-panel { border-radius: 16px; box-shadow: 0 2px 10px rgba(45,22,28,.06); }
.chat-list { padding: 18px 16px; }

/* ---------- Owner cols ---------- */
.owner-cols { grid-template-columns: 1fr 1fr; gap: 16px; }
.owner-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

/* ============================================================
   MOBILE / TABLET
   ============================================================ */
@media (max-width: 820px) {
  .data-col { padding: 14px 14px 90px; }
  .stats-row { gap: 8px; }
  .summary-stat { padding: 10px 8px; }
  .summary-stat .value { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .owner-cols { grid-template-columns: 1fr; }
  .owner-grid { grid-template-columns: 1fr; }
  .zone-head h2 { font-size: 15px; }
  .health-row { gap: 6px; }
  .health-chip { padding: 4px 9px; font-size: 11.5px; }
  .kpi-current { font-size: 22px; }
}

/* ---------- Tư duy dẫn dắt: slogan ---------- */
.ch-focus {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #28288C;
  padding: 10px 12px 6px;
  background: linear-gradient(180deg, rgba(40,40,140,0.06), rgba(40,40,140,0));
}
.ch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 20px 4px;
}
.ch-motto {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #D12132;
  letter-spacing: 0.5px;
  padding: 0 12px 10px;
}
.context-header { border-bottom: 2px solid #D12132; }
@media (max-width: 640px) {
  .ch-focus { font-size: 16px; letter-spacing: 4px; padding: 8px 10px 4px; }
  .ch-motto { font-size: 13.5px; }
  .ch-row { padding: 8px 12px 2px; }
}
.login-motto {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: #28288C;
  letter-spacing: 1px;
  text-align: center;
}
@media (max-width: 640px) {
  .login-motto { font-size: 15px; }
}
}

/* ---------- Nhớ mật khẩu ---------- */
.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #444;
  user-select: none;
  padding: 6px 2px;
}
.login-remember-input {
  width: 22px;
  height: 22px;
  accent-color: #D12132;
  cursor: pointer;
  flex: none;
}
@media (max-width: 640px) {
  .login-remember { font-size: 15px; }
}

/* ---------- Fix mobile: thẻ thống kê không tràn ngang ---------- */
@media (max-width: 820px) {
  .stats-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
  }
  .stat { min-width: 0; }
}

/* ---------- Fix mobile: số liệu không tràn ô ---------- */
@media (max-width: 820px) {
  .stat-value { font-size: 19px; letter-spacing: -0.3px; }
  .stat-value, .stat-label, .stat-trend { overflow-wrap: anywhere; word-break: break-word; }
}
