/* Client Portal — public styles */
:root {
    --portal-primary: #2563eb;
    --portal-sidebar: #1e293b;
    --portal-accent: #dbeafe;
    --portal-bg: #f1f5f9;
    --portal-surface: #ffffff;
    --portal-surface-2: #f8fafc;
    --portal-surface-3: #f1f5f9;
    --portal-text: #0f172a;
    --portal-text-secondary: #334155;
    --portal-muted: #64748b;
    --portal-border: #e2e8f0;
    --portal-border-soft: #eef2f7;
    --portal-card: #ffffff;
    --portal-input-bg: #f8fafc;
    --portal-topbar-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --portal-shadow: rgba(15, 23, 42, .04);
    --portal-radius: .75rem;
    --theme-sidebar-bg: var(--portal-surface);
    --theme-sidebar-border: #e8edf2;
    --theme-muted: var(--portal-muted);
    --theme-muted-2: #94a3b8;
    --theme-text: var(--portal-text);
    --theme-text-secondary: var(--portal-text-secondary);
    --theme-hover: #f8fafc;
    --theme-active: #f1f5f9;
    --theme-border: var(--portal-border);
    --theme-user-card-bg: #f8fafc;
    --theme-avatar-bg: #e2e8f0;
    --theme-avatar-text: #475569;
    --portal-select-arrow: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

html[data-theme="dark"] {
    --portal-bg: #0b1220;
    --portal-surface: #111827;
    --portal-surface-2: #1a2332;
    --portal-surface-3: #243044;
    --portal-text: #f1f5f9;
    --portal-text-secondary: #cbd5e1;
    --portal-muted: #94a3b8;
    --portal-border: #334155;
    --portal-border-soft: #1e293b;
    --portal-card: #111827;
    --portal-input-bg: #1a2332;
    --portal-accent: color-mix(in srgb, var(--portal-primary) 16%, #1e293b);
    --portal-sidebar: #0f172a;
    --portal-topbar-bg: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    --portal-shadow: rgba(0, 0, 0, .22);
    --theme-sidebar-bg: #0b1220;
    --theme-sidebar-border: #1e293b;
    --theme-muted: #94a3b8;
    --theme-muted-2: #64748b;
    --theme-text: #f1f5f9;
    --theme-text-secondary: #cbd5e1;
    --theme-hover: #1a2332;
    --theme-active: #243044;
    --theme-border: #334155;
    --theme-user-card-bg: #111827;
    --theme-avatar-bg: #243044;
    --theme-avatar-text: #cbd5e1;
    --portal-select-arrow: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    --cp-text: var(--portal-text);
    --cp-surface: var(--portal-surface);
    --cp-surface-2: var(--portal-surface-2);
    --cp-bg: var(--portal-bg);
    --cp-border: var(--portal-border);
    --cp-muted: var(--portal-muted);
}

*, *::before, *::after { box-sizing: border-box; }

body.cp-body {
    margin: 0;
    font-family: var(--ui-font, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif);
    color: var(--portal-text);
    background: var(--portal-bg);
    min-height: 100vh;
}

.cp-guest {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.cp-guest-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.cp-guest-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
}

.cp-guest.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.cp-guest.login-split .cp-guest-bg {
    position: relative;
}

.cp-guest.login-split .cp-guest-bg::after {
    background: rgba(15, 23, 42, .25);
}

.cp-guest.login-split .cp-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #0f172a;
}

.cp-guest.login-centered .cp-login-wrap,
.cp-guest.login-overlay .cp-login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.cp-guest.login-overlay .cp-login-wrap {
    justify-content: flex-end;
    padding-right: 8%;
}

.cp-login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, .82);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--portal-radius);
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
}

.cp-login-header {
    background: linear-gradient(135deg, var(--portal-primary), color-mix(in srgb, var(--portal-primary) 70%, #000));
    padding: 1.75rem 1.5rem 1.25rem;
    text-align: center;
    color: #fff;
}

.cp-login-header img {
    max-height: 56px;
    max-width: 180px;
    object-fit: contain;
    margin-bottom: .75rem;
}

.cp-login-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.cp-login-header p {
    margin: .35rem 0 0;
    font-size: .85rem;
    opacity: .9;
}

.cp-login-body {
    padding: 1.5rem;
}

.cp-field {
    margin-bottom: 1rem;
}

.cp-field label {
    display: block;
    font-size: .82rem;
    color: #cbd5e1;
    margin-bottom: .35rem;
}

.cp-field input[type="text"],
.cp-field input[type="password"],
.cp-field input[type="email"],
.cp-field input[type="date"],
.cp-field input[type="number"],
.cp-field input[type="file"],
.cp-field select,
.cp-field textarea {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--portal-border);
    border-radius: .5rem;
    background: var(--portal-input-bg);
    color: var(--portal-text);
    font-size: .95rem;
}

.cp-content .cp-field label {
    color: var(--portal-muted);
}

.cp-login-body .cp-field input[type="text"],
.cp-login-body .cp-field input[type="password"],
.cp-login-body .cp-field input[type="email"],
.cp-login-body .cp-field input[type="date"],
.cp-login-body .cp-field input[type="number"],
.cp-login-body .cp-field input[type="file"],
.cp-login-body .cp-field select,
.cp-login-body .cp-field textarea {
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(15, 23, 42, .65);
    color: #f8fafc;
}

.cp-field input:focus,
.cp-field select:focus,
.cp-field textarea:focus {
    outline: none;
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 25%, transparent);
}

.cp-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #cbd5e1;
    font-size: .85rem;
    margin-bottom: 1.25rem;
}

.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: none;
    border-radius: .5rem;
    padding: .75rem 1.25rem;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s, opacity .15s;
}

.cp-btn:hover { opacity: .92; transform: translateY(-1px); }
.cp-btn-primary {
    width: 100%;
    background: var(--portal-primary);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--portal-primary) 35%, transparent);
}
.cp-btn-primary:hover {
    box-shadow: 0 6px 16px color-mix(in srgb, var(--portal-primary) 42%, transparent);
}
.cp-btn-outline {
    background: transparent;
    border: 1px solid var(--portal-border);
    color: var(--portal-text);
}
.cp-btn-sm { padding: .45rem .85rem; font-size: .85rem; }

.cp-alert {
    padding: .75rem 1rem;
    border-radius: .5rem;
    font-size: .88rem;
    margin-bottom: 1rem;
}
.cp-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.cp-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.cp-login-back {
    margin: 1rem 0 0;
    text-align: center;
    font-size: .84rem;
}

.cp-login-back a {
    color: var(--portal-muted);
    text-decoration: none;
}

.cp-login-back a:hover {
    color: var(--portal-primary);
}

/* Portal layout */
.cp-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cp-shell {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: 240px 1fr;
}

.cp-shell.layout-wide { grid-template-columns: 72px 1fr; }
.cp-shell.layout-wide .cp-nav-label,
.cp-shell.layout-wide .cp-nav-section,
.cp-shell.layout-wide .cp-sidebar-user-info { display: none; }
.cp-shell.layout-wide .cp-nav-item { justify-content: center; padding: .85rem; }

.cp-sidebar {
    background: var(--portal-sidebar);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.cp-shell.layout-light .cp-sidebar {
    background: var(--portal-surface);
    color: var(--portal-text);
    border-right: 1px solid var(--portal-border);
}

.cp-sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.cp-shell.layout-light .cp-sidebar-user {
    border-bottom-color: var(--portal-border);
}

.cp-sidebar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--portal-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
    overflow: hidden;
}

.cp-sidebar-avatar-img,
.cp-dash-hero-avatar-img,
.topbar-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-sidebar-user-info {
    min-width: 0;
    line-height: 1.3;
}

.cp-sidebar-user-info strong {
    display: block;
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-sidebar-user-info span {
    font-size: .72rem;
    color: #94a3b8;
}

.cp-shell.layout-light .cp-sidebar-user-info span {
    color: var(--portal-muted);
}

.cp-nav {
    padding: 1rem .75rem;
    flex: 1;
}

.cp-nav-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
    margin: .75rem .5rem .35rem;
}

.cp-shell.layout-light .cp-nav-section { color: var(--portal-muted); }

.cp-nav-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .65rem .85rem;
    border-radius: .55rem;
    border: none;
    color: inherit;
    text-decoration: none;
    font-size: .9rem;
    margin-bottom: .15rem;
    transition: background .15s;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.cp-nav-item:hover {
    background: rgba(255, 255, 255, .08);
    color: inherit;
}

.cp-shell.layout-light .cp-nav-item:hover {
    background: var(--portal-accent);
}

.cp-nav-item.active {
    background: var(--portal-primary);
    color: #fff;
}

.cp-shell.layout-light .cp-nav-item.active {
    color: #fff;
}

.cp-nav-item i { font-size: 1.05rem; width: 1.25rem; text-align: center; flex-shrink: 0; }

.cp-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Topbar — mismo diseño que panel admin (Paces) */
.cp-topbar-shell.topbar {
    background: var(--portal-topbar-bg, var(--portal-surface, #fff));
    border-bottom: 1px solid var(--portal-border, #e7e9eb);
    padding: 0 1.25rem;
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: none;
    flex-shrink: 0;
}

.cp-topbar-shell .topbar-card {
    padding: 0;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.cp-topbar-brand-row {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    flex-shrink: 0;
}

.cp-topbar-shell .topbar-logo-link,
.cp-topbar-brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: min(340px, 42vw);
    color: inherit;
    border-radius: .55rem;
    padding: 0;
}

.cp-topbar-shell .topbar-brand-banner {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    max-width: 100%;
    padding: .1rem .15rem .1rem 0;
}

.cp-topbar-shell .brand-emblem,
.cp-topbar-emblem {
    width: 34px;
    height: 34px;
    max-width: 34px;
    border-radius: 999px !important;
    object-fit: cover;
    object-position: 50% 50%;
    background: color-mix(in srgb, var(--portal-primary, #4557a3) 12%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--portal-primary, #4557a3) 22%, transparent);
    border: 0;
    display: block;
    flex-shrink: 0;
}

.cp-topbar-shell .topbar-company-name,
.cp-topbar-company-name {
    display: block;
    min-width: 0;
    font-family: var(--ui-font-brand, 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--portal-text, #212529);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.cp-topbar-shell .topbar-center {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.cp-topbar-spacer {
    flex: 1 1 auto;
    min-width: 0;
}

.cp-topbar-shell .topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding-left: .5rem;
    border-left: 1px solid var(--portal-border, #e7e9eb);
    flex-shrink: 0;
}

.cp-topbar-shell .topbar-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--portal-text-secondary, #495057);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    box-shadow: none;
    cursor: pointer;
    padding: 0;
}

.cp-topbar-shell .topbar-icon-btn:hover {
    background: var(--portal-surface-2, #f6f7fa);
    color: var(--portal-primary, #4557a3);
    transform: none;
    border-color: transparent;
}

.cp-topbar-shell .topbar-user-dropdown {
    margin-left: .15rem;
    padding-left: .5rem;
    border-left: 1px solid var(--portal-border, #e7e9eb);
    flex-shrink: 0;
    position: relative;
}

.cp-topbar-shell .topbar-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border-radius: .4rem;
    border: 0;
    background: transparent;
    padding: .1rem .2rem .1rem .1rem;
    color: var(--portal-text-secondary, #495057);
    text-decoration: none;
    box-shadow: none;
    transition: background .15s ease, color .15s ease;
    cursor: pointer;
    font: inherit;
}

.cp-topbar-shell .topbar-user-trigger:hover {
    background: var(--portal-surface-2, #f6f7fa);
    color: var(--portal-primary, #4557a3);
    border-color: transparent;
}

.cp-topbar-shell .topbar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #405189;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    object-fit: cover;
    border: 0;
    flex-shrink: 0;
}

.cp-topbar-shell .topbar-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    line-height: 1.15;
}

.cp-topbar-shell .topbar-user-name {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--portal-text, #212529);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
}

.cp-topbar-shell .topbar-user-role {
    font-size: .68rem;
    font-weight: 400;
    color: var(--portal-muted, #878a99);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-topbar-shell .topbar-user-trigger .bi-chevron-down {
    font-size: .7rem;
    color: var(--portal-muted, #878a99);
}

.cp-topbar-user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + .45rem);
    min-width: 210px;
    border: 1px solid var(--portal-border, #e9ebec);
    border-radius: .45rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    padding: .45rem 0 .35rem;
    background: var(--portal-surface, #fff);
    z-index: 1100;
}

.cp-topbar-user-menu[hidden] {
    display: none !important;
}

.cp-topbar-shell .cp-topbar-user-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--portal-text-secondary, #495057);
    font-size: .8125rem;
    font-weight: 500;
    padding: .48rem 1rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.cp-topbar-shell .cp-topbar-user-item:hover {
    background: var(--portal-surface-2, #f6f7fa);
    color: var(--portal-primary, #4557a3);
}

.cp-topbar-shell .cp-topbar-user-item.is-danger {
    color: #dc3545;
}

.cp-topbar-shell .cp-topbar-user-item.is-danger:hover {
    background: rgba(220, 53, 69, .08);
    color: #dc3545;
}

.cp-topbar-shell .cp-locale {
    position: relative;
}

.cp-topbar-shell .topbar-locale-trigger,
.cp-topbar-shell .cp-locale-trigger {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 32px;
    padding: 0 .45rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--portal-text-secondary, #495057);
    font-size: .75rem;
    font-weight: 650;
    cursor: pointer;
    box-shadow: none;
}

.cp-topbar-shell .topbar-locale-trigger:hover,
.cp-topbar-shell .cp-locale-trigger:hover {
    background: var(--portal-surface-2, #f6f7fa);
    color: var(--portal-primary, #4557a3);
}

.cp-topbar-shell .topbar-locale-flag,
.cp-topbar-shell .cp-locale-flag {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    object-fit: cover;
}

.cp-topbar-shell .topbar-locale-code {
    letter-spacing: .02em;
}

.cp-content {
    padding: 1.5rem;
    flex: 1;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cp-stat {
    background: var(--portal-card);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.cp-stat-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--portal-muted);
    margin-bottom: .35rem;
}

.cp-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--portal-text);
}

.cp-stat-value.accent { color: var(--portal-primary); }

/* Dashboard */
.cp-dash-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--portal-sidebar) 0%, color-mix(in srgb, var(--portal-primary) 35%, var(--portal-sidebar)) 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

.cp-dash-eyebrow {
    margin: 0 0 .25rem;
    font-size: .82rem;
    opacity: .85;
}

.cp-dash-title {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.cp-dash-title--greeting {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem .45rem;
}

.cp-dash-greeting-phrase,
.cp-dash-greeting-name {
    display: inline;
}

.cp-dash-greeting-icons {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    line-height: 1;
    vertical-align: middle;
}

.cp-dash-greeting-icons .bi {
    font-size: 1.25rem;
    display: inline-block;
}

.cp-dash-greeting-icons--morning .bi { color: #f59e0b; }
.cp-dash-greeting-icons--afternoon .bi { color: #fb923c; }
.cp-dash-greeting-icons--evening .bi { color: #93c5fd; }

.cp-dash-wave {
    display: inline-block;
    font-size: 1.25rem;
    line-height: 1;
    transform-origin: 70% 70%;
    animation: cp-dash-wave 1.6s ease-in-out 2;
}

@keyframes cp-dash-wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(16deg); }
    30% { transform: rotate(-10deg); }
    45% { transform: rotate(12deg); }
}

.cp-dash-sub {
    margin: .45rem 0 0;
    font-size: .88rem;
    opacity: .88;
}

.cp-dash-hero-badge {
    padding: .4rem .85rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
}

.cp-dash-status-ok { background: rgba(16, 185, 129, .25); border-color: rgba(16, 185, 129, .45); }
.cp-dash-status-warn { background: rgba(245, 158, 11, .25); border-color: rgba(245, 158, 11, .45); }
.cp-dash-status-muted { background: rgba(148, 163, 184, .25); border-color: rgba(148, 163, 184, .45); }

.cp-dash-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cp-dash-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    padding: 1.1rem 1.15rem;
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .15s, box-shadow .15s;
}

.cp-dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.cp-dash-card-accent {
    border-color: color-mix(in srgb, var(--portal-primary) 25%, var(--portal-border));
    background: linear-gradient(180deg, var(--portal-surface) 0%, color-mix(in srgb, var(--portal-accent) 50%, var(--portal-surface)) 100%);
}

.cp-dash-card-icon {
    width: 42px;
    height: 42px;
    border-radius: .75rem;
    background: var(--portal-accent);
    color: var(--portal-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.cp-dash-card-accent .cp-dash-card-icon {
    background: var(--portal-primary);
    color: #fff;
}

.cp-dash-card-body { min-width: 0; flex: 1; }

.cp-dash-card-label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--portal-muted);
    margin-bottom: .25rem;
}

.cp-dash-card-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--portal-text);
}

.cp-dash-card-value-sm { font-size: 1rem; }

.cp-dash-card-meta {
    display: block;
    margin-top: .25rem;
    font-size: .78rem;
    color: var(--portal-muted);
}

.cp-dash-card-link {
    display: inline-block;
    margin-top: .45rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--portal-primary);
    text-decoration: none;
}

.cp-dash-card-link:hover { text-decoration: underline; }

.cp-dash-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cp-dash-chart {
    display: flex;
    align-items: flex-end;
    gap: .65rem;
    min-height: 180px;
    padding-top: .5rem;
}

.cp-dash-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}

.cp-dash-chart-bar-wrap {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cp-dash-chart-bar {
    width: min(100%, 42px);
    border-radius: .45rem .45rem .15rem .15rem;
    background: linear-gradient(180deg, var(--portal-primary), color-mix(in srgb, var(--portal-primary) 65%, #1e293b));
    min-height: 4px;
    transition: height .3s ease;
}

.cp-dash-chart-label {
    font-size: .72rem;
    color: var(--portal-muted);
    text-transform: capitalize;
}

.cp-dash-chart-empty {
    margin: .75rem 0 0;
    font-size: .85rem;
    color: var(--portal-muted);
    text-align: center;
}

.cp-dash-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
}

.cp-dash-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 1rem .65rem;
    border-radius: .75rem;
    border: 1px solid var(--portal-border);
    background: var(--portal-surface-2);
    color: var(--portal-text);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    text-align: center;
    transition: background .15s, border-color .15s, transform .15s;
}

.cp-dash-quick-item i {
    font-size: 1.25rem;
    color: var(--portal-primary);
}

.cp-dash-quick-item:hover {
    background: var(--portal-accent);
    border-color: color-mix(in srgb, var(--portal-primary) 30%, var(--portal-border));
    transform: translateY(-1px);
}

/* Descarga APK Reportar pago (primera instalación) */
.cp-app-download {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 0 0 1.1rem;
    padding: .95rem 1.05rem;
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--portal-primary) 12%, transparent), color-mix(in srgb, #14b8a6 10%, transparent)),
        var(--portal-surface);
    border: 1px solid color-mix(in srgb, var(--portal-primary) 28%, var(--portal-border));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--portal-primary) 12%, transparent);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cp-app-download:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--portal-primary) 45%, var(--portal-border));
    box-shadow: 0 14px 32px color-mix(in srgb, var(--portal-primary) 18%, transparent);
    color: inherit;
}
.cp-app-download-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .18);
}
.cp-app-download-copy {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
    flex: 1;
}
.cp-app-download-copy strong {
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.cp-app-download-copy small {
    color: var(--portal-muted);
    font-size: .8rem;
    line-height: 1.35;
}
.cp-app-download-cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
    padding: .55rem .85rem;
    border-radius: 999px;
    background: var(--portal-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}
.cp-app-download--compact {
    margin: 1rem 0 0;
    padding: .75rem .85rem;
    box-shadow: none;
}
.cp-app-download--compact .cp-app-download-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}
.cp-app-download--compact .cp-app-download-cta {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
}
.cp-app-download-inline {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: .85rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-primary) 10%, transparent);
    color: var(--portal-primary);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}
