/**
 * EduProfe — controles de formulario (checkbox, radio, date/time).
 * Se carga en panel, Aula, RGA, familia y home.
 * Excluye toggles Tailwind (.sr-only / .peer) y .ep-fc-skip / .filter-input.
 */
:root {
    --ep-fc-blue: #0070B0;
    --ep-fc-gold: #F0C000;
    --ep-fc-ink: #1E3A5F;
    --ep-fc-line: #d4c4a8;
    --ep-fc-bg: #ffffff;
    --ep-fc-soft: #FFF8EB;
    --ep-fc-muted: #8a7a5c;
}

/* ── Checkbox ─────────────────────────────────────────── */
input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden) {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    margin: 0;
    flex-shrink: 0;
    vertical-align: middle;
    box-sizing: border-box;
    border: 2px solid var(--ep-fc-line);
    border-radius: 7px;
    background: var(--ep-fc-bg);
    cursor: pointer;
    position: relative;
    transition:
        background .15s ease,
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):hover {
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.1);
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):focus-visible {
    outline: 2px solid var(--ep-fc-gold);
    outline-offset: 2px;
    border-color: var(--ep-fc-blue);
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked {
    background: var(--ep-fc-blue);
    border-color: var(--ep-fc-blue);
    transform: scale(1.04);
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked::after {
    content: '';
    position: absolute;
    left: 0.32rem;
    top: 0.1rem;
    width: 0.28rem;
    height: 0.55rem;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):indeterminate {
    background: var(--ep-fc-blue);
    border-color: var(--ep-fc-blue);
}

input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):indeterminate::after {
    content: '';
    position: absolute;
    left: 0.22rem;
    top: 0.42rem;
    width: 0.55rem;
    height: 0;
    border: none;
    border-top: 2.5px solid #fff;
    transform: none;
}

/* ── Radio (formulario; no el widget Radio EduProfe) ───── */
input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden) {
    -webkit-appearance: none;
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    min-width: 1.2rem;
    min-height: 1.2rem;
    margin: 0;
    flex-shrink: 0;
    vertical-align: middle;
    box-sizing: border-box;
    border: 2px solid var(--ep-fc-line);
    border-radius: 999px;
    background: var(--ep-fc-bg);
    cursor: pointer;
    position: relative;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):hover {
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.1);
}

input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):focus-visible {
    outline: 2px solid var(--ep-fc-gold);
    outline-offset: 2px;
}

input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked {
    border-color: var(--ep-fc-blue);
    background: #fff;
}

input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--ep-fc-blue);
    transform: translate(-50%, -50%);
}

input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Color ────────────────────────────────────────────── */
input[type="color"]:not(.ep-fc-skip) {
    -webkit-appearance: none;
    appearance: none;
    width: 3.1rem;
    height: 2.55rem;
    min-width: 3.1rem;
    min-height: 2.55rem;
    padding: 0.28rem;
    border: 1.5px solid var(--ep-fc-line);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, var(--ep-fc-soft) 100%);
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: middle;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="color"]:not(.ep-fc-skip):hover {
    border-color: #c4a574;
}
input[type="color"]:not(.ep-fc-skip):focus-visible {
    outline: 2px solid var(--ep-fc-blue);
    outline-offset: 2px;
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.14);
}
input[type="color"]:not(.ep-fc-skip)::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
}
input[type="color"]:not(.ep-fc-skip)::-webkit-color-swatch {
    border: 1px solid rgba(30, 58, 95, 0.18);
    border-radius: 8px;
}
input[type="color"]:not(.ep-fc-skip)::-moz-color-swatch {
    border: 1px solid rgba(30, 58, 95, 0.18);
    border-radius: 8px;
}
.ep-color-field {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.65rem 0.35rem 0.4rem;
    border: 1.5px solid var(--ep-fc-line);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, var(--ep-fc-soft) 100%);
    min-height: 2.55rem;
    box-sizing: border-box;
}
.ep-color-field input[type="color"] {
    width: 2.15rem;
    height: 2.15rem;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0.15rem;
    border: 1px solid rgba(30, 58, 95, 0.12);
    border-radius: 9px;
    background: #fff;
}
.ep-color-field .ep-color-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ep-fc-ink);
    letter-spacing: 0.02em;
    min-width: 4.5rem;
}

