/* =========================================================
   ManhTool — Hẹn giờ nhắc việc
   Màu theo logo: xanh rừng đậm → xanh ngọc → xanh chanh
   ========================================================= */

:root {
  --ink: #0f2620;
  --brand-800: #0a5c44;
  --brand-700: #0e7c5a;
  --brand-500: #12b886;
  --leaf: #4cb944;
  --lime: #c4e43a;
  --grad: linear-gradient(115deg, #0e7c5a 0%, #12b886 50%, #7ccf3e 85%, #c4e43a 100%);

  --bg: #f5f8f6;
  --surface: #ffffff;
  --surface-2: #f3f7f4;
  --tint: #e9f6ef;           /* nền xanh rất nhạt khi rê chuột / chọn */
  --border: #e1ebe5;
  --border-strong: #cddcd3;
  --text: #13241f;
  --text-2: #4a5a55;
  --text-3: #7a8a84;
  --primary: #0e7c5a;
  --primary-hover: #0a5c44;
  --on-primary: #ffffff;
  --accent-text: #0e7c5a;
  --danger: #c2410c;
  --danger-bg: #fff4ee;
  --shadow: 0 1px 2px rgba(15,38,32,.04), 0 4px 16px rgba(15,38,32,.06);
  --shadow-lg: 0 24px 60px rgba(15,38,32,.2);

  --r-lg: 18px;
  --r: 12px;
  --r-sm: 9px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1613; --surface: #121e1a; --surface-2: #17251f; --tint: #173328;
    --border: #213530; --border-strong: #2d463d;
    --text: #e7f1ec; --text-2: #a8bab2; --text-3: #7b8f87;
    --primary: #12b886; --primary-hover: #34cf98; --on-primary: #04241a; --accent-text: #3dd598;
    --danger: #fb923c; --danger-bg: #2a1a10;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1613; --surface: #121e1a; --surface-2: #17251f; --tint: #173328;
  --border: #213530; --border-strong: #2d463d;
  --text: #e7f1ec; --text-2: #a8bab2; --text-3: #7b8f87;
  --primary: #12b886; --primary-hover: #34cf98; --on-primary: #04241a; --accent-text: #3dd598;
  --danger: #fb923c; --danger-bg: #2a1a10;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  color-scheme: dark;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text);
  background: var(--bg);
}
body::before {
  /* vệt sáng xanh nhẹ phía trên, lấy cảm hứng từ dải màu logo */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% -60px, rgba(196,228,58,.22), transparent 70%),
    radial-gradient(700px 320px at 10% -80px, rgba(18,184,134,.18), transparent 70%);
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent-text); }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-accent { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-link {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .9rem;
}
.header-link:hover { background: var(--tint); color: var(--accent-text); }
@media (max-width: 479px) { .header-link span { display: none; } .header-link { padding: 0; width: 38px; justify-content: center; } }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--accent-text); border-color: var(--border-strong); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 40px; padding-bottom: 28px; }
.hero h1 { font-size: clamp(1.7rem, 3.6vw + .6rem, 2.75rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.hero p { margin-top: 10px; color: var(--text-2); font-size: clamp(.98rem, .6vw + .8rem, 1.1rem); text-wrap: balance; }
@media (max-width: 559px) { .hero { padding-top: 24px; padding-bottom: 18px; } }

/* ---------- Bố cục ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1024px) { .layout { grid-template-columns: minmax(0, 1fr) 288px; gap: 24px; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* ---------- Công cụ ---------- */
.tool { padding: 16px; }
@media (min-width: 768px) { .tool { padding: 22px; } }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 760px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; }
  .task-pane { border-left: 1px solid var(--border); padding-left: 26px; }
}
@media (max-width: 759px) { .task-pane { border-top: 1px solid var(--border); padding-top: 20px; } }

/* Nút dùng chung */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: var(--r-sm); cursor: pointer;
  font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .15s, transform .1s, border-color .15s;
}
.btn-primary { color: var(--on-primary); background: var(--primary); border: 0; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active, .btn-ghost:active { transform: scale(.97); }
.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand-500); color: var(--accent-text); }

.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 12px;
  font-size: .84rem; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--tint); border-color: var(--brand-500); color: var(--accent-text); }

