* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #fff;
    background: var(--bg-body, #1a0a2e);
}

/* ===== App layout unificado ===== */
.app-layout {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    backdrop-filter: blur(12px);
}

.site-header .site-brand {
    grid-column: 2;
    width: auto;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.site-name {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.55rem);
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1.15;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

@keyframes site-name-rainbow {
    0% { color: #e50914; }
    10% { color: #113ccf; }
    20% { color: #00a8e1; }
    30% { color: #a855f7; }
    40% { color: #ec4899; }
    50% { color: #f59e0b; }
    60% { color: #10b981; }
    70% { color: #ff6b00; }
    80% { color: #fbbf24; }
    90% { color: #f472b6; }
    100% { color: #e50914; }
}

.site-name-char {
    display: inline-block;
    color: #e50914;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
    animation: site-name-rainbow 5s linear infinite;
    animation-delay: calc(var(--char-index) * -0.25s);
}

@media (prefers-reduced-motion: reduce) {
    .site-name-char {
        animation: none;
    }

    .site-name-char:nth-child(10n+1) { color: #e50914; }
    .site-name-char:nth-child(10n+2) { color: #113ccf; }
    .site-name-char:nth-child(10n+3) { color: #00a8e1; }
    .site-name-char:nth-child(10n+4) { color: #a855f7; }
    .site-name-char:nth-child(10n+5) { color: #ec4899; }
    .site-name-char:nth-child(10n+6) { color: #f59e0b; }
    .site-name-char:nth-child(10n+7) { color: #10b981; }
    .site-name-char:nth-child(10n+8) { color: #ff6b00; }
    .site-name-char:nth-child(10n+9) { color: #fbbf24; }
    .site-name-char:nth-child(10n+10) { color: #f472b6; }
}

.auth-brand .site-name {
    font-size: clamp(1.15rem, 3vw, 1.85rem);
}

.auth-brand .site-brand {
    gap: 0.85rem;
}

.site-footer .site-name {
    font-size: clamp(0.95rem, 2vw, 1.35rem);
}

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding: 1.75rem 1.5rem 2rem;
    border-top: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    backdrop-filter: blur(12px);
}

.site-footer .site-brand {
    width: 100%;
}

.site-logo {
    height: 72px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.site-footer .site-logo {
    height: clamp(64px, 12vw, 96px);
    max-width: min(90vw, 260px);
}

.auth-brand .site-logo {
    height: clamp(120px, 22vw, 180px);
    max-width: min(90vw, 320px);
}

.header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.user-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    padding-right: 0.5rem;
}

.top-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.45);
    padding: 0.45rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.top-link:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.2);
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.9);
}

.main-menu {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--menu-bg, rgba(15, 5, 30, 0.88));
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.2);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 120px;
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.3);
    background: var(--card-bg, rgba(0, 0, 0, 0.35));
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
}

.menu-item:hover,
.menu-item.active {
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.85);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    transform: translateY(-2px);
}

.menu-item.active {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.18);
}

.menu-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.menu-icon-telegram svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: #38bdf8;
}

.menu-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: center;
}

.page-main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.content-panel {
    background: var(--panel-bg, rgba(20, 5, 35, 0.75));
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.page-section-title {
    text-align: center;
    color: var(--title-color, #f9a8d4);
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.panel-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.card-title {
    color: var(--heading-color, #f472b6);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-align: center;
}

.panel-card {
    background: var(--card-bg, rgba(0, 0, 0, 0.35));
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.2);
    border-radius: 14px;
    padding: 1.75rem;
}

.service-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.service-buttons button {
    padding: 0.85rem;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 115px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
}

.service-buttons button:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.85);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb, 236, 72, 153), 0.25);
}

.service-buttons button.selected {
    border: 2px solid rgba(var(--accent-rgb, 236, 72, 153), 0.9);
    box-shadow: 0 0 24px rgba(var(--accent-rgb, 236, 72, 153), 0.35);
}

.service-icon { font-size: 1.5rem; }

.service-name {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-netflix.selected { background: rgba(229, 9, 20, 0.5); }
.button-disney.selected { background: rgba(17, 60, 207, 0.5); }
.button-amazon.selected { background: rgba(0, 168, 225, 0.5); }
.button-max.selected { background: rgba(139, 92, 246, 0.5); }
.button-paramount.selected { background: rgba(0, 102, 204, 0.5); }
.button-universal.selected { background: rgba(247, 147, 30, 0.5); }
.button-chrunchiroll.selected { background: rgba(249, 115, 22, 0.5); }
.button-appletv.selected { background: rgba(45, 45, 45, 0.7); }

.form-container {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 520px;
    margin: 2rem auto 0;
    padding: 0;
    background: rgba(15, 5, 30, 0.85);
    border-radius: 16px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.form-container.is-visible {
    display: flex;
    animation: slideUp 0.35s ease;
}

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

.form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--accent-2-rgb, 168, 85, 247), 0.25), rgba(var(--accent-rgb, 236, 72, 153), 0.2));
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
}

.form-service-badge {
    font-size: 2rem;
    line-height: 1;
}

#serviceTitle {
    font-size: 1.25rem;
    margin: 0;
    text-align: center;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
}

label {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
}

input, select, textarea {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    border-radius: 10px;
    font-size: 0.95rem;
    color: #fff;
    width: 100%;
}

textarea {
    min-height: 110px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.45;
}

.field-hint {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.correos-cell {
    max-width: 220px;
    font-size: 0.82rem;
    word-break: break-word;
}

input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.4); }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.85);
    box-shadow: 0 0 12px rgba(var(--accent-rgb, 236, 72, 153), 0.2);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 1em;
    padding-right: 42px;
}

.search-button {
    background: linear-gradient(135deg, var(--btn-from, #7c3aed), var(--btn-to, #db2777));
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.search-button:hover {
    background: linear-gradient(135deg, rgba(var(--accent-2-rgb, 168, 85, 247), 0.6), rgba(var(--accent-rgb, 236, 72, 153), 0.6));
    box-shadow: 0 4px 20px rgba(var(--accent-rgb, 236, 72, 153), 0.35);
}

.resultado {
    display: none;
    margin: 0 1.5rem 1.5rem;
    padding: 1rem;
    background: var(--card-bg, rgba(0, 0, 0, 0.35));
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    word-break: break-word;
}

.resultado.has-content {
    display: flex;
}

.resultado-texto { text-align: center; color: #fff; }

.copy-button {
    background: transparent;
    color: var(--heading-color, #f472b6);
    padding: 0.55rem 1.1rem;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.5);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.copy-button:hover { background: rgba(var(--accent-rgb, 236, 72, 153), 0.15); }

.copy-success, .copy-error {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 1000;
}

.copy-success {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-success.show { opacity: 1; }

.copy-error {
    background: rgba(255, 0, 0, 0.2);
    color: #ffb8b8;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* ===== Auth pages ===== */
.auth-page-wrap {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem 0;
    gap: 2rem;
}

.auth-page-wrap .auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}


.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    width: 100%;
    padding: 2rem;
    background: var(--panel-bg, rgba(20, 5, 35, 0.9));
    border-radius: 16px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.auth-card h2, .section-title {
    text-align: center;
    color: var(--heading-color, #f472b6);
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: 500;
}

.auth-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-submit { width: 100%; }

.auth-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-links a {
    color: var(--heading-color, #f472b6);
    text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

.flash {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    text-align: center;
}

.flash-success {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.15);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.4);
    color: #fbcfe8;
}

.flash-error {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.4);
    color: #ffb8b8;
}

/* ===== Admin ===== */
.admin-layout {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-top: 0.5rem;
}

.admin-form-card {
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.45);
    box-shadow: 0 0 24px rgba(var(--accent-rgb, 236, 72, 153), 0.15);
}

.card-help {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    margin: -0.5rem 0 1.25rem;
}

.admin-client-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-client-form .auth-submit {
    max-width: 280px;
    margin: 0.5rem auto 0;
}

.form-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.form-actions-row .auth-submit {
    margin: 0;
    width: auto;
    min-width: 180px;
}

.form-actions-row .cancel-link {
    margin-left: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.8fr);
    gap: 2rem;
    margin-top: 0.5rem;
}

.admin-list-card {
    padding: 1.5rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.list-header .card-title {
    margin-bottom: 0;
    text-align: left;
}

.client-count {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.15);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

/* ===== Clientes admin — toolbar y tabla amplia ===== */
.clientes-toolbar {
    margin-bottom: 1.75rem;
    padding: 1.75rem 2rem;
    border-radius: 18px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    background: linear-gradient(
        145deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(var(--accent-rgb, 236, 72, 153), 0.12) 100%
    );
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.clientes-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.2);
}

.clientes-toolbar-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.clientes-toolbar-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb, 236, 72, 153), 0.5));
}

.clientes-toolbar-label {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.clientes-toolbar-count {
    margin: 0.15rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--title-color, #f9a8d4);
}

.clientes-new-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.35rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--btn-from, #7c3aed), var(--btn-to, #db2777));
    box-shadow: 0 8px 24px rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clientes-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(var(--accent-rgb, 236, 72, 153), 0.45);
}

.clientes-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr) auto;
    gap: 1.25rem 1.5rem;
    align-items: end;
}

.filter-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.filter-field-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.filter-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.4);
    color: #fff;
}

