/* ==========================================================================
   EL TÍO PLEX — Base visual estilo app de iPhone
   Tokens + componentes compartidos (Inicio) y reestilo de Clientes.
   Se carga DESPUÉS de los estilos propios de cada página: solo cambia la
   apariencia. No depende de ningún cambio en la lógica ni en los datos.
   ========================================================================== */

:root {
    --etp-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --etp-accent: #FF9F0A;          /* dorado del logo */
    --etp-accent-text: #FF9F0A;     /* acento usado como texto */
    --etp-accent-ink: #000000;      /* texto sobre acento */
    --etp-accent-soft: rgba(255, 159, 10, .16);

    --etp-bg: #000000;
    --etp-surface: #1C1C1E;
    --etp-surface2: #2C2C2E;
    --etp-surface3: #3A3A3C;
    --etp-fill: rgba(118, 118, 128, .24);
    --etp-sep: rgba(84, 84, 88, .65);
    --etp-label: #FFFFFF;
    --etp-label2: #AEAEB2;
    --etp-label3: #8E8E93;
    --etp-bar: rgba(22, 22, 24, .86);

    --etp-green: #30D158;
    --etp-yellow: #FFD60A;
    --etp-orange: #FF8A3D;
    --etp-red: #FF453A;
    --etp-red-text: #FF6961;
    --etp-blue: #0A84FF;
    --etp-purple: #BF5AF2;

    --etp-radius: 16px;
    --etp-radius-sm: 12px;
    --etp-sat: env(safe-area-inset-top, 0px);
    --etp-sab: env(safe-area-inset-bottom, 0px);
    --etp-tab-h: 52px;
}

/* Dentro del visor de Inicio (iframe) la barra de estado ya la cubre Inicio */
html.etp-in-frame { --etp-sat: 0px; }

/* ==========================================================================
   1. COMPONENTES COMPARTIDOS (prefijo etp-)
   ========================================================================== */
.etp-body {
    margin: 0;
    background: var(--etp-bg);
    color: var(--etp-label);
    font-family: var(--etp-font);
    font-size: 17px;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}
.etp-body *, .etp-body *::before, .etp-body *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.etp-body button, .etp-body input, .etp-body select, .etp-body textarea { font-family: inherit; }
.etp-body a { color: inherit; text-decoration: none; }

.etp-page {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(var(--etp-sat) + 8px) 16px calc(var(--etp-tab-h) + var(--etp-sab) + 28px);
}

.etp-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.etp-topbar-logo { height: 64px; width: auto; display: block; margin: -8px 0 -8px -10px; }
.etp-avatar-btn {
    width: 44px; height: 44px; padding: 0; border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; margin-right: -5px;
}
.etp-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--etp-surface2); color: var(--etp-label);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; letter-spacing: .02em;
}

.etp-large-title { margin: 6px 0 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .011em; }
.etp-subtitle { margin: 2px 0 0; font-size: 15px; line-height: 20px; color: var(--etp-label2); }

.etp-card { background: var(--etp-surface); border-radius: var(--etp-radius); }