.cp-app-download-inline img {
    border-radius: 6px;
}
.cp-app-download-inline:hover {
    background: color-mix(in srgb, var(--portal-primary) 16%, transparent);
    color: var(--portal-primary);
}
.cp-rp-app-hint {
    text-align: center;
    margin-top: .35rem;
}
.cp-nav-item--app {
    margin-top: .15rem;
}
.cp-nav-app-icon {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: .4rem;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
}
.cp-nav-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cp-dash-quick-item--app .cp-dash-quick-app-icon {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .15);
}
.cp-dash-quick-item--app:hover .cp-dash-quick-app-icon {
    transform: scale(1.04);
}

/* Icono flotante descarga APK (landing / portal) */
.cp-app-float {
    position: fixed;
    right: 1.25rem;
    bottom: 5.75rem; /* encima del chat de soporte */
    z-index: 1075;
    width: 3.55rem;
    height: 3.55rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .28);
    border: 0;
    padding: 0;
    overflow: visible;
    transition: transform .15s ease, box-shadow .15s ease;
}
body:not(:has(.cp-chat-fab)) .cp-app-float {
    bottom: 1.25rem;
}
.cp-app-float:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .34);
    color: inherit;
}
.cp-app-float-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.cp-app-float-badge {
    position: absolute;
    right: -.35rem;
    bottom: -.35rem;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    background: var(--portal-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .35);
}
.cp-app-float-badge .bi,
.cp-app-download-cta .bi {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.cp-app-float-tip {
    position: absolute;
    right: calc(100% + .55rem);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: .4rem .7rem;
    border-radius: .65rem;
    background: rgba(15, 23, 42, .92);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.cp-app-float:hover .cp-app-float-tip,
.cp-app-float:focus-visible .cp-app-float-tip {
    opacity: 1;
}
body.cp-modal-open .cp-app-float {
    visibility: hidden;
    pointer-events: none;
}
@media (max-width: 640px) {
    .cp-app-float {
        right: .85rem;
        bottom: 5.35rem;
    }
    body:not(:has(.cp-chat-fab)) .cp-app-float {
        bottom: .85rem;
    }
    .cp-app-float-tip {
        display: none;
    }
}

@media (max-width: 640px) {
    .cp-app-download {
        flex-wrap: wrap;
    }
    .cp-app-download-cta {
        width: 100%;
        justify-content: center;
    }
}

.cp-dash-banners {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cp-dash-banner img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 1rem;
    border: 1px solid var(--portal-border);
}

.cp-dash-invoices { padding: 0 !important; }

.cp-dash-invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.cp-dash-invoice-row:last-child { border-bottom: none; }

.cp-dash-invoice-right {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cp-panel {
    background: var(--portal-card);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.cp-panel-header {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--portal-border);
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cp-panel-body { padding: 1.25rem; }

.cp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.cp-table th,
.cp-table td {
    padding: .65rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--portal-border);
}

.cp-table th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--portal-muted);
    background: var(--portal-surface-2);
}

.cp-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.cp-badge-paid { background: #dcfce7; color: #166534; }
.cp-badge-unpaid { background: #fee2e2; color: #991b1b; }
.cp-badge-overdue { background: #ffedd5; color: #9a3412; }
.cp-badge-cancelled { background: #e2e8f0; color: #475569; }

.cp-banners {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cp-banner img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-border);
}

.cp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cp-form-grid .full { grid-column: 1 / -1; }

.cp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--portal-muted);
}

/* Toolbar & data table */
.cp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.cp-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.cp-search i {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--portal-muted);
    pointer-events: none;
}

.cp-search input {
    width: 100%;
    padding: .6rem .85rem .6rem 2.35rem;
    border: 1px solid var(--portal-border);
    border-radius: .65rem;
    font-size: .9rem;
    background: var(--portal-input-bg);
    color: var(--portal-text);
    transition: border-color .15s, box-shadow .15s;
}

.cp-search input:focus {
    outline: none;
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 18%, transparent);
}

.cp-select {
    border: 1px solid var(--portal-border);
    border-radius: .65rem;
    padding: .6rem .85rem;
    font-size: .88rem;
    background: var(--portal-input-bg);
    color: var(--portal-text);
}

.cp-invoices-page .cp-panel-body { padding: 1.25rem; }

.cp-invoices-page .cp-toolbar { margin-bottom: 1rem; }

.cp-data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: .65rem;
    border: 1px solid var(--portal-border);
    background: var(--portal-surface);
}

.cp-data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: .88rem;
}

.cp-data-table thead th {
    padding: .75rem 1rem;
    text-align: left;
    font-size: .72rem;
    font-weight: 600;
    color: var(--portal-muted);
    background: var(--portal-surface-2);
    border-bottom: 1px solid var(--portal-border);
    white-space: nowrap;
}

.cp-data-table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--portal-border-soft);
    vertical-align: middle;
    color: var(--portal-text-secondary);
}

.cp-data-table tbody tr:last-child td { border-bottom: none; }
.cp-data-table tbody tr:hover { background: var(--portal-surface-2); }

.cp-data-table .col-num {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cp-data-table .col-total {
    font-weight: 600;
    color: var(--portal-text);
}

.cp-chip {
    display: inline-flex;
    align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

.cp-chip-paid { background: #ecfdf5; color: #047857; }
.cp-chip-overdue { background: #fef2f2; color: #b91c1c; }
.cp-chip-pending { background: #fffbeb; color: #b45309; }
.cp-chip-cancelled { background: #f1f5f9; color: #64748b; }

.cp-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-content: flex-end;
}

.cp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .75rem;
    border-radius: .5rem;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
}

.cp-action-btn:hover { opacity: .9; transform: translateY(-1px); }

.cp-action-btn-primary {
    background: var(--portal-primary);
    color: #fff;
}

.cp-action-btn-ghost {
    background: var(--portal-surface-3);
    color: var(--portal-text);
}

.cp-action-btn-view {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.cp-action-btn-view:hover {
    background: #dbeafe;
}

body.cp-modal-open { overflow: hidden; }

.cp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cp-modal[hidden] { display: none !important; }

.cp-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

.cp-modal-dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: min(90vh, 900px);
    background: var(--portal-surface);
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cpModalIn .2s ease-out;
}

@keyframes cpModalIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.15rem;
    border-bottom: 1px solid var(--portal-border);
    background: linear-gradient(135deg, var(--portal-surface-2), color-mix(in srgb, var(--portal-primary) 8%, var(--portal-surface-2)));
}

.cp-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--portal-text);
}

.cp-modal-close {
    border: none;
    background: #fff;
    border: 1px solid var(--portal-border);
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-muted);
}

.cp-modal-close:hover { color: var(--portal-text); background: #f8fafc; }

.cp-modal-body {
    flex: 1;
    min-height: 0;
    background: #fff;
    overflow: hidden;
}

.cp-modal-preview {
    height: min(72vh, 760px);
    overflow: auto;
    background: #f1f5f9;
}

.cp-modal-preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: min(72vh, 760px);
    border: 0;
    background: #fff;
}

.cp-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .85rem 1.15rem;
    border-top: 1px solid var(--portal-border);
    background: var(--portal-surface-2);
}

.cp-modal-footer-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.cp-modal-dialog--report {
    width: min(680px, 100%);
    max-height: min(92vh, 820px);
}

.cp-modal-dialog--account {
    width: min(560px, 100%);
    max-height: min(90vh, 760px);
}

.cp-topbar-user-item[type="button"] {
    font: inherit;
}

.cp-modal-body--scroll {
    overflow: auto;
    max-height: calc(92vh - 4.5rem);
    padding: .85rem 1rem 1rem;
}

.cp-rp-modal-head {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.cp-rp-modal-head-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: .5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--portal-primary) 12%, #fff);
    color: var(--portal-primary);
}

.cp-rp-modal-alert {
    margin-bottom: .65rem;
}

.cp-rp-modal-empty {
    padding: 1rem 0;
}

.cp-rp-success-actions {
    margin-top: .85rem;
}

.cp-dash-card-link[type="button"],
.cp-dash-quick-item[type="button"] {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
}

.cp-action-btn[type="button"] {
    font: inherit;
}

.cp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--portal-border);
    font-size: .85rem;
    color: var(--portal-muted);
}

.cp-pager {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.cp-pager a,
.cp-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .5rem;
    border-radius: .5rem;
    font-size: .85rem;
    text-decoration: none;
    color: var(--portal-text);
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
}

.cp-pager a:hover { border-color: var(--portal-primary); color: var(--portal-primary); }
.cp-pager .is-active { background: var(--portal-primary); border-color: var(--portal-primary); color: #fff; }
.cp-data-table .col-actions { text-align: right; width: 1%; white-space: nowrap; }

.cp-pager .is-disabled { opacity: .4; pointer-events: none; }

.cp-topbar-shell .cp-topbar-left { display: flex; align-items: center; gap: .5rem; }
.cp-muted { color: var(--portal-muted); }
.w-100 { width: 100%; }

@media (max-width: 991.98px) {
    .cp-shell,
    .cp-shell.layout-wide {
        grid-template-columns: 1fr;
    }

    .cp-topbar-shell .topbar-search-form {
        min-width: 0;
        max-width: none;
    }

    .cp-topbar-shell .topbar-user-name {
        display: none;
    }

    .cp-topbar-shell .topbar-user-trigger .bi-chevron-down {
        display: none;
    }

    .cp-topbar-brand-wrap {
        display: flex;
        align-items: center;
        gap: .45rem;
        min-width: 0;
    }

    .cp-sidebar {
        position: fixed;
        left: -280px;
        width: min(260px, 88vw);
        z-index: 1040;
        transition: left .25s ease;
    }

    .cp-sidebar.open { left: 0; }

    .cp-guest.login-split {
        grid-template-columns: 1fr;
    }

    .cp-guest.login-split .cp-guest-bg { min-height: 180px; }

    .cp-guest.login-overlay .cp-login-wrap {
        justify-content: center;
        padding-right: 1.5rem;
    }

    .cp-form-grid { grid-template-columns: 1fr; }

    .cp-dash-cards { grid-template-columns: 1fr 1fr; }
    .cp-dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .cp-dash-cards { grid-template-columns: 1fr; }
    .cp-dash-quick { grid-template-columns: 1fr; }
}

/* Speed test */
.cp-speedtest-panel {
    margin-bottom: 1.25rem;
}

.cp-speedtest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    background: #111827;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
}

.cp-speedtest-external {
    color: #93c5fd;
    font-size: 1rem;
    line-height: 1;
    opacity: .9;
}

.cp-speedtest-external:hover {
    color: #fff;
    opacity: 1;
}

.cp-speedtest-frame-wrap {
    background: #fff;
    min-height: 420px;
}

.cp-speedtest-frame {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    background: #fff;
}

@media (max-width: 768px) {
    .cp-speedtest-frame-wrap,
    .cp-speedtest-frame {
        min-height: 320px;
        height: 320px;
    }
}

/* Traffic monitor */
.cp-traffic-panel {
    margin-bottom: 1.25rem;
}

.cp-traffic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    background: var(--portal-surface-2);
    border-bottom: 1px solid var(--portal-border);
    font-weight: 600;
    font-size: .95rem;
    color: var(--portal-text);
}

.cp-traffic-body {
    padding: 1.5rem;
    background: var(--portal-surface);
    color: var(--portal-text-secondary);
}

.cp-traffic-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    max-width: 28rem;
    margin: 0 auto 1rem;
    text-align: center;
}

.cp-traffic-controls label {
    font-size: .88rem;
    color: var(--portal-muted);
}

.cp-traffic-controls select {
    width: 100%;
    max-width: 22rem;
    padding: .55rem .75rem;
    border: 1px solid var(--portal-border);
    border-radius: .5rem;
    background: var(--portal-input-bg);
    color: var(--portal-text);
    font-size: .9rem;
}

.cp-traffic-start {
    width: auto;
    min-width: 10rem;
}

.cp-traffic-chart-wrap {
    margin-top: 1.25rem;
}

.cp-traffic-live {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin-bottom: .75rem;
}

.cp-traffic-live-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .75rem;
    border: 1px solid color-mix(in srgb, var(--portal-primary) 22%, var(--portal-border));
    border-radius: .5rem;
    background: var(--portal-surface-2);
    font-size: .84rem;
    color: var(--portal-text-secondary);
}

.cp-traffic-live-item strong {
    color: var(--portal-text);
}

.cp-traffic-live-item.download i { color: #2563eb; }
.cp-traffic-live-item.upload i { color: #14b8a6; }

.cp-traffic-canvas-wrap {
    position: relative;
    height: 320px;
    border: 1px solid var(--portal-border);
    border-radius: .75rem;
    padding: .75rem;
    background: var(--portal-surface-2);
}

.cp-traffic-error {
    margin: .75rem 0 0;
    color: #dc2626;
    font-size: .85rem;
    text-align: center;
}

@media (max-width: 640px) {
    .cp-traffic-live {
        justify-content: center;
    }

    .cp-traffic-canvas-wrap {
        height: 260px;
    }
}

/* Public landing (/cliente) */
.cp-public-body {
    background: var(--portal-surface-2);
}

.cp-public-container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.cp-public-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--portal-border);
}

.cp-public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
}

.cp-public-brand {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    text-decoration: none;
    color: var(--portal-text);
    font-weight: 700;
    min-width: 0;
    flex: 0 1 auto;
}

/* Logo banner 360x75: el emblema útil está al centro → recorte circular */
.cp-public-brand img {
    height: 40px;
    width: 40px;
    max-width: 40px;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
    background: #0b1220;
}

.cp-public-brand span {
    line-height: 1.2;
    white-space: nowrap;
}

/* Nombre de empresa: tipografía moderna + acento de color */
.cp-brand-name {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0;
    font-family: var(--ui-font-brand, 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -.02em;
    line-height: 1.1;
    white-space: nowrap;
}

.cp-brand-name__lead {
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
    font-weight: 800;
}

.cp-brand-name__accent {
    font-weight: 800;
    letter-spacing: .04em;
    background: linear-gradient(
        120deg,
        var(--portal-primary, #2563eb) 0%,
        color-mix(in srgb, var(--portal-primary, #2563eb) 55%, #06b6d4) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.app-footer__brand-name.cp-brand-name {
    display: inline-flex;
    font-size: 1.08rem;
    margin-bottom: .28rem;
}

.app-footer__brand-name .cp-brand-name__lead {
    color: var(--app-footer-title, #0f172a);
}

.app-footer__brand-name .cp-brand-name__accent {
    background: linear-gradient(
        120deg,
        var(--app-footer-accent, var(--portal-primary, #2563eb)) 0%,
        color-mix(in srgb, var(--app-footer-accent, var(--portal-primary, #2563eb)) 50%, #22d3ee) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.cp-public-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--portal-border);
    background: var(--portal-surface);
    color: var(--portal-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .88rem;
    transition: all .15s ease;
    box-shadow: 0 2px 6px var(--portal-shadow);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.cp-public-theme-toggle:hover {
    background: color-mix(in srgb, var(--portal-primary) 10%, var(--portal-surface));
    border-color: color-mix(in srgb, var(--portal-primary) 30%, var(--portal-border));
    color: var(--portal-primary);
    transform: translateY(-1px);
}

.cp-public-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cp-public-nav a {
    color: var(--portal-muted);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.cp-public-nav-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--portal-muted);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.cp-public-nav a:hover,
.cp-public-nav-link:hover {
    color: var(--portal-primary);
}

.cp-public-hero {
    position: relative;
    padding: 4rem 0 3rem;
    overflow: hidden;
    color: #fff;
}

.cp-public-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, .88) 0%, rgba(15, 23, 42, .55) 55%, rgba(15, 23, 42, .75) 100%),
        var(--cp-hero-bg, none) center/cover no-repeat;
    z-index: 0;
}

.cp-public-hero-content {
    position: relative;
    z-index: 1;
}

.cp-public-kicker {
    color: color-mix(in srgb, var(--portal-primary) 70%, #fff);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 0 0 .5rem;
}

.cp-public-hero h1 {
    margin: 0 0 .75rem;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.12;
    color: #fff;
}

.cp-public-lead {
    margin: 0 0 1.25rem;
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 36rem;
}

.cp-public-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.cp-public-hero-actions .cp-btn-primary {
    width: auto;
}

.cp-btn-ghost {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    border-radius: 999px;
}

.cp-btn-ghost:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.cp-public-menu-btn {
    display: none;
    border: 1px solid var(--portal-border);
    background: #fff;
    border-radius: .5rem;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--portal-text);
}

.cp-public-nav-cta {
    background: color-mix(in srgb, var(--portal-primary) 12%, #fff);
    color: var(--portal-primary) !important;
    padding: .35rem .7rem;
    border-radius: 999px;
    border: none;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.cp-public-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--portal-primary) 25%, transparent);
}

.cp-public-banners {
    padding: 1rem 0 0;
    background: #fff;
    border-bottom: 1px solid var(--portal-border);
}

.cp-public-banners-track {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}

.cp-public-banner {
    flex: 0 0 min(100%, 720px);
    scroll-snap-align: start;
    border-radius: .85rem;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    display: block;
}

.cp-public-banner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 220px;
    object-fit: cover;
}

.cp-public-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 1.5rem;
    align-items: center;
}

.cp-btn-block {
    width: 100%;
}

.cp-public-hero-card {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.cp-public-hero-card-title {
    font-weight: 700;
    margin-bottom: .85rem;
}

.cp-public-hero-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .65rem;
}

.cp-public-hero-card li {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .92rem;
}

.cp-public-section {
    padding: 2.5rem 0;
}

.cp-public-section-alt {
    background: #eef2ff;
}

.cp-public-section-head {
    margin-bottom: 1.25rem;
}

.cp-public-section-head h2 {
    margin: 0 0 .35rem;
    font-size: 1.45rem;
}

.cp-public-section-head p {
    margin: 0;
    color: var(--portal-muted);
}

.cp-public-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.cp-public-plan-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    padding: 1.15rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    display: flex;
    flex-direction: column;
    gap: .75rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

.cp-public-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
}

.cp-public-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    width: fit-content;
    font-size: .72rem;
    font-weight: 700;
    color: var(--portal-primary);
    background: color-mix(in srgb, var(--portal-primary) 10%, #fff);
    padding: .2rem .55rem;
    border-radius: 999px;
}

.cp-public-plan-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.cp-public-plan-desc {
    margin: 0;
    color: var(--portal-muted);
    font-size: .86rem;
    min-height: 2.5rem;
}

.cp-public-plan-speed {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .84rem;
    color: #334155;
}

.cp-public-plan-speed span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.cp-public-plan-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--portal-primary);
}

.cp-public-plan-price .currency-billing-primary {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--portal-primary);
}

.cp-public-plan-price .currency-billing-secondary {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--portal-muted);
    margin-top: .15rem;
}

.cp-dash-card-value .currency-billing-primary {
    display: block;
    font-size: inherit;
    font-weight: inherit;
}

.cp-dash-card-value .currency-billing-secondary {
    display: block;
    font-size: .72em;
    font-weight: 600;
    color: var(--portal-muted, #64748b);
    margin-top: .2rem;
}

.cp-public-plan-price small {
    font-size: .78rem;
    font-weight: 600;
    color: var(--portal-muted);
}

.cp-public-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--portal-muted);
    background: #fff;
    border: 1px dashed var(--portal-border);
    border-radius: 1rem;
}

.cp-public-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: .5rem;
}

.cp-public-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.cp-public-panel {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    padding: 1.15rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.cp-public-form .cp-field-hint {
    margin-top: .35rem;
    font-size: .78rem;
    color: var(--portal-muted);
}

.cp-public-result-panel {
    min-height: 280px;
}

.cp-public-result-placeholder {
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--portal-muted);
    gap: .5rem;
}

.cp-public-result-placeholder i {
    font-size: 2rem;
    opacity: .65;
}

.cp-public-result-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .55rem;
    border-radius: 999px;
    margin-bottom: .65rem;
}

