/* Chấm Công Pro · MOHINHLAI — Commercial SaaS Landing + Mobile-first PWA App */
:root {
  --brand: #0F295C;
  --brand-2: #1E40AF;
  --accent: #10B981;
  --accent-dark: #059669;
  --amber: #F59E0B;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --green-bg: #DCFCE7;
  --blue-bg: #DBEAFE;
  --amber-bg: #FEF3C7;
  --bg: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --line: #CBD5E1;
  --r: 16px;
  --sh: 0 2px 6px rgba(15, 41, 92, 0.06), 0 10px 24px rgba(15, 41, 92, 0.06);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
.hide { display: none !important; }
a { color: var(--brand-2); }

/* ================= LANDING PAGE (COMMERCIAL SAAS) ================= */
.lp-nav { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid #E2E8F0; }
.lp-wrap { max-width: 1140px; margin: 0 auto; padding: 0 18px; }
.lp-nav-in { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; color: var(--brand); text-decoration: none; }
.lp-brand img { width: 38px; height: 38px; border-radius: 10px; }
.lp-brand span small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.lp-nav-act { display: flex; gap: 8px; align-items: center; }

.lp-hero { background: linear-gradient(135deg, #091B3F 0%, #0F295C 52%, #134E4A 100%); color: #fff; padding: 54px 0 64px; position: relative; overflow: hidden; }
.lp-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.lp-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(16,185,129,.18); border: 1px solid rgba(52,211,153,.4); color: #A7F3D0; padding: 6px 14px; border-radius: 99px; font-size: .84rem; font-weight: 700; margin-bottom: 16px; }
.lp-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.15; margin: 0 0 16px; font-weight: 900; letter-spacing: -.02em; }
.lp-hero h1 em { font-style: normal; color: #34D399; }
.lp-hero p.lead { font-size: 1.08rem; color: #CBD5E1; margin: 0 0 24px; max-width: 560px; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 18px; font-size: .88rem; color: #94A3B8; }
.lp-trust span b { color: #fff; }

.lp-phone-mock { background: #fff; color: var(--text); border-radius: 26px; padding: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); border: 6px solid rgba(255,255,255,.15); max-width: 380px; margin: 0 auto; }
.mock-head { background: var(--brand); color: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.mock-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.mock-pill { background: var(--green-bg); color: #065F46; border-radius: 12px; padding: 10px 12px; font-size: .85rem; font-weight: 700; }
.mock-list { display: grid; gap: 8px; margin-top: 10px; }
.mock-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; font-size: .86rem; }

.lp-sec { padding: 56px 0; }
.lp-sec.alt { background: #fff; border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; }
.lp-sec-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.lp-sec-head h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--brand); margin: 0 0 10px; font-weight: 900; }
.lp-sec-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 18px; padding: 22px; box-shadow: var(--sh); transition: transform .15s; }
.feat-card:hover { transform: translateY(-2px); }
.feat-ico { width: 48px; height: 48px; border-radius: 14px; background: #EEF2FF; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.45rem; margin-bottom: 14px; }
.feat-card h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--brand); }
.feat-card p { margin: 0; font-size: .92rem; color: var(--muted); }

.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
.price-card { background: #fff; border: 1.5px solid #E2E8F0; border-radius: 20px; padding: 22px 18px; display: flex; flex-direction: column; position: relative; box-shadow: var(--sh); }
.price-card.pop { border-color: var(--accent); box-shadow: 0 12px 32px rgba(16,185,129,.18); }
.price-tag { position: absolute; top: -12px; right: 16px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.price-card h3 { margin: 0 0 4px; color: var(--brand); font-size: 1.15rem; }
.price-amt { font-size: 1.75rem; font-weight: 900; color: var(--brand); margin: 10px 0 4px; }
.price-amt small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.price-ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; display: grid; gap: 8px; font-size: .88rem; color: #334155; }
.price-ul li::before { content: "✓ "; color: var(--accent-dark); font-weight: 900; }

.lp-footer { background: #0B162C; color: #94A3B8; padding: 34px 0; font-size: .9rem; }
.lp-footer a { color: #CBD5E1; text-decoration: none; }

@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .feat-grid, .price-grid { grid-template-columns: 1fr; }
  .lp-nav-in { height: 60px; }
  .lp-nav-act .btn-sm { padding: 8px 10px; font-size: .82rem; }
}

/* ================= SHARED BUTTONS & FORMS ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border: 0; border-radius: 13px; background: var(--brand); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; min-height: 48px; text-decoration: none; transition: filter .15s, transform .08s; }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .52; pointer-events: none; }
.btn.full { width: 100%; }
.btn.green { background: linear-gradient(180deg, #10B981, #059669); color: #fff; box-shadow: 0 4px 12px rgba(5,150,105,.28); }
.btn.red { background: linear-gradient(180deg, #EF4444, #DC2626); color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,.28); }
.btn.amber { background: #F59E0B; color: #fff; }
.btn.soft { background: #E0E7FF; color: var(--brand); }
.btn.outline { background: #fff; color: var(--text); border: 1.5px solid var(--line); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn.btn-sm { min-height: 38px; padding: 8px 13px; font-size: .88rem; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; min-width: 130px; }

label { display: block; font-weight: 700; font-size: .92rem; color: #334155; margin-bottom: 5px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 1rem; background: #F8FAFC; color: var(--text); min-height: 48px; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(30,64,175,.18); border-color: var(--brand-2); background: #fff; }
.field { margin-bottom: 14px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }

.msg { padding: 12px 14px; border-radius: 12px; font-size: .92rem; margin-bottom: 12px; line-height: 1.45; }
.msg.err { background: var(--red-bg); color: #991B1B; border: 1px solid #FCA5A5; }
.msg.ok { background: var(--green-bg); color: #065F46; border: 1px solid #86EFAC; }
.msg.info { background: var(--blue-bg); color: #1E3A8A; border: 1px solid #93C5FD; }
.msg.warn { background: var(--amber-bg); color: #92400E; border: 1px solid #FCD34D; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.pill.ok { background: var(--green-bg); color: #065F46; }
.pill.warn { background: var(--amber-bg); color: #92400E; }
.pill.err { background: var(--red-bg); color: #991B1B; }
.pill.blue { background: var(--blue-bg); color: #1E40AF; }
.pill.gray { background: #E2E8F0; color: #475569; }

/* ================= EMPLOYEE PWA APP SHELL ================= */
.app-shell { max-width: 680px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + var(--safe-b)); }
.demo-banner { background: linear-gradient(90deg, #F59E0B, #EA580C); color: #fff; text-align: center; padding: 7px 12px; font-size: .84rem; font-weight: 800; }
.app-header { background: var(--brand); color: #fff; padding: calc(var(--safe-t) + 12px) 14px 12px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 25; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.app-hello { flex: 1; min-width: 0; line-height: 1.2; }
.app-hello small { display: block; font-size: .78rem; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-hello b { display: block; font-size: 1.06rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-btn { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 12px; min-height: 40px; padding: 0 11px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; position: relative; text-decoration: none; }
.hdr-av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.hdr-dot { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; min-width: 18px; height: 18px; line-height: 18px; border-radius: 99px; padding: 0 5px; }

.app-main { padding: 14px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; margin-bottom: 14px; border: 1px solid #E2E8F0; }
.card h2 { margin: 0 0 10px; font-size: 1.12rem; color: var(--brand); }
.card h3 { margin: 12px 0 8px; font-size: 1rem; color: var(--brand); }
.muted { color: var(--muted); font-size: .88rem; }

.today-hero { background: linear-gradient(135deg, var(--brand) 0%, #1D4ED8 100%); color: #fff; border: 0; }
.today-hero .clock-big { font-size: 2.2rem; font-weight: 900; letter-spacing: 1px; line-height: 1.1; }
.today-hero .lunar-line { font-size: .88rem; color: #BAE6FD; margin-top: 4px; }
.today-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.today-stat { background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 8px; text-align: center; }
.today-stat b { display: block; font-size: 1.25rem; }
.today-stat span { font-size: .76rem; opacity: .88; }

.punch-big-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.punch-big-row .btn { min-height: 62px; font-size: 1.08rem; border-radius: 16px; }

/* Calendar grid (kế thừa từ SANCO NS + Âm lịch) */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wd { text-align: center; font-size: .74rem; font-weight: 800; color: var(--muted); padding: 3px 0; }
.cal-wd.sun { color: var(--red); }
.cal-cell { border-radius: 11px; background: #F8FAFC; min-height: 66px; padding: 5px 2px; text-align: center; border: 1.5px solid #E2E8F0; cursor: pointer; position: relative; }
.cal-cell.blank { visibility: hidden; }
.cal-cell.full { background: var(--green-bg); border-color: #86EFAC; }
.cal-cell.half { background: var(--amber-bg); border-color: #FCD34D; }
.cal-cell.leave { background: var(--blue-bg); border-color: #93C5FD; }
.cal-cell.sun { border-color: #FECACA; }
.cal-cell.today { border-color: var(--amber); border-width: 2.5px; }
.cal-cell .cd { font-size: .72rem; color: var(--muted); font-weight: 700; }
.cal-cell .ca { font-size: .64rem; color: #94A3B8; line-height: 1; }
.cal-cell .ca.spec { color: var(--red); font-weight: 800; }
.cal-cell .cv { font-size: .96rem; font-weight: 900; color: var(--brand); margin-top: 2px; }
.cal-cell.full .cv { color: #065F46; }
.cal-cell .ch { font-size: .64rem; color: var(--muted); }
.cal-cell .dot-p { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* Bottom Nav (3 nút gọn kiểu SANCO NS) */
.app-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 680px; margin: 0 auto; background: #fff; border-top: 1px solid #CBD5E1; display: flex; padding-bottom: var(--safe-b); z-index: 30; }
.app-nav button { flex: 1; background: none; border: 0; padding: 8px 4px 7px; font: inherit; font-size: .76rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; min-height: 62px; }
.app-nav button.on { color: var(--brand); font-weight: 800; }
.app-nav button.center-tab .fab { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -26px; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(15,41,92,.32); font-size: 1.45rem; }
.app-nav button.center-tab.on .fab { background: var(--accent); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; min-height: 38px; color: var(--text); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Modal / Bottom Sheet */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.mask.center { align-items: center; padding: 14px; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; max-height: 92dvh; overflow: auto; padding: 0 18px calc(20px + var(--safe-b)); }
.mask.center .sheet { border-radius: 20px; max-height: 90dvh; }
.sheet-head { position: sticky; top: 0; z-index: 5; background: #fff; margin: 0 -18px 14px; padding: 16px 18px; border-bottom: 1px solid #E2E8F0; display: flex; justify-content: space-between; align-items: center; }
.sheet-head.in-mode { background: linear-gradient(135deg, #10B981, #059669); color: #fff; border-bottom: 0; }
.sheet-head.out-mode { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; border-bottom: 0; }
.sheet-head h3 { margin: 0; font-size: 1.12rem; }
.sheet-x { background: rgba(15,23,42,.1); border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: inherit; display: flex; align-items: center; justify-content: center; }
.sheet-head.in-mode .sheet-x, .sheet-head.out-mode .sheet-x { background: rgba(255,255,255,.22); color: #fff; }

.cam-box { background: #0F172A; border-radius: 16px; overflow: hidden; margin-bottom: 12px; position: relative; }
.cam-box video, .cam-box img { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.cam-bar { display: flex; gap: 8px; padding: 10px; background: #1E293B; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: 18px; z-index: 120; max-width: 92vw; padding: 12px 18px; border-radius: 12px; font-weight: 800; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.toast.ok { background: #065F46; color: #fff; }
.toast.err { background: #991B1B; color: #fff; }
.toast.info { background: var(--brand); color: #fff; }

.log-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #F1F5F9; align-items: flex-start; }
.log-item:last-child { border-bottom: 0; }
.log-thumb { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; background: #E2E8F0; flex: none; cursor: pointer; }
