@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --egj-primary: #0ea5e9;
    --egj-primary-dark: #0284c7;
    --egj-success: #10b981;
    --egj-warning: #f59e0b;
    --egj-purple: #8b5cf6;
    --egj-lime: #84cc16;
    --egj-rose: #f43f5e;
    --egj-bg: #eef2ff;
    --egj-panel: #ffffff;
    --egj-text: #1e293b;
    --egj-muted: #64748b;
    --egj-border: #dbe5f2;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--egj-text);
    background: linear-gradient(160deg, #dbeafe 0%, #e0e7ff 45%, #ede9fe 100%);
    min-height: 100vh;
}
a { color: var(--egj-primary-dark); text-decoration: none; }
.hidden { display: none; }

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
    position: relative;
    overflow: auto;
    background:
        radial-gradient(circle at 12% 20%, rgba(132, 204, 22, 0.22), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(14, 165, 233, 0.24), transparent 32%),
        linear-gradient(160deg, #123b35 0%, #0f2744 55%, #071827 100%);
}
.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
}
.login-page::before {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(14,165,233,0.28), rgba(14,165,233,0));
    top: -120px;
    right: -70px;
}
.login-page::after {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(16,185,129,0.22), rgba(16,185,129,0));
    bottom: -160px;
    left: -100px;
}
.egj-login-shell {
    position: relative;
    z-index: 1;
    width: min(1320px, 100%);
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.4vw, 1.6rem);
    justify-items: center;
}
.egj-login-carousel-card {
    width: 100%;
    min-height: 0;
    padding: clamp(1rem, 2.6vw, 1.6rem);
    border-radius: 30px;
    background:
        radial-gradient(circle at 20% 18%, rgba(125, 211, 252, 0.28), transparent 30%),
        radial-gradient(circle at 82% 76%, rgba(134, 239, 172, 0.2), transparent 36%),
        rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(14px);
    overflow: hidden;
}
.egj-login-carousel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
    align-items: stretch;
}
.egj-login-carousel-panel,
.egj-guardian-carousel-block {
    min-width: 0;
    overflow: hidden;
}
.egj-login-carousel-copy {
    color: #f8fafc;
    text-align: center;
}
.egj-login-carousel-copy span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.22);
    border: 1px solid rgba(186, 230, 253, 0.4);
    font-weight: 800;
}
.egj-login-carousel-copy h2 {
    margin: 0.75rem 0 0.25rem;
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    letter-spacing: -0.04em;
}
.egj-login-carousel-copy p {
    max-width: 420px;
    margin: 0 auto;
    color: rgba(241, 245, 249, 0.84);
}
.egj-school-carousel {
    height: 330px;
    margin-top: 1.25rem;
    display: grid;
    place-items: center;
    perspective: 1150px;
    overflow: hidden;
}
.egj-school-carousel-ring {
    position: relative;
    width: 190px;
    height: 190px;
    transform-style: preserve-3d;
    animation: egjSchoolCarouselSpin 24s linear infinite;
}
.egj-school-carousel:hover .egj-school-carousel-ring {
    animation-play-state: paused;
}
.egj-school-carousel-item {
    position: absolute;
    inset: 0 10px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.45rem;
    padding: 0.8rem;
    border-radius: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22);
    transform: rotateY(var(--angle)) translateZ(290px);
    backface-visibility: hidden;
}
.egj-school-carousel-logo {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(145deg, #f8fafc, #e0f2fe);
    border: 1px solid rgba(14, 165, 233, 0.16);
}
.egj-school-carousel-logo img {
    max-width: 78px;
    max-height: 78px;
    object-fit: contain;
}
.egj-school-carousel-logo i {
    color: #0284c7;
    font-size: 2.1rem;
}
.egj-school-carousel-item strong {
    color: #0f172a;
    font-size: 0.86rem;
    line-height: 1.15;
}
.egj-guardian-carousel-block {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.egj-guardian-copy h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}
.egj-guardian-carousel {
    height: 360px;
    margin-top: 0.8rem;
    display: grid;
    place-items: center;
    perspective: 1600px;
    overflow: hidden;
}
.egj-guardian-carousel-ring {
    position: relative;
    width: 136px;
    height: 136px;
    transform-style: preserve-3d;
    animation: egjGuardianCarouselSpin 24s linear infinite;
}
.egj-guardian-carousel:hover .egj-guardian-carousel-ring {
    animation-play-state: paused;
}
.egj-guardian-carousel-item {
    position: absolute;
    inset: 0 10px;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 3px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.24);
    transform: rotateY(var(--angle)) translateZ(590px);
    backface-visibility: hidden;
}
.egj-guardian-carousel-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
@keyframes egjSchoolCarouselSpin {
    from { transform: rotateY(0deg) rotateX(-5deg); }
    to { transform: rotateY(-360deg) rotateX(-5deg); }
}
@keyframes egjGuardianCarouselSpin {
    from { transform: rotateY(0deg) rotateX(-8deg); }
    to { transform: rotateY(360deg) rotateX(-8deg); }
}

.card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-radius: 24px;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.45);
    padding: 1.45rem;
    width: 100%;
    max-width: 560px;
}
.login-brand {
    text-align: center;
    margin-bottom: 12px;
}
.login-brand img,
.egj-logo-login-main {
    width: auto;
    height: auto;
    max-width: min(100%, 280px);
    max-height: 120px;
    object-fit: contain;
    border-radius: 18px;
    padding: 8px;
    background: rgba(14, 165, 233, 0.12);
    display: block;
    margin: 0 auto;
}
.login-brand-bottom {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.45);
}
.egj-logo-login-bottom {
    max-width: min(100%, 260px);
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}
.egj-dash-banner {
    margin-bottom: 1rem;
    text-align: center;
}
.egj-dash-banner img {
    max-height: 110px;
    max-width: min(100%, 520px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.login-card h1 {
    margin: 10px 0 4px;
    font-size: clamp(1.7rem, 4vw, 2.25rem);
    text-align: center;
    letter-spacing: -0.03em;
}
.login-card p {
    text-align: center;
    color: var(--egj-muted);
    margin: 0 0 12px;
}
.egj-login-hero {
    position: relative;
    text-align: center;
    padding: 0.25rem 0.35rem 0.5rem;
}
.egj-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.33rem 0.75rem;
    border-radius: 999px;
    color: #166534;
    background: linear-gradient(135deg, #dcfce7, #e0f2fe);
    font-size: 0.83rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.16);
}
.egj-login-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin: 0.65rem 0 0.3rem;
}
.egj-login-chips span,
.egj-login-note {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #075985;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 700;
}
.egj-login-note {
    display: flex;
    justify-content: center;
    margin-top: 0.85rem;
    border-radius: 14px;
    color: #166534;
    background: linear-gradient(135deg, rgba(220, 252, 231, 0.95), rgba(240, 253, 244, 0.92));
}