/* ── Select ───────────────────────────────────────────── */
select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]) {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ep-fc-ink);
    background-color: #fff;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230070B0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
        linear-gradient(180deg, #fff 0%, var(--ep-fc-soft) 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.7rem center, 0 0;
    background-size: 1rem, 100% 100%;
    border: 1.5px solid var(--ep-fc-line);
    border-radius: 12px;
    padding: 0.55rem 2.35rem 0.55rem 0.75rem;
    min-height: 2.55rem;
    line-height: 1.3;
    box-sizing: border-box;
    cursor: pointer;
    color-scheme: light;
    transition: border-color .15s ease, box-shadow .15s ease;
}
select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]):hover {
    border-color: #c4a574;
}
select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]):focus-visible {
    outline: 2px solid var(--ep-fc-blue);
    outline-offset: 2px;
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.14);
    background-color: #fff;
}
select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]) option {
    font-weight: 600;
    color: var(--ep-fc-ink);
    background: #fff;
    padding: 0.45rem 0.65rem;
}
select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]) option:checked,
select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]) option:hover {
    background: #e0f2fe;
    color: #0c4a6e;
}

/* ── Date / time / month / week ───────────────────────── */
input[type="date"]:not(.filter-input):not(.ep-fc-skip),
input[type="time"]:not(.filter-input):not(.ep-fc-skip),
input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip),
input[type="month"]:not(.filter-input):not(.ep-fc-skip),
input[type="week"]:not(.filter-input):not(.ep-fc-skip) {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ep-fc-ink);
    background: linear-gradient(180deg, #fff 0%, var(--ep-fc-soft) 100%);
    border: 1.5px solid var(--ep-fc-line);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    min-height: 2.55rem;
    line-height: 1.3;
    box-sizing: border-box;
    color-scheme: light;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input[type="date"]:not(.filter-input):not(.ep-fc-skip):hover,
input[type="time"]:not(.filter-input):not(.ep-fc-skip):hover,
input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip):hover,
input[type="month"]:not(.filter-input):not(.ep-fc-skip):hover,
input[type="week"]:not(.filter-input):not(.ep-fc-skip):hover {
    border-color: #c4a574;
}

input[type="date"]:not(.filter-input):not(.ep-fc-skip):focus-visible,
input[type="time"]:not(.filter-input):not(.ep-fc-skip):focus-visible,
input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip):focus-visible,
input[type="month"]:not(.filter-input):not(.ep-fc-skip):focus-visible,
input[type="week"]:not(.filter-input):not(.ep-fc-skip):focus-visible {
    outline: 2px solid var(--ep-fc-blue);
    outline-offset: 2px;
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.14);
    background: #fff;
}

input[type="date"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
input[type="time"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
input[type="month"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
input[type="week"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0.2rem;
    margin-left: 0.25rem;
    border-radius: 8px;
    background-color: rgba(0, 112, 176, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230070B0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.05rem;
    filter: none;
    color: transparent;
}

input[type="date"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator:hover,
input[type="time"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background-color: rgba(0, 112, 176, 0.2);
}

input[type="time"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230070B0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 16 14'/%3E%3C/svg%3E");
}

/* ── Dark mode ────────────────────────────────────────── */
html[data-theme="dark"] {
    --ep-fc-line: #475569;
    --ep-fc-bg: #0F172A;
    --ep-fc-soft: #172033;
    --ep-fc-ink: #F8FAFC;
    --ep-fc-muted: #B8C4D4;
}

html[data-theme="dark"] input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden) {
    background: #0F172A;
    border-color: #475569;
}

html[data-theme="dark"] input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):hover {
    border-color: #38BDF8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

html[data-theme="dark"] input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked {
    background: #0070B0;
    border-color: #38BDF8;
}

html[data-theme="dark"] input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):focus-visible {
    outline-color: #F0C000;
}

html[data-theme="dark"] input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden) {
    background: #0F172A;
    border-color: #475569;
}

html[data-theme="dark"] input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked {
    border-color: #38BDF8;
    background: #0F172A;
}

html[data-theme="dark"] input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip):not([hidden]):not(.hidden):checked::after {
    background: #38BDF8;
}

html[data-theme="dark"] input[type="color"]:not(.ep-fc-skip) {
    background: #0F172A;
    border-color: #475569;
}
html[data-theme="dark"] input[type="color"]:not(.ep-fc-skip):focus-visible {
    border-color: #38BDF8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
html[data-theme="dark"] .ep-color-field {
    background: linear-gradient(180deg, #0F172A 0%, #172033 100%);
    border-color: #475569;
}
html[data-theme="dark"] .ep-color-field input[type="color"] {
    background: #0F172A;
    border-color: #334155;
}
html[data-theme="dark"] .ep-color-field .ep-color-hex {
    color: #F8FAFC;
}

html[data-theme="dark"] select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]) {
    background-color: #0F172A;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
        linear-gradient(180deg, #0F172A 0%, #172033 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.7rem center, 0 0;
    background-size: 1rem, 100% 100%;
    border-color: #475569;
    color: #F8FAFC;
    color-scheme: dark;
}
html[data-theme="dark"] select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]):focus-visible {
    border-color: #38BDF8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
html[data-theme="dark"] select:not(.filter-input):not(.ep-fc-skip):not(.sr-only):not([hidden]) option {
    background: #0F172A;
    color: #F8FAFC;
}

html[data-theme="dark"] input[type="date"]:not(.filter-input):not(.ep-fc-skip),
html[data-theme="dark"] input[type="time"]:not(.filter-input):not(.ep-fc-skip),
html[data-theme="dark"] input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip),
html[data-theme="dark"] input[type="month"]:not(.filter-input):not(.ep-fc-skip),
html[data-theme="dark"] input[type="week"]:not(.filter-input):not(.ep-fc-skip) {
    background: #0F172A;
    border-color: #475569;
    color: #F8FAFC;
    color-scheme: dark;
}

