@font-face { font-family: InterVariable; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/InterVariable.woff2") format("woff2"); }

/* ===== Design tokens (measured from actapp.misa.vn) ===== */
:root {
  --brand: #0e9a62;          /* primary green */
  --brand-dark: #039855;
  --brand-light: #e6f5ef;
  --brand-selected: #ddf1e9; /* selected row */
  --link: #1570ef;
  --text: #10141b;
  --text-2: #5d5d5d;
  --text-3: #757575;
  --muted: #6b707a;
  --muted-2: #9da2ac;
  --muted-3: #9e9e9e;
  --border: #ced1d6;
  --border-2: #e9eaeb;
  --bg-body: #e7e9e8;
  --bg-tabs: #eeefef;
  --bg-card: #fbfbfc;
  --bg-white: #ffffff;
  --grid-head: #d8e7e1;
  --grid-foot: #ebedec;
  --side-bg: #10141b;
  --side-text: #d7dade;
  --side-icon: #9da2ac;
  --side-group: #6b707a;
  --side-btn: #303642;
  --side-btn-border: #6b707a;
  --orange: #ff7f2c;
  --red: #dc2626;
  --red-badge: #ff6e6e;
  --green-badge: #2ca01c;
  --green-value: #12b76a;
  --header-h: 48px;
  --sidebar-w: 220px;
  --sprite1: url("https://actapp.misacdn.net/dn/g2/assets/images/Sprites_1.svg?v=96.1.3.14");
  --font: "InterVariable", "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 420;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.2px;
  font-feature-settings: "calt", "liga", "lnum", "tnum";
}
a { color: var(--link); text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input { font: inherit; color: inherit; }
img { display: block; }
b, strong { font-weight: 600; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1 1 0; min-width: 0; }
.pointer { cursor: pointer; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Icons: Tabler icon webfont (mi = misa icon) ===== */
.mi { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; line-height: 1; }
.mi.ti::before { font-size: inherit; }
.mi-16 { width: 16px; height: 16px; font-size: 16px; }
.mi-20 { width: 20px; height: 20px; font-size: 20px; }
.mi-24 { width: 24px; height: 24px; font-size: 24px; }
/* Misa sprite icon (exact Misa glyphs): <span class="msk mi-20" style="--mp:-56px -68px"></span>; colour = currentColor.
   Positions are read from Misa's computed mask-position (Sprites_1.svg, size 982x479). */
.msk { display: inline-block; flex: 0 0 auto; background-color: currentColor; -webkit-mask-image: var(--sprite1); mask-image: var(--sprite1); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 982px 479px; mask-size: 982px 479px; -webkit-mask-position: var(--mp, 0 0); mask-position: var(--mp, 0 0); }
.mi-28 { width: 28px; height: 28px; font-size: 28px; }
.mi-32 { width: 32px; height: 32px; font-size: 32px; }

/* ===== Scrollbars (thin, like Misa) ===== */
.scroller { overflow: auto; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c4c7cc; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== Badges ===== */
.badge-new { display: inline-flex; align-items: center; justify-content: center; height: 20px; padding: 0 6px; border-radius: 3px; background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.notify-no { position: absolute; top: -7px; left: 14px; min-width: 18px; height: 18px; padding: 2px 5px; border-radius: 18px; background: var(--red-badge); color: #fff; font-size: 10px; font-weight: 420; line-height: 14px; text-align: center; }
.notify-no.green { background: var(--green-badge); }

/* ===== Tooltip (simple) ===== */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); background: #10141b; color: #fff; font-size: 12px; font-weight: 400; padding: 4px 8px; border-radius: 4px; white-space: nowrap; z-index: 1000; pointer-events: none; }
/* Tabler <i class="ti ti-x"> re-drawn with Misa's sprite glyph by shell.js (class msa; size/position set inline) */
:where(i.ti.msa) { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
i.ti.msa { background-color: currentColor; -webkit-mask-image: var(--sprite1); mask-image: var(--sprite1); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
i.ti.msa::before { content: none !important; }

  /* Chuyển trang nội bộ: giữ ảnh của nội dung cũ cho tới khi nội dung mới đã
     khởi tạo xong. Không animate kích thước/transform để tab và nút không giật. */
  #main.misa-main-preparing { visibility: hidden; }
  #main.misa-main-loading { overflow: hidden; }
  .misa-nav-loader {
    position: absolute;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 243, 243, .68);
    backdrop-filter: blur(1px);
    animation: misa-loader-in .14s ease-out both;
    pointer-events: all;
  }
  .misa-nav-loader__card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 154px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(15, 158, 105, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
    color: #344054;
    font-weight: 500;
  }
  .misa-nav-loader__spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #ccebdd;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: misa-loader-spin .7s linear infinite;
  }
  @keyframes misa-loader-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes misa-loader-spin { to { transform: rotate(360deg); } }
  .misa-main-snapshot {
    position: fixed !important;
    z-index: 40;
    margin: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
  }
  @media (prefers-reduced-motion: reduce) {
    .misa-nav-loader, .misa-nav-loader__spinner { animation-duration: .01ms; animation-iteration-count: 1; }
  }

/* Các bề mặt quảng bá sản phẩm MISA/AMIS không thuộc luồng nghiệp vụ của ứng dụng. */
.crm-lite-full-card,
.crm-lite-empty,
.crm-banner,
.ms-ava-widget__border,
.meinvoice-banner,
.jetpay-promo,
.rp-ava-banner { display: none !important; }

/* Trang hợp đồng từng dùng thẻ quảng bá làm màn hình mặc định; hiển thị thẳng danh sách. */
.crm-lite-empty + .sa-elist { display: block !important; }