.cp-public-result-badge.is-found {
    background: #dcfce7;
    color: #166534;
}

.cp-public-result-badge.is-error {
    background: #fee2e2;
    color: #b91c1c;
}

.cp-public-result-head h3 {
    margin: 0 0 .25rem;
}

.cp-public-result-head p {
    margin: 0;
    color: var(--portal-muted);
    font-size: .88rem;
}

.cp-public-result-message {
    margin: .85rem 0;
    color: #334155;
}

.cp-public-total-due {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: .65rem;
    padding: .65rem .8rem;
    margin-bottom: .85rem;
    font-size: .92rem;
}

.cp-public-invoice-list {
    display: grid;
    gap: .55rem;
    margin-bottom: 1rem;
}

.cp-public-invoice-item {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    padding: .65rem .75rem;
    border: 1px solid var(--portal-border);
    border-radius: .65rem;
    background: #f8fafc;
    font-size: .84rem;
}

.cp-public-invoice-item span {
    display: block;
    color: var(--portal-muted);
    font-size: .76rem;
}

.cp-public-invoice-meta {
    text-align: right;
    display: grid;
    gap: .25rem;
}

.cp-invoice-status {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 999px;
}

.cp-invoice-status.invoice-status-paid { background: #16a34a; color: #fff; }
.cp-invoice-status.invoice-status-overdue { background: #ef4444; color: #fff; }
.cp-invoice-status.invoice-status-pending,
.cp-invoice-status.invoice-status-partial { background: #eab308; color: #1f2937; }
.cp-invoice-status.invoice-status-cancelled { background: #cbd5e1; color: #475569; }

.cp-public-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.cp-public-result-actions .cp-btn {
    width: auto;
}

.cp-public-login-wrap {
    display: flex;
    justify-content: center;
}

.cp-public-section-dark {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

.cp-public-access-grid {
    display: grid;
    grid-template-columns: 1fr min(420px, 100%);
    gap: 2rem;
    align-items: center;
}

.cp-public-access-copy h2 {
    color: #fff;
    margin: 0 0 .5rem;
    font-size: 1.6rem;
}

.cp-public-access-copy p {
    color: #94a3b8;
    margin: 0 0 1rem;
}

.cp-public-access-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.cp-public-access-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
}

.cp-public-access-list i {
    color: #4ade80;
}

.cp-public-custom-menu {
    overflow: auto;
}

.cp-public-login-card {
    width: 100%;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

.cp-public-login-card .cp-login-header {
    background: linear-gradient(135deg, var(--portal-sidebar), #0f172a);
}

.cp-public-login-card .cp-login-header h1,
.cp-public-login-card .cp-login-header p {
    color: #fff;
}

.cp-public-login-card .cp-check {
    color: var(--portal-muted);
}

.cp-public-footer {
    border-top: 1px solid var(--portal-border);
    padding: 1rem 0 1.5rem;
    color: var(--portal-muted);
    font-size: .82rem;
}

.cp-public-footer .cp-public-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.cp-public-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    color: var(--portal-text);
}

.cp-public-footer-brand img {
    height: 32px;
    width: 32px;
    max-width: 32px;
    object-fit: cover;
    object-position: 50% 50%;
    border-radius: 50%;
    background: #0b1220;
}

@media (max-width: 900px) {
    .cp-public-hero-grid,
    .cp-public-split,
    .cp-public-access-grid {
        grid-template-columns: 1fr;
    }

    .cp-public-menu-btn {
        display: inline-flex;
    }

    .cp-public-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--portal-border);
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
        padding: .85rem 1rem 1.1rem;
        box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
    }

    .cp-public-nav.is-open {
        display: flex;
    }

    .cp-public-nav a,
    .cp-public-nav .cp-public-nav-pay,
    .cp-public-nav .cp-public-nav-cta {
        width: 100%;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    .cp-public-nav a {
        padding: .55rem .65rem;
        border-radius: .55rem;
    }

    .cp-public-nav .cp-public-nav-pay,
    .cp-public-nav .cp-public-nav-cta {
        padding: .7rem .95rem;
        margin-top: .15rem;
    }

    .cp-public-header-inner {
        position: relative;
        flex-wrap: nowrap;
        gap: .5rem;
    }

    .cp-public-brand {
        min-width: 0;
        flex: 1 1 auto;
        justify-content: flex-start;
        gap: .45rem;
    }

    .cp-public-brand img {
        height: 36px;
        width: 36px;
        max-width: 36px;
        object-fit: cover;
        object-position: 50% 50%;
    }

    .cp-public-brand span,
    .cp-public-brand .cp-brand-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: min(46vw, 12rem);
    }

    .cp-brand-name {
        font-size: .95rem;
    }

    .cp-public-theme-toggle {
        margin-left: 0;
        order: 2;
        flex-shrink: 0;
    }

    .cp-public-menu-btn {
        order: 3;
        flex-shrink: 0;
    }

    .cp-public-nav {
        order: 4;
        width: 100%;
    }
}

/* —— Landing estilo Fulldata —— */
.cp-public-body {
    background: #060b14;
    color: #e2e8f0;
}

.cp-fd-header {
    background: rgba(6, 11, 20, .82);
    border-bottom: 1px solid rgba(148, 163, 184, .12);
    backdrop-filter: blur(14px);
}

.cp-fd-header .cp-public-brand {
    color: #f8fafc;
}

/* Lead oscuro por defecto: los headers claros (clara/bento/…) siguen legibles.
   Solo se aclara en temas de header oscuro más abajo / landing-themes. */
.cp-fd-header .cp-brand-name__lead {
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
}

.cp-fd-header .cp-brand-name__accent {
    background: linear-gradient(120deg, var(--portal-primary, #2563eb) 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.cp-fd-header .cp-public-nav a {
    color: #cbd5e1;
}

.cp-fd-header .cp-public-nav a:hover {
    color: #fff;
}

.cp-fd-header .cp-public-theme-toggle,
.cp-fd-header .cp-public-menu-btn {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(148, 163, 184, .2);
    color: #e2e8f0;
}

.cp-fd-header .cp-public-nav-cta {
    background: linear-gradient(135deg, var(--portal-primary), color-mix(in srgb, var(--portal-primary) 70%, #06b6d4));
    color: #fff !important;
    padding: .45rem .95rem;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--portal-primary) 35%, transparent);
}

.cp-fd-header .cp-public-nav-pay {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0 !important;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .28);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s, transform .15s;
}

.cp-fd-header .cp-public-nav-pay:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(148, 163, 184, .45);
    color: #fff !important;
    transform: translateY(-1px);
}

.cp-fd-hero {
    position: relative;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 3.5rem 0 4.5rem;
}

.cp-fd-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(125deg, rgba(6, 11, 20, .94) 0%, rgba(15, 23, 42, .78) 45%, rgba(6, 11, 20, .92) 100%),
        var(--cp-hero-bg, none) center/cover no-repeat;
    z-index: 0;
}

.cp-fd-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .45;
    z-index: 0;
    pointer-events: none;
}

.cp-fd-hero-glow--1 {
    width: 420px;
    height: 420px;
    top: -80px;
    right: 10%;
    background: color-mix(in srgb, var(--portal-primary) 55%, #06b6d4);
}

.cp-fd-hero-glow--2 {
    width: 320px;
    height: 320px;
    bottom: -60px;
    left: 8%;
    background: color-mix(in srgb, var(--portal-primary) 35%, #8b5cf6);
}

.cp-fd-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 2.5rem;
    align-items: center;
}

.cp-fd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--portal-primary) 65%, #67e8f9);
    margin-bottom: .85rem;
}

.cp-fd-eyebrow--dark {
    color: var(--portal-primary);
}

.cp-fd-hero-copy h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.8vw, 3.4rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.03em;
    color: #fff;
    max-width: 14ch;
}

.cp-fd-hero-lead {
    margin: 0 0 1.5rem;
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 34rem;
}

.cp-fd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
}

.cp-fd-hero-actions .cp-btn-primary,
.cp-fd-hero-actions .cp-fd-btn-outline {
    width: auto;
}

.cp-fd-btn-lg {
    padding: .8rem 1.35rem;
    font-size: .95rem;
    border-radius: 999px;
}

.cp-fd-btn-outline {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 600;
    transition: background .15s, border-color .15s, transform .15s;
}

.cp-fd-btn-outline:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    transform: translateY(-1px);
}

.cp-fd-hero-showcase {
    display: grid;
    gap: 1rem;
}

.cp-fd-speed-card {
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 1.25rem;
    padding: 1.75rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .28);
}

.cp-fd-speed-value {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: .35rem;
    margin-bottom: .35rem;
}

.cp-fd-speed-number {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--portal-primary) 40%, #67e8f9) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cp-fd-speed-unit {
    font-size: 1.35rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--portal-primary) 70%, #67e8f9);
    margin-bottom: .45rem;
}

.cp-fd-speed-card p {
    margin: 0;
    color: #94a3b8;
    font-size: .88rem;
}

.cp-fd-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.cp-fd-stat {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: .85rem;
    padding: .85rem .65rem;
    text-align: center;
}

.cp-fd-stat i {
    display: block;
    font-size: 1.15rem;
    color: color-mix(in srgb, var(--portal-primary) 70%, #67e8f9);
    margin-bottom: .35rem;
}

.cp-fd-stat strong {
    display: block;
    color: #fff;
    font-size: .95rem;
}

.cp-fd-stat span {
    display: block;
    color: #64748b;
    font-size: .72rem;
    margin-top: .15rem;
}

.cp-fd-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    color: #64748b;
    font-size: .72rem;
    text-decoration: none;
    z-index: 1;
    animation: cpFdBounce 2s ease infinite;
}

.cp-fd-scroll-hint i {
    font-size: 1rem;
}

@keyframes cpFdBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

.cp-fd-banners {
    background: #0b1220;
    border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.cp-fd-section {
    padding: 4.5rem 0;
    background: #f8fafc;
    color: #0f172a;
}

.cp-fd-section--dark {
    background: linear-gradient(180deg, #0b1220 0%, #060b14 100%);
    color: #e2e8f0;
}

.cp-fd-section--tech {
    background: #fff;
}

.cp-fd-section-head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.5rem;
}

.cp-fd-section-head h2 {
    margin: 0 0 .65rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.cp-fd-section-head p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

.cp-fd-section-head--light h2 {
    color: #fff;
}

.cp-fd-section-head--light p {
    color: #94a3b8;
}

.cp-fd-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.cp-fd-service-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.cp-fd-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, .1);
    border-color: color-mix(in srgb, var(--portal-primary) 25%, #e2e8f0);
}

.cp-fd-service-card--featured {
    border-color: color-mix(in srgb, var(--portal-primary) 35%, #e2e8f0);
    background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--portal-primary) 4%, #fff) 100%);
}

.cp-fd-service-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--portal-primary);
    background: color-mix(in srgb, var(--portal-primary) 12%, #fff);
    padding: .2rem .55rem;
    border-radius: 999px;
}

.cp-fd-service-icon {
    width: 48px;
    height: 48px;
    border-radius: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--portal-primary) 12%, #fff);
    color: var(--portal-primary);
    font-size: 1.25rem;
}

.cp-fd-service-card h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.cp-fd-service-card p {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.55;
    flex: 1;
}

.cp-fd-service-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .4rem;
}

.cp-fd-service-card li {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .84rem;
    color: #334155;
}

.cp-fd-service-card li i {
    color: var(--portal-primary);
}

.cp-fd-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--portal-primary);
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.cp-fd-link:hover {
    gap: .55rem;
}

.cp-fd-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.cp-fd-plan-card {
    position: relative;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 1.25rem;
    padding: 1.5rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.cp-fd-plan-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--portal-primary) 45%, rgba(148, 163, 184, .16));
    box-shadow: 0 24px 48px rgba(0, 0, 0, .25);
}

.cp-fd-plan-card.is-popular {
    border-color: color-mix(in srgb, var(--portal-primary) 55%, rgba(148, 163, 184, .16));
    background: linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .03) 100%);
    box-shadow: 0 20px 40px color-mix(in srgb, var(--portal-primary) 18%, transparent);
}

.cp-fd-plan-popular {
    align-self: flex-start;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
    background: linear-gradient(135deg, var(--portal-primary), color-mix(in srgb, var(--portal-primary) 65%, #06b6d4));
    padding: .25rem .6rem;
    border-radius: 999px;
}

.cp-fd-plan-medium {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    align-self: flex-start;
    margin-bottom: .35rem;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, .12);
    color: #7dd3fc;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.cp-fd-plan-medium i {
    font-size: .85rem;
}

.cp-fd-plan-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.cp-fd-plan-speed {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: .25rem;
    padding: .5rem 0;
}

.cp-fd-plan-speed-num {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.cp-fd-plan-speed-unit {
    font-size: 1rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--portal-primary) 70%, #67e8f9);
    margin-bottom: .35rem;
}

.cp-fd-plan-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: #94a3b8;
}

