/* AIO Suite · MOHINHLAI — Unified ERP + CRM + Chấm Công Super App */
:root {
  --navy: #0F172A;
  --blue: #1D4ED8;
  --indigo: #4338CA;
  --gold: #F59E0B;
  --green: #059669;
  --orange: #EA580C;
  --red: #DC2626;
  --bg: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --muted: #475569;
  --line: #CBD5E1;
  --sh: 0 2px 8px rgba(15,23,42,.06), 0 12px 28px rgba(15,23,42,.07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; height: 100%; }
.hide { display: none !important; }
a { color: var(--blue); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 16px; border: 0; border-radius: 11px; background: var(--navy); color: #fff; font: inherit; font-weight: 800; cursor: pointer; min-height: 44px; text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn.full { width: 100%; }
.btn.gold { background: linear-gradient(180deg, #FBBF24, #D97706); color: #0F172A; box-shadow: 0 4px 14px rgba(217,119,6,.3); }
.btn.blue { background: linear-gradient(180deg, #2563EB, #1D4ED8); color: #fff; }
.btn.green { background: linear-gradient(180deg, #10B981, #059669); color: #fff; }
.btn.red { background: linear-gradient(180deg, #EF4444, #DC2626); color: #fff; }
.btn.soft { background: #E0E7FF; color: var(--navy); }
.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.sm { min-height: 36px; padding: 7px 12px; font-size: .84rem; border-radius: 9px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 700; font-size: .88rem; color: #334155; margin-bottom: 4px; }
input, select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #F8FAFC; min-height: 42px; }
input:focus, select:focus { outline: 3px solid rgba(37,99,235,.18); border-color: var(--blue); background: #fff; }
.field { margin-bottom: 11px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } }

.msg { padding: 11px 14px; border-radius: 11px; font-size: .9rem; margin-bottom: 12px; }
.msg.err { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.msg.ok { background: #DCFCE7; color: #065F46; border: 1px solid #86EFAC; }
.msg.info { background: #DBEAFE; color: #1E3A8A; border: 1px solid #93C5FD; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.pill.ok { background: #DCFCE7; color: #065F46; }
.pill.orange { background: #FFEDD5; color: #C2410C; }
.pill.blue { background: #DBEAFE; color: #1E40AF; }
.pill.gold { background: #FEF3C7; color: #92400E; }
.muted { color: var(--muted); font-size: .86rem; }
.card { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 18px; box-shadow: var(--sh); margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 1.08rem; color: var(--navy); }

/* LANDING */
.lp-nav { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid #E2E8F0; }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.lp-nav-in { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 10px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; color: var(--navy); text-decoration: none; }
.lp-brand img { width: 40px; height: 40px; border-radius: 11px; }
.lp-brand small { display: block; font-size: .73rem; color: var(--muted); font-weight: 600; }

.lp-hero { background: radial-gradient(circle at 80% 20%, #1D4ED8 0%, #0F172A 58%, #020617 100%); color: #fff; padding: 56px 0 64px; }
.lp-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.lp-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(251,191,36,.18); border: 1px solid rgba(251,191,36,.45); color: #FDE68A; padding: 6px 14px; border-radius: 99px; font-size: .84rem; font-weight: 800; margin-bottom: 14px; }
.lp-hero h1 { font-size: clamp(1.95rem, 3.8vw, 2.95rem); line-height: 1.14; margin: 0 0 14px; font-weight: 900; }
.lp-hero h1 em { font-style: normal; color: #FBBF24; }
.lp-hero p.lead { font-size: 1.04rem; color: #CBD5E1; margin: 0 0 22px; }
.suite-box { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 22px; padding: 20px; display: grid; gap: 10px; }
.suite-row { background: rgba(255,255,255,.09); border-radius: 13px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.lp-sec { padding: 52px 0; }
.lp-sec.alt { background: #fff; border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; }
.lp-head { text-align: center; max-width: 740px; margin: 0 auto 30px; }
.lp-head h2 { font-size: clamp(1.45rem, 2.8vw, 2.1rem); color: var(--navy); margin: 0 0 8px; font-weight: 900; }
.mod-grid, .price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mod-card, .price-card { background: #fff; border: 1.5px solid #E2E8F0; border-radius: 18px; padding: 22px 18px; box-shadow: var(--sh); display: flex; flex-direction: column; position: relative; }
.price-card.pop { border-color: var(--gold); box-shadow: 0 14px 34px rgba(245,158,11,.2); }
.price-tag { position: absolute; top: -11px; right: 14px; background: var(--gold); color: #0F172A; font-size: .74rem; font-weight: 900; padding: 3px 12px; border-radius: 99px; }
.price-amt { font-size: 1.75rem; font-weight: 900; color: var(--navy); margin: 8px 0 3px; }
.price-ul { list-style: none; padding: 0; margin: 12px 0 18px; flex: 1; display: grid; gap: 8px; font-size: .87rem; color: #334155; }
.price-ul li::before { content: "✓ "; color: var(--green); font-weight: 900; }
.lp-footer { background: #020617; color: #94A3B8; padding: 30px 0; font-size: .88rem; }
.lp-footer a { color: #CBD5E1; text-decoration: none; }
@media (max-width: 960px) { .lp-hero-grid, .mod-grid, .price-grid { grid-template-columns: 1fr; } }

/* SUPER APP WORKSPACE SHELL */
.aio-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.aio-bar { background: linear-gradient(90deg, #0F172A, #1E293B); color: #fff; padding: 0 14px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; z-index: 30; border-bottom: 1px solid rgba(255,255,255,.1); }
.aio-brand { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: .96rem; min-width: 0; }
.aio-brand img { width: 32px; height: 32px; border-radius: 8px; }
.aio-brand small { display: block; font-size: .7rem; color: #94A3B8; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }

.aio-tabs { display: flex; gap: 6px; align-items: center; }
.aio-tab { background: rgba(255,255,255,.08); color: #CBD5E1; border: 1px solid rgba(255,255,255,.1); padding: 7px 14px; border-radius: 10px; font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.aio-tab:hover { background: rgba(255,255,255,.16); color: #fff; }
.aio-tab.on { background: linear-gradient(180deg, #FBBF24, #D97706); color: #0F172A; border-color: #FBBF24; }
.aio-tab .bdg { background: #EF4444; color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 99px; }

.aio-stage { flex: 1; position: relative; overflow: hidden; background: var(--bg); }
.aio-pane { position: absolute; inset: 0; overflow: auto; }
.aio-pane.hide { display: none !important; }
.aio-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

.ov-wrap { max-width: 1220px; margin: 0 auto; padding: 18px 18px 40px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 15px; padding: 15px 16px; border-left: 5px solid var(--blue); box-shadow: var(--sh); cursor: pointer; transition: transform .15s; }
.kpi-card:hover { transform: translateY(-2px); }
.kpi-card.orange { border-left-color: var(--orange); }
.kpi-card.green { border-left-color: var(--green); }
.kpi-card.gold { border-left-color: var(--gold); }
.kpi-card small { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); }
.kpi-card b { display: block; font-size: 1.42rem; color: var(--navy); margin-top: 3px; }
.ov-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .ov-cols { grid-template-columns: 1fr; } }

/* Mobile Bottom Nav chuẩn iOS/Android safe-area */
.aio-mob-nav { display: none; background: #0F172A; border-top: 1px solid rgba(255,255,255,.12); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; flex-shrink: 0; }
.aio-mob-btn { background: transparent; border: 0; color: #94A3B8; font: inherit; font-size: .72rem; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 10px; border-radius: 10px; cursor: pointer; }
.aio-mob-btn.on { color: #FBBF24; background: rgba(251,191,36,.12); }
.aio-mob-btn span.ico { font-size: 1.2rem; line-height: 1.1; }
@media (max-width: 820px) {
  .aio-tabs { display: none; }
  .aio-mob-nav { display: flex; }
  .aio-bar { height: 50px; padding: 0 10px; }
  .ov-wrap { padding: 12px 12px 24px; }
}

.mask { position: fixed; inset: 0; background: rgba(15,23,42,.58); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 14px; }
.sheet { background: #fff; width: 100%; max-width: 620px; border-radius: 18px; max-height: 92vh; overflow: auto; padding: 0 20px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.sheet-head { position: sticky; top: 0; background: #fff; margin: 0 -20px 14px; padding: 14px 20px; border-bottom: 1px solid #E2E8F0; display: flex; justify-content: space-between; align-items: center; }
.sheet-head h3 { margin: 0; font-size: 1.08rem; color: var(--navy); }
.sheet-x { background: #F1F5F9; border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: 16px; z-index: 120; padding: 11px 18px; border-radius: 11px; font-weight: 800; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.toast.ok { background: #065F46; color: #fff; }
.toast.err { background: #991B1B; color: #fff; }
.toast.info { background: var(--navy); color: #fff; }