/* Đồng hồ tròn */
.timer-pane { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.dial { position: relative; width: min(250px, 72vw); aspect-ratio: 1; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-track { stroke: var(--surface-2); }
.ring-bar {
  stroke: var(--brand-500); stroke-linecap: round;
  stroke-dasharray: 628.32; stroke-dashoffset: 0; transition: stroke-dashoffset .3s linear, stroke .3s;
}
.timer-pane[data-status="paused"] .ring-bar { stroke: var(--text-3); }
.timer-pane[data-status="done"] .ring-bar { stroke: var(--leaf); }
.dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.time {
  font-size: clamp(2.6rem, 9vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.time.is-long { font-size: clamp(2.1rem, 7.4vw, 2.7rem); }
.time-sub { font-size: .85rem; color: var(--text-3); font-weight: 500; max-width: 80%; }
.timer-pane[data-status="paused"] .time { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* Ô đặt giờ: chỉ hiện khi chưa chạy */
.setter { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.timer-pane[data-status="running"] .setter, .timer-pane[data-status="paused"] .setter { display: none; }
.hms { display: flex; align-items: flex-start; gap: 6px; }
.hms-field { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .75rem; color: var(--text-3); }
.hms-field input {
  width: 66px; height: 48px; text-align: center; font: inherit; font-size: 1.35rem; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--text);
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--r-sm);
  -moz-appearance: textfield; appearance: textfield;
}
.hms-field input::-webkit-outer-spin-button, .hms-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hms-field input:focus { outline: none; border-color: var(--brand-500); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 15%, transparent); }
.hms-colon { font-size: 1.3rem; font-weight: 700; color: var(--text-3); line-height: 48px; }
.presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
@media (max-width: 400px) {
  .presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .presets .chip { padding: 0 4px; font-size: .8rem; }
}

/* Nút điều khiển */
.controls { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.btn-start { height: 52px; min-width: 170px; padding: 0 26px; font-size: 1.02rem; border-radius: 999px; box-shadow: 0 10px 24px -12px rgba(14,124,90,.7); }
.btn-start .ic { width: 20px; height: 20px; }
.btn-start .ic-pause { display: none; }
.timer-pane[data-status="running"] .btn-start .ic-play { display: none; }
.timer-pane[data-status="running"] .btn-start .ic-pause { display: block; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 44px; min-width: 44px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.ctl:hover:not(:disabled) { color: var(--accent-text); border-color: var(--brand-500); }
.ctl:disabled { opacity: .35; cursor: default; }
.ctl-add .ic { width: 15px; height: 15px; }
.timer-pane[data-status="idle"] .ctl-add, .timer-pane[data-status="done"] .ctl-add { visibility: hidden; }
@media (max-width: 400px) { .btn-start { min-width: 0; flex: 1; } }

/* Danh sách việc */
.task-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pane-head h2 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.pane-count { font-size: .8rem; color: var(--text-3); white-space: nowrap; }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--r); }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 4px 8px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2);
  font-size: .84rem; font-weight: 600; cursor: pointer; text-align: center; line-height: 1.25;
}
.seg button .ic { width: 16px; height: 16px; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 3px rgba(15,38,32,.12); }
@media (max-width: 380px) { .seg button .ic { display: none; } }

.task-add { display: flex; gap: 8px; }
.task-add input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-sm);
}
.task-add input::placeholder { color: var(--text-3); }
.task-add input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 15%, transparent); }
.task-add .btn-primary { padding: 0 16px; }
@media (max-width: 400px) { .task-add .btn-primary span { display: none; } .task-add .btn-primary { width: 42px; padding: 0; } }

.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: task; }
.task-item {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) 34px; align-items: center; gap: 6px;
  padding: 4px 4px 4px 8px; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-sm);
}
.task-item:focus-within { border-color: var(--brand-500); background: var(--surface); }
.task-num { counter-increment: task; font-size: .78rem; font-weight: 700; color: var(--text-3); text-align: center; }
.task-num::before { content: counter(task); }
.task-text {
  display: block; width: 100%; min-width: 0; min-height: 34px; padding: 7px 4px; resize: none; overflow: hidden;
  font: inherit; font-size: .93rem; line-height: 1.4; color: var(--text); background: transparent; border: 0; outline: none;
}
.task-del {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-3); cursor: pointer;
}
.task-del .ic { width: 16px; height: 16px; }
.task-del:hover { color: var(--danger); background: var(--danger-bg); }
.task-empty { font-size: .88rem; color: var(--text-3); padding: 14px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--r-sm); }
.task-list:not(:empty) + .task-empty { display: none; }

