/* VIH – Lịch công tác & Giao việc · bản 5 (25/10/2026)
   Thiết kế theo taste-skill cho app screen, style "editorial-greeting" (seed 80450707), giữ màu và phông thương hiệu:
   - màu nhấn duy nhất là xanh #003adb của nút trên web chính innovation247.net: chỉ trên dữ liệu và một hành động chính;
     đỏ thương hiệu nằm ở logo; đỏ --bad chỉ cho việc quá hạn / lỗi;
   - khung trung tính (thanh bên, thanh trên một tông xám nhạt), nội dung trên tờ trắng; khối là mảng tông nhạt, không bóng;
   - một họ chữ: Be Vietnam Pro (thiết kế cho tiếng Việt, lưu trong fonts/, giấy phép OFL); số dạng tabular;
   - chuyển động là phản hồi: bấm, rê chuột, hộp thoại, vạch chọn; tắt khi người dùng chọn giảm chuyển động. */

@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/bvp-400-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/bvp-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/bvp-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/bvp-500-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/bvp-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/bvp-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/bvp-600-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/bvp-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/bvp-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/bvp-700-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/bvp-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/bvp-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --chrome: #f4f5f6;          /* thanh bên, thanh trên */
  --sheet: #ffffff;           /* tờ nội dung */
  --panel: #f5f6f7;           /* khối tông nhạt trên tờ trắng */
  --card: #ffffff;            /* thẻ hàng trong khối */
  --raised: #fafafa;
  --active: #e8eaed;          /* mục đang chọn: viên xám trung tính */
  --hover: #f0f2f4;
  --border: #e6e8eb;
  --rule: #eff1f3;
  --control: #d1d5db;
  --ink: #15181c;
  --muted: #5d636b;
  --faint: #6b6b6b;
  --accent: #003adb;          /* xanh nút của web chính */
  --accent-ink: #ffffff;
  --accent-soft: #e9efff;
  --accent-line: #b9cbfb;
  --ok: #247b50;  --ok-soft: #dcf5e6;  --ok-ink: #0d3d24;
  --bad: #c4242a; --bad-soft: #ffedea; --bad-ink: #831c1e;
  --warn: #92400e; --warn-soft: #fff7e0; --warn-line: #fde68a;
  --info: #0a43cf; --info-soft: #e9efff;
  --brand: #c84938;           /* chỉ trong logo, biểu tượng app */
  --scrim: rgba(15, 18, 22, .46);
  --float: 0 12px 32px rgba(15, 18, 22, .16), 0 2px 6px rgba(15, 18, 22, .06);   /* chỉ cho thứ nổi: hộp thoại, thông báo nổi */
  --r-panel: 16px; --r-card: 12px; --r-control: 10px;
  --gap: 16px;
  --tabbar-h: 64px;
  --topbar-h: 56px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-exit: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  --t-press: 140ms; --t-hover: 180ms; --t-ui: 240ms;
  color-scheme: light;
  /* tên cũ vẫn được một số chỗ dùng */
  --bg: var(--sheet); --surface: var(--card); --surface-2: var(--panel); --line: var(--border); --mute-soft: var(--active);
  --brand-soft: var(--accent-soft); --brand-ink: #fff; --today: var(--accent-soft);
}
@media (prefers-color-scheme: dark) {
  :root {
    --chrome: #000000; --sheet: #0f1011; --panel: #18191b; --card: #1f2023; --raised: #1b1c1e;
    --active: #2a2b2f; --hover: #232427; --border: #2b2c30; --rule: #222327; --control: #44464b;
    --ink: #f2f3f5; --muted: #b4b6ba; --faint: #949494;
    --accent: #6f98ff; --accent-ink: #0b0c0e; --accent-soft: #19254a; --accent-line: #34508f;
    --ok: #3fc07a; --ok-soft: #142a1d; --ok-ink: #3fc07a;
    --bad: #f0687f; --bad-soft: #2c1a20; --bad-ink: #f0687f;
    --warn: #f0b84f; --warn-soft: #2e2512; --warn-line: #5c4615;
    --info: #8fb0ff; --info-soft: #19254a;
    --scrim: rgba(0, 0, 0, .62);
    --float: 0 16px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

/* ---------- nền ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sheet); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.noscroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--info); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent-soft); color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.b { font-weight: 600; }
.bad { color: var(--bad); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.num, .tile-v, .bigscore, td.n, th.n, .ev-time, .due { font-variant-numeric: tabular-nums; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.ic.sm { width: 16px; height: 16px; }
.ic.xs { width: 14px; height: 14px; stroke-width: 2; }
.ic.fill { fill: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* màn chờ lúc mở app: tĩnh, chỉ logo trên nền khung (trạng thái tải không có hiệu ứng nhấp nháy) */
.splash { min-height: 100vh; display: grid; place-items: center; background: var(--chrome); }
.splash img { width: 210px; height: auto; padding: 8px 14px; border-radius: 14px; background: #fff; }

/* ---------- khung: điện thoại ---------- */
.app { min-height: 100vh; }
.col { min-width: 0; }
.side { display: none; }
.top { position: sticky; top: 0; z-index: 30; background: var(--chrome); }
.top-row { height: var(--topbar-h); display: flex; align-items: center; gap: 6px; padding: 0 10px 0 6px; }
.top-row .brand { margin-right: auto; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.brand-logo { display: block; height: 32px; width: auto; padding: 3px 9px; border-radius: 9px; background: #fff; border: 1px solid var(--border); flex: none; }
.brand-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; align-items: center; gap: 4px; min-width: 0; flex-shrink: 1; }
.loc-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 44vw; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--control); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 500; }
.loc-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.loc-btn .ic { color: var(--muted); }
.loc-btn.need::after { content: ""; position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: #d4a017; border: 2px solid var(--chrome); }
.icon-btn { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--hover); }
.dot-badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; line-height: 1; border: 2px solid var(--chrome); font-variant-numeric: tabular-nums; }
.avatar { width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent; overflow: hidden; }
.avatar .avt, .avatar img { display: grid; place-items: center; width: 100%; height: 100%; }
.main { max-width: 1132px; margin: 0 auto; padding: 4px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }

/* tiêu đề trang: danh từ hoặc lời chào nêu điều cần biết nhất; hành động chính bên phải */
.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; padding: 16px 0 20px; }
.tr-t { min-width: 0; flex: 1 1 320px; }
.title-row h1 { font-size: 22px; overflow-wrap: anywhere; }
.title-row .sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.tr-a { display: flex; flex-wrap: wrap; gap: 8px; }