.cp-fd-plan-meta span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.cp-fd-plan-price {
    text-align: center;
    padding: .65rem 0;
    border-top: 1px solid rgba(148, 163, 184, .12);
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.cp-fd-plan-price .currency-billing-primary {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.cp-fd-plan-price small {
    color: #94a3b8;
}

.cp-fd-plan-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .45rem;
    flex: 1;
}

.cp-fd-plan-features li {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .84rem;
    color: #cbd5e1;
}

.cp-fd-plan-features i {
    color: color-mix(in srgb, var(--portal-primary) 70%, #34d399);
    flex-shrink: 0;
}

.cp-fd-plan-cta {
    border-radius: .75rem;
    font-weight: 700;
    padding: .75rem 1rem;
}

.cp-fd-empty {
    background: rgba(255, 255, 255, .04);
    border-radius: 1rem;
    padding: 2.5rem;
    border: 1px dashed rgba(148, 163, 184, .25);
}

.cp-fd-tech-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 2rem;
    align-items: center;
}

.cp-fd-tech-copy h2 {
    margin: 0 0 .75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: #0f172a;
}

.cp-fd-tech-copy > p {
    margin: 0 0 1.5rem;
    color: #64748b;
    line-height: 1.65;
    max-width: 34rem;
}

.cp-fd-tech-features {
    display: grid;
    gap: 1rem;
}

.cp-fd-tech-features > div {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}

.cp-fd-tech-features i {
    width: 42px;
    height: 42px;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--portal-primary) 10%, #fff);
    color: var(--portal-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cp-fd-tech-features strong {
    display: block;
    color: #0f172a;
    margin-bottom: .15rem;
}

.cp-fd-tech-features span {
    color: #64748b;
    font-size: .88rem;
    line-height: 1.5;
}

.cp-fd-tech-panel {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-radius: 1.25rem;
    padding: 1.75rem;
    color: #e2e8f0;
    box-shadow: 0 24px 48px rgba(15, 23, 42, .15);
}

.cp-fd-tech-stat {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, .15);
}

.cp-fd-tech-stat-num {
    display: block;
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.cp-fd-tech-stat-label {
    color: #94a3b8;
    font-size: .88rem;
}

.cp-fd-tech-actions {
    display: grid;
    gap: .75rem;
}

.cp-fd-tech-actions .cp-fd-btn-outline {
    justify-content: center;
    width: 100%;
    border-radius: .75rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.cp-fd-panel {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

@media (max-width: 960px) {
    .cp-fd-hero-inner,
    .cp-fd-tech-grid,
    .cp-fd-services-grid {
        grid-template-columns: 1fr;
    }

    .cp-fd-hero {
        min-height: auto;
        padding: 2rem 0 2.75rem;
    }

    .cp-fd-hero-copy h1 {
        max-width: none;
        font-size: clamp(1.65rem, 7.5vw, 2.35rem);
    }

    .cp-fd-hero-lead {
        font-size: .95rem;
    }

    .cp-fd-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cp-fd-hero-actions .cp-btn-primary,
    .cp-fd-hero-actions .cp-fd-btn-outline {
        width: 100%;
        justify-content: center;
    }

    .cp-fd-hero-stats {
        grid-template-columns: 1fr;
    }

    .cp-fd-stat {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: .65rem;
        align-items: center;
        text-align: left;
        padding: .85rem 1rem;
    }

    .cp-fd-stat i {
        grid-row: 1 / span 2;
        margin-bottom: 0;
        font-size: 1.25rem;
    }

    .cp-fd-scroll-hint {
        display: none;
    }
}

@media (max-width: 900px) {
    .cp-fd-header .cp-public-nav {
        background: #0b1220;
        border-bottom-color: rgba(148, 163, 184, .12);
    }

    /* Paces: menú móvil necesita fondo sólido (no transparente sobre el hero) */
    body.cp-skin-paces .cp-fd-header .cp-public-nav,
    body.cp-skin-paces .cp-fd-header .cp-public-nav.is-open,
    body.cp-skin-paces .cp-public-header .cp-public-nav,
    body.cp-skin-paces .cp-public-header .cp-public-nav.is-open {
        background: #ffffff !important;
        box-shadow: 0 14px 28px rgba(15, 23, 42, .12) !important;
        border-bottom: 1px solid #eaedf2 !important;
        z-index: 60;
    }

    html[data-theme="dark"] body.cp-skin-paces .cp-fd-header .cp-public-nav,
    html[data-theme="dark"] body.cp-skin-paces .cp-fd-header .cp-public-nav.is-open,
    html[data-theme="dark"] body.cp-skin-paces .cp-public-header .cp-public-nav,
    html[data-theme="dark"] body.cp-skin-paces .cp-public-header .cp-public-nav.is-open {
        background: var(--lp-bg, #111827) !important;
        border-bottom-color: var(--lp-border, #32333d) !important;
        box-shadow: 0 14px 28px rgba(0, 0, 0, .35) !important;
    }

    .cp-fd-header .cp-public-nav a:hover {
        background: rgba(255, 255, 255, .05);
    }
}

/* CTA band + login modal */
.cp-public-cta-band {
    background: linear-gradient(135deg, var(--portal-sidebar) 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 2.5rem 0;
}

.cp-public-cta-band--lookup {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.cp-public-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.cp-public-cta-inner h2 {
    margin: 0 0 .35rem;
    color: #fff;
    font-size: 1.45rem;
}

.cp-public-cta-inner p {
    margin: 0;
    color: #94a3b8;
    max-width: 32rem;
}

.cp-btn-cta {
    width: auto;
    min-width: 220px;
    padding: .85rem 1.5rem;
    font-size: 1rem;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--portal-primary) 40%, transparent);
}

body.cp-modal-open {
    overflow: hidden;
}

.cp-login-modal {
    position: fixed;
    inset: 0;
    /* Above .cp-chat-fab (1080) so Pagos / Login cover the support bubble */
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
    visibility: hidden;
}

/* Keep the chat FAB from covering modal actions (Reportar pagos) on mobile */
body.cp-modal-open .cp-chat-fab {
    visibility: hidden;
    pointer-events: none;
}

.cp-login-modal.is-open {
    pointer-events: auto;
    visibility: visible;
}

.cp-login-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .28s ease;
}

.cp-login-modal.is-open .cp-login-modal-backdrop {
    opacity: 1;
}

.cp-login-modal-dialog {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    transform: scale(.92) translateY(24px);
    opacity: 0;
    transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
}

.cp-login-modal-dialog .cp-login-card {
    width: 100%;
    max-width: none;
}

.cp-portal-modal-dialog--wide {
    width: min(520px, 100%);
}

.cp-portal-modal-dialog--register {
    width: min(680px, 100%);
    display: flex;
    flex-direction: column;
    max-height: min(94vh, 920px);
    min-height: 0;
}

/* Solicitar instalación: columna fija + scroll invisible en el cuerpo */
#cpRegisterModal .cp-register-modal-card {
    display: flex;
    flex-direction: column;
    max-height: inherit;
    min-height: 0;
    overflow: hidden;
}

#cpRegisterModal .cp-register-modal-header {
    flex-shrink: 0;
    padding: 1rem 2.75rem .8rem 1.2rem !important;
}

#cpRegisterModal .cp-register-modal-header .cp-portal-modal-icon {
    width: 2.45rem;
    height: 2.45rem;
    margin-bottom: .4rem;
    font-size: 1.05rem;
}

#cpRegisterModal .cp-register-modal-header h1 {
    font-size: 1.12rem !important;
    line-height: 1.25;
}

#cpRegisterModal .cp-register-modal-header p {
    font-size: .8rem !important;
    line-height: 1.35;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.cp-register-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: .85rem 1.15rem 0;
}

.cp-register-modal-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#cpRegisterModal.cp-login-modal .cp-login-modal-card .cp-login-body.cp-register-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#cpRegisterModal .cp-login-modal-card .cp-login-body.cp-register-modal-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Portal no usa Bootstrap: utilidades mínimas para el formulario de solicitud */
.cp-register-form .d-none,
.cp-register-form [hidden] {
    display: none !important;
}

.cp-register-form .cp-register-address-block {
    margin-bottom: .85rem;
    position: relative;
    z-index: 2;
    overflow: visible;
}

.cp-register-form .client-address-section {
    margin: 0;
    overflow: visible;
}

.cp-register-form .client-address-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .5rem .6rem;
}

.cp-register-form .client-field {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    min-width: 0;
    position: relative;
    overflow: visible;
}

.cp-register-form .client-field--state,
.cp-register-form .client-field--city,
.cp-register-form .client-field--district,
.cp-register-form .client-field--postal {
    grid-column: span 3;
}

.cp-register-form .client-address-section .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: inherit;
    margin: 0;
}

.cp-register-form .client-address-section .form-control:not(.d-none):not([hidden]):not(:disabled),
.cp-register-form .client-address-section .form-select:not(.tomselected):not(.ts-hidden-accessible):not([hidden]),
.cp-register-form .client-address-section .ts-wrapper.single .ts-control {
    min-height: 2.35rem !important;
    height: 2.35rem !important;
    border-radius: .55rem !important;
    border: 1px solid var(--portal-border) !important;
    background-color: var(--portal-input-bg) !important;
    box-shadow: none !important;
    font-size: .88rem !important;
    color: var(--portal-text) !important;
}

.cp-register-form .client-address-section select.tomselected,
.cp-register-form .client-address-section select.ts-hidden-accessible {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    max-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
    display: none !important;
}

.cp-register-form .client-address-section .ts-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

.cp-register-form .client-address-section .ts-wrapper.single .ts-control {
    display: flex !important;
    align-items: center;
    padding: 0 2rem 0 .75rem !important;
    position: relative !important;
}

/* Flecha en Tom Select (estado, ciudad, CP) — el portal no carga panel-ui.css */
.cp-register-form .client-address-section .ts-wrapper.single .ts-control::after,
.cp-register-form .client-field--postal.is-postal-select-mode > .ts-wrapper.single .ts-control::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: .55rem !important;
    width: 12px !important;
    height: 10px !important;
    transform: translateY(-50%) !important;
    border: 0 !important;
    margin: 0 !important;
    background: var(--portal-select-arrow) center / contain no-repeat !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.cp-register-form .client-address-section .ts-wrapper.dropdown-active .ts-control::after,
.cp-register-form .client-field--postal.is-postal-select-mode > .ts-wrapper.dropdown-active .ts-control::after {
    transform: translateY(-50%) rotate(180deg) !important;
}

.cp-register-form .client-field--postal.is-postal-select-mode .js-client-address-postal-input {
    display: none !important;
}

.cp-register-form .client-field--postal:not(.is-postal-select-mode) .js-client-address-postal-select,
.cp-register-form .client-field--postal:not(.is-postal-select-mode) .js-client-address-postal-select + .ts-wrapper {
    display: none !important;
}

/* Prefijo VE: la flecha circular va en ::after / background del select (no ocultar) */