label { display: block; margin: 0.72rem 0 0.22rem; font-weight: 600; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--egj-border);
    border-radius: 12px;
    padding: 0.66rem 0.72rem;
    background: #fff;
    font: inherit;
}
input[type="checkbox"],
input[type="radio"] {
    width: auto;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--egj-primary);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}
textarea { min-height: 95px; resize: vertical; }

.btn {
    width: 100%;
    border: none;
    margin-top: 1rem;
    background: linear-gradient(180deg, var(--egj-primary), var(--egj-primary-dark));
    color: #fff;
    padding: 0.74rem;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 5px 0 rgba(2, 132, 199, 0.44), 0 8px 20px rgba(2, 132, 199, 0.28);
    transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active,
.egj-btn:active,
.btn-small:active { transform: translateY(1px); }

.btn-small {
    border: 1px solid var(--egj-border);
    border-radius: 999px;
    background: #fff;
    padding: 0.42rem 0.75rem;
    cursor: pointer;
    font: inherit;
}
.btn-small.active { background: var(--egj-primary); color: #fff; border-color: var(--egj-primary); }
.egj-tts-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin: 0.55rem 0;
    padding: 0.5rem;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.75), rgba(240, 253, 250, 0.7));
}
.egj-tts-controls .btn-small {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.egj-tts-voice {
    min-width: min(260px, 100%);
    border: 1px solid var(--egj-border);
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    background: #fff;
    font: inherit;
    color: var(--egj-text);
}
.egj-tts-unavailable {
    color: var(--egj-muted);
    font-size: 0.9rem;
}
.modo-login { display: flex; gap: 0.45rem; margin: 0.8rem 0; }
.hint { margin-top: 1rem; font-size: 0.9rem; color: var(--egj-muted); text-align: center; }

.alert {
    margin: 0.7rem 0;
    padding: 0.72rem;
    border-radius: 12px;
    font-size: 0.93rem;
}
.success { background: #ecfdf5; border: 1px solid #6ee7b7; }
.error { background: #fef2f2; border: 1px solid #fca5a5; }
.info { background: #eff6ff; border: 1px solid #93c5fd; }

/* Layout interior: sidebar tipo inventario */
.egj-admin {
    display: flex;
    min-height: 100vh;
}
.egj-sidebar {
    width: 282px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2744 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    box-shadow: 6px 0 24px rgba(15, 23, 42, 0.25);
    z-index: 20;
    display: flex;
    flex-direction: column;
}
.egj-sidebar-brand {
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: .66rem;
    border-bottom: 1px solid rgba(255,255,255,.14);
}
/* Logo lateral: más grande dentro del mismo bloque (imagen2.png) */
.egj-sidebar-brand img,
.egj-sidebar-brand .egj-sidebar-logo {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    background: rgba(255,255,255,.18);
    padding: 4px;
    flex-shrink: 0;
    box-sizing: border-box;
}
.egj-sidebar-brand strong {
    display: block;
    font-size: .98rem;
}
.egj-sidebar-brand span {
    display: block;
    font-size: .8rem;
    opacity: .86;
}
.egj-sidebar-nav {
    margin: 14px 10px;
    background: rgba(0,0,0,0.18);
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.egj-sidebar-nav a {
    color: rgba(255,255,255,.95);
    padding: 0.56rem 0.62rem;
    border-radius: 10px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.egj-sidebar-nav a::before {
    content: "";
    position: absolute;
    right: 0.42rem;
    top: 50%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    opacity: 0.36;
    transform: translateY(-50%) rotate(0deg);
    background:
        radial-gradient(circle at center, #fef08a 0 14%, transparent 15%),
        radial-gradient(ellipse at 50% 4%, rgba(187, 247, 208, 0.95) 0 20%, transparent 21%),
        radial-gradient(ellipse at 96% 50%, rgba(56, 189, 248, 0.86) 0 20%, transparent 21%),
        radial-gradient(ellipse at 50% 96%, rgba(74, 222, 128, 0.9) 0 20%, transparent 21%),
        radial-gradient(ellipse at 4% 50%, rgba(251, 113, 133, 0.72) 0 20%, transparent 21%);
    border: 1px dashed rgba(125, 211, 252, 0.55);
    box-shadow: inset 0 0 0 4px rgba(255,255,255,0.18), 0 8px 16px rgba(14, 165, 233, 0.18);
    z-index: 0;
    animation: egjNavFractalSpin 8s linear infinite;
}
.egj-sidebar-nav a::after {
    content: "";
    position: absolute;
    right: 0.78rem;
    top: 50%;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px dotted rgba(255,255,255,0.55);
    transform: translateY(-50%) rotate(20deg);
    z-index: 0;
}
.egj-sidebar-nav a::before,
.egj-sidebar-nav a::after {
    display: none;
}
.egj-nav-fractal {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    opacity: 0.48;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    animation: egjNavFractalSpin 8s linear infinite;
    background:
        radial-gradient(circle at center, #fef08a 0 14%, transparent 15%),
        radial-gradient(ellipse at 50% 4%, rgba(187, 247, 208, 0.95) 0 20%, transparent 21%),
        radial-gradient(ellipse at 96% 50%, rgba(56, 189, 248, 0.86) 0 20%, transparent 21%),
        radial-gradient(ellipse at 50% 96%, rgba(74, 222, 128, 0.9) 0 20%, transparent 21%),
        radial-gradient(ellipse at 4% 50%, rgba(251, 113, 133, 0.72) 0 20%, transparent 21%);
    border: 1px dashed rgba(125, 211, 252, 0.55);
    box-shadow: inset 0 0 0 4px rgba(255,255,255,0.18), 0 8px 16px rgba(14, 165, 233, 0.18);
}
.egj-sidebar-nav a:nth-child(2n) .egj-nav-fractal {
    animation-duration: 10s;
}
.egj-sidebar-nav a:nth-child(3n) .egj-nav-fractal {
    animation-duration: 7s;
    background:
        radial-gradient(circle at center, #bbf7d0 0 14%, transparent 15%),
        radial-gradient(ellipse at 50% 4%, rgba(254, 240, 138, 0.92) 0 20%, transparent 21%),
        radial-gradient(ellipse at 96% 50%, rgba(125, 211, 252, 0.9) 0 20%, transparent 21%),
        radial-gradient(ellipse at 50% 96%, rgba(52, 211, 153, 0.88) 0 20%, transparent 21%),
        radial-gradient(ellipse at 4% 50%, rgba(196, 181, 253, 0.72) 0 20%, transparent 21%);
}
.egj-sidebar-nav a.active .egj-nav-fractal,
.egj-sidebar-nav a:hover .egj-nav-fractal {
    opacity: 0.9;
}
.egj-sidebar-nav a:nth-child(2n)::before {
    animation-duration: 10s;
    opacity: 0.3;
}
.egj-sidebar-nav a:nth-child(3n)::before {
    animation-duration: 7s;
    background:
        radial-gradient(circle at center, #bbf7d0 0 14%, transparent 15%),
        radial-gradient(ellipse at 50% 4%, rgba(254, 240, 138, 0.92) 0 20%, transparent 21%),
        radial-gradient(ellipse at 96% 50%, rgba(125, 211, 252, 0.9) 0 20%, transparent 21%),
        radial-gradient(ellipse at 50% 96%, rgba(52, 211, 153, 0.88) 0 20%, transparent 21%),
        radial-gradient(ellipse at 4% 50%, rgba(196, 181, 253, 0.72) 0 20%, transparent 21%);
}
@keyframes egjNavFractalSpin {
    0% { transform: translateY(-50%) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: translateY(-50%) rotateX(360deg) rotateY(180deg) rotateZ(360deg); }
}
.egj-nav-label {
    flex: 1;
    position: relative;
    z-index: 1;
}
.egj-alert-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-width: 1.55rem;
    justify-content: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.28);
    position: relative;
    z-index: 2;
}
.egj-sidebar-nav a.active,
.egj-sidebar-nav a:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.2);
}
.egj-sidebar-nav a.active::before,
.egj-sidebar-nav a:hover::before {
    opacity: 0.62;
}
.egj-nav-ico {
    width: 1.15rem;
    text-align: center;
    opacity: 0.95;
    color: #7dd3fc;
    position: relative;
    z-index: 1;
}
.egj-sidebar-nav a.active .egj-nav-ico { color: #fff; }

/* Escudo del colegio (estudiantes): pie del sidebar, debajo de Salir */
.egj-sidebar-escudo {
    margin-top: auto;
    padding: 14px 12px 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}
.egj-sidebar-escudo-caption {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.88;
    margin-bottom: 0.45rem;
    line-height: 1.25;
    padding: 0 4px;
}
.egj-sidebar-escudo-img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px;
    box-sizing: border-box;
}
/* Gráfico principal (imagen3.png) para admin / capacitador: un poco más alto */
.egj-sidebar-marca-img {
    max-height: 168px;
    background: rgba(255, 255, 255, 0.95);
}
.egj-sidebar-escudo-marca .egj-sidebar-escudo-caption {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.egj-main {
    flex: 1;
    margin-left: 282px;
    min-height: 100vh;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background: #93c5fd;
}
.dot-book { background: #34d399; }
.dot-calendar { background: #fbbf24; }
.dot-chat { background: #a78bfa; }
.dot-notice { background: #f472b6; }
.dot-admin { background: #22d3ee; }
.dot-logout { background: #f87171; }

/* Cabecera de página + accesos tipo botones 3D */
.egj-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 18px;
    border: 1px solid var(--egj-border);
    box-shadow: 6px 6px 18px rgba(14, 165, 233, 0.12), -2px -2px 8px rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}
.egj-page-head::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -54px;
    bottom: -92px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 68%);
    pointer-events: none;
}
.egj-page-head-learning { background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 55%, #fff 100%); }
.egj-page-head-admin { background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 55%, #fff 100%); }
.egj-page-head-board { background: linear-gradient(135deg, #fff7ed 0%, #f0fdf4 55%, #fff 100%); }
.egj-page-head-messages { background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 55%, #fff 100%); }
.egj-page-head-profile { background: linear-gradient(135deg, #faf5ff 0%, #eff6ff 55%, #fff 100%); }
.egj-page-head-calendar { background: linear-gradient(135deg, #fffbeb 0%, #eef2ff 55%, #fff 100%); }
.egj-board-wrap {
    position: relative;
    isolation: isolate;
}
.egj-board-wrap > :not(.egj-fractal-rain) {
    position: relative;
    z-index: 1;
}
.egj-fractal-rain {
    position: fixed;
    inset: 0 0 0 170px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    perspective: 900px;
}
.egj-floating-fractal {
    --size: 70px;
    --x: 50vw;
    --delay: 0s;
    --duration: 18s;
    --drift: 30px;
    position: absolute;
    left: var(--x);
    top: -90px;
    width: var(--size);
    height: var(--size);
    opacity: 0.38;
    transform-style: preserve-3d;
    animation: egjFractalFall var(--duration) linear infinite;
    animation-delay: var(--delay);
    background: url('logos/marcador.png') center / contain no-repeat;
    filter: drop-shadow(0 16px 18px rgba(15, 23, 42, 0.18));
}
.ff-1 { --x: 18vw; --size: 60px; --delay: -2s; --duration: 17s; --drift: 28px; }
.ff-2 { --x: 34vw; --size: 82px; --delay: -8s; --duration: 23s; --drift: -42px; }
.ff-3 { --x: 52vw; --size: 56px; --delay: -14s; --duration: 19s; --drift: 36px; }
.ff-4 { --x: 73vw; --size: 76px; --delay: -5s; --duration: 21s; --drift: -28px; }
.ff-5 { --x: 88vw; --size: 50px; --delay: -11s; --duration: 16s; --drift: 24px; }
.ff-6 { --x: 25vw; --size: 92px; --delay: -17s; --duration: 26s; --drift: -54px; }
.ff-7 { --x: 63vw; --size: 68px; --delay: -20s; --duration: 18s; --drift: 46px; }
.ff-8 { --x: 80vw; --size: 86px; --delay: -1s; --duration: 25s; --drift: -36px; }
.ff-9 { --x: 12vw; --size: 52px; --delay: -13s; --duration: 20s; --drift: 52px; }
.ff-10 { --x: 44vw; --size: 72px; --delay: -6s; --duration: 22s; --drift: -30px; }
.ff-11 { --x: 57vw; --size: 48px; --delay: -9s; --duration: 15s; --drift: 26px; }
.ff-12 { --x: 94vw; --size: 64px; --delay: -18s; --duration: 24s; --drift: -62px; }
.ff-13 { --x: 7vw; --size: 60px; --delay: -3s; --duration: 14s; --drift: 34px; }
.ff-14 { --x: 29vw; --size: 54px; --delay: -10s; --duration: 16s; --drift: -26px; }
.ff-15 { --x: 39vw; --size: 92px; --delay: -15s; --duration: 24s; --drift: 58px; }
.ff-16 { --x: 49vw; --size: 46px; --delay: -4s; --duration: 13s; --drift: -22px; }
.ff-17 { --x: 67vw; --size: 96px; --delay: -12s; --duration: 27s; --drift: -48px; }
.ff-18 { --x: 76vw; --size: 58px; --delay: -7s; --duration: 15s; --drift: 38px; }
.ff-19 { --x: 86vw; --size: 74px; --delay: -22s; --duration: 20s; --drift: -32px; }
.ff-20 { --x: 96vw; --size: 48px; --delay: -16s; --duration: 14s; --drift: -44px; }
.ff-21 { --x: 21vw; --size: 80px; --delay: -24s; --duration: 19s; --drift: 48px; }
.ff-22 { --x: 59vw; --size: 62px; --delay: -26s; --duration: 17s; --drift: -34px; }
.ff-23 { --x: 70vw; --size: 50px; --delay: -28s; --duration: 12s; --drift: 28px; }
.ff-24 { --x: 91vw; --size: 82px; --delay: -30s; --duration: 23s; --drift: -56px; }
@keyframes egjFractalFall {
    0% {
        transform: translate3d(0, -12vh, -40px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    50% {
        transform: translate3d(var(--drift), 52vh, 80px) rotateX(180deg) rotateY(240deg) rotateZ(180deg);
    }
    100% {
        transform: translate3d(calc(var(--drift) * -0.45), 112vh, -20px) rotateX(360deg) rotateY(520deg) rotateZ(360deg);
    }
}
@media (max-width: 900px) {
    .egj-fractal-rain {
        left: 0;
    }
    .egj-floating-fractal {
        opacity: 0.22;
    }
}
@media (prefers-reduced-motion: reduce) {
    .egj-nav-fractal {
        animation: none;
    }
    .egj-sidebar-nav a::before {
        animation: none;
    }
    .egj-floating-fractal {
        animation: none;
        display: none;
    }
}
.egj-page-title {
    margin: 0;
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.egj-page-title i { color: var(--egj-primary); }
.egj-page-sub { margin: 0.35rem 0 0; color: var(--egj-muted); font-size: 0.95rem; }
.egj-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.egj-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.12), 0 6px 14px rgba(0,0,0,0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.egj-btn:hover { transform: translateY(-2px); color: #fff; }
.egj-btn-sky { background: linear-gradient(180deg, #0ea5e9, #0284c7); }
.egj-btn-amber { background: linear-gradient(180deg, #f59e0b, #d97706); }
.egj-btn-emerald { background: linear-gradient(180deg, #10b981, #059669); }
.egj-btn-violet { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }

/* Tarjetas métricas 3D (tipo inventario) */
.egj-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.15rem;
}
.egj-stat-card {
    position: relative;
    padding: 1.15rem 1rem;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--egj-border);
    box-shadow: 6px 6px 16px rgba(2, 6, 23, 0.07), -2px -2px 8px rgba(255,255,255,0.85);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}
.egj-stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    border-top: 1px solid rgba(255,255,255,0.7);
}
.egj-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 22px rgba(14, 165, 233, 0.18), -3px -3px 10px rgba(255,255,255,1);
}
.egj-stat-ico {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    display: block;
}
.egj-stat-sky .egj-stat-ico { color: #0ea5e9; }
.egj-stat-amber .egj-stat-ico { color: #f59e0b; }
.egj-stat-emerald .egj-stat-ico { color: #10b981; }
.egj-stat-card strong {
    display: block;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--egj-text);
    line-height: 1.1;
}
.egj-stat-card span {
    font-size: 0.88rem;
    color: var(--egj-muted);
}
.egj-school-overview {
    margin: 1rem 0;
    overflow: hidden;
    position: relative;
}
.egj-school-overview::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -60px;
    top: -80px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 65%);
}
.egj-section-head {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.egj-section-head h2 {
    margin-bottom: 0.2rem;
}
.egj-school-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.18);
}
.egj-school-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
    margin-top: 0.9rem;
}
.egj-school-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(14, 165, 233, 0.15);
    background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,249,255,0.9));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.egj-school-logo-wrap {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9), 0 10px 20px rgba(15, 23, 42, 0.1);
}
.egj-school-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.egj-school-logo-fallback {
    color: #0ea5e9;
    font-size: 1.55rem;
}
.egj-school-card-body {
    min-width: 0;
}
.egj-school-card-body strong {
    display: block;
    color: #0f172a;
    line-height: 1.2;
}
.egj-school-card-body span {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.82rem;
}
.egj-school-count {
    min-width: 78px;
    padding: 0.45rem 0.55rem;
    border-radius: 16px;
    text-align: center;
    color: #065f46;
    background: linear-gradient(180deg, #dcfce7, #bbf7d0);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.18);
}
.egj-school-count b {
    display: block;
    font-size: 1.55rem;
    line-height: 1;
}
.egj-school-count small {
    font-size: 0.72rem;
    font-weight: 800;
}

.egj-panel-accent h2 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.05rem;
}
.egj-panel-accent h2 i { opacity: 0.85; }
.egj-accent-sky h2 i { color: #0ea5e9; }
.egj-accent-violet h2 i { color: #8b5cf6; }
.egj-accent-emerald h2 i { color: #10b981; }
.egj-accent-amber h2 i { color: #f59e0b; }
.egj-accent-sky { border-left: 4px solid #38bdf8; }
.egj-accent-violet { border-left: 4px solid #a78bfa; }
.egj-accent-emerald { border-left: 4px solid #34d399; }
.egj-accent-amber { border-left: 4px solid #fbbf24; }

.egj-publish-launch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background:
        radial-gradient(circle at top left, rgba(250, 204, 21, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(240, 249, 255, 0.96), rgba(236, 253, 245, 0.94));
}
.egj-btn-big {
    font-size: 0.98rem;
    padding: 0.75rem 1.1rem;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.22);
}
.egj-modal[hidden] {
    display: none;
}
body.egj-modal-open {
    overflow: auto;
}
.egj-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.egj-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(5px);
}
.egj-modal-card {
    position: relative;
    width: min(940px, 96vw);
    max-height: none;
    margin: 1rem 0;
    display: block;
    overflow: visible;
    border-radius: 28px;
    padding: 1.1rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.26), transparent 34%),
        radial-gradient(circle at bottom left, rgba(74, 222, 128, 0.2), transparent 36%),
        #ffffff;
    border: 1px solid rgba(14, 165, 233, 0.2);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}
.egj-modal-board {
    border-top: 8px solid #38bdf8;
}
.egj-modal-board > .inline-form {
    overflow: visible;
    padding-right: 0;
}
.egj-modal-board .egj-form-actions {
    position: static;
    z-index: 2;
    margin: 1rem 0 0;
    padding: 0.75rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(14, 165, 233, 0.18);
}
.egj-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #fef2f2;
    color: #991b1b;
    cursor: pointer;
    font-weight: 800;
}
.egj-modal-hero {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 2.8rem 0.9rem 0.2rem;
}
.egj-modal-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: #0369a1;
    background: linear-gradient(135deg, #bae6fd, #bbf7d0);
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.2);
    font-size: 1.55rem;
}
.egj-modal-hero h2 {
    margin: 0;
}
.egj-modal-hero p {
    margin: 0.25rem 0 0;
    color: var(--egj-muted);
}
.egj-link-cell {
    min-width: 210px;
}
.egj-media-launch {
    width: 100%;
    max-width: 270px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    text-align: left;
    color: #064e3b;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.85), transparent 34%),
        linear-gradient(135deg, #bbf7d0, #bae6fd 54%, #fde68a);
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.egj-media-launch:hover,
.egj-media-launch:focus-visible {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 18px 34px rgba(14, 165, 233, 0.3);
    outline: 3px solid rgba(14, 165, 233, 0.22);
}
.egj-media-launch strong {
    display: block;
    font-size: 0.94rem;
    color: #0f172a;
}
.egj-media-launch small {
    display: block;
    color: #166534;
    font-weight: 700;
}
.egj-video-launch {
    color: #7c2d12;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.86), transparent 34%),
        linear-gradient(135deg, #fed7aa, #fde68a 48%, #fecdd3);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.24);
}
.egj-video-launch small {
    color: #9a3412;
}
.egj-media-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    box-shadow: 0 10px 22px rgba(139, 92, 246, 0.28);
}
.egj-video-icon {
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.24);
}
.egj-media-fallback-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
}
.egj-interactive-card {
    width: min(1180px, 97vw);
    border-top: 8px solid #8b5cf6;
}
.egj-interactive-hero .egj-modal-icon {
    color: #581c87;
    background: linear-gradient(135deg, #ddd6fe, #bae6fd, #bbf7d0);
}
.egj-interactive-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}
.egj-interactive-frame-wrap {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(14, 165, 233, 0.22);
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}
.egj-interactive-frame-wrap iframe {
    width: 100%;
    min-height: min(72vh, 720px);
    display: block;
    border: 0;
    background: #ffffff;
}
.egj-video-card {
    width: min(1080px, 97vw);
    border-top: 8px solid #f97316;
}
.egj-video-hero .egj-modal-icon {
    color: #9a3412;
    background: linear-gradient(135deg, #fed7aa, #fde68a, #fecdd3);
}
.egj-video-frame-wrap {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(249, 115, 22, 0.22);
    background: #111827;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
    aspect-ratio: 16 / 9;
}
.egj-video-frame-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: min(62vh, 620px);
    display: block;
    border: 0;
    background: #111827;
}

.egj-feed { display: flex; flex-direction: column; gap: 0.5rem; }
.egj-feed-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: rgba(14, 165, 233, 0.06);
    border-radius: 12px;
    border-left: 3px solid var(--egj-primary);
}
.egj-feed-row small { color: var(--egj-muted); white-space: nowrap; }

.egj-board-card {
    margin-bottom: 0.85rem;
    padding: 0.95rem;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(240,253,244,0.88)),
        radial-gradient(circle at top right, rgba(14,165,233,0.12), transparent 42%);
    border: 1px solid rgba(14, 165, 233, 0.16);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.egj-board-card h3 {
    margin: 0 0 0.55rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.egj-board-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.egj-board-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.egj-btn-danger {
    color: #991b1b;
    border-color: #fecaca;
    background: #fef2f2;
    font-weight: 700;
}
.egj-btn-danger:hover {
    background: #fee2e2;
}
.egj-filter-form {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr) auto auto;
    gap: 0.55rem;
    align-items: end;
    margin: 0.85rem 0 1rem;
    padding: 1rem;
    border: 2px solid rgba(14, 165, 233, 0.24);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.98), rgba(255, 247, 237, 0.92));
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.12);
}
.egj-filter-form-wide {
    grid-template-columns: auto minmax(160px, 1fr) auto minmax(160px, 1fr) auto minmax(130px, 0.7fr) auto minmax(130px, 0.7fr) auto auto;
}
.egj-filter-title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    font-weight: 900;
    color: #075985;
    margin-bottom: 0.2rem;
}
.egj-filter-form label {
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.egj-filter-form input,
.egj-filter-form select {
    min-height: 38px;
    border: 1px solid var(--egj-border);
    border-radius: 12px;
    padding: 0.5rem 0.65rem;
    background: #fff;
}
.egj-bulk-form {
    margin: 0 0 0.85rem;
}
.egj-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 16px;
    background: rgba(255, 251, 235, 0.82);
}
.egj-bulk-copy {
    display: grid;
    gap: 0.1rem;
}
.egj-bulk-copy span {
    color: var(--egj-muted);
    font-size: 0.9rem;
}
.egj-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.egj-check-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    font-weight: 700;
}
.egj-check-cell input {
    width: 18px;
    height: 18px;
    accent-color: var(--egj-primary);
}
.egj-board-card p {
    margin: 0.4rem 0;
}
.egj-media-admin-list {
    margin: 0.85rem 0 1rem;
    padding: 0.8rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 16px;
    background: rgba(255, 251, 235, 0.72);
}
.egj-media-admin-list h3 {
    margin: 0 0 0.3rem;
}
.egj-media-admin-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(245, 158, 11, 0.24);
}
.egj-media-admin-row:first-of-type {
    border-top: none;
}
.egj-media-admin-row span {
    overflow-wrap: anywhere;
    font-weight: 600;
    color: #334155;
}
.egj-board-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0.85rem 0;
}
.egj-board-media {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #0f172a;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}
.egj-board-link-embed {
    margin: 0.9rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}
.egj-board-link-embed iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
    display: block;
    background: #fff;
}
.egj-embed-fallback {
    margin: 0;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.88rem;
}
.egj-survey-builder {
    padding: 0.85rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(240,249,255,0.95), rgba(236,253,245,0.9));
    border: 1px solid rgba(14, 165, 233, 0.18);
}
.egj-survey-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.egj-survey-head h3 {
    margin: 0;
}
.egj-builder-question,
.egj-question-card,
.egj-result-question {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
}
.egj-media-options {
    padding: 0.65rem;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.07);
    border: 1px dashed rgba(14, 165, 233, 0.35);
}
.egj-media-option-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.2fr) auto;
    gap: 0.5rem;
    align-items: center;
    margin: 0.5rem 0;
}
.egj-option-media-row {
    align-items: flex-start;
}
.egj-question-card legend {
    font-weight: 800;
    color: #0f172a;
    padding: 0 0.35rem;
}

@media (max-width: 700px) {
    .egj-media-option-row {
        grid-template-columns: 1fr;
    }
}
.egj-option-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.4rem 0;
    font-weight: 600;
}
.egj-survey-response {
    margin-top: 0.85rem;
}
.egj-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.5rem 0 0.25rem;
    font-size: 0.92rem;
    color: #334155;
}
.egj-checkbox-row input {
    margin-top: 0.2rem;
}
.egj-vote-form {
    gap: 0.55rem;
}
.egj-vote-help {
    display: block;
    color: var(--egj-muted);
    font-size: 0.84rem;
    margin-top: -0.25rem;
}
.egj-survey-results {
    margin-top: 1rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #cbd5e1;
}
.egj-private-results {
    margin-top: 0.85rem;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.egj-result-question blockquote {
    margin: 0.45rem 0 0;
    padding: 0.5rem 0.7rem;
    background: #f8fafc;
    border-left: 3px solid #38bdf8;
    border-radius: 10px;
}

.egj-actions-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.egj-inline-form {
    display: inline;
    margin: 0;
}
.egj-btn-compact {
    font-size: 0.82rem;
    padding: 0.42rem 0.72rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.egj-hint-field {
    font-weight: 400;
    color: var(--egj-muted);
    font-size: 0.85rem;
}
.egj-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.5rem;
}
.egj-class-tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}
.egj-group-size {
    width: 90px;
}
.egj-dynamic-result {
    margin-top: 0.8rem;
}
.egj-edit-user-panel {
    max-width: 560px;
}
.egj-sub-tight {
    margin-top: 0;
}

.wrap {
    max-width: 1220px;
    margin: 1rem auto;
    padding: 0 1rem 1.1rem;
}
.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.panel {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--egj-border);
    border-radius: 18px;
    box-shadow: 6px 6px 16px rgba(2, 6, 23, 0.06), -2px -2px 8px rgba(255,255,255,0.8);
    padding: 1rem;
}
.panel h2, .panel h3 { margin-top: 0; }
.stats .value { font-size: 1.65rem; font-weight: 800; color: var(--egj-primary-dark); }

.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--egj-border); }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 0.56rem; text-align: left; vertical-align: top; }
th { background: rgba(14, 165, 233, 0.08); font-size: 0.92rem; }
.egj-table-escudo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.inline-form { display: grid; gap: 0.4rem; }
.inline-btn { width: auto; padding: 0.45rem 0.75rem; margin-top: 0.35rem; }
.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.2rem 0.57rem;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.78rem;
    margin-right: 0.3rem;
}
.two-cols {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

/* Dashboard charts */
.chart-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
}
.chart-wrap {
    height: 260px;
    position: relative;
}

@media (max-width: 900px) {
    .egj-login-shell {
        grid-template-columns: 1fr;
        width: min(620px, 100%);
    }
    .egj-login-carousel-card {
        min-height: 360px;
        order: 1;
    }
    .egj-login-carousel-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .login-card {
        order: 2;
    }
    .egj-school-carousel {
        height: 250px;
        margin-top: 0.75rem;
    }
    .egj-school-carousel-ring {
        width: 150px;
        height: 150px;
    }
    .egj-school-carousel-item {
        transform: rotateY(var(--angle)) translateZ(170px);
    }
    .egj-school-carousel-logo {
        width: 74px;
        height: 74px;
    }
    .egj-school-carousel-logo img {
        max-width: 62px;
        max-height: 62px;
    }
    .egj-guardian-carousel-block {
        margin-top: 0.8rem;
        padding-top: 0.8rem;
    }
    .egj-guardian-carousel {
        height: 260px;
        margin-top: 0.5rem;
        perspective: 900px;
    }
    .egj-guardian-carousel-ring {
        width: 112px;
        height: 112px;
    }
    .egj-guardian-carousel-item {
        border-radius: 22px;
        transform: rotateY(var(--angle)) translateZ(300px);
    }
    .two-cols, .chart-grid { grid-template-columns: 1fr; }
    .egj-sidebar {
        width: 100%;
        position: static;
        min-height: auto;
    }
    .egj-main {
        margin-left: 0;
    }
    .egj-admin {
        flex-direction: column;
    }
    .egj-page-head {
        padding: 0.9rem;
    }
    .egj-quick-actions {
        width: 100%;
    }
    .egj-quick-actions .egj-btn {
        flex: 1 1 160px;
        justify-content: center;
    }
    .egj-filter-form,
    .egj-filter-form-wide {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .egj-profile-gate-head,
    .egj-profile-photo-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .egj-profile-gate-head {
        flex-direction: column;
    }
    .egj-profile-header-logos,
    .egj-profile-gate-avatar {
        margin: 0 auto;
    }
    .egj-profile-grid {
        grid-template-columns: 1fr;
    }
    .modo-login {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Sidebar: miniatura de perfil (no usar tamaño del logo) */
.egj-sidebar-brand .egj-sidebar-user-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    object-fit: cover;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

/* Login: escudo del colegio (modo estudiante) */
.egj-login-escudo-wrap {
    margin-top: 0.75rem;
    text-align: center;
}
.egj-login-escudo-wrap.hidden {
    display: none;
}
.egj-login-escudo {
    max-height: 100px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
}
.egj-login-school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 0.65rem;
    margin: 0.4rem 0 0.3rem;
}
.egj-login-school-card {
    min-height: 78px;
    border: 2px solid rgba(14, 165, 233, 0.14);
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #f0f9ff);
    display: grid;
    place-items: center;
    padding: 0.45rem;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.egj-login-school-card:hover,
.egj-login-school-card.active {
    transform: translateY(-2px);
    border-color: #0ea5e9;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.2);
}
.egj-login-school-card.active {
    background: linear-gradient(145deg, #e0f2fe, #dcfce7);
}
.egj-login-school-card img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}
.egj-login-school-card i {
    color: #0ea5e9;
    font-size: 1.8rem;
}
.egj-login-school-help {
    margin: 0.15rem 0 0.55rem !important;
    text-align: left !important;
    color: #64748b;
    font-size: 0.85rem;
}

.egj-empty-hint {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}
.egj-muted {
    color: #94a3b8;
}
.egj-badge-ok {
    background: #dcfce7;
    color: #166534;
}
.egj-form-entrega textarea {
    width: 100%;
    max-width: 320px;
    margin-bottom: 0.35rem;
}
.egj-word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.45rem 0;
}
.egj-word-chip,
.egj-word-reset {
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: linear-gradient(135deg, #e0f2fe, #dcfce7);
    color: #0f172a;
    cursor: pointer;
    font-weight: 700;
}
.egj-word-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.egj-word-reset {
    background: #fff7ed;
    color: #9a3412;
}
.egj-word-preview {
    color: #0f766e;
    font-weight: 700;
    margin: 0.25rem 0;
}
.egj-celda-entrega {
    min-width: 200px;
}
.egj-readonly-field {
    background: #f1f5f9 !important;
    cursor: not-allowed;
}
.egj-perfil-avatar-block {
    margin-bottom: 1rem;
}
.egj-perfil-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    display: block;
    margin-bottom: 0.5rem;
}
.egj-perfil-avatar-placeholder {
    width: 120px;
    height: 120px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #94a3b8;
    border-radius: 50%;
}
.egj-profile-subtitle {
    margin: 0.8rem 0 0.2rem;
    color: #0f172a;
}
.egj-profile-gate-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 12%, rgba(132, 204, 22, 0.24), transparent 30%),
        radial-gradient(circle at 88% 20%, rgba(14, 165, 233, 0.26), transparent 30%),
        radial-gradient(circle at 50% 92%, rgba(250, 204, 21, 0.22), transparent 34%),
        linear-gradient(135deg, #e0f2fe 0%, #ecfeff 42%, #fef3c7 100%);
}
.egj-profile-gate-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(2px);
    pointer-events: none;
}
.egj-profile-fractal-rain {
    left: 0;
    inset: 0;
    z-index: 0;
}
.egj-profile-gate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}
.egj-profile-gate-card {
    width: min(920px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    padding: 1.2rem;
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 34%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.99), rgba(240,249,255,0.97));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-top: 8px solid #38bdf8;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}
.egj-profile-gate-head {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.25rem 0.2rem 0.8rem;
    border-bottom: 1px solid rgba(14, 165, 233, 0.12);
}
.egj-profile-header-logos {
    flex: 0 0 170px;
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(14, 165, 233, 0.16);
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.14);
}
.egj-profile-header-logos img,
.egj-profile-header-logos span {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 16px;
    background: #f8fafc;
    padding: 0.35rem;
}
.egj-profile-header-logos img:last-child {
    width: 82px;
    max-width: 100%;
}
.egj-profile-header-logos span {
    display: grid !important;
    place-items: center;
    color: #0ea5e9 !important;
    font-size: 1.8rem;
}
.egj-profile-gate-head span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #047857;
    font-weight: 900;
}
.egj-profile-gate-head h1 {
    margin: 0.15rem 0;
    color: #0f172a;
}
.egj-profile-gate-head p {
    margin: 0;
    color: #64748b;
}
.egj-profile-photo-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.45rem 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(240, 249, 255, 0.98), rgba(236, 253, 245, 0.94));
    border: 1px solid rgba(14, 165, 233, 0.18);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.08);
}
.egj-profile-gate-avatar {
    grid-row: span 2;
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}
.egj-profile-gate-avatar-empty {
    display: grid;
    place-items: center;
    color: #38bdf8;
    background: #e0f2fe;
    font-size: 2rem;
}
.egj-profile-photo-box label {
    font-weight: 900;
    color: #0f172a;
}
.egj-profile-photo-box label span {
    color: #64748b;
    font-weight: 700;
}
.egj-profile-grid {
    display: grid;
    grid-template-columns: minmax(160px, 0.45fr) minmax(220px, 1fr);
    gap: 0.55rem 0.75rem;
    align-items: center;
}
.egj-profile-grid label {
    font-weight: 800;
    color: #0f172a;
}
.egj-profile-grid input {
    min-height: 40px;
    border: 1px solid var(--egj-border);
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    background: #fff;
}
.egj-profile-guardian {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(240, 249, 255, 0.86));
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.08);
}
.egj-profile-guardian h2 {
    margin: 0 0 0.75rem;
    color: #92400e;
}
.egj-profile-gate-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.egj-profile-gate-actions a {
    color: #64748b;
    font-weight: 800;
}