/* thanh dưới: 5 điểm đến; viên xám trung tính sau icon trượt sang thẻ được chọn */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sheet); border-top: 1px solid var(--border); }
.tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 500; -webkit-tap-highlight-color: transparent; }
.tab-ic { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: transform var(--t-press) var(--ease-out); }
.tab:active .tab-ic { transform: scale(.92); }
.tab.on { color: var(--ink); font-weight: 600; }
.tab.on .ic { stroke-width: 2.1; }
.tab .dot-badge { top: -4px; right: 6px; border-color: var(--sheet); }
.tab-chi { position: absolute; z-index: 0; top: 9px; left: calc(100% / var(--n) * var(--i)); width: calc(100% / var(--n)); height: 30px; pointer-events: none; }
.tab-chi::after { content: ""; position: absolute; left: 50%; top: 0; width: 56px; height: 30px; margin-left: -28px; border-radius: 999px; background: var(--active); }
.tab-chi.truot { animation: chi-truot 380ms var(--ease-in-out) both; }
@keyframes chi-truot { from { transform: translateX(calc((var(--tu) - var(--i)) * 100%)); } }

/* ---------- khung: máy tính – khung xám chữ L, nội dung trên tờ trắng lõm 8px ---------- */
@media (min-width: 900px) {
  body { background: var(--chrome); }
  .app { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 12px; background: var(--chrome); overflow-y: auto; }
  .side .brand { flex-direction: column; align-items: flex-start; gap: 8px; padding: 2px 8px 20px; }
  .side .brand-logo { height: 46px; padding: 5px 12px; border-radius: 12px; }
  .side .brand-t { font-size: 13px; font-weight: 500; color: var(--muted); white-space: normal; line-height: 1.3; }
  .side-nav { display: grid; gap: 2px; }
  .side .tab { flex-direction: row; justify-content: flex-start; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
  .side .tab:hover { background: var(--hover); color: var(--ink); }
  .side .tab.on { background: var(--active); color: var(--ink); font-weight: 600; }
  .side .tab-ic { width: auto; height: auto; position: static; }
  .side .tab .dot-badge { position: static; margin-left: auto; border: 0; }
  .side .tab-ic .dot-badge { display: none; }
  .side .tab .ic { width: 18px; height: 18px; }
  .tabbar, .menu-btn, .top-row .brand { display: none; }
  .top { background: var(--chrome); }
  .top-row { justify-content: flex-end; height: 52px; padding: 0 20px 0 0; }
  .top-r { gap: 6px; }
  .loc-btn { max-width: 340px; }
  .dot-badge { border-color: var(--chrome); }
  .col { display: flex; flex-direction: column; min-height: 100vh; }
  .main { flex: 1; width: calc(100% - 8px); max-width: none; margin: 0 8px 8px 0; padding: 8px 40px 48px; background: var(--sheet); border: 1px solid var(--border); border-radius: 16px; }
  .main > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
  .title-row { padding: 28px 0 24px; }
  .title-row h1 { font-size: 24px; }
  .actionbar { bottom: 16px; }
  #toast { bottom: 28px; }
}

/* ---------- khối, thẻ, lưới ---------- */
.card { background: var(--panel); border-radius: var(--r-panel); padding: 18px; }
.panel { background: var(--panel); border-radius: var(--r-panel); padding: 18px 18px 14px; min-width: 0; }
.panel .card, .panel .quote-card, .panel .bday-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; }
.panel .card + .card { margin-top: 8px; }
.main > .card, .main > section.card { margin-bottom: 12px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.section { margin-top: 20px; }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.section-h h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.section-h h2 .ic { color: var(--muted); width: 18px; height: 18px; }
.section-h > a { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--info); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--active); color: var(--ink); font-size: 12px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-size: 13px; color: var(--muted); }
.eyebrow-ic { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero:empty { display: none; }
.hero h1 { overflow-wrap: anywhere; }
.grid-2 { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.split-2 { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .split-2 { grid-template-columns: 300px 1fr; align-items: start; } }
.pad0 { padding: 0; overflow: hidden; }

/* ô đếm trang Hôm nay: 2 cột trên điện thoại, 4 ô một hàng trên máy tính */
.tiles { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: var(--gap); }
@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tiles > * { grid-column: span 3; }
}
.tile { display: flex; flex-direction: column; min-height: 112px; padding: 14px 16px; border-radius: var(--r-panel); background: var(--panel); color: var(--ink); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
a.tile:hover { background: var(--hover); }
a.tile:active { transform: scale(.985); }
.tile-l { font-size: 13px; font-weight: 500; color: var(--muted); }
.tile-v { font-size: 30px; line-height: 1.15; font-weight: 400; letter-spacing: -0.02em; margin: 6px 0 auto; }
.tile-v.bad { color: var(--bad); }
.tile-c { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* dải giờ trong ngày của Chủ tịch: dấu ấn riêng của app */
.ds { margin: 2px 0 6px; }
.ds-track { position: relative; height: 34px; border-radius: 9px; background: var(--card); border: 1px solid var(--border); }
.ds-ev { position: absolute; top: 4px; bottom: 4px; min-width: 6px; border: 0; padding: 0; border-radius: 6px; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.ds-ev:hover { background: var(--accent-line); }
.ds-ev:active { transform: scaleY(.9); }
.ds-ev.busy { background: var(--active); box-shadow: inset 3px 0 0 var(--control); cursor: default; }
.ds-now { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1.5px solid var(--accent); }
.ds-now b { position: absolute; top: -20px; left: 0; transform: translateX(-50%); padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ds-ticks { position: relative; height: 18px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.ds-ticks span { position: absolute; transform: translateX(-50%); }
.ds-ticks span:first-child { transform: none; }
.evlist { margin-top: 6px; }
.evrow { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.evlist .evrow:first-child { border-top: 0; }
.ev-t { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.ev-t b { font-weight: 600; font-size: 14px; }
.ev-t span { color: var(--muted); }
.evrow.now .ev-t b { color: var(--accent); }
.evrow.busy .ev-t { color: var(--muted); }
.ev-c { min-width: 0; }
.ev-c .copy-btn { margin-top: 6px; }
.t-time { color: var(--accent); font-weight: 600; }
.loc-mini { margin-top: 2px; color: var(--muted); }
.loc-mini a { font-weight: 600; }

/* vị trí hôm nay (cấp 2, 3) */
.loc-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: var(--gap); border-radius: var(--r-panel); background: var(--panel); }
.loc-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--card); border: 1px solid var(--border); color: var(--ink); }
.loc-ic .ic { width: 20px; height: 20px; }

/* thẻ thiết lập máy (cài app, bật thông báo): gọn, không viền màu */
.app-ic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--brand); font-weight: 700; }
.app-ic.sm { width: 40px; height: 40px; border-radius: 12px; }
.app-ic .ic, .app-ic.sm .ic { width: 55%; height: 55%; stroke-width: 1.8; }

/* ---------- nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--control); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); border-color: transparent; }
.btn.accent, .btn.pink { background: var(--card); border-color: var(--control); color: var(--accent); font-weight: 600; }
.btn.outline, .btn.outline-pink { background: transparent; border-color: var(--control); color: var(--ink); }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 45%, var(--control)); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--info); padding: 6px 10px; min-height: 34px; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.btn.xs { min-height: 0; padding: 2px 9px; font-size: 12.5px; }
.btn.big { min-height: 48px; font-size: 15px; padding: 10px 20px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.loc-card .btn.primary, .card .btn.primary.sm { background: var(--card); border-color: var(--control); color: var(--accent); }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 12px; }

/* ---------- nhãn, chấm trạng thái ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--active); color: var(--muted); }
.chip .ic { width: 13px; height: 13px; }
.chip.ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad-ink); }
.chip.info, .chip.accent { background: var(--info-soft); color: var(--info); }
.chip.dark { background: var(--ink); color: var(--sheet); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: #9aa1aa; }
.dot.on { background: #2f9e6a; } .dot.away { background: #d4a017; } .dot.meet { background: #d9482b; } .dot.off { background: #9aa1aa; }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.av { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--h, 210) 62% 91%); color: hsl(var(--h, 210) 42% 28%); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.avt { background: hsl(var(--h, 210) 62% 91%); color: hsl(var(--h, 210) 42% 28%); font-size: 13px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .av, .avt { background: hsl(var(--h, 210) 30% 24%); color: hsl(var(--h, 210) 70% 84%); } }
img.av-img { object-fit: cover; }
.av-wrap { position: relative; flex: none; display: inline-block; line-height: 0; }
.av-wrap .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--card); }
.empty { padding: 14px 16px; color: var(--muted); font-size: 14px; text-align: center; border: 1px dashed var(--control); border-radius: var(--r-card); }
.empty-line { color: var(--muted); font-size: 14px; padding: 4px 0 8px; }
.empty-ok { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 4px 0 8px; }
.empty-ok .ic { color: var(--ok); }

/* ---------- thanh công cụ, tab ---------- */
.seg { display: inline-flex; gap: 2px; max-width: 100%; overflow-x: auto; padding: 3px; border-radius: 999px; background: var(--active); scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button { flex: none; border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.seg .on { background: var(--card); color: var(--ink); font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { min-height: 36px; width: auto; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--control); background: var(--card); font-size: 13px; font-weight: 500; color: var(--ink); transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.pill:hover { background: var(--hover); }
.pill:active { transform: scale(.97); }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--sheet); font-weight: 600; }
.pill.pinned { border-color: var(--accent-line); }

/* ---------- lịch tuần ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.week-title { font-weight: 600; text-align: center; flex: 1; min-width: 200px; }
.day { background: var(--panel); border-radius: var(--r-panel); overflow: hidden; margin-bottom: 12px; }
.day.today { box-shadow: inset 3px 0 0 var(--accent); }
.day-h { padding: 12px 16px 8px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.day-b { display: grid; padding: 0 8px 8px; gap: 8px; }
.sess { padding: 8px; min-width: 0; }
.sess-l { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
@media (min-width: 760px) { .day-b { grid-template-columns: 1fr 1fr; } }
.ev { position: relative; padding: 12px 12px 12px 14px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); }
.ev + .ev { margin-top: 8px; }
.ev.busy { box-shadow: inset 3px 0 0 var(--control); color: var(--muted); }
.ev.now { border-color: var(--accent-line); }
.ev-time { font-weight: 600; font-size: 13px; color: var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-title { font-weight: 600; margin: 2px 0 6px; }
.ev-title.linkish { margin: 2px 0 6px; padding-right: 64px; }
.ev-meta { font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.ev-meta b { color: var(--ink); font-weight: 500; }
.ev-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.loc-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.loc-line .val { min-width: 0; overflow-wrap: anywhere; }
.loc-line .copy-btn { flex: none; }
.copy-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); font-size: 12.5px; font-weight: 500; color: var(--info); transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
a.copy-btn { text-decoration: none; }
.copy-btn:hover { background: var(--info-soft); }
.copy-btn.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); background: var(--ok-soft); }
.copy-btn b { font-weight: 700; font-size: 14px; line-height: 1; }
.linkbox { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--card); margin-top: 6px; }
.linkbox .val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* ---------- danh sách việc, người ---------- */
.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--border); color: inherit; text-align: left;
  transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
a.item:hover, button.item:hover { border-color: var(--control); background: var(--raised); }
a.item:active, button.item:active { transform: scale(.992); }
.item.over { box-shadow: inset 3px 0 0 var(--bad); }
.item.secret { box-shadow: inset 3px 0 0 var(--ink); }
.item-t { font-weight: 600; overflow-wrap: anywhere; line-height: 1.4; }
.item-s { font-size: 13px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.item .meta-r { text-align: right; display: grid; gap: 4px; justify-items: end; flex: none; }
.due { font-size: 12.5px; }
.due.bad { color: var(--bad); font-weight: 600; }
.progress { height: 6px; background: var(--active); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
details.item { display: block; }
details.item summary, .bulletin summary { cursor: pointer; }
details.grp { border-top: 1px solid var(--rule); }
details.grp:first-of-type { border-top: 0; }
details.grp summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; font-size: 14px; font-weight: 500; }
details.grp summary span { display: inline-flex; align-items: center; gap: 8px; }
details.grp summary .ic { color: var(--muted); }
details.grp summary::-webkit-details-marker { display: none; }
details.grp .list { padding-bottom: 12px; }
.panel details.grp .item { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
.kv-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink); font-size: 15px; }
.kv-row span { display: inline-flex; align-items: center; gap: 6px; }
.kv-row b.bad { color: var(--bad); }

.detail-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.kv { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (min-width: 560px) { .kv { grid-template-columns: 1fr 1fr; } }
.kv > div { min-width: 0; }
.kv label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.vis-note { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-control); background: var(--info-soft); color: var(--info); font-size: 13px; }
.vis-note.secret { background: var(--active); color: var(--ink); }
.actionbar { position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding: 10px; border-radius: var(--r-panel); background: var(--sheet); border: 1px solid var(--border); box-shadow: var(--float); }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check.done span { text-decoration: line-through; color: var(--muted); }
.cm { display: flex; gap: 10px; margin-top: 12px; }
.cm .bubble { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; min-width: 0; overflow-wrap: anywhere; }
.bubble.urgent { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
.stars { display: inline-flex; gap: 1px; color: #d99a00; vertical-align: -2px; }
.stars .ic { width: 15px; height: 15px; stroke-width: 1.6; }
.stars .off { display: inline-flex; gap: 1px; color: var(--control); }
.mention { background: var(--accent-soft); color: var(--info); border-radius: 6px; padding: 0 4px; font-weight: 500; }
.log-item { font-size: 13px; color: var(--muted); padding: 6px 0 6px 12px; border-left: 2px solid var(--border); margin-top: 8px; }
.log-item span { font-weight: 600; margin-right: 4px; color: var(--ink); }
.strip { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; background: var(--panel); border-radius: var(--r-control); margin-bottom: 6px; font-size: 13px; }
.strip span { display: inline-flex; align-items: center; gap: 6px; }
.file { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.comp-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.comp-box > input[type=text] { margin-top: 0; }
.mention-box { margin-top: 8px; }
.mention-box summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--info); }
.linkish { border: 0; background: transparent; padding: 0; text-align: left; font-weight: 600; color: var(--ink); display: block; }
.linkish:hover { color: var(--info); }
.linkish.inline { display: inline; font-weight: 600; }

.person { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; width: 100%; padding: 12px 14px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--border); text-align: left; transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.person[role=button] { cursor: pointer; }
.person:hover { border-color: var(--control); background: var(--raised); }
.person:active { transform: scale(.995); }
.person .meta-r { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; padding-left: 46px; align-items: center; }
@media (min-width: 700px) { .person { flex-wrap: nowrap; align-items: center; } .person .meta-r { flex-basis: auto; display: grid; justify-items: end; text-align: right; padding-left: 0; } }
.person.sub { margin-left: 24px; width: calc(100% - 24px); }
.person .nm { font-weight: 600; }
.where { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; font-size: 13px; color: var(--muted); }
.where.miss { color: var(--bad); font-weight: 600; }

/* bảng: chữ thường, không dải nền đầu bảng, số canh phải */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
th { font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom-color: var(--border); }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; }
td.n.ok { color: var(--ok); }
td.n.bad { color: var(--bad); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--raised); }
.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-weight: 600; }
.grade.A { background: var(--ok-soft); color: var(--ok-ink); } .grade.B { background: var(--info-soft); color: var(--info); }
.grade.C { background: var(--warn-soft); color: var(--warn); } .grade.D { background: var(--bad-soft); color: var(--bad-ink); }
.bigscore { font-size: 32px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- tin nhắn ---------- */
.chat { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .chat.split { grid-template-columns: 320px 1fr; align-items: start; } }
.chat .item { align-items: center; }
.msgs { display: flex; flex-direction: column; gap: 8px; min-height: 240px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg.urgent { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
.msg time { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.banner { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-control); background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); font-size: 13px; font-weight: 500; }
.composer { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.composer input[type=text] { flex: 1; margin-top: 0; }

/* ---------- biểu mẫu ---------- */
.f { display: block; margin-top: 14px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.f:first-child { margin-top: 0; }
input[type=text], input[type=url], input[type=date], input[type=time], input[type=datetime-local], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 42px; margin-top: 6px; padding: 9px 12px; background: var(--card); border: 1px solid var(--control); border-radius: var(--r-control); color: var(--ink); font-size: 15px;
  transition: border-color var(--t-hover) ease, box-shadow var(--t-hover) ease; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 84px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.input-copy { display: flex; gap: 8px; align-items: flex-start; }
.input-copy input { flex: 1; }
.input-copy .copy-btn { margin-top: 6px; min-height: 42px; padding: 0 12px; }
.hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); margin-top: 12px; font-weight: 500; font-size: 14px; color: var(--ink); }
.switch input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; flex: none; border-radius: 12px; background: var(--control); position: relative; cursor: pointer; transition: background-color var(--t-ui) var(--ease-out); }
.switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--t-ui) var(--ease-out); }
.switch input[type=checkbox]:checked { background: var(--ok); }
.switch input[type=checkbox]:checked::after { transform: translateX(16px); }
.prefs th, .prefs td { padding: 8px; }
.prefs .c { text-align: center; width: 56px; }
.prefs input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.perm-grid { display: grid; gap: 2px 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 10px; }
.perm-box { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
.form-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr auto; align-items: end; } }
.set-grid { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .set-grid { grid-template-columns: 1fr 1fr; } }
.set-grp h3 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.list-h { padding: 12px 16px; font-weight: 600; border-bottom: 1px solid var(--rule); }
.list-row { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--rule); background: transparent; padding: 12px 16px; font-size: 14.5px; color: var(--ink); transition: background-color var(--t-hover) ease; }
.list-row:hover { background: var(--hover); }
.list-row.on { background: var(--active); font-weight: 600; }
.list-row.add { color: var(--info); font-weight: 600; }
.mail-body { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; margin: 8px 0 0; padding: 12px; background: var(--card); border-radius: var(--r-control); border: 1px solid var(--border); }
.blt { margin: 4px 0 8px; padding-left: 20px; font-size: 14px; }
.avatar-lg { flex: none; }