.filter-control:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.85);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 236, 72, 153), 0.2);
}

.filter-field-action {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.filter-field-spacer {
    display: block;
    height: 1.45rem;
}

.filter-clear-btn {
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.filter-clear-btn:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.2);
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.5);
}

.clientes-table-card {
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
}

.clientes-empty-card {
    padding: 3rem 2rem;
    text-align: center;
}

.clientes-table-card .list-header {
    padding: 1rem 1.25rem 0;
}

.clientes-filters {
    display: none;
}

.filter-empty {
    padding: 2rem 2rem 2.5rem;
    margin: 0;
}

.table-scroll {
    overflow-x: auto;
    max-height: none;
    overflow-y: visible;
}

.clients-table-spacious th {
    padding: 1.1rem 1.35rem;
    font-size: 0.8rem;
}

.clients-table-spacious td {
    padding: 1.15rem 1.35rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.clients-table .col-cuentas {
    min-width: 280px;
    width: 35%;
}

.client-name-cell strong {
    font-size: 1rem;
    color: #fff;
}

.cedula-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.15);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    color: #fbcfe8;
}

.email-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 200px;
}

.email-chip {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    line-height: 1.3;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.45);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.no-data {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    font-style: italic;
}

.action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.table-btn-accent {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.3);
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.75);
    color: #fff;
    font-weight: 600;
}