/* Tom Select se monta en body: fondo opaco y por encima del modal */
.ts-dropdown.ts-dropdown--address-search,
.ts-dropdown.ts-dropdown--soft-pill,
.ts-dropdown.ts-dropdown--modal {
    position: fixed !important;
    background: var(--portal-surface, #fff) !important;
    color: var(--portal-text, #0f172a) !important;
    opacity: 1 !important;
    border: 1px solid var(--portal-border, #dbe3ee) !important;
    border-radius: .75rem !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18) !important;
    z-index: 20060 !important;
    margin-top: 0 !important;
    padding: .35rem;
    overflow: hidden;
    min-width: 12rem;
}

/* Sin panel-ui.css estos dropdowns quedan en el flujo y se ven como cajas duplicadas */
.ts-dropdown.ts-dropdown--address-search:not(.ts-is-open),
.ts-dropdown.ts-dropdown--soft-pill:not(.ts-is-open),
.ts-dropdown.ts-dropdown--modal:not(.ts-is-open) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.ts-dropdown.ts-dropdown--address-search .option,
.ts-dropdown.ts-dropdown--soft-pill .option,
.ts-dropdown.ts-dropdown--modal .option,
.ts-dropdown.ts-dropdown--address-search .ts-dropdown-content,
.ts-dropdown.ts-dropdown--modal .ts-dropdown-content {
    background: var(--portal-surface, #fff) !important;
    color: var(--portal-text, #0f172a) !important;
}

.ts-dropdown.ts-dropdown--address-search .ts-dropdown-content,
.ts-dropdown.ts-dropdown--modal .ts-dropdown-content {
    max-height: min(280px, calc(100vh - 8rem));
    overflow-x: hidden;
    overflow-y: auto !important;
}

.ts-dropdown.ts-dropdown--address-search .option.active,
.ts-dropdown.ts-dropdown--soft-pill .option.active,
.ts-dropdown.ts-dropdown--modal .option.active,
.ts-dropdown.ts-dropdown--address-search .option:hover,
.ts-dropdown.ts-dropdown--modal .option:hover {
    background: color-mix(in srgb, var(--portal-primary, #2563eb) 14%, var(--portal-surface, #fff)) !important;
    color: var(--portal-text, #0f172a) !important;
}

.ts-dropdown .dropdown-input-wrap,
.ts-dropdown .dropdown-input {
    background: var(--portal-input-bg, #fff) !important;
    color: var(--portal-text, #0f172a) !important;
    border-color: var(--portal-border, #dbe3ee) !important;
}

html[data-theme='dark'] .ts-dropdown.ts-dropdown--address-search,
html[data-theme='dark'] .ts-dropdown.ts-dropdown--soft-pill,
html[data-theme='dark'] .ts-dropdown.ts-dropdown--modal,
html[data-theme='dark'] .ts-dropdown.ts-dropdown--address-search .option,
html[data-theme='dark'] .ts-dropdown.ts-dropdown--modal .option,
html[data-theme='dark'] .ts-dropdown .dropdown-input-wrap,
html[data-theme='dark'] .ts-dropdown .dropdown-input {
    background: #1e293b !important;
    color: #e2e8f0;
    border-color: #334155 !important;
}

@media (max-width: 640px) {
    .cp-register-form .client-address-grid {
        grid-template-columns: 1fr;
    }

    .cp-register-form .client-field--state,
    .cp-register-form .client-field--city,
    .cp-register-form .client-field--district,
    .cp-register-form .client-field--postal {
        grid-column: 1 / -1;
    }
}

.cp-register-form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    --cp-reg-control-h: 2.5rem;
    --cp-reg-control-r: 8px;
    --cp-reg-control-fs: .88rem;
    --cp-reg-control-pad-x: .6rem;
    --cp-reg-control-pad-arrow: 2rem;
}

/* Casilla única: mismo alto, borde y radio en todo el formulario */
.cp-register-form .cp-field > input:not([type="tel"]):not([type="hidden"]),
.cp-register-form .cp-register-doc-seg > select:not(.tomselected):not(.ts-hidden-accessible):not(.flag-select-native):not(.ve-doc-prefix),
.cp-register-form .cp-register-doc-seg > input:not(.ve-doc-digits):not(.js-document-number-input),
.cp-register-form .cp-field > select:not(.tomselected):not(.ts-hidden-accessible):not(.ve-doc-prefix):not(.flag-select-native),
.cp-register-form .flag-select-trigger,
.cp-register-form .client-address-section .ts-wrapper.single .ts-control,
.cp-register-form .client-field:not(.client-field--postal) > .ts-wrapper.single .ts-control,
.cp-register-form .client-field--postal.is-postal-select-mode > .ts-wrapper.single .ts-control,
.cp-register-form .client-address-section .form-control:not(.d-none):not([hidden]):not(:disabled) {
    min-height: var(--cp-reg-control-h) !important;
    height: var(--cp-reg-control-h) !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: var(--cp-reg-control-r) !important;
    background-color: var(--portal-input-bg) !important;
    color: var(--portal-text) !important;
    font-size: var(--cp-reg-control-fs) !important;
    line-height: 1.25 !important;
    padding: 0 var(--cp-reg-control-pad-x) !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

/* Tel: no usar padding unificado (pisa el espacio de bandera/+código) */
.cp-register-form .cp-portal-phone-field .iti .iti__tel-input,
.cp-register-form .cp-portal-phone-field .iti input[type="tel"],
#cpRegisterModal .cp-register-form .cp-portal-phone-field .iti .iti__tel-input,
#cpRegisterModal .cp-register-form .cp-portal-phone-field .iti input[type="tel"] {
    min-height: var(--cp-reg-control-h, 2.5rem) !important;
    height: var(--cp-reg-control-h, 2.5rem) !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: var(--cp-reg-control-r, .55rem) !important;
    background-color: var(--portal-input-bg) !important;
    color: var(--portal-text) !important;
    font-size: var(--cp-reg-control-fs, .88rem) !important;
    line-height: 1.25 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: var(--cp-reg-control-pad-x, .6rem) !important;
    padding-left: calc(var(--iti-selected-country-width, 5.75rem) + 10px) !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.cp-register-form .cp-field > select:not(.tomselected):not(.ts-hidden-accessible):not(.ve-doc-prefix):not(.flag-select-native),
.cp-register-form .cp-register-doc-seg > select:not(.tomselected):not(.ts-hidden-accessible):not(.ve-doc-prefix):not(.flag-select-native),
.cp-register-form .flag-select-trigger,
.cp-register-form .client-address-section .ts-wrapper.single .ts-control,
.cp-register-form .client-field--postal.is-postal-select-mode > .ts-wrapper.single .ts-control {
    padding-right: var(--cp-reg-control-pad-arrow) !important;
}

.cp-register-form .cp-field > select:not(.tomselected):not(.ts-hidden-accessible):not(.ve-doc-prefix),
.cp-register-form .cp-register-doc-seg > select:not(.tomselected):not(.ts-hidden-accessible):not(.ve-doc-prefix) {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: var(--portal-select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right .55rem center !important;
    background-size: 12px 10px !important;
}

.cp-register-form .form-select:not(.ve-doc-prefix):not(.js-ve-doc-prefix),
.cp-register-form .form-select-sm:not(.ve-doc-prefix):not(.js-ve-doc-prefix),
.cp-register-form .form-control-sm:not(.ve-doc-digits):not(.js-document-number-input) {
    min-height: var(--cp-reg-control-h) !important;
    height: var(--cp-reg-control-h) !important;
    font-size: var(--cp-reg-control-fs) !important;
}

.cp-register-form .client-address-section .ts-wrapper,
.cp-register-form .client-field > .ts-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

.cp-register-form .client-address-section .ts-wrapper.single .ts-control,
.cp-register-form .client-field > .ts-wrapper.single .ts-control {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

.cp-register-form .client-address-section .ts-wrapper.single .ts-control::after,
.cp-register-form .client-field > .ts-wrapper.single .ts-control::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: .55rem !important;
    width: 12px !important;
    height: 10px !important;
    transform: translateY(-50%) !important;
    border: 0 !important;
    margin: 0 !important;
    background: var(--portal-select-arrow) center / contain no-repeat !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.cp-register-form .client-address-section .ts-wrapper.dropdown-active .ts-control::after,
.cp-register-form .client-field > .ts-wrapper.dropdown-active .ts-control::after {
    transform: translateY(-50%) rotate(180deg) !important;
}

.cp-register-form select.tomselected,
.cp-register-form select.ts-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    overflow: hidden !important;
}

#cpRegisterModal .cp-register-form {
    gap: .45rem;
}

#cpRegisterModal .cp-register-form .cp-field label,
#cpRegisterModal .cp-register-form .client-address-section .form-label,
#cpRegisterModal .cp-register-form .client-field--street .form-label {
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.1rem;
    margin: 0 0 .35rem;
    color: var(--portal-text);
}

#cpRegisterModal .cp-register-form .cp-field input:not([type="tel"]),
#cpRegisterModal .cp-register-form .cp-field select,
#cpRegisterModal .cp-register-form .cp-field textarea,
#cpRegisterModal .cp-register-form .flag-select-trigger,
#cpRegisterModal .cp-register-form .client-field--street .form-control,
#cpRegisterModal .cp-register-form .cp-portal-phone-field .iti .iti__tel-input,
#cpRegisterModal .cp-register-form .cp-portal-phone-field .iti input[type="tel"],
#cpRegisterModal .cp-register-form .client-address-section .form-control:not(.d-none):not([hidden]):not(:disabled),
#cpRegisterModal .cp-register-form .client-address-section .ts-wrapper.single .ts-control,
#cpRegisterModal .cp-register-form .client-field > .ts-wrapper.single .ts-control,
#cpRegisterModal .cp-register-form .ve-doc-number {
    border-radius: var(--cp-reg-control-r, .55rem);
    background-color: var(--portal-input-bg) !important;
    color: var(--portal-text) !important;
    border-color: var(--portal-border) !important;
}

#cpRegisterModal .cp-register-form .cp-field textarea {
    min-height: 4.2rem;
    resize: vertical;
    max-height: 6.5rem;
}

#cpRegisterModal .cp-register-address-block {
    margin-bottom: .35rem;
}

#cpRegisterModal .cp-register-form .client-address-grid {
    gap: .5rem .6rem;
}

#cpRegisterModal .cp-register-doc-row,
#cpRegisterModal .cp-register-location-plan-row,
#cpRegisterModal .cp-register-phone-email-row {
    gap: .5rem;
}

.cp-register-form .cp-field {
    margin-bottom: 0;
}

.cp-register-form .cp-field label {
    font-size: .78rem;
    line-height: 1.25;
    margin-bottom: .28rem;
}

/* Alturas/bordes unificados arriba en .cp-register-form — solo textarea aparte */
.cp-register-form .cp-field textarea {
    font-size: var(--cp-reg-control-fs, .88rem);
    line-height: 1.25;
    padding: .48rem .6rem;
    box-sizing: border-box;
    border: 1px solid var(--portal-border);
    background: var(--portal-input-bg);
    color: var(--portal-text);
    border-radius: var(--cp-reg-control-r, .55rem);
    min-height: 4.2rem;
    height: auto;
    resize: vertical;
    max-height: 6.5rem;
}

.cp-register-doc-row,
.cp-register-location-plan-row,
.cp-register-phone-email-row {
    display: grid;
    gap: .65rem;
    align-items: start;
}

.cp-register-doc-row {
    grid-template-columns: minmax(0, 1fr);
}

.cp-register-doc-group {
    display: grid;
    grid-template-columns: minmax(7.5rem, .95fr) minmax(6.5rem, .75fr) minmax(0, 1.45fr);
    gap: .65rem;
    align-items: start;
    min-width: 0;
}

.cp-register-doc-seg {
    margin: 0;
    min-width: 0;
}

.cp-register-form .cp-register-doc-seg .flag-select-trigger:focus,
.cp-register-form .cp-register-doc-seg select:focus,
.cp-register-form .cp-register-doc-seg input:focus,
.cp-register-form .cp-field > input:focus,
.cp-register-form .cp-field > select:focus,
.cp-register-form .flag-select-trigger:focus,
.cp-register-form .ts-wrapper.focus .ts-control,
.cp-register-form .ts-wrapper.dropdown-active .ts-control {
    position: relative;
    z-index: 2;
    outline: 0;
    border-color: color-mix(in srgb, var(--portal-primary) 55%, var(--portal-border)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 18%, transparent) !important;
}

.cp-register-form .cp-register-doc-seg .flag-select-trigger,
.cp-register-form .cp-register-doc-seg > select:not(.tomselected):not(.ts-hidden-accessible):not(.ve-doc-prefix),
.cp-register-form .cp-register-doc-seg > input:not(.ve-doc-digits):not(.js-document-number-input) {
    border-radius: var(--cp-reg-control-r, .55rem);
}

.cp-register-form .cp-register-doc-seg--country .country-select-field {
    z-index: 25;
}

.cp-register-form .cp-register-doc-seg--country .country-select-field.is-open {
    z-index: 20510;
}

/* Venezuela: prefijo V/E/P/G + número en UNA sola casilla (diseño Paces) */
.cp-register-form .cp-register-doc-seg--number > .ve-doc-number,
.cp-register-form .ve-doc-number {
    display: grid !important;
    grid-template-columns: 2.85rem minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 0 !important;
    min-height: var(--cp-reg-control-h, 2.35rem) !important;
    height: var(--cp-reg-control-h, 2.35rem) !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: var(--portal-input-bg) !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

.cp-register-form .ve-doc-number:focus-within {
    border-color: color-mix(in srgb, var(--portal-primary) 55%, var(--portal-border)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 18%, transparent) !important;
}

.cp-register-form .cp-register-doc-seg--number.field-validate-wrap,
.cp-register-form .cp-register-doc-seg--number.is-invalid,
.cp-register-form .cp-portal-phone-field.field-validate-wrap,
.cp-register-form .cp-portal-phone-field.is-invalid,
.cp-register-form .client-field.field-validate-wrap {
    overflow: visible;
}

.cp-register-form .cp-register-doc-seg--number .field-validate-feedback,
.cp-register-form .cp-portal-phone-field .field-validate-feedback,
.cp-register-form .client-field .field-validate-feedback {
    position: relative;
    z-index: 2;
}

.cp-register-form .client-address-section .form-label .cp-field-required,
.cp-register-form .client-address-section .form-label .text-danger {
    color: #ef4444 !important;
}

.cp-register-form .ve-doc-number .ve-doc-prefix,
.cp-register-form .ve-doc-number .js-ve-doc-prefix,
.cp-register-form .ve-doc-number .ts-wrapper,
.cp-register-form .ve-doc-number .ts-wrapper.single .ts-control,
.cp-register-form .ve-doc-number .ve-doc-digits,
.cp-register-form .ve-doc-number .js-document-number-input,
.cp-register-form .ve-doc-number input[name="document_number"] {
    min-height: 100% !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: var(--cp-reg-control-fs, .88rem) !important;
    line-height: 1.25 !important;
    color: var(--portal-text) !important;
}

/* Una sola flecha Paces en el prefijo nativo */
.cp-register-form .ve-doc-number .ve-doc-prefix,
.cp-register-form .ve-doc-number .js-ve-doc-prefix {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    text-align: center !important;
    font-weight: 700 !important;
    padding: 0 1.1rem 0 .2rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: var(--portal-select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right .25rem center !important;
    background-size: 10px 8px !important;
    cursor: pointer;
}

/* Si quedara Tom Select, sin flecha duplicada */
.cp-register-form .ve-doc-number .ts-wrapper {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.cp-register-form .ve-doc-number .ts-wrapper.single .ts-control,
.cp-register-form .ve-doc-number .ts-wrapper.form-select:not(.disabled) .ts-control,
.cp-register-form .ve-doc-number .ts-wrapper.form-select:not(.disabled).single.input-active .ts-control {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    padding: 0 1.1rem 0 .2rem !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--portal-text) !important;
}

.cp-register-form .ve-doc-number .ts-wrapper.single .ts-control::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    right: .25rem !important;
    width: 10px !important;
    height: 8px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    border: 0 !important;
    background: var(--portal-select-arrow) center / contain no-repeat !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.cp-register-form .ve-doc-number .ts-wrapper.dropdown-active .ts-control::after {
    transform: translateY(-50%) rotate(180deg) !important;
}

.cp-register-form .ve-doc-number .ts-wrapper .item {
    margin: 0 !important;
    font-weight: 700 !important;
}

.cp-register-form .ve-doc-number .ve-doc-digits,
.cp-register-form .ve-doc-number .js-document-number-input,
.cp-register-form .ve-doc-number input[name="document_number"] {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 var(--cp-reg-control-pad-x, .6rem) !important;
    background-image: none !important;
}

.cp-register-form .ve-doc-number > select.tomselected,
.cp-register-form .ve-doc-number > select.ts-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    border: 0 !important;
    background-image: none !important;
}

.cp-register-form .ve-doc-number .ve-doc-prefix:focus,
.cp-register-form .ve-doc-number .ts-wrapper.focus .ts-control,
.cp-register-form .ve-doc-number input:focus {
    outline: 0 !important;
    box-shadow: none !important;
}

body.cp-skin-paces .cp-register-form .ve-doc-number .ve-doc-prefix,
body.cp-skin-paces .cp-register-form .ve-doc-number .js-ve-doc-prefix,
body.cp-skin-paces .cp-register-form .ve-doc-number .ve-doc-digits,
body.cp-skin-paces .cp-register-form .ve-doc-number .js-document-number-input,
body.cp-skin-paces .cp-register-form .ve-doc-number input[name="document_number"],
body.cp-skin-paces .cp-register-form .ve-doc-number .ts-wrapper.single .ts-control {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: transparent !important;
    background: transparent !important;
    min-height: 100% !important;
    height: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.cp-skin-paces .cp-register-form .ve-doc-number .ve-doc-prefix,
body.cp-skin-paces .cp-register-form .ve-doc-number .js-ve-doc-prefix {
    padding: 0 1.1rem 0 .2rem !important;
    background-image: var(--portal-select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right .25rem center !important;
    background-size: 10px 8px !important;
}

body.cp-skin-paces .cp-register-form .ve-doc-number {
    border: 1px solid #e7e9eb !important;
    border-radius: 8px !important;
    background: #fff !important;
    gap: 0 !important;
}

body.cp-skin-paces .cp-register-form .ve-doc-number:focus-within {
    border-color: #4557a3 !important;
    box-shadow: 0 0 0 3px rgba(69, 87, 163, .16) !important;
}

.cp-register-form .cp-register-doc-group {
    grid-template-columns: minmax(6.75rem, .92fr) minmax(5.75rem, .72fr) minmax(0, 1.45fr);
    gap: .5rem;
}

.cp-register-location-plan-row {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
}

/* Calle·Móvil·Correo + Estado·Ciudad·Parroquia·CP: misma rejilla 12 cols */
.cp-register-contact-address {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: 100%;
    min-width: 0;
}

.cp-register-phone-email-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .5rem .6rem;
    align-items: start;
    width: 100%;
}

.cp-register-phone-email-row > .client-field--street {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.cp-register-phone-email-row > .cp-portal-phone-field {
    grid-column: span 4;
}

.cp-register-phone-email-row > .cp-field:not(.cp-portal-phone-field) {
    grid-column: span 4;
}

.cp-register-form .cp-register-address-block {
    margin-bottom: 0;
}

.cp-register-form .client-address-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas: none;
    gap: .5rem .6rem;
    width: 100%;
}

.cp-register-form .client-field--state,
.cp-register-form .client-field--city,
.cp-register-form .client-field--district,
.cp-register-form .client-field--postal {
    grid-area: auto;
    grid-column: span 3;
}

.cp-register-phone-email-row > .client-field--street .form-label {
    font-size: .76rem;
    line-height: 1.1rem;
    margin: 0 0 .35rem;
    font-weight: 600;
}

.cp-register-phone-email-row > .client-field--street .form-control {
    min-height: var(--cp-reg-control-h, 2.5rem) !important;
    height: var(--cp-reg-control-h, 2.5rem) !important;
    border-radius: 8px !important;
    border: 1px solid var(--portal-border) !important;
    background-color: var(--portal-input-bg) !important;
    color: var(--portal-text) !important;
    box-shadow: none !important;
    font-size: var(--cp-reg-control-fs, .88rem) !important;
    padding-left: var(--cp-reg-control-pad-x, .6rem) !important;
    padding-right: var(--cp-reg-control-pad-x, .6rem) !important;
}

/* Asterisco obligatorio siempre rojo (Paces/dark no lo hereda del label) */
#cpRegisterModal .cp-register-form .cp-field-required,
#cpRegisterModal .cp-register-form .text-danger,
.cp-register-form .cp-field-required,
.cp-register-form .client-field--street .cp-field-required,
.cp-register-form .client-field--street .text-danger {
    color: #ef4444 !important;
}

/* Misma casilla visual: calle + móvil + correo + dirección */
.cp-register-form .client-field--street .form-control,
.cp-register-form .cp-register-phone-email-row .cp-field > input:not([type="tel"]):not([type="hidden"]),
.cp-register-form .cp-portal-phone-field .iti .iti__tel-input,
.cp-register-form .cp-portal-phone-field .iti input[type="tel"],
.cp-register-form .client-address-section .form-control:not(.d-none):not([hidden]):not(:disabled),
.cp-register-form .client-address-section .ts-wrapper.single .ts-control,
.cp-register-form .client-field--district > .ts-wrapper.single .ts-control,
.cp-register-form .client-field--postal.is-postal-select-mode > .ts-wrapper.single .ts-control {
    background-color: var(--portal-input-bg) !important;
    color: var(--portal-text) !important;
    border-color: var(--portal-border) !important;
}

/*
 * Tom Select (bootstrap5) fuerza background:transparent + border:none en
 * .ts-wrapper.form-select .ts-control — hay que ganar con background shorthand
 * y selectores que incluyan .form-select / .input-active.
 */
/* Estado/Ciudad/Parroquia/CP: casillas visibles (Tom Select no transparente) */
#cpRegisterModal .cp-register-form .client-address-section .ts-wrapper,
#cpRegisterModal .cp-register-form .client-field > .ts-wrapper {
    display: block !important;
    width: 100% !important;
    min-height: var(--cp-reg-control-h, 2.5rem) !important;
    height: var(--cp-reg-control-h, 2.5rem) !important;
}

#cpRegisterModal .cp-register-form .ts-wrapper.form-select:not(.disabled) .ts-control,
#cpRegisterModal .cp-register-form .ts-wrapper.form-select:not(.disabled).single .ts-control,
#cpRegisterModal .cp-register-form .ts-wrapper.form-select:not(.disabled).single.input-active .ts-control,
#cpRegisterModal .cp-register-form .client-address-section .ts-wrapper.single .ts-control,
#cpRegisterModal .cp-register-form .client-field > .ts-wrapper.single .ts-control,
#cpRegisterModal .cp-register-form .client-address-section .form-control:not(.d-none):not([hidden]):not(:disabled) {
    min-height: var(--cp-reg-control-h, 2.5rem) !important;
    height: var(--cp-reg-control-h, 2.5rem) !important;
    border: 1px solid var(--portal-border) !important;
    border-radius: 8px !important;
    background: var(--portal-input-bg) !important;
    background-color: var(--portal-input-bg) !important;
    color: var(--portal-text) !important;
    box-shadow: none !important;
}

/* Prefijo VE: no pintar el Tom Select interno como casilla suelta */
#cpRegisterModal .cp-register-form .ve-doc-number .ts-wrapper.form-select:not(.disabled) .ts-control,
#cpRegisterModal .cp-register-form .ve-doc-number .ts-wrapper.form-select:not(.disabled).single .ts-control,
#cpRegisterModal .cp-register-form .ve-doc-number .ts-wrapper.form-select:not(.disabled).single.input-active .ts-control,
#cpRegisterModal .cp-register-form .ve-doc-number .ts-wrapper.single .ts-control {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--portal-text) !important;
}

#cpRegisterModal .cp-register-form .ts-control,
#cpRegisterModal .cp-register-form .ts-control .item,
#cpRegisterModal .cp-register-form .ts-control input {
    color: var(--portal-text) !important;
}

#cpRegisterModal .cp-register-form .ts-control input::placeholder {
    color: var(--portal-muted, #94a3b8) !important;
    opacity: 1 !important;
}

/* Misma tipografía/alto en calle · móvil · correo */
#cpRegisterModal .cp-register-form {
    --cp-reg-control-h: 2.5rem;
    --cp-reg-control-r: 8px;
}

#cpRegisterModal .cp-register-form .cp-register-phone-email-row {
    align-items: start;
}

#cpRegisterModal .cp-register-form .cp-register-phone-email-row > .client-field--street,
#cpRegisterModal .cp-register-form .cp-register-phone-email-row > .cp-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-width: 0;
    gap: 0;
    margin: 0;
    padding: 0;
}

#cpRegisterModal .cp-register-form .cp-register-phone-email-row > .client-field--street .form-label,
#cpRegisterModal .cp-register-form .cp-register-phone-email-row > .cp-field > label {
    display: block !important;
    margin: 0 0 .35rem !important;
    padding: 0 !important;
    min-height: 1.1rem !important;
    height: 1.1rem !important;
    line-height: 1.1rem !important;
    font-size: .76rem !important;
    font-weight: 600 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#cpRegisterModal .cp-register-form .cp-register-phone-email-row .cp-field-required {
    vertical-align: baseline;
    position: static;
    font-size: inherit !important;
    line-height: inherit !important;
}

#cpRegisterModal .cp-register-form .cp-register-phone-email-row > .client-field--street .form-control,
#cpRegisterModal .cp-register-form .cp-register-phone-email-row .cp-field > input:not([type="tel"]):not([type="hidden"]),
#cpRegisterModal .cp-register-form .cp-register-phone-email-row .cp-portal-phone-field .iti,
#cpRegisterModal .cp-register-form .cp-register-phone-email-row .cp-portal-phone-field .iti .iti__tel-input,
#cpRegisterModal .cp-register-form .cp-register-phone-email-row .cp-portal-phone-field .iti input[type="tel"] {
    min-height: var(--cp-reg-control-h, 2.5rem) !important;
    height: var(--cp-reg-control-h, 2.5rem) !important;
    max-height: var(--cp-reg-control-h, 2.5rem) !important;
    box-sizing: border-box !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.25 !important;
    font-size: var(--cp-reg-control-fs, .88rem) !important;
    border-radius: 8px !important;
    margin: 0 !important;
}

body.cp-skin-paces #cpRegisterModal .cp-register-form .cp-portal-phone-field .iti .iti__tel-input,
body.cp-skin-paces #cpRegisterModal .cp-register-form .cp-portal-phone-field .iti input[type="tel"],
html[data-theme="dark"] body.cp-skin-paces #cpRegisterModal .cp-register-form .cp-portal-phone-field .iti .iti__tel-input,
html[data-theme="dark"] body.cp-skin-paces #cpRegisterModal .cp-register-form .cp-portal-phone-field .iti input[type="tel"] {
    min-height: var(--cp-reg-control-h, 2.5rem) !important;
    height: var(--cp-reg-control-h, 2.5rem) !important;
    max-height: var(--cp-reg-control-h, 2.5rem) !important;
    border-radius: 8px !important;
}

.cp-register-phone-field,
.cp-portal-phone-field {
    position: relative;
    z-index: 5;
    min-width: 0;
}

/* Teléfono intl-tel-input: una sola casilla, prefijo a la izquierda sin solapar */
.cp-portal-phone-field .iti {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: relative;
}

.cp-portal-phone-field .iti .iti__tel-input,
.cp-portal-phone-field .iti input[type="tel"] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: var(--cp-reg-control-pad-x, .6rem) !important;
    line-height: var(--cp-reg-control-h, 2.35rem) !important;
}

#cpAccountModal .cp-portal-phone-field .iti .iti__tel-input,
#cpAccountModal .cp-portal-phone-field .iti input[type="tel"] {
    min-height: 2.5rem !important;
    height: 2.5rem !important;
    line-height: 1.25 !important;
    padding-right: .75rem !important;
}

.cp-portal-phone-field .iti__country-container {
    top: 1px;
    bottom: 1px;
    left: 1px;
    padding: 0;
    z-index: 2;
}

.cp-portal-phone-field .iti__selected-country,
.cp-portal-phone-field .iti__selected-country-primary {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 .35rem 0 .5rem;
    gap: .15rem;
}

.cp-portal-phone-field .iti__flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 20px;
    height: 15px;
    line-height: 0;
    flex-shrink: 0;
}

.cp-portal-phone-field .iti__selected-dial-code {
    font-size: .8rem;
    font-weight: 600;
    color: var(--portal-text);
    white-space: nowrap;
    margin-left: .15rem;
    line-height: 1;
}

.cp-portal-phone-field .iti__flag {
    width: 20px !important;
    height: 15px !important;
    flex-shrink: 0;
    display: block;
    margin: 0;
    align-self: center;
    background-size: var(--iti-flag-sprite-width, 5762px) var(--iti-flag-sprite-height, 15px) !important;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}

.cp-portal-phone-field .iti__arrow {
    margin-left: .2rem;
    border-top-color: #64748b;
}

.cp-portal-phone-field .iti__dropdown-content,
.cp-public-panel .cp-portal-phone-field .iti__dropdown-content,
#cpAccountModal .cp-portal-phone-field .iti__dropdown-content {
    z-index: 90;
}

