/* Alphanam Portal – Trang chủ hệ thống · 1.7
 * Cùng hệ thống thiết kế với trang Tổng quan: nền ấm, thẻ trắng viền mảnh, số liệu tabular,
 * màu dữ liệu theo ứng dụng (Data Lead cam, Sales xanh dương, Báo cáo ngày tím, Dashboard xanh ngọc). */
:root {
  --brand: #DA2128;  --brand-d: #B5161D; --brand-bg: #FDEDEE;
  --accent: #FEDC4E; --accent-bg: #FFF7D6;
  --ink: #2A2422; --ink-2: #57504C; --ink-3: #6F6762; --ink-4: #8A827D;
  --line: #E8E2DC; --line-2: #F1ECE7; --line-3: #D6CCC4;
  --bg: #F7F4F1; --soft: #FBF9F7; --seg: #EFE9E4;
  /* Màu dữ liệu */
  --c-lead: #CC6A1C;  --c-lead-bg: #FBEFE4;
  --c-sales: #2F6FDB; --c-sales-bg: #EAF1FB;
  --c-daily: #7B5CD6; --c-daily-bg: #F0ECFB;
  --c-dash: #13917A;  --c-dash-bg: #E3F4F0;
  --c-ink: #57504C;   --c-ink-bg: #F0ECE8;
  /* Trạng thái */
  --ok: #16794F;   --ok-bg: #E7F5EE;
  --warn: #8A5A00; --warn-bg: #FFF4D0; --warn-soft: #FFF8DB;
  --bad: #B5161D;  --bad-bg: #FDEDEE;
  --info: #1F4F8A; --info-bg: #EAF1FB;
  --r-s: 8px; --r-m: 10px; --r-l: 12px; --r: 16px;
  --shadow: 0 1px 2px rgba(42,36,34,.05), 0 6px 20px rgba(42,36,34,.06);
  --shadow-h: 0 2px 4px rgba(42,36,34,.06), 0 14px 32px rgba(42,36,34,.10);
  --ring: 0 0 0 2px #fff, 0 0 0 4px rgba(218,33,40,.45);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.alp {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--font); }
.alp-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.alp-main { flex: 1; padding-bottom: 48px; }

/* ---------------------------------------------------------------- Thanh trên */
.alp-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); box-shadow: inset 0 -1px 0 var(--line); }
.alp-top::before { content: ''; display: block; height: 3px; background: linear-gradient(90deg, var(--brand) 0 72%, var(--accent) 72% 100%); }
.alp-top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.alp-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.alp-brand__logo { height: 34px; width: auto; display: block; }
.alp-brand__text { display: inline-flex; font-weight: 700; letter-spacing: .14em; color: var(--brand); font-size: 17px; }
.alp-brand__sep { width: 1px; height: 24px; background: var(--line); flex: none; }
.alp-brand__sys { font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alp-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.alp-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--brand-d); font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(181,22,29,.12);
}
.alp-user__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.alp-user__txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alp-user__txt small { font-size: 12px; color: var(--ink-3); }
.alp-iconbtn {
  width: 36px; height: 36px; border-radius: var(--r-m); flex: none; margin-left: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); border: 1px solid var(--line); background: #fff; transition: .15s;
}
.alp-iconbtn svg { width: 18px; height: 18px; }
.alp-iconbtn:hover { color: var(--brand-d); border-color: #F1B9BB; background: var(--brand-bg); }

/* ---------------------------------------------------------------- Nút */
.alp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-m); border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font: 600 14px/1 var(--font);
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.alp-btn:hover { background: var(--brand-d); border-color: var(--brand-d); }
.alp-btn svg { width: 18px; height: 18px; flex: none; }
.alp-btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-3); }
.alp-btn--ghost:hover { background: #fff; border-color: var(--ink-4); color: var(--brand-d); }
.alp-btn--dark { background: var(--ink); border-color: var(--ink); }
.alp-btn--dark:hover { background: #000; border-color: #000; }
.alp-btn--block { width: 100%; }
.alp-btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.alp-btn--sm svg { width: 16px; height: 16px; }
.alp-btn:disabled { opacity: .55; cursor: default; }
.alp-btn:focus-visible, .alp-iconbtn:focus-visible, .alp-attn__it:focus-visible, .alp-sublinks a:focus-visible { outline: 0; box-shadow: var(--ring); }
.alp-link { border: 0; background: none; padding: 4px; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.alp-link:hover { color: var(--brand-d); }

/* ---------------------------------------------------------------- Đầu trang */
.alp-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding: 32px 0 20px; }
.alp-head__txt { min-width: 0; max-width: 720px; }
.alp-over { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.alp-head h1 { margin: 6px 0 4px; font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.alp-sub { margin: 0; font-size: 15px; color: var(--ink-2); }
.alp-sub b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.alp-head__act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Thông báo lỗi */
.alp-alert { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r-l); background: var(--bad-bg); color: #7E1A1F; font-size: 14px; }
.alp-alert__ic { flex: none; width: 28px; height: 28px; border-radius: 8px; background: #fff; color: var(--bad); display: inline-flex; align-items: center; justify-content: center; }
.alp-alert b { color: var(--bad); }

/* ---------------------------------------------------------------- Việc cần làm */
.alp-attn { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.alp-attn__t { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.alp-attn__t em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.alp-attn__it { flex: 1 1 220px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-l); color: var(--ink); text-decoration: none; min-width: 0; transition: filter .15s; }
a.alp-attn__it:hover { filter: brightness(.97); }
.alp-attn__it > span:last-child { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.alp-attn__it b { font-weight: 600; font-size: 13.5px; }
.alp-attn__it b + span { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alp-attn__ic { width: 32px; height: 32px; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.alp-attn__it.is-bad  { background: var(--bad-bg); }
.alp-attn__it.is-bad .alp-attn__ic, .alp-attn__it.is-bad b + span { color: var(--bad); }
.alp-attn__it.is-warn { background: var(--warn-soft); }
.alp-attn__it.is-warn .alp-attn__ic, .alp-attn__it.is-warn b + span { color: var(--warn); }
.alp-attn__it.is-info { background: var(--info-bg); }
.alp-attn__it.is-info .alp-attn__ic, .alp-attn__it.is-info b + span { color: var(--info); }
.alp-attn__it.is-ok   { background: var(--ok-bg); color: var(--ok); }
.alp-attn__it.is-ok .alp-attn__ic, .alp-attn__it.is-ok b + span { color: var(--ok); }
.alp-attn__more { align-self: center; padding: 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }

/* ---------------------------------------------------------------- Ứng dụng */
.alp-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.alp-sec h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.alp-sec span { font-size: 13px; color: var(--ink-3); }

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

.alp-card {
  --tone: var(--c-ink); --tone-bg: var(--c-ink-bg);
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.alp-card--gold   { --tone: var(--c-lead);  --tone-bg: var(--c-lead-bg);  --tone-ink: #A3510F; }
.alp-card--blue   { --tone: var(--c-sales); --tone-bg: var(--c-sales-bg); --tone-ink: #2459B8; }
.alp-card--violet { --tone: var(--c-daily); --tone-bg: var(--c-daily-bg); --tone-ink: #6446C2; }
.alp-card--green  { --tone: var(--c-dash);  --tone-bg: var(--c-dash-bg);  --tone-ink: #0D7461; }
.alp-card--slate  { --tone: var(--c-ink);   --tone-bg: var(--c-ink-bg);   --tone-ink: var(--ink); }
.alp-card--red    { --tone: #DA2128;        --tone-bg: #FDECEC;           --tone-ink: #B01A20; }
.alp-card:hover { border-color: var(--line-3); box-shadow: var(--shadow-h); transform: translateY(-2px); }
.alp-card:focus-within { box-shadow: var(--shadow-h), 0 0 0 3px rgba(218,33,40,.22); }
.alp-card__head { display: flex; align-items: center; gap: 12px; }
.alp-card__icon {
  width: 40px; height: 40px; border-radius: var(--r-m); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tone-bg, var(--c-ink-bg)); color: var(--tone, var(--c-ink));
}
.alp-card__icon svg { width: 22px; height: 22px; }
.alp-card__tt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.alp-card h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.alp-card__link { text-decoration: none; color: inherit; outline: 0; }
.alp-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.alp-card__go { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-4); transition: background .15s, color .15s, transform .15s; }
.alp-card__go svg { width: 18px; height: 18px; }
.alp-card:hover .alp-card__go { background: var(--tone-bg); color: var(--tone-ink, var(--tone)); transform: translateX(2px); }
.alp-card__desc { margin: -4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

.alp-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; background: var(--info-bg); color: var(--info); }
.alp-chip.is-ok   { background: var(--ok-bg);   color: var(--ok); }
.alp-chip.is-warn { background: var(--warn-bg); color: var(--warn); }
.alp-chip.is-bad  { background: var(--bad-bg);  color: var(--bad); }

.alp-stats { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); padding-top: 14px; border-top: 1px solid var(--line-2); }
.alp-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 14px; border-left: 1px solid var(--line-2); }
.alp-stat:first-child { padding-left: 0; border-left: 0; }
.alp-stat b { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.alp-stat span { font-size: 12px; line-height: 1.35; color: var(--ink-3); }
.alp-stat.is-txt b { font-size: 17px; letter-spacing: -.005em; }
.alp-stat.is-hot b { color: var(--bad); }
.alp-stat.is-hot span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--bad); vertical-align: 1px; }
.alp-stat.is-ok b { color: var(--ok); }

.alp-card__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.alp-card__cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tone-ink, var(--ink)); }
.alp-card__cta svg { width: 16px; height: 16px; transition: transform .15s; }
.alp-card:hover .alp-card__cta svg { transform: translateX(3px); }
.alp-sublinks { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.alp-sublinks a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); font-size: 12.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: .15s; }
.alp-sublinks a:hover { border-color: var(--line-3); color: var(--ink); background: #fff; }

/* Quản trị hệ thống: thanh lối tắt */
.alp-adm { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.alp-adm .alp-card__icon { --tone: var(--c-ink); --tone-bg: var(--c-ink-bg); }
.alp-adm__txt { flex: 1 1 260px; min-width: 0; }
.alp-adm h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.alp-adm p { margin: 0; font-size: 13px; color: var(--ink-3); }
.alp-adm__nav { display: flex; flex-wrap: wrap; gap: 8px; }

.alp-empty { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-top: 4px; }
.alp-empty h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.alp-empty p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ---------------------------------------------------------------- Khách (chưa đăng nhập) */
.alp-guest { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.alp-login { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); overflow: hidden; }
.alp-login__icon { width: 44px; height: 44px; border-radius: var(--r-l); display: inline-flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--brand); }
.alp-login h2 { margin: 14px 0 6px; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.alp-login p { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.alp-keyform { display: flex; gap: 8px; }
.alp-keyform input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: var(--r-m);
  border: 1px solid var(--line-3); background: #fff; font: inherit; font-size: 14px; color: var(--ink);
}
.alp-keyform input::placeholder { color: var(--ink-4); }
.alp-keyform input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(218,33,40,.14); }
.alp-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.alp-or::before, .alp-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.alp-preview { padding: 6px 4px; }
.alp-preview h3 { margin: 4px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.alp-prev { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.alp-prev:last-of-type { border-bottom: 0; }
.alp-prev b { font-size: 15px; font-weight: 600; }
.alp-prev p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.alp-note { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-m); background: var(--accent-bg); font-size: 13px; color: var(--warn); }
.alp-note svg { width: 16px; height: 16px; flex: none; }

/* ---------------------------------------------------------------- Chân trang */
.alp-foot { background: #fff; box-shadow: inset 0 1px 0 var(--line); }
.alp-foot .alp-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 16px; padding-bottom: 16px; font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------------- App & thông báo */
.alp-app {
  --tone: var(--brand); --tone-bg: var(--accent-bg);
  margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
}
.alp-app__head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.alp-app__head h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.alp-app__head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.alp-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.alp-row__no { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--seg); color: var(--ink-2); font-weight: 700; font-size: 12px; }
.alp-row__body b { font-size: 14px; font-weight: 600; }
.alp-row__state { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.alp-row__state b { color: var(--ink); }
.alp-row__act { display: flex; align-items: center; gap: 10px; }
.alp-ios-share { vertical-align: -3px; color: var(--c-sales); }
.alp-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; margin-right: 4px; background: var(--c-ink-bg); color: var(--c-ink); }
.alp-pill.is-ok { background: var(--ok-bg); color: var(--ok); }
.alp-pill.is-bad { background: var(--bad-bg); color: var(--bad); }
.alp-prefs { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 12px 0 2px 40px; border-top: 1px solid var(--line-2); }
.alp-prefs[hidden] { display: none; }
.alp-prefs__label { font-size: 13px; color: var(--ink-3); margin-right: 4px; }
.alp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; user-select: none; }
.alp-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.alp-check:has(input:checked) { background: #fff; border-color: #F1B9BB; }
.alp-standalone #alp-row-install { display: none; }
.alp-standalone #alp-row-push .alp-row__no { display: none; }
.alp-standalone #alp-row-push { grid-template-columns: minmax(0, 1fr) auto; }
.alp-standalone .alp-prefs { padding-left: 0; }
.alp-standalone .alp-top { padding-top: env(safe-area-inset-top); }
.alp-standalone .alp-foot { padding-bottom: env(safe-area-inset-bottom); }
.alp-login .alp-app { margin: 22px -28px -28px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #FFFDF5; }
.alp-toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: var(--r-l); background: var(--ink); color: #fff;
  font-size: 14px; box-shadow: 0 14px 36px rgba(42,36,34,.25); opacity: 0; pointer-events: none; transition: .25s; z-index: 50;
}
.alp-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.alp-toast.is-bad { background: var(--brand-d); }

/* ---------------------------------------------------------------- Màn hình vừa */
@media (max-width: 1024px) {
  .alp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .alp-guest { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Điện thoại */
@media (max-width: 720px) {
  .alp-wrap { padding: 0 16px; }
  .alp-main { padding-bottom: 32px; }
  .alp-top__in { min-height: 56px; gap: 10px; }
  .alp-brand__logo { height: 28px; }
  .alp-brand__sep, .alp-brand__sys { display: none; }
  .alp-user__txt small { display: none; }
  .alp-user__txt b { max-width: 42vw; font-size: 13.5px; }
  .alp-head { padding: 22px 0 14px; gap: 14px; }
  .alp-head h1 { font-size: 24px; line-height: 32px; }
  .alp-sub { font-size: 14px; }
  .alp-head__act, .alp-head__act .alp-btn { width: 100%; }
  .alp-attn { padding: 8px; gap: 6px; border-radius: 14px; }
  .alp-attn__t { width: 100%; padding: 4px 6px 2px; }
  .alp-attn__it { flex-basis: 100%; }
  .alp-attn__it b + span { white-space: normal; }
  .alp-sec { margin: 22px 0 10px; }
  .alp-grid, .alp-grid--1, .alp-grid--3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .alp-card { padding: 16px; gap: 12px; border-radius: 14px; }
  .alp-card:hover { transform: none; }
  .alp-stat { padding: 0 10px; }
  .alp-stat b { font-size: 21px; line-height: 28px; }
  .alp-stat.is-txt b { font-size: 16px; }
  .alp-card__foot { gap: 10px; }
  .alp-adm { padding: 16px; }
  .alp-adm__nav { width: 100%; }
  .alp-adm__nav .alp-btn { flex: 1 1 calc(50% - 4px); }
  .alp-login { padding: 22px; }
  .alp-login .alp-app { margin: 20px -22px -22px; }
  .alp-keyform { flex-direction: column; }
  .alp-keyform input { flex: none; width: 100%; }
  .alp-keyform .alp-btn { width: 100%; }
  .alp-app { padding: 16px; }
  .alp-row { grid-template-columns: 28px minmax(0, 1fr); }
  .alp-row__act { grid-column: 2; }
  .alp-row__act:empty { display: none; }
  .alp-prefs { padding-left: 0; }
  .alp-check { width: 100%; border-radius: var(--r-l); }
  .alp-standalone #alp-row-push { grid-template-columns: minmax(0, 1fr); }
  .alp-standalone #alp-row-push .alp-row__act { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .alp-card:hover { transform: none; }
}

/* ================================================================ 1.9 — Trang chủ kiểu màn hình app */
/* Lời chào + vài con số chính */
.alp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.alp-pill2 { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.alp-pill2 b { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.alp-pill2.is-info b { color: var(--info); }
.alp-pill2.is-warn { background: var(--warn-soft); border-color: #F3E3A6; } .alp-pill2.is-warn b { color: var(--warn); }
.alp-pill2.is-bad { background: var(--bad-bg); border-color: #F6CDCF; } .alp-pill2.is-bad b { color: var(--bad); }
.alp-pill2.is-ok { background: var(--ok-bg); border-color: #CBE8D9; } .alp-pill2.is-ok b { color: var(--ok); }

/* Lưới biểu tượng ứng dụng */
.alp-launch {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 26px 12px;
  margin: 6px 0 20px; padding: 28px 22px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
}
.alp-ico { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.alp-ico__sq {
  --a: #7A716C; --b: #57504C; --sh: rgba(42,36,34,.45);
  position: relative; width: 78px; height: 78px; border-radius: 23px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(150deg, var(--a) 0%, var(--b) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 6px rgba(0,0,0,.08), 0 10px 20px -10px var(--sh);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s;
}
.alp-ico__sq::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 52%); pointer-events: none; }
.alp-ico__sq svg { position: relative; width: 36px; height: 36px; stroke-width: 1.8; }
.alp-ico:hover .alp-ico__sq { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 6px rgba(0,0,0,.08), 0 16px 26px -12px var(--sh); }
.alp-ico:active .alp-ico__sq { transform: scale(.93); }
.alp-ico:focus-visible { outline: 0; } .alp-ico:focus-visible .alp-ico__sq { box-shadow: var(--ring); }
.alp-ico__t { max-width: 112px; font-size: 13.5px; font-weight: 600; line-height: 1.3; text-align: center; letter-spacing: -.005em; }
.alp-ico__b {
  position: absolute; top: -7px; right: -7px; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 13px;
  background: #F2262E; color: #fff; font: 700 12.5px/25px var(--font); font-style: normal; text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(218,33,40,.35);
}
.alp-ico__b.is-warn { background: #F08A00; box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(240,138,0,.35); }
.alp-ico__b.is-dot { min-width: 16px; width: 16px; height: 16px; padding: 0; top: -3px; right: -3px; }
.alp-tone-gold   { --a: #F4A445 !important; --b: #CC6A1C !important; --sh: rgba(204,106,28,.6) !important; }
.alp-tone-blue   { --a: #5E95F0 !important; --b: #2F6FDB !important; --sh: rgba(47,111,219,.6) !important; }
.alp-tone-violet { --a: #A08AEC !important; --b: #7B5CD6 !important; --sh: rgba(123,92,214,.6) !important; }
.alp-tone-green  { --a: #33BBA1 !important; --b: #13917A !important; --sh: rgba(19,145,122,.6) !important; }
.alp-tone-red    { --a: #F0545B !important; --b: #DA2128 !important; --sh: rgba(218,33,40,.6) !important; }
.alp-tone-teal   { --a: #44B2C9 !important; --b: #1E7F96 !important; --sh: rgba(30,127,150,.6) !important; }
.alp-tone-slate  { --a: #8A817C !important; --b: #57504C !important; }
.alp-tone-ink    { --a: #463D3A !important; --b: #231F20 !important; color: #FEDC4E !important; }

/* Việc cần làm — mỗi việc một dòng */
.alp-todo { margin: 0 0 20px; padding: 16px 16px 12px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.alp-todo h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 4px; font-size: 15px; line-height: 22px; font-weight: 600; }
.alp-todo h2 em { font-style: normal; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 12px; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.alp-todo__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.alp-todo__it { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 52px; padding: 8px 10px 8px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; transition: filter .15s; }
a.alp-todo__it:hover { filter: brightness(.97); }
.alp-todo__it b { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alp-todo__ic { width: 34px; height: 34px; border-radius: 10px; background: #fff; flex: none; display: flex; align-items: center; justify-content: center; }
.alp-todo__ic svg { width: 18px; height: 18px; }
.alp-todo__go { flex: none; color: var(--ink-4); }
.alp-todo__it.is-bad { background: var(--bad-bg); } .alp-todo__it.is-bad .alp-todo__ic { color: var(--bad); }
.alp-todo__it.is-warn { background: var(--warn-soft); } .alp-todo__it.is-warn .alp-todo__ic { color: var(--warn); }
.alp-todo__it.is-info { background: var(--info-bg); } .alp-todo__it.is-info .alp-todo__ic { color: var(--info); }
.alp-todo__it.is-ok { background: var(--ok-bg); color: var(--ok); } .alp-todo__it.is-ok .alp-todo__ic { color: var(--ok); }
.alp-todo__it.is-ok b { white-space: normal; }

/* Cài app & thông báo — một dòng, bấm để mở */
details.alp-app { padding: 0; }
.alp-app > summary.alp-app__head { list-style: none; cursor: pointer; margin: 0; padding: 14px 16px; border-radius: inherit; -webkit-tap-highlight-color: transparent; }
.alp-app > summary::-webkit-details-marker { display: none; }
.alp-app > summary .alp-card__icon { width: 38px; height: 38px; }
.alp-app__tt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.alp-app__tt b { font-size: 14.5px; font-weight: 600; }
.alp-app__st { font-size: 12.5px; color: var(--ink-3); }
.alp-app__st::before { content: "Đang kiểm tra…"; }
.alp-app[data-push="on"] .alp-app__st::before { content: "● Thông báo đang bật trên máy này"; color: var(--ok); }
.alp-app[data-push="off"] .alp-app__st::before { content: "● Chưa bật thông báo lead mới — bấm để bật"; color: var(--bad); }
.alp-app[data-push="ios-install"] .alp-app__st::before { content: "● iPhone: cài app ra màn hình chính để nhận thông báo"; color: var(--warn); }
.alp-app[data-push="denied"] .alp-app__st::before { content: "● Thông báo đang bị chặn — bấm để xem cách mở"; color: var(--bad); }
.alp-app[data-push="unsupported"] .alp-app__st::before { content: "Mở bằng Safari / Chrome để cài app và bật thông báo"; }
.alp-app[data-push="busy"] .alp-app__st::before { content: "Đang bật thông báo…"; }
.alp-app__chev { flex: none; color: var(--ink-4); transition: transform .2s; }
.alp-app[open] .alp-app__chev { transform: rotate(180deg); }
details.alp-app > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.alp-app[open] { padding-bottom: 12px; }
.alp-login details.alp-app > summary { padding: 14px 28px; }

@media (max-width: 720px) {
  .alp-head { padding: 18px 0 12px; }
  .alp-head h1 { font-size: 23px; line-height: 30px; }
  .alp-pills { gap: 6px; margin-top: 10px; }
  .alp-pill2 { padding: 5px 11px; font-size: 12.5px; } .alp-pill2 b { font-size: 14.5px; }
  .alp-launch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 4px; padding: 20px 8px 18px; border-radius: 22px; margin-bottom: 16px; }
  .alp-ico { gap: 7px; }
  .alp-ico__sq { width: 60px; height: 60px; border-radius: 17px; }
  .alp-ico__sq svg { width: 28px; height: 28px; }
  .alp-ico__t { font-size: 11.5px; max-width: 76px; }
  .alp-ico__b { min-width: 21px; height: 21px; line-height: 21px; font-size: 11px; padding: 0 6px; top: -6px; right: -6px; }
  .alp-todo { padding: 14px 10px 8px; border-radius: 20px; }
  .alp-todo h2 { margin-left: 6px; }
  .alp-todo__list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .alp-todo__it { min-height: 48px; }
  .alp-todo__it b { font-size: 13.5px; }
  details.alp-app > :not(summary) { margin-left: 12px; margin-right: 12px; }
  .alp-login details.alp-app > summary { padding: 14px 22px; }
}
@media (max-width: 360px) {
  .alp-ico__sq { width: 54px; height: 54px; border-radius: 15px; }
  .alp-ico__t { font-size: 11px; }
}
.alp-login .alp-app[data-push="checking"] .alp-app__st::before { content: "Cài app trước, rồi dán link riêng để đăng nhập trong app"; }
.alp-todo__it b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ================================================================ 1.10 — 3 ứng dụng nổi bật */
.alp-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 6px 0 14px; }
.alp-feat--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.alp-feat--1 { grid-template-columns: minmax(0, 520px); }
.alp-fc {
  --l: #F0ECE8;
  position: relative; display: flex; align-items: center; gap: 16px; min-width: 0; padding: 18px 18px 18px 18px;
  background: linear-gradient(135deg, var(--l) 0%, #fff 62%); border: 1px solid var(--line); border-radius: 22px;
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow); overflow: visible;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, border-color .18s;
}
.alp-fc:hover { transform: translateY(-2px); box-shadow: var(--shadow-h); border-color: var(--line-3); }
.alp-fc:active { transform: scale(.985); }
.alp-fc:focus-visible { outline: 0; box-shadow: var(--ring); }
.alp-fc .alp-ico__sq { width: 68px; height: 68px; border-radius: 20px; }
.alp-fc .alp-ico__sq svg { width: 32px; height: 32px; }
.alp-fc__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.alp-fc__t b { font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.alp-fc__t small { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alp-fc__go { flex: none; color: var(--ink-4); transition: transform .18s, color .18s; }
.alp-fc:hover .alp-fc__go { transform: translateX(3px); color: var(--ink-2); }
.alp-fc.alp-tone-gold   { --l: #FBEBDC; }
.alp-fc.alp-tone-blue   { --l: #E4EDFC; }
.alp-fc.alp-tone-violet { --l: #EEE8FC; }
.alp-fc.alp-tone-green  { --l: #DDF3EE; }
.alp-fc.alp-tone-red    { --l: #FDE6E7; }
.alp-fc.alp-tone-teal   { --l: #DFF1F5; }
.alp-fc.alp-tone-ink    { --l: #EEEAE6; color: var(--ink) !important; }
.alp-feat + .alp-launch { margin-top: 0; }
@media (max-width: 960px) {
  .alp-fc { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .alp-fc__go { position: absolute; top: 16px; right: 14px; }
}
@media (max-width: 720px) {
  .alp-feat { gap: 8px; margin-bottom: 12px; }
  .alp-feat--1 { grid-template-columns: minmax(0, 1fr); }
  .alp-fc { align-items: center; text-align: center; gap: 9px; padding: 14px 6px 12px; border-radius: 20px; background: linear-gradient(180deg, var(--l) 0%, #fff 70%); }
  .alp-fc .alp-ico__sq { width: 58px; height: 58px; border-radius: 17px; }
  .alp-fc .alp-ico__sq svg { width: 28px; height: 28px; }
  .alp-fc__t b { font-size: 13px; }
  .alp-fc__t small { font-size: 11px; }
  .alp-fc__go { display: none; }
  .alp-feat--1 .alp-fc, .alp-feat--2 .alp-fc { flex-direction: row; text-align: left; padding: 14px; gap: 12px; }
  .alp-feat--1 .alp-fc__go, .alp-feat--2 .alp-fc__go { display: block; position: static; }
  .alp-feat--2 { grid-template-columns: minmax(0, 1fr); }
}

.alp-tone-yellow { --a: #FFE07A !important; --b: #F2B705 !important; --sh: rgba(214,160,0,.55) !important; color: #5C3D00 !important; }
.alp-fc.alp-tone-yellow { --l: #FFF4C7; color: var(--ink) !important; }
.alp-fc__t small span + span::before { content: " · "; }
@media (max-width: 720px) {
  .alp-feat--3 .alp-fc__t small span + span { display: none; }
}