.table-btn-accent:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.45);
}

.assign-cuentas-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--btn-from, #7c3aed), var(--btn-to, #db2777));
    box-shadow: 0 4px 14px rgba(var(--accent-rgb, 236, 72, 153), 0.35);
}

.assign-cuentas-link:hover {
    opacity: 0.92;
}

.cuentas-card {
    padding: 1.75rem 2rem;
}

.cuentas-client-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
}

.cuentas-client-header-compact {
    margin-bottom: 1.25rem;
}

.cuentas-client-icon {
    font-size: 2rem;
    line-height: 1;
}

.cuentas-client-name {
    margin: 0;
    font-size: 1.2rem;
    color: var(--title-color, #f9a8d4);
}

.cuentas-client-meta {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
}

.cuentas-section-title {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cuentas-current {
    margin-bottom: 1.75rem;
}

.cuentas-empty-msg {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}

.email-chips-lg .email-chip {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.email-chips-preview {
    margin-bottom: 0.75rem;
}

.link-add-cuentas {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.88rem;
    color: #fbcfe8;
    text-decoration: underline;
}

.cuentas-form textarea {
    min-height: 140px;
}

/* ===== Hub Cuentas (menu admin) ===== */
.cuentas-hub {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cuentas-hub-picker {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.3fr);
    gap: 1.25rem 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 18px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.35), rgba(var(--accent-rgb, 236, 72, 153), 0.1));
}

.filter-field-grow {
    flex: 1;
}

.cuentas-hub-panel {
    padding: 1.75rem 2rem 2rem;
    border-radius: 18px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.3);
    background: rgba(0, 0, 0, 0.25);
}