/* Calendario FullCalendar */
.egj-fullcalendar {
    min-height: 520px;
    background: linear-gradient(180deg, #fefce8 0%, #fff 45%);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #fde68a;
}
.egj-cal-panel-form {
    border-left: 4px solid #6366f1;
}
.egj-cal-panel-vista h2 {
    margin-top: 0;
}
.fc .fc-toolbar-title {
    font-size: 1.35rem !important;
}
.fc .fc-button-primary {
    background: #6366f1 !important;
    border-color: #4f46e5 !important;
}
.fc .fc-daygrid-day.fc-day-today {
    background: rgba(99, 102, 241, 0.12) !important;
}

/* Admin: importación masiva */
.egj-panel-import {
    border-left: 4px solid #0ea5e9;
}
.egj-panel-import code {
    font-size: 0.88em;
    background: rgba(14, 165, 233, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}
.egj-form-import {
    margin-top: 0.75rem;
}
.egj-import-resumen {
    margin-top: 1rem;
}
.egj-import-errores {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 0.9rem;
}
.egj-import-errores ul {
    margin: 0.4rem 0 0 1.1rem;
}

/* TinyMCE (módulos / actividades) */
.egj-tinymce-wrap {
    margin-bottom: 0.5rem;
}
.egj-tinymce-wrap .tox-tinymce {
    border-radius: 12px !important;
    border-color: var(--egj-border, #e2e8f0) !important;
}
.egj-form-rich .egj-hint-field {
    margin: -0.2rem 0 0.35rem;
}
.egj-form-rich .egj-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.5rem 0 0.25rem;
    font-size: 0.92rem;
    color: #334155;
}
.egj-form-rich .egj-checkbox-row input {
    margin-top: 0.2rem;
}
.egj-form-rich .egj-adjuntos-field {
    margin-top: 0.35rem;
}
.egj-form-rich .egj-adjuntos-field input[type="file"] {
    font-size: 0.88rem;
    max-width: 100%;
}
.egj-adjuntos-list {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
}
.egj-adjuntos-list li {
    margin: 0.15em 0;
}
.egj-adjuntos-preview {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.55rem;
}
.egj-adjunto-media {
    margin: 0;
    max-width: 360px;
}
.egj-adjunto-media img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}
.egj-adjunto-video {
    max-width: min(560px, 100%);
    width: 100%;
    justify-self: center;
    text-align: center;
}
.egj-adjunto-media video {
    width: 100%;
    max-height: 320px;
    display: block;
    border-radius: 12px;
    background: #020617;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.egj-adjunto-media figcaption,
.egj-adjunto-link {
    margin: 0.25rem 0 0;
    font-size: 0.84rem;
    color: #64748b;
}
.egj-badge-oculto {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    vertical-align: middle;
}
.egj-cell-desc {
    max-width: 420px;
}
.egj-rich-text {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #334155;
}
.egj-rich-text p {
    margin: 0.35em 0;
}
.egj-rich-text ul,
.egj-rich-text ol {
    margin: 0.35em 0 0.35em 1.25rem;
    padding: 0;
}
.egj-rich-text a {
    color: #2563eb;
    text-decoration: underline;
}
.egj-rich-text blockquote {
    margin: 0.4em 0;
    padding-left: 0.75rem;
    border-left: 3px solid #94a3b8;
    color: #475569;
}
.egj-rich-text table {
    border-collapse: collapse;
    margin: 0.5em 0;
    max-width: 100%;
    font-size: 0.92em;
}
.egj-rich-text th,
.egj-rich-text td {
    border: 1px solid #cbd5e1;
    padding: 0.35rem 0.5rem;
}
.egj-rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.egj-rich-text iframe {
    max-width: 100%;
    border-radius: 8px;
    border: 0;
}

.egj-water-page {
    position: relative;
}
.egj-water-hero {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.16), transparent 30%),
        linear-gradient(135deg, #f0f9ff, #ecfeff 50%, #fef9c3);
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 28px;
    padding: 1.1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}
.egj-water-drop {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 28px 28px 34px 34px;
    background: linear-gradient(145deg, #0ea5e9, #10b981);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 18px 35px rgba(14, 165, 233, 0.28);
}
.egj-water-profile-grid,
.egj-water-form-grid,
.egj-water-metrics,
.egj-water-grid,
.egj-water-chart-grid {
    display: grid;
    gap: 1rem;
}
.egj-water-profile-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.egj-water-profile-grid span {
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: 16px;
    padding: 0.75rem;
    background: #f8fafc;
}
.egj-water-metrics {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 1rem 0;
}
.egj-water-metric {
    min-height: 122px;
    border-radius: 24px;
    padding: 1rem;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.75), transparent 34%),
        linear-gradient(145deg, #e0f2fe, #dcfce7);
    border: 1px solid rgba(14, 165, 233, 0.16);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    display: grid;
    align-content: center;
    gap: 0.25rem;
}
.egj-water-metric i {
    color: #0284c7;
    font-size: 1.3rem;
}
.egj-water-metric strong {
    color: #0f172a;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
}
.egj-water-metric span {
    color: #475569;
    font-weight: 700;
}
.egj-water-grid,
.egj-water-chart-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.egj-water-form {
    display: grid;
    gap: 0.85rem;
}
.egj-water-fieldset {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    border: 0;
}
.egj-water-fieldset:disabled {
    opacity: 0.72;
}
.egj-water-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.egj-water-form label {
    display: grid;
    gap: 0.35rem;
    color: #0f172a;
    font-weight: 700;
}
.egj-water-form input,
.egj-water-form select,
.egj-water-form textarea,
.egj-water-filters input,
.egj-water-filters select {
    width: 100%;
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    padding: 0.65rem 0.75rem;
    background: #fff;
    color: #0f172a;
}
.egj-water-form textarea {
    resize: vertical;
}
.egj-steam-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34%),
        linear-gradient(135deg, #ecfeff, #f0fdf4);
    border: 1px solid rgba(14, 165, 233, 0.18);
}
.egj-steam-card {
    min-height: 118px;
    padding: 0.85rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(14, 165, 233, 0.16);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    display: grid;
    align-content: center;
    gap: 0.25rem;
}
.egj-steam-card span,
.egj-steam-card small {
    color: #64748b;
    font-weight: 700;
}
.egj-steam-card strong {
    color: #0f172a;
    font-size: clamp(1.25rem, 2.5vw, 1.8rem);
}
.egj-steam-result {
    background: linear-gradient(145deg, #dbeafe, #dcfce7);
}
.egj-math-workshop {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1.15fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 26px;
    background:
        radial-gradient(circle at bottom right, rgba(132, 204, 22, 0.22), transparent 35%),
        linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 1px solid rgba(14, 165, 233, 0.16);
}
.egj-math-workshop h3 {
    margin: 0 0 0.35rem;
    color: #0f172a;
}
.egj-math-workshop p {
    margin: 0 0 0.75rem;
    color: #475569;
    font-weight: 600;
}
.egj-draw-board {
    display: grid;
    gap: 0.55rem;
}
.egj-draw-reference {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.egj-draw-reference span,
.egj-recognition-result {
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
}
.egj-draw-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.egj-draw-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.egj-draw-board canvas {
    width: 100%;
    min-height: 220px;
    border-radius: 22px;
    border: 2px solid rgba(14, 165, 233, 0.28);
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), 0 16px 32px rgba(15, 23, 42, 0.12);
    touch-action: none;
    cursor: crosshair;
}
.egj-recognition-result {
    margin: 0;
    border-radius: 16px;
    background: #fef9c3;
    color: #854d0e;
}
.egj-draw-board-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: clamp(0.8rem, 2vw, 1.5rem);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 32%),
        linear-gradient(135deg, #ecfeff, #f8fafc);
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 0.85rem;
}
.egj-draw-board-fullscreen canvas {
    min-height: 60vh;
    height: 100%;
}
.egj-water-review-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.egj-water-review-list article {
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 18px;
    padding: 0.85rem;
    background: linear-gradient(145deg, #faf5ff, #f0f9ff);
    display: grid;
    gap: 0.2rem;
}
.egj-water-review-list small {
    color: #6d28d9;
    font-weight: 800;
    text-transform: uppercase;
}
.egj-water-filters {
    align-items: end;
}
.egj-water-summary-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin: 1rem 0;
    padding: 0.85rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #f5f3ff, #eff6ff);
    border: 1px solid rgba(139, 92, 246, 0.18);
}
.egj-water-summary-filters label {
    display: grid;
    gap: 0.35rem;
    color: #0f172a;
    font-weight: 800;
}
.egj-water-summary-filters input,
.egj-water-summary-filters select {
    width: 100%;
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 14px;
    padding: 0.65rem 0.75rem;
    background: #fff;
    color: #0f172a;
}
.egj-water-rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.egj-water-ranking {
    display: grid;
    gap: 0.65rem;
    list-style: none;
    margin: 0.8rem 0 0;
    padding: 0;
}
.egj-water-ranking li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
    border: 1px solid rgba(16, 185, 129, 0.16);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}
.egj-water-ranking strong,
.egj-water-ranking small {
    display: block;
}
.egj-water-ranking small {
    color: #64748b;
    margin-top: 0.15rem;
}
.egj-rank-pos {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #facc15, #10b981);
    color: #0f172a;
    font-weight: 900;
}
.egj-water-good {
    color: #047857;
    font-weight: 800;
}
.egj-water-warn {
    color: #b45309;
    font-weight: 800;
}

@media (max-width: 760px) {
    .egj-water-hero {
        text-align: left;
    }
    .egj-math-workshop {
        grid-template-columns: 1fr;
    }
    .egj-water-drop {
        width: 58px;
        height: 58px;
        font-size: 1.5rem;
    }
}