.templates { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.templates-label { font-size: .78rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.templates-row { display: flex; flex-wrap: wrap; gap: 6px; }
.templates-row .chip small { color: var(--text-3); font-size: .78rem; }

/* Tùy chọn */
.options { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.opt { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text-2); cursor: pointer; user-select: none; }
.opt[hidden] { display: none; }
.opt .ic { width: 16px; height: 16px; color: var(--text-3); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; width: 34px; height: 20px; flex-shrink: 0; background: var(--border-strong); border-radius: 999px; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.opt input:checked + .switch { background: var(--brand-500); }
.opt input:checked + .switch::after { transform: translateX(14px); }
.opt input:focus-visible + .switch { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.link-btn { padding: 4px 2px; border: 0; background: none; color: var(--accent-text); font-size: .84rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hộp báo hết giờ ---------- */
.done-dialog {
  width: min(94vw, 460px); max-height: 90vh; padding: 22px; border: 0; border-radius: 22px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.done-dialog[open] { animation: pop .28s cubic-bezier(.2,.9,.3,1.2); display: flex; flex-direction: column; gap: 16px; }
.done-dialog::backdrop { background: rgba(6,20,16,.6); backdrop-filter: blur(4px); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.done-head { display: flex; align-items: center; gap: 14px; }
.done-head > div { flex: 1; min-width: 0; }
.done-head h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.done-head p { font-size: .88rem; color: var(--text-3); }
.done-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--grad); color: #fff; }
.done-icon .ic { width: 26px; height: 26px; }
.done-dialog.is-ringing .done-icon .ic { animation: ring 1s ease-in-out infinite; }
.done-dialog:not(.is-ringing) #btnMute { display: none; }

#doneBody { overflow-y: auto; min-height: 0; }
.done-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.done-check {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: var(--r); font-weight: 500;
  transition: background .15s, border-color .15s;
}
.done-check:hover { border-color: var(--border-strong); }
.done-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.done-box { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--border-strong); background: var(--surface); color: transparent; transition: background .15s, border-color .15s; }
.done-box .ic { width: 14px; height: 14px; stroke-width: 3; }
.done-check input:checked ~ .done-box { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.done-check input:checked ~ .done-text { color: var(--text-3); text-decoration: line-through; }
.done-check input:focus-visible ~ .done-box { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.done-check:has(input:checked) { background: color-mix(in srgb, var(--leaf) 10%, var(--surface)); }
.done-text { min-width: 0; overflow-wrap: anywhere; }
.done-progress { margin-top: 10px; font-size: .84rem; color: var(--text-3); text-align: center; }
.done-progress.is-all { color: var(--leaf); font-weight: 700; }

.pick-card { padding: 20px 18px; border-radius: var(--r); background: var(--tint); text-align: center; }
.pick-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text); }
.pick-text { margin: 6px 0 14px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; overflow-wrap: anywhere; }
.pick-card.is-rolling .pick-text { animation: roll .35s ease; }
@keyframes roll { from { transform: translateY(8px); opacity: 0; } }
.pick-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pick-actions .done-check { background: var(--surface); padding: 8px 14px; }
.done-empty { font-size: .92rem; color: var(--text-2); }

.done-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.done-actions #btnAgain { grid-column: 1 / -1; height: 48px; }
.done-actions .btn-ghost { padding: 0 10px; }
@media (max-width: 380px) { .done-actions { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bổ sung: thống kê, toàn màn hình, tùy chọn ---------- */
.main-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.timer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.today { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-3); min-width: 0; }
.today .ic { width: 15px; height: 15px; flex: none; }
.today b { color: var(--text-2); font-weight: 700; }
.ctl-fs { gap: 6px; padding: 0 12px; }
@media (max-width: 400px) { .ctl-fs span { display: none; } .ctl-fs { padding: 0; } }

.timer-pane.is-warning .ring-bar { stroke: #f08c00; }
.timer-pane.is-warning .time { color: #e8590c; }
:root[data-theme="dark"] .timer-pane.is-warning .time { color: #ffa94d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timer-pane.is-warning .time { color: #ffa94d; } }
.round-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--accent-text); font-size: .74rem; font-weight: 700; }

.options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .options { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 28px; } }
.opt-group { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 10px 16px; min-width: 0; }
.opt-title { flex-basis: 100%; font-size: .74rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.select {
  height: 34px; padding: 0 30px 0 10px; font: inherit; font-size: .86rem; color: var(--text);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8a84' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.select:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 1px; }
.opt-select { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text-2); }
.opt-select .ic { width: 16px; height: 16px; color: var(--text-3); }
.vol { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); }
.vol .ic { width: 16px; height: 16px; }
.vol input { width: 110px; accent-color: var(--brand-500); }

/* Thẻ chọn nền */
.theme-card { padding: 16px; }
@media (min-width: 768px) { .theme-card { padding: 22px; } }
.theme-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.theme-head h2 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.theme-head p { margin-top: 2px; font-size: .88rem; color: var(--text-2); max-width: 520px; }
.theme-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .82rem; color: var(--text-3); }
.theme-note .tile-badge { font-size: .62rem; }
.theme-note[hidden] { display: none; }
@media (max-width: 559px) { .theme-head .btn-primary { width: 100%; } }

.timer-top-actions { display: flex; gap: 6px; }
.ctl[hidden] { display: none; }
.header-link[hidden] { display: none; }
.header-install { border: 0; background: var(--tint); color: var(--accent-text); cursor: pointer; font-family: inherit; }

/* Chọn kiểu: đếm 1 lần / chuỗi nhiều bước */
.mode-seg { width: 100%; }
.timer-pane[data-status="running"] .mode-seg, .timer-pane[data-status="paused"] .mode-seg { display: none; }
.timer-pane[data-mode="plan"] .setter { display: none; }
.plan-box { display: none; width: 100%; flex-direction: column; gap: 10px; }
.timer-pane[data-mode="plan"][data-status="idle"] .plan-box, .timer-pane[data-mode="plan"][data-status="done"] .plan-box { display: flex; }

/* ---------- Chế độ gọn: chỉ còn đồng hồ ở giữa trang ---------- */
.ctl-compact[aria-pressed="true"] { color: var(--accent-text); border-color: var(--brand-500); background: var(--tint); }
@media (max-width: 520px) { .ctl-compact span { display: none; } .ctl-compact { padding: 0; } }
body.is-compact .hero p, body.is-compact .task-pane, body.is-compact .options, body.is-compact .saved-card,
body.is-compact .theme-card, body.is-compact .guide, body.is-compact .brand-section, body.is-compact .side,
body.is-compact .today, body.is-compact .occasion-wrap { display: none !important; }
body.is-compact .layout { grid-template-columns: minmax(0, 1fr); }
body.is-compact .tool { max-width: 560px; margin: 0 auto; width: 100%; }
body.is-compact .tool-grid { grid-template-columns: minmax(0, 1fr); }
body.is-compact .timer-top { justify-content: flex-end; }
body.is-compact .dial { width: min(340px, 80vw); }
body.is-compact .time { font-size: clamp(3rem, 12vw, 4.4rem); }
body.is-compact .site-footer { opacity: .6; }

/* ---------- Hướng dẫn nhanh ---------- */
body.tour-open { overflow: hidden; }
.tour { position: fixed; inset: 0; z-index: 90; }
.tour[hidden] { display: none; }
.tour-spot {
  position: fixed; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(6,20,16,.62), 0 0 0 2px var(--brand-500);
  transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease;
}
.tour-card {
  position: fixed; width: min(340px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 6px; transition: top .3s ease, left .3s ease;
}
.tour-step { font-size: .74rem; font-weight: 700; color: var(--accent-text); letter-spacing: .04em; }
.tour-title { font-size: 1.05rem; font-weight: 800; }
.tour-text { font-size: .9rem; color: var(--text-2); line-height: 1.5; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.tour-nav { display: flex; gap: 6px; }
.tour-nav .btn-ghost, .tour-nav .btn-primary { height: 36px; padding: 0 14px; font-size: .86rem; }
.tour-nav [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }

/* ---------- Gợi ý nền theo ngày lễ ---------- */
.occasion-wrap:has(.occasion-hint[hidden]) { display: none; }
.occasion-hint {
  display: flex; align-items: center; gap: 12px; margin: 0 auto 16px; max-width: 760px; padding: 10px 10px 10px 14px;
  border-radius: 14px; background: linear-gradient(115deg, #fff0f6, #fff4e6); border: 1px solid #ffd8e8; color: #5c2b3d;
}
.occasion-hint[hidden] { display: none; }
.occ-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: linear-gradient(135deg, #ff8fab, #f59f00); color: #fff; }
.occ-ico .ic { width: 18px; height: 18px; }
.occ-text { flex: 1; min-width: 0; font-size: .88rem; font-weight: 500; }
.occ-try { height: 36px; padding: 0 14px; font-size: .85rem; flex: none; }
.occ-close { width: 32px; height: 32px; flex: none; background: transparent; border: 0; color: inherit; }
.occ-close .ic { width: 16px; height: 16px; }
:root[data-theme="dark"] .occasion-hint { background: #2d1b24; border-color: #4a2a38; color: #ffd8e8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .occasion-hint { background: #2d1b24; border-color: #4a2a38; color: #ffd8e8; } }
@media (max-width: 520px) { .occasion-hint { flex-wrap: wrap; } .occ-text { flex-basis: calc(100% - 90px); } .occ-try { margin-left: 46px; } }

/* Hết giờ lúc: ô gõ giờ 24h + giờ gợi ý */
.until { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding-top: 10px; border-top: 1px dashed var(--border); }
.until-head { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--text-3); cursor: pointer; }
.until-head .ic { width: 14px; height: 14px; }
.until-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.until-input {
  width: 74px; height: 34px; padding: 0 8px; text-align: center;
  font: inherit; font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--text);
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 999px; outline: none;
  transition: border-color .15s, background .15s;
}
.until-input::placeholder { color: var(--text-3); font-weight: 500; }
.until-input:focus { border-color: var(--brand-500); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 15%, transparent); }
.until-input.is-bad { border-color: var(--danger); }
.until-chip { gap: 5px; height: 34px; padding: 0 11px; font-variant-numeric: tabular-nums; }
.until-chip span { font-weight: 700; color: var(--text); }
.until-chip small { font-size: .72rem; color: var(--text-3); }
.until-chip[aria-pressed="true"] { background: var(--tint); border-color: var(--brand-500); }
.until-chip[aria-pressed="true"] span { color: var(--accent-text); }
@media (max-width: 420px) { .until-chip small { display: none; } }
/* Cột đồng hồ hẹp (điện thoại, hoặc máy tính khi chia 2 cột) → 3 gợi ý cho gọn 1 dòng */
@media (max-width: 560px), (min-width: 760px) and (max-width: 1180px) {
  .until-row > .until-chip:nth-child(n+5) { display: none; }
}

.plan-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: step; }
.plan-step {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 76px 32px; align-items: center; gap: 6px;
  padding: 4px 4px 4px 8px; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-sm);
}
.plan-step:focus-within { border-color: var(--brand-500); background: var(--surface); }
.plan-step::before { counter-increment: step; content: counter(step); font-size: .76rem; font-weight: 700; color: var(--text-3); text-align: center; }
.plan-step input { min-width: 0; height: 32px; padding: 0 6px; font: inherit; font-size: .9rem; color: var(--text); background: transparent; border: 0; outline: none; }
.plan-step .step-time { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; border-left: 1px solid var(--border); }
.plan-step .step-time.is-bad { color: var(--danger); }
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plan-row .chip .ic { width: 15px; height: 15px; }
.plan-repeat { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-2); }
.plan-repeat input { width: 58px; padding: 0 8px; background-image: none; text-align: center; }
.plan-total { font-size: .84rem; color: var(--text-3); text-align: center; }
.plan-total b { color: var(--text-2); }

/* Thanh các bước khi đang chạy chuỗi */
.seq-track { display: none; list-style: none; margin: 0; padding: 0; width: 100%; gap: 4px; flex-wrap: wrap; justify-content: center; }
.timer-pane.has-plan[data-status="running"] .seq-track, .timer-pane.has-plan[data-status="paused"] .seq-track { display: flex; }
.seq-track li { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; color: var(--text-3); background: var(--surface-2); white-space: nowrap; }
.seq-track li.is-done { color: var(--text-3); text-decoration: line-through; opacity: .7; }
.seq-track li.is-now { color: var(--on-primary); background: var(--primary); }
.seq-track .seq-cycle { background: none; padding: 3px 4px; }

/* Đã lưu & chia sẻ */
.saved-card { padding: 16px; }
@media (min-width: 768px) { .saved-card { padding: 22px; } }
.saved-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 559px) { .saved-actions { width: 100%; } .saved-actions > * { flex: 1; padding: 0 10px; } }
.save-form { display: flex; gap: 8px; margin-bottom: 12px; }
.save-form[hidden] { display: none; }
.save-form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--brand-500); border-radius: var(--r-sm); outline: none; }
@media (max-width: 400px) { .save-form .btn-ghost { display: none; } }
.saved-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 560px) { .saved-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.saved-item { display: flex; align-items: stretch; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.saved-load { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.saved-load:hover { background: var(--tint); }
.saved-name { font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-meta { font-size: .78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-del { width: 40px; flex: none; display: grid; place-items: center; border: 0; border-left: 1px solid var(--border); background: none; color: var(--text-3); cursor: pointer; }
.saved-del:hover { color: var(--danger); background: var(--danger-bg); }
.saved-del .ic { width: 16px; height: 16px; }
.saved-list:not(:empty) + .task-empty { display: none; }

/* Tiêu đề màn hình lớn + đổi ảnh */
.theme-extra { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.title-field { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--text-3); }
.title-input { height: 40px; padding: 0 12px; font: inherit; font-size: .92rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--r-sm); outline: none; }
.title-input:focus { border-color: var(--brand-500); }
.photo-btn[hidden] { display: none; }

/* Biểu đồ 7 ngày: 1 dãy số liệu, cột mảnh bo 4px phía trên */
.week-chart { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; align-items: end; height: 120px; margin-top: 14px; padding-bottom: 20px; border-bottom: 0; }
.week-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; cursor: default; outline: none; }
.week-col::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--border); }
.week-bar { width: min(18px, 70%); min-height: 0; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--brand-500) 55%, var(--surface)); transition: background .15s; }
.week-col.is-today .week-bar { background: var(--brand-500); }
.week-col:hover .week-bar, .week-col:focus-visible .week-bar { background: var(--primary); }
.week-lbl { position: absolute; bottom: -20px; font-size: .7rem; color: var(--text-3); }
.week-col.is-today .week-lbl { color: var(--text); font-weight: 700; }
.week-tip {
  position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 6px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  font-size: .74rem; line-height: 1.35; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  opacity: 0; transition: opacity .12s;
}
.week-tip b { display: block; }
.week-col:hover .week-tip, .week-col:focus-visible .week-tip { opacity: 1; }
.week-col:first-child .week-tip { left: 0; transform: none; }
.week-col:last-child .week-tip { left: auto; right: 0; transform: none; }