/* ---------- hộp thoại (sheet) ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; display: none; }
#sheet.open { display: block; }
#sheet.dong { pointer-events: none; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: hien var(--t-ui) ease both; }
#sheet.dong .scrim { animation: an 190ms ease both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--sheet); border-radius: 22px 22px 0 0; padding: 0 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--float); animation: truot-len 380ms var(--ease-out) both; }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--control); }
#sheet.dong .sheet { animation: truot-xuong 190ms var(--ease-exit) both; }
@keyframes hien { from { opacity: 0; } }
@keyframes an { to { opacity: 0; } }
@keyframes truot-len { from { transform: translateY(100%); } }
@keyframes truot-xuong { to { transform: translateY(100%); } }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 580px; max-height: 88vh; border-radius: 18px; padding-bottom: 22px; transform: translate(-50%, -50%); animation: noi-len 260ms var(--ease-out) both; }
  .sheet::before { display: none; }
  .sheet.wide { width: 780px; }
  #sheet.dong .sheet { animation: chim-xuong 170ms var(--ease-exit) both; }
  @keyframes noi-len { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.97); } }
  @keyframes chim-xuong { to { opacity: 0; transform: translate(-50%, calc(-50% + 8px)) scale(.98); } }
}
.sheet-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 12px; background: var(--sheet); }
.sheet-h h2 { font-size: 18px; }
.sheet-f { display: flex; gap: 8px; margin-top: 18px; }
.sheet-f .btn { flex: 1; min-height: 44px; }
.pl { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); overflow: hidden; transition: border-color var(--t-hover) ease; }
.pl + .pl { margin-top: 6px; }
.pl-main { flex: 1; text-align: left; border: 0; background: transparent; padding: 10px 12px; display: flex; gap: 10px; align-items: center; min-width: 0; font-weight: 500; }
.pl-main .ic { color: var(--muted); }
.pl-main span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pin { border: 0; border-left: 1px solid var(--border); background: transparent; width: 44px; color: var(--muted); display: grid; place-items: center; transition: background-color var(--t-hover) ease, color var(--t-hover) ease; }
.pin.on { color: var(--accent); background: var(--accent-soft); }
.pin.del:hover { color: var(--bad); }
.where-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wt { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 8px; border: 1px solid var(--control); border-radius: var(--r-card); background: var(--card); font-size: 15px; font-weight: 500; color: var(--ink); transition: background-color var(--t-hover) ease, border-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.wt:active { transform: scale(.97); }
.wt .e { display: grid; place-items: center; line-height: 1; color: var(--muted); }
.wt.on { border-color: var(--ink); background: var(--active); box-shadow: 0 0 0 1px var(--ink); font-weight: 600; }
.wt.on .e { color: var(--ink); }
.star-pick { display: flex; gap: 4px; margin-top: 6px; }
.star-pick button { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 12px; background: transparent; line-height: 1; color: var(--control); padding: 0; transition: transform var(--t-press) var(--ease-out), color var(--t-hover) ease; }
.star-pick button:active { transform: scale(.88); }
.star-pick button.on { color: #d99a00; }
.star-pick .ic { width: 34px; height: 34px; stroke-width: 1.5; }
.score-prev { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-control); background: var(--accent-soft); color: var(--info); font-weight: 500; }
.notif { display: flex; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--rule); text-align: left; background: transparent; }
.notif .dot { margin-top: 7px; background: transparent; }
.notif.un .dot { background: var(--accent); }

#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); z-index: 80; max-width: min(92vw, 460px); padding: 11px 18px; border-radius: 14px; background: #15181c; color: #fff; font-size: 14px; font-weight: 500; text-align: center; box-shadow: var(--float); opacity: 0; pointer-events: none; transform: translate(-50%, 12px) scale(.98); transition: opacity 200ms ease, transform 280ms var(--ease-out); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-color-scheme: dark) { #toast { background: #2a2b2f; } }

/* ---------- dải thông báo trên cùng ---------- */
.strip-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; font-size: 13.5px; font-weight: 500; text-align: center; }
.strip-banner.warn { background: var(--warn-soft); color: var(--warn); }
.strip-banner.off { background: var(--ink); color: var(--sheet); }
.strip-banner.info { background: var(--info-soft); color: var(--info); }

