/* CGM Console — the only CSS we add on top of the Modernize theme.
   Everything else comes from /assets/css/styles.css so the console stays
   visually identical to the purchased theme. */

/* a class with display:grid/flex beats the UA stylesheet's [hidden] rule */
[hidden] { display: none !important; }

body { font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, var(--bs-body-font-family), sans-serif; }

/* digits only — Thai has no glyphs in monospace faces */
.num { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
       font-variant-numeric: tabular-nums; }

/* ---- sign in ---- */
.cgm-signin { min-height: 100vh; display: flex; align-items: center; justify-content: center;
              padding: 1rem; background: var(--bs-body-bg); }
.cgm-signin__card { width: min(420px, 100%); border: 0; }

/* the theme reserves 70px + 115px at the top for a position:fixed header;
   ours is in normal flow, so that reservation is dead space */
.body-wrapper { padding-top: 0 !important; }
/* must match the theme's own selector specificity to win */
html[data-layout=horizontal] .body-wrapper > .container-fluid {
  padding-top: 0 !important; padding-bottom: 24px; }

/* ---- horizontal menu ---- */
.app-header-horizontal .nav-link { color: var(--bs-body-color); font-weight: 500; }
.app-header-horizontal .nav-link:hover { background: var(--bs-gray-100); }
.app-header-horizontal .nav-link[aria-current="page"] {
  background: var(--bs-primary); color: #fff;
}
.app-header-horizontal .nav-link[aria-current="page"] .badge { background: rgba(255,255,255,.25) !important; }

/* ---- work-waiting tiles: the theme's soft stat card, given a state colour ---- */
/* .card is flex-column in Bootstrap; these tiles are icon-beside-text */
.due-tile { flex-direction: row !important; align-items: center; gap: 1rem; }
.due-tile .icon { width: 52px; height: 52px; border-radius: 14px; display: grid;
                  place-items: center; font-size: 26px; flex: none; }
.due-tile .n { font-size: 30px; font-weight: 700; line-height: 1.1; }

/* clickable rows/cards keep the theme's hover feel */
a.card:hover, .table-hover tbody tr:hover { box-shadow: var(--bs-box-shadow-sm); }

/* ---- member split view ---- */
.member-results { max-height: calc(100vh - 320px); overflow-y: auto; }
.member-result { cursor: pointer; border-left: 3px solid transparent; }
.member-result:hover { background: var(--bs-gray-100); }
.member-result.active { background: var(--bs-primary-bg-subtle); border-left-color: var(--bs-primary); }

/* ---- inbox ---- */
.inbox-item { border-left: 3px solid transparent; }
.inbox-item.unread { border-left-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.inbox-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
              overflow: hidden; }

/* wait-time escalation, matching the theme's badge system */
.badge-wait-ok   { background: var(--bs-light-secondary); color: var(--bs-secondary); }
.badge-wait-warn { background: var(--bs-light-warning);   color: var(--bs-warning); }
.badge-wait-late { background: var(--bs-light-danger);    color: var(--bs-danger); }