html[data-theme="dark"] input[type="date"]:not(.filter-input):not(.ep-fc-skip):focus-visible,
html[data-theme="dark"] input[type="time"]:not(.filter-input):not(.ep-fc-skip):focus-visible,
html[data-theme="dark"] input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip):focus-visible {
    border-color: #38BDF8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
    background: #0c2238;
}

html[data-theme="dark"] input[type="date"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="time"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="datetime-local"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator,
html[data-theme="dark"] input[type="month"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 1;
    background-color: rgba(56, 189, 248, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
html[data-theme="dark"] input[type="time"]:not(.filter-input):not(.ep-fc-skip)::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 16 14'/%3E%3C/svg%3E");
}

/* ── Custom dropdown (panel abierto estilizable) ─────────
   El <select> nativo no deja estilizar el listado en Chrome/Edge.
   .ep-dd sustituye el panel; el select queda oculto pero sigue en el form. */
select.ep-dd-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.ep-dd {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 9.5rem;
    flex: 0 1 auto;
}
.ep-dd-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0.55rem 0.85rem;
    min-height: 2.55rem;
    border: 1.5px solid var(--ep-fc-line);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, var(--ep-fc-soft) 100%);
    color: var(--ep-fc-ink);
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ep-dd-btn::after {
    content: '';
    flex: 0 0 auto;
    width: 0.85rem;
    height: 0.55rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230070B0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .15s ease;
}
.ep-dd.is-open .ep-dd-btn::after { transform: rotate(180deg); }
.ep-dd-btn:hover { border-color: #c4a574; }
.ep-dd.is-open .ep-dd-btn,
.ep-dd-btn:focus-visible {
    outline: none;
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.14);
}
.ep-dd-panel,
body > .ep-dd-panel.ep-dd-panel-open {
    position: fixed;
    z-index: 10050;
    max-height: min(16rem, 50vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff !important;
    border: 1.5px solid #bae6fd !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 42px -14px rgba(15, 23, 42, 0.28), 0 4px 14px rgba(0, 112, 176, 0.12) !important;
    padding: 0.4rem !important;
    color: var(--ep-fc-ink, #1E3A5F) !important;
    box-sizing: border-box;
}
.ep-dd-panel { display: none; }
body > .ep-dd-panel { display: none; }
body > .ep-dd-panel.ep-dd-panel-open { display: block !important; }
.ep-dd-opt {
    display: block;
    width: 100%;
    text-align: left;
    border: 0 !important;
    background: transparent !important;
    color: var(--ep-fc-ink, #1E3A5F) !important;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
    box-shadow: none !important;
}
.ep-dd-opt:hover,
.ep-dd-opt:focus-visible {
    background: #e0f2fe !important;
    color: #0c4a6e !important;
    outline: none;
}
.ep-dd-opt.is-selected {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd) !important;
    color: #0c4a6e !important;
    font-weight: 700;
}

/* ── Color palette (panel abierto propio) ─────────────── */
.ep-color-field {
    position: relative;
    cursor: pointer;
}
.ep-color-field input[type="color"].ep-color-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
}
.ep-color-swatch {
    width: 2.15rem;
    height: 2.15rem;
    min-width: 2.15rem;
    border-radius: 9px;
    border: 1px solid rgba(30, 58, 95, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    flex: 0 0 auto;
}
.ep-color-pop {
    display: none;
    position: fixed;
    z-index: 10055;
    width: min(19.5rem, calc(100vw - 1.25rem));
    background: #fff;
    border: 1.5px solid #bae6fd;
    border-radius: 16px;
    box-shadow: 0 18px 42px -14px rgba(15, 23, 42, 0.28), 0 4px 14px rgba(0, 112, 176, 0.12);
    padding: 0.8rem;
}
body > .ep-color-pop.ep-color-pop-open { display: block; }
.ep-color-pop-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.45rem;
}
.ep-color-sv {
    position: relative;
    width: 100%;
    aspect-ratio: 1.15 / 1;
    border-radius: 12px;
    border: 1px solid rgba(30, 58, 95, 0.12);
    cursor: crosshair;
    overflow: hidden;
    touch-action: none;
    margin-bottom: 0.65rem;
    background: #f00;
}
.ep-color-sv-white,
.ep-color-sv-black {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ep-color-sv-white {
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}
.ep-color-sv-black {
    background: linear-gradient(to top, #000, rgba(0, 0, 0, 0));
}
.ep-color-sv-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.45), 0 2px 6px rgba(15, 23, 42, 0.35);
    pointer-events: none;
    z-index: 2;
}
.ep-color-hue-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
}
.ep-color-preview {
    width: 2.1rem;
    height: 2.1rem;
    min-width: 2.1rem;
    border-radius: 999px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(30, 58, 95, 0.2), 0 2px 8px rgba(15, 23, 42, 0.18);
    flex: 0 0 auto;
}
.ep-color-hue {
    position: relative;
    flex: 1;
    height: 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    touch-action: none;
    background: linear-gradient(to right,
        #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%,
        #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.ep-color-hue-thumb {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35), 0 2px 6px rgba(15, 23, 42, 0.25);
    pointer-events: none;
}
.ep-color-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.28rem;
    margin-bottom: 0.65rem;
}
.ep-color-chip {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.ep-color-chip:hover,
.ep-color-chip:focus-visible {
    transform: scale(1.12);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 112, 176, 0.28);
    z-index: 1;
}
.ep-color-chip.is-selected {
    border-color: #0070B0;
    box-shadow: 0 0 0 2px rgba(0, 112, 176, 0.35);
}
.ep-color-channels {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.35fr;
    gap: 0.35rem;
    align-items: end;
}
.ep-color-ch {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.ep-color-ch span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #64748b;
    text-align: center;
}
.ep-color-ch input,
.ep-color-hex-input {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ep-fc-ink);
    border: 1.5px solid var(--ep-fc-line);
    border-radius: 9px;
    padding: 0.35rem 0.3rem;
    min-height: 2.05rem;
    text-align: center;
    background: #fff;
    box-sizing: border-box;
}
.ep-color-ch input:focus,
.ep-color-hex-input:focus {
    outline: none;
    border-color: var(--ep-fc-blue);
    box-shadow: 0 0 0 3px rgba(0, 112, 176, 0.14);
}
.ep-color-hex-input { text-align: left; padding-left: 0.45rem; }