/* Aviso principal (clientes que vencen hoy) */
.etp-alert {
    margin-top: 16px; width: 100%; border: none; cursor: pointer; text-align: left; color: inherit;
    display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; min-height: 68px;
    background: var(--etp-surface); border-radius: var(--etp-radius); transition: background .15s;
}
.etp-alert:active { background: var(--etp-surface2); }
.etp-alert-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; font-size: 18px;
    display: flex; align-items: center; justify-content: center; background: var(--etp-accent); color: var(--etp-accent-ink);
}
.etp-alert.is-ok .etp-alert-icon { background: var(--etp-green); }
.etp-alert-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.etp-alert-title { font-size: 17px; line-height: 22px; font-weight: 600; }
.etp-alert-sub { font-size: 14px; line-height: 19px; color: var(--etp-label2); }
.etp-chevron { color: #636366; font-size: 13px; flex-shrink: 0; }

/* Cifras */
.etp-stats { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.etp-stat { padding: 14px 14px 12px; background: var(--etp-surface); border-radius: var(--etp-radius); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.etp-stat-label { font-size: 13px; line-height: 18px; color: var(--etp-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-stat-value { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.etp-stat-value.is-warn { color: var(--etp-yellow); }
.etp-stat-value.is-bad { color: var(--etp-red-text); }

.etp-section-label {
    margin: 26px 0 8px 16px; font-size: 13px; line-height: 18px; font-weight: 400;
    letter-spacing: .02em; text-transform: uppercase; color: var(--etp-label3);
}

/* Lista agrupada */
.etp-list { background: var(--etp-surface); border-radius: var(--etp-radius); overflow: hidden; }
.etp-row {
    position: relative; width: 100%; border: none; background: none; color: inherit; cursor: pointer; text-align: left;
    display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 14px; transition: background .15s;
}
.etp-row:active { background: var(--etp-surface2); }
.etp-row + .etp-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--etp-sep); transform: scaleY(.5); }
.etp-row-icon {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; font-size: 15px;
    display: flex; align-items: center; justify-content: center; background: var(--etp-row-color, var(--etp-accent)); color: #fff;
}
.etp-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.etp-row-title { font-size: 17px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-row-sub { font-size: 13px; line-height: 18px; color: var(--etp-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-row-meta { font-size: 15px; color: var(--etp-label3); flex-shrink: 0; }
.etp-row.is-danger .etp-row-title { color: var(--etp-red-text); }
.etp-row.is-plain .etp-row-icon { background: none; color: var(--etp-label2); }

.etp-empty { padding: 44px 20px; text-align: center; color: var(--etp-label2); font-size: 15px; line-height: 21px; }

/* Barra de pestañas */
.etp-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: flex; align-items: stretch; padding: 4px 8px var(--etp-sab);
    height: calc(var(--etp-tab-h) + var(--etp-sab));
    background: var(--etp-bar); border-top: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-tab {
    flex: 1; min-width: 0; border: none; background: none; cursor: pointer; padding: 0; color: var(--etp-label3);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10px; line-height: 12px; font-weight: 500;
}
.etp-tab i { font-size: 21px; height: 24px; display: flex; align-items: center; }
.etp-tab.is-active { color: var(--etp-accent-text); font-weight: 600; }
.etp-tab:active { opacity: .6; }
.etp-tabbar-brand, .etp-tabbar-spacer { display: none; }

/* Hoja inferior */
.etp-backdrop { position: fixed; inset: 0; z-index: 1900; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.etp-backdrop.is-open { opacity: 1; pointer-events: auto; }
.etp-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1950; max-height: 88vh; overflow-y: auto;
    padding: 8px 16px calc(var(--etp-sab) + 20px); background: #151517; border-radius: 22px 22px 0 0;
    transform: translateY(105%); transition: transform .32s cubic-bezier(.32, .72, 0, 1); visibility: hidden;
}
.etp-sheet.is-open { transform: translateY(0); visibility: visible; }
.etp-sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--etp-surface3); margin: 0 auto 14px; }
.etp-sheet-user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; }
.etp-sheet-user .etp-avatar { width: 48px; height: 48px; font-size: 17px; }
.etp-sheet-name { font-size: 20px; line-height: 25px; font-weight: 600; }
.etp-sheet-role { font-size: 14px; line-height: 19px; color: var(--etp-label2); }
.etp-sheet .etp-list + .etp-list { margin-top: 16px; }

/* Visor a pantalla completa (módulos que se abren integrados) */
.etp-viewer {
    position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; background: var(--etp-bg);
    transform: translateX(100%); transition: transform .34s cubic-bezier(.32, .72, 0, 1); visibility: hidden;
}
.etp-viewer.active { transform: translateX(0); visibility: visible; }
.etp-navbar {
    flex-shrink: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: var(--etp-sat) 8px 0; height: calc(44px + var(--etp-sat));
    background: var(--etp-bar); border-bottom: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-navbar-back {
    justify-self: start; height: 44px; padding: 0 8px 0 2px; border: none; background: none; cursor: pointer;
    display: flex; align-items: center; gap: 4px; color: var(--etp-accent-text); font-size: 17px;
}
.etp-navbar-back i { font-size: 20px; }
.etp-navbar-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.etp-viewer-frame { flex: 1; width: 100%; border: none; background: var(--etp-bg); }

/* Escritorio: la barra de pestañas pasa a barra lateral */
@media (min-width: 900px) {
    .etp-body.has-sidebar { padding-left: 232px; }
    .etp-tabbar {
        top: 0; right: auto; width: 232px; height: auto; flex-direction: column; align-items: stretch; gap: 2px;
        padding: 18px 12px 16px; border-top: none; border-right: 1px solid rgba(84, 84, 88, .4); background: #0B0B0C;
    }
    .etp-tabbar-brand { display: block; padding: 0 6px 14px; }
    .etp-tabbar-brand img { height: 64px; width: auto; display: block; }
    .etp-tabbar-spacer { display: block; flex: 1; }
    .etp-tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; font-size: 15px; line-height: 20px; }
    .etp-tab i { font-size: 16px; width: 22px; justify-content: center; }
    .etp-tab:hover { background: var(--etp-surface); color: var(--etp-label); }
    .etp-tab.is-active { background: var(--etp-accent-soft); }
    .etp-page { max-width: 1040px; padding: 28px 32px 48px; }
    .etp-topbar-logo { display: none; }
    .etp-topbar { justify-content: flex-end; min-height: 0; height: 0; }
    .etp-topbar .etp-avatar-btn { position: absolute; top: 24px; right: 28px; }
    .etp-stats { grid-template-columns: repeat(3, minmax(0, 220px)); }
    .etp-alert { max-width: 684px; }
    .etp-list.is-grid { background: none; border-radius: 0; overflow: visible; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
    .etp-list.is-grid .etp-row { background: var(--etp-surface); border-radius: var(--etp-radius); min-height: 72px; padding: 12px 14px 12px 16px; }
    .etp-list.is-grid .etp-row:hover { background: var(--etp-surface2); }
    .etp-list.is-grid .etp-row::before { display: none; }
    .etp-list.is-grid .etp-row-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
    .etp-row:hover { background: var(--etp-surface2); }
    .etp-sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 420px; border-radius: 22px; padding-bottom: 20px; transform: translate(-50%, -46%); opacity: 0; transition: transform .22s, opacity .22s; }
    .etp-sheet.is-open { transform: translate(-50%, -50%); opacity: 1; }
    .etp-sheet-grabber { display: none; }
    .etp-sheet { padding-top: 20px; }
    .etp-viewer { left: 232px; transform: none; opacity: 0; transition: opacity .2s; }
    .etp-viewer.active { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .etp-sheet, .etp-viewer, .etp-backdrop { transition: none; }
}

/* ==========================================================================
   2. CLIENTES — reestilo sobre las clases existentes de clientes.php
   ========================================================================== */
body.etp-skin {
    --red: var(--etp-red);
    --bg: var(--etp-bg); --surface: var(--etp-surface); --surface2: var(--etp-surface2);
    --border: var(--etp-sep); --text: var(--etp-label); --muted: var(--etp-label3);
    --green: var(--etp-green); --orange: var(--etp-orange); --yellow: var(--etp-yellow);
    --blue: var(--etp-blue); --purple: var(--etp-purple); --gray: #8E8E93;
    --nav-h: 44px; --nav-bg: var(--etp-bar); --modal-bg: #151517; --table-hover: rgba(255, 255, 255, .03);
    --input-bg: var(--etp-fill); --select-bg: var(--etp-surface);
    font-size: 16px; line-height: 1.3; -webkit-font-smoothing: antialiased;
}
body.etp-skin.light {
    --etp-accent-text: #A85800; --etp-accent-soft: rgba(255, 159, 10, .2);
    --etp-bg: #F2F2F7; --etp-surface: #FFFFFF; --etp-surface2: #F2F2F7; --etp-surface3: #D1D1D6;
    --etp-fill: rgba(118, 118, 128, .12); --etp-sep: rgba(60, 60, 67, .29);
    --etp-label: #000000; --etp-label2: #5B5B60; --etp-label3: #6C6C70; --etp-bar: rgba(249, 249, 249, .9);
    --etp-green: #248A3D; --etp-yellow: #8A6A00; --etp-orange: #C2410C; --etp-red: #D70015; --etp-red-text: #D70015;
    --etp-blue: #0A66D8; --etp-purple: #8944AB;
    --modal-bg: #F2F2F7; --gray: #6C6C70;
}

/* Tipografía: una sola familia, sin mayúsculas forzadas (los <i> son los iconos) */
body.etp-skin, body.etp-skin *:not(i) { font-family: var(--etp-font) !important; }
body.etp-skin *:not(i) { letter-spacing: normal !important; text-transform: none !important; }

/* Barra superior */
.etp-skin .navbar {
    height: calc(44px + var(--etp-sat)); padding: var(--etp-sat) 8px 0; gap: 4px;
    border-bottom: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-skin .nav-left { gap: 0; flex: 1; min-width: 0; }
.etp-skin .nav-brand { display: none; }
.etp-skin .nav-back {
    height: 44px; padding: 0 8px 0 2px; border: none; border-radius: 0; background: none;
    color: var(--etp-accent-text); font-size: 17px; font-weight: 400; gap: 4px;
}
.etp-skin .nav-back i { font-size: 20px; }
.etp-skin .nav-back:hover { color: var(--etp-accent-text); opacity: .8; }
html.etp-in-frame .etp-skin .nav-back { display: none; }
/* Dentro del visor de Inicio ya hay barra con "‹ Inicio": aquí solo quedan los
   botones (actualizar, tema) a la altura del título, sin una segunda barra. */
html.etp-in-frame .etp-skin .navbar {
    position: absolute; left: auto; right: 8px; top: 4px; width: auto; height: 44px; padding: 0; z-index: 5;
    background: none; border: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
html.etp-in-frame .etp-skin .nav-left { display: none; }
html.etp-in-frame .etp-skin .main { margin-top: 0 !important; }
.etp-skin .theme-toggle { width: 44px; height: 44px; border: none; border-radius: 50%; color: var(--etp-accent-text); font-size: 17px; margin: 0 !important; }
.etp-skin .theme-toggle:hover { color: var(--etp-accent-text); background: var(--etp-fill); }

/* Contenido */
.etp-skin .main { margin-top: calc(44px + var(--etp-sat)) !important; padding: 6px 16px calc(var(--etp-tab-h) + var(--etp-sab) + 28px) !important; max-width: 1200px; }
.etp-skin .etp-large-title { margin: 6px 0 4px; }
.etp-skin .metricas-top-wrap { float: right; margin: 10px 0 0 !important; }
.etp-skin .btn-metricas { height: 36px; padding: 0 14px; border: none; border-radius: 18px; background: var(--etp-surface); color: var(--etp-label); font-size: 15px; font-weight: 500; box-shadow: none; }
.etp-skin .btn-metricas i { color: var(--etp-purple); }

/* Requieren atención */
.etp-skin .alert-box { background: var(--etp-surface); border: none; border-radius: var(--etp-radius); padding: 12px 8px 4px 16px; margin: 10px 0 14px; }
.etp-skin .alert-box-title { color: var(--etp-label); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.etp-skin .alert-box-title i { color: var(--etp-yellow); }
.etp-skin .alert-row { padding: 8px 0; border-bottom-color: var(--etp-sep); }
.etp-skin .alert-row-name { font-size: 16px; font-weight: 600; }
.etp-skin .alert-row-meta { font-size: 13px; color: var(--etp-label2); }
.etp-skin .ico { width: 40px !important; height: 40px !important; border: none; border-radius: 50%; background: var(--etp-fill); font-size: 15px !important; }
.etp-skin .ico::after { background: var(--etp-surface3); border: none; border-radius: 8px; font-size: 12px; font-weight: 500; }
.etp-skin .ico.deact { color: var(--etp-label3); }
.etp-skin .notas-avisado { border: none; border-radius: 6px; padding: 2px 6px; font-size: 11px; }

/* Buscador */
.etp-skin .search-hero { padding: 8px 0 10px; clear: both; }
.etp-skin .hero-search-wrap:hover { transform: none; }
.etp-skin .hero-input {
    height: 44px; padding: 0 40px 0 38px !important; background: var(--etp-fill); border: none !important; border-radius: var(--etp-radius-sm);
    font-size: 17px !important; font-weight: 400; animation: none !important; box-shadow: none !important;
}
.etp-skin .hero-input:focus { box-shadow: 0 0 0 2px var(--etp-accent) !important; }
.etp-skin .hero-input::placeholder { color: var(--etp-label3); }
.etp-skin .hero-search-wrap i.search-icon { left: 12px; font-size: 15px; color: var(--etp-label3) !important; }
.etp-skin .hero-clear-btn { right: 6px; width: 32px; height: 32px; font-size: 14px; }
.etp-skin .hero-add-btn { width: 44px !important; height: 44px !important; border-radius: 50%; background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 18px; box-shadow: none; }
.etp-skin .hero-add-btn:hover { background: var(--etp-accent); transform: none; box-shadow: none; opacity: .88; }
.etp-skin .search-dropdown { top: calc(100% + 6px); background: var(--etp-surface2); border: none; border-radius: var(--etp-radius-sm); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.etp-skin .search-dropdown-item { padding: 12px 14px; border-bottom-color: var(--etp-sep); }
.etp-skin .search-dropdown-item:hover { background: var(--etp-surface3); }
.etp-skin .sdi-name { font-size: 16px; font-weight: 500; }
.etp-skin .sdi-status { width: 8px; height: 8px; }

/* Ficha seleccionada */
.etp-skin .selected-user-card { border: none; border-radius: var(--etp-radius); overflow: hidden; }
.etp-skin .suc-header, .etp-skin .suc-body, .etp-skin .suc-actions { padding-left: 16px; padding-right: 16px; }
.etp-skin .suc-name { font-size: 22px; font-weight: 700; }
.etp-skin .suc-label, .etp-skin .cc-field-label, .etp-skin .cr-field-label { font-size: 12px; color: var(--etp-label3); }
.etp-skin .suc-value, .etp-skin .cc-field-value, .etp-skin .cr-field-value { font-size: 15px; font-weight: 500; }
.etp-skin .suc-actions { background: none; border-top-color: var(--etp-sep); gap: 8px; padding-top: 12px; padding-bottom: 14px; }
.etp-skin .suc-close { width: 32px; height: 32px; border-radius: 50%; background: var(--etp-fill); }

/* Paneles Usuarios / Configuración */
.etp-skin .collap-panel { background: none; border: none; margin-bottom: 18px; }
.etp-skin .collap-head { padding: 6px 4px 8px 16px !important; }
.etp-skin .collap-title, .etp-skin .collap-panel.cp-usuarios .collap-title { color: var(--etp-label3) !important; font-size: 13px; font-weight: 400; text-transform: uppercase !important; letter-spacing: .02em !important; }
.etp-skin .collap-title i { display: none; }
.etp-skin .collap-meta { font-size: 13px; text-transform: none !important; }
.etp-skin .collap-chevron { font-size: 12px; padding: 8px; }
.etp-skin .collap-body { border-top: none; }
.etp-skin .collap-body > div[style*="padding:10px 12px"] { padding: 0 !important; }

/* Filtros */
.etp-skin .users-filters { display: flex !important; flex-wrap: nowrap; gap: 8px; padding: 2px 0 12px; border: none; background: none; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.etp-skin .users-filters::-webkit-scrollbar { display: none; }
.etp-skin .users-filters-select {
    flex: none; min-width: 0 !important; width: auto; height: 36px; padding: 0 30px 0 14px !important; border: none; border-radius: 18px;
    background: var(--etp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-size: 15px !important; font-weight: 500; -webkit-appearance: none; appearance: none;
}
.etp-skin .users-toolbar-btns { flex: none; flex-wrap: nowrap; gap: 8px; }
.etp-skin .view-toggle { background: var(--etp-surface); border-radius: 18px; padding: 2px; gap: 0; }
.etp-skin .view-btn { width: 36px; height: 32px; border: none; border-radius: 16px; font-size: 14px; }
.etp-skin .view-btn.active { background: var(--etp-surface3); color: var(--etp-label); border: none; }
.etp-skin .btn-outline { height: 36px !important; padding: 0 14px !important; border: none; border-radius: 18px; background: var(--etp-surface); color: var(--etp-label); font-size: 15px !important; font-weight: 500; }

/* Tarjetas de cliente */
.etp-skin .cards-list { gap: 12px; }
.etp-skin .client-card { border: none; border-radius: var(--etp-radius); }
.etp-skin .cc-status-bar { display: none; }
.etp-skin .cc-header { padding: 14px 16px 12px; border-bottom: none; }
.etp-skin .cc-name { font-size: 17px; font-weight: 600; }
.etp-skin .cc-user { font-size: 14px; color: var(--etp-label2); margin-top: 2px; }
.etp-skin .cc-body { padding: 0 16px 12px; gap: 10px 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.etp-skin .cc-footer { padding: 10px 12px 12px; background: none; border-top: 1px solid var(--etp-sep); gap: 8px; flex-wrap: nowrap; justify-content: space-between; }
.etp-skin .cc-footer .btn-xs { flex: 1; max-width: 44px; }

.etp-skin .badge { display: inline-block; padding: 4px 10px; border: none; border-radius: 12px; font-size: 13px; line-height: 18px; font-weight: 600; text-transform: lowercase !important; white-space: nowrap; }
.etp-skin .badge::first-letter { text-transform: uppercase; }
.etp-skin .badge-activo { background: rgba(48, 209, 88, .16); color: var(--etp-green); }
.etp-skin .badge-vencido { background: rgba(255, 69, 58, .18); color: var(--etp-red-text); }
.etp-skin .badge-vence-hoy { background: rgba(255, 214, 10, .16); color: var(--etp-yellow); }
.etp-skin .badge-por-vencer { background: rgba(255, 138, 61, .18); color: var(--etp-orange); }
.etp-skin .badge-desactivado { background: var(--etp-fill); color: var(--etp-label2); }
.etp-skin .etq { border: none; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 600; }

.etp-skin .btn-xs { min-width: 40px; min-height: 40px; padding: 0 12px; justify-content: center; border: none !important; border-radius: 20px; background: var(--etp-fill); color: var(--etp-label); font-size: 14px; font-weight: 500; }
.etp-skin .btn-xs:hover { background: var(--etp-surface3); color: var(--etp-label); }
.etp-skin .btn-xs.wa, .etp-skin .btn-xs.reactivar { color: var(--etp-green); }
.etp-skin .btn-xs.avisado { color: var(--etp-yellow); }
.etp-skin .btn-xs.avisado.done, .etp-skin .btn-xs.deact { color: var(--etp-label3); }
.etp-skin .btn-xs.renovar, .etp-skin .btn-xs.edit { color: var(--etp-blue); }
.etp-skin .btn-xs.del { color: var(--etp-red-text); }
.etp-skin .clave-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 14px; }
.etp-skin .clave-toggle { font-size: 14px; padding: 6px; color: var(--etp-accent-text); }

/* Lista compacta */
.etp-skin .compact-list { gap: 0; background: var(--etp-surface); border-radius: var(--etp-radius); overflow: hidden; }
.etp-skin .compact-row { background: none; border: none; border-radius: 0; border-bottom: 1px solid var(--etp-sep); }
.etp-skin .compact-row:last-child { border-bottom: none; }
.etp-skin .compact-row.expanded { background: var(--etp-surface2); }
.etp-skin .cr-status { width: 8px; height: 8px; border-radius: 50%; align-self: center; margin-left: 14px; }
.etp-skin .cr-main { padding: 13px 10px 13px 12px; min-height: 52px; }
.etp-skin .cr-name { font-size: 16px; font-weight: 600; max-width: none; flex: 1 1 40%; }
.etp-skin .cr-user { font-size: 14px; color: var(--etp-label2); }
.etp-skin .cr-dias, .etp-skin .cr-precio { font-size: 13px; }
.etp-skin .cr-chevron { font-size: 12px; }
.etp-skin .compact-row.expanded .cr-chevron { color: var(--etp-accent-text); }
.etp-skin .cr-detail { background: none; border-top-color: var(--etp-sep); padding: 14px 16px; }
.etp-skin .cr-actions { border-top-color: var(--etp-sep); gap: 8px; }

/* Tabla (escritorio) */
.etp-skin .table-wrap { border: none; border-radius: var(--etp-radius); }
.etp-skin .data-table th { background: none; font-size: 12px; font-weight: 500; color: var(--etp-label3); border-bottom-color: var(--etp-sep); padding: 12px 14px; }
.etp-skin .data-table td { font-size: 14px; border-bottom-color: var(--etp-sep); padding: 10px 14px; }
.etp-skin .sort-icon.asc, .etp-skin .sort-icon.desc { color: var(--etp-accent-text); }
.etp-skin .table-count { font-size: 13px; margin-top: 10px; }
.etp-skin .nota-input { border-color: var(--etp-accent); border-radius: 8px; }

/* Configuración */
.etp-skin .config-grid { padding: 0; gap: 0; grid-template-columns: 1fr !important; background: var(--etp-surface); border-radius: var(--etp-radius); overflow: hidden; }
.etp-skin .config-item { background: none !important; border: none; border-radius: 0; border-bottom: 1px solid var(--etp-sep); padding: 10px 14px; min-height: 56px; gap: 12px; }
.etp-skin .config-item:last-child { border-bottom: none; }
.etp-skin .config-item:active, .etp-skin .config-item:hover { background: var(--etp-surface2) !important; }
.etp-skin .config-item > i:first-child { width: 32px; height: 32px; border-radius: 8px; background: var(--etp-fill); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.etp-skin .config-item-title { font-size: 16px; font-weight: 400; }
.etp-skin .config-item-sub { font-size: 13px; color: var(--etp-label2); }
.etp-skin .srv-panel, .etp-skin .etq-panel { border: none; border-radius: var(--etp-radius); margin: 12px 0 0 !important; overflow: hidden; }
.etp-skin .srv-panel-title, .etp-skin .etq-panel-title, .etp-skin .srv-name, .etp-skin .etq-stat-name { font-size: 15px; font-weight: 600; }
.etp-skin .srv-card, .etp-skin .etq-stat-card { border: none !important; border-radius: var(--etp-radius-sm); background: var(--etp-fill) !important; }
.etp-skin .srv-row, .etp-skin .etq-stat-row { font-size: 13px; }

/* Hojas (modales) */
.etp-skin .modal { background: rgba(0, 0, 0, .5); }
.etp-skin .modal-box { background: var(--modal-bg); border: none; border-radius: 22px 22px 0 0; transform: translateY(40px); }
.etp-skin .modal-handle { width: 36px; height: 5px; border-radius: 3px; background: var(--etp-surface3); margin-top: 8px; }
.etp-skin .modal-head { background: var(--modal-bg); border-bottom: none; padding: 12px 12px 8px 20px; }
.etp-skin .modal-title { color: var(--etp-label) !important; font-size: 20px; font-weight: 700; }
.etp-skin .modal-title i { color: var(--etp-accent-text); margin-right: 4px; font-size: 17px; }
.etp-skin .modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--etp-fill); font-size: 14px; color: var(--etp-label2); }
.etp-skin .modal-body { padding: 8px 20px 20px; }

.etp-skin .form-grid { gap: 14px 12px; }
.etp-skin .form-label { font-size: 13px; color: var(--etp-label2); padding-left: 4px; }
.etp-skin .form-input, .etp-skin .form-select, .etp-skin .form-textarea {
    min-height: 44px; padding: 10px 12px; background: var(--etp-surface); border: 1px solid transparent; border-radius: var(--etp-radius-sm);
    font-size: 16px !important; font-weight: 400;
}
.etp-skin.light .form-input, .etp-skin.light .form-select, .etp-skin.light .form-textarea { background: #FFFFFF; }
.etp-skin .form-input:focus, .etp-skin .form-select:focus, .etp-skin .form-textarea:focus { border-color: var(--etp-accent); }
.etp-skin .form-hint { font-size: 12px; color: var(--etp-label3); padding-left: 4px; }
.etp-skin .form-actions { gap: 10px; margin-top: 22px; }
.etp-skin .btn-cancel, .etp-skin .btn-save, .etp-skin .btn { min-height: 50px; border-radius: 14px; font-size: 17px; font-weight: 600; }
.etp-skin .btn-cancel { border: none; background: var(--etp-fill); color: var(--etp-label); }
.etp-skin .btn-save, .etp-skin .btn-primary { background: var(--etp-accent); color: var(--etp-accent-ink); }
.etp-skin .btn-save:hover, .etp-skin .btn-primary:hover { background: var(--etp-accent); opacity: .9; }
.etp-skin .export-check { border: none; border-radius: 10px; background: var(--etp-surface); padding: 10px 12px; font-size: 15px; font-weight: 400; }
.etp-skin .export-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--etp-accent); }

/* Métricas */
.etp-skin .mstat-card, .etp-skin .msrv-card, .etp-skin .metq-card { border: none !important; border-radius: var(--etp-radius); background: var(--etp-surface) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.etp-skin .mstat-card::before { display: none; }
.etp-skin .mstat-label, .etp-skin .mingreso-label { font-size: 13px; color: var(--etp-label2) !important; }
.etp-skin .mstat-value { font-size: 30px; font-weight: 700; text-shadow: none !important; font-variant-numeric: tabular-nums; }
.etp-skin .mstat-hint { font-size: 12px; opacity: 1; color: var(--etp-label3) !important; }
.etp-skin .msect-label { font-size: 13px; color: var(--etp-label3) !important; text-transform: uppercase !important; border-bottom: none; padding: 0 4px; margin: 18px 0 8px; }
.etp-skin .msect-label i { display: none; }
.etp-skin .mingreso-box { background: var(--etp-surface); border: none; border-radius: var(--etp-radius); }
.etp-skin .mingreso-val { font-size: 30px; font-weight: 700; text-shadow: none !important; }
.etp-skin .msrv-name { font-size: 16px; font-weight: 600; color: var(--etp-label) !important; }
.etp-skin .msrv-row, .etp-skin .metq-row { font-size: 13px; }
.etp-skin .metq-name { font-size: 15px; font-weight: 600; }

/* WhatsApp y plantillas */
.etp-skin .wa-picker-box { background: var(--modal-bg); border: none; border-radius: 22px 22px 0 0; }
.etp-skin .wa-picker-head { border-bottom: none; padding: 16px 20px 8px; }
.etp-skin .wa-picker-title { font-size: 20px; font-weight: 700; color: var(--etp-label); }
.etp-skin .wa-picker-item { padding: 14px 20px; font-size: 16px; font-weight: 500; border-bottom-color: var(--etp-sep); }
.etp-skin .wa-picker-item small { font-size: 13px; }
.etp-skin .plantilla-item, .etp-skin .gwa-item { background: var(--etp-surface); border: 1px solid transparent; border-radius: var(--etp-radius-sm); }
.etp-skin .plantilla-item.selected { border-color: var(--etp-green); }
.etp-skin .plantilla-nombre { font-size: 16px; font-weight: 600; }
.etp-skin .plantilla-preview, .etp-skin .gwa-item-preview { font-size: 13px; color: var(--etp-label2); }
.etp-skin .gwa-item-nombre { font-size: 16px; font-weight: 600; }
.etp-skin .btn-gwa-send, .etp-skin .btn-gwa-edit, .etp-skin .btn-gwa-del { min-height: 36px; border: none; border-radius: 18px; background: var(--etp-fill); font-size: 14px; padding: 0 14px; }
.etp-skin .gwa-icono-opt { width: 44px; height: 44px; border: 2px solid transparent; border-radius: 12px; background: var(--etp-surface); }
.etp-skin .gwa-wa-preview { border: none; border-radius: var(--etp-radius-sm); font-size: 14px; }

/* Barra de pestañas de Clientes */
.etp-skin .bottom-nav {
    height: calc(var(--etp-tab-h) + var(--etp-sab)); padding: 4px 8px var(--etp-sab); background: var(--etp-bar);
    border-top: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-skin .bn-tab { padding: 0; gap: 3px; font-size: 10px; line-height: 12px; font-weight: 500; color: var(--etp-label3); }
.etp-skin .bn-tab i { font-size: 21px; height: 24px; display: flex; align-items: center; }
.etp-skin .bn-tab.active, .etp-skin .bn-tab.active i { color: var(--etp-accent-text); }
.etp-skin .bn-tab.active { font-weight: 600; }
.etp-skin .bn-tab.active::after { display: none; }
.etp-skin .bn-tools-box { background: var(--modal-bg); border: none; border-radius: 22px 22px 0 0; padding: 20px 16px calc(var(--etp-tab-h) + var(--etp-sab) + 20px); }
.etp-skin .bn-tools-title { font-size: 20px; font-weight: 700; color: var(--etp-label); margin-bottom: 14px; padding-left: 4px; }
.etp-skin .bn-tool-item { background: var(--etp-surface); border: none; border-radius: var(--etp-radius); padding: 16px 6px 14px; font-size: 13px; font-weight: 500; gap: 8px; }
.etp-skin .bn-tool-item i { font-size: 22px; }

/* Flotantes, aviso emergente y menú lateral de escritorio */
.etp-skin .float-btn { width: 44px !important; height: 44px !important; border: none; background: var(--etp-surface2); color: var(--etp-label); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.etp-skin .float-btn-clear { color: var(--etp-red-text); }
.etp-skin .toast { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 16px); background: var(--etp-surface3); color: var(--etp-label); border: none; border-radius: 22px; padding: 12px 20px; font-size: 15px; font-weight: 500; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.etp-skin .toast::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--etp-green); margin-right: 8px; vertical-align: 1px; }
.etp-skin .toast.error::before { background: var(--etp-red); }
.etp-skin .toast.warn::before { background: var(--etp-yellow); }
.etp-skin .app-dock-handle { border: none; border-radius: 0 12px 12px 0; background: var(--etp-surface); }
.etp-skin .app-dock-panel { border: none; border-radius: 0 14px 14px 0; }
.etp-skin .dock-app-btn { font-size: 15px; font-weight: 500; border-bottom-color: var(--etp-sep); }

@media (max-width: 767px) {
    /* La barra de pestañas queda visible sobre las hojas (igual que antes): deja su espacio */
    .etp-skin .modal-box { padding-bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 12px) !important; max-height: 92vh; }
    .etp-skin .cc-header { padding: 14px 16px 10px; }
    .etp-skin .cc-body { padding: 0 16px 12px; gap: 10px 12px; }
    .etp-skin .cc-footer { padding: 10px 12px 12px; gap: 6px; }
    .etp-skin .float-btns { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 14px) !important; right: 14px; }
    /* En el teléfono, "subir" es tocar la pestaña Clientes (o la barra de estado) */
    .etp-skin .float-btn-top { display: none; }
    .etp-skin .alert-row { align-items: flex-start; }
    .etp-skin .alert-row-info { flex-direction: column; align-items: flex-start; gap: 3px; }
    .etp-skin .icon-actions { padding-top: 2px; }
}
@media (max-width: 480px) {
    .etp-skin .cc-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .etp-skin .form-grid { grid-template-columns: 1fr 1fr; }
    .etp-skin .suc-body { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
    .etp-skin .main { padding: 14px 32px 60px !important; }
    .etp-skin .nav-brand { display: flex; }
    .etp-skin .nav-brand img { height: 40px !important; }
    .etp-skin .modal-box { border-radius: 22px; max-width: 640px; }
    .etp-skin .modal.open .modal-box { transform: translateY(0); }
    .etp-skin .wa-picker-box { border-radius: 22px; }
    .etp-skin .config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .etp-skin .toast { bottom: 28px; }
    .etp-skin .users-filters { flex-wrap: wrap; overflow: visible; }
}

/* ==========================================================================
   3. ACCESO (login y restablecer clave)
   ========================================================================== */
.etp-auth { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; padding: calc(var(--etp-sat) + 40px) 24px calc(var(--etp-sab) + 20px); }
.etp-auth-inner { width: 100%; max-width: 400px; display: flex; flex-direction: column; }
.etp-auth-logo { width: min(300px, 78vw); height: auto; align-self: center; display: block; }
.etp-auth-title { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: .012em; text-align: center; }
.etp-auth-sub { margin: 6px 0 0; font-size: 16px; line-height: 21px; color: var(--etp-label2); text-align: center; }

.etp-field-group { margin-top: 24px; background: var(--etp-surface); border-radius: var(--etp-radius); overflow: hidden; }
.etp-field { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; }
.etp-field + .etp-field::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--etp-sep); transform: scaleY(.5); }
.etp-field-label { width: 92px; flex-shrink: 0; font-size: 17px; line-height: 22px; }
.etp-field input { flex: 1; min-width: 0; height: 52px; padding: 0; border: none; outline: none; background: none; color: var(--etp-label); font-size: 17px; }
.etp-field input::placeholder { color: var(--etp-label3); }
.etp-field input:-webkit-autofill { -webkit-text-fill-color: var(--etp-label); transition: background-color 99999s ease-out; caret-color: var(--etp-label); }
.etp-field:focus-within { box-shadow: inset 0 0 0 2px var(--etp-accent); border-radius: 0; }
.etp-field:first-child:focus-within { border-radius: var(--etp-radius) var(--etp-radius) 0 0; }
.etp-field:last-child:focus-within { border-radius: 0 0 var(--etp-radius) var(--etp-radius); }
.etp-field:only-child:focus-within { border-radius: var(--etp-radius); }
.etp-field-btn { width: 44px; height: 44px; margin-right: -10px; flex-shrink: 0; border: none; background: none; color: var(--etp-label2); font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.etp-btn {
    width: 100%; min-height: 52px; padding: 0 18px; border: none; border-radius: var(--etp-radius); cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 17px; line-height: 22px; font-weight: 600; transition: opacity .15s;
}
.etp-btn:active { opacity: .75; }
.etp-btn:disabled { opacity: .55; cursor: default; }
.etp-auth .etp-btn { margin-top: 20px; }
.etp-link { min-height: 44px; margin-top: 6px; padding: 0 8px; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--etp-accent-text); font-size: 16px; line-height: 21px; }
.etp-note { margin: 0; font-size: 13px; line-height: 18px; color: var(--etp-label3); text-align: center; }
.etp-note a { color: var(--etp-label2); text-decoration: underline; }
.etp-auth-foot { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 6px; }

.etp-banner { margin-top: 18px; padding: 12px 14px; border-radius: var(--etp-radius-sm); display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 20px; font-weight: 500; }
.etp-banner i { margin-top: 2px; }
.etp-banner.is-error { background: rgba(255, 69, 58, .16); color: var(--etp-red-text); }
.etp-banner.is-success { background: rgba(48, 209, 88, .16); color: var(--etp-green); }

.etp-sheet-title { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.etp-sheet-text { margin: 6px 0 0; font-size: 15px; line-height: 20px; color: var(--etp-label2); }
.etp-sheet .etp-field-group { margin-top: 18px; }
.etp-sheet .etp-btn { margin-top: 16px; }
.etp-sheet-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--etp-fill); color: var(--etp-label2); font-size: 14px; cursor: pointer; }
.grecaptcha-badge { visibility: hidden !important; }

/* ==========================================================================
   4. ADMINISTRACIÓN (Mi perfil, Usuarios, Módulos) — sobre sus clases actuales
   ========================================================================== */
.etp-admin { --muted: var(--etp-label2); --text: var(--etp-label); --border: var(--etp-sep); --red: var(--etp-red); --green: var(--etp-green); }
.etp-admin .navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 800; display: flex; align-items: center;
    height: calc(44px + var(--etp-sat)); padding: var(--etp-sat) 8px 0;
    background: var(--etp-bar); border-bottom: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-admin .nav-brand { display: none; }
.etp-admin .nav-back { height: 44px; padding: 0 8px 0 2px; display: flex; align-items: center; gap: 4px; color: var(--etp-accent-text); font-size: 17px; }
.etp-admin .nav-back i { font-size: 20px; }
.etp-admin .main { max-width: 1040px; margin: 0 auto; padding: calc(44px + var(--etp-sat) + 6px) 16px calc(var(--etp-sab) + 40px); }
.etp-admin .page-label { display: none; }
.etp-admin .page-title { margin: 6px 0 0; font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .011em; }
.etp-admin .alert { margin-top: 14px; padding: 12px 14px; border-radius: var(--etp-radius-sm); font-size: 15px; line-height: 20px; font-weight: 500; }
.etp-admin .alert-error { background: rgba(255, 69, 58, .16); color: var(--etp-red-text); }
.etp-admin .alert-success { background: rgba(48, 209, 88, .16); color: var(--etp-green); }

.etp-admin .panels, .etp-admin .layout, .etp-admin .layout-2col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 4px; }
.etp-admin .panel { min-width: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.etp-admin .panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 8px; padding: 0 16px; }
.etp-admin .panel-title { font-size: 13px; line-height: 18px; letter-spacing: .02em; text-transform: uppercase; color: var(--etp-label3); }
.etp-admin .panel-head a { color: var(--etp-accent-text) !important; font-size: 15px !important; }
.etp-admin .panel-body, .etp-admin .panel > div[style*="overflow-x"] { background: var(--etp-surface); border-radius: var(--etp-radius); }
.etp-admin .panel-body { padding: 16px; }

.etp-admin .form-group { margin-bottom: 14px; min-width: 0; }
.etp-admin .form-label { display: block; margin: 0 0 6px; padding-left: 4px; font-size: 13px; line-height: 18px; color: var(--etp-label2); }
.etp-admin .form-input, .etp-admin .form-select, .etp-admin .form-textarea {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--etp-radius-sm); outline: none;
    background: var(--etp-fill); color: var(--etp-label); font-size: 16px; line-height: 22px;
}
.etp-admin .form-textarea { min-height: 76px; resize: vertical; display: block; }
.etp-admin .form-input:focus, .etp-admin .form-select:focus, .etp-admin .form-textarea:focus { border-color: var(--etp-accent); }
.etp-admin .form-input::placeholder, .etp-admin .form-textarea::placeholder { color: var(--etp-label3); }
.etp-admin .form-select option { background: var(--etp-surface2); color: var(--etp-label); }
.etp-admin .form-static { padding: 10px 12px; font-size: 16px; line-height: 22px; color: var(--etp-label2); }
.etp-admin .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.etp-admin .form-group > div[style*="font-size:0.68rem"] { font-size: 12px !important; line-height: 17px; padding-left: 4px; color: var(--etp-label3) !important; }
.etp-admin .color-input-wrap { display: flex; align-items: center; gap: 8px; }
.etp-admin .color-input-wrap input[type=color] { width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: none; border-radius: var(--etp-radius-sm); background: none; cursor: pointer; }

.etp-admin .btn {
    min-height: 50px; padding: 0 18px; border: none; border-radius: 14px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 17px; font-weight: 600;
}
.etp-admin .btn:active { opacity: .75; }
.etp-admin .btn-full, .etp-admin .panel-body form > .btn { width: 100%; margin-top: 4px; }
.etp-admin .btn-sm, .etp-admin .btn-xs {
    min-width: 40px; min-height: 40px; padding: 0 12px; border: none; border-radius: 20px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--etp-fill); color: var(--etp-label); font-size: 14px; font-weight: 500;
}
.etp-admin .btn-sm:hover, .etp-admin .btn-xs:hover { background: var(--etp-surface3); }
.etp-admin .btn-sm.del, .etp-admin .btn-xs.del { color: var(--etp-red-text); }
.etp-admin .btn-sm.success { color: var(--etp-green); }
.etp-admin .action-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.etp-admin .badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; background: var(--etp-fill); color: var(--etp-label2); }
.etp-admin .badge::first-letter { text-transform: uppercase; }
.etp-admin .badge-admin { background: var(--etp-accent-soft); color: var(--etp-accent-text); }
.etp-admin .badge-active { background: rgba(48, 209, 88, .16); color: var(--etp-green); }
.etp-admin .badge-locked { background: rgba(255, 69, 58, .18); color: var(--etp-red-text); }

.etp-admin .users-table { width: 100%; border-collapse: collapse; }
.etp-admin .users-table th { padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 500; color: var(--etp-label3); border-bottom: 1px solid var(--etp-sep); white-space: nowrap; }
.etp-admin .users-table td { padding: 12px 14px; vertical-align: middle; font-size: 15px; border-bottom: 1px solid var(--etp-sep); }
.etp-admin .users-table tr:last-child td { border-bottom: none; }
.etp-admin .users-table td strong { font-size: 16px; font-weight: 600; }
.etp-admin .users-table td span[style] { font-size: 13px !important; }

.etp-admin .module-list { display: flex; flex-direction: column; }
.etp-admin .module-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--etp-sep); }
.etp-admin .module-item:first-child { padding-top: 0; }
.etp-admin .module-item:last-child { border-bottom: none; padding-bottom: 0; }
.etp-admin .module-item-icon { width: 36px; height: 36px; flex-shrink: 0; border: 1px solid; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.etp-admin .module-item-info { flex: 1; min-width: 0; }
.etp-admin .module-item-name { font-size: 16px; line-height: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-admin .module-item-url { font-size: 13px; line-height: 18px; color: var(--etp-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-admin .module-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

.etp-admin .modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s; }
.etp-admin .modal.open { opacity: 1; pointer-events: auto; }
.etp-admin .modal-box { width: 100%; max-width: 440px; padding: 22px 20px calc(var(--etp-sab) + 20px); background: #151517; border-radius: 22px 22px 0 0; transform: translateY(40px); transition: transform .3s cubic-bezier(.32, .72, 0, 1); }
.etp-admin .modal.open .modal-box { transform: translateY(0); }
.etp-admin .modal-title { font-size: 22px; line-height: 28px; font-weight: 700; margin-bottom: 8px; }
.etp-admin .modal-box p { font-size: 15px !important; line-height: 20px; }
.etp-admin .modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.etp-admin .btn-cancel { flex: 1; min-height: 50px; border: none; border-radius: 14px; background: var(--etp-fill); color: var(--etp-label); font-size: 17px; font-weight: 600; cursor: pointer; }
.etp-admin .modal-actions .btn[style*="#c00"] { background: var(--etp-red) !important; color: #fff; }

@media (max-width: 767px) {
    /* La tabla de usuarios se lee como fichas */
    .etp-admin .users-table thead { display: none; }
    .etp-admin .users-table tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--etp-sep); }
    .etp-admin .users-table tr:last-child { border-bottom: none; }
    .etp-admin .users-table td { display: block; padding: 0; border: none; }
    .etp-admin .users-table td:nth-child(2) { margin-top: 2px; }
    .etp-admin .users-table td:nth-child(3), .etp-admin .users-table td:nth-child(4) { display: inline-block; margin: 8px 6px 0 0; }
    .etp-admin .users-table td:nth-child(5) { margin-top: 10px; }
    .etp-admin .module-item { flex-wrap: wrap; }
    .etp-admin .module-item-actions { width: 100%; padding-left: 48px; }
}
@media (min-width: 900px) {
    .etp-admin .main { padding-left: 32px; padding-right: 32px; }
    .etp-admin .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .etp-admin .layout, .etp-admin .layout-2col { grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
    .etp-admin .modal { align-items: center; }
    .etp-admin .modal-box { border-radius: 22px; padding-bottom: 22px; }
}
.etp-body .etp-link { color: var(--etp-accent-text); }
.etp-admin .btn-sm, .etp-admin .btn-xs { white-space: nowrap; }
@media (min-width: 900px) {
    /* Usuarios: la tabla necesita ancho; el formulario va arriba hasta pantallas grandes */
    .etp-admin .layout-2col { grid-template-columns: minmax(0, 1fr); }
    .etp-admin .layout-2col > .panel:first-child { max-width: 480px; }
    .etp-admin .action-btns { flex-wrap: nowrap; }
}
@media (min-width: 1280px) {
    .etp-admin .main { max-width: 1240px; }
    .etp-admin .layout-2col { grid-template-columns: 340px minmax(0, 1fr); }
}

/* ==========================================================================
   5. ANUNCIOS — reestilo sobre las clases existentes de anuncios.php
   ========================================================================== */
body.etp-anuncios {
    --red: var(--etp-accent); --red-dark: var(--etp-accent); --gold: var(--etp-accent);
    --bg: var(--etp-bg); --surface: var(--etp-surface); --border: var(--etp-sep);
    --text: var(--etp-label); --muted: var(--etp-label3); --green: var(--etp-green); --radius: 16px;
    background: var(--etp-bg); color: var(--etp-label); font-size: 16px; line-height: 1.3; -webkit-font-smoothing: antialiased;
}
body.etp-anuncios, body.etp-anuncios *:not(i) { font-family: var(--etp-font) !important; letter-spacing: normal !important; }

.etp-anuncios .topbar {
    height: calc(44px + var(--etp-sat)); padding: var(--etp-sat) 8px 0; gap: 0; justify-content: center;
    background: var(--etp-bar); border-bottom: 1px solid rgba(84, 84, 88, .4); box-shadow: none;
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-anuncios .topbar-logo, .etp-anuncios .topbar-sep, .etp-anuncios .topbar-user { display: none; }
.etp-anuncios .topbar-title { font-size: 17px; font-weight: 600; color: var(--etp-label); }
.etp-anuncios .topbar-right { position: absolute; left: 8px; bottom: 0; margin: 0; }
.etp-anuncios .btn-back { height: 44px; padding: 0 8px 0 2px; border: none; border-radius: 0; background: none; color: var(--etp-accent-text); font-size: 17px; font-weight: 400; gap: 4px; }
.etp-anuncios .btn-back i { font-size: 20px; }
.etp-anuncios .btn-back:hover { color: var(--etp-accent-text); opacity: .8; }
html.etp-in-frame .etp-anuncios .topbar { display: none; }

.etp-anuncios .main { max-width: 900px; padding: 6px 16px calc(var(--etp-sab) + 150px); }
.etp-anuncios .etp-large-title { margin: 6px 0 14px; }
.etp-anuncios .card { border: none; border-radius: var(--etp-radius); padding: 16px; margin-bottom: 16px; }
.etp-anuncios .card-title { font-size: 15px !important; font-weight: 600; color: var(--etp-label); margin-bottom: 12px; gap: 8px; }
.etp-anuncios .card-title i { color: var(--etp-label3) !important; font-size: 14px; }

.etp-anuncios .search-row input { height: 44px; padding: 0 14px; background: var(--etp-fill); border: 1px solid transparent; border-radius: var(--etp-radius-sm); font-size: 17px; font-weight: 400; }
.etp-anuncios .search-row input::placeholder { color: var(--etp-label3); }
.etp-anuncios .search-row input:focus { border-color: var(--etp-accent); }
.etp-anuncios .btn-buscar { height: 44px; padding: 0 18px; border-radius: var(--etp-radius-sm); background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 16px; font-weight: 600; }
.etp-anuncios .btn-buscar:hover { background: var(--etp-accent); opacity: .9; }
.etp-anuncios .loader { font-size: 14px; color: var(--etp-label2); }
.etp-anuncios .err-msg { background: rgba(255, 69, 58, .16); border: none; border-radius: var(--etp-radius-sm); padding: 12px 14px; color: var(--etp-red-text); font-size: 14px; font-weight: 500; }

.etp-anuncios .results-grid { gap: 10px; margin-top: 16px; }
.etp-anuncios .result-card { background: var(--etp-surface2); border: 2px solid transparent; border-radius: var(--etp-radius-sm); }
.etp-anuncios .result-card.selected { border-color: var(--etp-accent); box-shadow: none; }
.etp-anuncios .result-card .no-img { background: var(--etp-surface3); }
.etp-anuncios .result-card .ci { padding: 7px 8px 8px; }
.etp-anuncios .result-card .ct { font-size: 13px; font-weight: 600; line-height: 1.25; }
.etp-anuncios .result-card .cy { font-size: 12px; color: var(--etp-label2); }
.etp-anuncios .result-card .ctype { top: 6px; left: 6px; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 600; background: rgba(0, 0, 0, .72); text-transform: lowercase; }
.etp-anuncios .result-card .ctype::first-letter { text-transform: uppercase; }
.etp-anuncios .result-card .ctype.movie { color: var(--etp-accent); }
.etp-anuncios .result-card .ctype.tv { color: var(--etp-green); }
.etp-anuncios .sel-badge { top: 6px; right: 6px; width: 22px; height: 22px; background: var(--etp-accent); font-size: 12px; }

.etp-anuncios .poster-zone h4, .etp-anuncios .trailer-wrap h4, .etp-anuncios .custom-panel h4 { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--etp-label3); margin-bottom: 8px; }
.etp-anuncios .trailer-wrap h4 i, .etp-anuncios .custom-panel h4 i { display: none; }
.etp-anuncios .poster-options { gap: 8px; }
.etp-anuncios .poster-option { border: 2px solid transparent; border-radius: 10px; }
.etp-anuncios .poster-option.selected { border-color: var(--etp-accent); }
.etp-anuncios .poster-option img { width: 72px; }
.etp-anuncios .poster-lang { bottom: 4px; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 600; }
.etp-anuncios .poster-check { top: 4px; right: 4px; width: 18px; height: 18px; background: var(--etp-accent); font-size: 10px; }
.etp-anuncios .btn-ver-portada { min-height: 36px; margin-top: 10px; padding: 0 14px; border: none; border-radius: 18px; background: var(--etp-fill); color: var(--etp-accent-text); font-size: 14px; font-weight: 500; gap: 6px; }
.etp-anuncios .btn-ver-portada:hover { background: var(--etp-surface3); }

.etp-anuncios .dtitle { font-size: 24px; line-height: 29px; font-weight: 700; margin-bottom: 8px; }
.etp-anuncios .meta-tags { gap: 6px; margin-bottom: 12px; }
.etp-anuncios .tag { padding: 3px 10px; border: none; border-radius: 11px; background: var(--etp-fill); color: var(--etp-label2); font-size: 12px; font-weight: 500; }
.etp-anuncios .tag.red, .etp-anuncios .tag.gold { color: var(--etp-accent-text); }
.etp-anuncios .tag.green { color: var(--etp-green); }
.etp-anuncios .synopsis-box { background: var(--etp-fill); border: none; border-radius: var(--etp-radius-sm); padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--etp-label2); margin-bottom: 14px; }
.etp-anuncios .synopsis-box h5 { font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--etp-label3); margin-bottom: 6px; }
.etp-anuncios .ficha-grid { gap: 10px 12px; }
.etp-anuncios .fi .fl { font-size: 12px; text-transform: none; color: var(--etp-label3); }
.etp-anuncios .fi .fv { font-size: 14px; font-weight: 500; }
.etp-anuncios .detail-panel hr { border-top-color: var(--etp-sep) !important; margin: 16px 0 !important; }
.etp-anuncios .trailer-frame { border-radius: var(--etp-radius-sm); background: var(--etp-fill); }
.etp-anuncios .trailer-none { border: none; border-radius: var(--etp-radius-sm); background: var(--etp-fill); padding: 16px; font-size: 14px; color: var(--etp-label2); }

.etp-anuncios .custom-grid { gap: 12px; }
.etp-anuncios .cf label { margin-bottom: 6px; padding-left: 4px; font-size: 13px; text-transform: none; color: var(--etp-label2); }
.etp-anuncios .cf select, .etp-anuncios .cf input, .etp-anuncios .cf textarea { min-height: 44px; padding: 10px 12px; background: var(--etp-fill); border: 1px solid transparent; border-radius: var(--etp-radius-sm); font-size: 16px !important; font-weight: 400; }
.etp-anuncios .cf select:focus, .etp-anuncios .cf input:focus, .etp-anuncios .cf textarea:focus { border-color: var(--etp-accent); }
.etp-anuncios .cf select option { background: var(--etp-surface2); }

.etp-anuncios .btn-generar { min-height: 52px; padding: 0 18px; margin-bottom: 16px; border-radius: var(--etp-radius); background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 17px; font-weight: 600; box-shadow: none; }
.etp-anuncios .btn-generar:disabled { opacity: .4; }

.etp-anuncios .output-card.card { padding: 0; overflow: hidden; }
.etp-anuncios .output-header { background: none; border-bottom: 1px solid var(--etp-sep); border-radius: 0; padding: 14px 16px; }
.etp-anuncios .output-header h3 { font-size: 16px; font-weight: 600; gap: 8px; }
.etp-anuncios .wa-badge { padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #000; }
.etp-anuncios .wa-preview { background: #0B141A; padding: 16px; }
.etp-anuncios .wa-drop-zone { background: rgba(255, 255, 255, .04); border: 1px dashed rgba(37, 211, 102, .35); border-radius: var(--etp-radius-sm); padding: 12px 14px; font-size: 13px; color: var(--etp-label2); }
.etp-anuncios .wa-bubble { background: #005C4B; font-size: 14px; line-height: 1.5; color: #E9EDEF; box-shadow: none; font-family: var(--etp-font) !important; }
.etp-anuncios .wa-img-note { font-size: 12px; color: var(--etp-label2); }
.etp-anuncios .raw-section { background: none; border-top: 1px solid var(--etp-sep); border-radius: 0; padding: 14px 16px 16px; }
.etp-anuncios .raw-section h5 { font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--etp-label3); margin-bottom: 8px; }
.etp-anuncios .raw-text { background: var(--etp-fill); border: none; border-radius: var(--etp-radius-sm); padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 12px; line-height: 1.5; color: var(--etp-label2); }

/* Acciones del mensaje: barra inferior con dos botones */
.etp-anuncios .fab-copy, .etp-anuncios .fab-wa {
    bottom: calc(var(--etp-sab) + 12px); height: 50px; padding: 0 12px; justify-content: center; gap: 8px;
    border-radius: 14px; font-size: 16px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
}
.etp-anuncios .fab-copy { left: 16px; right: calc(50% + 6px); background: var(--etp-accent); color: var(--etp-accent-ink); }
.etp-anuncios .fab-copy.copied { background: var(--etp-green); color: #000; box-shadow: 0 8px 24px rgba(0, 0, 0, .55); }
.etp-anuncios .fab-wa { left: calc(50% + 6px); right: 16px; background: #25D366; color: #000; }
.etp-anuncios .fab-group { left: auto; right: 16px; bottom: calc(var(--etp-sab) + 16px); gap: 10px; }
.etp-anuncios .fab-wa.visible ~ .fab-group { bottom: calc(var(--etp-sab) + 76px); }
.etp-anuncios .fab { width: 44px; height: 44px; padding: 0; justify-content: center; gap: 0; border: none; border-radius: 50%; font-size: 0; background: var(--etp-surface2); color: var(--etp-label); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.etp-anuncios .fab i { font-size: 16px; }
.etp-anuncios .fab-clear { color: var(--etp-red-text); }

.etp-anuncios .poster-modal { gap: 16px; }
.etp-anuncios .poster-modal img { border-radius: var(--etp-radius); }
.etp-anuncios .btn-modal-close { width: 44px; height: 44px; top: calc(var(--etp-sat) + 8px); right: 10px; opacity: 1; border-radius: 50%; background: rgba(118, 118, 128, .3); font-size: 17px; }
.etp-anuncios .btn-open-img, .etp-anuncios .btn-modal-dl { min-height: 46px; padding: 0 18px; border: none; border-radius: 14px; font-size: 16px; font-weight: 600; gap: 8px; }
.etp-anuncios .btn-open-img { background: var(--etp-accent); color: var(--etp-accent-ink); }
.etp-anuncios .btn-modal-dl { background: rgba(118, 118, 128, .3); }
.etp-anuncios .poster-modal-hint { font-size: 13px; color: var(--etp-label2); }

.etp-anuncios .api-panel { background: var(--etp-surface2); border: none; border-radius: var(--etp-radius); }
.etp-anuncios .api-panel-hdr h4 { font-size: 15px; font-weight: 600; color: var(--etp-label); }
.etp-anuncios .api-panel label { font-size: 12px; text-transform: none; color: var(--etp-label2); }
.etp-anuncios .api-panel input { background: var(--etp-fill); border: 1px solid transparent; border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; }
.etp-anuncios .btn-api-save { border-radius: 10px; background: var(--etp-accent); font-size: 14px; font-weight: 600; min-height: 36px; }
.etp-anuncios .btn-api-rst { border: none; border-radius: 10px; background: var(--etp-fill); color: var(--etp-label); font-size: 14px; min-height: 36px; }

@media (max-width: 600px) {
    .etp-anuncios .main { padding: 6px 16px calc(var(--etp-sab) + 150px); }
    .etp-anuncios .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .etp-anuncios .fab-copy, .etp-anuncios .fab-wa { bottom: calc(var(--etp-sab) + 12px); padding: 0 10px; font-size: 16px; }
    .etp-anuncios .fab-copy { right: calc(50% + 6px); }
    .etp-anuncios .fab-wa { right: 16px; }
    .etp-anuncios .fab-group { left: auto; right: 16px; }
    .etp-anuncios .fab { padding: 0; font-size: 0; }
    .etp-anuncios .poster-option img { width: 72px; }
}
@media (min-width: 900px) {
    .etp-anuncios .fab-copy, .etp-anuncios .fab-wa { left: auto; width: 200px; }
    .etp-anuncios .fab-copy { right: 240px; }
    .etp-anuncios .fab-wa { right: 24px; }
    .etp-anuncios .fab-group { right: 24px; }
}
/* La ficha se salía por la derecha en el teléfono: la fila de portadas ensanchaba toda la tarjeta */
.etp-anuncios .poster-zone, .etp-anuncios .detail-meta, .etp-anuncios .trailer-wrap, .etp-anuncios .custom-panel { min-width: 0; max-width: 100%; }
.etp-anuncios .poster-options { scrollbar-width: none; }
.etp-anuncios .poster-options::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
    .etp-anuncios .detail-inner { flex-wrap: nowrap; }
    .etp-anuncios .poster-option { flex-shrink: 0; }
}
/* Fondo de barra bajo Copiar / WhatsApp para que no floten sobre el contenido */
body.etp-anuncios:has(.fab-copy.visible)::after {
    content: ''; position: fixed; left: 0; right: 0; bottom: 0; z-index: 590; height: calc(var(--etp-sab) + 74px);
    background: var(--etp-bar); border-top: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-anuncios .fab-copy, .etp-anuncios .fab-wa { box-shadow: none; }
.etp-anuncios .fab-wa.visible ~ .fab-group { bottom: calc(var(--etp-sab) + 88px); }

/* ==========================================================================
   6. TÍTULOS (página pública) — reestilo sobre las clases de titulos.php
   ========================================================================== */
body.etp-titulos {
    --red: var(--etp-accent); --red2: var(--etp-accent); --gold: var(--etp-accent);
    --bg: var(--etp-bg); --bg2: var(--etp-bg); --surface: var(--etp-surface); --surface2: var(--etp-surface2);
    --border: var(--etp-sep); --text: var(--etp-label); --muted: var(--etp-label3); --green: var(--etp-green);
    background: var(--etp-bg); color: var(--etp-label); font-size: 16px; line-height: 1.3; -webkit-font-smoothing: antialiased;
}
body.etp-titulos, body.etp-titulos *:not(i) { font-family: var(--etp-font) !important; letter-spacing: normal !important; }
.etp-titulos .bg-layer, .etp-titulos .bg-noise, .etp-titulos .bg-scanlines { display: none; }
.etp-titulos .wrapper { max-width: 980px; padding: calc(var(--etp-sat) + 16px) 16px calc(var(--etp-sab) + 48px); }

.etp-titulos .header { margin-bottom: 20px; animation: none; }
.etp-titulos .header img { width: min(250px, 62vw) !important; filter: none !important; animation: none !important; }
.etp-titulos .logo-sub { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; text-transform: none; color: var(--etp-label); }
.etp-titulos .logo-line { margin-top: 6px; }
.etp-titulos .logo-line::before, .etp-titulos .logo-line::after { display: none; }
.etp-titulos .logo-line-text { font-size: 16px; line-height: 21px; text-transform: none; color: var(--etp-label2); }

.etp-titulos .search-section { margin-bottom: 24px; animation: none; }
.etp-titulos .search-type-tabs { max-width: 360px; margin: 0 auto 12px; padding: 2px; gap: 0; border-radius: 10px; background: var(--etp-fill); }
.etp-titulos .type-tab { flex: 1; height: 32px; padding: 0 8px; border: none; border-radius: 8px; background: none; color: var(--etp-label); font-size: 14px; font-weight: 500; text-transform: none; }
.etp-titulos .type-tab:hover { color: var(--etp-label); }
.etp-titulos .type-tab.active { background: #636366; color: #fff; }
.etp-titulos .search-input { height: 48px; padding: 0 58px 0 16px; background: var(--etp-fill); border: 1px solid transparent; border-radius: var(--etp-radius-sm); clip-path: none; font-size: 17px; font-weight: 400; }
.etp-titulos .search-input::placeholder { color: var(--etp-label3); }
.etp-titulos .search-input:hover:not(:focus) { border-color: transparent; background: var(--etp-fill); }
.etp-titulos .search-input:focus { border-color: var(--etp-accent); background: var(--etp-fill); box-shadow: none; }
.etp-titulos .search-btn { top: 4px; right: 4px; bottom: 4px; width: 44px; border-radius: 9px; clip-path: none; background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 16px; }
.etp-titulos .search-btn:hover { background: var(--etp-accent); opacity: .9; }
.etp-titulos .search-hint { display: none; }

.etp-titulos .results-section { animation: none; }
.etp-titulos .results-label { margin-bottom: 12px; padding-left: 4px; font-size: 14px; line-height: 19px; text-transform: none; color: var(--etp-label2); display: block; }
.etp-titulos .results-label::after { display: none; }
.etp-titulos .results-label span { font-size: 14px !important; }
.etp-titulos .results-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.etp-titulos .result-card { aspect-ratio: auto; display: flex; flex-direction: column; border: 2px solid transparent; border-radius: var(--etp-radius-sm); background: var(--etp-surface); }
.etp-titulos .result-card:hover { transform: none; border-color: var(--etp-accent); box-shadow: none; }
.etp-titulos .result-card:active { opacity: .8; }
.etp-titulos .result-card img { height: auto; aspect-ratio: 2 / 3; }
.etp-titulos .result-card:hover img { filter: none; }
.etp-titulos .rc-no-poster { height: auto; aspect-ratio: 2 / 3; font-size: 12px; }
.etp-titulos .rc-overlay { position: static; opacity: 1; background: none; padding: 7px 8px 9px; display: block; }
.etp-titulos .rc-title { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--etp-label); }
.etp-titulos .rc-year { font-size: 12px; color: var(--etp-label2); }
.etp-titulos .rc-type-badge { top: 6px; left: 6px; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 600; text-transform: none; background: rgba(0, 0, 0, .72); }
.etp-titulos .rc-type-movie { color: var(--etp-accent); }
.etp-titulos .rc-type-tv { color: var(--etp-green); }

.etp-titulos .detail-section { animation: none; }
.etp-titulos .detail-back { height: 44px; margin: 0 0 8px -4px; padding: 0 8px 0 0; border: none; border-radius: 0; gap: 4px; color: var(--etp-accent-text); font-size: 17px; font-weight: 400; text-transform: none; }
.etp-titulos .detail-back i { font-size: 20px; }
.etp-titulos .detail-back:hover { color: var(--etp-accent-text); opacity: .8; }
.etp-titulos .titles-row { gap: 12px; margin-bottom: 16px; }
.etp-titulos .title-box { padding: 14px 16px 16px; border: none; border-radius: var(--etp-radius); box-shadow: none; background: var(--etp-surface); }
.etp-titulos .title-box-en { background: var(--etp-accent-soft); }
.etp-titulos .title-box-label { margin-bottom: 4px; font-size: 13px; text-transform: none; color: var(--etp-label2); }
.etp-titulos .title-box-value { font-size: 22px; line-height: 1.2; font-weight: 700; }
.etp-titulos .title-box-en .title-box-value { padding-right: 0; font-size: 26px; line-height: 1.15; color: var(--etp-label); text-shadow: none; }
.etp-titulos .title-box-year { margin-top: 4px; font-size: 14px; color: var(--etp-label2); }
.etp-titulos .copy-btn { position: static; width: 100%; height: 46px; margin-top: 14px; padding: 0 14px; justify-content: center; gap: 8px; border-radius: var(--etp-radius-sm); background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 16px; font-weight: 600; text-transform: none; }
.etp-titulos .copy-btn:hover { background: var(--etp-accent); transform: none; opacity: .9; }
.etp-titulos .copy-btn.copied { background: var(--etp-green); color: #000; }
.etp-titulos .copy-btn i { font-size: 15px; }

.etp-titulos .detail-main { gap: 16px; margin-bottom: 16px; }
.etp-titulos .detail-poster { border: none; border-radius: var(--etp-radius-sm); box-shadow: none; background: var(--etp-surface); }
.etp-titulos .poster-lang-badge { padding: 2px 6px; border: none; border-radius: 6px; font-size: 10px; font-weight: 600; color: #fff; }
.etp-titulos .detail-rating { font-size: 17px; font-weight: 600; color: var(--etp-label); margin-bottom: 10px; }
.etp-titulos .detail-rating i { color: var(--etp-accent); font-size: 15px; }
.etp-titulos .detail-rating span { font-size: 14px !important; color: var(--etp-label2) !important; }
.etp-titulos .detail-genres { gap: 6px; margin-bottom: 12px; }
.etp-titulos .genre-tag { padding: 3px 10px; border: none; border-radius: 11px; background: var(--etp-fill); color: var(--etp-label2); font-size: 12px; font-weight: 500; text-transform: none; }
.etp-titulos .detail-synopsis-label { margin-bottom: 6px; font-size: 13px; text-transform: uppercase; color: var(--etp-label3); }
.etp-titulos .detail-synopsis { font-size: 15px; line-height: 1.5; font-weight: 400; color: var(--etp-label2); }
.etp-titulos .ficha { margin-top: 0; padding: 16px; border: none; border-radius: var(--etp-radius); background: var(--etp-surface); }
.etp-titulos .ficha-title { margin-bottom: 12px; font-size: 13px; text-transform: uppercase; color: var(--etp-label3); }
.etp-titulos .ficha-title::after { display: none; }
.etp-titulos .ficha-grid { gap: 12px; }
.etp-titulos .ficha-label { font-size: 12px; text-transform: none; color: var(--etp-label3); }
.etp-titulos .ficha-value { font-size: 15px !important; font-weight: 500; }
.etp-titulos .loading-state { padding: 48px 20px; font-size: 14px; color: var(--etp-label2); }
.etp-titulos .loading-spinner { border-top-color: var(--etp-accent); }
.etp-titulos .empty-state { padding: 48px 20px; color: var(--etp-label2); }
.etp-titulos .empty-state p { font-size: 15px; line-height: 21px; }

@media (max-width: 768px) {
    .etp-titulos .wrapper { padding: calc(var(--etp-sat) + 12px) 16px calc(var(--etp-sab) + 40px); }
    .etp-titulos .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .etp-titulos .ficha-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .etp-titulos .detail-main { grid-template-columns: 120px minmax(0, 1fr); }
    .etp-titulos .ficha-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   7. PANEL PLEX — reestilo sobre las clases existentes de plex/index.php
   ========================================================================== */
body.etp-plex {
    --red: var(--etp-accent); --red-dark: var(--etp-accent); --red-dim: var(--etp-accent-soft); --red-border: transparent;
    --bg: var(--etp-bg); --bg2: var(--etp-bg); --bg3: var(--etp-surface); --bg4: var(--etp-surface2); --surface: var(--etp-surface);
    --border: var(--etp-sep); --border2: var(--etp-sep); --text: var(--etp-label); --muted: var(--etp-label3); --muted2: var(--etp-label2);
    --green: var(--etp-green); --amber: var(--etp-yellow); --blue: var(--etp-blue);
    background: var(--etp-bg); color: var(--etp-label); font-size: 15px; line-height: 1.3; -webkit-font-smoothing: antialiased;
}
body.etp-plex, body.etp-plex *:not(i) { font-family: var(--etp-font) !important; }
body.etp-plex *:not(i) { letter-spacing: normal !important; text-transform: none !important; }
.etp-plex .bg-cinema { display: none; }
.etp-plex ::-webkit-scrollbar-thumb:hover { background: var(--etp-surface3); }

/* Barra superior */
.etp-plex .topbar {
    height: calc(44px + var(--etp-sat)); padding: var(--etp-sat) 8px 0; gap: 8px;
    background: var(--etp-bar); border-bottom: 1px solid rgba(84, 84, 88, .4);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.etp-plex .topbar::after { display: none; }
.etp-plex .topbar > div:first-child { gap: 4px !important; min-width: 0; }
.etp-plex .back-link { height: 44px; padding: 0 8px 0 2px; border: none; gap: 4px; color: var(--etp-accent-text); font-size: 17px; }
.etp-plex .back-link i { font-size: 20px; }
.etp-plex .back-link:hover { color: var(--etp-accent-text); opacity: .8; }
html.etp-in-frame .etp-plex .back-link { display: none; }
.etp-plex .topbar-logo { font-size: 17px; font-weight: 600; white-space: nowrap; }
.etp-plex .topbar-logo .accent { background: none; -webkit-text-fill-color: currentColor; color: inherit; }
.etp-plex .topbar-logo .sub { display: none; }
.etp-plex .topbar-right { gap: 8px; }
.etp-plex .live-pill { border: none; padding: 0 4px; font-size: 13px; gap: 6px; }
.etp-plex .live-dot { width: 8px; height: 8px; }
.etp-plex .user-chip { border: none; padding: 0; gap: 8px; font-size: 14px; color: var(--etp-label2); }
.etp-plex .user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--etp-surface2); font-size: 13px; font-weight: 600; }
.etp-plex .btn-top { height: 36px; padding: 0 12px; border: none; border-radius: 18px; background: var(--etp-fill); color: var(--etp-label); font-size: 14px; }
.etp-plex .btn-top:hover { color: var(--etp-label); background: var(--etp-surface3); }

/* Menú lateral (escritorio) */
.etp-plex .layout { min-height: calc(100vh - 44px - var(--etp-sat)); }
.etp-plex .sidebar { width: 232px; min-width: 232px; top: calc(44px + var(--etp-sat)); height: calc(100vh - 44px - var(--etp-sat)); padding: 16px 12px; background: #0B0B0C; border-right: 1px solid rgba(84, 84, 88, .4); }
.etp-plex .srv-wrap { padding: 0 0 8px; }
.etp-plex .srv-label, .etp-plex .nav-section { margin: 14px 0 6px; padding: 0 12px; font-size: 12px; text-transform: uppercase !important; color: var(--etp-label3); }
.etp-plex .srv-label { margin-top: 0; }
.etp-plex .nav-section::before { display: none; }
.etp-plex .srv-select {
    height: 40px; padding: 0 32px 0 12px; border: none; border-radius: 10px; color: var(--etp-label); font-size: 15px; -webkit-appearance: none; appearance: none;
    background: var(--etp-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.etp-plex .nav-item { height: 44px; padding: 0 12px; gap: 12px; border-left: none; border-radius: 10px; color: var(--etp-label2); font-size: 15px; }
.etp-plex .nav-item i { width: 22px; font-size: 16px; }
.etp-plex .nav-item:hover { background: var(--etp-surface); color: var(--etp-label); }
.etp-plex .nav-item.active { background: var(--etp-accent-soft); color: var(--etp-accent-text); }
.etp-plex .nav-badge { min-width: 20px; padding: 2px 6px; border-radius: 10px; background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 12px; text-align: center; }

/* Contenido */
.etp-plex .main { padding: 20px 28px calc(var(--etp-sab) + 40px); min-width: 0; }
.etp-plex .page-header { margin-bottom: 16px; }
.etp-plex .page-title { font-size: 34px; line-height: 41px; font-weight: 700; }
.etp-plex .page-title .line { display: none; }
.etp-plex .page-sub { margin-top: 2px; font-size: 15px; color: var(--etp-label2); }

.etp-plex .stat-grid { gap: 12px; margin-bottom: 16px !important; }
.etp-plex .stat-card { padding: 14px 16px; border: none; border-radius: var(--etp-radius); background: var(--etp-surface); }
.etp-plex .stat-card::before, .etp-plex .stat-card::after { display: none; }
.etp-plex .stat-lbl { margin-bottom: 4px; font-size: 13px; color: var(--etp-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-plex .stat-val { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.etp-plex .stat-sub { margin-top: 2px; font-size: 13px; color: var(--etp-label3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.etp-plex .s-card { margin-bottom: 16px; border: none; border-radius: var(--etp-radius); background: var(--etp-surface); }
.etp-plex .s-card::before { display: none; }
.etp-plex .s-head { padding: 14px 16px 10px; border-bottom: none; font-size: 17px; font-weight: 600; }
.etp-plex .s-head .tag { font-size: 13px; color: var(--etp-label3); }
.etp-plex .s-body { padding: 4px 16px 16px; }

.etp-plex .sess-card { gap: 12px; padding: 12px; margin-bottom: 10px; border: none; border-radius: var(--etp-radius-sm); background: var(--etp-surface2); }
.etp-plex .sess-thumb { width: 76px; height: 44px; border: none; border-radius: 8px; background: var(--etp-surface3); }
.etp-plex .sess-title { font-size: 15px; font-weight: 600; }
.etp-plex .sess-meta { font-size: 13px; color: var(--etp-label2); }
.etp-plex .sess-meta i { font-size: 11px !important; }
.etp-plex .sess-prog { height: 4px; border-radius: 2px; overflow: hidden; background: var(--etp-fill); }
.etp-plex .sess-prog-bar { background: var(--etp-accent); }
.etp-plex .sess-pct { font-size: 12px; }
.etp-plex .btn-act { min-width: 40px; min-height: 40px; padding: 0 12px; border: none; border-radius: 20px; background: var(--etp-fill); color: var(--etp-label); font-size: 14px; }
.etp-plex .btn-act:hover { color: var(--etp-red-text); background: var(--etp-surface3); }
.etp-plex .btn-act.msg:hover { color: var(--etp-blue); }

.etp-plex .badge { padding: 3px 10px; border: none !important; border-radius: 11px; font-size: 12px; font-weight: 600; }
.etp-plex .b-green { background: rgba(48, 209, 88, .16); }
.etp-plex .b-amber { background: rgba(255, 214, 10, .16); }
.etp-plex .b-blue { background: rgba(10, 132, 255, .18); }
.etp-plex .b-gray { background: var(--etp-fill); color: var(--etp-label2); }
.etp-plex .b-red { background: rgba(255, 69, 58, .18); color: var(--etp-red-text); }

.etp-plex .lib-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.etp-plex .lib-item { border: none; border-radius: var(--etp-radius-sm); background: var(--etp-surface2); }
.etp-plex .lib-item:hover { transform: none; }
.etp-plex .lib-poster { background: var(--etp-surface3); }
.etp-plex .lib-info { padding: 7px 8px 9px; }
.etp-plex .lib-title { font-size: 13px; font-weight: 600; }
.etp-plex .lib-year { font-size: 12px; color: var(--etp-label2); }

.etp-plex .hist-item { gap: 12px; padding: 10px 0; border-bottom-color: var(--etp-sep); }
.etp-plex .hist-thumb { width: 54px; height: 32px; border: none; border-radius: 6px; background: var(--etp-surface3); }
.etp-plex .hist-item div[style*="font-size:13px"] { font-size: 15px !important; }
.etp-plex .hist-item div[style*="font-size:11px"], .etp-plex .hist-item div[style*="font-size:10px"] { font-size: 13px !important; }

.etp-plex .rank-table th { padding: 8px 10px; font-size: 12px; font-weight: 500; color: var(--etp-label3); border-bottom-color: var(--etp-sep); }
.etp-plex .rank-table td { padding: 12px 10px; font-size: 15px; border-bottom-color: var(--etp-sep); }
.etp-plex .rank-table tr:hover td { background: none; }
.etp-plex .rank-num { width: 36px; font-size: 20px; font-weight: 700; text-shadow: none !important; }
.etp-plex tr:nth-child(1) .rank-num { color: var(--etp-accent-text); }
.etp-plex .rank-table td span[style*="Bebas"] { font-size: 17px !important; font-weight: 700; }
.etp-plex .rank-bar { height: 4px; border-radius: 2px; overflow: hidden; background: var(--etp-fill); }
.etp-plex .rank-bar-fill { background: var(--etp-accent); }

.etp-plex .add-form { padding: 16px; margin-bottom: 16px !important; border: none !important; border-radius: var(--etp-radius); background: var(--etp-surface); }
.etp-plex .add-form-title { margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.etp-plex .add-form-title .line { display: none; }
.etp-plex .add-form p, .etp-plex .add-form > div[style*="font-size:10px"] { font-size: 14px !important; line-height: 19px; color: var(--etp-label2) !important; }
.etp-plex .add-form code { color: var(--etp-accent-text) !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; }
.etp-plex .form-row { gap: 12px; }
.etp-plex .form-label { margin-bottom: 6px; padding-left: 4px; font-size: 13px; color: var(--etp-label2); }
.etp-plex .form-input { min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--etp-radius-sm); background: var(--etp-fill); font-size: 16px; }
.etp-plex .form-input:focus { border-color: var(--etp-accent); background: var(--etp-fill); box-shadow: none; }
.etp-plex .form-input::placeholder { color: var(--etp-label3); }
.etp-plex .btn-primary { min-height: 44px; padding: 0 18px; border-radius: var(--etp-radius-sm); clip-path: none; color: var(--etp-accent-ink); font-size: 16px !important; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.etp-plex .btn-primary::before { display: none; }
.etp-plex .btn-primary:hover { background: var(--etp-accent); box-shadow: none; opacity: .9; }
.etp-plex .btn-danger { min-height: 36px; padding: 0 14px; border: none; border-radius: 18px; background: var(--etp-fill); color: var(--etp-red-text); font-size: 14px; }
.etp-plex .btn-danger:hover { background: var(--etp-surface3); color: var(--etp-red-text); }
.etp-plex #discover-results > div[style] { border: none !important; border-radius: var(--etp-radius-sm); background: var(--etp-surface2) !important; }

.etp-plex .srv-grid { gap: 12px; }
.etp-plex .srv-card { padding: 16px; border: none; border-radius: var(--etp-radius); background: var(--etp-surface); }
.etp-plex .srv-card::before { display: none; }
.etp-plex .srv-card-icon { width: 40px; height: 40px; border: none; border-radius: 10px; background: var(--etp-accent-soft); color: var(--etp-accent-text); }
.etp-plex .srv-card-name { font-size: 18px; font-weight: 700; }
.etp-plex .srv-card-url { font-size: 13px; color: var(--etp-label2); word-break: break-all; }
.etp-plex .srv-meta-item { font-size: 13px; }
.etp-plex .srv-meta-item strong { font-size: 15px; font-weight: 600; }

.etp-plex .empty { padding: 48px 20px; color: var(--etp-label2); }
.etp-plex .empty-text { font-size: 15px; }
.etp-plex .loading { padding: 48px 20px; font-size: 14px; color: var(--etp-label2); }
.etp-plex .spinner { border-color: var(--etp-fill); border-top-color: var(--etp-accent); }

.etp-plex .toast { left: 50%; right: auto; bottom: calc(var(--etp-sab) + 20px); transform: translate(-50%, 16px); max-width: calc(100vw - 32px); padding: 12px 20px; border: none !important; border-radius: 22px; background: var(--etp-surface3); font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.etp-plex .toast.show { transform: translate(-50%, 0); }
.etp-plex .toast::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--etp-green); vertical-align: 1px; }
.etp-plex .toast.err::before { background: var(--etp-red); }

.etp-plex .modal-overlay { background: rgba(0, 0, 0, .5); z-index: 2000; }
.etp-plex .modal-box { width: 440px; padding: 22px 20px 20px; border: none; border-radius: 22px; clip-path: none; background: #151517; }
.etp-plex .modal-corner { display: none; }
.etp-plex .modal-title { font-size: 22px; font-weight: 700; }
.etp-plex .modal-title i { display: none; }
.etp-plex .modal-sub { font-size: 15px; color: var(--etp-label2); margin-bottom: 14px; }
.etp-plex .modal-textarea { min-height: 96px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--etp-radius-sm); background: var(--etp-fill); font-size: 16px; }
.etp-plex .modal-textarea:focus { border-color: var(--etp-accent); }
.etp-plex .modal-actions { gap: 10px; margin-top: 16px; }
.etp-plex .modal-actions > * { flex: 1; min-height: 50px; border-radius: 14px; font-size: 17px !important; font-weight: 600; }
.etp-plex .btn-cancel { border: none; background: var(--etp-fill); color: var(--etp-label); }
.etp-plex .btn-cancel:hover { color: var(--etp-label); }

/* Conexión con Plex */
.etp-plex #plex-login { min-height: calc(100vh - 44px - var(--etp-sat)); padding: 24px 16px; }
.etp-plex .plex-card { width: 400px; max-width: 100%; padding: 28px 24px 24px; border: none; border-radius: 22px; clip-path: none; animation: none; background: var(--etp-surface); }
.etp-plex .plex-card::before, .etp-plex .card-corner { display: none; }
.etp-plex .plex-logo img { width: 220px; max-width: 70%; height: auto; display: block; margin: 0 auto; }
.etp-plex .plex-sub { margin: 4px 0 4px; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--etp-label); }
.etp-plex .plex-heading { margin-bottom: 20px; justify-content: center; font-size: 15px; color: var(--etp-label2); }
.etp-plex .plex-heading::before, .etp-plex .plex-heading::after { display: none; }
.etp-plex .btn-plex-login { min-height: 52px; padding: 0 18px; border-radius: var(--etp-radius); clip-path: none; color: var(--etp-accent-ink); font-size: 17px; font-weight: 600; }
.etp-plex .btn-plex-login::before { display: none; }
.etp-plex .btn-plex-login:hover { background: var(--etp-accent); box-shadow: none; transform: none; opacity: .9; }
.etp-plex .pin-box { margin-top: 18px; padding: 16px; border: none; border-radius: var(--etp-radius-sm); background: var(--etp-fill); }
.etp-plex .pin-box > div[style] { font-size: 13px !important; color: var(--etp-label2) !important; }
.etp-plex .pin-code { font-size: 34px; font-weight: 700; letter-spacing: 10px !important; color: var(--etp-accent-text); font-variant-numeric: tabular-nums; }
.etp-plex .pin-status { font-size: 14px; color: var(--etp-label2); }

/* Teléfono: el menú lateral pasa a ser una fila de accesos bajo la barra */
@media (max-width: 768px) {
    .etp-plex .layout { flex-direction: column; }
    .etp-plex .sidebar {
        display: flex; align-items: center; gap: 8px; width: auto; min-width: 0; height: auto; padding: 8px 16px;
        position: sticky; top: calc(44px + var(--etp-sat)); z-index: 90; overflow-x: auto; scrollbar-width: none;
        background: var(--etp-bar); border-right: none; border-bottom: 1px solid rgba(84, 84, 88, .4);
        -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    }
    .etp-plex .sidebar::-webkit-scrollbar { display: none; }
    .etp-plex .srv-wrap { flex: none; padding: 0; }
    .etp-plex .srv-label, .etp-plex .nav-section { display: none; }
    .etp-plex .srv-select { width: auto; max-width: 190px; height: 36px; border-radius: 18px; font-weight: 500; }
    .etp-plex .nav-item { flex: none; height: 36px; padding: 0 14px; gap: 6px; border-radius: 18px; background: var(--etp-surface); color: var(--etp-label); font-size: 15px; font-weight: 500; white-space: nowrap; }
    .etp-plex .nav-item i { width: auto; font-size: 13px; }
    .etp-plex .nav-item.active { background: var(--etp-accent); color: var(--etp-accent-ink); }
    .etp-plex .nav-item.active .nav-badge { background: var(--etp-accent-ink); color: var(--etp-accent); }
    .etp-plex .nav-badge { margin-left: 2px; }
    .etp-plex .main { padding: 10px 16px calc(var(--etp-sab) + 32px); overflow: visible; }
    .etp-plex .stat-grid { grid-template-columns: 1fr 1fr; }
    .etp-plex .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .etp-plex .user-chip span, .etp-plex .live-pill { display: none; }
    .etp-plex .btn-top { width: 36px; padding: 0; font-size: 0; justify-content: center; display: inline-flex; align-items: center; }
    .etp-plex .btn-top i { font-size: 14px; }
    .etp-plex .sess-card { flex-wrap: wrap; }
    .etp-plex .sess-info { flex: 1 1 60%; }
    .etp-plex .sess-actions { width: 100%; justify-content: flex-end; }
    .etp-plex .form-row { flex-direction: column; align-items: stretch; }
    .etp-plex .form-group { min-width: 0; }
    .etp-plex .modal-overlay { align-items: flex-end; }
    .etp-plex .modal-box { width: 100%; max-width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(var(--etp-sab) + 20px); }
    .etp-plex .scrollable { max-height: none; }
    .etp-plex .rank-table th:nth-child(4), .etp-plex .rank-table td:nth-child(4) { display: none; }
}

/* ==========================================================================
   8. CLIENTES — buscador flotante y bibliotecas de Plex
   ========================================================================== */

/* Buscador: barra flotante SIEMPRE visible, fija abajo (sobre la barra de pestañas).
   Desde que se abre Clientes está a mano, sin tener que subir la lista. */
.etp-skin .search-hero {
    position: fixed; left: 12px; right: 12px; z-index: 950;
    bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 10px);
    margin: 0; padding: 6px; clear: none;
    background: var(--etp-bar); border-radius: 22px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .4), 0 0 0 .5px rgba(84, 84, 88, .5);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
body.etp-skin.light .search-hero { box-shadow: 0 8px 24px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(60, 60, 67, .2); }
/* Al estar abajo, los resultados se abren hacia arriba */
.etp-skin .search-hero .search-dropdown { top: auto; bottom: calc(100% + 12px); max-height: min(52vh, 360px); border-radius: var(--etp-radius-sm); overscroll-behavior: contain; }
/* El contenido deja espacio para que la barra no tape el final de la lista */
.etp-skin .main { padding-bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 96px) !important; }
/* Toast y botones flotantes suben por encima de la barra de búsqueda */
body.etp-skin:has(.search-hero) .toast { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 84px); }
.etp-skin .float-btns { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 84px) !important; }
@media (min-width: 768px) {
    /* Escritorio: no hay barra de pestañas; centrada y con ancho cómodo */
    .etp-skin .search-hero { left: 50%; right: auto; width: min(620px, calc(100vw - 32px)); transform: translateX(-50%); bottom: 16px; }
    .etp-skin .main { padding-bottom: 110px !important; }
    body.etp-skin:has(.search-hero) .toast { bottom: 92px; }
    .etp-skin .float-btns { bottom: 92px !important; }
}

/* Acceso en Plex (editar cliente) y lista de bibliotecas */
.plx-section { margin-top: 20px; padding: 14px; background: var(--etp-surface); border-radius: var(--etp-radius); }
.plx-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.plx-section-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; color: var(--etp-label); }
.plx-section-title svg { width: 18px; height: 18px; fill: var(--etp-accent); flex: none; }
.plx-refresh { height: 32px; padding: 0 12px; border: none; border-radius: 16px; background: var(--etp-fill); color: var(--etp-accent-text); font-size: 14px; font-weight: 500; cursor: pointer; }
.plx-refresh:disabled { opacity: .5; cursor: default; }

.plx-status, .plx-warn { padding: 10px 12px; border-radius: var(--etp-radius-sm); font-size: 14px; line-height: 19px; color: var(--etp-label); }
.plx-status { margin-bottom: 12px; }
.plx-status.plx-ok   { background: rgba(48, 209, 88, .16); }
.plx-status.plx-warn { background: rgba(255, 159, 10, .16); }
.plx-status.plx-info { background: rgba(10, 132, 255, .16); }
.plx-warn { background: rgba(255, 159, 10, .16); }
.plx-warn .plx-link { margin-left: 8px; }
.plx-loading, .plx-note { padding: 14px 4px; font-size: 14px; color: var(--etp-label3); text-align: center; }

.plx-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 8px; font-size: 13px; color: var(--etp-label3); }
.plx-n { color: var(--etp-label); font-weight: 600; }
.plx-quick { display: flex; gap: 16px; }
.plx-link { background: none; border: none; padding: 4px 0; color: var(--etp-accent-text); font-size: 14px; font-weight: 500; cursor: pointer; }

.plx-list { background: var(--etp-surface2); border-radius: var(--etp-radius-sm); overflow: hidden; }
.plx-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; cursor: pointer; border-bottom: .5px solid var(--etp-sep); -webkit-tap-highlight-color: transparent; }
.plx-row:last-child { border-bottom: none; }
.plx-row:active { background: var(--etp-surface3); }
.plx-ico { flex: none; width: 24px; font-size: 18px; text-align: center; }
.plx-name { flex: 1; min-width: 0; font-size: 16px; line-height: 20px; color: var(--etp-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plx-row input { position: absolute; opacity: 0; pointer-events: none; }
.plx-switch { position: relative; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--etp-surface3); transition: background .2s; }
.plx-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.plx-row input:checked + .plx-switch { background: var(--etp-green); }
.plx-row input:checked + .plx-switch::after { transform: translateX(20px); }
.plx-row input:disabled + .plx-switch { opacity: .45; }
.plx-row:has(input:disabled) { cursor: default; }
.plx-row:has(input:disabled):active { background: none; }

/* Botón único de acción: queda visible abajo mientras se revisa la lista */
.plx-actions { position: sticky; bottom: 0; z-index: 2; margin: 12px -14px -14px; padding: 12px 14px 14px; background: linear-gradient(to top, var(--etp-surface) 72%, transparent); border-radius: 0 0 var(--etp-radius) var(--etp-radius); }
.plx-apply { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border: none; border-radius: 14px; background: var(--etp-accent); color: var(--etp-accent-ink); font-size: 17px; font-weight: 600; cursor: pointer; }
.plx-apply:disabled { background: var(--etp-fill); color: var(--etp-label3); cursor: default; }

/* Modal "Compartir en Plex": botones al estilo del resto */
.etp-skin #plexInviteBtn { height: 50px; padding: 0 14px !important; border: none !important; border-radius: 14px !important; background: var(--etp-accent) !important; color: var(--etp-accent-ink) !important; font-size: 17px !important; font-weight: 600 !important; }
.etp-skin #plexInviteBtn svg { fill: var(--etp-accent-ink) !important; }
.etp-skin #plexInviteBtn:disabled { opacity: .6; }
.etp-skin #modalPlexInvite .btn-cancel { height: 50px; border: none; border-radius: 14px; background: var(--etp-fill); color: var(--etp-label); font-size: 17px; font-weight: 500; }
.etp-skin #modalPlexInvite .modal-title { color: var(--etp-label) !important; }

/* ==========================================================================
   9. INICIO — panel rápido, aplicaciones como íconos y barra con botón ＋
   (solo afecta a dashboard.php: body.etp-home2)
   ========================================================================== */
.etp-home2 .etp-h-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 6px; }
.etp-home2 .etp-h-head-text { min-width: 0; }
.etp-home2 .etp-h-date { margin: 4px 0 0; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--etp-label3); }
.etp-home2 .etp-large-title { margin-top: 2px; font-size: 30px; line-height: 36px; }
.etp-home2 .etp-h-head .etp-avatar-btn { margin-top: 6px; }
.etp-home2 .etp-h-head .etp-avatar { width: 38px; height: 38px; background: var(--etp-accent); color: var(--etp-accent-ink); font-weight: 700; }

.etp-h-panel { margin-top: 18px; display: grid; gap: 12px; }
.etp-h-panel[hidden] { display: none; }

/* Tarjeta principal: Plex en vivo */
.etp-h-plex {
    display: grid; gap: 10px; padding: 16px; border-radius: 20px; color: var(--etp-label);
    background: radial-gradient(120% 140% at 100% 0%, rgba(255, 159, 10, .22) 0%, rgba(255, 159, 10, 0) 55%), var(--etp-surface);
    box-shadow: inset 0 0 0 .5px rgba(255, 159, 10, .25);
}
.etp-h-plex:active { opacity: .85; }
.etp-h-plex[hidden] { display: none; }
.etp-h-plex-top { display: flex; align-items: center; justify-content: space-between; }
.etp-h-plex-label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--etp-accent-text); }
.etp-h-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--etp-label3); }
.etp-h-dot.is-ok { background: var(--etp-green); box-shadow: 0 0 0 3px rgba(48, 209, 88, .22); }
.etp-h-dot.is-warn { background: var(--etp-yellow); }
.etp-h-dot.is-bad { background: var(--etp-red); }
.etp-h-plex-main { display: flex; align-items: baseline; gap: 10px; }
.etp-h-big { font-size: 54px; line-height: 56px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.etp-h-big-sub { font-size: 15px; color: var(--etp-label2); }
.etp-h-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.etp-h-chip { font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: 9px; background: var(--etp-fill); color: #E5E5EA; white-space: nowrap; }
.etp-h-chip.is-warn { background: rgba(255, 159, 10, .18); color: var(--etp-accent-text); }
.etp-h-chip.is-bad { background: rgba(255, 69, 58, .18); color: var(--etp-red-text); }
.etp-h-chip.is-blue { background: rgba(10, 132, 255, .18); color: #64A8FF; }

/* Cifras de clientes */
.etp-h-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.etp-h-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.etp-h-tile { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: var(--etp-radius); background: var(--etp-surface); color: var(--etp-label); min-width: 0; }
.etp-h-tile:active { background: var(--etp-surface2); }
.etp-h-tile[hidden] { display: none; }
.etp-h-tile-k { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--etp-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-h-tile-k i { font-size: 12px; color: var(--etp-label3); width: 14px; text-align: center; }
.etp-h-tile-v { font-size: 28px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-h-tile-v.is-warn { color: var(--etp-yellow); }
.etp-h-tile-v.is-bad { color: var(--etp-red-text); }
.etp-h-tile-v.is-good { color: var(--etp-green); }
.etp-h-tile-s { font-size: 13px; color: var(--etp-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etp-home2 .etp-section-label { margin: 22px 0 8px 4px; }
.etp-home2 .etp-section-label[hidden], .etp-home2 .etp-list[hidden] { display: none; }

/* Aplicaciones: íconos como en la pantalla de inicio del iPhone */
.etp-h-apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 8px; padding: 6px 2px 4px; }
.etp-h-apps[hidden] { display: none; }
.etp-h-app { display: flex; flex-direction: column; align-items: center; gap: 7px; border: none; background: none; padding: 0; color: var(--etp-label); cursor: pointer; min-width: 0; }
.etp-h-app-icon {
    position: relative; width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; color: #fff;
    background: linear-gradient(160deg, color-mix(in srgb, var(--etp-row-color, var(--etp-accent)) 100%, #fff 18%), var(--etp-row-color, var(--etp-accent)));
    box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}
.etp-h-app:active .etp-h-app-icon { transform: scale(.94); }
.etp-h-app-ext { position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--etp-surface3); display: grid; place-items: center; font-size: 9px; color: var(--etp-label); box-shadow: 0 0 0 2px var(--etp-bg); }
.etp-h-app-name { width: 100%; font-size: 11.5px; line-height: 14px; text-align: center; color: var(--etp-label2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-transform: capitalize; }
.etp-h-app.is-add .etp-h-app-icon { background: var(--etp-surface); color: var(--etp-label3); box-shadow: inset 0 0 0 1.5px var(--etp-surface3); }

/* Barra inferior con botón central ＋ */
.etp-tabbar2 .etp-tab-plus { position: relative; }
.etp-tabbar2 .etp-tab-plus span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.etp-tabbar2 .etp-tab-plus i {
    width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
    background: var(--etp-accent); color: var(--etp-accent-ink); box-shadow: 0 6px 18px rgba(255, 159, 10, .35), 0 0 0 4px var(--etp-bg);
}
.etp-tabbar2 .etp-tab-plus.is-active i { transform: rotate(45deg); }
.etp-tabbar2 .etp-tab-plus i { transition: transform .2s; }

/* Hojas */
.etp-sheet-label { margin: 16px 4px 8px; font-size: 13px; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; color: var(--etp-label3); }
.etp-sheet-label[hidden], .etp-sheet .etp-list[hidden] { display: none; }
.etp-quick-title { margin: 0 4px 14px; font-size: 20px; font-weight: 700; }
.etp-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px; padding-bottom: 6px; }
.etp-quick-item { display: flex; flex-direction: column; align-items: center; gap: 8px; border: none; background: none; padding: 0; color: var(--etp-label); cursor: pointer; min-width: 0; }
.etp-quick-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: var(--etp-row-color, var(--etp-accent)); background: color-mix(in srgb, var(--etp-row-color, var(--etp-accent)) 20%, transparent); }
.etp-quick-item:active .etp-quick-icon { transform: scale(.94); }
.etp-quick-label { font-size: 12px; line-height: 15px; text-align: center; color: var(--etp-label2); }

@media (min-width: 900px) {
    .etp-home2 .etp-page { max-width: 1120px; }
    .etp-home2 .etp-h-head .etp-avatar-btn { position: static; }
    .etp-home2 .etp-large-title { font-size: 34px; line-height: 41px; }
    .etp-h-panel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; }
    .etp-h-plex { grid-row: span 2; }
    .etp-h-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .etp-home2 #attLabel, .etp-home2 #attList { grid-column: 1 / -1; }
    .etp-home2 #attLabel { margin-bottom: -4px; }
    .etp-h-apps { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 22px 12px; }
    .etp-h-app:hover .etp-h-app-icon { filter: brightness(1.08); }
    .etp-tabbar2 .etp-tab-plus span { position: static; width: auto; height: auto; clip: auto; }
    .etp-tabbar2 .etp-tab-plus i { width: 22px; height: auto; margin: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; font-size: 16px; }
    .etp-tabbar2 .etp-tab-plus.is-active i { transform: none; }
    .etp-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.etp-h-chip.is-srv::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--etp-green); margin-right: 6px; vertical-align: 1px; }
.etp-h-chip.is-srv.is-bad::before { background: var(--etp-red); }
.etp-h-plex { align-content: start; }
.etp-h-chips { align-items: center; align-self: end; }
@media (min-width: 900px) { .etp-h-plex { align-content: space-between; } }

/* ==========================================================================
   10. CLIENTES CON LA BARRA COMÚN DE LA APP (teléfono)
   Abajo: Inicio · Plex · ＋ · Clientes · Más (assets/js/etp-appbar.js).
   Los atajos que estaban abajo (Métricas, Herramientas, Config) pasan arriba.
   ========================================================================== */
.etp-cl-chips { display: none; }
@media (max-width: 767px) {
    .etp-skin .etp-cl-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 6px 0 4px; padding: 2px 0; }
    .etp-skin .etp-cl-chips::-webkit-scrollbar { display: none; }
    .etp-skin .etp-cl-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: none; border-radius: 17px; background: var(--etp-surface); color: var(--etp-label); font-size: 14px; font-weight: 500; cursor: pointer; }
    .etp-skin .etp-cl-chip i { color: var(--etp-accent-text); font-size: 13px; }
    .etp-skin .etp-cl-chip:active { background: var(--etp-surface2); }
    .etp-skin.has-appbar .bottom-nav { display: none !important; }
    .etp-skin.has-appbar .nav-back { visibility: hidden; }
    /* El ＋ sobresale 22 px: el buscador y lo flotante suben un poco más */
    .etp-skin.has-appbar .search-hero { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 34px); }
    .etp-skin.has-appbar .float-btns { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 108px) !important; }
    body.etp-skin.has-appbar:has(.search-hero) .toast { bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 108px); }
    .etp-skin.has-appbar .main { padding-bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 120px) !important; }
}
@media (min-width: 768px) {
    .etp-skin .etp-appbar, .etp-skin .etp-ab-sheet, .etp-skin .etp-ab-backdrop { display: none; }
}
@media (max-width: 767px) {
    /* Junto al ＋ central, el botón del buscador se distingue: agregar cliente, en tono neutro */
    .etp-skin.has-appbar .hero-add-btn { background: var(--etp-fill) !important; color: var(--etp-accent-text) !important; font-size: 17px; }
}

/* ---- Inicio en teléfono: panel compacto para que las aplicaciones se vean completas sin bajar ---- */
@media (max-width: 899px) {
    .etp-home2 .etp-page { padding-bottom: calc(var(--etp-tab-h) + var(--etp-sab) + 40px); }
    .etp-home2 .etp-h-head { padding-top: 0; }
    .etp-home2 .etp-h-date { margin-top: 0; font-size: 12px; line-height: 16px; }
    .etp-home2 .etp-large-title { font-size: 28px; line-height: 34px; }
    .etp-home2 .etp-h-head .etp-avatar { width: 36px; height: 36px; }
    .etp-h-panel { margin-top: 12px; gap: 10px; }
    .etp-h-plex { gap: 6px; padding: 12px 14px; border-radius: 18px; }
    .etp-h-plex-label { font-size: 14px; }
    .etp-h-big { font-size: 44px; line-height: 46px; }
    .etp-h-big-sub { font-size: 14px; }
    .etp-h-chip { font-size: 12px; padding: 3px 8px; }
    /* Las cuatro cifras de clientes en una sola fila */
    .etp-h-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .etp-h-tiles .etp-h-tile { padding: 9px 8px 8px; gap: 2px; }
    .etp-h-tiles .etp-h-tile-k { font-size: 11.5px; gap: 0; }
    .etp-h-tiles .etp-h-tile-k i { display: none; }
    .etp-h-tiles .etp-h-tile-v { font-size: 24px; line-height: 28px; }
    /* Ingresos y Visto 24 h lado a lado */
    .etp-h-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .etp-h-pair .etp-h-tile { padding: 9px 12px 8px; gap: 2px; }
    .etp-h-pair .etp-h-tile-k { font-size: 12px; }
    .etp-h-pair .etp-h-tile-v { font-size: 22px; line-height: 27px; }
    .etp-h-pair .etp-h-tile-s { font-size: 12px; }
    .etp-h-hide-s { display: none; }
    .etp-home2 .etp-section-label { margin: 14px 0 6px 4px; }
    .etp-home2 #attList .etp-row { min-height: 50px; }
    /* Aplicaciones: hasta 5 íconos en una sola fila (la app muestra 4 + Agregar) */
    .etp-h-apps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 4px; padding: 2px 0 0; }
    .etp-h-app-icon { width: 54px; height: 54px; border-radius: 14px; font-size: 23px; }
    .etp-h-app { gap: 5px; }
    .etp-h-app-name { font-size: 11px; line-height: 13px; }
}

/* ==========================================================================
   11. INICIO — ingresos ocultos y pantalla completa en el teléfono
   - Ingresos activos se muestra como ••••••; un toque lo muestra (dashboard.php)
   - En teléfono el Inicio ocupa todo el alto: el panel se reparte el espacio
     libre y las aplicaciones quedan justo encima de la barra inferior.
   ========================================================================== */
.etp-h-tile.is-secret { cursor: pointer; -webkit-user-select: none; user-select: none; outline: none; }
.etp-h-tile.is-secret:focus-visible { box-shadow: 0 0 0 2px var(--etp-accent); }
.etp-h-tile-k .etp-h-eye { margin-left: auto; width: auto; font-size: 13px; color: var(--etp-label3); }
.etp-h-tile.is-secret[aria-pressed="true"] .etp-h-eye { color: var(--etp-accent-text); }

@media (max-width: 899px) {
    .etp-home2 .etp-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
    .etp-home2 .etp-h-head { flex: none; }
    .etp-home2 .etp-h-panel { display: flex; flex-direction: column; flex: 1 1 auto; margin-top: clamp(12px, 1.8dvh, 20px); gap: clamp(10px, 1.5dvh, 16px); }
    .etp-home2 .etp-h-panel[hidden] { display: none; }
    /* Tarjeta Plex: título arriba, la cifra grande al centro, chips abajo */
    .etp-home2 .etp-h-plex { flex: 3 1 auto; grid-template-rows: auto 1fr auto; align-content: stretch; padding: clamp(12px, 1.8dvh, 18px) 16px; }
    .etp-home2 .etp-h-plex-main { align-self: center; }
    .etp-home2 .etp-h-big { font-size: clamp(44px, 8.4dvh, 84px); line-height: 1.04; }
    .etp-home2 .etp-h-big-sub { font-size: clamp(14px, 2.1dvh, 19px); }
    .etp-home2 .etp-h-chip { font-size: clamp(12px, 1.6dvh, 14px); padding: 4px 10px; }
    .etp-home2 .etp-h-plex-label { font-size: clamp(14px, 1.8dvh, 16px); }
    /* Cifras de clientes */
    .etp-home2 .etp-h-tiles, .etp-home2 .etp-h-pair { flex: 1 1 auto; gap: clamp(8px, 1.2dvh, 12px); }
    .etp-home2 .etp-h-tiles { max-height: clamp(80px, 12dvh, 118px); }
    .etp-home2 .etp-h-pair { max-height: clamp(86px, 13dvh, 128px); }
    .etp-home2 .etp-h-tiles .etp-h-tile, .etp-home2 .etp-h-pair .etp-h-tile { align-content: center; }
    .etp-home2 .etp-h-tiles .etp-h-tile-k { font-size: clamp(11.5px, 1.5dvh, 13px); }
    .etp-home2 .etp-h-tiles .etp-h-tile-v { font-size: clamp(24px, min(3.8dvh, 8.4vw), 36px); line-height: 1.12; }
    .etp-home2 .etp-h-pair .etp-h-tile-k { font-size: clamp(12px, 1.6dvh, 14px); }
    .etp-home2 .etp-h-pair .etp-h-tile-v { font-size: clamp(22px, min(3.2dvh, 6vw), 30px); line-height: 1.15; }
    .etp-home2 .etp-h-pair .etp-h-tile-s { font-size: clamp(12px, 1.5dvh, 13.5px); }
    /* Aplicaciones: pegadas a la barra inferior, un poco más grandes */
    .etp-home2 .etp-section-label { flex: none; margin: clamp(14px, 2.2dvh, 24px) 0 clamp(6px, 1dvh, 10px) 4px; }
    .etp-home2 .etp-h-apps { flex: none; row-gap: clamp(12px, 2dvh, 22px); }
    .etp-home2 .etp-h-app-icon { width: clamp(54px, min(7.2dvh, 15.5vw), 68px); height: clamp(54px, min(7.2dvh, 15.5vw), 68px); border-radius: 22%; font-size: clamp(23px, 3.2dvh, 30px); }
    .etp-home2 .etp-h-app-name { font-size: clamp(11px, 1.45dvh, 12.5px); line-height: 1.2; }
    .etp-home2 .etp-page { padding-bottom: calc(var(--etp-tab-h) + var(--etp-sab) + clamp(34px, 4.5dvh, 48px)); }
}
