/* Apex-style client portal — login + workspace
   Tokens follow lovable/src/index.css; --primary / --portal-secondary
   are overridden per client from branding hex. */
:root {
    --background: 0 0% 98%;
    --foreground: 220 15% 25%;
    --logo-surface: 0 0% 100%;
    --card: 0 0% 100%;
    --card-foreground: 220 15% 25%;
    --primary: 174 72% 30%;
    --primary-foreground: 0 0% 100%;
    --portal-primary: 174 72% 30%;
    --portal-secondary: 202 45% 22%;
    --muted: 210 40% 96%;
    --muted-foreground: 220 13% 46%;
    --accent: 214 32% 91%;
    --destructive: 0 84% 60%;
    --success: 152 62% 34%;
    --warning: 38 92% 52%;
    --warning-foreground: 28 72% 25%;
    --border: 214 32% 91%;
    --ring: 174 72% 30%;
    --radius: 0.375rem;
    --shadow-sm: 0 1px 3px 0 hsl(220 15% 25% / 0.04);
    --shadow-md: 0 4px 12px -2px hsl(220 15% 25% / 0.08);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: hsl(var(--background)); color: hsl(var(--foreground)); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.cpx-hidden { display: none !important; }
.cpx-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ── buttons / fields ── */
.cpx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    height: 2.25rem; padding: 0 .85rem; border-radius: var(--radius);
    border: 1px solid hsl(var(--border)); background: hsl(var(--card));
    color: hsl(var(--foreground)); font-size: 13px; font-weight: 550;
}
.cpx-btn-pri { background: hsl(var(--primary)); color: #fff; border-color: transparent; }
.cpx-btn-pri:hover { filter: brightness(.95); }
.cpx-btn-ghost { border-color: transparent; background: transparent; color: hsl(var(--muted-foreground)); }
.cpx-btn-ghost:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.cpx-btn-sm { height: 1.85rem; padding: 0 .65rem; font-size: 12px; }
.cpx-acts { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.cpx-rej { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: .2rem; max-width: 16rem; white-space: normal; line-height: 1.3; }
.cpx-sel { height: 1.7rem; border: 1px solid hsl(var(--border)); border-radius: .3rem; background: #fff; font-size: 12px; padding: 0 .3rem; }
.cpx-btn-block { width: 100%; }
.cpx-field { display: flex; flex-direction: column; gap: .35rem; }
.cpx-field label { font-size: 13px; font-weight: 550; }
.cpx-req { color: #dc2626; font-weight: 700; margin-left: .2rem; }
.cpx-field:has([required]) > label::after,
.cpx-field:has([required]) > span::after,
.cpx-agree:has([required]) > span::after {
    content: "*";
    color: #dc2626;
    font-weight: 700;
    margin-left: .2rem;
}
.cpx-field .wrap { position: relative; }
.cpx-field .wrap i, .cpx-field .wrap svg {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    width: 1rem; height: 1rem; color: hsl(var(--muted-foreground));
}
.cpx-input {
    height: 2.25rem; width: 100%; border: 1px solid hsl(var(--border));
    border-radius: var(--radius); padding: 0 .65rem; background: #fff;
}
.cpx-field .wrap .cpx-input { padding-left: 2.1rem; }
.cpx-area { min-height: 4.5rem; width: 100%; border: 1px solid hsl(var(--border));
    border-radius: var(--radius); padding: .5rem .65rem; resize: vertical; }

/* ── login ── */
.cpx-login { height: 100vh; overflow: hidden; }
.cpx-login-grid { display: grid; height: 100%; grid-template-columns: 1.15fr .85fr; }
.cpx-hero { position: relative; overflow: hidden; color: #fff; }
.cpx-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cpx-hero-shade {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, hsl(var(--portal-secondary) / .9), hsl(var(--portal-secondary) / .28));
}
.cpx-hero-inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 2.25rem; max-width: 42rem; }
.cpx-logo-card {
    display: flex; width: fit-content; align-items: center; gap: .75rem;
    border-radius: .4rem; background: hsl(var(--logo-surface)); color: hsl(var(--foreground));
    padding: .75rem; box-shadow: var(--shadow-md);
}
.cpx-mark {
    display: flex; min-width: 3.5rem; height: 3rem; align-items: center; justify-content: center;
    border-radius: .4rem; border: 1px solid hsl(var(--border)); background: #fff;
    color: hsl(var(--primary)); font-size: 13px; font-weight: 700;
}
.cpx-mark img { position: static; width: auto; height: 2rem; object-fit: contain; }
.cpx-logo-card .co { font-size: 14px; font-weight: 600; }
.cpx-logo-card .sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
.cpx-kicker { margin: 0 0 .5rem; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.cpx-hero h1 { margin: 0; max-width: 36rem; font-size: 2.15rem; font-weight: 600; line-height: 1.2; }
.cpx-hero-msg { margin: .75rem 0 0; max-width: 32rem; font-size: 15px; line-height: 1.5; opacity: .85; }
.cpx-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.5rem; max-width: 32rem; font-size: 12px; }
.cpx-trust span { display: flex; align-items: center; gap: .5rem; border-left: 1px solid rgba(255,255,255,.3); padding-left: .75rem; }
.cpx-reg-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; }
.cpx-reg-row p { margin: .25rem 0 0; max-width: 22rem; font-size: 12px; opacity: .8; }
.cpx-hero-foot { font-size: 12px; opacity: .7; }
.cpx-panel { display: flex; flex-direction: column; min-height: 0; background: hsl(var(--background)); }
.cpx-topbar { display: flex; height: 3rem; flex-shrink: 0; align-items: center; justify-content: flex-end; border-bottom: 1px solid hsl(var(--border)); padding: 0 1.5rem; }
.cpx-topbar .mob { display: none; align-items: center; gap: .5rem; }
.cpx-signin { margin: 0 auto; display: flex; width: 100%; max-width: 28rem; min-height: 0; flex: 1; flex-direction: column; justify-content: center; padding: .75rem 1.5rem; }
.cpx-announce { margin-bottom: 1rem; border-radius: .4rem; border: 1px solid hsl(var(--primary) / .2); background: hsl(var(--primary) / .05); padding: .5rem .75rem; font-size: 12px; }
.cpx-signin #cpxBack { margin-bottom: 0.85rem; }
.cpx-signin h2 { margin: 0 0 0.45rem; font-size: 1.5rem; font-weight: 600; }
.cpx-signin .lead { margin: 0.15rem 0 0; font-size: 14px; color: hsl(var(--muted-foreground)); line-height: 1.5; }
.cpx-stack { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.cpx-code { gap: 1.15rem; margin-top: 1.4rem; }
#cpxCodeAsk,
.cpx-code-got { display: flex; flex-direction: column; gap: 1.1rem; }
.cpx-code .cpx-field { gap: 0.5rem; }
.cpx-code .cpx-btn { margin-top: 0.15rem; }
.cpx-otp-hint { margin: 0.15rem 0 0.2rem !important; text-align: center; }
.cpx-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.cpx-row a, .cpx-link { color: hsl(var(--primary)); font-weight: 550; text-decoration: none; background: none; border: 0; padding: 0; }
.cpx-ok { margin-top: 1rem; border: 1px solid hsl(var(--success) / .3); background: hsl(var(--success) / .1); border-radius: .4rem; padding: 1rem; }
.cpx-ok strong { display: block; font-size: 14px; }
.cpx-ok p { margin: .35rem 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.cpx-login-foot { display: flex; height: 2.5rem; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; border-top: 1px solid hsl(var(--border)); padding: 0 1.5rem; font-size: 11px; color: hsl(var(--muted-foreground)); }
.cpx-login-foot a { text-decoration: none; }
.cpx-otp { display: flex; justify-content: center; gap: .5rem; margin-top: 0.55rem; }
.cpx-otp input { width: 2.6rem; height: 2.6rem; text-align: center; font-size: 1.1rem; border: 1px solid hsl(var(--border)); border-radius: .35rem; }

/* ── dialog ── */
.cpx-mask { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: hsl(220 15% 10% / .45); padding: 1rem; }
.cpx-dlg { width: 100%; max-width: 48rem; max-height: calc(100vh - 2rem); background: #fff; border-radius: .5rem; box-shadow: var(--shadow-md); overflow: hidden; display: flex; flex-direction: column; }
.cpx-dlg #cpxRegForm { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cpx-dlg #cpxRegForm form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cpx-dlg-h { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid hsl(var(--border)); padding: 1rem 1.25rem; flex-shrink: 0; }
.cpx-dlg-h h3 { margin: 0; font-size: 1rem; }
.cpx-steps { padding: 1rem 1.25rem 0; flex-shrink: 0; }
.cpx-bar { height: .35rem; background: hsl(var(--muted)); border-radius: 99px; overflow: hidden; }
.cpx-bar > i { display: block; height: 100%; background: hsl(var(--primary)); }
.cpx-steps ol { display: flex; justify-content: space-between; margin: .5rem 0 0; padding: 0; list-style: none; font-size: 10px; color: hsl(var(--muted-foreground)); }
.cpx-steps ol .on { color: hsl(var(--primary)); font-weight: 650; }
.cpx-dlg-b { min-height: 0; flex: 1; overflow: auto; padding: 1.25rem; }
.cpx-grid3 { display: grid; grid-template-columns: 1fr 1fr 5.5rem; gap: .75rem; }
.cpx-sec-h { margin: 1.15rem 0 .75rem; font-size: 14px; font-weight: 650; }
.cpx-sec-h:first-child { margin-top: 0; }
.cpx-dlg .gcp-addr { max-width: none; margin-top: .15rem; }
.cpx-dlg-f { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid hsl(var(--border)); padding: .75rem 1.25rem; flex-shrink: 0; }
.cpx-dlg-sm { max-width: 28rem; }
.cpx-mask-dec { z-index: 80; }
.cpx-dlg-sub { margin: .2rem 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); font-weight: 500; }
.cpx-hint { margin: .65rem 0 0; font-size: 12px; line-height: 1.45; color: hsl(var(--muted-foreground)); }
.cpx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cpx-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.cpx-cats label { display: flex; min-height: 3rem; align-items: center; gap: .4rem; border: 1px solid hsl(var(--border)); border-radius: .4rem; padding: .5rem; font-size: 12px; }
.cpx-dash { display: flex; align-items: center; gap: .75rem; border: 1px dashed hsl(var(--border)); border-radius: .4rem; padding: .75rem; font-size: 12px; text-align: left; background: #fff; width: 100%; }
.cpx-thanks {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 2.5rem;
    text-align: center;
}
.cpx-thanks.cpx-hidden { display: none !important; }
.cpx-thanks-card { width: 100%; max-width: 36rem; }
.cpx-thanks .ok {
    margin: 0 auto;
    display: flex;
    height: 3.4rem;
    width: 3.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    background: hsl(var(--success) / .12);
    color: hsl(var(--success));
    font-size: 1.35rem;
}
.cpx-thanks h3 { margin: 1.15rem 0 0; font-size: 1.55rem; font-weight: 650; letter-spacing: -.02em; }
.cpx-thanks-msg { margin: .7rem auto 0; max-width: 30rem; font-size: 15px; line-height: 1.55; color: hsl(var(--muted-foreground)); }
.cpx-appid {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    margin-top: 1.35rem;
    padding: .85rem 1.5rem;
    border-radius: .5rem;
    background: hsl(210 40% 98%);
    border: 1px solid hsl(var(--border));
}
.cpx-appid span { font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.cpx-appid strong { font-size: 1.35rem; letter-spacing: .04em; }
.cpx-err { display: none; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: .35rem; padding: .45rem .6rem; font-size: 13px; margin-bottom: .7rem; }
.cpx-err.show { display: block; }
body.cpx-preview { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.cpx-preview-bar {
    flex-shrink: 0; padding: .4rem .9rem; font-size: 12px; font-weight: 550;
    background: #fef3c7; color: #92400e; border-bottom: 1px solid #fde68a;
}
body.cpx-preview .cpx-app { height: auto; flex: 1; min-height: 0; }
body.cpx-preview .cpx-body { height: auto; flex: 1; min-height: 0; }
body.cpx-preview .cpx-btn,
body.cpx-preview .cpx-iconbtn,
body.cpx-preview .cpx-btn-pri,
body.cpx-preview button:not(.cpx-nav button) {
    pointer-events: none;
    opacity: .45;
}

/* ── workspace ── */
.cpx-app { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.cpx-hdr {
    display: flex; height: 3.5rem; flex-shrink: 0; align-items: center;
    border-bottom: 1px solid hsl(var(--border)); background: hsl(0 0% 100% / .95);
    padding: 0 .85rem; gap: .75rem;
}
.cpx-topnav {
    display: flex; align-items: center; gap: .85rem; flex: 1 1 auto; min-width: 0;
    overflow: visible; margin-left: 1.75rem;
}
.cpx-topitem { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.cpx-topitem > a {
    display: inline-flex; align-items: center; height: 2rem; padding: 0 .75rem;
    font-size: 14px; font-weight: 550; color: hsl(var(--foreground));
    text-decoration: none; white-space: nowrap; border-radius: .375rem;
}
.cpx-topitem.has-subs > a { padding-right: .45rem; border-radius: .375rem 0 0 .375rem; }
.cpx-topitem > a:hover, .cpx-chev:hover { background: hsl(var(--muted)); color: hsl(var(--primary)); }
.cpx-topitem.on > a {
    background: hsl(var(--primary)); color: #fff; box-shadow: var(--shadow-sm);
}
.cpx-chev {
    display: inline-flex; align-items: center; justify-content: center;
    height: 2rem; width: 1.5rem; border: 0; background: transparent;
    color: hsl(var(--foreground)); font-size: 11px; line-height: 1;
    border-radius: 0 .375rem .375rem 0;
}
.cpx-topitem.on .cpx-chev { background: hsl(var(--primary)); color: #fff; }
.cpx-topitem.on .cpx-chev:hover { filter: brightness(.95); }
.cpx-drop {
    position: absolute; top: calc(100% - 1px); left: 0; z-index: 50;
    min-width: 12.5rem; padding: .35rem; border: 1px solid hsl(var(--border));
    border-radius: .4rem; background: #fff; box-shadow: var(--shadow-md);
}
.cpx-drop a {
    display: block; padding: .45rem .65rem; border-radius: .3rem;
    font-size: 13px; font-weight: 550; color: hsl(var(--foreground)); text-decoration: none;
}
.cpx-drop a:hover { background: hsl(var(--muted)); }
.cpx-drop a.on { background: hsl(var(--primary) / .1); color: hsl(var(--primary)); }
.cpx-subbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
    flex-shrink: 0; padding: 0 1.15rem; background: #fff;
    border-bottom: 1px solid hsl(var(--border));
}
.cpx-subbar .cpx-refresh { margin-left: auto; }
.cpx-pane-tools {
    display: flex; align-items: center; justify-content: flex-end;
    flex-shrink: 0; min-height: 2.35rem; padding: 0 .85rem;
    background: #fff; border-bottom: 1px solid hsl(var(--border));
}
.cpx-iconbtn.cpx-spin svg { animation: cpx-spin .7s linear infinite; }
.cpx-scroll.cpx-refreshing { opacity: .55; pointer-events: none; }
@keyframes cpx-spin { to { transform: rotate(360deg); } }
.cpx-subbar a {
    display: inline-flex; align-items: center; height: 2.35rem;
    font-size: 14px; font-weight: 550; color: hsl(var(--foreground));
    text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cpx-subbar a:hover { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary) / .4); }
.cpx-subbar a.on { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); font-weight: 650; }
.cpx-brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; min-width: 0; }
.cpx-brand .cpx-mark { min-width: 2.25rem; height: 2.25rem; font-size: 11px; }
.cpx-brand .nm { font-size: 13px; font-weight: 600; line-height: 1.15; }
.cpx-brand .pn { font-size: 10px; color: hsl(var(--muted-foreground)); }
.cpx-search { flex: 1; max-width: 32rem; margin: 0 auto; position: relative; }
.cpx-search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: .9rem; height: .9rem; color: hsl(var(--muted-foreground)); }
.cpx-search input { height: 2rem; width: 100%; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--muted) / .5); padding: 0 .65rem 0 2rem; font-size: 12px; }
.cpx-hdr-right { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.cpx-iconbtn { position: relative; display: flex; height: 2rem; width: 2rem; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: var(--radius); color: hsl(var(--muted-foreground)); }
.cpx-iconbtn:hover { background: hsl(var(--muted)); }
.cpx-iconbtn .dot { position: absolute; right: .35rem; top: .35rem; height: .35rem; width: .35rem; border-radius: 99px; background: hsl(var(--destructive)); }
.cpx-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    height: 2rem; width: 2rem; border-radius: 99px; border: 0;
    background: hsl(var(--primary)); color: #fff;
    font-size: 12px; font-weight: 650; text-decoration: none; overflow: hidden;
}
.cpx-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 99px; }
.cpx-logout {
    display: inline-flex; align-items: center; gap: .35rem;
    height: 2rem; padding: 0 .65rem; border-radius: var(--radius);
    font-size: 12px; font-weight: 650; color: hsl(var(--foreground));
    text-decoration: none; border: 0; background: transparent;
}
.cpx-logout:hover { background: hsl(var(--muted)); color: hsl(var(--primary)); }
.cpx-logout svg { flex-shrink: 0; }
.cpx-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.cpx-side { display: flex; flex-direction: column; width: 14rem; flex-shrink: 0; border-right: 1px solid hsl(var(--border)); background: #fff; }
.cpx-side.thin { width: 3.6rem; }
.cpx-nav { flex: 1; overflow: auto; padding: .5rem; }
.cpx-nav-lab { padding: .5rem .5rem .35rem; font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.cpx-nav a {
    display: flex; height: 2.25rem; align-items: center; gap: .5rem;
    border-radius: .4rem; padding: 0 .65rem; font-size: 12px; font-weight: 550;
    color: hsl(var(--muted-foreground)); text-decoration: none;
}
.cpx-nav a:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.cpx-nav a.on { background: hsl(var(--primary)); color: #fff; box-shadow: var(--shadow-sm); }
.cpx-nav a.on i.pip { margin-left: auto; height: .35rem; width: .35rem; border-radius: 99px; background: #fff; }
.cpx-side-f { border-top: 1px solid hsl(var(--border)); padding: .5rem; }
.cpx-crumb { flex-shrink: 0; border-bottom: 1px solid hsl(var(--border)); background: #fff; padding: .4rem 1.15rem; font-size: 11px; color: hsl(var(--muted-foreground)); }
.cpx-crumb strong { color: hsl(var(--foreground)); font-weight: 550; }
.cpx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.cpx-scroll { flex: 1; overflow: auto; padding: .85rem 1rem; max-width: none; width: 100%; }
.cpx-scroll-embed { padding: 0; overflow: hidden; }
.cpx-scroll.tight { overflow: hidden; display: flex; flex-direction: column; }

/* ── page bits ── */
.cpx-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; border-bottom: 1px solid hsl(var(--border)); padding-bottom: .5rem; margin-bottom: .65rem; }
.cpx-ph .eye { margin: 0; font-size: 10px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--primary)); }
.cpx-ph h1 { margin: .1rem 0 0; font-size: 1.25rem; font-weight: 600; }
.cpx-ph p { margin: .2rem 0 0; max-width: 46rem; font-size: 12px; color: hsl(var(--muted-foreground)); }
.cpx-kpis { display: grid; gap: .5rem; }
.cpx-kpis.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cpx-kpis.n9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.cpx-kpis.n10 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cpx-kpis.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cpx-kpis.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cpx-kpi {
    display: block; width: 100%; min-height: 4.75rem; border: 1px solid hsl(var(--border)); background: #fff;
    border-radius: .4rem; padding: .65rem; text-decoration: none; box-shadow: var(--shadow-sm);
    text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.cpx-kpi:hover { border-color: hsl(var(--primary) / .4); }
.cpx-kpi .lab { font-size: 10px; font-weight: 550; color: hsl(var(--muted-foreground)); }
.cpx-kpi .val { margin-top: .3rem; font-size: 1.1rem; font-weight: 650; line-height: 1; }
.cpx-kpi .det { margin: .3rem 0 0; font-size: 10px; color: hsl(var(--muted-foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpx-panel { border: 1px solid hsl(var(--border)); background: #fff; border-radius: .4rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.cpx-panel-h { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid hsl(var(--border)); padding: .7rem 1rem; }
.cpx-panel-h h2 { margin: 0; font-size: 13px; font-weight: 600; }
.cpx-panel-h .sub { margin: .15rem 0 0; font-size: 11px; color: hsl(var(--muted-foreground)); }
.cpx-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cpx-table th { text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / .6); padding: .55rem .75rem; border-bottom: 1px solid hsl(var(--border)); }
.cpx-table td { padding: .6rem .75rem; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
/* Reports: column headers stay in view while rows scroll (common/scripts/report_lock.js locks the page above them). */
.cpx-table thead th { position: sticky; top: 0; z-index: 2; background-color: #fff; background-image: linear-gradient(hsl(var(--muted) / .6), hsl(var(--muted) / .6)); }
.cpx-scroll.cpx-lock { overflow: hidden; display: flex; flex-direction: column; }
.cpx-scroll.cpx-lock > *, .cpx-lock-col > * { flex: none; }
.cpx-scroll.cpx-lock > .cpx-lock-col, .cpx-lock-col > .cpx-lock-col { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; }
.cpx-scroll.cpx-lock > .cpx-fill, .cpx-lock-col > .cpx-fill { flex: 0 1 auto; min-height: 0; overflow: auto; }
.cpx-lock-col.cpx-panel { overflow: hidden; }
.cpx-table tr:hover td { background: hsl(var(--muted) / .35); }
.cpx-table a { color: hsl(var(--primary)); font-weight: 600; text-decoration: none; }
.cpx-empty { padding: 2.5rem 1rem; text-align: center; color: hsl(var(--muted-foreground)); font-size: 13px; }
.cpx-more { position: relative; display: inline-flex; justify-content: flex-end; }
.cpx-more-btn {
    width: 1.85rem; height: 1.85rem; border: 0; background: transparent; border-radius: .35rem;
    color: hsl(var(--muted-foreground)); font-size: 1.15rem; line-height: 1; letter-spacing: -.05em;
}
.cpx-more-btn:hover, .cpx-more.open .cpx-more-btn { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.cpx-more-list {
    display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
    min-width: 13.5rem; padding: .3rem; background: #fff; border: 1px solid hsl(var(--border));
    border-radius: .45rem; box-shadow: var(--shadow-md);
}
.cpx-more.open .cpx-more-list { display: flex; flex-direction: column; }
.cpx-more-i {
    display: block; width: 100%; text-align: left; border: 0; background: transparent;
    padding: .45rem .6rem; border-radius: .3rem; font-size: 13px; color: inherit; text-decoration: none; cursor: pointer;
}
.cpx-more-i:hover { background: hsl(var(--muted)); }
.cpx-badge { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 99px; border: 1px solid hsl(var(--primary) / .25); background: hsl(var(--primary) / .08); color: hsl(var(--primary)); font-size: 11px; font-weight: 550; padding: .1rem .5rem; }
.cpx-badge.ok { border-color: hsl(var(--success) / .3); background: hsl(var(--success) / .1); color: hsl(var(--success)); }
.cpx-badge.warn { border-color: hsl(var(--warning) / .3); background: hsl(var(--warning) / .1); color: hsl(var(--warning-foreground)); }
.cpx-badge.bad { border-color: hsl(var(--destructive) / .3); background: hsl(var(--destructive) / .1); color: hsl(var(--destructive)); }
.cpx-dash-grid { display: grid; grid-template-columns: 1.15fr .85fr 1fr; gap: .5rem; flex: 1; min-height: 0; }
.cpx-bars { display: flex; align-items: flex-end; gap: .45rem; height: 10rem; padding: 1rem 1rem .75rem; }
.cpx-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.cpx-bars b { display: block; width: 100%; border-radius: .2rem .2rem 0 0; background: hsl(var(--primary)); min-height: 4px; }
.cpx-bars span { margin-top: .3rem; font-size: 10px; color: hsl(var(--muted-foreground)); }
.cpx-list button, .cpx-list a.row {
    display: flex; width: 100%; align-items: center; gap: .5rem; padding: .55rem .75rem;
    border: 0; border-bottom: 1px solid hsl(var(--border)); background: #fff; text-align: left; text-decoration: none;
}
.cpx-list .pip { height: 1.75rem; width: .2rem; border-radius: 99px; background: hsl(var(--warning)); flex-shrink: 0; }
.cpx-list .pip.hi { background: hsl(var(--destructive)); }
.cpx-cal { width: 3rem; border: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .5); border-radius: .3rem; padding: .2rem; text-align: center; font-size: 10px; font-weight: 550; color: hsl(var(--primary)); }
.cpx-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; border: 1px solid hsl(var(--border)); background: #fff; border-radius: .4rem; padding: .5rem; margin: .65rem 0; }
.cpx-filter input { height: 2rem; flex: 1; min-width: 14rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 0 .6rem; }
.cpx-stabrow { display: flex; align-items: center; justify-content: space-between; gap: .5rem .75rem; flex-wrap: wrap; margin: 0 0 .5rem; }
.cpx-stab-acts { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.cpx-find { height: 1.95rem; width: 15rem; max-width: 100%; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: #fff; padding: 0 .6rem; font-size: 12px; }
.cpx-find:focus { outline: none; border-color: hsl(var(--primary) / .6); box-shadow: 0 0 0 2px hsl(var(--primary) / .15); }
/* Search box with a search button: the search runs in the database (Enter or the button). */
.cpx-qbox { display: inline-flex; align-items: stretch; width: min(22rem, 100%); }
.cpx-qbox .cpx-find { flex: 1; width: auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cpx-qbtn { flex: none; display: inline-grid; place-items: center; width: 2.1rem; border: 1px solid hsl(var(--border)); border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0; background: #fff; color: hsl(var(--muted-foreground)); cursor: pointer; }
.cpx-qbtn:hover { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #fff; }
.cpx-tb-sum { font-size: 12px; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.cpx-tb-sum b { color: hsl(var(--foreground)); font-weight: 650; }
/* Screen tabs (status filters on every portal list): Bench Sales style — plain text, thin separators,
   the active tab underlined in the theme colour — with each count in a circle. */
.cpx-stabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin: 0; padding: 0; width: fit-content; max-width: 100%; border: 0; background: transparent; }
.cpx-stab { position: relative; display: inline-flex; align-items: center; gap: .45rem; height: 2.15rem; padding: 0 .85rem; border-bottom: 2px solid transparent; font-size: 13px; font-weight: 550; color: hsl(var(--muted-foreground)); text-decoration: none; white-space: nowrap; }
.cpx-stab + .cpx-stab::before { content: ""; position: absolute; left: 0; top: .6rem; bottom: .6rem; width: 1px; background: hsl(var(--border)); }
.cpx-stab:first-child { padding-left: .15rem; }
.cpx-stab em { font-style: normal; display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; box-sizing: border-box; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; line-height: 1; }
.cpx-stab:hover { color: hsl(var(--foreground)); }
.cpx-stab.on { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }
.cpx-stab.on em { background: hsl(var(--primary)); color: #fff; }
.cpx-stab.on em { color: #fff; opacity: .85; }
.cpx-mini { display: grid; gap: .5rem; margin: .65rem 0; }
.cpx-mini.n4 { grid-template-columns: repeat(4, 1fr); }
.cpx-mini.n5 { grid-template-columns: repeat(5, 1fr); }
.cpx-stat { border: 1px solid hsl(var(--border)); background: #fff; border-radius: .4rem; padding: .75rem; }
.cpx-stat .lab { font-size: 11px; color: hsl(var(--muted-foreground)); }
.cpx-stat .val { margin-top: .25rem; font-size: 1.25rem; font-weight: 650; }
.cpx-set { display: grid; grid-template-columns: 13.5rem 1fr; gap: 1rem; }
.cpx-set nav { border: 1px solid hsl(var(--border)); background: #fff; border-radius: .4rem; padding: .5rem; }
.cpx-set nav a, .cpx-set nav span {
    display: block; border-radius: .3rem; padding: .5rem .75rem; font-size: 12px; text-decoration: none;
}
.cpx-set nav a.on, .cpx-set nav span.on { background: hsl(var(--primary)); color: #fff; }
.cpx-set .kv { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; padding: 1rem; }
.cpx-kv .lab { font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.cpx-kv .val { margin-top: .25rem; font-size: 12px; font-weight: 550; }
.cpx-alert { display: flex; align-items: center; gap: .5rem; border: 1px solid hsl(var(--warning) / .3); background: hsl(var(--warning) / .1); color: hsl(var(--warning-foreground)); border-radius: .4rem; padding: .5rem .75rem; font-size: 12px; margin: .5rem 0; }
.cpx-ok { display: none; border: 1px solid hsl(var(--success) / .35); background: hsl(var(--success) / .1); color: hsl(var(--success)); border-radius: .35rem; padding: .45rem .6rem; font-size: 13px; margin-bottom: .7rem; }
.cpx-ok.show, .cpx-err.show { display: block; }
.cpx-check { display: flex; align-items: center; gap: .45rem; font-size: 13px; cursor: pointer; }
.cpx-profile { display: grid; gap: .65rem; max-width: 46rem; }
.cpx-profile .cpx-panel { padding: .85rem 1rem 1rem; }
.cpx-prof-id { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem 1rem; align-items: start; }
.cpx-prof-photo { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 6.25rem; }
.cpx-prof-photo .pic {
    width: 5.25rem; height: 5.25rem; border-radius: 99px; overflow: hidden;
    background: hsl(var(--primary) / .1); color: hsl(var(--primary));
    display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 1.05rem;
    border: 1px solid hsl(var(--border));
}
.cpx-prof-photo .pic img { width: 100%; height: 100%; object-fit: cover; }
.cpx-prof-fields { display: grid; gap: .4rem; min-width: 0; }
.cpx-field-row { display: grid; grid-template-columns: 4.6rem minmax(0, 18rem); align-items: center; gap: .5rem; }
.cpx-field-row label { font-size: 12px; font-weight: 550; color: hsl(var(--muted-foreground)); }
.cpx-profile .cpx-input { height: 1.85rem; font-size: 13px; }
.cpx-prof-block { margin-top: .85rem; padding-top: .75rem; border-top: 1px solid hsl(var(--border)); }
.cpx-prof-lab { font-size: 12px; font-weight: 650; margin-bottom: .45rem; }
.cpx-prof-lab span { font-weight: 500; color: hsl(var(--muted-foreground)); margin-left: .35rem; }
.cpx-prof-pw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.cpx-prof-pw label { display: grid; gap: .2rem; font-size: 11px; font-weight: 550; color: hsl(var(--muted-foreground)); }
.cpx-rte { border: 1px solid hsl(var(--border)); border-radius: .4rem; overflow: hidden; background: #fff; }
.cpx-rte-bar { display: flex; align-items: center; gap: .25rem; padding: .3rem .4rem; background: hsl(210 40% 98%); border-bottom: 1px solid hsl(var(--border)); }
.cpx-rte-gap { flex: 1; }
.cpx-rte-up { margin-left: auto; font-size: 12px; font-weight: 550; color: hsl(var(--primary)); cursor: pointer; padding: 0 .25rem; }
.cpx-rte-bar button, .cpx-rte-bar select {
    height: 1.55rem; border: 1px solid hsl(var(--border)); background: #fff; border-radius: .3rem;
    font-size: 12px; padding: 0 .4rem; cursor: pointer;
}
.cpx-rte-bar button { min-width: 1.7rem; }
.cpx-rte-bar input[type=color] { width: 1.55rem; height: 1.55rem; padding: 0; border: 1px solid hsl(var(--border)); border-radius: .3rem; background: #fff; cursor: pointer; }
.cpx-rte-ed {
    min-height: 5.5rem; max-height: 8rem; overflow: auto; padding: .5rem .65rem;
    font-size: 13px; line-height: 1.45; outline: none;
}
.cpx-rte-ed:empty:before { content: attr(data-placeholder); color: hsl(var(--muted-foreground)); }
.cpx-rte.off .cpx-rte-bar { pointer-events: none; opacity: .55; }
.cpx-prof-sig { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-top: .45rem; }
.cpx-prof-sig img { max-height: 2.25rem; max-width: 8rem; border: 1px solid hsl(var(--border)); border-radius: .3rem; background: #fff; }
.cpx-prof-sig .cpx-lnk { font-size: 12px; }
.cpx-prof-tfa { margin-top: .15rem; }
.cpx-prof-acts { display: flex; justify-content: flex-end; }
.cpx-embed { width: 100%; height: calc(100vh - 4.6rem); min-height: 28rem; border: 0; background: #fff; }
.cpx-ov { display: none !important; position: fixed; inset: 0; z-index: 80; background: hsl(220 15% 25% / .45); }
.cpx-ov.on { display: flex !important; flex-direction: column; }
.cpx-ov-h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff; padding: .7rem 1.15rem; border-bottom: 1px solid hsl(var(--border)); }
.cpx-ov-h b { font-size: 15px; font-weight: 650; }
.cpx-ov-tools { display: flex; align-items: center; gap: .45rem; }
.cpx-ov iframe { flex: 1; width: 100%; border: 0; background: #fff; }

@media (max-width: 1100px) {
    .cpx-kpis.n9, .cpx-kpis.n10 { grid-template-columns: repeat(3, 1fr); }
    .cpx-dash-grid { grid-template-columns: 1fr; }
    .cpx-set { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .cpx-prof-id { grid-template-columns: 1fr; justify-items: start; }
    .cpx-prof-photo { flex-direction: row; width: auto; }
    .cpx-field-row { grid-template-columns: 4.6rem minmax(0, 1fr); }
    .cpx-prof-pw { grid-template-columns: 1fr; }
}
.cpx-dlg { max-width: 52rem; }
.cpx-dlg.cpx-dlg-sm { max-width: 28rem; }
.cpx-dlg-reg {
    width: min(76rem, calc(100vw - 1.25rem));
    max-width: none;
    height: calc(100vh - 1.25rem);
    max-height: none;
}
.cpx-mask:has(.cpx-dlg-reg) { padding: .6rem; }
.cpx-dlg-reg .cpx-dlg-h { padding: .7rem 1.15rem; }
.cpx-dlg-reg .cpx-steps { padding: .65rem 1.15rem 0; }
.cpx-dlg-reg .cpx-dlg-b { padding: .85rem 1.15rem; overflow: hidden; display: flex; flex-direction: column; }
.cpx-dlg-reg .cpx-dlg-f { padding: .6rem 1.15rem; }
.cpx-dlg-reg .cpx-sec-h { margin: .7rem 0 .45rem; }
.cpx-dlg-reg .cpx-field { gap: .2rem; }
.cpx-dlg-reg .cpx-input { height: 2.05rem; }
.cpx-grid3r, .cpx-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem .75rem; }
.cpx-grid4 .cpx-field:last-child:nth-child(7) { grid-column: span 1; }
.cpx-dlg-reg .gcp-addr { margin-top: .55rem; }
.cpx-dlg-reg .gcp-addr-lab { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 550; color: inherit; margin-bottom: .2rem; }
.cpx-dlg-reg .gcp-addr-row { margin-bottom: .55rem; gap: .55rem .75rem; }
@media (max-width: 820px) {
    .cpx-grid3r, .cpx-grid4 { grid-template-columns: 1fr 1fr; }
    .cpx-dlg-reg { height: calc(100vh - .75rem); width: calc(100vw - .75rem); }
    .cpx-dlg-reg .cpx-dlg-b { overflow: auto; }
}
@media (max-height: 760px) {
    .cpx-dlg-reg .cpx-dlg-b { overflow: auto; }
}
.cpx-agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 14px; line-height: 1.4; }
.cpx-agree input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; }
.cpx-lnk { background: none; border: 0; color: hsl(var(--primary)); font-weight: 650; cursor: pointer; padding: 0; font: inherit; text-decoration: none; }
.cpx-lnk:hover { text-decoration: underline; }
.cpx-po-to { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; font-size: 12px; line-height: 1.35; }
.cpx-po-to + .cpx-po-to { margin-top: 0.2rem; }
.cpx-po-to-amt { font-variant-numeric: tabular-nums; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.cpx-po-to-rem { margin-top: 0.35rem; padding-top: 0.3rem; border-top: 1px dashed hsl(var(--border)); color: hsl(var(--muted-foreground)); }
.cpx-sigrow { display: grid; grid-template-columns: minmax(0, 1.4fr) 140px 176px; gap: 12px; align-items: end; }
.cpx-sigfield input.cpx-sigink {
    font-family: "Segoe Script", "Brush Script MT", "Comic Sans MS", cursive;
    font-size: 22px; color: #12306e; border: 0; border-bottom: 2px solid hsl(var(--border));
    border-radius: 0; padding: 6px 2px; background: transparent; height: auto;
}
.cpx-sigfield input.cpx-sigink:focus { outline: none; border-bottom-color: hsl(var(--primary)); }
.cpx-sigrow .cpx-field span { display: block; font-size: 11px; font-weight: 600; margin-bottom: .25rem; }
.cpx-accept-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem 1.75rem;
}
.cpx-accept {
    width: 100%;
    max-width: 40rem;
    padding: 2rem 2.15rem 1.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: .6rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.cpx-accept h3 {
    margin: 0 0 .45rem;
    font-size: 1.35rem;
    font-weight: 650;
    text-align: center;
    letter-spacing: -.01em;
}
.cpx-accept-lead {
    margin: 0 0 1.35rem;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: hsl(var(--muted-foreground));
}
.cpx-accept .cpx-agree {
    margin: 0 0 1.4rem;
    padding: .95rem 1.05rem;
    border: 1px solid hsl(var(--border));
    border-radius: .45rem;
    background: hsl(210 40% 98%);
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}
.cpx-accept .cpx-sigrow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cpx-sig-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.cpx-accept .cpx-sigfield { padding: .35rem 0 .15rem; }
.cpx-accept .cpx-sigink { min-height: 2.4rem; font-size: 26px; }
.cpx-accept-note {
    margin: 1.15rem 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.45;
    color: hsl(var(--muted-foreground));
}
@media (max-width: 720px) {
    .cpx-accept { padding: 1.35rem 1.1rem 1.2rem; }
    .cpx-sig-meta { grid-template-columns: 1fr; }
}
.cpx-onb { min-height: 100vh; background: hsl(210 40% 98%); padding: 1.5rem 1rem 3rem; }
.cpx-onb-h { display: flex; align-items: center; gap: .75rem; max-width: 44rem; margin: 0 auto 1rem; }
.cpx-onb-h .co { font-weight: 650; }
.cpx-onb-h .sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
.cpx-onb-card { max-width: 44rem; margin: 0 auto; background: #fff; border: 1px solid hsl(var(--border)); border-radius: .5rem; padding: 1.25rem 1.35rem 1.5rem; box-shadow: var(--shadow-sm); }
.cpx-onb-card h1 { margin: .15rem 0 .4rem; font-size: 1.45rem; }
.cpx-onb-card .kicker { margin: 0; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--primary)); }
.cpx-onb-card .lead { color: hsl(var(--muted-foreground)); font-size: 14px; line-height: 1.5; }
.cpx-onb-sec { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid hsl(var(--border)); }
.cpx-onb-sec h2 { margin: 0 0 .4rem; font-size: 15px; }
.cpx-onb-sec p { margin: 0 0 .65rem; font-size: 13px; color: hsl(var(--muted-foreground)); }
.cpx-onb .fine { margin-top: 1.25rem; font-size: 12px; color: hsl(var(--muted-foreground)); }
@media (max-width: 720px) { .cpx-sigrow { grid-template-columns: 1fr; } .cpx-grid3 { grid-template-columns: 1fr; } }
.cpx-mob-reg { display: none; }
@media (max-width: 900px) {
    .cpx-login-grid { grid-template-columns: 1fr; }
    .cpx-hero { display: none; }
    .cpx-topbar { justify-content: space-between; }
    .cpx-topbar .mob { display: flex; }
    .cpx-search { display: none; }
    .cpx-side { display: none; }
    .cpx-mob-reg { display: inline-flex; }
    .cpx-kpis.n3, .cpx-kpis.n4, .cpx-mini.n4, .cpx-mini.n5, .cpx-grid2, .cpx-grid3, .cpx-cats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .cpx-stab-acts { margin-left: 0; width: 100%; }
    .cpx-find { flex: 1; width: auto; }
}

/* ── Legacy screens shown inside a portal (body.cpx-legacy): My Profile menu (application/875/my_profile_menu_new)
      and its tabs (web/pp/user_profile_new). Same screens and saves; only the look follows the portal. ── */
body.cpx-legacy { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 13px; color: hsl(var(--foreground)); background: hsl(var(--background)); }
body.cpx-legacy .container_secr1 { display: flex; align-items: flex-start; gap: 1rem; margin: 0; padding: .85rem 1rem; }
body.cpx-legacy .conrp-cont { display: flex; align-items: flex-start; gap: 1rem; width: 100%; }
body.cpx-legacy .profile-left { float: none; flex: none; width: 17rem; padding: 1.25rem 1rem; background: #fff; border: 1px solid hsl(var(--border)); border-radius: .6rem; box-shadow: var(--shadow-sm); text-align: center; }
body.cpx-legacy .dp-sctn { float: none; width: 128px; height: auto; margin: 0 auto .75rem; }
body.cpx-legacy .contct-sectn ul { margin: 0; padding: 0; }
body.cpx-legacy .circle { position: static; border: 3px solid hsl(var(--primary) / .15); background: hsl(var(--muted)); }
body.cpx-legacy .p-image { position: static; margin-top: .6rem; }
body.cpx-legacy .btn-upload, body.cpx-legacy .btn.delete_btn { display: inline-flex; align-items: center; height: 1.85rem; margin: 0; padding: 0 .75rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: #fff; color: hsl(var(--foreground)); font-size: 12px; font-weight: 600; line-height: 1; }
body.cpx-legacy .btn-upload:hover, body.cpx-legacy .btn.delete_btn:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
body.cpx-legacy .inner-sectn { float: none; margin-top: 0; }
body.cpx-legacy .inner-sectn p { margin: 0; line-height: 1.45; color: hsl(var(--muted-foreground)); font-size: 12.5px; }
body.cpx-legacy .inner-sectn p b { color: hsl(var(--foreground)); font-size: 16px !important; font-weight: 650; }
body.cpx-legacy .contct-sectn { margin-top: 1rem; padding: .9rem 0 0; border-top: 1px solid hsl(var(--border)); text-align: left; }
body.cpx-legacy .contct-sectn h2 { margin: 0 0 .45rem; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
body.cpx-legacy .contct-sectn li { display: flex; align-items: center; gap: .5rem; font-size: 12.5px; line-height: 1.9; overflow-wrap: anywhere; }
body.cpx-legacy i.con-icons { margin: 0; width: 1rem; color: hsl(var(--primary)); text-align: center; }
body.cpx-legacy .profile-right { float: none; flex: 1; min-width: 0; width: auto; height: auto; padding: 0; border: 1px solid hsl(var(--border)); border-radius: .6rem; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
body.cpx-legacy .conrp-main-inner { margin: 0; padding: 0 1rem; border-bottom: 1px solid hsl(var(--border)); background: #fff; }
body.cpx-legacy .conrp-list { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; border: 0; background: none; }
body.cpx-legacy .conrp-list li { position: relative; float: none; margin: 0; padding: 0; border: 0; background: none; }
body.cpx-legacy .conrp-list li + li::before { content: ""; position: absolute; left: 0; top: .75rem; bottom: .75rem; width: 1px; background: hsl(var(--border)); }
body.cpx-legacy .conrp-list li a { display: inline-flex; align-items: center; height: 2.6rem; padding: 0 .9rem; border: 0; border-bottom: 2px solid transparent; background: none; color: hsl(var(--muted-foreground)); font-size: 13px; font-weight: 550; text-decoration: none; }
body.cpx-legacy .conrp-list li:first-child a { padding-left: .15rem; }
body.cpx-legacy .conrp-list li a:hover { color: hsl(var(--foreground)); }
body.cpx-legacy .conrp-list li.active a { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }
body.cpx-legacy .conrp-list li.active a::after, body.cpx-legacy .conrp-list li a::after { display: none; }
body.cpx-legacy .conrp-scroll { float: none; padding: 0; border: 0; background: #fff; }
/* Tab pages (web/pp/user_profile_new): label / value rows, portal buttons. */
body.cpx-legacy.cpx-legacy-tab { background: #fff; padding: .4rem 1.1rem 1rem; }
body.cpx-legacy .row-data { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; float: none; width: auto; max-width: 44rem; margin: 0; padding: .7rem 0; border-bottom: 1px solid hsl(var(--border)); font-size: 13.5px; }
body.cpx-legacy .row-data > label, body.cpx-legacy .row-data > b { flex: 0 0 11rem; min-width: 0; margin: 0; font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
body.cpx-legacy .row-data a { margin: 0 !important; }
/* Two-Factor Authentication tab: plain check rows under the title. */
body.cpx-legacy .row-data.authcode { display: block; max-width: 36rem; margin: 0 !important; padding: .4rem 0; border: 0; }
body.cpx-legacy .authcode .check_row { float: none !important; display: flex; align-items: center; gap: .5rem; width: auto !important; margin: .45rem 0; }
body.cpx-legacy .authcode label { flex: none; margin: 0; font-size: 13px; font-weight: 550; letter-spacing: 0; text-transform: none; color: hsl(var(--foreground)); width: auto !important; }
body.cpx-legacy .authcode .chk_fctr { margin-left: 1.6rem !important; }
body.cpx-legacy .tab-full .container_secr { float: none; width: auto; padding: 0; }
body.cpx-legacy .row-data span { font-size: 13.5px; }
body.cpx-legacy .section-data, body.cpx-legacy .inner_sectn { float: none; width: auto; padding: 0; }
body.cpx-legacy .section-data h2, body.cpx-legacy .tab-full h2 { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: .75rem; margin: .4rem 0 .8rem; color: hsl(var(--foreground)); font-size: 15px; font-weight: 650; }
body.cpx-legacy .btn.btn-primary, body.cpx-legacy .btn-comn, body.cpx-legacy .btn-sub-comn { display: inline-flex; align-items: center; height: 2rem; padding: 0 .85rem; border: 0; border-radius: var(--radius); background: hsl(var(--primary)); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1; box-shadow: none; float: none !important; }
body.cpx-legacy .btn.btn-primary:hover { filter: brightness(.95); background: hsl(var(--primary)); }
body.cpx-legacy input[type=text], body.cpx-legacy input[type=email], body.cpx-legacy input[type=password], body.cpx-legacy select { height: 2.1rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: #fff; padding: 0 .55rem; font-size: 13px; }
body.cpx-legacy .check_maroon_label { font-size: 13px !important; font-weight: 550; }

/* ── Timesheet screen shown inside a portal (body.cpx-ts, application/311/timesheets_new). Look only: the same
      fields, buttons and saves. Button colours come from the portal colour (pg_legacy_theme_style).
      Sizes in px: the screen loads Bootstrap 3, which sets the root font size to 10px. ── */
body.cpx-ts { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important; background: hsl(var(--background)) !important; color: hsl(var(--foreground)); }
body.cpx-ts .main-row { display: flow-root; width: auto; max-width: none; margin: 14px 16px 10px; padding: 12px 18px 6px; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); }
body.cpx-ts .full-row h4 { margin: 5px 12px 0 0; color: hsl(var(--foreground)); font-size: 18px; font-weight: 650; }
body.cpx-ts .btn-section { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
body.cpx-ts .btn.btn-primary { display: inline-flex; align-items: center; height: 32px !important; padding: 0 13px !important; border-radius: 6px !important; font-size: 12.5px !important; font-weight: 600; line-height: 1 !important; text-decoration: none !important; box-shadow: none !important; }
body.cpx-ts .dropdown .btn.dropdown-toggle { margin-left: -3px !important; padding: 0 7px !important; border-left: 1px solid rgba(255, 255, 255, .35) !important; }
body.cpx-ts .file-sectn .btn.btn-primary, body.cpx-ts .btn-cont .btn.btn-primary { height: 28px !important; font-size: 12px !important; }body.cpx-ts .full-row-inline label, body.cpx-ts .file-sectn label, body.cpx-ts .inner-span label { margin-bottom: 2px; color: hsl(var(--muted-foreground)) !important; font-size: 11px !important; font-weight: 650 !important; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-ts .full-row-inline label b { font-weight: inherit; }
body.cpx-ts .full-row-inline { font-size: 13.5px; }
/* The portal colour is for buttons only: text and tints stay neutral. */
body.cpx-ts span.clnt_val { padding: 2px 10px; border: 0; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 600; }
body.cpx-ts .inner-span > span[style] { padding: 4px 11px !important; border-radius: 999px !important; font-size: 11.5px !important; font-weight: 600; }
body.cpx-ts a.more, body.cpx-ts a.link_rec { color: hsl(var(--foreground)) !important; text-decoration: underline; }
/* Hours grid */
body.cpx-ts .main-row1 { display: block !important; margin: 0 16px 16px; padding: 0; }
body.cpx-ts #adjustments { border: 1px solid hsl(var(--border)) !important; border-collapse: separate; border-spacing: 0; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
body.cpx-ts #adjustments > thead > tr > th, body.cpx-ts #adjustments > tbody > tr > td { border-color: hsl(var(--border)) !important; }
body.cpx-ts #adjustments td, body.cpx-ts #adjustments th, body.cpx-ts #adjustments > tbody > tr { background-color: #fff !important; }
body.cpx-ts #adjustments > thead > tr > th { background-color: hsl(var(--muted) / .55) !important; }
body.cpx-ts #adjustments > thead td { background: transparent !important; border: 0 !important; color: hsl(var(--muted-foreground)); font-size: 11px !important; }
body.cpx-ts #adjustments > thead td b { color: hsl(var(--foreground)); font-size: 12px; font-weight: 650; }
body.cpx-ts #adjustments tr.main-head td { background-color: hsl(var(--muted)) !important; color: hsl(var(--foreground)) !important; border-color: hsl(var(--border)) !important; }
body.cpx-ts #adjustments td.first_head { color: hsl(var(--foreground)); font-size: 12.5px; font-weight: 550; }
body.cpx-ts #adjustments tr.main-head a { color: hsl(var(--foreground)) !important; text-decoration: underline; } /* inline light colour was for the old dark bar */
body.cpx-ts #adjustments td.td_wknds { background-color: hsl(var(--muted) / .7) !important; }
body.cpx-ts #adjustments td.td_wknds td, body.cpx-ts #adjustments td.td_wknds table { background: transparent !important; }
body.cpx-ts #adjustments .total-col { color: hsl(var(--foreground)); font-weight: 650; }
body.cpx-ts #adjustments .total-col b { color: hsl(var(--muted-foreground)) !important; font-size: 11px !important; letter-spacing: .04em; text-transform: uppercase; }
/* Hour boxes: a clearly visible border and a slight inset, so empty ones read as fields on the white grid. */
body.cpx-ts .input-conrepfields.numb_fld { width: 56px !important; height: 30px !important; padding: 2px 4px !important; border: 1px solid hsl(215 16% 72%) !important; border-radius: 6px !important; background: #fff !important; color: hsl(var(--foreground)); text-align: center !important; font-size: 13px !important; font-weight: 550; box-shadow: inset 0 1px 2px hsl(220 15% 25% / .08) !important; }
body.cpx-ts .input-conrepfields.numb_fld:hover:not([readonly]) { border-color: hsl(215 16% 52%) !important; }
/* Hours entered through a pop-up (task / CLIN, sign in / out, active time): the day's total as a box like the inputs. */
body.cpx-ts #adjustments td.inner-td > a[onclick*="frame_action"] { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 30px; padding: 0 8px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: #fff; color: hsl(var(--foreground)) !important; font-size: 13px; font-weight: 550; text-decoration: none !important; }
body.cpx-ts #adjustments td.inner-td > a[onclick*="frame_action"]:hover { border-color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / .6); }
/* Rows and cells whose colour means something: parent rows, holidays, punch clock dates. */
body.cpx-ts #adjustments tr.main1 td { background-color: hsl(var(--muted) / .6) !important; }
body.cpx-ts #adjustments td.tdholdy-div { background-color: hsl(0 80% 97%) !important; }
body.cpx-ts td.data-punch { background-color: hsl(var(--muted)) !important; color: hsl(var(--foreground)) !important; }
body.cpx-ts td.data-empty { background-color: hsl(var(--muted) / .6) !important; }
body.cpx-ts .holdy-div { border-radius: 999px; }
/* Task / CLIN rows: the warning text was yellow for the old dark bar. */
body.cpx-ts #adjustments tr.main-head font[color] { color: hsl(var(--warning-foreground)) !important; font-weight: 600; }
/* Task Details (sign in / out) and other reports under the grid. */
body.cpx-ts .report_set > div { width: auto !important; padding: 0 16px !important; }
body.cpx-ts .report_set label { color: hsl(var(--muted-foreground)) !important; font-size: 11px !important; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-ts .report_set .table { border: 1px solid hsl(var(--border)) !important; border-collapse: separate; border-spacing: 0; border-radius: 10px; overflow: hidden; background: #fff; }
body.cpx-ts .report_set .table > thead > tr > th { background: hsl(var(--muted) / .55) !important; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; border-color: hsl(var(--border)) !important; }
body.cpx-ts .report_set .table > tbody > tr > td { background: #fff !important; border-color: hsl(var(--border)) !important; font-size: 12.5px; }
body.cpx-ts .input-conrepfields.numb_fld[readonly] { border-color: hsl(var(--border)) !important; background: hsl(var(--muted)) !important; color: hsl(var(--foreground)); box-shadow: none !important; }
body.cpx-ts .input-conrepfields.numb_fld:focus { outline: none; border-color: hsl(215 25% 40%) !important; box-shadow: 0 0 0 3px hsl(215 25% 40% / .18) !important; }

/* Layout: a locked header (title, status, actions; then the timesheet's fields), the hours on the left and a side pane
   on the right (status, attachment, notes, approvals, invoices, details, history). Below 1180px the pane goes under
   the hours. Periods longer than a week show one 7-day table per week, so every timesheet is weekly width. */
body.cpx-ts .main-row.ts-top { position: sticky; top: 0; z-index: 40; display: block; margin: 0; padding: 12px 20px 12px; border: 0; border-bottom: 1px solid hsl(var(--border)); border-radius: 0; box-shadow: 0 1px 2px hsl(220 15% 25% / .04); }
body.cpx-ts .ts-top .middle-section { float: none; width: auto; margin: 0; }
body.cpx-ts .ts-head { float: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 12px; }
body.cpx-ts .ts-title { display: flex; align-items: center; gap: 10px; }
body.cpx-ts .ts-title h4 { float: none; margin: 0; }
body.cpx-ts .ts-title .inner-span { margin: 0; }
body.cpx-ts .ts-head .btn-section { float: none; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; width: auto; margin: 0; }
body.cpx-ts .ts-head .btn-section .btn { margin: 0 !important; }
/* Main actions (Submit, Approve) in the button colour; the others plain. */
body.cpx-ts .btn-section .btn.btn-primary.ts-btn-sec { border: 1px solid hsl(var(--border)) !important; background: #fff !important; color: hsl(var(--foreground)) !important; }
body.cpx-ts .btn-section .btn.btn-primary.ts-btn-sec:hover { background: hsl(var(--muted)) !important; }
body.cpx-ts .btn-section .btn[disabled] { opacity: .5; }
body.cpx-ts .ts-print { display: inline-flex; }
body.cpx-ts .ts-print > .btn:first-child { border-radius: 6px 0 0 6px !important; }
body.cpx-ts .ts-print > .btn.dropdown-toggle { margin-left: -1px !important; padding: 0 8px !important; border-radius: 0 6px 6px 0 !important; border-left: 1px solid hsl(var(--border)) !important; }
body.cpx-ts .ts-print .dropdown-menu { min-width: 120px; font-size: 12.5px; }
body.cpx-ts .ts-more-wrap { position: relative; display: inline-flex; }
body.cpx-ts .ts-more { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: #fff; color: hsl(var(--foreground)); font-size: 18px; line-height: 1; cursor: pointer; user-select: none; }
body.cpx-ts .ts-more:hover { background: hsl(var(--muted)); }
body.cpx-ts .ts-head .comn-drop-cont { width: 190px; padding: 4px 0; border-color: hsl(var(--border)); border-radius: 8px; box-shadow: 0 12px 28px hsl(220 15% 25% / .14); z-index: 60; }
body.cpx-ts .ts-head .comn-drop-cont ul { margin: 0; padding: 0; list-style: none; }
body.cpx-ts .ts-head .comn-drop-cont li a { padding: 7px 14px; font-size: 12.5px; }
body.cpx-ts .ts-fields { display: flex; flex-wrap: wrap; gap: 8px 40px; }
body.cpx-ts .ts-fields .full-row-inline { float: none; width: auto; margin: 0; }
body.cpx-ts .ts-fields .full-row-inline > label { display: block; min-width: 0; margin: 0 0 3px; }
body.cpx-ts .ts-endclt { margin-left: 8px; color: hsl(var(--muted-foreground)); font-size: 12.5px; }
/* Status pills (semantic colours: draft, submitted, approved, rejected). */
body.cpx-ts .ts-st { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
body.cpx-ts .ts-st-pend { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
body.cpx-ts .ts-st-sub { background: hsl(45 96% 89%); color: hsl(32 81% 29%); }
body.cpx-ts .ts-st-apr { background: hsl(141 60% 90%); color: hsl(142 64% 24%); }
body.cpx-ts .ts-st-rej { background: hsl(0 86% 94%); color: hsl(0 70% 40%); }
body.cpx-ts .ts-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 16px; padding: 14px 16px 24px; }
body.cpx-ts .ts-main { min-width: 0; }
body.cpx-ts .ts-main .main-row1 { margin: 0 !important; }
body.cpx-ts .ts-main .main-row1 > div[style*="max-height"] { max-height: none !important; } /* old 300px cap: the hours overflowed their box */
body.cpx-ts .ts-side { position: sticky; top: calc(var(--ts-head-h, 120px) + 14px); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--ts-head-h, 120px) - 28px); overflow-y: auto; }
@media (min-width: 1181px) { body.cpx-ts .ts-title .inner-span { display: none; } }
@media (max-width: 1180px) {
  body.cpx-ts .ts-layout { grid-template-columns: minmax(0, 1fr); }
  body.cpx-ts .ts-side { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; max-height: none; overflow: visible; }
}
/* Bill / Pay hours (two or three boxes a day): the grid gets the full width and the side pane's cards sit below it,
   side by side; the status pill shows next to the title instead. */
body.cpx-ts.ts-wide .ts-layout { grid-template-columns: minmax(0, 1fr); }
body.cpx-ts.ts-wide .ts-side { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; max-height: none; overflow: visible; }
body.cpx-ts.ts-wide .ts-title .inner-span { display: inline; }
/* Week tables: full width of the hours area, columns share it; a week label above each when there are several. */
body.cpx-ts .ts-main .table-section { float: none; width: auto !important; margin: 0 0 12px; padding: 0; overflow-x: auto; }
body.cpx-ts .ts-main #adjustments { width: 100% !important; }
body.cpx-ts .ts-main .inner-table, body.cpx-ts .ts-main .inpt-table-td { width: auto !important; min-width: 64px !important; }
body.cpx-ts .ts-main #adjustments th.first_head, body.cpx-ts .ts-main #adjustments td.first_head { width: 130px !important; }
/* Submitted hours only: every day slot, the empty ones before or after a part week included, gets the same width,
   so the weeks of a period line up under each other (narrow screens scroll sideways instead of squeezing the boxes). */
body.cpx-ts:not(.ts-wide) .ts-main #adjustments { table-layout: fixed; min-width: 760px; }
/* Total column: room for the label, four-digit totals and the Bill/Pay totals under them. */
body.cpx-ts .ts-main #adjustments > * > tr > th:last-of-type, body.cpx-ts .ts-main #adjustments > * > tr > td:last-of-type { width: 92px !important; min-width: 92px !important; padding-right: 14px !important; }
/* Bill / Pay hours shown: each day's boxes share its cell evenly, centred under their labels, never spilling into the next day;
   the days keep enough width for two or three boxes (the hours area scrolls sideways if the screen is too narrow). */
body.cpx-ts .ts-main #adjustments th.inner-table:has(td[id^="bil"]) { min-width: 118px !important; }
body.cpx-ts .ts-main #adjustments th.inner-table:has(td[id^="pay"]) { min-width: 162px !important; }
body.cpx-ts #adjustments .inner-table table td, body.cpx-ts #adjustments table.inpt-table td.inner-td { text-align: center !important; }
/* Scrolled sideways: the hour-code column stays in place (the plugin's fixed-column copy loses its row heights in this layout). */
body.cpx-ts .ts-main .DTFC_LeftWrapper { display: none !important; }
body.cpx-ts .ts-main #adjustments { overflow: clip !important; } /* rounded corners without becoming the scroll box */
body.cpx-ts .ts-main #adjustments > * > tr > :first-child { position: sticky; left: 0; z-index: 2; background: #fff; box-shadow: 1px 0 0 hsl(var(--border)); }
body.cpx-ts .ts-main #adjustments > thead > tr > :first-child { background: hsl(var(--muted)); }
body.cpx-ts .ts-main .dataTables_scrollHead table > thead > tr > :first-child { position: sticky; left: 0; z-index: 2; background: hsl(var(--muted)); box-shadow: 1px 0 0 hsl(var(--border)); }
body.cpx-ts .ts-main .dataTables_scrollHead table { overflow: clip !important; }
/* Bill/Pay grid: DataTables fixes the box at 300px, which left the sideways scrollbar far below short grids. */
body.cpx-ts .ts-main .dataTables_scrollBody { position: relative !important; height: auto !important; max-height: none !important; overflow-y: hidden !important; }
body.cpx-ts .ts-main .DTFC_ScrollWrapper { height: auto !important; }
/* Client / PO / placement label runs across the empty day cells (merged look). It stays in the flow with no width,
   so it sets the row height itself while its text spills right over the empty cells. Not bold. */
body.cpx-ts .ts-main #adjustments tr.main-head .main-pos { position: static; display: block; width: 0; white-space: nowrap; padding: 5px 0; }
body.cpx-ts .ts-main #adjustments tr.main-head > td:first-child { box-shadow: none; }
body.cpx-ts .ts-main #adjustments tr.main-head td, body.cpx-ts .ts-main #adjustments tr.main-head td b { font-weight: 400 !important; }
body.cpx-ts #adjustments table.inpt-table .cust_div { width: auto !important; }
body.cpx-ts #adjustments table.inpt-table:has(input[name$="[BLHRS]"][type=text]) td.inner-td { padding: 2px !important; }
body.cpx-ts #adjustments table.inpt-table:has(input[name$="[BLHRS]"][type=text]) .numb_fld { width: 50px !important; }
body.cpx-ts #adjustments table.inpt-table:has(input[name$="[BLHRS]"][type=text]) td.inner-td > a[onclick*="frame_action"] { min-width: 50px; padding: 0 4px; }
body.cpx-ts .ts-week { margin: 2px 0 6px; color: hsl(var(--foreground)); font-size: 12.5px; font-weight: 650; }
body.cpx-ts .ts-week span { margin-left: 6px; color: hsl(var(--muted-foreground)); font-weight: 500; }
body.cpx-ts .ts-period-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; margin: 0 0 12px; padding: 10px 14px; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-ts .ts-period-total b { color: hsl(var(--foreground)); font-size: 16px; letter-spacing: 0; }
/* Side pane cards */
body.cpx-ts .ts-card { padding: 12px 14px; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); font-size: 12.5px; }
body.cpx-ts .ts-card h5, body.cpx-ts .ts-card-pay h4 { margin: 0 0 9px !important; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-ts .ts-dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin: 10px 0 0; }
body.cpx-ts .ts-dl dt { color: hsl(var(--muted-foreground)); font-weight: 500; }
body.cpx-ts .ts-dl dd { margin: 0; color: hsl(var(--foreground)); }
body.cpx-ts .ts-dl small { display: block; color: hsl(var(--muted-foreground)); font-size: 11.5px; }
body.cpx-ts .ts-card-file #browsse { float: none; width: auto; margin: 0; }
body.cpx-ts .ts-card-file .file-sectn { display: block; margin: 0; }
body.cpx-ts .ts-card-file .file-sectn > label { display: none !important; }
body.cpx-ts .ts-card-file .browse-inpt { display: block; }
body.cpx-ts .ts-card-file .input-group-btn1 { display: block; }
/* The base box style comes from common.js once it runs; the shape is set here too so the box does not jump while loading. */
body.cpx-ts .ts-card-file .cnr-dz { display: flex; align-items: center; gap: 7px; width: 100%; height: auto; min-height: 34px; padding: 7px 12px; white-space: normal; border: 1px dashed #cbd5e1; border-radius: 6px; cursor: pointer; background: #fff; color: #334155; font: 12.5px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; box-sizing: border-box; }
body.cpx-ts .ts-card-file .cnr-dz svg { flex: none; width: 15px; height: 15px; color: #475569; }
body.cpx-ts .ts-card-file .cnr-dz > span { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; min-width: 0; }
body.cpx-ts .ts-card-file .cnr-dz b { color: #1e293b; font-weight: 600; }
body.cpx-ts .ts-card-file .cnr-dz small { color: #64748b; font-size: 11.5px; }
body.cpx-ts .ts-side { overflow-x: hidden; }
body.cpx-ts .ts-card-file .display-name { max-width: 230px; height: 28px; padding: 6px 10px; border-color: hsl(var(--border)); border-radius: 6px 0 0 6px; color: hsl(var(--foreground)) !important; font-size: 12px; line-height: 14px; }
body.cpx-ts .ts-card-file .display-close { height: 28px; padding: 0 9px; border-color: hsl(var(--border)); border-radius: 0 6px 6px 0; background: hsl(var(--muted)); color: hsl(var(--foreground)); line-height: 26px; }
body.cpx-ts .ts-card-file .addtnl_file { display: inline-block; margin: 8px 0 0; color: hsl(var(--foreground)); font-size: 12px; text-decoration: underline; }
/* Notes: one low-profile line under the header fields: the latest note and "All notes: n" when there are notes,
   and "+ Add note". */
body.cpx-ts .ts-top .ts-notes-blk { margin: 9px 0 0; }
body.cpx-ts .ts-notes-blk > span { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 3px 14px; margin: 0 !important; font-size: 12.5px; }
body.cpx-ts .ts-notes-blk p.data-txt { order: 1; float: none; max-width: 560px !important; margin: 0; color: hsl(var(--foreground)); font-family: inherit; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cpx-ts .ts-notes-blk p.data-txt:not(:empty)::before { content: "Note: "; color: hsl(var(--muted-foreground)); font-weight: 600; }
body.cpx-ts .ts-notes-blk p.data-txt:empty { display: none; }
body.cpx-ts .ts-notes-blk .view_nts { order: 2; margin: 0; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 500; }
body.cpx-ts .ts-notes-blk .view_nts { margin-left: -9px; }
body.cpx-ts .ts-notes-blk .view_nts a { display: inline-block; padding: 0 7px; border: 1px solid hsl(var(--border)); border-radius: 9px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 700; line-height: 15px; text-decoration: none !important; }
body.cpx-ts .ts-notes-blk .view_nts a:hover { border-color: hsl(var(--muted-foreground)); }
body.cpx-ts .ts-notes-blk a.more.edit_htsm { order: 3; float: none; margin: 0 !important; color: hsl(var(--muted-foreground)) !important; font-size: 12px; font-weight: 600; text-decoration: none !important; }
body.cpx-ts .ts-notes-blk a.more.edit_htsm:hover { color: hsl(var(--foreground)) !important; text-decoration: underline !important; }
/* Work State, VMS Status, Manual Hours: more header fields (their blocks keep the old inline margins). */
body.cpx-ts .ts-fields .full-row-inline { margin: 0 !important; }
body.cpx-ts .ts-fields .full-row-inline > div > label { display: block; min-width: 0 !important; margin: 0 0 3px; }
/* Invoices: one line per kind, "AR INVOICES  1255, 1256" */
body.cpx-ts .ts-card-inv .full-row-inline { float: none !important; display: block !important; width: auto !important; margin: 0 0 6px !important; }
body.cpx-ts .ts-card-inv .full-row-inline:last-child { margin-bottom: 0 !important; }
body.cpx-ts .ts-card-inv .pay_dta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; padding: 0 !important; }
body.cpx-ts .ts-card-inv label { flex: 0 0 92px; min-width: 0 !important; margin: 0; }
body.cpx-ts .ts-card-inv .payroll_rcrds, body.cpx-ts .ts-card-inv .payroll_rcrds tbody { display: flex; flex-wrap: wrap; gap: 2px 10px; width: auto !important; margin: 0 !important; }
body.cpx-ts .ts-card-inv .payroll_rcrds tr, body.cpx-ts .ts-card-inv .payroll_rcrds td { display: inline; padding: 0 !important; }
body.cpx-ts .ts-card-pay .payroll_rcrds { width: auto !important; margin: 0 !important; }
body.cpx-ts .ts-card-pay .payroll_rcrds td { padding: 2px 0 !important; }
body.cpx-ts .ts-card-pay .report_set { float: none !important; display: block !important; width: auto !important; }
body.cpx-ts .ts-card-pay .pay_dta { padding: 0 !important; }
/* History: the audit log as a timeline (newest first); each step's hours open below it. */
body.cpx-ts .ts-tl { margin: 0 0 0 6px; padding: 2px 0 0 16px; border-left: 2px solid hsl(var(--border)); list-style: none; }
body.cpx-ts .ts-tl > li { position: relative; padding: 0 0 14px; }
body.cpx-ts .ts-tl > li:last-child { padding-bottom: 2px; }
body.cpx-ts .ts-tl > li::before { content: ""; position: absolute; top: 2px; left: -24px; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: hsl(var(--muted-foreground)); box-shadow: 0 0 0 1px hsl(var(--border)); }
body.cpx-ts .ts-tl > li.ts-tl-sub::before { background: hsl(38 92% 50%); }
body.cpx-ts .ts-tl > li.ts-tl-apr::before { background: hsl(142 64% 38%); }
body.cpx-ts .ts-tl > li.ts-tl-rej::before { background: hsl(0 72% 51%); }
body.cpx-ts .ts-tl-head b { color: hsl(var(--foreground)); font-size: 13px; font-weight: 650; }
body.cpx-ts .ts-tl-head span, body.cpx-ts .ts-tl-meta { color: hsl(var(--muted-foreground)); font-size: 12px; }
body.cpx-ts .ts-tl-note { margin-top: 5px; padding: 6px 9px; border-radius: 6px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-size: 12.5px; overflow-wrap: anywhere; }
body.cpx-ts .ts-tl-hrs { margin-top: 4px; }
body.cpx-ts .ts-tl-hrs summary { display: list-item; color: hsl(var(--foreground)); font-size: 12px; font-weight: 600; cursor: pointer; } /* Bootstrap 3 hides the arrow (display: block) */
body.cpx-ts .ts-tl-hrs table { width: 100%; margin-top: 4px; font-size: 12px; }
body.cpx-ts .ts-tl-hrs td { padding: 3px 0; border-top: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); }
body.cpx-ts .ts-tl-hrs td:last-child { text-align: right; }
body.cpx-ts a.ts-tl-all { display: inline-block; margin-top: 4px; color: hsl(var(--foreground)); font-size: 12px; font-weight: 600; text-decoration: underline; }
/* Reports under the hours (punch clock, task details, revisions): cards as wide as the hours, text wraps. */
body.cpx-ts .ts-main .ts-report { float: none !important; width: auto !important; margin: 0 0 12px !important; padding: 12px 14px !important; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); }
body.cpx-ts .ts-main .ts-report > div, body.cpx-ts .ts-main .ts-report .pay_dta { width: auto !important; padding: 0 !important; }
body.cpx-ts .ts-report-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
body.cpx-ts .ts-report-head h3 { margin: 0; color: hsl(var(--foreground)); font-size: 13.5px; font-weight: 650; }
body.cpx-ts .ts-report-sub { color: hsl(var(--muted-foreground)); font-size: 12px; }
body.cpx-ts .ts-main .ts-report .table { width: 100% !important; margin: 0; border: 1px solid hsl(var(--border)) !important; border-collapse: separate; border-spacing: 0; border-radius: 8px; overflow: hidden; background: #fff; }
body.cpx-ts .ts-main .ts-report .table > thead > tr > th { padding: 7px 10px !important; border: 0 !important; border-bottom: 1px solid hsl(var(--border)) !important; background: hsl(var(--muted) / .55) !important; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
body.cpx-ts .ts-main .ts-report .table > tbody > tr > td { padding: 7px 10px !important; border: 0 !important; border-top: 1px solid hsl(var(--border)) !important; background: #fff; color: hsl(var(--foreground)); font-size: 12.5px; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
body.cpx-ts .ts-main .ts-report .table > tbody > tr:first-child > td { border-top: 0 !important; }
body.cpx-ts .ts-main .ts-punch td.data-punch { background: hsl(var(--muted)) !important; color: hsl(var(--foreground)) !important; font-size: 12.5px; font-weight: 650; text-align: left; }
body.cpx-ts .ts-main .ts-punch td.data-empty { background: hsl(var(--muted) / .5) !important; }
body.cpx-ts .ts-main .ts-punch tr.data-row td { border-top: 2px solid hsl(var(--border)) !important; }
/* Login / Logout details: day name, hour type, +1 day mark and one line per break. */
body.cpx-ts .ts-inout .ts-io-day { color: hsl(var(--muted-foreground)); }
body.cpx-ts .ts-inout .ts-io-rate { display: block; color: hsl(var(--muted-foreground)); font-size: 11.5px; }
body.cpx-ts .ts-inout .ts-io-next { color: #b45309; font-size: 11px; font-weight: 600; white-space: nowrap; }
body.cpx-ts .ts-inout .ts-io-brk { display: block; white-space: nowrap; }
body.cpx-ts .ts-inout .ts-io-none { color: hsl(var(--muted-foreground)); }

/* ── Hours pop-ups opened from a timesheet day (body.cpx-pop: task / CLIN hours, punch in / out, active time). Look
      only: same fields, checks and saves. A locked header with the title and actions, the details as label / value
      pairs, tables as cards that fill the width. ── */
body.cpx-pop { margin: 0; }
body.cpx-pop .main-container { float: none; width: auto; padding: 0 0 24px; }
body.cpx-pop .pop-head { position: sticky; top: 0; z-index: 30; float: none; display: flex !important; align-items: center; justify-content: space-between; gap: 10px 16px; width: auto !important; margin: 0 !important; padding: 12px 18px !important; background: #fff; border-bottom: 1px solid hsl(var(--border)); }
body.cpx-pop .pop-head h4 { display: block; margin: 0 !important; color: hsl(var(--foreground)); font-size: 17px; font-weight: 650; }
body.cpx-pop .pop-head .btn-section { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; float: none; width: auto; margin: 0; }
body.cpx-pop .pop-head .btn { margin: 0 !important; }
body.cpx-pop .pop-head .btn.btn-close { border: 1px solid hsl(var(--border)) !important; background: #fff !important; color: hsl(var(--foreground)) !important; }
body.cpx-pop .pop-head .btn.btn-close:hover { background: hsl(var(--muted)) !important; }
body.cpx-pop .main-row, body.cpx-pop .main-row2 { display: flow-root; float: none; width: auto !important; margin: 14px 18px 0 !important; padding: 14px 16px !important; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); }
body.cpx-pop .main-row2 { padding: 0 !important; background: transparent; border: 0; box-shadow: none; }
body.cpx-pop .row2-left, body.cpx-pop .row2-full { float: none !important; display: inline-flex; flex-wrap: wrap; gap: 6px 28px; width: auto !important; margin: 0 28px 4px 0; padding: 0; background: transparent; border: 0; vertical-align: top; }
body.cpx-pop p.norm_para { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0 !important; font-size: 13.5px !important; }
body.cpx-pop p.norm_para label { margin: 0; color: hsl(var(--muted-foreground)) !important; font-size: 11px !important; font-weight: 650 !important; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-pop p.norm_para span { color: hsl(var(--foreground)); font-size: 13.5px; }
body.cpx-pop .check_row { display: inline-flex !important; align-items: center; gap: 6px; width: auto !important; }
body.cpx-pop .form-row { display: block; margin: 12px 0 0; }
body.cpx-pop .form-row > label { color: hsl(var(--muted-foreground)) !important; font-size: 11px !important; font-weight: 650 !important; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-pop .middle-section { float: none; width: auto; margin: 14px 0 0 !important; }
body.cpx-pop .full-row.in-row, body.cpx-pop #breaks_set { float: none; width: auto !important; margin: 0 !important; padding: 0 !important; }
body.cpx-pop .main-container > #breaks_set { margin: 14px 18px 0 !important; } /* active time: the list below the details card */
body.cpx-pop .table { width: 100% !important; margin: 0 !important; border: 1px solid hsl(var(--border)) !important; border-collapse: separate; border-spacing: 0; border-radius: 8px; overflow: hidden; background: #fff; }
body.cpx-pop .table > thead > tr > th, body.cpx-pop .table > thead > tr > td { padding: 7px 10px !important; border: 0 !important; border-bottom: 1px solid hsl(var(--border)) !important; background: hsl(var(--muted) / .55) !important; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
body.cpx-pop .table > thead > tr > th b, body.cpx-pop .table > thead > tr > td b { font-weight: inherit; }
body.cpx-pop .table > thead, body.cpx-pop .table > thead > tr { background: transparent !important; }
body.cpx-pop .table > thead > tr > th, body.cpx-pop .table > thead > tr > td { background-color: hsl(var(--muted)) !important; }
body.cpx-pop .top-normal b, body.cpx-pop .top-normal label { color: hsl(var(--foreground)) !important; }
body.cpx-pop .full-row.form-row { float: none; width: auto; }
body.cpx-pop #total_tab { width: 100% !important; }
/* break rows keep their tint, softer */
body.cpx-pop tr.numb_row[style*="ffd5d5"] > td { background: hsl(0 86% 97%) !important; }
body.cpx-pop .table > thead.top-normal > tr > th { background: transparent !important; border: 0 !important; text-transform: none; letter-spacing: 0; }
body.cpx-pop .table > tbody > tr > td { padding: 7px 10px !important; border: 0 !important; border-top: 1px solid hsl(var(--border)) !important; color: hsl(var(--foreground)); font-size: 12.5px; vertical-align: middle; }
body.cpx-pop .table > tbody > tr:first-child > td { border-top: 0 !important; }
body.cpx-pop .table-striped > tbody > tr:nth-of-type(odd) { background: #fff; }
body.cpx-pop td.screen-td { background: hsl(var(--muted) / .6); font-weight: 650; }
body.cpx-pop input.input-conrepfields { height: 30px !important; padding: 0 8px !important; border: 1px solid hsl(var(--border)) !important; border-radius: 6px !important; box-shadow: none !important; font-size: 13px !important; }
body.cpx-pop input.input-conrepfields.time-hrs, body.cpx-pop input.input-conrepfields.time-inner, body.cpx-pop input.input-conrepfields.time-outer { width: 84px !important; text-align: left; }
body.cpx-pop textarea.form-control, body.cpx-pop textarea.input-conrepfields { width: 100% !important; min-height: 32px !important; padding: 6px 9px !important; border: 1px solid hsl(var(--border)) !important; border-radius: 6px !important; box-shadow: none !important; font-size: 12.5px !important; }
body.cpx-pop input.input-conrepfields:focus, body.cpx-pop textarea:focus { outline: none; border-color: hsl(var(--muted-foreground)) !important; box-shadow: 0 0 0 3px hsl(var(--muted-foreground) / .15) !important; }
body.cpx-pop a.break_link, body.cpx-pop a.showPost { display: inline-flex; align-items: center; height: 28px; margin: 8px 8px 8px 0; padding: 0 10px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: #fff; color: hsl(var(--foreground)) !important; font-size: 12px; font-weight: 600; text-decoration: none !important; }
body.cpx-pop a.break_link:hover, body.cpx-pop a.showPost:hover { background: hsl(var(--muted)); }
body.cpx-pop #STHRS_text, body.cpx-pop #main_total { color: hsl(var(--foreground)) !important; font-size: 15px; font-weight: 700; }
body.cpx-pop i.remove-icon, body.cpx-pop .act_sectn i { padding: 5px; border-radius: 6px; color: hsl(var(--muted-foreground)) !important; cursor: pointer; }
body.cpx-pop i.remove-icon:hover, body.cpx-pop .act_sectn i:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)) !important; }
body.cpx-pop #flash-msg { position: fixed; top: 12px; left: 50%; z-index: 99999; transform: translateX(-50%); margin: 0; padding: 9px 16px; border: 0; border-radius: 8px; background: hsl(var(--destructive)); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 10px 24px hsl(220 15% 25% / .2); }
/* punch in / out: the in / out cells hold the smart time field and its 12-hour hint */
body.cpx-pop #body_tab td { white-space: nowrap; }
body.cpx-pop #body_tab td textarea { white-space: normal; }

/* ── Additional Files (body.cpx-af, application/104/additional_files, shared by every screen with "more files"):
      the list with its header, and the Add Files dialog: title and Continue / Close on one line, one box to click,
      drop or paste files into, and the chosen files as a list. ── */
body.cpx-af .main-row { width: auto !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.cpx-af .middle-section { float: none; width: auto; margin: 0 !important; }
body.cpx-af .pop-head h4 { float: none; color: hsl(var(--foreground)); }
body.cpx-af .btn.af-btn-sec { border: 1px solid hsl(var(--border)) !important; background: #fff !important; color: hsl(var(--foreground)) !important; }
body.cpx-af .btn.af-btn-sec:hover { background: hsl(var(--muted)) !important; }
body.cpx-af .disabled-div { margin: 14px 18px 0; }
body.cpx-af .edit_com_block2 { width: auto !important; }
body.cpx-af .file_newsection { width: 100% !important; max-width: 900px; margin: 0; border: 1px solid hsl(var(--border)) !important; border-collapse: separate; border-spacing: 0; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); table-layout: auto; }
body.cpx-af .file_newsection thead, body.cpx-af .file_newsection thead tr { background: transparent !important; }
body.cpx-af .file_newsection th { width: auto !important; padding: 8px 12px !important; border: 0 !important; border-bottom: 1px solid hsl(var(--border)) !important; background: hsl(var(--muted)) !important; color: hsl(var(--muted-foreground)) !important; font-family: inherit !important; font-size: 11px !important; font-weight: 650 !important; letter-spacing: .03em; text-transform: uppercase; }
body.cpx-af .file_newsection td { padding: 8px 12px !important; border: 0 !important; border-top: 1px solid hsl(var(--border)) !important; background: #fff !important; color: hsl(var(--foreground)) !important; font-size: 12.5px !important; vertical-align: middle !important; }
body.cpx-af .file_newsection tbody tr:first-child td { border-top: 0 !important; }
body.cpx-af .file_newsection td a { color: hsl(var(--foreground)) !important; text-decoration: underline; }
body.cpx-af .file_newsection td a.removerow { padding: 4px 6px; border-radius: 6px; color: hsl(var(--muted-foreground)) !important; text-decoration: none; }
body.cpx-af .file_newsection td a.removerow:hover { background: hsl(var(--muted)); color: hsl(var(--destructive)) !important; }
body.cpx-af .file_newsection td.text-center { padding: 22px !important; color: hsl(var(--muted-foreground)) !important; }
body.cpx-af .file_newsection input.input-conrepfields { height: 30px; padding: 0 8px; border: 1px solid hsl(var(--border)); border-radius: 6px; box-shadow: none; }
/* the dialog */
body.cpx-af .modal-dialog { width: auto; max-width: 860px; margin: 24px auto 0; }
body.cpx-af .modal-content { border: 0; border-radius: 12px; box-shadow: 0 20px 50px hsl(220 15% 25% / .25); }
body.cpx-af .modal-body { padding: 0 !important; overflow: visible; }
body.cpx-af .af-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid hsl(var(--border)); }
body.cpx-af .af-modal-head h4 { float: none; margin: 0; color: hsl(var(--foreground)); font-size: 16px; font-weight: 650; }
body.cpx-af .btn_cont_top { position: static !important; display: flex; gap: 6px; width: auto !important; padding: 0 !important; background: transparent !important; }
body.cpx-af .btn_cont_top .btn { display: inline-flex; align-items: center; height: 32px; margin: 0 !important; padding: 0 14px; border-radius: 6px; font-size: 12.5px; font-weight: 600; }
body.cpx-af .modal-body .form-group { margin: 0; padding: 16px 18px 18px; }
body.cpx-af .file-input .file-preview { margin: 0; padding: 0; border: 0; box-shadow: none; max-height: none; overflow: visible; }
body.cpx-af .file-drop-zone { min-height: 0 !important; height: auto !important; margin: 0 !important; padding: 26px 16px !important; border: 2px dashed hsl(215 16% 78%) !important; border-radius: 10px !important; background: hsl(var(--muted) / .45); cursor: pointer; transition: border-color .15s, background .15s; }
body.cpx-af .file-drop-zone:hover, body.cpx-af .file-drop-zone.file-highlighted { border-color: hsl(215 16% 52%) !important; background: hsl(var(--muted) / .8); }
body.cpx-af .file-drop-zone-title { min-height: 0 !important; height: auto !important; padding: 0 !important; color: hsl(var(--muted-foreground)) !important; font-size: 13px !important; line-height: 1.5; }
body.cpx-af .file-drop-zone-title + .file-preview-thumbnails { display: none; } /* empty box: just the prompt */
body.cpx-af .file-drop-zone-title::before { content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 8px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E"); }
body.cpx-af .file-drop-zone-title b { display: block; color: hsl(var(--foreground)); font-size: 14px; font-weight: 600; }
body.cpx-af .file-drop-zone-title small { display: block; margin-top: 2px; font-size: 12px; }
/* chosen files: compact cards in a wrap */
body.cpx-af .file-preview-thumbnails { display: flex; flex-wrap: wrap; gap: 10px; }
body.cpx-af .file-preview-thumbnails:not(:empty)::after { content: "Drop, paste or click to add more"; flex-basis: 100%; color: hsl(var(--muted-foreground)); font-size: 12px; text-align: center; }
body.cpx-af .file-preview-frame { float: none !important; display: flex !important; flex-direction: column; width: 150px !important; height: auto !important; margin: 0 !important; padding: 8px !important; border: 1px solid hsl(var(--border)) !important; border-radius: 8px !important; background: #fff; box-shadow: none !important; cursor: default; }
body.cpx-af .file-preview-frame .kv-file-content { width: 100% !important; height: 86px !important; overflow: hidden; border-radius: 4px; background: hsl(var(--muted) / .5); }
body.cpx-af .file-preview-frame .kv-file-content object, body.cpx-af .file-preview-frame .kv-file-content embed, body.cpx-af .file-preview-frame .kv-file-content iframe { width: 100% !important; height: 86px !important; pointer-events: none; }
body.cpx-af .file-preview-frame .kv-file-content img, body.cpx-af .file-preview-frame .kv-file-content .file-preview-other-frame { max-width: 100% !important; max-height: 86px !important; height: 86px !important; width: 100% !important; object-fit: contain; }
body.cpx-af .file-preview-frame .file-thumbnail-footer { height: auto !important; }
body.cpx-af .file-preview-frame .file-footer-caption, body.cpx-af .file-preview-frame .file-footer-caption samp { margin: 6px 0 0 !important; color: hsl(var(--foreground)) !important; font-family: inherit !important; font-size: 11.5px !important; }
body.cpx-af .file-preview-frame .file-footer-caption samp { display: block; margin: 0 !important; color: hsl(var(--muted-foreground)) !important; }
body.cpx-af .file-preview-frame .file-actions, body.cpx-af .file-preview-frame .file-upload-indicator { display: none !important; }
body.cpx-af .modal-backdrop.in { opacity: .35; }

/* ── Timesheet audit log (body.cpx-audit, application/311/ts_audit_log): status tabs, then one grid with a group per
      step (newest first) — the step line with its day totals, then its hours by hour code. Column headers stay at the
      top while the grid scrolls; changed hours are tinted with the earlier value struck through. ── */
body.cpx-audit .al-meta { display: flex; flex-wrap: wrap; margin-top: 3px; color: hsl(var(--muted-foreground)); font-size: 12.5px; }
body.cpx-audit .al-meta > * + *::before { content: "\00b7"; margin: 0 7px; }
body.cpx-audit .al-meta b { color: hsl(var(--foreground)); font-weight: 600; }
body.cpx-audit .al-tabs { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin: 10px 18px 8px; }
body.cpx-audit .cpx-stab { height: 34px; padding: 0 13px; font-size: 13px; }
body.cpx-audit .cpx-stab em { min-width: 20px; height: 20px; padding: 0 6px; }
body.cpx-audit .al-legend { display: inline-flex; align-items: center; gap: 6px; color: hsl(var(--muted-foreground)); font-size: 12px; }
body.cpx-audit .al-chg-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: hsl(45 96% 89%); box-shadow: inset 0 0 0 1px hsl(38 80% 70%); }
body.cpx-audit .al-empty { margin: 16px 18px; padding: 28px; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; color: hsl(var(--muted-foreground)); text-align: center; font-size: 13px; }
body.cpx-audit .al-wrap { margin: 0 18px; max-height: calc(100vh - 150px); overflow: auto; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); }
body.cpx-audit .al-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
body.cpx-audit .al-grid thead th { position: sticky; top: 0; z-index: 2; padding: 8px 10px; border-bottom: 1px solid hsl(var(--border)); background: hsl(220 14% 96%); color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
body.cpx-audit .al-grid thead th span { display: block; font-size: 10.5px; font-weight: 600; }
body.cpx-audit .al-grid thead th.al-out { font-style: italic; opacity: .75; }
body.cpx-audit .al-grid td { padding: 7px 10px; border-top: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); vertical-align: top; }
body.cpx-audit .al-grid .al-name { min-width: 230px; max-width: 340px; text-align: left; }
body.cpx-audit .al-grid .al-num { min-width: 64px; text-align: right; white-space: nowrap; }
body.cpx-audit .al-grid .al-tot { font-weight: 650; }
body.cpx-audit .al-step-row td { padding-top: 12px; padding-bottom: 10px; border-top: 2px solid hsl(var(--border)); background: hsl(220 14% 98%); font-weight: 600; }
body.cpx-audit tbody.al-step:first-of-type .al-step-row td { border-top: 0; }
body.cpx-audit .al-step-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13.5px; }
body.cpx-audit .al-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--muted-foreground)); }
body.cpx-audit .al-sub .al-dot { background: hsl(38 92% 50%); }
body.cpx-audit .al-apr .al-dot { background: hsl(142 64% 38%); }
body.cpx-audit .al-rej .al-dot { background: hsl(0 72% 51%); }
body.cpx-audit .al-clin { padding: 1px 8px; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); font-size: 11.5px; font-weight: 600; }
body.cpx-audit .al-by, body.cpx-audit .al-delta { margin-top: 3px; color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 500; }
body.cpx-audit .al-note { margin-top: 6px; padding: 6px 9px; border-radius: 6px; background: #fff; border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); font-size: 12.5px; font-weight: 400; overflow-wrap: anywhere; }
body.cpx-audit .al-hrs-row .al-name { padding-left: 28px; }
body.cpx-audit .al-hrs-row .al-name small { display: block; color: hsl(var(--muted-foreground)); font-size: 11.5px; }
body.cpx-audit .al-hrs-row.al-gone .al-code { text-decoration: line-through; color: hsl(var(--muted-foreground)); }
body.cpx-audit td.al-chg { background: hsl(45 96% 92%); font-weight: 650; }
body.cpx-audit td.al-chg s { display: block; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 500; }
body.cpx-audit .al-has-note { display: inline-block; width: 6px; height: 6px; margin: 0 0 6px 3px; border-radius: 50%; background: hsl(var(--muted-foreground)); }

/* ── Login / Logout hours pop-up (body.cpx-io, application/311/ts_inout). Look only: the same fields, checks and
      saves. Times are typed or picked with the smart time field (input.cnr-time, common/scripts/common.js). ── */
body.cpx-io { margin: 0; background: hsl(var(--background)) !important; }
body.cpx-io .io-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: #fff; border-bottom: 1px solid hsl(var(--border)); }
body.cpx-io .io-head h4 { margin: 0 0 4px; color: hsl(var(--foreground)); font-size: 17px; font-weight: 650; }
body.cpx-io .io-meta { display: flex; flex-wrap: wrap; color: hsl(var(--muted-foreground)); font-size: 12.5px; }
body.cpx-io .io-meta span + span::before { content: "\00b7"; margin: 0 7px; }
body.cpx-io .io-meta b { color: hsl(var(--foreground)); font-weight: 600; }
body.cpx-io .io-body { padding: 14px 18px 24px; }
body.cpx-io .io-msg { margin-bottom: 12px; font-size: 13px; }
body.cpx-io .io-card { margin-bottom: 12px; padding: 14px 16px; background: #fff; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: var(--shadow-sm); }
body.cpx-io .io-opts { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid hsl(var(--border)); }
/* Enter Breaks / No Breaks Taken / Not Worked: one choice, shown as a segmented control over the same check boxes. */
body.cpx-io .io-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: hsl(var(--muted)); }
body.cpx-io .io-seg input { position: absolute; opacity: 0; pointer-events: none; }
body.cpx-io .io-seg label { margin: 0; padding: 6px 13px; border-radius: 6px; color: hsl(var(--muted-foreground)); font-size: 12.5px; font-weight: 600; cursor: pointer; }
body.cpx-io .io-seg input:checked + label { background: #fff; color: hsl(var(--foreground)); box-shadow: 0 1px 2px hsl(220 15% 25% / .15); }
body.cpx-io .io-seg input:focus-visible + label { outline: 2px solid hsl(var(--muted-foreground) / .5); }
body.cpx-io .io-seg input:disabled + label { cursor: default; }
/* Not Worked: one switch (it hides the times and breaks). */
body.cpx-io .io-switch { position: relative; display: inline-flex; align-items: center; gap: 9px; margin: 0; color: hsl(var(--foreground)); font-size: 13px; font-weight: 550; cursor: pointer; }
body.cpx-io .io-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
body.cpx-io .io-switch-ui { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: hsl(var(--border)); transition: background .15s; }
body.cpx-io .io-switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px hsl(220 15% 25% / .3); transition: left .15s; }
body.cpx-io .io-switch input:checked + .io-switch-ui { background: hsl(var(--foreground)); }
body.cpx-io .io-switch input:checked + .io-switch-ui::after { left: 16px; }
body.cpx-io .io-switch input:focus-visible + .io-switch-ui { outline: 2px solid hsl(var(--muted-foreground) / .5); outline-offset: 2px; }
body.cpx-io .io-switch input:disabled ~ span { opacity: .6; cursor: default; }
body.cpx-io .io-table .io-dur { width: 110px; white-space: nowrap; }
body.cpx-io .io-table td.io-dur { color: hsl(var(--muted-foreground)); font-size: 12.5px; }
body.cpx-io .io-table td.io-none { color: hsl(var(--muted-foreground)); font-size: 12.5px; text-align: center; }
/* After-midnight box: a full row under the times, shown only when the Logout Time is before the Login Time. */
body.cpx-io .io-next { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 10px 12px; border: 1px solid hsl(var(--border)); border-radius: 8px; background: hsl(var(--muted) / .45); color: hsl(var(--foreground)); font-size: 13px; }
body.cpx-io .io-next.io-next-ask { border-color: #f59e0b; background: #fffbeb; }
body.cpx-io .io-next input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; }
body.cpx-io .io-next label { margin: 0; font-weight: 400; cursor: pointer; }
body.cpx-io .io-next label b { display: block; font-weight: 600; }
body.cpx-io .io-next small { display: block; margin-top: 2px; color: hsl(var(--muted-foreground)); font-size: 12px; }
body.cpx-io .io-next input:disabled + label { cursor: default; }
body.cpx-io .io-times { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 30px; }
body.cpx-io .io-time label, body.cpx-io .io-total label { display: block; margin: 0 0 5px; color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
body.cpx-io input.input-conrepfields { width: 88px; height: 34px; padding: 0 10px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: #fff; color: hsl(var(--foreground)); font-size: 14px; font-weight: 550; box-shadow: none; }
body.cpx-io input.input-conrepfields:focus, body.cpx-io .io-table textarea:focus { outline: none; border-color: hsl(var(--muted-foreground)); box-shadow: 0 0 0 3px hsl(var(--muted-foreground) / .15); }
body.cpx-io input.input-conrepfields[readonly] { background: hsl(var(--muted)); }
body.cpx-io .io-total { margin-left: auto; text-align: right; }
body.cpx-io #STHRS_text { color: hsl(var(--foreground)); font-size: 24px; font-weight: 700; line-height: 34px; }
body.cpx-io .io-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
body.cpx-io .io-card-head b { color: hsl(var(--foreground)); font-size: 13.5px; font-weight: 650; }
body.cpx-io a.io-add { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: #fff; color: hsl(var(--foreground)); font-size: 12.5px; font-weight: 600; text-decoration: none; }
body.cpx-io a.io-add:hover { background: hsl(var(--muted) / .6); }
body.cpx-io .io-table { width: 100%; margin: 0; border: 1px solid hsl(var(--border)); border-collapse: separate; border-spacing: 0; border-radius: 8px; overflow: hidden; }
body.cpx-io .io-table > thead > tr > th { padding: 7px 10px; border: 0; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--muted) / .55); color: hsl(var(--muted-foreground)); font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
body.cpx-io .io-table > tbody > tr > td { padding: 7px 10px; border: 0; border-top: 1px solid hsl(var(--border)); background: #fff !important; vertical-align: middle; }
body.cpx-io .io-table > tbody > tr:first-child > td { border-top: 0; }
body.cpx-io .io-table td.io-time-td { width: 170px; white-space: nowrap; }
body.cpx-io .io-table textarea { width: 100% !important; min-height: 34px; padding: 7px 10px !important; border: 1px solid hsl(var(--border)); border-radius: 6px; font-size: 13px; resize: none; box-shadow: none; }
body.cpx-io .io-table td.io-del { width: 44px; text-align: center; }
body.cpx-io i.remove-icon { padding: 6px; border-radius: 6px; color: hsl(var(--muted-foreground)); font-size: 15px; cursor: pointer; }
body.cpx-io i.remove-icon:hover { background: hsl(var(--muted)); color: hsl(var(--destructive)); }
body.cpx-io #flash-msg { position: fixed; top: 12px; left: 50%; z-index: 99999; transform: translateX(-50%); margin: 0; padding: 9px 16px; border: 0; border-radius: 8px; background: hsl(var(--destructive)); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 10px 24px hsl(220 15% 25% / .2); }