html[data-theme="dark"] .ep-dd-btn {
    background: linear-gradient(180deg, #0F172A 0%, #172033 100%) !important;
    border-color: #475569 !important;
    color: #F8FAFC !important;
}
html[data-theme="dark"] .ep-dd.is-open .ep-dd-btn,
html[data-theme="dark"] .ep-dd-btn:focus-visible {
    border-color: #38BDF8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18) !important;
}
html[data-theme="dark"] .ep-dd-panel,
html[data-theme="dark"] body > .ep-dd-panel.ep-dd-panel-open {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 18px 42px -14px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(56, 189, 248, 0.12) !important;
}
html[data-theme="dark"] .ep-dd-opt { color: #e2e8f0 !important; background: transparent !important; }
html[data-theme="dark"] .ep-dd-opt:hover,
html[data-theme="dark"] .ep-dd-opt:focus-visible {
    background: rgba(56, 189, 248, 0.16) !important;
    color: #7dd3fc !important;
}
html[data-theme="dark"] .ep-dd-opt.is-selected {
    background: rgba(56, 189, 248, 0.26) !important;
    color: #bae6fd !important;
}
html[data-theme="dark"] .ep-color-pop {
    background: #0f172a;
    border-color: #334155;
}
html[data-theme="dark"] .ep-color-pop-title,
html[data-theme="dark"] .ep-color-ch span { color: #94a3b8; }
html[data-theme="dark"] .ep-color-ch input,
html[data-theme="dark"] .ep-color-hex-input {
    background: #0F172A;
    border-color: #475569;
    color: #F8FAFC;
}
html[data-theme="dark"] .ep-color-ch input:focus,
html[data-theme="dark"] .ep-color-hex-input:focus {
    border-color: #38BDF8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
html[data-theme="dark"] .ep-color-chip.is-selected {
    border-color: #38BDF8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}
html[data-theme="dark"] .ep-color-sv {
    border-color: rgba(148, 163, 184, 0.25);
}

/* Landing / formularios con clase helper */
.ep-form-check-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
}

@media (prefers-reduced-motion: reduce) {
    input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip),
    input[type="radio"]:not(.sr-only):not(.peer):not(.ep-fc-skip) {
        transition: none;
    }
    input[type="checkbox"]:not(.sr-only):not(.peer):not(.ep-fc-skip):checked {
        transform: none;
    }
}
