/* ckn.works.operation app layer over the synced ckn theme: the shell-level rules of ckn-works' public/works.css (font, text scale,
   language switcher, rail contrast), nothing aimed at a screen. Screens use components + ckn.css utilities only. */
/* INNO Works blue (1 Dec 2026): the theme's red primary / accent (buttons, their hover, the active menu item, tabs, chosen
   filters, focus rings) become blue. Status colours (ok / warn / err) and the KPI charts keep theirs. html:root outranks the
   synced theme's :root, whatever order the two sheets load in. */
html:root {
    --color-primary: #1d5fe8;
    --color-primary-hover: #174bbd;
    --color-primary-soft: #edf3ff;
    --color-accent: #1d5fe8;
    --color-on-primary: #ffffff;
}
/* No menu filter in the rail (1 Dec 2026): the synced theme's script (themes/ckn/public/ckn.js) adds .ckn-nav-search on its own;
   hidden here since the theme is never edited in this project. */
.ckn-nav-search { display: none !important; }
/* Neutral badges in brand blue (1 Dec 2026): the grey-with-black-text badge tone (tab counts, plain ckn-badge, filter counts)
   becomes primary blue with white text. ok / warn / err / past / pending keep theirs. html raises it over the theme's class. */
html .\[--badge-bg\:var\(--color-g3\)\] { --badge-bg: var(--color-primary); }
html .\[--badge-bg\:var\(--color-g3\)\].\[--badge-fg\:var\(--color-ink\)\] { --badge-fg: var(--color-on-primary); }
/* A scrolling tab strip scrolls sideways only: overflow-x:auto made overflow-y auto too, so a 1px overflow showed a vertical scrollbar. */
.ckn-tabs-scroll { overflow-y: hidden; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-400-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-500-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-600-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-thai-700-normal.woff2') format('woff2'); unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-400-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-500-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-600-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'IBM Plex Sans Thai'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/ibm-plex-sans-thai/ibm-plex-sans-thai-latin-700-normal.woff2') format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root:root { --font-sans:'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', 'Leelawadee UI', Roboto, Arial, sans-serif; --default-font-family:var(--font-sans); }

/* CKN Works readability: scale rem-based text and controls together. */
html {
    font-size: 112.5%;
}

/* Language selection belongs to this app; shared themes stay in sync. */
.works-language-switcher { margin-left: auto; flex-shrink: 0; width: 7.5rem; }
/* Compact: the switcher matches the header's buttons instead of a full form field. */
.works-language-switcher select { min-height: 0; height: 2.375rem; padding-top: 0; padding-bottom: 0; font-size: .875rem; }
/* One rail width from the first paint on every screen: the same 210px src/apps/shell.ts keeps after the theme script runs.
   (It was 252px here and 200px under 1024px in the theme, then shell.ts set 210px once the page had loaded, so the rail
   jumped on every page opened from the menu.) --ckn-rail-w is what the theme's sidebar reads; unlayered, it beats the
   theme's @layer shell values, its narrow-screen one included. */
:root { --rail-width: 210px; --ckn-rail-w: 210px; }
/* Thai table headings lose the uppercase tracking, as the rail's section labels do below; the theme's 10px caps are
   too small to read for Thai script, so headings are 13px, sentence case, a muted ink (every table, not one screen). */
.cknui th[data-part="th"]:lang(th) { letter-spacing: 0; font-size: .8125rem; font-weight: 600; text-transform: none; color: var(--color-g4); }
.works-language-auth { position: absolute; top: 1rem; right: 1rem; }
.ckn-header { gap: .75rem; }
.ckn-header-title { min-width: 0; }
@media (max-width: 480px) { .ckn-header { gap: .5rem; } .works-language-switcher { flex: 0 0 92px; width: 92px; min-width: 0; } .works-language-switcher select { min-width: 0; padding-left: .45rem; padding-right: .3rem; }
  .ckn-header-title { flex: 1 1 auto; min-width: 4.5rem; } }
/* Rail text the synced theme draws too faint (2.5–3.9:1 on the rail): lifted to ≥4.5:1 here, the theme stays in sync.
   Thai section labels lose the uppercase tracking: spacing splits Thai vowels and tone marks from their consonant. */
.ckn-nav-section { color: rgb(var(--rail-rgb) / .64); }
.ckn-nav-section:lang(th) { letter-spacing: 0; font-size: .6875rem; }
.ckn-user-role { color: rgb(var(--rail-rgb) / .64); }
.ckn-nav-search-input::placeholder { color: rgb(var(--rail-rgb) / .66); }
/* The tab you are on (every ckn-tabs bar: Tickets, Home, …) gets a light red band behind its label as well as the underline. */
ckn-tabs [data-part="tab"][aria-selected="true"] { background: color-mix(in srgb, var(--color-accent) 9%, transparent); border-radius: .375rem .375rem 0 0; }
/* The active item already has a tint and weight; the inset side stripe repeated it. */
.ckn-nav-item.active { box-shadow: none; }
@media print { .works-language-switcher { display: none !important; } }

/* Notification bell (src/apps/shell.ts): the unread count is a small red bubble on the bell glyph's top-right corner
   (anchored from the button's centre: the glyph is small inside a 34px icon button). */
.works-bell { position: relative; display: inline-flex; }
/* the Customer Portal's bell panel (src/apps/shell.ts PortalBell): drops from the bell, the latest moves on the account's cases */
.pb-panel { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 50; width: 22rem; max-width: calc(100vw - 1.5rem); border-radius: .75rem;
  background: var(--color-paper); border: 1px solid var(--color-line); box-shadow: 0 12px 32px rgba(15, 15, 15, .16); overflow: hidden; text-align: left; }