/* Lista de países del teléfono encima del modal del portal */
.iti--container {
    z-index: 4000 !important;
}

.iti--container .iti__dropdown-content {
    z-index: 4001 !important;
}

.cp-register-doc-row .cp-field,
.cp-register-location-plan-row .cp-field,
.cp-register-phone-email-row .cp-field {
    margin: 0;
    min-width: 0;
}

.cp-register-form-actions {
    display: flex;
    justify-content: center;
    padding: .55rem 0 calc(.85rem + env(safe-area-inset-bottom, 0px));
    margin-top: .15rem;
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--portal-surface, #fff) 0%, transparent) 0%,
        var(--portal-surface, #fff) 30%,
        var(--portal-surface, #fff) 100%
    );
}

html[data-theme="dark"] .cp-register-form-actions,
html[data-theme="dark"] #cpRegisterModal .cp-register-form-actions {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--portal-surface, #111827) 0%, transparent) 0%,
        var(--portal-surface, #111827) 30%,
        var(--portal-surface, #111827) 100%
    ) !important;
}

.cp-register-form-actions .cp-btn {
    width: 100%;
    max-width: 16rem;
    min-width: 10.5rem;
    padding: .58rem 1.45rem;
}

.cp-field-required {
    color: #f87171;
    font-weight: 700;
    flex-shrink: 0;
}

.cp-field-label-marked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .25rem;
    width: 100%;
}

.cp-register-doc-row .cp-field-label-marked,
.cp-register-location-plan-row .cp-field-label-marked,
.cp-register-phone-email-row .cp-field-label-marked {
    min-height: calc(.78rem * 1.25 * 2);
    align-items: flex-start;
}

.cp-field-label-marked > span:first-child {
    min-width: 0;
    flex: 1;
}

.cp-register-form .cp-field.is-invalid input,
.cp-register-form .cp-field.is-invalid select,
.cp-register-form .cp-field.is-invalid textarea,
.cp-register-form .field-validate-wrap.is-invalid input,
.cp-register-form .field-validate-wrap.is-invalid select,
.cp-register-form .field-validate-wrap.is-invalid textarea,
.cp-register-form .cp-portal-phone-field.is-invalid .iti .iti__tel-input,
.cp-register-form .cp-portal-phone-field.is-invalid .iti input[type="tel"],
.cp-register-form .cp-register-doc-seg--number.is-invalid .ve-doc-number,
.cp-register-form .client-field.is-invalid .ts-wrapper.single .ts-control,
.cp-register-form .client-field.is-invalid .form-control,
.cp-register-form .client-field.is-invalid .form-select {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .15);
}

.cp-register-form .field-validate-feedback {
    display: none;
    align-items: flex-start;
    gap: .3rem;
    margin-top: .28rem;
    font-size: .72rem;
    font-weight: 600;
    color: #fca5a5;
    line-height: 1.3;
}

.cp-register-form .field-validate-feedback.is-visible {
    display: flex;
}

.cp-register-form .field-validate-feedback i {
    font-size: .82rem;
    flex-shrink: 0;
    margin-top: .05rem;
}

.cp-register-form .country-select-field {
    position: relative;
    z-index: 20;
}

.cp-register-form .country-select-field.is-open {
    z-index: 20510;
}

.cp-register-form .flag-select-trigger {
    width: 100%;
    min-height: var(--cp-reg-control-h, 2.35rem);
    height: var(--cp-reg-control-h, 2.35rem);
    border-radius: var(--cp-reg-control-r, .55rem);
    cursor: pointer;
    background-image: var(--portal-select-arrow);
    background-repeat: no-repeat;
    background-position: right .55rem center;
    background-size: 12px 10px;
}

.cp-register-form .flag-select-trigger:focus,
.cp-login-modal-card .cp-login-body .flag-select-trigger:focus {
    border-color: color-mix(in srgb, var(--portal-primary) 55%, var(--portal-border));
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 18%, transparent);
}

.cp-login-modal-card .cp-login-body .flag-select-trigger {
    border: 1px solid var(--portal-border);
    background-color: var(--portal-input-bg);
    color: var(--portal-text);
    background-image: var(--portal-select-arrow);
    background-repeat: no-repeat;
    background-position: right .55rem center;
    background-size: 12px 10px;
    border-radius: .5rem;
}

.cp-register-form .flag-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cp-login-modal .flag-select-menu {
    z-index: 20520 !important;
    border-color: var(--portal-border);
    background: var(--portal-surface);
    color: var(--portal-text);
    box-shadow: 0 12px 28px var(--portal-shadow);
}

.cp-login-modal .flag-select-option:hover,
.cp-login-modal .flag-select-option:focus {
    background: color-mix(in srgb, var(--portal-primary) 10%, var(--portal-surface-2));
    outline: none;
}

@media (max-width: 639px) {
    .cp-register-doc-group {
        grid-template-columns: 1fr;
        gap: .65rem;
    }

    .cp-register-form .cp-register-doc-seg .flag-select-trigger,
    .cp-register-form .cp-register-doc-seg select:not(.tomselected):not(.ts-hidden-accessible),
    .cp-register-form .cp-register-doc-seg input:not(.ve-doc-digits):not(.js-document-number-input) {
        height: auto;
        min-height: 0;
    }

    .cp-register-location-plan-row,
    .cp-register-phone-email-row {
        grid-template-columns: 1fr;
    }

    .cp-register-phone-email-row > .client-field--street,
    .cp-register-phone-email-row > .cp-portal-phone-field,
    .cp-register-phone-email-row > .cp-field:not(.cp-portal-phone-field) {
        grid-column: 1 / -1;
    }
}

.cp-register-modal-body .row.g-3 {
    display: grid;
    gap: .75rem;
}

@media (min-width: 640px) {
    .cp-register-modal-body .row.g-3:has(.col-md-6) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cp-login-modal.is-open .cp-login-modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.cp-login-modal-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 3;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(15, 23, 42, .35);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.cp-login-modal-close:hover {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .35);
    transform: scale(1.05);
}

.cp-login-modal-card {
    margin: 0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
    overflow: hidden;
    background: var(--portal-surface);
}

.cp-login-modal-card .cp-login-header {
    background: linear-gradient(135deg, var(--portal-sidebar), #0f172a);
    position: relative;
    padding: 1.35rem 3rem 1.25rem 1.5rem;
}

.cp-login-modal-card .cp-login-header h1,
.cp-login-modal-card .cp-login-header p {
    color: #fff;
}

.cp-login-modal-card .cp-login-body {
    background: var(--portal-surface);
    color: var(--portal-text);
    overflow-y: auto;
    max-height: calc(100vh - 12rem);
}

#cpRegisterModal .cp-login-modal-card .cp-login-body.cp-register-modal-body {
    max-height: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#cpRegisterModal .cp-login-modal-card .cp-login-body.cp-register-modal-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.cp-login-modal-card .cp-login-body .cp-field input[type="text"],
.cp-login-modal-card .cp-login-body .cp-field input[type="password"],
.cp-login-modal-card .cp-login-body .cp-field input[type="email"],
.cp-login-modal-card .cp-login-body .cp-field input[type="date"],
.cp-login-modal-card .cp-login-body .cp-field input[type="number"],
.cp-login-modal-card .cp-login-body .cp-field select,
.cp-login-modal-card .cp-login-body .cp-field textarea {
    border: 1px solid var(--portal-border);
    background: var(--portal-input-bg);
    color: var(--portal-text);
}

.cp-login-modal-card .cp-login-body .cp-field input:focus,
.cp-login-modal-card .cp-login-body .cp-field select:focus,
.cp-login-modal-card .cp-login-body .cp-field textarea:focus {
    border-color: color-mix(in srgb, var(--portal-primary) 55%, var(--portal-border));
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 18%, transparent);
}

.cp-login-modal-card .cp-check {
    color: var(--portal-muted);
}

.cp-login-modal-features {
    list-style: none;
    margin: 1rem 0 0;
    padding: .85rem 0 0;
    border-top: 1px dashed var(--portal-border);
    display: grid;
    gap: .45rem;
}

.cp-login-modal-features li {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    color: var(--portal-muted);
}

.cp-login-modal-features i {
    color: var(--portal-primary);
}

.cp-portal-modal-header--lookup {
    text-align: center;
}

.cp-portal-modal-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.cp-lookup-results {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--portal-border);
    animation: cpLookupFadeIn .35s ease;
}

@keyframes cpLookupFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cp-lookup-results .cp-public-result-head h3 {
    font-size: 1.05rem;
    margin: 0 0 .2rem;
}

.cp-lookup-results .cp-public-result-actions {
    margin-top: .85rem;
}

.cp-lookup-results .cp-public-result-actions .cp-btn {
    width: 100%;
}

.cp-lookup-form {
    margin: 0;
}

.cp-lookup-search-bar {
    display: flex;
    align-items: center;
    gap: .35rem;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 999px;
    padding: .2rem .25rem .2rem 1.15rem;
    background: #060b14;
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--portal-primary) 75%, #22d3ee),
        0 0 18px color-mix(in srgb, var(--portal-primary) 35%, transparent);
    transition: box-shadow .2s ease, border-color .2s ease;
}

.cp-lookup-search-bar:focus-within {
    border-color: #fff;
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--portal-primary) 90%, #67e8f9),
        0 0 22px color-mix(in srgb, var(--portal-primary) 45%, transparent);
}

.cp-lookup-search-bar input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    padding: .65rem 0;
}

.cp-lookup-search-bar input::placeholder {
    color: rgba(255, 255, 255, .88);
    font-weight: 600;
}

.cp-lookup-search-btn {
    width: 2.85rem;
    height: 2.85rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s ease, transform .15s ease;
}

.cp-lookup-search-btn:hover {
    transform: scale(1.06);
}

.cp-lookup-search-bar.is-loading .cp-lookup-search-btn {
    pointer-events: none;
    opacity: .75;
}

.cp-lookup-modal-body {
    background: #060b14 !important;
    color: #e2e8f0;
}

.cp-lookup-results {
    margin-top: 1.15rem;
    padding-top: 0;
    border-top: none;
}

.cp-lookup-results-stack {
    display: grid;
    gap: 1rem;
}

.cp-lookup-client {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
}

.cp-lookup-client-main {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.cp-lookup-client-label,
.cp-lookup-summary-label,
.cp-lookup-section-title {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.cp-lookup-client-main strong {
    color: #fff;
    font-size: 1rem;
    line-height: 1.25;
}

.cp-lookup-client-code {
    font-size: .78rem;
    color: #94a3b8;
}

.cp-lookup-client-badge {
    flex-shrink: 0;
    border-radius: 999px;
    padding: .35rem .65rem;
    background: rgba(248, 113, 113, .14);
    color: #fecaca;
    font-size: .72rem;
    font-weight: 800;
}

.cp-lookup-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.cp-lookup-summary-card {
    display: grid;
    gap: .35rem;
    padding: .9rem .95rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
}

.cp-lookup-summary-card--primary {
    border-color: color-mix(in srgb, var(--portal-primary) 55%, rgba(255, 255, 255, .12));
    background: linear-gradient(180deg, color-mix(in srgb, var(--portal-primary) 18%, transparent), rgba(255, 255, 255, .03));
}

.cp-lookup-summary-value {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.2;
}

.cp-lookup-summary-card--primary .cp-lookup-summary-value {
    color: color-mix(in srgb, var(--portal-primary) 70%, #67e8f9);
    font-size: 1.2rem;
}

.cp-lookup-summary-sub {
    font-size: .78rem;
    color: #94a3b8;
}

.cp-lookup-section-title {
    margin: 0 0 .55rem;
}

.cp-lookup-invoices-list {
    display: grid;
    gap: .55rem;
}

.cp-lookup-invoice-card {
    display: grid;
    gap: .35rem;
    padding: .75rem .85rem;
    border-radius: .85rem;
    background: rgba(15, 23, 42, .55);
    border: 1px solid rgba(255, 255, 255, .08);
}

.cp-lookup-invoice-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .78rem;
    color: #94a3b8;
}

.cp-lookup-invoice-number {
    color: #e2e8f0;
    font-weight: 700;
}

.cp-lookup-invoice-balance {
    color: #fff;
    font-size: .95rem;
}

.cp-lookup-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.cp-lookup-service-chip {
    display: inline-flex;
    align-items: center;
    padding: .45rem .75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #e2e8f0;
    font-size: .8rem;
    font-weight: 700;
}

.cp-lookup-debt-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.cp-lookup-currency-flag {
    width: 18px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex: 0 0 auto;
    vertical-align: middle;
}

.cp-lookup-currency-flag-fallback {
    font-size: .95rem;
    color: #94a3b8;
}

.cp-lookup-note {
    margin: 0;
    font-size: .82rem;
    color: #94a3b8;
    text-align: center;
}

.cp-lookup-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .25rem;
}

/* Single primary CTA (solo “Reportar pagos”) uses full width */
.cp-lookup-actions:has(> .cp-lookup-action-btn:only-child) {
    grid-template-columns: 1fr;
}

.cp-lookup-action-btn {
    border: 2px solid var(--portal-primary, #2563eb);
    border-radius: 999px;
    background: var(--portal-primary, #2563eb);
    color: #fff;
    font-weight: 800;
    font-size: .88rem;
    padding: .75rem .65rem;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease, transform .15s ease, filter .15s ease;
}

.cp-lookup-action-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.cp-lookup-action-btn + .cp-lookup-action-btn,
.cp-lookup-actions .cp-lookup-action-btn:last-child:not(:only-child) {
    background: transparent;
    color: var(--portal-primary, #2563eb);
}

.cp-lookup-modal-body .cp-lookup-actions .cp-lookup-action-btn:last-child:not(:only-child) {
    border-color: color-mix(in srgb, var(--portal-primary, #2563eb) 55%, #fff);
    color: #fff;
    background: transparent;
}

.cp-lookup-panel--error {
    border: 2px solid rgba(248, 113, 113, .55);
    border-radius: 999px;
    padding: .85rem 1rem;
    text-align: center;
}

.cp-lookup-panel--error p {
    margin: 0;
    color: #fecaca;
    font-size: .9rem;
}

@media (max-width: 520px) {
    .cp-lookup-actions,
    .cp-lookup-summary-grid {
        grid-template-columns: 1fr;
    }

    .cp-login-modal {
        align-items: flex-end;
        padding: 0;
    }

    .cp-login-modal-dialog,
    .cp-portal-modal-dialog--wide,
    .cp-portal-modal-dialog--register {
        width: 100%;
        max-height: min(92dvh, 92vh, 100%);
        border-radius: 1rem 1rem 0 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    #cpRegisterModal .cp-register-modal-header {
        padding: .95rem 2.5rem .7rem 1rem !important;
    }

    #cpRegisterModal .cp-register-modal-body {
        padding: .75rem 1rem 0 !important;
    }

    #cpRegisterModal .cp-register-form-actions {
        padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    }

    .cp-login-modal-dialog .cp-login-card,
    .cp-login-modal-card {
        border-radius: 1rem 1rem 0 0;
        max-height: inherit;
        min-height: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .cp-login-modal-card .cp-login-header {
        padding: 1.1rem 2.75rem .95rem 1.15rem;
        flex-shrink: 0;
    }

    .cp-login-modal-card .cp-login-header img {
        max-height: 44px;
        margin-bottom: .5rem;
    }

    .cp-login-modal-card .cp-login-header h1 {
        font-size: 1.15rem;
    }

    .cp-login-modal-card .cp-login-body {
        /* Critical: without min-height:0 the body grows past the sheet and clips the CTA */
        flex: 1 1 auto;
        min-height: 0;
        padding: 1.1rem 1.15rem 0;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Keep “Reportar pagos” pinned at the bottom of the sheet while content scrolls */
    .cp-login-modal-card .cp-lookup-modal-body .cp-lookup-actions {
        position: sticky;
        bottom: 0;
        z-index: 3;
        margin: .35rem -1.15rem 0;
        padding: .85rem 1.15rem calc(.95rem + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--lp-modal-lookup-bg, #060b14) 0%, transparent) 0%,
            var(--lp-modal-lookup-bg, #060b14) 32%,
            var(--lp-modal-lookup-bg, #060b14) 100%
        );
        box-shadow: 0 -10px 24px rgba(2, 6, 23, .35);
    }

    .cp-login-modal-card .cp-login-body .cp-field input[type="text"],
    .cp-login-modal-card .cp-login-body .cp-field input[type="password"],
    .cp-login-modal-card .cp-login-body .cp-field input[type="email"],
    .cp-lookup-search-bar input {
        font-size: 16px; /* evita zoom automático en iOS */
    }

    .cp-login-modal-features {
        display: none;
    }

    .cp-lookup-search-bar {
        border-radius: .9rem;
        padding: .15rem .2rem .15rem .85rem;
    }

    .cp-lookup-search-bar input {
        padding: .7rem 0;
        font-size: 16px;
    }

    .cp-lookup-search-bar input::placeholder {
        font-size: .82rem;
        font-weight: 500;
    }

    .cp-lookup-client {
        flex-direction: column;
        align-items: stretch;
    }

    .cp-lookup-client-badge {
        align-self: flex-start;
    }

    .cp-lookup-panel--error {
        border-radius: .9rem;
    }

    .cp-lookup-action-btn {
        min-height: 2.85rem;
        font-size: .95rem;
        padding: .85rem .75rem;
    }
}

.cp-public-form .cp-field label,
.cp-login-modal-card .cp-field label {
    color: var(--portal-text-secondary);
}

@media (max-width: 640px) {
    .cp-public-cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cp-btn-cta {
        width: 100%;
    }
}

/* Reporte de pago — portal cliente */
.cp-rp-card {
    background: var(--portal-card);
    border: 1px solid var(--portal-border);
    border-radius: .85rem;
    overflow: hidden;
    max-width: 680px;
}

.cp-rp-card-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--portal-border);
    background: linear-gradient(180deg, var(--portal-surface-2) 0%, var(--portal-surface) 100%);
}

.cp-rp-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .55rem;
    background: color-mix(in srgb, var(--portal-primary) 12%, var(--portal-surface));
    color: var(--portal-primary);
    font-size: 1rem;
}

.cp-rp-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--portal-text);
}

.cp-rp-card-body {
    padding: .9rem 1rem 1rem;
}

.cp-rp-form {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.cp-rp-section,
.cp-rp-section-extra {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.cp-rp-field {
    display: flex;
    flex-direction: column;
    gap: .28rem;
    min-width: 0;
}

.cp-rp-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--portal-muted);
}

.cp-rp-optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.cp-rp-select,
.cp-rp-input:not(.iti__tel-input),
.cp-rp-textarea {
    width: 100%;
    border: 1px solid var(--portal-border);
    border-radius: .55rem;
    background-color: var(--portal-input-bg);
    color: var(--portal-text);
    font: inherit;
    font-size: .88rem;
    padding: .55rem .7rem;
    box-sizing: border-box;
    line-height: 1.25;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.cp-rp-select,
.cp-rp-input:not(.cp-rp-input--money):not(.iti__tel-input) {
    min-height: 2.5rem;
}

.cp-rp-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.15rem;
    background-color: var(--portal-input-bg);
    background-image: var(--portal-select-arrow);
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 14px 12px;
}

.cp-rp-select:focus {
    background-color: #ffffff;
    background-image: var(--portal-select-arrow);
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 14px 12px;
}

.cp-rp-input:focus:not(.iti__tel-input),
.cp-rp-textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--portal-primary) 45%, var(--portal-border));
    background-color: #ffffff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 14%, transparent);
}