/* ---------- đăng nhập ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--chrome); }
.login-card { width: min(420px, 100%); background: var(--sheet); border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px 22px; }
.login-card.wide { width: min(580px, 100%); }
.login-card h1 { margin: 6px 0 2px; text-align: center; font-size: 22px; }
.login-card > p.muted { text-align: center; }
.login-brand { display: block; width: 210px; max-width: 70%; height: auto; margin: 0 auto 14px; padding: 8px 14px; border-radius: 14px; background: #fff; }
.login-card a { color: var(--info); font-weight: 500; }
.hint-box { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-card); background: var(--panel); color: var(--ink); font-size: 13.5px; }
.hint-box .btn { margin-top: 8px; }
details.demo { margin-top: 14px; font-size: 13px; }
details.demo summary { cursor: pointer; font-weight: 500; color: var(--info); }
.demo-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.demo-users .btn { justify-content: flex-start; text-align: left; font-size: 13px; padding: 8px 12px; border-radius: var(--r-card); white-space: normal; }
.demo-users .btn small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- cài app, hướng dẫn ---------- */
.guide-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.card.guide { margin-bottom: 12px; }
.card.guide h3 { font-size: 16px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card.guide.mine { box-shadow: inset 0 0 0 1.5px var(--accent); }
.card.guide.warn { background: var(--warn-soft); }
ol.steps { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
ol.steps li { display: flex; gap: 10px; align-items: flex-start; }
.stepn { width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.card.soon { border: 1px dashed var(--control); background: transparent; }
.card.soon .row { gap: 10px; flex-wrap: wrap; }

/* ---------- Fun, bảng tin, ví điểm, quy trình ---------- */
.bday-card { background: var(--panel); }
.bday-card .b, .bday-card > b { display: inline-flex; align-items: center; gap: 6px; }
.bday-card .b .ic, .bday-card > b .ic { color: var(--brand); }
.quote-card blockquote { margin: 8px 0; font-size: 18px; font-style: italic; line-height: 1.5; }
.quote-line { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: baseline; margin-bottom: 12px; color: var(--ink); font-size: 14.5px; }
.quote-line > .muted { grid-column: 2; margin-top: 2px; font-size: 13px; }   /* tác giả xuống dòng dưới câu, không bị ép thành cột hẹp */
.quote-line .ic { color: var(--muted); flex: none; }
.panel .quote-line { margin-bottom: 0; }
.wishes { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); display: grid; gap: 3px; }
ol.gold { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
ol.gold li span { float: right; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.nl-body { line-height: 1.65; }
.post { margin-bottom: 12px; }
.post-t { margin: 10px 0 6px; white-space: pre-wrap; line-height: 1.55; }
.post-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin: 8px 0; }
.post-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.post-a { margin-top: 10px; gap: 6px; }
.post .comments { margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
.hidden-post { opacity: .75; border: 1px dashed var(--control); }
.img-x { padding: 0; border: 0; background: none; cursor: pointer; }
.wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--gap); }
.wallet .bigscore { margin: 8px 0; }
.flow-card { margin-bottom: 12px; }
ol.steps-l { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap); }
.step-ed { margin: 10px 0; background: var(--card); border: 1px solid var(--border); }
.side-sep { height: 1px; background: var(--border); margin: 8px 6px; }

/* ---------- chuyển trang: nội dung mới hiện mờ lên nhẹ (dưới 300ms, chỉ opacity + 6px) ---------- */
.main.vao > * { animation: vao 300ms var(--ease-out) both; }
@keyframes vao { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
@media print { .top, .tabbar, .side, .actionbar { display: none; } .main { border: 0; } }

/* ---------- lượt sửa 1 sau khi xem ảnh chụp ---------- */
/* điện thoại: thẻ việc xếp thông tin phụ (trạng thái, hạn) xuống dòng dưới để tiêu đề có đủ chiều ngang */
@media (max-width: 599px) {
  .item { flex-wrap: wrap; }
  .item .meta-r { order: 2; flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 10px; text-align: left; }
  .loc-btn { max-width: calc(100vw - 236px); }
  .top-row { padding-right: 8px; }
}
.ds { padding-top: 30px; }   /* làn riêng cho nhãn giờ "bây giờ", không đè lên tiêu đề khối */
.loc-btn span .ic { width: 16px; height: 16px; margin-right: 4px; color: var(--muted); }
@media (max-width: 599px) {
  .top-row .brand-logo { height: 28px; padding: 3px 7px; border-radius: 8px; }
  .loc-btn { max-width: min(44vw, calc(100vw - 252px)); padding: 0 10px; }
}

/* ---------- lượt sửa 2 (26/10): trang Hôm nay gọn hơn, lịch theo giờ ---------- */
/* dải "thiết lập máy này": một hàng gọn thay cho hai thẻ lớn */
.setup-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 16px; margin-bottom: var(--gap); border-radius: var(--r-panel); border: 1px solid var(--border); background: var(--card); }
.setup-bar > .ic { flex: none; color: var(--accent); }
.setup-bar .grow { min-width: 200px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.setup-bar b { font-weight: 600; font-size: 14px; }
.setup-mo { font-size: 13px; color: var(--muted); }
.setup-a { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 599px) { .setup-mo { display: none; } .setup-a { margin-left: 28px; } }

/* trang Hôm nay: máy tính 2 cột độc lập (không để khoảng trống dưới cột ngắn); điện thoại 1 cột, Cần xử lý ngay sau Lịch */
.g-today { display: flex; flex-direction: column; gap: var(--gap); margin-bottom: var(--gap); }
.g-today > .tcot { display: contents; }
.g-today .p-lich { order: 1; } .g-today .p-can { order: 2; } .g-today .p-sap { order: 3; } .g-today .p-vui { order: 4; }
@media (min-width: 900px) {
  .g-today { flex-direction: row; align-items: flex-start; }   /* flex, không dùng grid: chiều cao cột tính theo đúng bề ngang cuối cùng */
  .g-today > .tcot { display: flex; flex-direction: column; gap: var(--gap); flex: 2 1 0; min-width: 0; }
  .g-today > .tcot + .tcot { flex: 1 1 0; }
}

/* lịch theo giờ: lưới tuần, mỗi ngày một cột, khối lịch đặt đúng giờ */
.week-nav .seg { flex: none; }
.wg-wrap { overflow-x: auto; background: var(--panel); border-radius: var(--r-panel); padding: 10px 10px 12px 4px; -webkit-overflow-scrolling: touch; }
.wg { min-width: 720px; }
.wg-head, .wg-body { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr)); gap: 6px; }
.wg-head { margin-bottom: 6px; }
.wg-d { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding-left: 8px; font-size: 13px; color: var(--muted); }
.wg-d b { margin-left: 2px; font-size: 18px; font-weight: 600; color: var(--ink); }
.wg-d.today b { color: var(--accent); }
.wg-d .icon-btn { width: 32px; height: 32px; color: var(--muted); }
.wg-gio span { display: block; padding-right: 8px; text-align: right; font-size: 11px; color: var(--faint); transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.wg-col { position: relative; border-radius: 10px; background: var(--card); }
.wg-col.today { outline: 1px solid var(--accent-line); outline-offset: -1px; }
.wg-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--rule); }
.wg-line:first-child { border-top: 0; }
.wg-ev { position: absolute; box-sizing: border-box; overflow: hidden; margin: 0; padding: 4px 6px; border: 0; border-left: 2px solid var(--accent); border-radius: 7px; background: var(--accent-soft); color: var(--ink); font: inherit; font-size: 12px; line-height: 1.3; text-align: left; cursor: pointer; transition: background-color var(--t-hover) ease; }
.wg-ev:hover { background: var(--accent-line); }
.wg-ev .num { display: block; font-size: 11px; font-weight: 600; color: var(--accent); }
.wg-ev .ic { vertical-align: -2px; }
.wg-ev.qua { opacity: .55; }
.wg-ev.ngan { padding-top: 3px; padding-bottom: 0; white-space: nowrap; text-overflow: ellipsis; }   /* lịch ngắn (< 1 giờ): giờ và tên trên một dòng */
.wg-ev.ngan .num { display: inline; margin-right: 4px; }
.wg-ev.busy { background: var(--active); border-left-color: var(--control); color: var(--muted); cursor: default; }
.wg-ev.busy .num { color: var(--muted); }
.wg-now { position: absolute; left: -3px; right: 0; height: 0; border-top: 1.5px solid var(--accent); z-index: 1; }
.wg-now::before { content: ""; position: absolute; left: 0; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (max-width: 599px) { .wg-ev .den { display: none; } }   /* cột hẹp trên điện thoại: chỉ giờ bắt đầu, đủ chỗ cho tên lịch */

/* ---------- "Đang họp lúc này" (27/10): phòng / link của cuộc họp đang diễn ra ---------- */
.hop-bar { margin-bottom: var(--gap); padding: 12px 16px; border-radius: var(--r-panel); border: 1px solid var(--border); background: var(--card); }
.hop-l { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.hop-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.hop-row + .hop-row { border-top: 1px solid var(--rule); }
.hop-row .grow { min-width: 0; }
.hop-t { font-size: 15px; }
.hop-t b { font-weight: 600; }
.hop-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.hop-row .btn { flex: none; }
.hop-mini { margin-top: 2px; color: var(--accent); }
.hop-noi { font-weight: 600; color: var(--ink); }
.hop-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hop-banner .btn { flex: none; }
@media (max-width: 599px) { .hop-row { flex-wrap: wrap; } .hop-row .btn { margin-left: 22px; } }