.pb-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--color-line); font-size: .9375rem; color: var(--color-ink); }
.pb-link { border: 0; background: none; padding: .25rem; font: inherit; font-size: .8125rem; color: var(--color-accent); cursor: pointer; }
.pb-empty { margin: 0; padding: 1.5rem 1rem; text-align: center; font-size: .875rem; color: var(--color-g4); }
.pb-list { max-height: min(26rem, 70vh); overflow-y: auto; }
.pb-item { display: flex; gap: .625rem; padding: .625rem 1rem; text-decoration: none; color: var(--color-ink); border-bottom: 1px solid var(--color-line); }
.pb-item:last-child { border-bottom: 0; }
.pb-item:hover { background: var(--color-g1); }
.pb-dot { flex: none; width: .5rem; height: .5rem; margin-top: .4rem; border-radius: 50%; background: transparent; }
.pb-item.is-unread { background: color-mix(in srgb, var(--color-accent) 5%, var(--color-paper)); }
.pb-item.is-unread .pb-dot { background: var(--color-accent); }
.pb-item.is-unread .pb-what { font-weight: 700; }
.pb-main { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.pb-what { font-size: .875rem; }
.pb-preview { font-size: .8125rem; color: var(--color-g4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-meta { font-size: .75rem; color: var(--color-g4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.works-bell-count { position: absolute; top: .05rem; left: calc(50% + .2rem); min-width: 1rem; height: 1rem; padding: 0 .25rem; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--color-err); color: #fff;
    font-size: .625rem; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--color-paper, #fff); pointer-events: none; }

/* No visible scrollbars in the rail (it still scrolls with the wheel / touch), and never sideways: the user card at the
   bottom used to push a horizontal bar. */
.ckn-sidebar, .ckn-nav { scrollbar-width: none; overflow-x: hidden; }
.ckn-sidebar::-webkit-scrollbar, .ckn-nav::-webkit-scrollbar { display: none; }
.ckn-user, .ckn-user-text { min-width: 0; overflow: hidden; }

/* Assistant (ckn-works' works.css): the header button sits just left of the language switcher; the chat is a right-edge,
   full-height ckn-modal (native top layer, so it stays usable above open forms) with quiet answers, user bubbles and one
   integrated composer. Colours are the theme tokens. */
.works-assistant-slot { margin-left: auto; }
.works-assistant-slot + .works-language-switcher { margin-left: 0; }
@media print { .works-assistant-slot { display: none !important; } }
.works-assistant-chat-shell dialog[data-part="modal"] { position: fixed; inset: 0 0 0 auto; border-radius: 0; margin: 0; padding: 0; width: min(42rem, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; overflow: hidden; }
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] { width: 100%; max-width: none; height: 100%; margin: 0; align-items: stretch; }
.works-assistant-chat-shell dialog[data-part="modal"] > [data-part="dialog"] > [data-part="content"] { display: flex; flex-direction: column; height: 100%; min-height: 0; border-radius: 0; }
.works-assistant-chat-shell [data-part="content"] > [data-part="header"] { flex-shrink: 0; gap: .5rem; border-bottom: 0; padding: 1rem 1.25rem .75rem; }
.works-assistant-chat-shell [data-part="content"] > [data-part="body"] { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding: .5rem .6rem max(.5rem, env(safe-area-inset-bottom)); }
/* Content projection can add a wrapper; it joins the bounded flex layout too. */
.works-assistant-chat-shell [data-part="body"] :has(> .works-assistant-panel-body) { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; overflow: hidden; }
.works-assistant-chat-shell [data-part="title"] { font-size: 1rem; font-weight: 600; }
.works-assistant-chat-shell dialog[open] { animation: works-assistant-slide-in .16s ease-out; }
@keyframes works-assistant-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .works-assistant-chat-shell dialog[open] { animation: none; } }
.works-assistant-toolbar { margin-left: auto; display: flex; align-items: center; }
.works-assistant-panel-body { position: relative; display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.works-assistant-panel-body > :not(.works-assistant-chat-log) { flex-shrink: 0; }
.works-assistant-chat-log { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; gap: 1.5rem; padding: 1rem 0 1.5rem; scrollbar-width: thin; }
.works-assistant-chat-log > * { flex-shrink: 0; }
.works-assistant-welcome { display: flex; flex-direction: column; justify-content: center; align-items: center; flex: 1 0 auto; text-align: center; gap: .75rem; padding: 2rem .5rem; }
.works-assistant-spark { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid var(--color-line); border-radius: 50%; color: var(--color-ink); }
.works-assistant-welcome h2 { margin: .5rem 0 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.35; }
.works-assistant-welcome > p { margin: 0; color: var(--color-g4); font-size: .875rem; line-height: 1.6; }
.works-assistant-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .75rem; }
.works-assistant-suggestions [data-part="root"] { border-radius: 999px; font-weight: 400; }
.works-assistant-chat-message { min-width: 0; line-height: 1.65; overflow-wrap: anywhere; }
.works-assistant-chat-message[data-role="user"] { align-self: flex-end; width: fit-content; max-width: 86%; margin-left: auto; padding: .75rem 1rem; border-radius: 1.35rem; background: var(--color-g1); color: var(--color-ink); }
.works-assistant-chat-message[data-role="assistant"] { width: 100%; padding: 0 .25rem; }
.works-assistant-speaker { display: flex; align-items: center; gap: .4rem; margin: 0 0 .65rem; font-size: .8rem; font-weight: 600; }
.works-assistant-sources { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.works-assistant-sources > span { max-width: 100%; border: 1px solid var(--color-line); border-radius: 999px; background: var(--color-g1); padding: .2rem .65rem; color: var(--color-g4); font-size: .72rem; overflow-wrap: anywhere; }
.works-assistant-search-details { margin-top: .65rem; color: var(--color-g4); font-size: .72rem; }
.works-assistant-composer { position: relative; flex-shrink: 0; margin: .5rem 0 0; border: 1px solid var(--color-line); border-radius: 1.5rem; background: var(--color-g1); }
.works-assistant-composer:focus-within { border-color: var(--color-line-strong); }
.works-assistant-composer label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.works-assistant-composer [data-part="root"] { margin: 0; }
.works-assistant-composer textarea { display: block; width: 100%; min-height: 5.5rem; max-height: 11rem; margin: 0; padding: .9rem 3.5rem 3.2rem 1rem; border: 0; border-radius: 1.5rem; background: transparent; box-shadow: none; outline: none; resize: none; font: inherit; line-height: 1.6; }
.works-assistant-composer textarea:focus, .works-assistant-composer textarea:focus-visible { border: 0; outline: none; box-shadow: none; }
.works-assistant-attach, .works-assistant-send { position: absolute; bottom: .65rem; }
.works-assistant-attach { left: .65rem; }
.works-assistant-send { right: .65rem; }
.works-assistant-attach [data-part="root"], .works-assistant-send [data-part="root"] { width: 2.2rem; height: 2.2rem; min-height: 0; padding: 0; border-radius: 50%; }
.works-assistant-attach [data-part="root"] { background: var(--color-line); }
.works-assistant-send [data-part="root"] { background: var(--color-ink); color: var(--color-on-primary); }
.works-assistant-send [data-part="root"]:disabled { background: var(--color-line); color: var(--color-g3); opacity: 1; }
.works-assistant-uploads { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; max-height: 8rem; overflow-y: auto; }
.works-assistant-upload { display: flex; align-items: center; gap: .5rem; max-width: 100%; border: 1px solid var(--color-line); border-radius: .6rem; padding: .2rem .25rem .2rem .5rem; font-size: .8rem; }
.works-assistant-upload span { overflow-wrap: anywhere; min-width: 0; }
.works-assistant-drop-overlay { position: absolute; inset: .25rem; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem; padding: 1.25rem; border: 2px dashed var(--color-primary); border-radius: 1rem; background: var(--color-primary-soft); color: var(--color-primary-hover); text-align: center; pointer-events: none; }
.works-assistant-drop-overlay strong { font-size: 1.15rem; }
.works-assistant-drop-overlay span { font-size: .8rem; }
@media (max-width: 480px) { .works-assistant-welcome h2 { font-size: 1.3rem; } .works-assistant-suggestions { flex-direction: column; } .works-assistant-chat-message[data-role="user"] { max-width: 90%; } }
/* Markdown stays readable in a narrow chat, Thai text and wide tables / code included. */
.works-assistant-markdown { line-height: 1.75; overflow-wrap: anywhere; min-width: 0; }
.works-assistant-markdown :is(p, ul, ol) { margin: .65rem 0; }
.works-assistant-markdown :is(h1, h2, h3, h4, h5, h6) { font-weight: 650; line-height: 1.4; margin: 1.2rem 0 .5rem; }
.works-assistant-markdown h1 { font-size: 1.4rem; }
.works-assistant-markdown h2 { font-size: 1.25rem; }
.works-assistant-markdown :is(h3, h4, h5, h6) { font-size: 1.1rem; }
.works-assistant-markdown :is(ul, ol) { padding-left: 1.5rem; }
.works-assistant-markdown ul { list-style: disc; }
.works-assistant-markdown ol { list-style: decimal; }
.works-assistant-markdown li { margin: .3rem 0; }
.works-assistant-markdown a[href] { color: var(--color-accent); text-decoration: underline; text-underline-offset: .15em; }
.works-assistant-markdown code { font-family: ui-monospace, monospace; font-size: .85em; background: var(--color-g1); border-radius: .3rem; padding: .12rem .3rem; }
.works-assistant-markdown pre { max-width: 100%; overflow-x: auto; margin: .8rem 0; padding: .9rem; border: 1px solid var(--color-line); border-radius: .7rem; background: var(--color-g1); font-size: .875rem; line-height: 1.6; white-space: pre; overflow-wrap: normal; }
.works-assistant-markdown pre code { padding: 0; background: transparent; font: inherit; }
.works-assistant-markdown blockquote { margin: .8rem 0; padding: .1rem .8rem; border-left: 3px solid var(--color-line-strong); color: var(--color-g4); }
.works-assistant-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: .8rem 0; }
.works-assistant-markdown :is(th, td) { border: 1px solid var(--color-line); padding: .45rem .7rem; text-align: left; min-width: 6rem; }
.works-assistant-markdown th { background: var(--color-g1); font-weight: 650; }
.works-assistant-markdown hr { margin: 1rem 0; border: 0; border-top: 1px solid var(--color-line); }
.works-assistant-markdown :first-child { margin-top: 0; }

/* Boards fit the page: columns share the width (column-width="fill") and may shrink below the component's 10rem floor. */
.works-board-fit [data-part="root"] { overflow-x: hidden; }
.works-board-fit [data-part="column"] { min-width: 0 !important; }

/* Ticket status colours (ตั้งค่า Ticket): the dot in the status list and the colour swatches. Classes, not style="": the CSP
   (style-src 'self') drops inline styles. One per ticket_status.tone. */
.works-tone-err { background: #DC2B2B; } .works-tone-warn { background: #DB6704; } .works-tone-warn-lt { background: #F59E5B; }
.works-tone-pend { background: #CA8A04; } .works-tone-pend-lt { background: #E5B93A; } .works-tone-ok { background: #157F47; }
.works-tone-ok-lt { background: #4FA874; } .works-tone-cur { background: #1d4ed8; } .works-tone-neutral { background: #6b7280; }
.works-tone-past { background: #9ca3af; }
.works-swatch[aria-checked="true"] { outline: 2px solid #171717; outline-offset: 2px; }

/* ตั้งค่า Ticket: denser status tables (the app's 112.5% base made every row and cell look oversized here). */
.works-ts td[data-part="cell"] { padding-top: .375rem; padding-bottom: .375rem; font-size: .75rem; }
.works-ts th[data-part="th"] { padding-top: .375rem; padding-bottom: .375rem; font-size: .75rem; }
.works-ts [data-part="subtitle"] { font-size: .8125rem; }

/* Profile panel → Switch to (root, src/apps/account.ts): the matching accounts, one button each. */
.account-switch-users { list-style: none; margin: 0 0 .5rem; padding: 0; max-height: 15rem; overflow-y: auto; border: 1px solid var(--ckn-border, #e5e7eb); border-radius: .5rem; }
.account-switch-users li + li { border-top: 1px solid var(--ckn-border, #e5e7eb); }
.account-switch-users button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .75rem; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.account-switch-users button:hover:not(:disabled) { background: #f9fafb; }
.account-switch-users button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.account-switch-users button:disabled { cursor: default; opacity: .55; }
.account-switch-users button > span { display: flex; flex-direction: column; min-width: 0; }
.account-switch-users b { font-weight: 600; font-size: .875rem; }
.account-switch-users small { font-size: .75rem; overflow-wrap: anywhere; }
.account-switch-users button > small { text-align: right; flex: none; max-width: 45%; }

/* A session a root switched into (AUTH.SWITCH): a pill floating at the bottom of every page, with the way back (it shifts no layout). */
.works-switched { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: .5rem .9rem;
  max-width: calc(100vw - 2rem); box-sizing: border-box; padding: .45rem .5rem .45rem 1rem; border-radius: 999px; background: #336de6; color: #fff;
  font-size: .8125rem; line-height: 1.4; box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 12px 28px -10px rgba(29,95,232,.45); }
.works-switched span { min-width: 0; }
.works-switched button { flex: none; background: #fff; color: #1d5fe8; border: 0; border-radius: 999px; padding: .25rem .8rem; font: inherit; font-weight: 600; cursor: pointer; }
.works-switched button:hover { background: #e3ecfe; }
.works-switched button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Profile panel of a root: the two tabs sit in the modal header in place of the title, their underline on the header's own line. */
.account-modal .ckn-modal__title:empty { display: none; }
.account-modal .account-tabs { flex: 1; min-width: 0; align-self: stretch; margin-bottom: -.6rem; }
.account-modal .account-tabs .ckn-tabs__list { border-bottom: 0; margin-bottom: 0; }
.account-modal .account-tabs .ckn-tabs__tab { padding-top: .1rem; padding-bottom: .6rem; font-size: .9375rem; }

/* Customer Portal menu: unread news as a round red badge in the theme's primary colour (src/helper/auth/portal.ts newsBadge). */
.ckn-nav-item[href="/portal/news"] .ckn-nav-count { min-width:1.25rem; height:1.25rem; padding:0 .375rem; border-radius:999px; display:inline-grid; place-items:center;
  background:var(--color-primary, #991b1b); color:#fff; font-size:.6875rem; font-weight:700; line-height:1; }
.ckn-nav-item.active[href="/portal/news"] .ckn-nav-count { color:#fff; }

/* ── จัดการข่าวสาร: เขียนข่าว / แจ้งสถานะบริการ (src/apps/operation/docs/news.ts). Form on the left in numbered
   sections, a live preview of what the customer sees on the right. Choice cards replace selects. ── */
.nc { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:24px; align-items:start; }
.nc-form { display:flex; flex-direction:column; gap:18px; min-width:0; }
.nc-sec { display:flex; flex-direction:column; gap:12px; padding-bottom:18px; border-bottom:1px solid #eceef1; }
.nc-sec:last-child { border-bottom:0; padding-bottom:0; }
.nc-h { display:flex; align-items:center; gap:10px; margin:0; font-size:.9375rem; font-weight:700; color:#171717; }
.nc-h span { width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:var(--color-primary); color:#fff; font-size:.75rem; }
.nc-field { display:flex; flex-direction:column; gap:6px; }
.nc-label { font-size:.875rem; font-weight:600; color:#374151; }
.nc-label em { font-style:normal; font-weight:400; color:#6b7280; margin-left:6px; font-size:.8125rem; }
.nc-cats { display:flex; flex-wrap:wrap; gap:6px; }
.nc-cat { display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 13px; border-radius:99px; border:1px solid #e5e7eb; background:#fff;
  font:inherit; font-size:.8125rem; font-weight:600; color:#374151; cursor:pointer; transition:border-color .15s, background-color .15s; }
.nc-cat i { width:8px; height:8px; border-radius:50%; background:#9ca3af; }
.nc-cat:hover { border-color:#9ca3af; }
.nc-cat.is-important i { background:#dc2626; } .nc-cat.is-system-update i { background:#1d4ed8; } .nc-cat.is-guide i { background:#16a34a; } .nc-cat.is-survey i { background:#d97706; }
.nc-cat.on { border-color:var(--color-primary); background:var(--color-primary-soft); color:var(--color-primary-hover); box-shadow:0 0 0 1px var(--color-primary) inset; }
.nc-switch { display:flex; align-items:flex-start; gap:12px; width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; text-align:left; font:inherit; cursor:pointer; }
.nc-switch:hover { border-color:#cbd5e1; }
.nc-switch:disabled { cursor:not-allowed; opacity:.6; } .nc-switch:disabled:hover { border-color:#e5e7eb; }
.nc-foot-more { margin-right:4px; } .nc-foot-more button * { pointer-events:none; }   /* the click lands on the button, not its icon */
.nm-menu.is-form { position:absolute; right:0; bottom:calc(100% + 6px); top:auto; left:auto; transform-origin:bottom right; }
.nl { margin-top:14px; }
.nl-table-wrap { overflow:auto; border:1px solid var(--color-line, #e5e7eb); border-radius:12px; background:var(--color-paper, #fff); }
.nl-table { width:100%; min-width:620px; border-collapse:collapse; text-align:start; font-size:.875rem; }
.nl-table th { background:var(--color-canvas, #f5f6f8); color:var(--color-g4, #4b5563); padding:9px 12px; white-space:nowrap; font-weight:650; text-align:start; }
.nl-table td { padding:10px 12px; vertical-align:middle; border-top:1px solid var(--color-line, #e5e7eb); }
.nl-table .nl-control { width:44px; padding-inline:6px; }
.nl-divider td { padding-block:7px; color:var(--color-g4, #4b5563); background:var(--color-canvas, #f5f6f8); font-size:.75rem; }
.nl-name { display:grid; grid-template-columns:34px minmax(0,1fr); align-items:center; gap:10px; min-width:160px; }
.nl-name > span:last-child, .nl-target { max-width:26ch; }
.nl-name strong, .nl-preview-copy strong { display:block; overflow-wrap:anywhere; }
.nl-name small, .nl-target small, .nl-preview-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--color-g4, #4b5563); }
.nl-icon { width:34px; height:34px; border-radius:8px; display:grid; place-items:center; color:var(--color-primary-hover); background:var(--color-primary-soft); }
.nl-icon svg, .nl-preview-end svg { width:16px; height:16px; display:block; }
.nl-kind { display:inline-block; font-weight:650; }
.nl-audience { min-width:9ch; max-width:20ch; overflow-wrap:anywhere; }
.nl-visible { margin:0; white-space:nowrap; }
.nl-grip { display:inline-grid; touch-action:none; }
.nl-grip button { cursor:grab; touch-action:none; }
.nl-grip-btn { display:inline-grid; place-items:center; width:1.9rem; height:1.9rem; border:0; border-radius:8px; background:transparent; color:var(--color-muted-foreground, #6b7280); }
.nl-grip-btn * { pointer-events:none; }
.nl-grip-btn:focus-visible { outline:2px solid var(--color-primary); outline-offset:1px; }
@media (hover:hover) and (pointer:fine) { .nl-grip-btn:hover { background:var(--color-muted, #f1f5f9); color:var(--color-foreground, #111827); } }
.nl-table .is-dragging .nl-grip button { cursor:grabbing; color:var(--color-primary); }
.nl-table .is-dragging { background:var(--color-primary-soft); }
/* Hidden from customers: the row stays readable but recedes; the switch and controls keep full strength. */
.nl-table tr.is-hidden td { background:var(--color-canvas, #f5f6f8); }
.nl-table tr.is-hidden .nl-name, .nl-table tr.is-hidden td:nth-child(3), .nl-table tr.is-hidden td:nth-child(4) { opacity:.55; }
.nl-table .is-drop-before td { box-shadow:inset 0 2px var(--color-primary); }
.nl-table .is-drop-after td { box-shadow:inset 0 -2px var(--color-primary); }
.nl-form { display:grid; gap:16px; }
.nl-form-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:20px; align-items:start; }
.nl-fields, .nl-field { min-width:0; display:grid; gap:10px; }
.nl-fields { padding:0; margin:0; border:0; }
.nl-file .ckn-upload-item { display:none; }
.nl-field > p, .nl-preview > p { margin:0; font-size:.875rem; font-weight:650; }
.nl-icons { display:flex; flex-wrap:wrap; gap:6px; }
.nl-icon-opt { display:inline-grid; place-items:center; width:2.25rem; height:2.25rem; border:1px solid var(--color-line, #e5e7eb); border-radius:8px; background:var(--color-paper, #fff); color:var(--color-g4, #4b5563); cursor:pointer; }
.nl-icon-opt * { pointer-events:none; }
.nl-icon-opt.on { border-color:var(--color-primary); background:var(--color-primary-soft); color:var(--color-primary); box-shadow:inset 0 0 0 1px var(--color-primary); }
.nl-icon-opt:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
@media (hover:hover) and (pointer:fine) { .nl-icon-opt:not(.on):hover { background:var(--color-canvas, #f5f6f8); color:var(--color-foreground, #111827); } }
.nl-file-current { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:6px 8px; border:1px solid var(--color-line, #e5e7eb); border-radius:8px; }
.nl-file-current > .nl-file-name { flex:1 1 12rem; min-width:0; text-align:start; overflow-wrap:anywhere; }
.nl-file-current small { white-space:nowrap; color:var(--color-g4, #4b5563); }
.nl-preview { min-width:0; display:grid; gap:8px; }
.nl-preview-card { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:58px; padding:8px; border:1px solid var(--color-line, #e5e7eb); border-radius:8px; }
.nl-preview-copy { min-width:0; font-size:.875rem; }
.nl-preview-end { display:flex; align-items:center; gap:4px; color:var(--color-g4, #4b5563); }
.nl-preview-end small { white-space:nowrap; font-variant-numeric:tabular-nums; }
.nl-preview-end.is-external svg { transform:rotate(-45deg); }
@media (max-width:680px) { .nl-form-grid { grid-template-columns:minmax(0,1fr); } }
.nc-switch b { display:block; font-size:.875rem; color:#171717; } .nc-switch small { display:block; font-size:.8125rem; color:#6b7280; }
.nc-sw { flex:none; width:36px; height:20px; margin-top:1px; border-radius:99px; background:#d1d5db; position:relative; transition:background-color .2s; }
.nc-sw::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgb(0 0 0 / .25); transition:transform .25s cubic-bezier(.16,1,.3,1); }
.nc-switch.on .nc-sw { background:var(--color-primary); } .nc-switch.on .nc-sw::after { transform:translateX(16px); }
.nc-drop { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; height:112px; padding:16px; border:1.5px dashed #cbd5e1;
  border-radius:12px; background:#fafafa; font:inherit; cursor:pointer; text-align:center; transition:border-color .15s, background-color .15s; }
.nc-drop:hover { border-color:var(--color-primary); background:var(--color-primary-soft); }
.nc-drop b { color:var(--color-primary); font-size:.9375rem; } .nc-drop small { color:#6b7280; font-size:.8125rem; }
.nc-cover { position:relative; border-radius:12px; overflow:hidden; aspect-ratio:16 / 9; max-width:440px; border:1px solid #e5e7eb; }
.nc-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.nc-cover-acts { position:absolute; right:8px; bottom:8px; display:flex; gap:6px; }
.nc-mini { height:30px; padding:0 12px; border-radius:8px; border:0; background:rgb(255 255 255 / .92); font:inherit; font-size:.8125rem; font-weight:600; color:#171717; cursor:pointer; }
.nc-mini.danger { color:#991b1b; }
.nc-tools { display:flex; flex-wrap:wrap; gap:4px; padding:4px; border:1px solid #e5e7eb; border-bottom:0; border-radius:10px 10px 0 0; background:#fafafa; }
.nc-tools button { height:30px; padding:0 10px; border:0; border-radius:7px; background:transparent; font:inherit; font-size:.8125rem; color:#374151; cursor:pointer; }
.nc-tools button:hover { background:#eef0f3; }
.nc-body textarea { border-top-left-radius:0 !important; border-top-right-radius:0 !important; min-height:220px; }
.nc-choices { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.nc-choices.two { grid-template-columns:repeat(2, minmax(0,1fr)); }
.nc-choice { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid #e5e7eb; border-radius:12px; background:#fff; text-align:left; font:inherit; cursor:pointer;
  transition:border-color .15s, background-color .15s, box-shadow .15s; }
.nc-choice:hover { border-color:#9ca3af; }
.nc-choice b { font-size:.875rem; color:#171717; } .nc-choice small { font-size:.75rem; color:#6b7280; line-height:1.4; }
.nc-choice.on { border-color:var(--color-primary); background:var(--color-primary-soft); box-shadow:0 0 0 1px var(--color-primary) inset; }
.nc-choice.on b { color:var(--color-primary-hover); }
.nc-feature-styles { min-width:0; margin:0; padding:0; border:0; container-type:inline-size; }
.nc-feature-styles .nc-choices { grid-template-columns:repeat(4, minmax(0,1fr)); }
@container (max-width: 560px) { .nc-feature-styles .nc-choices { grid-template-columns:repeat(2, minmax(0,1fr)); } }
.nc-feature-styles legend { margin-bottom:6px; }
.nc-feature-styles .nc-choice { flex-direction:row; align-items:center; gap:8px; min-height:44px; }
.nc-feature-styles input { flex:none; margin:0; accent-color:var(--color-primary); }
.nc-feature-styles .nc-choice:has(input:focus-visible) { outline:2px solid var(--color-primary); outline-offset:2px; }
.nc-feature-styles:disabled .nc-choice { border-color:#e5e7eb; background:#f6f6f7; box-shadow:none; cursor:default; }
.nc-feature-styles:disabled .nc-choice b, .nc-feature-hint { color:var(--color-g4, #4b5563); }
.nc-feature-hint { margin:6px 0 0; font-size:.8125rem; }
@media (prefers-reduced-motion: reduce) { .nc-feature-styles .nc-choice { transition:none; } }
.nc-choice.sev-minor.on { border-color:#ca8a04; background:#fefce8; box-shadow:0 0 0 1px #ca8a04 inset; } .nc-choice.sev-minor.on b { color:#854d0e; }
.nc-choice.sev-partial.on { border-color:#d97706; background:#fffbeb; box-shadow:0 0 0 1px #d97706 inset; } .nc-choice.sev-partial.on b { color:#92400e; }
.nc-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.nc-quick { display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:.8125rem; color:#6b7280; }
.nc-quick button { min-height:28px; padding:3px 10px; text-align:left; line-height:1.4; border:1px solid #e5e7eb; border-radius:99px; background:#fff; font:inherit; font-size:.8125rem; color:#374151; cursor:pointer; }
.nc-quick button:hover { border-color:var(--color-primary); color:var(--color-primary); }
.nc-stages { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:6px; }
.nc-stage { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; text-align:left; font:inherit; cursor:pointer; }
.nc-stage b { font-size:.8125rem; color:#171717; } .nc-stage small { font-size:.6875rem; color:#6b7280; }
.nc-stage.on { border-color:var(--color-primary); background:var(--color-primary-soft); box-shadow:0 0 0 1px var(--color-primary) inset; }
.nc-right { display:flex; justify-content:flex-end; }
.nc-preview { position:sticky; top:0; display:flex; flex-direction:column; gap:10px; padding:14px; border-radius:16px; background:#f6f6f7; }
.nc-pv-h { margin:0; font-size:.75rem; font-weight:700; color:#6b7280; letter-spacing:.02em; }
.nc-news-composer { grid-template-columns:minmax(0,1fr) minmax(0,420px); }
.nc-live-preview { min-width:0; }
.nc-preview-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.nc-preview-head h3 { margin:0; font-size:.9375rem; font-weight:700; }
.nc-preview-note { margin:8px 0 0; color:var(--color-g4, #4b5563); font-size:.8125rem; }
.nc-live-viewport { --nc-preview-width:1180px; position:relative; overflow:hidden; }
.nc-live-stage { display:flow-root; position:absolute; top:0; left:0; width:var(--nc-preview-width); transform-origin:top left; }
.nc-live-viewport.is-full-size { overflow:auto; }
.is-full-size > .nc-live-stage { position:static; margin-inline:auto; }
@media (max-width:960px) { .nc.nc-news-composer { grid-template-columns:minmax(0,1fr); } }
.nc-notice { display:flex; flex-direction:column; gap:6px; padding:14px; border-radius:14px; border:1px solid #e5e7eb; background:#fff; }
.nc-notice:not(.is-planned) { border-color:#fde68a; background:#fffbeb; }
.nc-notice.is-planned { border-color:#c7d8fb; background:#f5f8ff; }
.nc-notice.is-major { border-color:#fecaca; background:#fef8f8; }
.nc-notice-tag { align-self:flex-start; padding:2px 9px; border-radius:99px; font-size:.75rem; font-weight:600; background:#fef3c7; color:#92400e; }
.nc-notice.is-major .nc-notice-tag { background:#fee2e2; color:#991b1b; } .nc-notice.is-planned .nc-notice-tag { background:#dbeafe; color:#1e40af; }
.nc-notice-t { font-size:.9375rem; color:#171717; line-height:1.4; }
.nc-notice-x { font-size:.8125rem; color:#6b7280; }
.nc-notice-w { font-size:.75rem; color:#6b7280; }
.nc-steps { list-style:none; padding:0; display:flex; align-items:center; max-width:560px; margin-top:10px !important; font-size:.75rem; font-weight:600; line-height:1.25; }
.nc-steps li { flex:1 1 auto; min-width:0; display:flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; min-height:28px; padding:4px 11px 4px 16px;
  background:#e5e7eb; color:#6b7280; clip-path:polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%, 9px 50%); }
.nc-steps li + li { margin-left:-5px; }
.nc-steps li:first-child { padding-left:10px; border-radius:6px 0 0 6px; clip-path:polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); }
.nc-steps li:last-child { padding-right:10px; border-radius:0 6px 6px 0; clip-path:polygon(0 0, 100% 0, 100% 100%, 0 100%, 9px 50%); }
.nc-steps li:nth-child(1) { --st:#2563eb; --on:#fff; }
.nc-steps li:nth-child(2) { --st:#e6a000; --on:#fff; }
.nc-steps li:nth-child(2):is(.done, .now) { text-shadow:0 1px 1px rgba(120,70,0,.4); }
.nc-steps li:nth-child(3) { --st:#dc2626; --on:#fff; }
.nc-steps li:nth-child(4) { --st:#15803d; --on:#fff; }
.nc-steps li.done { background:color-mix(in srgb, var(--st) 52%, #fff); color:var(--on); }
.nc-steps li.now { background:var(--st); color:var(--on); min-height:36px; font-size:.8125rem; }
.nc-steps li.now::before { content:""; flex:none; width:7px; height:7px; border-radius:50%; background:currentColor; animation:nc-step-now 1.6s ease-in-out infinite; }
@keyframes nc-step-now { 50% { opacity:.3; } }
@media (prefers-reduced-motion: reduce) { .nc-steps li.now::before { animation:none; } }
.nc-tip { margin:0; font-size:.75rem; color:#6b7280; line-height:1.5; }
.nc-foot { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:18px; padding-top:14px; border-top:1px solid #eceef1; }
.nc-foot-note { margin-right:auto; font-size:.8125rem; color:#6b7280; }
:is(.nc-cat, .nc-switch, .nc-choice, .nc-stage, .nc-drop, .nc-quick button, .nc-tools button, .nc-mini):focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
@media (max-width: 960px) { .nc { grid-template-columns:1fr; } .nc-preview { position:static; } .nc-stages { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .nc-choices, .nc-choices.two, .nc-row { grid-template-columns:1fr; } }

/* จัดการข่าวสาร lists (src/apps/operation/docs/news.ts): news rows, service status cards, the holiday year. */
/* an icon inside a hand-written button is its own component: let the press land on the button, whose handler it is */
:is(.nm, .nm-menu) button * { pointer-events:none; }
.nm { display:flex; flex-direction:column; gap:14px; margin-top:16px; }
.nm-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.nm-seg { display:inline-flex; flex-wrap:wrap; gap:2px; padding:3px; border-radius:11px; background:#f3f4f6; }
.nm-seg button { display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 12px; border:0; border-radius:8px; background:transparent; font:inherit; font-size:.8125rem; color:#4b5563; cursor:pointer;
    transition:background-color var(--ckn-motion-fast,.12s), color var(--ckn-motion-fast,.12s); }
.nm-seg button span { min-width:20px; padding:0 6px; border-radius:99px; background:#e5e7eb; font-size:.6875rem; font-weight:600; line-height:18px; text-align:center; font-variant-numeric:tabular-nums; color:#4b5563; }
.nm-seg button:hover { color:#171717; }
.nm-seg button.on { background:#fff; color:#171717; font-weight:600; box-shadow:0 1px 2px rgb(0 0 0 / .08), 0 1px 1px rgb(0 0 0 / .04); }
.nm-seg button.on span { background:var(--color-primary); color:#fff; }
.nm-seg button span:empty { display:none; }
.nm-month { width:150px; max-width:100%; flex:none; }
.nm-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-left:auto; }
/* wide enough: the status pills, month, category and search stay on one line, search takes what is left (measured on the tab, not the window) */
[data-test="news-list"] { container-type:inline-size; }
@container (min-width: 960px) {
    .nm-bar { flex-wrap:nowrap; }
    .nm-bar .nm-seg { flex:none; flex-wrap:nowrap; white-space:nowrap; }
    .nm-bar .nm-seg button { padding:0 10px; }
    .nm-bar .nm-tools { flex:1 1 auto; flex-wrap:nowrap; justify-content:flex-end; min-width:0; }
    .nm-bar .nm-month { width:136px; }
    .nm-bar .nm-tools .nm-search { flex:0 1 240px; min-width:130px; width:auto; }
}
.nm-tools .nm-search { width:240px; }
@media (max-width: 760px) { .nm-tools { width:100%; } .nm-tools .nm-search, .nm-tools .nm-month { flex:1 1 200px; width:auto; } }
.nm-search { display:flex; align-items:center; gap:8px; width:min(320px, 100%); height:38px; padding:0 12px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; color:#9ca3af; }
.nm-search:focus-within { border-color:var(--color-primary); box-shadow:0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent); }
.nm-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; font:inherit; font-size:.875rem; color:#171717; }
.nm-search input::placeholder { color:#9ca3af; }

.nm-list { list-style:none; margin:0; padding:0; border:1px solid #e5e7eb; border-radius:14px; background:#fff; }
.nm-item { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 190px 92px auto; align-items:center; gap:16px; padding:12px 14px; border-top:1px solid #f0f1f3; }
.nm-item:first-child { border-top:0; }
.nm-item:hover { background:#fafafa; }
.nm-item:first-child { border-radius:14px 14px 0 0; } .nm-item:last-child { border-radius:0 0 14px 14px; } .nm-item:only-child { border-radius:14px; }
.nm-item.is-menu { z-index:2; }
.nm-item.is-quiet .nm-title, .nm-item.is-quiet .nm-thumb { opacity:.62; }
.nm-main { display:flex; align-items:center; gap:14px; min-width:0; padding:0; border:0; background:none; font:inherit; text-align:left; color:inherit; cursor:pointer; }
.nm-main:disabled { cursor:default; }
.nm-main:hover:not(:disabled) .nm-title { color:var(--color-primary); }
.nm-main:focus-visible { outline:2px solid var(--color-primary); outline-offset:4px; border-radius:8px; }
.nm-thumb { flex:none; width:104px; aspect-ratio:16 / 9; border-radius:8px; object-fit:cover; background:#f3f4f6; box-shadow:inset 0 0 0 1px rgb(0 0 0 / .04); }
.nm-tile { display:flex; align-items:flex-end; padding:6px 8px; font-size:.6875rem; font-weight:700; color:#4b5563; }
.nm-tile.is-important { background:#fef2f2; color:#991b1b; } .nm-tile.is-system-update { background:#eff6ff; color:#1d4ed8; }
.nm-tile.is-guide { background:#f0fdf4; color:#157f47; } .nm-tile.is-survey { background:#fff7ed; color:#c2410c; }
.nm-text { display:flex; flex-direction:column; gap:4px; min-width:0; }
.nm-title { display:block; font-size:.9375rem; font-weight:600; line-height:1.4; color:#171717; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; transition:color var(--ckn-motion-fast,.12s); }
.nm-pin { display:inline-flex; align-items:center; gap:3px; margin-right:6px; padding:1px 7px 1px 5px; border-radius:99px; background:var(--color-primary-soft); color:var(--color-primary); font-size:.6875rem; font-weight:600; vertical-align:2px; }
.nm-pin ckn-icon, .nm-pin svg { width:12px; height:12px; }
.nm-pin.is-feat { background:#eff6ff; color:#1d4ed8; }
.nm-mi:disabled { color:#9ca3af; cursor:not-allowed; background:none; }
.nm-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; font-size:.8125rem; color:#6b7280; min-width:0; }
.nm-meta > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.nm-cat { display:inline-flex; align-items:center; gap:6px; }
.nm-cat::before { content:""; width:7px; height:7px; border-radius:50%; background:#9ca3af; }
.nm-cat.is-important::before { background:#dc2626; } .nm-cat.is-system-update::before { background:#1d4ed8; } .nm-cat.is-guide::before { background:#16a34a; } .nm-cat.is-survey::before { background:#d97706; }
.nm-state { display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; }
.nm-state small { font-size:.75rem; color:#6b7280; line-height:1.35; }
.nm-badge { display:inline-flex; align-items:center; gap:6px; height:22px; padding:0 9px; border-radius:99px; font-size:.75rem; font-weight:600; background:#f3f4f6; color:#4b5563; white-space:nowrap; }
.nm-badge::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.8; }
.nm-badge.is-published, .nm-badge.is-resolved { background:#ecfdf3; color:#157f47; }
.nm-badge.is-scheduled { background:#eff6ff; color:#1d4ed8; }
.nm-badge.is-draft { background:#fff7ed; color:#b45309; }
.nm-badge.is-expired, .nm-badge.is-archived, .nm-badge.is-cancelled { background:#f3f4f6; color:#6b7280; }
.nm-reads { display:flex; flex-direction:column; align-items:flex-end; text-align:right; }
.nm-reads b { font-size:1rem; font-weight:700; color:#171717; font-variant-numeric:tabular-nums; }
.nm-reads small { font-size:.6875rem; color:#9ca3af; white-space:nowrap; }
.nm-acts { display:flex; align-items:center; justify-content:flex-end; gap:6px; }
.nm-btn { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 11px; border:1px solid #e5e7eb; border-radius:9px; background:#fff; font:inherit; font-size:.8125rem; font-weight:500; color:#374151; cursor:pointer; white-space:nowrap;
    transition:border-color var(--ckn-motion-fast,.12s), color var(--ckn-motion-fast,.12s), background-color var(--ckn-motion-fast,.12s); }
.nm-btn ckn-icon, .nm-btn svg { width:15px; height:15px; }
.nm-btn:hover { border-color:var(--color-primary); color:var(--color-primary); }
.nm-btn.icon { width:32px; padding:0; justify-content:center; }
.nm-btn.icon[aria-expanded="true"] { border-color:var(--color-primary); color:var(--color-primary); background:var(--color-primary-soft); }
.nm-btn.primary { border-color:var(--color-primary); background:var(--color-primary); color:#fff; }
.nm-btn.primary:hover { background:var(--color-primary-hover); border-color:var(--color-primary-hover); color:#fff; }
.nm-btn.danger:hover { border-color:#dc2626; color:#dc2626; }
.nm-btn:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
.nm-more { position:relative; display:inline-flex; }
.nm-menu { position:fixed; z-index:60; display:flex; flex-direction:column; min-width:224px; padding:5px; border-radius:12px; background:#fff;
    border:1px solid #e5e7eb; box-shadow:0 12px 28px -8px rgb(17 24 39 / .18), 0 2px 6px rgb(17 24 39 / .06); transform-origin:top right; animation:nm-pop .16s cubic-bezier(.16,1,.3,1); }
@keyframes nm-pop { from { opacity:0; transform:scale(.96) translateY(-4px); } }
.nm-menu.is-up { transform-origin:bottom right; }
.nm-mi { display:flex; align-items:center; gap:10px; height:36px; padding:0 10px; border:0; border-radius:8px; background:none; font:inherit; font-size:.8125rem; color:#374151; text-align:left; cursor:pointer; }
.nm-mi ckn-icon, .nm-mi svg { width:15px; height:15px; color:#9ca3af; }
.nm-mi:hover, .nm-mi:focus-visible { background:#f6f6f7; color:#171717; outline:0; }
.nm-mi.danger { margin-top:4px; border-top:1px solid #f0f1f3; border-radius:0 0 8px 8px; color:#b91c1c; }
.nm-mi.danger ckn-icon, .nm-mi.danger svg { color:#dc2626; }
.nm-mi.danger:hover { background:#fef2f2; color:#991b1b; }
.nm-moreall { align-self:center; height:34px; padding:0 16px; border:1px solid #e5e7eb; border-radius:99px; background:#fff; font:inherit; font-size:.8125rem; color:#374151; cursor:pointer; }
.nm-moreall:hover { border-color:var(--color-primary); color:var(--color-primary); }
.nm-empty { display:flex; flex-direction:column; align-items:center; gap:6px; padding:48px 16px; border:1px dashed #e5e7eb; border-radius:14px; text-align:center; }
.nm-empty b { font-size:.9375rem; color:#171717; } .nm-empty span { font-size:.8125rem; color:#6b7280; max-width:46ch; }
.nm-empty div { margin-top:8px; }
.nm-skel { display:flex; flex-direction:column; gap:8px; }
.nm-skel i { height:66px; border-radius:12px; background:linear-gradient(90deg, #f3f4f6 30%, #fafafa 50%, #f3f4f6 70%) 0 0 / 300% 100%; animation:nm-shine 1.4s linear infinite; }
@keyframes nm-shine { to { background-position:-150% 0; } }

/* the news table on จัดการข่าวสาร (src/apps/operation/docs/news.ts): a real table, compact rows, sortable headers */
.nt-wrap { border:1px solid #e5e7eb; border-radius:14px; background:#fff; overflow-x:auto; }
.nt { width:100%; border-collapse:separate; border-spacing:0; font-size:.875rem; }
.nt th { position:sticky; top:0; z-index:1; padding:0; background:#fafafa; border-bottom:1px solid #e5e7eb; text-align:left; font-weight:600; white-space:nowrap; }
.nt th:first-child { border-top-left-radius:14px; } .nt th:last-child { border-top-right-radius:14px; }
.nt-sort { display:inline-flex; align-items:center; gap:4px; width:100%; padding:10px 14px; border:0; background:none; font:inherit; font-size:.75rem; color:#6b7280; cursor:pointer; letter-spacing:.01em; }
.nt-sort:hover { color:#171717; }
.nt-sort ckn-icon, .nt-sort svg { width:12px; height:12px; opacity:0; transition:transform .15s, opacity .15s; }
.nt-sort:hover ckn-icon, .nt-sort:hover svg { opacity:.5; }
.nt-sort.is-on { color:#171717; } .nt-sort.is-on ckn-icon, .nt-sort.is-on svg { opacity:1; }
.nt-sort.is-asc ckn-icon, .nt-sort.is-asc svg { transform:rotate(180deg); }
.nt-col-num .nt-sort { justify-content:flex-end; }
.nt td { padding:10px 14px; border-bottom:1px solid #f0f1f3; vertical-align:middle; color:#171717; }
.nt tbody tr:last-child td { border-bottom:0; }
.nt tbody tr:hover td { background:#fafafa; }
/* Rows that sit on top for customers stand apart: in "What's new" a soft blue, pinned a soft red. */
.nt tbody tr.is-featured td { background:#e3ecfe; } .nt tbody tr.is-featured:hover td { background:#d6e3fd; }
.nt tbody tr.is-pinned td { background:#fde5e5; } .nt tbody tr.is-pinned:hover td { background:#fbd7d7; }
.nt tr.is-quiet .nt-title, .nt tr.is-quiet .nt-thumb { opacity:.6; }
.nt tr.is-menu { position:relative; z-index:2; }
.nt-news-td { width:100%; max-width:0; min-width:300px; }
.nt-news { display:flex; align-items:center; gap:12px; min-width:0; }
.nt-thumb { flex:none; width:64px; height:36px; border-radius:6px; object-fit:cover; background:#f3f4f6; box-shadow:inset 0 0 0 1px rgb(0 0 0 / .05); }
.nt-tile { display:grid; place-items:center; padding:0; font-size:.8125rem; font-weight:700; }
.nt-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.nt-title { display:block; max-width:100%; padding:0; border:0; background:none; font:inherit; font-weight:600; color:#171717; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; transition:color .12s; }
.nt-title:hover:not(:disabled) { color:var(--color-primary); } .nt-title:disabled { cursor:default; }
.nt-title:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; border-radius:4px; }
.nt-meta { display:flex; align-items:center; gap:8px; min-width:0; font-size:.75rem; color:#6b7280; white-space:nowrap; }
.nt-pin { display:inline-flex; color:var(--color-primary); } .nt-pin ckn-icon, .nt-pin svg { width:13px; height:13px; }
.nt-pin svg { fill:currentColor; }   /* the page's own solid bookmark (the theme sprite is outline only) */
.nt-feat { padding:0 7px; border-radius:99px; background:#eff6ff; color:#1d4ed8; font-weight:600; line-height:18px; }
.nt-aud { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.nt-stack { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.nt-sub { font-size:.75rem; color:#6b7280; white-space:nowrap; }
.nt-who { max-width:140px; overflow:hidden; text-overflow:ellipsis; }
.nt-state-td, .nt-date-td, .nt-upd-td, .nt-act-td { white-space:nowrap; }
.nt-date-td, .nt-num-td { font-variant-numeric:tabular-nums; }
.nt-num-td { text-align:right; font-weight:600; }
.nt-ago { font-size:.8125rem; }
.nt-act-td .nm-acts { justify-content:flex-end; }
.nt-empty-row td { padding:0; }
.nt-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:40px 16px; color:#6b7280; text-align:center; }
.nt :is(button) * { pointer-events:none; }

/* service status */
.nm-sec { display:flex; flex-direction:column; gap:10px; }
.nm-h { display:flex; align-items:center; gap:8px; margin:6px 0 0; font-size:.875rem; font-weight:700; color:#374151; }
.nm-h > span { min-width:22px; padding:0 7px; border-radius:99px; background:#f3f4f6; font-size:.6875rem; line-height:20px; text-align:center; color:#4b5563; }
.nm-link { margin-left:auto; border:0; background:none; font:inherit; font-size:.8125rem; font-weight:500; color:#6b7280; cursor:pointer; }
.nm-link:hover { color:var(--color-primary); }
.nm-cards { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(360px, 1fr)); gap:12px; }
.ns-card { position:relative; display:flex; flex-direction:column; gap:10px; padding:16px; border-radius:14px; border:1px solid #e5e7eb; background:#fff; }
.ns-card.is-menu { z-index:2; }
/* Flat tints, no gradient: incidents soft amber, full outage soft red, maintenance soft blue. */
.ns-card.is-active:not(.is-maint) { border-color:#fde68a; background:#fffbeb; }
.ns-card.is-active.is-maint, .ns-card.is-planned { border-color:#c7d8fb; background:#f5f8ff; }
.ns-card.is-active.sev-major { border-color:#fecaca; background:#fef8f8; }
.ns-card.is-draft { border-style:dashed; }
.ns-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px 12px; }
.ns-tag { padding:2px 10px; border-radius:99px; font-size:.75rem; font-weight:600; background:#f3f4f6; color:#4b5563; }
.is-active .ns-tag { background:#fef3c7; color:#92400e; }
.is-active.sev-major .ns-tag { background:#fee2e2; color:#991b1b; }
.is-active.is-maint .ns-tag, .is-planned .ns-tag { background:#dbeafe; color:#1e40af; }
.is-draft .ns-tag { background:#fff7ed; color:#b45309; }
.ns-when { display:inline-flex; align-items:flex-start; gap:5px; line-height:1.5; font-size:.75rem; color:#6b7280; }
.ns-when ckn-icon, .ns-when svg, .ns-aud ckn-icon, .ns-aud svg { width:13px; height:13px; }
.ns-when ckn-icon { flex:none; margin-top:.2em; }
.ns-title { padding:0; border:0; background:none; font:inherit; font-size:1rem; font-weight:600; line-height:1.45; color:#171717; text-align:left; cursor:pointer; }
.ns-title:hover:not(:disabled) { color:var(--color-primary); } .ns-title:disabled { cursor:default; }
.ns-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:10px; border-top:1px solid rgb(0 0 0 / .06); }
.ns-aud { display:inline-flex; align-items:center; gap:5px; min-width:0; font-size:.75rem; color:#6b7280; }
.nm-calm { display:flex; flex-wrap:wrap; align-items:center; gap:14px; padding:16px 18px; border-radius:14px; background:#f6faf7; border:1px solid #d7eedf; }
.nm-calm > span:nth-child(2) { flex:1; min-width:220px; display:flex; flex-direction:column; gap:2px; }
.nm-calm b { font-size:.9375rem; color:#14532d; } .nm-calm small { font-size:.8125rem; color:#4b6b57; }
.nm-calm-i { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#dcfce7; color:#157f47; }
.nm-sec.is-past .nm-item { grid-template-columns:minmax(0,1fr) 150px auto; }

/* holidays */
.nh-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; }
.nh-year { display:inline-flex; align-items:center; gap:2px; }
.nh-year strong { min-width:88px; text-align:center; font-size:1.125rem; color:#171717; font-variant-numeric:tabular-nums; }
.nh-sum { font-size:.8125rem; color:#6b7280; } .nh-sum b { color:#171717; font-variant-numeric:tabular-nums; }
.nh-next { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:99px; background:var(--color-primary-soft); font-size:.8125rem; color:var(--color-primary-hover); }
.nh-next ckn-icon, .nh-next svg { width:14px; height:14px; color:var(--color-primary); }
.nh-next em { font-style:normal; font-weight:600; color:var(--color-primary); }
.nh-tools { margin-left:auto; }
.nh-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; align-items:start; }
.nh-month { display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:14px; border:1px solid #d9dce1; background:#fff; }
.nh-month.is-now { border-color:var(--color-primary); box-shadow:0 0 0 1px var(--color-primary) inset; }
.nh-month.is-empty { background:#fff; }
.nh-month h3 { display:flex; align-items:center; justify-content:space-between; margin:0 0 4px; font-size:.875rem; font-weight:700; color:#171717; }
.nh-month h3 span { min-width:20px; padding:0 6px; border-radius:99px; background:#f3f4f6; font-size:.6875rem; line-height:18px; text-align:center; color:#4b5563; }
.nh-month.is-now h3 span { background:var(--color-primary); color:#fff; }
/* a month box is always four days tall; more days scroll inside it */
.nh-items > * { flex:none; }
.nh-items { display:flex; flex-direction:column; gap:2px; height:166px; overflow-y:auto; margin:0 -6px; padding:0 6px; scrollbar-width:thin; scrollbar-color:#d9dce1 transparent; overscroll-behavior:contain; }
.nh-item { display:flex; align-items:center; gap:10px; width:100%; padding:3px 6px; margin:0 -6px; width:calc(100% + 12px); border:0; border-radius:8px; background:none; font:inherit; text-align:left; cursor:pointer; color:#171717; }
.nh-item { position:relative; }
.nh-item::after { content:""; position:absolute; bottom:-1px; left:50px; right:50px; height:0; border-top:1px solid #d9dce1; }
.nh-item:hover::after { opacity:0; }
.nh-item:last-of-type::after { display:none; }
.nh-item:hover:not(:disabled) { background:#f6f6f7; } .nh-item:hover:not(:disabled) .nh-n { color:var(--color-primary); }
.nh-item:disabled { cursor:default; }
.nh-item:focus-visible { outline:2px solid var(--color-primary); outline-offset:0; }
.nh-d { flex:none; display:flex; flex-direction:column; align-items:center; justify-content:center; width:34px; height:34px; border-radius:9px; background:#f3f4f6; line-height:1.05; }
.nh-d b { font-size:.9375rem; font-variant-numeric:tabular-nums; } .nh-d small { font-size:.625rem; color:#6b7280; }
.nh-n { font-size:.8125rem; line-height:1.35; transition:color var(--ckn-motion-fast,.12s); }
.nh-item.is-weekend .nh-d small { color:#b91c1c; }
.nh-item.is-past { color:#6b7280; } .nh-item.is-past .nh-d { background:#f6f6f7; } .nh-item.is-past .nh-d b { color:#6b7280; }
.nh-item.is-next .nh-d { background:var(--color-primary); } .nh-item.is-next .nh-d b, .nh-item.is-next .nh-d small { color:#fff; } .nh-item.is-next .nh-n { font-weight:600; }
.nh-item.is-event .nh-d { width:auto; min-width:34px; padding-inline:5px; background:#fef3c7; color:#92400e; }
.nh-item.is-event .nh-d small { color:inherit; }
.nh-none { font-size:.75rem; color:#9ca3af; }
.nh-events { display:grid; gap:10px; margin-top:12px; }
.nh-events h2 { margin:0; color:#171717; font-size:1rem; font-weight:700; }
.nh-events-list { list-style:none; margin:0; padding:0; border:1px solid #d9dce1; border-radius:12px; background:#fff; }
.nh-events-list li { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; padding:8px 12px; }
.nh-events-list li + li { border-top:1px solid #eceef1; }
.nh-event-copy { flex:1 1 220px; display:grid; gap:2px; min-width:0; overflow-wrap:anywhere; font-size:.875rem; }
.nh-event-copy span, .nh-event-timezone { font-size:.8125rem; color:#4b5563; }
.nh-event-state { border-radius:6px; padding:2px 7px; background:#f3f4f6; color:#4b5563; font-size:.75rem; font-weight:600; }
.nh-event-state.is-ok { background:#dcfce7; color:#166534; }
.nh-event-actions { display:flex; gap:4px; margin-inline-start:auto; }
.nh-event-form { display:grid; gap:12px; }
.nh-event-form .nc-switch { justify-self:start; }
.nh-event-form .nc-body textarea { min-height:140px; }
.nh-event-timezone { margin-top:-6px; }
@media (prefers-reduced-motion: reduce) {
    .nh-item.is-event .nh-n, .nh-event-form .nc-sw, .nh-event-form .nc-sw::after { transition:none; }
}
.nh-howto { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.nh-howto li { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.nh-howto .nh-no { flex:none; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:var(--color-primary); color:#fff; font-size:.75rem; font-weight:700; }
.nh-howto li > div { flex:1 1 220px; min-width:0; display:flex; flex-direction:column; }
.nh-howto li > :last-child:not(div):not(.nh-no) { flex:none; margin-left:auto; } .nh-howto b { font-size:.875rem; } .nh-howto small { font-size:.75rem; color:#6b7280; }

@media (max-width: 1180px) { .nh-grid { grid-template-columns:repeat(3, minmax(0,1fr)); } .nm-item { grid-template-columns:minmax(0,1fr) 170px auto; } .nm-reads { display:none; } }
@media (max-width: 760px) {
    .nh-grid { grid-template-columns:repeat(2, minmax(0,1fr)); } .nm-cards { grid-template-columns:1fr; }
    .nm-item, .nm-sec.is-past .nm-item { grid-template-columns:minmax(0,1fr) auto; } .nm-state { grid-column:1; grid-row:2; flex-direction:row; align-items:center; gap:8px; }
    .nm-acts { grid-column:2; grid-row:1 / span 2; } .nm-thumb { width:72px; } .nm-search { width:100%; }
}
@media (max-width: 480px) { .nh-grid { grid-template-columns:1fr; } .nm-acts .nm-btn:not(.icon):not(.primary) { display:none; } }
@media (prefers-reduced-motion: reduce) { .nm-menu { animation:none; } .nm-skel i { animation:none; } }

/* Portal MA agreements (src/apps/customers/portal/agreements.ts rowClass): a rounded status mark set in from the row's
   left edge, the first column moved right to clear it, and the agreement number in semibold. */
.ma-agreements :is(th, td):first-child { padding-left: 1.125rem; }
tr[class*="ma-mark-"] > td:first-child { position: relative; font-weight: 600; }
tr[class*="ma-mark-"] > td:first-child [data-part="cellNote"] { font-weight: 400; }
tr[class*="ma-mark-"] > td:first-child::before { content: ""; position: absolute; left: 0; top: .875rem; bottom: .875rem; width: 4px; border-radius: 4px; background: var(--ma-mark); }
tr.ma-mark-ok { --ma-mark: var(--color-ok); }
tr.ma-mark-soon { --ma-mark: var(--color-warn); }
tr.ma-mark-ended { --ma-mark: var(--color-err); }
tr.ma-mark-pending { --ma-mark: var(--color-g3); }

/* Ticket pictures (Portal new ticket + case page): the theme's ckn.css has no max-h-24 / max-h-[…] utilities, so the size
   lives here. A small thumbnail or chat preview; a click opens the full picture in the file pop-up (shared/file-preview.ts). */
.ticket-thumb { display: block; height: 6rem; width: auto; max-width: 10rem; object-fit: cover; }
.ticket-chat-img { display: block; width: auto; height: auto; max-height: 10rem; max-width: min(100%, 15rem); object-fit: contain; }
.file-preview-img { max-height: 68vh; }
.ticket-file-thumb { flex: none; width: 2.5rem; height: 2.5rem; object-fit: cover; }

/* Portal ticket page (src/apps/customers/portal/ticket.ts, design 1A friendly): a large title; one compact action card that says
   whose turn it is (amber = the customer's, blue = the team at work, grey = waiting on someone else, green = done) with its
   buttons and the key dates in one line; the properties with CC; the page ends at the files; the chat is a widget at the bottom right, like a messaging
   app (the team left, the customer right) where status moves are coloured dividers. Layout and sizes the theme's compiled utilities do not have live here. */
.tp-title { margin: .25rem 0 .375rem; font-size: 1.75rem; line-height: 1.3; font-weight: 700; color: var(--color-ink); }
.tp-h2 { margin: 2rem 0 .5rem; font-size: 1.125rem; font-weight: 600; color: var(--color-ink); scroll-margin-top: 1rem; }
.tp-body { font-size: .9375rem; line-height: 1.65; }
/* the head: the title, then the action card under it as a wide, low strip of one fixed height:
   [whose turn · headline · note] [main action + เพิ่มเติม] [the dates]; it never grows or shrinks with the case (except while a
   reason box is open). On a phone its three parts stack. */
.tp-head { display: flex; flex-direction: column; gap: 1rem; }
.tp-head .tp-hero { margin-top: 0; min-height: 6.25rem; box-sizing: border-box; padding: .625rem 1rem; flex-direction: row; align-items: center; gap: 1rem; overflow: hidden; }
.tp-head .tp-hero-row { flex: 1 1 auto; min-width: 0; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; }
.tp-head .tp-hero-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.tp-head .tp-hero-title { font-size: .9375rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tp-head .tp-turn { height: auto; padding: 0; border: 0; background: none; font-size: .6875rem; letter-spacing: .02em; }
.tp-head .tp-hero-note { -webkit-line-clamp: 2; }
.tp-head .tp-facts { flex: 0 0 auto; flex-direction: column; gap: 0; margin: 0; padding: 0 0 0 1rem; border-top: 0; border-left: 1px solid rgba(15, 15, 15, .08);
  font-size: .75rem; line-height: 1.55; white-space: nowrap; }
/* a reason box (ask for changes / hold) needs room: the card grows only while it is open (class set by the page) */
.tp-head .tp-hero.is-form { height: auto; flex-direction: column; align-items: stretch; }
.tp-head .tp-hero.is-form .tp-facts { display: none; }
/* every action in view: a second row (at most) inside the fixed-height card rather than a "More" menu */
.tp-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; align-items: center; flex: 0 1 auto; max-width: 30rem; }
.tp-st { margin-top: 1rem; }
@media (max-width: 720px) { .tp-head .tp-hero { height: auto; flex-direction: column; align-items: stretch; }
  .tp-head .tp-hero-row { flex-direction: column; align-items: stretch; } .tp-head .tp-facts { padding: .5rem 0 0; border-left: 0; border-top: 1px solid rgba(15, 15, 15, .08); } }
/* the status card: badge + since + "step n of m", then the line of steps (done = green tick, now = coloured ring by whose turn,
   to come = grey ring); scrolls sideways on a narrow screen rather than squeezing the labels */
.tp-st { margin-top: 1rem; padding: 1rem 1.25rem 1.125rem; border: 1px solid var(--color-line); border-radius: .75rem; background: var(--color-paper); scroll-margin-top: 1rem; }
.tp-st-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1.125rem; }
.tp-pill-lg { padding: .1875rem .75rem; font-size: .875rem; font-weight: 700; }
/* padding inside the scroll box so the current step's ring (box-shadow) is not clipped by overflow */
.tp-steps { list-style: none; margin: -.875rem; padding: .875rem .875rem 1rem; display: flex; overflow-x: auto; }
.tp-step { flex: 1 1 0; min-width: 6.75rem; display: flex; flex-direction: column; gap: .375rem; padding-right: .25rem; }
.tp-step-mark { display: flex; align-items: center; }
.tp-step-dot { flex: none; width: 1.375rem; height: 1.375rem; border-radius: 50%; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  border: 2px solid #d3d1cb; background: var(--color-paper); color: #fff; }
.tp-step-line { flex: 1; height: 2px; margin: 0 .25rem; background: #e9e9e7; }
.tp-step:last-child .tp-step-line { visibility: hidden; }
.tp-step-label { font-size: .8125rem; font-weight: 500; color: var(--color-ink); line-height: 1.35; }
.tp-step-sub { font-size: .75rem; color: var(--color-g4); }
.tp-step.is-todo .tp-step-label { color: var(--color-g4); font-weight: 400; }
.tp-step.is-done .tp-step-dot { border-color: #448361; background: #448361; }
/* a step the case went past without entering: dashed, quiet (the line through it is still done) */
.tp-step.is-skip .tp-step-dot { border-style: dashed; border-color: #c7c6c3; background: transparent; }
.tp-step.is-skip .tp-step-label { color: var(--color-g4); font-weight: 400; }
.tp-step.line-done .tp-step-line { background: #448361; }
.tp-step.is-now .tp-step-dot { border-width: .375rem; box-shadow: 0 0 0 .25rem var(--ring); border-color: var(--mark); }
.tp-step.is-now .tp-step-label { font-weight: 700; color: var(--mark-ink); }
.tp-step.is-now .tp-step-sub { color: var(--mark-ink); font-weight: 600; }
/* the current step is alive: its core blinks in the step's colour and the ring glows with it (one 1.6 s beat); still for a
   paused (Hold) or stopped case and for reduced motion */
.tp-step.is-now .tp-step-dot { position: relative; animation: tp-glow 1.6s ease-in-out infinite; }
.tp-step.is-now .tp-step-dot::before { content: ""; position: absolute; inset: 0; margin: auto; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--mark); animation: tp-blink 1.6s ease-in-out infinite; }
@keyframes tp-glow { 0%, 100% { box-shadow: 0 0 0 .25rem var(--ring); } 50% { box-shadow: 0 0 0 .4375rem var(--ring), 0 0 .75rem .1875rem var(--mark); } }
@keyframes tp-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .15; transform: scale(.6); } }
.tp-step.is-hold .tp-step-dot, .tp-step.is-stop .tp-step-dot, .tp-step.is-hold .tp-step-dot::before, .tp-step.is-stop .tp-step-dot::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .tp-step.is-now .tp-step-dot, .tp-step.is-now .tp-step-dot::before { animation: none; } }
.tp-step.is-you { --mark: #cb912f; --ring: #fdecc8; --mark-ink: #5c3b0b; }
.tp-step.is-work { --mark: #337ea9; --ring: #d3e5ef; --mark-ink: #183347; }
.tp-step.is-hold { --mark: #9b9a97; --ring: #e9e9e7; --mark-ink: #5f5e5b; }
.tp-step.is-stop { --mark: #c4554d; --ring: #ffe2dd; --mark-ink: #5d1715; }
.tp-hero { margin-top: 1rem; padding: .75rem 1rem; border-radius: .625rem; border: 1px solid var(--color-line); background: var(--color-paper); display: flex; flex-direction: column; gap: .5rem; scroll-margin-top: 1rem; }
.tp-hero.is-todo { background: #fff8e6; border-color: #ebcb80; }
.tp-hero.is-work { background: #f3f7fc; border-color: #c9dceb; }
.tp-hero.is-wait { background: var(--color-g1); }
.tp-hero.is-done { background: #eef6ef; border-color: #cfe3d1; }
.tp-hero.is-stop { background: #fdf3f2; border-color: #f1c9c4; }
.tp-hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.tp-hero-title { font-size: .9375rem; font-weight: 600; color: var(--color-ink); }
.tp-turn { display: inline-flex; align-items: center; gap: .375rem; height: 1.375rem; padding: 0 .5rem; border-radius: .6875rem; background: var(--color-paper);
  border: 1px solid var(--color-line); font-size: .75rem; font-weight: 700; color: var(--color-ink); white-space: nowrap; }
.tp-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--color-g3); }
.tp-hero.is-todo .tp-turn { border-color: #ebcb80; color: #5c3b0b; } .tp-hero.is-todo .tp-dot { background: #cb912f; }
.tp-hero.is-work .tp-turn { border-color: #c9dceb; color: #183347; } .tp-hero.is-work .tp-dot { background: #337ea9; }
.tp-hero.is-done .tp-turn { border-color: #cfe3d1; color: #1c3829; } .tp-hero.is-done .tp-dot { background: #448361; }
.tp-hero.is-stop .tp-turn { border-color: #f1c9c4; color: #5d1715; } .tp-hero.is-stop .tp-dot { background: #c4554d; }
.tp-facts { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding-top: .5rem; border-top: 1px solid rgba(15, 15, 15, .07); font-size: .8125rem; color: var(--color-g4); }
.tp-props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; margin-top: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--color-line); }
.tp-prop { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: center; gap: .5rem; min-height: 2.125rem; }
.tp-prop-wide { grid-column: 1 / -1; align-items: start; padding-top: .375rem; }
.tp-cc-add { padding-bottom: .5rem; margin-bottom: .25rem; border-bottom: 1px dashed var(--color-line); }
.tp-file { display: inline-flex; align-items: center; gap: .5rem; padding: .4375rem .75rem; border: 1px solid var(--color-line); border-radius: .375rem;
  background: var(--color-paper); color: var(--color-ink); font: inherit; text-decoration: none; cursor: pointer; }
.tp-file:hover { background: var(--color-g1); }
.tp-chat { display: flex; flex-direction: column; gap: .75rem; }
.tp-row { display: flex; flex-direction: column; gap: .125rem; max-width: 85%; }
.tp-row.team { align-self: flex-start; align-items: flex-start; }
.tp-row.me { align-self: flex-end; align-items: flex-end; }
.tp-meta { margin: 0; font-size: .75rem; color: var(--color-g4); }
.tp-bub { padding: .5rem .875rem; font-size: .9375rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.tp-bub.team { border-radius: .25rem .875rem .875rem .875rem; background: var(--color-g1); border: 1px solid var(--color-line); }
.tp-bub.me { border-radius: .875rem .25rem .875rem .875rem; background: color-mix(in srgb, var(--color-accent) 12%, var(--color-paper)); }
.tp-sep { display: flex; align-items: center; gap: .625rem; margin: .5rem 0 .25rem; }
.tp-sep::before, .tp-sep::after { content: ""; flex: 1; height: 1px; background: var(--color-line); }
.tp-pill { display: inline-flex; align-items: center; gap: .375rem; padding: .125rem .625rem; border-radius: .75rem; font-size: .75rem; font-weight: 600;
  background: var(--color-g1); color: var(--color-g4); white-space: nowrap; }
.tp-pill::before { content: ""; width: .4375rem; height: .4375rem; border-radius: 50%; background: currentColor; }
.tp-pill.tone-ok { background: #dbeddb; color: #1c3829; }
.tp-pill.tone-warn, .tp-pill.tone-pend { background: #fdecc8; color: #5c3b0b; }
.tp-pill.tone-err { background: #ffe2dd; color: #5d1715; }
.tp-pill.tone-info { background: #d3e5ef; color: #183347; }
.tp-pill.tone-past { background: var(--color-g1); color: var(--color-g4); }
.tp-evt { align-self: center; font-size: .8125rem; color: var(--color-g4); text-align: center; }
/* the chat widget: a round button at the bottom right, the panel above it (full screen less a margin on a phone) */
.tp-launch { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 6px 20px rgba(15, 15, 15, .22); }
.tp-launch:hover { background: var(--color-primary-hover); }
.tp-launch:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-primary) 40%, transparent); outline-offset: 2px; }
.tp-launch-dot { position: absolute; top: .375rem; right: .375rem; width: .75rem; height: .75rem; border-radius: 50%; background: var(--color-err); border: 2px solid var(--color-paper); }
.tp-cb { position: fixed; right: 1.25rem; bottom: 5.5rem; z-index: 40; width: 24rem; height: min(40rem, calc(100vh - 7.5rem)); display: none; flex-direction: column;
  border-radius: 1rem; overflow: hidden; background: var(--color-paper); box-shadow: 0 12px 40px rgba(15, 15, 15, .22); }
.tp-cb.is-open { display: flex; }
.tp-cb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1rem 1rem .875rem 1.25rem; background: var(--color-primary); color: var(--color-on-primary); }
.tp-cb-title { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.tp-cb-sub { margin: .125rem 0 0; font-size: .8125rem; opacity: .85; }
.tp-cb-x { flex: none; width: 2rem; height: 2rem; border: 0; border-radius: .5rem; background: transparent; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tp-cb-x:hover { background: rgba(255, 255, 255, .15); }
.tp-cb-note { margin: 0; padding: .5rem 1rem; font-size: .75rem; color: var(--color-g4); background: var(--color-g1); border-bottom: 1px solid var(--color-line); }
.tp-cb-body { flex: 1; min-height: 0; overflow-y: auto; padding: .875rem 1rem; }
.tp-cb-foot { padding: .625rem .75rem .75rem; border-top: 1px solid var(--color-line); }
@media (max-width: 560px) { .tp-cb { left: .5rem; right: .5rem; top: 4rem; bottom: 5rem; width: auto; height: auto; } .tp-launch { right: .875rem; bottom: .875rem; } }
#tp-detail, #tp-files { scroll-margin-top: 1rem; }
@media (max-width: 720px) { .tp-props { grid-template-columns: minmax(0, 1fr); } .tp-title { font-size: 1.375rem; } .tp-row { max-width: 92%; } }

/* ── Sign-in pages (design 3.1, 3 Dec 2026): /login and /portal/login draw the whole page inside the bare ckn-auth card
   (src/apps/identity/auth.ts Login, src/apps/customers/portal/login.ts PortalLogin). The synced theme stays untouched:
   :has(.iw-login) opens its shell up (no brand row, no card frame) so the page owns the full viewport. ── */
@font-face { font-family:'DM Serif Display'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/dm-serif-display/dm-serif-display-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'DM Serif Display'; font-style:italic; font-weight:400; font-display:swap; src:url('/fonts/dm-serif-display/dm-serif-display-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/manrope/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:800; font-display:swap; src:url('/fonts/manrope/manrope-latin-800-normal.woff2') format('woff2'); }
.ckn-auth-body:has(.iw-login) .ckn-auth-shell { display: block; min-height: 100dvh; padding: 0; background: #f2f8ff; }
.ckn-auth-body:has(.iw-login) .ckn-auth-brand { display: none; }
.ckn-auth-body:has(.iw-login) .ckn-auth-card { max-width: none; padding: 0; border: 0; border-radius: 0; background: none; animation: none; }
.ckn-auth-body:has(.iw-login) .works-language-auth { top: 1.75rem; right: clamp(20px, 5vw, 72px); z-index: 2; }
.iw-login { position: relative; isolation: isolate; overflow: clip; min-height: 100dvh; display: flex; flex-direction: column; background: #f2f8ff; color: #0b1f44; }
.iw-login--team { background: #dcebff; }
.iw-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.iw-blob { position: absolute; border-radius: 50%; filter: blur(110px); }
.iw-login--team .iw-blob-1 { width: 620px; height: 620px; left: -260px; bottom: -380px; background: radial-gradient(circle at 30% 30%, #a9d4ff, #5ba8ff); opacity: .45; }
.iw-login--team .iw-blob-2 { width: 620px; height: 620px; left: 28%; top: -320px; background: radial-gradient(circle at 30% 30%, #8fc3ff, #5ba8ff); opacity: .75; }
.iw-login--team .iw-blob-3 { width: 520px; height: 520px; right: -160px; bottom: -120px; background: radial-gradient(circle at 30% 30%, #a7b4ff, #6b7dff); opacity: .6; }
.iw-login--team .iw-blob-4 { width: 420px; height: 420px; left: 4%; top: 30%; background: #f4f9ff; filter: blur(90px); opacity: .85; }
.iw-login--portal .iw-blob-1 { width: 700px; height: 700px; right: -200px; top: -300px; background: radial-gradient(circle at 30% 30%, #5ba8ff, #1d6fff); opacity: .55; }
.iw-login--portal .iw-blob-2 { width: 560px; height: 560px; left: 30%; top: -300px; background: radial-gradient(circle at 30% 30%, #cde6ff, #8fc3ff); opacity: .7; }
.iw-login--portal .iw-blob-3 { width: 520px; height: 520px; right: 8%; bottom: -260px; background: radial-gradient(circle at 30% 30%, #b9c6ff, #7c8cff); opacity: .45; }
.iw-login--portal .iw-blob-4 { width: 460px; height: 460px; left: -160px; bottom: -180px; background: radial-gradient(circle at 30% 30%, #a9d4ff, #5ba8ff); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
    .iw-blob-1 { animation: iw-drift 22s ease-in-out infinite; }
    .iw-blob-2 { animation: iw-drift 26s ease-in-out infinite reverse; }
}
@keyframes iw-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -30px); } }
.iw-top { display: flex; align-items: center; padding: 1.5rem calc(clamp(20px, 5vw, 72px) + 8rem) 1.5rem clamp(20px, 5vw, 72px); }
.iw-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.iw-brand img { display: block; width: 52px; height: 52px; margin: -8px -4px -8px -8px; }
.iw-word { font-family: 'Manrope', var(--font-sans); font-size: 1.75rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.iw-pill { padding: .3rem .65rem; border-radius: 999px; background: rgb(255 255 255 / .7); color: #0d3f99; font-size: .75rem; font-weight: 700; white-space: nowrap; }
/* Three layouts: a phone (one column, headline compact, the card close under it), a tablet (one centred column), and from
   960px the headline beside the card. The stage centres vertically when there is room and starts at the top when there is not. */
.iw-stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 2.5rem; width: 100%; max-width: 1360px; margin: 0 auto; padding: .5rem clamp(20px, 5vw, 72px) 2.5rem; box-sizing: border-box; }
.iw-hero { width: 100%; max-width: 36rem; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.iw-display { margin: 0; font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: clamp(3rem, 8vw, 4.5rem); line-height: .98; letter-spacing: -.02em; color: #0b1f44; text-wrap: balance; }
.iw-login--team .iw-hero .iw-brandline { margin-inline: auto; }
.iw-display em { font-style: italic; color: #1d6fff; }
.iw-brandline { display: block; width: fit-content; margin-bottom: .14em; font-family: 'Manrope', var(--font-sans); font-weight: 800; font-size: .74em; line-height: 1; letter-spacing: -.035em; background: linear-gradient(100deg, #0d3f99 0%, #1d6fff 50%, #5ba8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.iw-lead { margin: 0; max-width: 44ch; font-size: 1.0625rem; line-height: 1.7; color: #1e355e; }
.iw-note { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; color: #24406f; }
.iw-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-size: .9375rem; font-weight: 600; }
.iw-points li { display: inline-flex; align-items: center; gap: .6rem; }
.iw-points svg { color: #1d6fff; }
.iw-card { width: 100%; max-width: 26rem; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 1.4rem; padding: 2.25rem; border-radius: 28px; background: #fff; border: 1px solid rgb(13 63 153 / .08); box-shadow: 0 1px 2px rgb(13 63 153 / .05), 0 40px 90px -36px rgb(13 40 110 / .45); }
.iw-card-head { display: flex; flex-direction: column; gap: .4rem; }
.iw-card-title { margin: 0; font-size: 1.625rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: #0b1f44; }
.iw-card-sub { margin: 0; font-size: .875rem; color: #4a5d80; }
.iw-hint { margin: 0; padding: .8rem .9rem; border-radius: 13px; background: #eaf3ff; font-size: .8125rem; line-height: 1.6; color: #24406f; }
.iw-alt { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: 16px; border: 1px solid rgb(13 63 153 / .1); color: #0b1f44; text-decoration: none; transition: background-color .2s, border-color .2s; }
.iw-alt:hover { background: #f3f8ff; border-color: rgb(29 111 255 / .3); }
.iw-alt:focus-visible { outline: 2px solid #1d6fff; outline-offset: 3px; }
.iw-alt > svg { color: #1d6fff; flex: none; }
.iw-alt-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; background: #eaf3ff; color: #1d6fff; display: flex; align-items: center; justify-content: center; }
.iw-alt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; font-size: .8125rem; color: #4a5d80; }
.iw-alt-text b { font-size: .875rem; color: #0b1f44; }
.iw-foot { padding: 0 clamp(20px, 5vw, 72px) 1.6rem; font-size: .75rem; color: #1e355e; }
.iw-points { justify-content: center; }
/* side by side from 960px: the headline column takes what the card leaves */
@media (min-width: 960px) {
    .iw-stage { grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem); justify-items: stretch; align-items: center; gap: 3rem clamp(40px, 6vw, 112px); }
    .iw-hero { max-width: none; align-items: flex-start; text-align: left; gap: 1.4rem; }
    .iw-login--team .iw-hero .iw-brandline { margin-inline: 0; }
    .iw-points { justify-content: flex-start; }
    .iw-display { font-size: clamp(3.25rem, 5.8vw, 5.75rem); }
    .iw-card { max-width: none; }
}
/* large screens: a wider stage and a slightly larger headline, so 1920px is not an island in the middle */
@media (min-width: 1600px) {
    .iw-stage { max-width: 1520px; grid-template-columns: minmax(0, 1fr) 26rem; }
    .iw-display { font-size: 6.5rem; }
}
/* short screens (a laptop at 700px, a phone held sideways): start at the top so the card is reached without hunting */
@media (max-height: 760px) and (min-width: 600px) {
    .iw-stage { align-content: start; padding-top: 1rem; }
    .iw-display { font-size: clamp(2.75rem, 5vw, 4.25rem); }
}
/* a phone held sideways: headline beside the card, small, so the form is on the first screen */
@media (min-width: 700px) and (max-width: 959px) and (max-height: 520px) {
    .iw-top { padding-top: .75rem; padding-bottom: .75rem; }
    .iw-stage { grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); justify-items: stretch; align-items: start; gap: 2rem; padding-top: .25rem; }
    .iw-hero { align-items: flex-start; text-align: left; gap: .75rem; padding-top: 1rem; }
    .iw-login--team .iw-hero .iw-brandline { margin-inline: 0; }
    .iw-points { justify-content: flex-start; }
    .iw-display { font-size: 2.5rem; }
    .iw-card { max-width: none; padding: 1.4rem; gap: 1rem; }
}
/* phones: one column, left-aligned like the form under it; the headline stays the brand moment but gives the card the screen */
@media (max-width: 599px) {
    .iw-top { padding: 1rem 20px; }
    .iw-pill { display: none; }
    .iw-brand { gap: .55rem; }
    .iw-brand img { width: 40px; height: 40px; margin: -6px -3px -6px -6px; }
    .iw-word { font-size: 1.3rem; }
    .ckn-auth-body:has(.iw-login) .works-language-auth { top: .85rem; right: 16px; }
    .iw-stage { align-content: start; justify-items: stretch; gap: 1.5rem; padding: .25rem 16px 1.5rem; }
    .iw-hero { align-items: flex-start; text-align: left; gap: .75rem; }
    .iw-login--team .iw-hero .iw-brandline { margin-inline: 0; }
    .iw-display { font-size: clamp(2.4rem, 11.5vw, 3rem); line-height: 1; }
    .iw-lead { font-size: .9375rem; line-height: 1.6; }
    .iw-points { justify-content: flex-start; gap: .4rem 1.2rem; font-size: .875rem; }
    .iw-card { max-width: none; padding: 1.5rem 1.25rem; border-radius: 22px; gap: 1.2rem; }
    .iw-card-title { font-size: 1.375rem; }
    .iw-foot { padding: 0 16px 1.25rem; }
}

/* Customer Portal (signed-in pages): the sign-in page's aurora, faint, behind every page, fixed to the viewport under the
   content; cards and tables keep their own paper. */
body.ckn-body[data-account-kind="customer"] {
    background:
        radial-gradient(42rem 34rem at 100% -6%, rgb(91 168 255 / .16), transparent 70%),
        radial-gradient(36rem 30rem at 38% -12%, rgb(143 195 255 / .14), transparent 70%),
        radial-gradient(38rem 30rem at 92% 108%, rgb(124 140 255 / .10), transparent 70%),
        radial-gradient(34rem 28rem at 10% 104%, rgb(91 168 255 / .10), transparent 70%),
        var(--color-canvas);
    background-attachment: fixed;
}
