/* 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; }
.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: .75rem; flex-wrap: wrap; margin: 0 0 .85rem; }
.cpx-stab-acts { display: flex; align-items: center; gap: .4rem; }
.cpx-stabs { display: flex; flex-wrap: wrap; gap: .2rem; margin: 0; padding: .2rem; width: fit-content; max-width: 100%; border: 1px solid hsl(var(--border)); border-radius: .45rem; background: #fff; }
.cpx-stab { display: inline-flex; align-items: center; gap: .35rem; height: 1.85rem; padding: 0 .7rem; border-radius: .3rem; font-size: 12px; font-weight: 550; color: hsl(var(--muted-foreground)); text-decoration: none; }
.cpx-stab em { font-style: normal; font-size: 11px; opacity: .75; }
.cpx-stab:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.cpx-stab.on { 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; }
}