.cp-rp-select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--portal-primary) 45%, var(--portal-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 14%, transparent);
}

.cp-rp-textarea {
    resize: vertical;
    min-height: 5rem;
}

.cp-rp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.cp-rp-field--half {
    min-width: 0;
}

.cp-rp-field--full {
    grid-column: span 2;
}

.cp-rp-paybox {
    border: 1px solid color-mix(in srgb, var(--portal-primary) 24%, var(--portal-border));
    border-radius: .65rem;
    background: color-mix(in srgb, var(--portal-primary) 5%, var(--portal-surface));
    padding: .2rem .4rem;
}

.cp-rp-paybox-head {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.cp-rp-paybox-head-left {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.cp-rp-paybox-main {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    min-width: 0;
    align-self: start;
}

.cp-rp-paybox-icon-wrap {
    width: 22px;
    height: 22px;
    border-radius: .35rem;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    background: #fff;
    flex-shrink: 0;
}

.cp-rp-paybox-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cp-rp-paybox-title {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--portal-primary);
    line-height: 1.1;
}

.cp-rp-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    border: 1px solid color-mix(in srgb, var(--portal-primary) 30%, var(--portal-border));
    background: #ffffff;
    color: var(--portal-primary);
    border-radius: .4rem;
    padding: .18rem .42rem;
    font-size: .64rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
    line-height: 1.1;
}

.cp-rp-copy-btn:hover {
    background: var(--portal-accent);
}

.cp-rp-paybox-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .38rem;
    align-items: start;
}

.cp-rp-paybox-body:has(.cp-rp-paybox-qr.is-empty) {
    grid-template-columns: minmax(0, 1fr) auto;
}

.cp-rp-paybox-grid {
    min-width: 0;
    display: grid;
    gap: .14rem;
    align-content: center;
}

.cp-rp-paybox-actions {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    padding-top: .05rem;
}

.cp-rp-paybox-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    flex: none;
    width: auto;
    min-width: 0;
    gap: .1rem;
    padding: .15rem;
    border-radius: .45rem;
    background: color-mix(in srgb, var(--portal-surface-2, #f8fafc) 88%, var(--portal-accent, #2563eb));
    border: 1px solid var(--portal-border, #e2e8f0);
}

.cp-rp-paybox-qr.is-empty {
    display: none;
}

.cp-rp-paybox-qr-media {
    position: relative;
    flex: 0 0 auto;
    width: 9.5rem;
    height: 9.5rem;
}

.cp-rp-paybox-qr-placeholder,
.cp-rp-paybox-qr-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: .35rem;
}

.cp-rp-paybox-qr-placeholder[hidden],
.cp-rp-paybox-qr-media img[hidden] {
    display: none !important;
}

.cp-rp-paybox-qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px dashed color-mix(in srgb, var(--portal-primary) 24%, var(--portal-border));
    color: var(--portal-muted);
}

.cp-rp-paybox-qr-placeholder i {
    font-size: 2rem;
    line-height: 1;
    opacity: .45;
    color: var(--portal-primary);
}

.cp-rp-paybox-qr.is-empty .cp-rp-paybox-qr-hint {
    display: none;
}

.cp-rp-paybox-qr-media img:not([hidden]) {
    display: block;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--portal-border, #e2e8f0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.cp-rp-paybox-qr-hint {
    display: block;
    margin: 0;
    font-size: .5rem;
    font-weight: 600;
    color: var(--portal-muted);
    text-align: center;
    line-height: 1.1;
    max-width: 9.5rem;
    flex-shrink: 0;
}

.cp-rp-paybox-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-size: .78rem;
    line-height: 1.15;
}

.cp-rp-paybox-item span {
    color: var(--portal-muted);
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.1;
}

.cp-rp-paybox-item strong {
    color: var(--portal-text);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.15;
}

.cp-rp-bank-picker {
    position: relative;
    width: 100%;
    min-width: 0;
}

.cp-rp-bank-picker-toggle {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .65rem;
    border: 1px solid var(--portal-border);
    border-radius: .55rem;
    background: var(--portal-input-bg);
    color: var(--portal-text);
    font: inherit;
    font-size: .88rem;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
}

.cp-rp-bank-picker-toggle img {
    width: 24px;
    height: 24px;
    border-radius: .35rem;
    object-fit: cover;
    flex-shrink: 0;
}

.cp-rp-bank-picker-toggle span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-rp-bank-picker-placeholder {
    width: 24px;
    height: 24px;
    border-radius: .35rem;
    background: #eef2f7;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .75rem;
}

.cp-rp-bank-picker-menu {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    margin-top: .25rem;
    max-height: 220px;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: .55rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    display: none;
}

.cp-rp-bank-picker-menu.is-open {
    display: block;
}

.cp-rp-bank-picker-search {
    position: sticky;
    top: 0;
    z-index: 1;
    border: 0;
    border-bottom: 1px solid var(--portal-border);
    border-radius: 0;
    background: #fff;
}

.cp-rp-bank-picker-options {
    max-height: 170px;
    overflow: auto;
}

.cp-rp-bank-option {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .65rem;
    text-align: left;
    color: var(--portal-text);
    font: inherit;
    font-size: .84rem;
    cursor: pointer;
}

.cp-rp-bank-option:hover,
.cp-rp-bank-option.is-active {
    background: var(--portal-accent);
}

.cp-rp-bank-option img {
    width: 24px;
    height: 24px;
    border-radius: .35rem;
    object-fit: cover;
    flex-shrink: 0;
}

.cp-rp-money-wrap {
    display: flex;
    align-items: stretch;
    min-height: 2.5rem;
    box-sizing: border-box;
    border: 1px solid var(--portal-border);
    border-radius: .65rem;
    overflow: hidden;
    background: var(--portal-surface-2);
}

.cp-rp-money-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 .75rem;
    background: #eef2ff;
    color: var(--portal-primary);
    font-size: .82rem;
    font-weight: 700;
    border-right: 1px solid var(--portal-border);
}

.cp-rp-input--money {
    border: none;
    border-radius: 0;
    background: transparent;
    flex: 1;
    min-height: 2.5rem;
    box-sizing: border-box;
}

.cp-rp-input--money:focus {
    box-shadow: none;
}

.cp-rp-money-wrap:focus-within {
    border-color: color-mix(in srgb, var(--portal-primary) 45%, var(--portal-border));
    background: #ffffff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 14%, transparent);
}

.cp-rp-bs-equiv {
    margin-top: .45rem;
    padding: .45rem .65rem;
    border-radius: .5rem;
    border: 1px solid color-mix(in srgb, var(--portal-primary) 25%, var(--portal-border));
    background: #ffffff;
    font-size: .82rem;
    color: var(--portal-muted);
}

.cp-rp-bs-equiv strong {
    color: var(--portal-primary);
    font-weight: 700;
}

.cp-rp-upload {
    display: block;
    cursor: pointer;
}

.cp-rp-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.cp-rp-upload-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 5.5rem;
    border: 2px dashed #cbd5e1;
    border-radius: .75rem;
    background: #f8fafc;
    color: var(--portal-muted);
    font-size: .88rem;
    transition: border-color .15s, background .15s, color .15s;
}

.cp-rp-upload:hover .cp-rp-upload-inner,
.cp-rp-upload:focus-within .cp-rp-upload-inner {
    border-color: color-mix(in srgb, var(--portal-primary) 40%, #cbd5e1);
    background: color-mix(in srgb, var(--portal-primary) 5%, var(--portal-surface));
    color: var(--portal-primary);
}

.cp-rp-upload-inner i {
    font-size: 1.35rem;
}

.cp-rp-actions {
    padding-top: .25rem;
}

.cp-rp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 100%;
    border: none;
    border-radius: .65rem;
    padding: .72rem 1rem;
    background: linear-gradient(135deg, var(--portal-primary, #2563eb) 0%, color-mix(in srgb, var(--portal-primary, #2563eb) 72%, #312e81) 100%);
    color: #ffffff;
    font: inherit;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--portal-primary) 28%, transparent);
}

.cp-rp-submit:hover {
    opacity: .95;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .cp-rp-grid {
        grid-template-columns: 1fr;
    }

    .cp-rp-paybox-body {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: .35rem;
        align-items: center;
    }

    .cp-rp-paybox-body:has(.cp-rp-paybox-qr.is-empty) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .cp-rp-paybox-qr {
        max-width: none;
        justify-self: end;
    }

    .cp-rp-paybox-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .cp-rp-form.is-method-picked .cp-rp-paybox-qr-media {
        width: 4.75rem;
        height: 4.75rem;
    }

    .cp-rp-form.is-method-picked .cp-rp-paybox-qr-hint {
        max-width: 4.75rem;
    }

    .cp-rp-card-body {
        padding: 1rem;
    }
}