/* Kéo thả sắp xếp việc */
.task-num { cursor: grab; touch-action: none; }
.task-item.is-dragging { opacity: .5; }
.task-item.drop-before { box-shadow: 0 -2px 0 var(--brand-500); }
.task-item.drop-after { box-shadow: 0 2px 0 var(--brand-500); }

/* Hộp báo hết giờ ở chế độ tự lặp */
.done-dialog[data-mode="loop"] #btnSnooze { display: none; }
.done-dialog[data-mode="loop"] .done-actions { grid-template-columns: minmax(0, 1fr); }

/* Hộp mở khóa nền Pro */
.unlock-dialog { width: min(92vw, 400px); padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.unlock-dialog::backdrop { background: rgba(6,20,16,.6); backdrop-filter: blur(4px); }
.unlock-art { aspect-ratio: 16 / 8; display: grid; place-items: center; border-radius: 0; outline: 0; }
.unlock-body { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 20px; }
.unlock-body h2 { font-size: 1.15rem; font-weight: 800; }
.unlock-body p { font-size: .9rem; color: var(--text-2); }
.unlock-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.unlock-actions .btn-primary { grid-column: 1 / -1; }

/* ---------- Thanh bên ---------- */
.side { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) and (max-width: 1023px) and (hover: hover) { .side { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .side { position: sticky; top: 80px; } }
@media (hover: none) { .shortcuts-card { display: none; } }

.side-card { padding: 16px; }
.side-head { display: flex; align-items: center; gap: 12px; }
.side-head h2 { font-size: .98rem; font-weight: 700; line-height: 1.3; }
.side-head p { font-size: .82rem; color: var(--text-3); }
.side-icon {
  display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px; background: var(--tint); color: var(--accent-text);
}
.donate .side-icon { background: var(--grad); color: #fff; }
.side-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: .8rem; color: var(--text-3); }
.side-note .ic { width: 15px; height: 15px; }

.qr-frame {
  position: relative; display: block; width: 100%; margin-top: 14px; padding: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r); cursor: zoom-in; overflow: hidden;
}
.qr-frame img { width: 100%; max-width: 190px; height: auto; margin: 0 auto; }
.qr-zoom {
  position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 6px);
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  font-size: .78rem; font-weight: 600; color: #fff; background: rgba(15,38,32,.85);
  border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s;
}
.qr-zoom .ic { width: 14px; height: 14px; }
.qr-frame:hover .qr-zoom, .qr-frame:focus-visible .qr-zoom { opacity: 1; transform: translate(-50%, 0); }