.cuentas-hub-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.cuentas-hub-name {
    margin: 0;
    font-size: 1.35rem;
    color: var(--title-color, #f9a8d4);
}

.cuentas-hub-meta {
    margin: 0.3rem 0 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.cuentas-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--btn-from, #7c3aed), var(--btn-to, #db2777));
    box-shadow: 0 6px 20px rgba(var(--accent-rgb, 236, 72, 153), 0.35);
}

.cuentas-count-badge-sm {
    display: inline-flex;
    min-width: 1.75rem;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    margin-right: 0.35rem;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.35);
}

.cuentas-count-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #fbcfe8;
    font-weight: 600;
    font-size: 0.9rem;
}

.cuentas-count-link:hover {
    color: #fff;
}

.cuentas-list-box {
    margin-bottom: 1.5rem;
}

.cuentas-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    background: rgba(0, 0, 0, 0.35);
}

.cuentas-list-item {
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.12);
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    word-break: break-all;
}

.cuentas-list-item:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.cuentas-list-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.cuentas-list-filtered {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.cuentas-hub-add textarea {
    min-height: 130px;
    margin-top: 0.5rem;
}

.cuentas-hub-submit {
    margin-top: 1rem;
    max-width: 320px;
}

.cuentas-hub-placeholder {
    text-align: center;
    padding: 3.5rem 2rem;
    border-radius: 18px;
    border: 1px dashed rgba(var(--accent-rgb, 236, 72, 153), 0.4);
    background: rgba(0, 0, 0, 0.2);
}

.cuentas-placeholder-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

/* Email picker cliente (muchas cuentas) */
.email-picker {
    position: relative;
}

.email-picker-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0.35rem 0;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.45);
    background: rgba(0, 0, 0, 0.75);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.email-picker-item {
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.15);
}

.email-picker-item:hover,
.email-picker-item.selected {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    color: #fff;
}

.email-picker-empty {
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .cuentas-hub-picker {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .cuentas-hub-panel {
        padding: 1.25rem;
    }
}

.correos-cell {
    max-width: none;
    font-size: inherit;
}

@media (max-width: 900px) {
    .clientes-toolbar {
        padding: 1.35rem 1.25rem;
    }

    .clientes-filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-field-spacer {
        display: none;
    }

    .filter-clear-btn {
        width: 100%;
    }

    .clientes-toolbar-top {
        flex-direction: column;
        align-items: stretch;
    }

    .clientes-new-btn {
        justify-content: center;
    }
}

.table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.4);
    border-radius: 999px;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.clients-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.clients-table th {
    text-align: left;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.45);
    color: var(--title-color, #f9a8d4);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    white-space: nowrap;
}

.clients-table td {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.12);
    vertical-align: middle;
}

.clients-table tbody tr:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.08);
}

.clients-table .col-actions {
    white-space: nowrap;
    text-align: right;
}

.table-btn {
    background: rgba(var(--accent-2-rgb, 168, 85, 247), 0.2);
    color: #fff;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.45);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.35rem;
}

a.table-btn {
    display: inline-block;
    text-decoration: none;
    line-height: 1.4;
    vertical-align: middle;
}

.table-btn:first-child {
    margin-left: 0;
}

.table-btn:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    border-color: rgba(var(--accent-rgb, 236, 72, 153), 0.8);
}

.table-btn.danger {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 120, 120, 0.45);
    color: #ffb4b4;
}

.table-btn.danger:hover {
    background: rgba(255, 80, 80, 0.25);
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
}

.badge-active {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    color: #fbcfe8;
}

.badge-pending {
    background: rgba(255, 165, 0, 0.2);
    color: #ffd699;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inline-form { display: inline; }

.small-btn {
    background: transparent;
    color: var(--heading-color, #f472b6);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.5);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    cursor: pointer;
}

.small-btn:hover { background: rgba(var(--accent-rgb, 236, 72, 153), 0.15); }

.small-btn.danger {
    color: #ff8a8a;
    border-color: rgba(255, 100, 100, 0.5);
}

.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    padding: 2rem 1rem;
    font-size: 0.95rem;
}

.account-panel {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    background: rgba(0, 0, 0, 0.2);
}

.account-panel-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--heading-color, #f472b6);
}