/* —— Portal cliente: modo oscuro —— */
html[data-theme="dark"] .cp-shell .cp-sidebar-user-info span,
html[data-theme="dark"] .cp-shell .cp-nav-section {
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-shell.layout-light .cp-nav-item:hover {
    background: var(--portal-surface-2);
}

html[data-theme="dark"] .cp-shell .cp-sidebar-user {
    border-color: var(--portal-border);
}

html[data-theme="dark"] .cp-shell .cp-nav-item:hover {
    background: rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .cp-topbar h2,
html[data-theme="dark"] .cp-panel-header,
html[data-theme="dark"] .cp-traffic-header,
html[data-theme="dark"] .cp-traffic-live-item strong,
html[data-theme="dark"] .cp-dash-card-value,
html[data-theme="dark"] .cp-stat-value,
html[data-theme="dark"] .cp-data-table .col-total,
html[data-theme="dark"] .cp-table td,
html[data-theme="dark"] .cp-rp-paybox-item strong,
html[data-theme="dark"] .cp-panel strong,
html[data-theme="dark"] .cp-data-table strong {
    color: var(--portal-text);
}

html[data-theme="dark"] .cp-data-table thead th,
html[data-theme="dark"] .cp-table th {
    background: var(--portal-surface-2);
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-data-table tbody tr,
html[data-theme="dark"] .cp-table tbody tr {
    background: var(--portal-surface);
}

html[data-theme="dark"] .cp-data-table tbody tr:hover,
html[data-theme="dark"] .cp-table tbody tr:hover {
    background: var(--portal-surface-2);
}

html[data-theme="dark"] .cp-dash-invoice-row {
    border-bottom-color: var(--portal-border-soft);
}

html[data-theme="dark"] .cp-chip-cancelled {
    background: var(--portal-surface-3);
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-badge-cancelled {
    background: var(--portal-surface-3);
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-action-btn-view {
    background: color-mix(in srgb, var(--portal-primary) 14%, var(--portal-surface-2));
    color: var(--portal-primary);
    border-color: color-mix(in srgb, var(--portal-primary) 28%, var(--portal-border));
}

html[data-theme="dark"] .cp-action-btn-view:hover {
    background: color-mix(in srgb, var(--portal-primary) 22%, var(--portal-surface-2));
}

html[data-theme="dark"] .cp-modal-dialog,
html[data-theme="dark"] .cp-modal-body,
html[data-theme="dark"] .cp-modal-iframe,
html[data-theme="dark"] .cp-invoice-sheet,
html[data-theme="dark"] .cp-account-card,
html[data-theme="dark"] .cp-support-card,
html[data-theme="dark"] .cp-doc-card {
    background: var(--portal-surface);
    color: var(--portal-text-secondary);
}

html[data-theme="dark"] .cp-modal-header,
html[data-theme="dark"] .cp-rp-card-head {
    background: linear-gradient(135deg, var(--portal-surface-2), color-mix(in srgb, var(--portal-primary) 8%, var(--portal-surface-2)));
}

html[data-theme="dark"] .cp-modal-close:hover {
    background: var(--portal-surface-2);
}

html[data-theme="dark"] .cp-field input:not(.cp-login-body input),
html[data-theme="dark"] .cp-field select:not(.cp-login-body select),
html[data-theme="dark"] .cp-field textarea:not(.cp-login-body textarea),
html[data-theme="dark"] .cp-rp-input:not(.iti__tel-input),
html[data-theme="dark"] .cp-rp-textarea,
html[data-theme="dark"] .cp-rp-bank-picker-toggle,
html[data-theme="dark"] .cp-rp-bank-picker-menu,
html[data-theme="dark"] .cp-rp-bank-picker-option,
html[data-theme="dark"] .cp-rp-upload-box,
html[data-theme="dark"] .cp-rp-copy-btn,
html[data-theme="dark"] .cp-rp-paybox-icon-wrap {
    background-color: var(--portal-input-bg);
    color: var(--portal-text);
    border-color: var(--portal-border);
}

html[data-theme="dark"] .cp-rp-select {
    background-color: var(--portal-input-bg);
    background-image: var(--portal-select-arrow);
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 14px 12px;
    color: var(--portal-text);
    border-color: var(--portal-border);
}

html[data-theme="dark"] .cp-rp-select:focus {
    background-color: var(--portal-surface);
    background-image: var(--portal-select-arrow);
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 14px 12px;
}

html[data-theme="dark"] .cp-rp-input:focus:not(.iti__tel-input),
html[data-theme="dark"] .cp-rp-textarea:focus {
    background-color: var(--portal-surface);
}

html[data-theme="dark"] .cp-rp-select:focus,
html[data-theme="dark"] .cp-rp-input:focus:not(.iti__tel-input),
html[data-theme="dark"] .cp-rp-textarea:focus {
    outline: none;
}

html[data-theme="dark"] .cp-rp-bank-picker-placeholder {
    background: var(--portal-surface-3);
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-rp-bank-picker-option:hover,
html[data-theme="dark"] .cp-rp-bank-picker-option.is-active {
    background: var(--portal-surface-2);
}

html[data-theme="dark"] .cp-rp-modal-head-icon {
    background: color-mix(in srgb, var(--portal-primary) 12%, var(--portal-surface));
}

html[data-theme="dark"] .cp-topbar-user-menu {
    background: var(--portal-surface);
    border-color: var(--portal-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .cp-topbar-shell.topbar {
    background: var(--portal-topbar-bg, var(--portal-surface));
    border-bottom-color: var(--portal-border);
    box-shadow: none;
}

html[data-theme="dark"] .cp-topbar-shell .topbar-icon-btn,
html[data-theme="dark"] .cp-topbar-shell .topbar-locale-trigger,
html[data-theme="dark"] .cp-topbar-shell .cp-locale-trigger,
html[data-theme="dark"] .cp-topbar-shell .topbar-user-trigger {
    background: transparent;
    border: 0;
    color: var(--portal-text-secondary);
    box-shadow: none;
}

html[data-theme="dark"] .cp-topbar-shell .topbar-icon-btn:hover,
html[data-theme="dark"] .cp-topbar-shell .topbar-locale-trigger:hover,
html[data-theme="dark"] .cp-topbar-shell .cp-locale-trigger:hover,
html[data-theme="dark"] .cp-topbar-shell .topbar-user-trigger:hover {
    background: var(--portal-surface-2);
    color: var(--portal-primary);
}

html[data-theme="dark"] .cp-topbar-shell .topbar-user-name,
html[data-theme="dark"] .cp-topbar-company-name,
html[data-theme="dark"] .cp-topbar-shell .topbar-company-name {
    color: var(--portal-text);
}

html[data-theme="dark"] .cp-topbar-shell .topbar-user-role,
html[data-theme="dark"] .cp-topbar-shell .topbar-user-trigger .bi-chevron-down {
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-topbar-shell .topbar-actions,
html[data-theme="dark"] .cp-topbar-shell .topbar-user-dropdown {
    border-left-color: var(--portal-border);
}

html[data-theme="dark"] .cp-topbar-shell .topbar-user-avatar {
    background: #405189;
    border: 0;
    color: #fff;
}

html[data-theme="dark"] .cp-topbar-emblem,
html[data-theme="dark"] .cp-topbar-shell .brand-emblem {
    background: color-mix(in srgb, var(--portal-primary, #4557a3) 18%, var(--portal-surface-2, #2a2b35));
    box-shadow: inset 0 0 0 1px var(--portal-border);
    border: 0;
}

html[data-theme="dark"] .cp-topbar-shell .topbar-search {
    background: var(--portal-input-bg);
    color: var(--portal-text);
    border-color: var(--portal-border);
}

html[data-theme="dark"] .cp-topbar-shell .topbar-search-kbd {
    background: var(--portal-surface-2);
    border-color: var(--portal-border);
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-alert-success {
    background: color-mix(in srgb, #16a34a 14%, var(--portal-surface));
    color: #86efac;
    border-color: color-mix(in srgb, #16a34a 35%, var(--portal-border));
}

html[data-theme="dark"] .cp-alert-error {
    background: color-mix(in srgb, #dc2626 14%, var(--portal-surface));
    color: #fca5a5;
    border-color: color-mix(in srgb, #dc2626 35%, var(--portal-border));
}

html[data-theme="dark"] .cp-stat,
html[data-theme="dark"] .cp-panel,
html[data-theme="dark"] .cp-dash-card,
html[data-theme="dark"] .cp-rp-card,
html[data-theme="dark"] .cp-rp-paybox {
    box-shadow: none;
}

html[data-theme="dark"] .cp-pager a,
html[data-theme="dark"] .cp-pager span {
    background: var(--portal-surface);
    color: var(--portal-text);
    border-color: var(--portal-border);
}

/* —— Landing pública (/cliente): modo oscuro —— */
html[data-theme="dark"] .cp-public-body {
    background: var(--portal-bg);
}

html[data-theme="dark"] .cp-public-body.cp-skin-paces,
html[data-theme="dark"] body.cp-skin-paces.cp-public-body {
    background: #1b1c22 !important;
}

html[data-theme="dark"] .cp-public-header {
    background: rgba(17, 24, 39, .92);
    border-bottom-color: var(--portal-border);
}

html[data-theme="dark"] body.cp-skin-paces .cp-public-header {
    background: #1b1c22 !important;
    border-bottom-color: rgba(148, 163, 184, .12) !important;
}

html[data-theme="dark"] .cp-public-theme-toggle {
    background: var(--portal-surface-2);
    border-color: var(--portal-border);
    color: var(--portal-text-secondary);
    box-shadow: 0 2px 8px var(--portal-shadow);
}

html[data-theme="dark"] .cp-public-theme-toggle:hover {
    background: color-mix(in srgb, var(--portal-primary) 14%, var(--portal-surface-2));
    border-color: color-mix(in srgb, var(--portal-primary) 35%, var(--portal-border));
    color: var(--portal-primary);
}

html[data-theme="dark"] .cp-public-banners {
    background: var(--portal-surface);
}

html[data-theme="dark"] .cp-public-section-head h2,
html[data-theme="dark"] .cp-public-plan-name,
html[data-theme="dark"] .cp-public-footer-brand {
    color: var(--portal-text);
}

html[data-theme="dark"] .cp-public-plan-card {
    background: var(--portal-surface);
    border-color: var(--portal-border);
    box-shadow: 0 10px 24px var(--portal-shadow);
}

html[data-theme="dark"] .cp-public-plan-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .cp-public-plan-speed {
    color: var(--portal-text-secondary);
}

html[data-theme="dark"] .cp-public-plan-badge {
    background: color-mix(in srgb, var(--portal-primary) 16%, var(--portal-surface));
}

html[data-theme="dark"] .cp-public-section-alt {
    background: var(--portal-surface-2);
}

html[data-theme="dark"] .cp-public-panel,
html[data-theme="dark"] .cp-public-empty {
    background: var(--portal-surface);
    border-color: var(--portal-border);
    color: var(--portal-text-secondary);
}

html[data-theme="dark"] .cp-public-menu-btn {
    background: var(--portal-surface);
    border-color: var(--portal-border);
    color: var(--portal-text);
}

html[data-theme="dark"] .cp-public-nav {
    background: var(--portal-surface);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
}

/* En desktop el nav va dentro del header; en móvil el dropdown necesita fondo sólido */
@media (min-width: 993px) {
    html[data-theme="dark"] body.cp-skin-paces .cp-public-nav {
        background: transparent !important;
        box-shadow: none !important;
    }
}

html[data-theme="dark"] .cp-public-nav-cta {
    background: color-mix(in srgb, var(--portal-primary) 18%, var(--portal-surface));
}

html[data-theme="dark"] .cp-login-modal-dialog {
    background: transparent;
}

html[data-theme="dark"] .cp-login-modal-card,
html[data-theme="dark"] .cp-login-modal-card .cp-login-body {
    background: var(--portal-surface);
    color: var(--portal-text);
}

html[data-theme="dark"] .cp-login-modal-card .cp-login-header h1,
html[data-theme="dark"] .cp-login-modal-card .cp-login-header p {
    color: #fff;
}

html[data-theme="dark"] .cp-login-modal-card .cp-field label,
html[data-theme="dark"] .cp-login-modal-card .cp-field-hint,
html[data-theme="dark"] .cp-login-modal-card .cp-check,
html[data-theme="dark"] .cp-login-modal-features li {
    color: var(--portal-muted);
}

html[data-theme="dark"] .cp-login-modal-card .cp-login-body .cp-field input[type="text"],
html[data-theme="dark"] .cp-login-modal-card .cp-login-body .cp-field input[type="password"],
html[data-theme="dark"] .cp-login-modal-card .cp-login-body .cp-field input[type="email"] {
    background: var(--portal-input-bg);
    color: var(--portal-text);
    border-color: var(--portal-border);
}

html[data-theme="dark"] .cp-login-modal-close {
    background: rgba(15, 23, 42, .45);
    border-color: rgba(255, 255, 255, .24);
    color: #fff;
}

html[data-theme="dark"] .cp-login-modal-close:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .38);
    color: #fff;
}

html[data-theme="dark"] #cpRegisterModal .cp-register-form-actions {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--portal-surface, #111827) 0%, transparent) 0%,
        var(--portal-surface, #111827) 30%,
        var(--portal-surface, #111827) 100%
    ) !important;
}

html[data-theme="dark"] .cp-lookup-results,
html[data-theme="dark"] .cp-lookup-results .cp-public-result-head h3,
html[data-theme="dark"] .cp-lookup-results .cp-public-result-head p,
html[data-theme="dark"] .cp-lookup-results .cp-public-invoice-item {
    color: var(--portal-text-secondary);
}

html[data-theme="dark"] .cp-lookup-results .cp-public-invoice-item {
    background: var(--portal-surface-2);
    border-color: var(--portal-border);
}

html.theme-switching,
html.theme-switching * {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease !important;
}

.cp-landing--modern-light .cp-fd-hero {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.cp-landing--modern-light .cp-fd-hero-copy,
.cp-landing--modern-light .cp-fd-hero-copy h1,
.cp-landing--modern-light .cp-fd-hero-lead,
.cp-landing--modern-light .cp-fd-scroll-hint {
    color: #0f172a;
}

.cp-landing--modern-light .cp-fd-eyebrow {
    color: var(--portal-primary, #2563eb);
}

.cp-landing--modern-light .cp-fd-speed-card,
.cp-landing--modern-light .cp-fd-stat {
    background: rgba(255, 255, 255, .82);
    border-color: rgba(148, 163, 184, .22);
    color: #0f172a;
}

.cp-landing--hero-focus .cp-fd-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
}

.cp-landing--hero-focus .cp-fd-hero-copy {
    max-width: 42rem;
}

.cp-landing--hero-focus .cp-fd-hero-actions {
    justify-content: center;
}

.cp-landing--hero-focus .cp-fd-hero-showcase {
    width: 100%;
    max-width: 42rem;
    justify-content: center;
}

.cp-landing--hero-focus .cp-fd-hero-stats {
    justify-content: center;
}

/* Documentación pública */
.cp-docs-page {
    padding-bottom: 2rem;
}

.cp-docs-hero {
    padding: 2.5rem 0 1.75rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, .04) 0%, transparent 100%);
}

.cp-docs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--portal-primary, #2563eb);
    margin-bottom: .65rem;
}

.cp-docs-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    margin-bottom: .75rem;
    color: var(--portal-text, #0f172a);
}

.cp-docs-lead {
    max-width: 42rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--portal-text-secondary, #475569);
    margin: 0;
}

.cp-docs-youtube-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.1rem;
    padding: .65rem 1.15rem;
    border-radius: 999px;
    background: #ff0000;
    color: #fff !important;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(255, 0, 0, .22);
    transition: transform .15s ease, box-shadow .15s ease;
}

.cp-docs-youtube-btn:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 0, 0, .28);
}

.cp-docs-youtube-btn i {
    font-size: 1.15rem;
}

.cp-docs-video-channel {
    margin: .85rem 0 0;
    font-size: .88rem;
}

.cp-docs-video-channel a {
    color: var(--portal-primary, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.cp-docs-video-channel a:hover {
    text-decoration: underline;
}

.cp-docs-channel-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--portal-border, rgba(148, 163, 184, .22));
    background: var(--portal-surface, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.cp-docs-channel-icon {
    font-size: 2.5rem;
    color: #ff0000;
    margin-bottom: .5rem;
}

.cp-docs-channel-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .45rem;
}

.cp-docs-channel-card p {
    color: var(--portal-text-secondary, #64748b);
    margin-bottom: 1rem;
}

.cp-docs-channel-card .cp-docs-youtube-btn {
    margin-top: 0;
}

.cp-docs-section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--portal-text, #0f172a);
}

.cp-docs-video {
    margin-bottom: 2rem;
}

.cp-docs-video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 1rem;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}

.cp-docs-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cp-docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.cp-docs-card {
    border: 1px solid var(--portal-border, rgba(148, 163, 184, .28));
    border-radius: 1rem;
    background: var(--portal-surface, #fff);
    padding: 1.25rem 1.35rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.cp-docs-card-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .65rem;
}

.cp-docs-card-head i {
    font-size: 1.35rem;
    color: var(--portal-primary, #2563eb);
}

.cp-docs-card-head h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.cp-docs-card-intro {
    font-size: .92rem;
    color: var(--portal-text-secondary, #64748b);
    margin-bottom: .85rem;
}

.cp-docs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.cp-docs-list li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--portal-text, #334155);
}

.cp-docs-list li i {
    color: #22c55e;
    margin-top: .12rem;
    flex-shrink: 0;
}

.cp-docs-outline {
    margin-bottom: 2.5rem;
}

.cp-docs-outline-hint {
    font-size: .9rem;
    color: var(--portal-text-secondary, #64748b);
    margin: -.35rem 0 1.25rem;
}

.cp-docs-timeline {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.cp-docs-timeline-item {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: .85rem;
    border: 1px solid var(--portal-border, rgba(148, 163, 184, .22));
    background: var(--portal-surface-2, #f8fafc);
}

.cp-docs-time {
    font-size: .78rem;
    font-weight: 800;
    color: var(--portal-primary, #2563eb);
    letter-spacing: .02em;
}

.cp-docs-timeline-item strong {
    display: block;
    margin-bottom: .25rem;
    color: var(--portal-text, #0f172a);
}

.cp-docs-timeline-item p {
    margin: 0;
    font-size: .88rem;
    color: var(--portal-text-secondary, #64748b);
    line-height: 1.5;
}

.cp-docs-cta-box {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08) 0%, rgba(15, 23, 42, .04) 100%);
    border: 1px solid var(--portal-border, rgba(148, 163, 184, .22));
}

.cp-docs-cta-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .45rem;
}

.cp-docs-cta-box p {
    color: var(--portal-text-secondary, #64748b);
    margin-bottom: 1rem;
}

.cp-docs-cta-box .cp-btn + .cp-btn {
    margin-left: .5rem;
}

.cp-public-nav a.is-active {
    color: var(--portal-primary, #2563eb);
    font-weight: 700;
}

@media (max-width: 768px) {
    .cp-docs-grid {
        grid-template-columns: 1fr;
    }

    .cp-docs-timeline-item {
        grid-template-columns: 1fr;
        gap: .35rem;
    }

    .cp-docs-cta-box .cp-btn + .cp-btn {
        margin-left: 0;
        margin-top: .5rem;
    }
}


/* Portal language switcher */
.cp-locale {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.cp-locale-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
}
.cp-locale-trigger {
    overflow: hidden;
}
.cp-locale-menu {
    position: absolute;
    top: calc(100% + .45rem);
    right: 0;
    z-index: 80;
    min-width: 220px;
    padding: .55rem;
    border-radius: 14px;
    border: 1px solid var(--portal-border);
    background: var(--portal-surface);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}
.cp-locale-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .45rem .55rem .7rem;
    border-bottom: 1px solid var(--portal-border);
    margin-bottom: .35rem;
}
.cp-locale-head > i {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--portal-primary) 12%, var(--portal-surface));
    color: var(--portal-primary);
}
.cp-locale-head strong {
    display: block;
    font-size: .82rem;
    color: var(--portal-text);
}
.cp-locale-head span {
    display: block;
    font-size: .72rem;
    color: var(--portal-muted);
}
.cp-locale-list {
    display: grid;
    gap: .15rem;
}
.cp-locale-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .6rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--portal-text);
    font-size: .88rem;
    font-weight: 600;
}
.cp-locale-item:hover {
    background: color-mix(in srgb, var(--portal-primary) 10%, var(--portal-surface));
}
.cp-locale-item.is-active {
    background: color-mix(in srgb, var(--portal-primary) 14%, var(--portal-surface));
    color: var(--portal-primary);
}
.cp-locale-item > i {
    margin-left: auto;
    font-size: 1rem;
}
.cp-locale--public {
    margin-left: .35rem;
}
.cp-public-header-inner .cp-locale--public + .cp-public-menu-btn,
.cp-public-header-inner .cp-public-theme-toggle + .cp-locale--public {
    /* keep tools grouped on the right */
}

/* Reportar pago: cuentas como tarjetas y Mercado Pago */
.cp-rp-form .cp-rp-section[hidden],
.cp-rp-form .cp-rp-field[hidden] {
    display: none !important;
}
.cp-rp-step-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}
.cp-rp-step-row .cp-rp-step {
    margin-bottom: 0;
}
.cp-rp-change-method {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .7rem;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-primary) 12%, transparent);
    color: var(--portal-primary);
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cp-rp-change-method[hidden] {
    display: none !important;
}
.cp-rp-change-method:hover {
    background: color-mix(in srgb, var(--portal-primary) 20%, transparent);
}
.cp-rp-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: .5rem;
}
.cp-rp-tiles.is-picked,
.cp-rp-tiles[hidden] {
    display: none !important;
}
.cp-rp-picked {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    padding: .4rem .65rem;
    border-radius: .65rem;
    background: color-mix(in srgb, var(--portal-primary) 8%, var(--portal-surface));
    border: 1px solid color-mix(in srgb, var(--portal-primary) 22%, var(--portal-border));
}
.cp-rp-picked[hidden] {
    display: none !important;
}
.cp-rp-picked-icon {
    flex: none;
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .45rem;
    overflow: hidden;
    background: #fff;
    color: var(--portal-primary);
    font-size: .95rem;
}
.cp-rp-picked-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cp-rp-picked-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 700;
    color: var(--portal-text);
}
.cp-rp-form.is-method-picked {
    gap: .45rem;
}
.cp-rp-form.is-method-picked .cp-rp-section,
.cp-rp-form.is-method-picked .cp-rp-section-extra {
    gap: .45rem;
}
.cp-rp-form.is-method-picked .cp-rp-paybox {
    padding: .15rem .3rem;
}
.cp-rp-form.is-method-picked .cp-rp-paybox-qr-media {
    width: 5.25rem;
    height: 5.25rem;
}
.cp-rp-form.is-method-picked .cp-rp-paybox-qr-hint {
    max-width: 5.25rem;
    font-size: .48rem;
}
.cp-rp-form.is-method-picked .cp-rp-paybox-title {
    display: none;
}
.cp-rp-form.is-method-picked .cp-rp-paybox-head {
    display: none;
}
.cp-rp-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    padding: .7rem .3rem .55rem;
    border: 1.5px solid var(--portal-border);
    border-radius: .8rem;
    background: var(--portal-surface);
    color: var(--portal-text);
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.cp-rp-tile.is-hidden,
.cp-rp-tile[hidden] {
    display: none !important;
}
.cp-rp-tile:hover {
    border-color: color-mix(in srgb, var(--portal-primary) 45%, var(--portal-border));
}
.cp-rp-tile-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .6rem;
    overflow: hidden;
    font-size: 1.35rem;
    color: var(--portal-primary);
}
.cp-rp-tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cp-rp-tile-name {
    max-width: 100%;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cp-rp-tile.is-active {
    border-color: var(--portal-primary);
    background: color-mix(in srgb, var(--portal-primary) 8%, var(--portal-surface));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-primary) 18%, transparent);
}
.cp-rp-tile.is-active::after {
    content: "\F26A";
    font-family: bootstrap-icons;
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--portal-primary);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}
.cp-rp-tile--online {
    border-style: dashed;
    border-color: #7cd0f2;
}
.cp-rp-tile--online.is-active {
    border-style: solid;
    border-color: #009ee3;
    background: color-mix(in srgb, #009ee3 9%, var(--portal-surface));
    box-shadow: 0 0 0 3px rgba(0, 158, 227, .18);
}
.cp-rp-tile--online.is-active::after {
    background: #009ee3;
}
.cp-rp-tile-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 1px 5px;
    border-radius: 5px;
    background: #009ee3;
    color: #fff;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.cp-rp-tiles-hint {
    margin-top: .5rem;
    padding: .8rem;
    border: 1px dashed var(--portal-border);
    border-radius: .65rem;
    color: var(--portal-muted);
    font-size: .8rem;
    text-align: center;
}
.cp-rp-tiles-hint[hidden] {
    display: none;
}
.cp-rp-mp {
    display: grid;
    gap: .6rem;
    margin-top: .25rem;
}
.cp-rp-mp[hidden] {
    display: none;
}
.cp-rp-mp-info {
    padding: .75rem .85rem;
    border: 1px solid rgba(0, 158, 227, .35);
    border-radius: .7rem;
    background: color-mix(in srgb, #009ee3 9%, var(--portal-surface));
}
.cp-rp-mp-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .9rem;
    color: var(--portal-text);
}
.cp-rp-mp-info p {
    margin: .35rem 0 0;
    font-size: .8rem;
    color: var(--portal-text-secondary, var(--portal-muted));
}
.cp-mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: .6rem;
    background: #009ee3;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: filter .15s ease;
}
.cp-mp-btn:hover {
    filter: brightness(1.07);
}
.cp-mp-btn[hidden] {
    display: none;
}
.cp-mp-btn-logo {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    flex: 0 0 auto;
}
.cp-mp-btn--block {
    width: 100%;
    padding: .8rem 1rem;
    font-size: .9rem;
}
.cp-mp-btn--sm {
    position: absolute;
    right: .75rem;
    bottom: .7rem;
    padding: .4rem .7rem;
    font-size: .78rem;
}
.cp-lookup-invoice-card:has(.cp-mp-btn--sm) {
    position: relative;
    padding-right: 7.5rem;
}
.cp-lookup-mp {
    display: grid;
    gap: .4rem;
}
.cp-mp-hint {
    margin: 0;
    font-size: .76rem;
    color: var(--portal-muted, #64748b);
    text-align: center;
}
html[data-theme="dark"] .cp-rp-tile {
    background: #2a2b35;
    border-color: #3a3d4d;
    color: #f1f5f9;
}
html[data-theme="dark"] .cp-rp-tile.is-active {
    background: color-mix(in srgb, var(--portal-primary) 22%, #2a2b35);
    border-color: var(--portal-primary);
}
html[data-theme="dark"] .cp-rp-tile--online {
    border-color: rgba(0, 158, 227, .55);
}
html[data-theme="dark"] .cp-rp-tile--online.is-active {
    background: rgba(0, 158, 227, .18);
    border-color: #009ee3;
}
html[data-theme="dark"] .cp-rp-tiles-hint {
    border-color: #3a3d4d;
    color: #94a3b8;
}
html[data-theme="dark"] .cp-rp-mp-info {
    background: rgba(0, 158, 227, .12);
}
html[data-theme="dark"] .cp-rp-mp-head {
    color: #f1f5f9;
}
html[data-theme="dark"] .cp-rp-mp-info p {
    color: #cbd5e1;
}