.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 14px 0 0; font-size: .82rem; align-items: center; }
.shortcuts dt { display: flex; align-items: center; gap: 3px; color: var(--text-3); }
.shortcuts dd { margin: 0; color: var(--text-2); text-align: right; }
kbd {
  font-family: var(--mono); font-size: .72rem; font-weight: 600; line-height: 1;
  padding: 4px 6px; border-radius: 5px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 2px;
}

/* ---------- Hướng dẫn ---------- */
.guide { padding-top: 56px; padding-bottom: 48px; }
.guide h2 { text-align: center; font-size: clamp(1.25rem, 1.5vw + .9rem, 1.6rem); font-weight: 800; letter-spacing: -.015em; margin-bottom: 20px; }
.guide-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .guide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.guide-item { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.guide-item code {
  display: block; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  font-family: var(--font); font-weight: 600; font-size: .95rem; color: var(--accent-text);
  background: var(--tint); overflow-wrap: anywhere;
}
.guide-item h3 { font-size: .95rem; font-weight: 700; }
.guide-item p { margin-top: 2px; font-size: .86rem; color: var(--text-2); }
.privacy { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; font-size: .85rem; color: var(--text-3); text-align: center; }
.privacy .ic { width: 16px; height: 16px; color: var(--accent-text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; font-size: .85rem; color: var(--text-3); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-2); text-decoration: none; }
.footer-brand img { border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px var(--border); }
.footer-brand strong { color: var(--text); }

/* ---------- Hộp QR phóng to ---------- */
.qr-dialog {
  width: min(92vw, 360px); padding: 22px; border: 0; border-radius: 20px; text-align: center;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.qr-dialog::backdrop { background: rgba(6,20,16,.55); backdrop-filter: blur(3px); }
.qr-dialog h2 { font-size: 1.05rem; margin-bottom: 14px; }
.qr-dialog img { width: 100%; height: auto; padding: 10px; background: #fff; border-radius: var(--r); border: 1px solid var(--border); }
.qr-dialog p { margin-top: 12px; font-size: .88rem; color: var(--text-2); }
.qr-dialog form { position: absolute; top: 12px; right: 12px; margin: 0; }
.qr-close { width: 32px; height: 32px; }
.qr-close .ic { width: 16px; height: 16px; }

/* ---------- Thông báo ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .88rem; font-weight: 500; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast { display: flex; align-items: center; gap: 14px; }
.toast.show.has-action { pointer-events: auto; }
.toast button { padding: 2px 0; border: 0; background: none; color: var(--lime); font-weight: 700; cursor: pointer; white-space: nowrap; }
:root[data-theme="dark"] .toast button { color: var(--brand-700); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast button { color: var(--brand-700); } }
:root[data-theme="dark"] .toast { background: #e7f1ec; color: #0f2620; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #e7f1ec; color: #0f2620; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   Khối "Về ManhTool" + "Hợp tác" — dùng chung cho mọi công cụ
   ========================================================= */
.brand-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 48px; }
@media (min-width: 1024px) { .brand-section { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; } }

.brand-card {
  display: flex; align-items: center; gap: 28px; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.brand-logo {
  width: 150px; height: 150px; flex: none; object-fit: contain;
  border-radius: 24px; background: #fff; border: 1px solid #e8ece9;
  box-shadow: 0 12px 30px -12px rgba(14,124,90,.45);
}
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--accent-text); margin-bottom: 8px; }
.eyebrow .ic { width: 15px; height: 15px; }
.brand-body h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 6px; }
.brand-slogan { font-weight: 700; font-size: 1.02rem; margin-bottom: 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-body p:not(.brand-slogan) { color: var(--text-2); margin-bottom: 16px; }
.brand-body b { color: var(--text); }

.hire-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px; padding: 26px;
  border-radius: var(--r-lg); color: #fff;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(101,199,40,.28), transparent 70%),
    radial-gradient(360px 200px at 0% 100%, rgba(15,159,110,.3), transparent 70%),
    linear-gradient(160deg, #10241c, #0c1712);
  border: 1px solid rgba(255,255,255,.06);
}
.hire-label { align-self: flex-start; padding: 4px 11px; border-radius: 999px; background: rgba(101,199,40,.16); color: #a6e77a; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.hire-card h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.hire-card > p { color: rgba(255,255,255,.75); }
.hire-services { list-style: none; margin: 2px 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.hire-services li { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 500; }
.hire-services .ic { width: 16px; height: 16px; color: #7ddc4a; }
.hire-phone {
  display: flex; align-items: center; gap: 14px; margin-top: 4px; padding: 14px 16px;
  border-radius: 14px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, #12b886, #4fb52a);
  box-shadow: 0 14px 30px -12px rgba(79,181,42,.65);
  transition: transform .15s, box-shadow .15s;
}
.hire-phone:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(79,181,42,.8); }
.hp-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.2); }
.hp-ico .ic { width: 20px; height: 20px; animation: ring 2.6s ease-in-out infinite; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 80% { transform: rotate(12deg); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(6deg); } }
.hire-phone small { display: block; font-size: .75rem; opacity: .85; font-weight: 600; }
.hire-phone b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: .02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hire-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-ghost-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: var(--r-sm); cursor: pointer;
  font-size: .86rem; font-weight: 600; color: #fff; text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  transition: background .15s;
}
.btn-ghost-light .ic { width: 16px; height: 16px; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.hire-tags { font-size: .78rem; color: rgba(255,255,255,.55); margin-top: auto; padding-top: 4px; }

@media (max-width: 767px) {
  .brand-card, .hire-card { padding: 20px 16px; }
}
@media (max-width: 560px) {
  .brand-card { flex-direction: column; text-align: center; gap: 16px; }
  .brand-logo { width: 120px; height: 120px; }
  .hire-actions .btn-ghost-light { flex: 1 1 auto; }
}

/* ---------- Lời mời tư vấn (giống trang chủ) ---------- */
.nudge {
  position: fixed; left: 20px; bottom: 24px; z-index: 30; width: 320px; padding: 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 20px 50px -12px rgba(15,38,32,.28), 0 2px 6px rgba(15,38,32,.06);
  animation: nudge-in .35s ease-out;
}
.nudge[hidden] { display: none; }
@keyframes nudge-in { from { opacity: 0; transform: translateY(12px); } }
.nudge-close {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  background: none; border: 0; border-radius: 8px; color: var(--text-3); cursor: pointer;
}
.nudge-close:hover { background: var(--surface-2); color: var(--text); }
.nudge-close .ic { width: 16px; height: 16px; }
.nudge-head { display: flex; align-items: center; gap: 12px; padding-right: 24px; }
.nudge-head img { width: 50px; height: 30px; object-fit: contain; flex: none; }
.nudge-head p { font-size: .95rem; font-weight: 700; line-height: 1.35; margin: 0; }
.nudge-text { margin-top: 8px; font-size: .88rem; line-height: 1.55; color: var(--text-2); margin-bottom: 0; }
.nudge-actions { display: flex; gap: 8px; margin-top: 16px; }
.nudge-actions .btn-primary {
  flex: 1; height: 42px; padding: 0 12px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  border-radius: 10px; color: #fff; font-weight: 600; font-size: .88rem;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: none;
}
.nudge-actions .btn-primary:hover { background: linear-gradient(135deg, var(--brand-800), var(--brand-700)); }
:root[data-theme="dark"] .nudge-actions .btn-primary { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nudge-actions .btn-primary { color: #fff; } }
.nudge-actions .btn-ghost {
  height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--text);
  font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; background: transparent;
}
.nudge-actions .btn-ghost:hover { background: var(--surface-2); }
.nudge-actions .btn-ghost .ic { width: 16px; height: 16px; }
@media (max-width: 1023px) { .nudge { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; } }