.account-panel-text {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .site-footer .site-logo {
        height: 56px;
        max-width: 180px;
    }

    .site-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem 1rem 1.25rem;
    }

    .site-header .site-brand {
        grid-column: auto;
        width: 100%;
    }

    .site-header .site-name {
        font-size: 0.95rem;
    }

    .site-logo {
        height: 56px;
        max-width: 160px;
    }

    .header-actions {
        grid-column: auto;
        justify-self: center;
        margin-top: 0.5rem;
    }

    .main-menu {
        gap: 0.6rem;
        padding: 0.85rem;
    }

    .menu-item {
        min-width: 100px;
        padding: 0.7rem 0.8rem;
    }

    .page-main {
        padding: 1.25rem 1rem 2rem;
    }

    .content-panel {
        padding: 1.25rem;
    }

    .clients-table th,
    .clients-table td {
        padding: 0.65rem 0.75rem;
        font-size: 0.82rem;
    }

    .table-scroll {
        max-height: none;
    }

    .admin-client-form .form-row {
        grid-template-columns: 1fr;
    }

    .admin-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-buttons button {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .menu-label { font-size: 0.65rem; }
    .menu-item { min-width: 85px; }
    .service-buttons button { width: 90px; padding: 0.65rem; }
}

/* ===== Ver cuentas — pantalla completa ===== */
body.cuentas-fullscreen {
    overflow-x: hidden;
}

.app-layout-cuentas {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-main-cuentas {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem 2rem;
    max-width: none;
}

.cuentas-fullscreen-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.cuentas-full-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cuentas-full-title {
    margin-bottom: 0.25rem;
}

.cuentas-full-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr) auto;
    gap: 1.25rem 1.5rem;
    align-items: end;
    padding: 1.5rem 1.75rem;
    border-radius: 18px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    background: linear-gradient(
        145deg,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(var(--accent-rgb, 236, 72, 153), 0.12) 100%
    );
}

.filter-field-grow {
    min-width: 0;
}

.cuentas-full-stat {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.15rem;
}

.cuentas-full-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 3rem 2rem;
    border-radius: 18px;
    border: 1px dashed rgba(var(--accent-rgb, 236, 72, 153), 0.35);
    background: rgba(0, 0, 0, 0.25);
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
}

.cuentas-full-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cuentas-vendedor-bar {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.12);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.25);
}

.cuentas-table-panel {
    flex: 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.3);
    background: rgba(0, 0, 0, 0.35);
}

.cuentas-email-table {
    margin: 0;
}

.cuentas-email-table .col-num {
    width: 4rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-variant-numeric: tabular-nums;
}

.cuentas-email-table tbody tr:nth-child(even) {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.06);
}

.cuentas-email-table tbody tr:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.14);
}

.cuentas-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.cuentas-page-btn {
    padding: 0.65rem 1.15rem;
    border-radius: 10px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.45);
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.15);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cuentas-page-btn:hover:not(:disabled) {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.3);
}

.cuentas-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cuentas-page-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.cuentas-full-add {
    padding: 1.5rem 1.75rem;
    border-radius: 18px;
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.cuentas-full-add label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-weight: 600;
}

.cuentas-full-add textarea {
    width: 100%;
    margin-bottom: 0.75rem;
}

/* Botón Ver cuentas en Clientes */
.clientes-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.clientes-ver-cuentas-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.35rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--title-color, #f9a8d4);
    border: 1px solid rgba(var(--accent-rgb, 236, 72, 153), 0.55);
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.12);
    transition: background 0.2s ease, transform 0.2s ease;
}

.clientes-ver-cuentas-btn:hover {
    background: rgba(var(--accent-rgb, 236, 72, 153), 0.25);
    transform: translateY(-1px);
}

.clients-table-flat {
    overflow: visible;
}

.clientes-filter-simple {
    grid-template-columns: minmax(220px, 1fr) minmax(240px, 1.2fr) auto;
}

@media (max-width: 900px) {
    .cuentas-full-toolbar {
        grid-template-columns: 1fr;
    }

    .cuentas-full-header {
        flex-direction: column;
    }

    .clientes-toolbar-actions {
        width: 100%;
    }

    .clientes-ver-cuentas-btn,
    .clientes-new-btn {
        flex: 1;
        justify-content: center;
    }
}
