/* ==================================================================
   IEP MAYNAS — Capa de interfaz responsive / app
   Se carga después de style.css en todas las páginas.
   - Móvil (< 992px): experiencia tipo aplicación (barra inferior,
     hojas deslizables, tablas en tarjetas, modales tipo sheet).
   - Escritorio: barra superior fija tipo "glass", mejor
     aprovechamiento del ancho e interacciones suaves.
================================================================== */

:root {
    --nav-h: 72px;
    --app-header-h: 72px;
    --tabbar-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
    --radius-lg: 18px;
    --radius-md: 14px;
    --ease: cubic-bezier(.22, .9, .32, 1);
    --glass-dark: rgba(34, 44, 58, .78);
    --glass-crimson: rgba(95, 19, 32, .82);
}

@media (max-width: 991.98px) {
    :root {
        --nav-h: 60px;
        --app-header-h: 60px;
    }
}

/* ── Base ─────────────────────────────────────────────────────── */
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body { -webkit-tap-highlight-color: transparent; }
img, video, iframe, canvas, svg { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(181, 139, 99, .65); outline-offset: 2px; }
::selection { background: rgba(130, 27, 45, .18); }

/* Texto largo (correos, URLs, nombres de archivo) nunca rompe el ancho */
td, th, .dashboard-panel, .card, .news-card, .folder-name, .folder-title { overflow-wrap: anywhere; }
.table td, .table th { overflow-wrap: normal; }

/* Superficies más modernas y coherentes */
.dashboard-panel, .dashboard-stat-card, .mini-stat, .card, .feature-card,
.news-card, .login-panel, .admin-login-panel, .contact-form-panel, .repository-card {
    border-radius: var(--radius-lg);
}
.dashboard-panel { transition: box-shadow .3s var(--ease); }
.btn { border-radius: 12px; transition: transform .15s var(--ease), box-shadow .2s, background-color .2s, color .2s, border-color .2s; }
.btn:active { transform: scale(.97); }
.form-control, .form-select { border-radius: 12px; }
.form-control:focus, .form-select:focus { border-color: var(--sand); box-shadow: 0 0 0 .22rem rgba(181, 139, 99, .22); }
.dropdown-menu { border: 1px solid var(--warm-200); border-radius: var(--radius-md); padding: 6px; box-shadow: var(--shadow-md); }
.dropdown-item { border-radius: 10px; padding: 8px 12px; }
.dropdown-item:active { background: var(--crimson); }
.alert { border-radius: var(--radius-md); }

/* Ripple (efecto al tocar) */
.ripple-host { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .22; animation: ripple .55s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--reveal-delay, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* Barra de progreso de navegación */
.nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--sand), #f5e6d3, var(--sand)); box-shadow: 0 0 10px rgba(181, 139, 99, .7); opacity: 0; transition: width 8s cubic-bezier(.1, .7, .1, 1), opacity .3s; pointer-events: none; }
.nav-progress.is-active { opacity: 1; width: 85%; }

/* Botón volver arriba */
.back-to-top { position: fixed; right: 20px; bottom: calc(24px + var(--safe-b)); z-index: 1040; width: 46px; height: 46px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--navy); box-shadow: var(--shadow-md); opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--crimson); }
body.has-chat .back-to-top { bottom: calc(96px + var(--safe-b)); right: 27px; }

/* Aviso sin conexión */
.app-toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 2100; transform: translate(-50%, 140%); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); transition: transform .35s var(--ease), opacity .25s, visibility .35s; white-space: nowrap; opacity: 0; visibility: hidden; }
.app-toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ==================================================================
   SITIO PÚBLICO
================================================================== */
body.public-layout { padding-top: var(--nav-h); }

.site-navbar {
    min-height: var(--nav-h);
    padding: 10px 0;
    padding-top: calc(10px + var(--safe-t));
    background: rgba(130, 27, 45, .97);
    transition: background-color .3s, box-shadow .3s, padding .3s var(--ease);
}
.site-navbar.is-scrolled {
    background: var(--glass-crimson);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 10px 30px rgba(36, 27, 31, .22);
}
@media (min-width: 992px) {
    .site-navbar.is-scrolled { padding-top: 6px; padding-bottom: 6px; }
    .site-navbar.is-scrolled .navbar-brand img { width: 38px; height: 38px; }
}
.site-navbar .navbar-brand { gap: 10px; letter-spacing: .02em; }
.site-navbar .navbar-brand img { transition: width .3s, height .3s; object-fit: contain; }

.site-nav .nav-link { position: relative; border-radius: 10px; transition: color .2s, background-color .2s; }
.site-nav .nav-link:hover { background: rgba(255, 255, 255, .1); }
.site-nav .nav-link::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: #f5e6d3; transform: scaleX(0); transition: transform .3s var(--ease); }
.site-nav .nav-link:hover::after, .site-nav .nav-link.active::after { transform: scaleX(1); }
.site-nav .nav-link.active { color: #fff; }
.site-admin-link { gap: 6px; transition: transform .2s var(--ease), background-color .2s; }
.site-admin-link:hover { transform: translateY(-1px); }

@media (max-width: 991.98px) {
    .site-navbar .container { flex-wrap: nowrap; }
    .site-navbar .navbar-brand { font-size: 1.05rem; margin-right: auto; }
    .site-navbar .navbar-brand img { width: 36px; height: 36px; }
    .site-navbar .site-admin-link { width: auto; margin: 0; min-height: 36px; padding: 6px 12px; font-size: .85rem; border-radius: 999px; }
}

/* Footer público */
.site-footer { margin-top: 72px; padding: 56px 0 24px; background: linear-gradient(160deg, #2b1a1f, #3a2026 55%, #2f4358); color: rgba(255, 255, 255, .78); }
.site-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer-brand strong { color: #fff; font-family: 'Sora', system-ui, sans-serif; font-size: 1.15rem; }
.site-footer-brand p { max-width: 420px; margin: 14px 0 0; line-height: 1.6; }
.site-footer h6 { color: #f5e6d3; font-family: 'Sora', system-ui, sans-serif; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer-grid a:not(.d-inline-flex) { display: block; padding: 5px 0; color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s, transform .2s var(--ease); }
.site-footer-grid a:not(.d-inline-flex):hover { color: #fff; transform: translateX(4px); }
.site-footer-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
@media (max-width: 767.98px) {
    .site-footer { margin-top: 48px; padding-top: 40px; }
    .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .site-footer-brand { grid-column: 1 / -1; }
}

/* Footer de paneles */
.panel-footer { padding: 18px 0; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--warm-200); background: #fff; }

/* ==================================================================
   MAYNET — página del sistema y acceso único
================================================================== */
.mn-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 88px;
    color: #fff;
    background:
        radial-gradient(1200px 500px at 85% -10%, rgba(181, 139, 99, .28), transparent 60%),
        linear-gradient(135deg, #5f1320 0%, #821b2d 38%, #3a3550 72%, #2f4358 100%);
}
.mn-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); mask-image: linear-gradient(180deg, #000 30%, transparent 95%); pointer-events: none; }
.mn-hero-glow span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: mnFloat 14s ease-in-out infinite alternate; }
.mn-hero-glow span:first-child { width: 420px; height: 420px; left: -120px; top: 30%; background: #b58b63; }
.mn-hero-glow span:last-child { width: 360px; height: 360px; right: 8%; bottom: -160px; background: #3f7d68; animation-delay: -6s; }
@keyframes mnFloat { to { transform: translate(60px, -40px) scale(1.15); } }

.mn-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mn-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); }
.mn-wordmark { margin: 22px 0 6px; font-family: 'Sora', system-ui, sans-serif; font-size: clamp(3.6rem, 10vw, 7.5rem); font-weight: 800; line-height: .92; letter-spacing: -.04em; }
.mn-wordmark span { background: linear-gradient(90deg, #e7c9a4, #b58b63); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mn-tagline { margin: 0 0 18px; font-family: 'Sora', system-ui, sans-serif; font-size: clamp(1.25rem, 2.6vw, 1.8rem); font-weight: 600; color: #f5e6d3; }
.mn-lead { max-width: 600px; margin: 0; color: rgba(255,255,255,.84); font-size: 1.05rem; line-height: 1.65; }
.mn-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.mn-stats div { display: flex; align-items: baseline; gap: 8px; padding: 12px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-md); background: rgba(255,255,255,.07); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mn-stats strong { font-family: 'Sora', system-ui, sans-serif; font-size: 1.5rem; color: #fff; }
.mn-stats span { color: rgba(255,255,255,.75); font-size: .88rem; }

.mn-login { position: relative; overflow: hidden; padding: 32px; border-radius: 24px; background: #fffdf8; color: var(--ink); box-shadow: 0 40px 80px rgba(20, 10, 15, .4); scroll-margin-top: calc(var(--nav-h) + 20px); }
.mn-login::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--crimson), var(--sand), #3f7d68); }
.mn-login-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.mn-login-head img { object-fit: contain; }
.mn-login-head span { display: block; color: var(--muted); font-size: .85rem; font-weight: 600; }
.mn-login-head h2 { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--crimson); }
.mn-login-head h2 em { font-style: normal; color: var(--sand); }
.mn-login .form-label { font-weight: 600; }
.mn-password { position: relative; }
.mn-password .form-control { padding-right: 52px; }
.mn-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); }
.mn-toggle:hover, .mn-toggle[aria-pressed="true"] { color: var(--crimson); background: var(--warm-100); }
.mn-submit { padding-top: 12px; padding-bottom: 12px; font-weight: 700; background: linear-gradient(135deg, var(--crimson), var(--crimson-dk)); box-shadow: 0 12px 24px rgba(130, 27, 45, .28); }
.mn-submit:hover { box-shadow: 0 16px 30px rgba(130, 27, 45, .36); transform: translateY(-1px); }
.mn-login-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--warm-200); color: var(--muted); font-size: .85rem; }
.mn-login-foot svg { flex-shrink: 0; margin-top: 2px; color: #3f7d68; }
.mn-login-foot a { color: var(--crimson); font-weight: 700; }

.mn-section { padding-top: 88px; padding-bottom: 24px; }
.mn-heading { max-width: 680px; margin-bottom: 36px; }
.mn-heading h2 { margin: 8px 0 10px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.mn-heading p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.mn-heading-light h2 { color: #fff; }
.mn-heading-light p { color: rgba(255,255,255,.78); }

.mn-modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mn-module { position: relative; padding: 24px; border: 1px solid var(--warm-200); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.mn-module:hover { transform: translateY(-6px); border-color: transparent; box-shadow: var(--shadow-lg); }
.mn-module-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 16px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--crimson), var(--crimson-dk)); box-shadow: 0 10px 20px rgba(130, 27, 45, .22); transition: transform .4s var(--ease); }
.mn-module:nth-child(4n+2) .mn-module-icon { background: linear-gradient(135deg, var(--navy), #1e2f40); box-shadow: 0 10px 20px rgba(47, 67, 88, .25); }
.mn-module:nth-child(4n+3) .mn-module-icon { background: linear-gradient(135deg, #3f7d68, #2c5a4b); box-shadow: 0 10px 20px rgba(63, 125, 104, .25); }
.mn-module:nth-child(4n+4) .mn-module-icon { background: linear-gradient(135deg, var(--sand), #8d6a47); box-shadow: 0 10px 20px rgba(181, 139, 99, .3); }
.mn-module:hover .mn-module-icon { transform: rotate(-6deg) scale(1.08); }
.mn-module h3 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; }
.mn-module p { margin: 0 0 16px; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.mn-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-tags span { padding: 4px 10px; border-radius: 999px; background: var(--warm-100); color: var(--crimson-dk); font-size: .74rem; font-weight: 700; }

.mn-profiles-band { margin-top: 72px; padding: 80px 0; color: #fff; background: linear-gradient(135deg, #2f4358, #24323f 60%, #3a2026); }
.mn-profiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mn-profile { --tone: #b58b63; padding: 24px 20px; border: 1px solid rgba(255,255,255,.1); border-top: 3px solid var(--tone); border-radius: var(--radius-lg); background: rgba(255,255,255,.05); transition: transform .3s var(--ease), background-color .3s; }
.mn-profile:hover { transform: translateY(-6px); background: rgba(255,255,255,.09); }
.mn-tone-1 { --tone: #4ade80; }
.mn-tone-2 { --tone: #60a5fa; }
.mn-tone-3 { --tone: #e7c9a4; }
.mn-tone-4 { --tone: #f87171; }
.mn-tone-5 { --tone: #c084fc; }
.mn-profile-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 14px; color: var(--tone); background: rgba(255,255,255,.08); }
.mn-profile h3 { margin: 0 0 8px; color: #fff; font-size: 1.15rem; font-weight: 700; }
.mn-profile p { margin: 0 0 14px; color: rgba(255,255,255,.74); font-size: .9rem; line-height: 1.5; }
.mn-profile ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mn-profile li { padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: .74rem; font-weight: 600; }

.mn-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.mn-steps li { position: relative; padding: 28px 24px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--warm-200); box-shadow: var(--shadow-sm); }
.mn-steps li:not(:last-child)::after { content: ""; position: absolute; top: 50px; right: -18px; width: 18px; height: 2px; background: linear-gradient(90deg, var(--sand), transparent); }
.mn-step-num { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; background: var(--warm-100); color: var(--crimson); font-family: 'Sora', system-ui, sans-serif; font-size: 1.2rem; font-weight: 800; }
.mn-steps h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; }
.mn-steps p { margin: 0; color: var(--muted); font-size: .93rem; }

.mn-section.pt-0 { padding-top: 64px !important; }
.mn-app { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 44px; border-radius: 24px; color: #fff; background: linear-gradient(120deg, var(--crimson), #5f1320 55%, #2f4358); box-shadow: var(--shadow-lg); }
.mn-app h2 { margin: 6px 0 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.mn-app p { max-width: 560px; margin: 0; color: rgba(255,255,255,.82); }
.mn-app .section-kicker { color: #e7c9a4; }
.mn-app-actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.mn-app-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

/* Botón MayNet de la barra pública */
.site-maynet-link { gap: 8px; letter-spacing: .01em; }
.site-maynet-link img { width: 22px; height: 22px; object-fit: contain; }
.site-maynet-link em { font-style: normal; color: var(--sand); }
.site-maynet-link.active { background: #f5e6d3; }

@media (max-width: 1199.98px) {
    .mn-modules { grid-template-columns: repeat(2, 1fr); }
    .mn-profiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991.98px) {
    .mn-hero { padding: 36px 0 48px; }
    .mn-wordmark { margin-top: 16px; }
    .mn-stats { margin-top: 22px; }
    .mn-login { padding: 24px 20px; }
    .mn-section { padding-top: 56px; }
    .mn-profiles-band { margin-top: 48px; padding: 56px 0; }
    /* Perfiles como carrusel deslizable, estilo app */
    .mn-profiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 4px 16px 12px; scrollbar-width: none; }
    .mn-profiles::-webkit-scrollbar { display: none; }
    .mn-profile { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; }
    .mn-steps { grid-template-columns: 1fr; }
    .mn-steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; padding: 20px; }
    .mn-step-num { grid-row: span 2; margin: 0; }
    .mn-steps li::after { display: none; }
    .mn-app { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
}
@media (max-width: 575.98px) {
    .mn-modules { grid-template-columns: 1fr; gap: 12px; }
    .mn-module { display: grid; grid-template-columns: 50px 1fr; column-gap: 14px; padding: 18px; }
    .mn-module-icon { grid-row: span 3; margin: 0; }
    .mn-module p { margin-bottom: 10px; }
    .mn-stats div { padding: 10px 14px; }
    .mn-stats strong { font-size: 1.25rem; }
    .mn-lead { display: none; }
    .mn-tagline { margin-bottom: 0; }
    .mn-stats { flex-wrap: nowrap; gap: 8px; margin-top: 18px; }
    .mn-stats div { flex: 1; justify-content: center; padding: 8px 6px; }
    .mn-stats span { font-size: .78rem; }
    .mn-app-actions, .mn-app-actions .btn { width: 100%; justify-content: center; }
}

/* ==================================================================
   PANELES (admin, director, coordinador, docente, estudiante)
   La barra .dashboard-topbar se mueve por JS a <header class="app-header">
================================================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-top: var(--safe-t);
    color: #fff;
    background: linear-gradient(120deg, rgba(47, 67, 88, .98), rgba(55, 92, 90, .98));
    transition: background-color .3s, box-shadow .3s;
}
/* Cuando el panel tiene hero, la cabecera flota sobre él (transparente) */
.app-header.is-overlay { margin-bottom: calc(-1 * (var(--app-header-h) + var(--safe-t))); background: transparent; }
.app-header.is-scrolled {
    background: var(--glass-dark);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    box-shadow: 0 10px 30px rgba(20, 28, 38, .25);
}
.app-header .dashboard-topbar { min-height: var(--app-header-h); margin: 0; padding: 10px 0; flex-direction: row !important; align-items: center !important; flex-wrap: nowrap; }
.app-header .navbar-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; margin: 0; }
.app-header .navbar-brand img { width: 42px; height: 42px; object-fit: contain; }
.app-header .dashboard-topbar > div { flex-wrap: nowrap !important; gap: 4px !important; }
.app-header .dashboard-topbar .btn {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
}
.app-header .dashboard-topbar .btn-outline-light { border-color: transparent; color: rgba(255, 255, 255, .88); }
.app-header .dashboard-topbar .btn-outline-light:hover,
.app-header .dashboard-topbar .btn-outline-light:focus-visible,
.app-header .dashboard-topbar .btn-outline-light.show { background: rgba(255, 255, 255, .14); color: #fff; }
.app-header .dashboard-topbar .btn-light { color: var(--navy); box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.app-header .dashboard-topbar .btn-warning { margin-left: 6px; }

.panel-layout .teacher-dashboard-hero.has-overlay-header { padding-top: calc(var(--app-header-h) + var(--safe-t) + 40px); }
.panel-layout .dashboard-shell { min-height: auto; }

/* Escritorio mediano: iconos con etiqueta solo en la página actual */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .app-header .dashboard-topbar .btn:not(.btn-light):not(.btn-warning) .nav-label { display: none; }
    .app-header .dashboard-topbar .btn:not(.btn-light):not(.btn-warning) { padding: 9px 11px; }
    .app-header .dashboard-topbar .btn-warning .nav-label { display: none; }
    .app-header .dashboard-topbar .btn-warning { padding: 9px 11px; }
    .app-header .dashboard-topbar .dropdown-toggle::after { margin-left: 0; }
}

/* Escritorio grande: más ancho útil */
@media (min-width: 1600px) {
    .panel-layout .container { max-width: 1480px; }
}

/* Escritorio: tarjetas con más vida */
@media (hover: hover) and (min-width: 992px) {
    .dashboard-panel:hover { box-shadow: 0 20px 45px rgba(36, 27, 31, .1); }
}

/* Botón menú (solo móvil) */
.app-menu-btn { display: none; width: 40px; height: 40px; border: 0; border-radius: 12px; color: #fff; background: rgba(255, 255, 255, .14); place-items: center; position: relative; flex-shrink: 0; }
.app-menu-btn:active { transform: scale(.94); }
.app-page-title { display: none; }

/* ==================================================================
   NAVEGACIÓN INFERIOR (móvil) — compartida sitio público / paneles
================================================================== */
.app-tabbar { display: none; }

@media (max-width: 991.98px) {
    body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }

    .app-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1045;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        height: calc(var(--tabbar-h) + var(--safe-b));
        padding: 6px 6px var(--safe-b);
        background: rgba(255, 253, 248, .92);
        -webkit-backdrop-filter: saturate(180%) blur(18px);
        backdrop-filter: saturate(180%) blur(18px);
        border-top: 1px solid rgba(36, 27, 31, .08);
        box-shadow: 0 -8px 30px rgba(36, 27, 31, .08);
    }
    .app-tab {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 4px 2px;
        border: 0;
        border-radius: 14px;
        background: none;
        color: #7a6f73;
        font-size: .68rem;
        font-weight: 700;
        line-height: 1.1;
        text-decoration: none;
        transition: color .2s;
    }
    .app-tab > span:not(.app-tab-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-tab svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
    .app-tab .app-tab-icon { position: relative; display: grid; place-items: center; width: 52px; height: 28px; border-radius: 999px; transition: background-color .3s var(--ease); }
    .app-tab.active { color: var(--crimson); }
    .app-tab.active .app-tab-icon { background: rgba(130, 27, 45, .1); }
    .app-tab.active svg { transform: translateY(-1px) scale(1.06); }
    .app-tab:active svg { transform: scale(.88); }
    .app-tab-badge { position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc3545; color: #fff; font-size: .65rem; line-height: 18px; text-align: center; border: 2px solid #fffdf8; }
    .public-layout .app-tab svg { margin-bottom: 1px; }
    .app-tab-maynet { color: var(--crimson); }
    .app-tab-maynet .app-tab-icon { background: linear-gradient(135deg, var(--crimson), var(--crimson-dk)); box-shadow: 0 6px 14px rgba(130, 27, 45, .3); }
    .app-tab-maynet .app-tab-icon img { width: 22px; height: 22px; object-fit: contain; }
    .app-tab-maynet.active .app-tab-icon { box-shadow: 0 0 0 3px rgba(130, 27, 45, .2), 0 6px 14px rgba(130, 27, 45, .3); }

    /* Paneles en modo app */
    .app-header .dashboard-topbar > div { display: none !important; }
    .app-header .navbar-brand { font-size: 1.05rem; }
    .app-header .navbar-brand img { width: 34px; height: 34px; }
    .app-menu-btn { display: grid; margin-left: auto; }
    .app-page-title { display: block; flex: 1; min-width: 0; margin: 0 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; color: rgba(255, 255, 255, .7); font-weight: 600; text-align: right; }

    .panel-layout .teacher-dashboard-hero.has-overlay-header { padding-top: calc(var(--app-header-h) + var(--safe-t) + 18px); padding-bottom: 56px; }
    .teacher-dashboard-hero h1 { font-size: clamp(1.6rem, 6.4vw, 2.4rem); }
    .teacher-dashboard-hero .hero-copy { font-size: .98rem; }
    .teacher-profile-card { padding: 16px; border-radius: var(--radius-md); }
    .teacher-profile-card strong { font-size: 1.25rem; }

    /* Chat flotante por encima de la barra inferior */
    body.has-tabbar #maynet-chat-widget { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px) !important; right: 14px !important; }
    body.has-tabbar #chat-toggle { width: 52px; height: 52px; }
    body.has-tabbar.has-chat .back-to-top { bottom: calc(var(--tabbar-h) + var(--safe-b) + 78px); right: 17px; }
    body.has-tabbar .back-to-top { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); right: 14px; width: 42px; height: 42px; }
    body.has-tabbar .app-toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); }
}

@media (max-width: 575.98px) {
    #chat-container { position: fixed !important; left: 10px; right: 10px !important; bottom: calc(var(--tabbar-h) + var(--safe-b) + 76px) !important; width: auto !important; height: min(70vh, 560px) !important; border-radius: var(--radius-lg) !important; }
    body:not(.has-tabbar) #chat-container { bottom: 90px !important; }
}

/* ── Hoja inferior (Más) ─────────────────────────────────────── */
.app-sheet.offcanvas-bottom {
    height: auto;
    max-height: 85vh;
    border: 0;
    border-radius: 24px 24px 0 0;
    padding-bottom: var(--safe-b);
    box-shadow: 0 -20px 50px rgba(36, 27, 31, .25);
    background: #fffdf8;
}
.app-sheet-handle { width: 42px; height: 5px; margin: 10px auto 0; border-radius: 999px; background: rgba(36, 27, 31, .18); }
.app-sheet .offcanvas-header { padding: 12px 20px 4px; }
.app-sheet .offcanvas-title { font-family: 'Sora', system-ui, sans-serif; font-weight: 700; font-size: 1.05rem; }
.app-sheet .offcanvas-body { padding: 12px 16px 20px; }
.app-sheet-user { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-md); background: linear-gradient(120deg, var(--navy), #3f7d68); color: #fff; }
.app-sheet-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .6); }
.app-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-sheet-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 92px;
    padding: 12px 6px;
    border: 1px solid var(--warm-200);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    transition: transform .15s var(--ease), border-color .2s, box-shadow .2s;
}
.app-sheet-item:active { transform: scale(.96); }
.app-sheet-item:hover { border-color: var(--sand); color: var(--crimson); box-shadow: var(--shadow-sm); }
.app-sheet-item.active { border-color: var(--crimson); color: var(--crimson); background: rgba(130, 27, 45, .04); }
.app-sheet-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--warm-100); color: var(--crimson); }
.app-sheet-icon svg { width: 22px; height: 22px; }
.app-sheet-logout { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: var(--radius-md); background: rgba(220, 53, 69, .1); color: #b02a37; font-weight: 700; text-decoration: none; }
.app-sheet-logout:hover { background: rgba(220, 53, 69, .16); color: #b02a37; }
@media (min-width: 576px) { .app-sheet-grid { grid-template-columns: repeat(4, 1fr); } .app-sheet.offcanvas-bottom { max-width: 640px; margin: 0 auto; } }

/* ==================================================================
   COMPONENTES EN PANTALLAS PEQUEÑAS
================================================================== */
@media (max-width: 767.98px) {
    /* Evita el zoom automático de iOS al enfocar campos */
    input.form-control, select.form-select, textarea.form-control, .form-control, .form-select,
    input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], textarea, select {
        font-size: 16px !important;
    }
    .btn { min-height: 42px; }
    .btn-sm { min-height: 36px; }
    .dashboard-content { padding-bottom: 32px; }
    .dashboard-panel { padding: 18px !important; border-radius: var(--radius-md); }
    .dashboard-panel-heading { margin-bottom: 16px; }
    .dashboard-panel-heading h2, .dashboard-panel h2 { font-size: 1.3rem; }
    .dashboard-stat-card { padding: 16px; border-radius: var(--radius-md); }
    .dashboard-stat-card strong { font-size: 1.9rem; margin-top: 8px; }
    .dashboard-stat-card span { font-size: .85rem; }
    .section-heading h2, .home-section h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .home-section { padding-top: 48px !important; padding-bottom: 48px !important; }
    .container { padding-left: 16px; padding-right: 16px; }
    .nav-tabs, .nav-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .nav-tabs::-webkit-scrollbar, .nav-pills::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-link, .nav-pills .nav-link { white-space: nowrap; }
    .pagination { flex-wrap: wrap; }
    .action-group { gap: 6px; }

    /* Modales como hoja inferior */
    .modal-dialog:not(.modal-fullscreen) {
        display: flex;
        align-items: flex-end;
        min-height: 100%;
        max-width: none;
        margin: 0;
    }
    .modal-dialog:not(.modal-fullscreen) .modal-content {
        width: 100%;
        max-height: 92vh;
        border: 0;
        border-radius: 24px 24px 0 0;
        padding-bottom: var(--safe-b);
    }
    .modal-dialog-scrollable { height: 100%; }
    .modal-dialog:not(.modal-fullscreen) .modal-body { overflow-y: auto; }
    .modal.fade .modal-dialog:not(.modal-fullscreen) { transform: translateY(100%); transition: transform .35s var(--ease); }
    .modal.show .modal-dialog:not(.modal-fullscreen) { transform: none; }
    .modal-footer { flex-wrap: wrap; }
    .modal-footer > .btn { flex: 1 1 auto; }

    /* Tablas apiladas como tarjetas */
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr {
        margin-bottom: 12px;
        padding: 6px 4px;
        border: 1px solid var(--warm-200);
        border-radius: var(--radius-md);
        background: #fff;
        box-shadow: 0 4px 14px rgba(36, 27, 31, .05);
    }
    .table-stack > :not(caption) > * > * { border-bottom-width: 0; box-shadow: none; }
    .table-stack td { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 12px !important; text-align: right; border: 0; overflow-wrap: anywhere; min-width: 0; }
    .table-stack td + td { border-top: 1px dashed rgba(36, 27, 31, .08); }
    .table-stack td[data-label]::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-align: left; text-transform: uppercase; padding-top: 2px; }
    .table-stack td.td-full, .table-stack td[data-label=""] { display: block; text-align: left; }
    .table-stack td.td-full::before, .table-stack td[data-label=""]::before { display: none; }
    .table-stack td > * { max-width: 100%; }
    .table-stack td .action-group, .table-stack td .btn-group, .table-stack td .d-flex { justify-content: flex-end; flex-wrap: wrap; }
    .table-stack.table-hover > tbody > tr:hover > * { --bs-table-bg-state: transparent; }
    .table-responsive:has(> .table-stack) { overflow: visible; }
}

/* Tablas con scroll horizontal: indicador sutil */
.table-responsive { -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }

/* Pantallas muy pequeñas */
@media (max-width: 379.98px) {
    .app-tab { font-size: .62rem; }
    .app-tab .app-tab-icon { width: 44px; }
    .app-sheet-grid { grid-template-columns: repeat(2, 1fr); }
    .row > .col-6 .dashboard-stat-card strong { font-size: 1.55rem; }
}

/* Modo standalone (app instalada) */
@media (display-mode: standalone) {
    body { overscroll-behavior-y: none; }
    .app-header .navbar-brand, .site-navbar .navbar-brand { user-select: none; }
}

/* Impresión: sin elementos de navegación */
@media print {
    .app-tabbar, .app-header, .site-navbar, .back-to-top, .nav-progress, #maynet-chat-widget, .site-footer { display: none !important; }
    body.public-layout, body.has-tabbar { padding: 0 !important; }
}

/* ==================================================================
   ENCABEZADOS COMPACTOS — PANELES DE CADA PERFIL
   Menos altura, título y perfil en una sola franja, entrada animada.
================================================================== */
.teacher-dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 18px 0 52px;
    background:
        radial-gradient(600px 220px at 88% 0%, rgba(181, 139, 99, .32), transparent 70%),
        linear-gradient(120deg, #2f4358 0%, #375c5a 55%, #3f7d68 100%);
    background-size: 100% 100%, 180% 180%;
    animation: heroShift 18s ease-in-out infinite alternate;
}
.teacher-dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 18px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
    mask-image: linear-gradient(90deg, transparent, #000 70%);
    pointer-events: none;
}
.teacher-dashboard-hero > .container { position: relative; z-index: 1; }
@keyframes heroShift { to { background-position: 0 0, 100% 50%; } }

.panel-layout .teacher-dashboard-hero.has-overlay-header { padding-top: calc(var(--app-header-h) + var(--safe-t) + 18px); }
.teacher-dashboard-hero > .container > .row { --bs-gutter-y: .75rem; align-items: center !important; animation: heroIn .5s var(--ease) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.teacher-dashboard-hero .section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #f5e6d3;
    font-size: .7rem;
}
.teacher-dashboard-hero h1 {
    max-width: 760px;
    margin: 0 0 4px;
    font-size: clamp(1.3rem, 2.3vw, 1.8rem);
    line-height: 1.18;
    letter-spacing: -.01em;
}
.teacher-dashboard-hero .hero-copy {
    max-width: 720px;
    margin: 0;
    font-size: .93rem;
    color: rgba(255, 255, 255, .78);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-greeting { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: rgba(255, 255, 255, .7); font-size: .78rem; font-weight: 600; }
.hero-greeting::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }

/* Tarjeta de perfil: chip compacto */
.teacher-profile-card {
    display: flex;
    align-items: center;
    gap: 12px !important;
    max-width: 420px;
    margin-left: auto;
    padding: 10px 16px 10px 10px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
    transition: background-color .25s, transform .25s var(--ease);
}
.teacher-profile-card:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.teacher-profile-card img { width: 46px !important; height: 46px !important; flex-shrink: 0; }
.teacher-profile-card > div { min-width: 0; }
.teacher-profile-card span { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #e7c9a4; }
.teacher-profile-card strong { margin: 1px 0; font-size: 1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-profile-card small { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-profile-avatar { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; font-family: 'Sora', system-ui, sans-serif; font-weight: 800; font-size: 1.05rem; }

.dashboard-content { margin-top: -30px; position: relative; z-index: 2; }

/* Paneles y cabeceras de sección más livianos */
.dashboard-panel-heading { margin-bottom: 18px; }
.dashboard-panel-heading .section-kicker { margin-bottom: 4px; }
.dashboard-panel-heading h2 { margin-bottom: 4px; font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
.dashboard-panel-heading p { color: var(--muted); font-size: .92rem; }

@media (max-width: 991.98px) {
    .panel-layout .teacher-dashboard-hero.has-overlay-header { padding-top: calc(var(--app-header-h) + var(--safe-t) + 12px); padding-bottom: 40px; }
    .teacher-dashboard-hero h1 { font-size: clamp(1.15rem, 5vw, 1.45rem); }
    .teacher-dashboard-hero .hero-copy { -webkit-line-clamp: 1; font-size: .88rem; }
    .teacher-dashboard-hero .section-kicker { margin-bottom: 4px; }
    /* El perfil ya aparece en el menú Más */
    .teacher-dashboard-hero .teacher-profile-card { display: none !important; }
    .hero-greeting { display: none; }
    .dashboard-content { margin-top: -24px; }
}
@media (prefers-reduced-motion: reduce) {
    .teacher-dashboard-hero, .teacher-dashboard-hero > .container > .row { animation: none; }
}

/* ==================================================================
   ENCABEZADOS COMPACTOS — SITIO PÚBLICO
================================================================== */
.about-hero, .news-hero, .contact-hero {
    min-height: 0;
    padding: 56px 0 52px;
}
.about-hero h1, .news-hero h1, .contact-hero h1 {
    max-width: 720px;
    margin-bottom: 12px;
    font-size: clamp(1.7rem, 3.2vw, 2.55rem);
    line-height: 1.1;
}
.about-hero .hero-copy, .news-hero .hero-copy, .contact-hero .hero-copy { margin-bottom: 0; font-size: 1.02rem; }
.about-hero .row, .news-hero .row, .contact-hero .row { --bs-gutter-y: 1.5rem; animation: heroIn .55s var(--ease) both; }

.news-summary-panel, .contact-summary-panel { gap: 10px; padding: 14px; border-radius: var(--radius-lg); }
.news-summary-panel div, .contact-summary-panel div { padding: 12px 16px; border-radius: var(--radius-md); transition: transform .25s var(--ease); }
.news-summary-panel div:hover, .contact-summary-panel div:hover { transform: translateX(4px); }
.news-summary-panel strong, .contact-summary-panel strong { font-size: 1.3rem; }
.identity-panel { padding: 20px; border-radius: var(--radius-lg); }

/* Inicio: carrusel de noticias más contenido */
.home-hero { min-height: 0; padding: 48px 0 28px; }
.home-hero .hero-title { margin-bottom: 12px; font-size: clamp(1.8rem, 3.6vw, 2.9rem); line-height: 1.08; }
.home-hero .hero-pill { margin-bottom: 14px; }
.home-hero .hero-copy { margin-bottom: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-hero .hero-actions { margin-top: 22px; }
.home-news-hero-card { min-height: 0; padding: 20px; border-radius: var(--radius-lg); }
.home-news-media { height: 210px; margin: 0 0 16px; border-radius: var(--radius-md); }
.home-news-hero-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 991.98px) {
    .about-hero, .news-hero, .contact-hero { padding: 32px 0 30px; }
    .about-hero h1, .news-hero h1, .contact-hero h1 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
    .about-hero .hero-copy, .news-hero .hero-copy, .contact-hero .hero-copy { font-size: .95rem; }
    /* Resúmenes laterales como fila deslizable */
    .news-summary-panel, .contact-summary-panel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        scrollbar-width: none;
    }
    .news-summary-panel::-webkit-scrollbar, .contact-summary-panel::-webkit-scrollbar { display: none; }
    .news-summary-panel div, .contact-summary-panel div { flex: 0 0 auto; min-width: 150px; flex-direction: column; align-items: flex-start; gap: 2px; scroll-snap-align: start; }
    .news-summary-panel span, .contact-summary-panel span { text-align: left; font-size: .8rem; }
    .identity-panel { padding: 16px; }
    .identity-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px; }

    .home-hero { padding: 24px 0 8px; }
    .home-hero .hero-copy { -webkit-line-clamp: 2; font-size: .95rem; }
    .home-hero .hero-actions { margin-top: 16px; flex-direction: row; }
    .home-news-hero-card { padding: 14px; }
    .home-news-media { height: 180px; margin-bottom: 12px; }
    .home-news-hero-card .news-day { display: inline; margin: 0 6px 0 0; font-size: 1.3rem; }
    .home-news-hero-card small { display: inline; margin: 0; font-size: .85rem; }
    .home-news-hero-card p { margin-top: 6px; }
}

/* Tarjetas de estadística en dos columnas en móvil (más compacto) */
@media (max-width: 575.98px) {
    .row > .col-sm-6:has(> .dashboard-stat-card, > .stat-card-v2),
    .row > .col-md-6:has(> .dashboard-stat-card, > .stat-card-v2) { flex: 0 0 auto; width: 50%; }
    .dashboard-stat-card, .stat-card-v2 { padding: 14px !important; }
    .stat-card-v2 strong.fs-2 { font-size: 1.6rem !important; }
    .dashboard-stat-card strong { font-size: 1.6rem; margin-top: 4px; }
}

/* ==================================================================
   CARGA DE MULTIMEDIA (noticias)
================================================================== */
.media-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 2px dashed var(--warm-200);
    border-radius: var(--radius-md);
    background: #fffaf3;
    color: var(--muted);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.media-dropzone svg { color: var(--sand); margin-bottom: 4px; }
.media-dropzone strong { color: var(--ink); font-size: .95rem; }
.media-dropzone span { font-size: .82rem; }
.media-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.media-dropzone:hover, .media-dropzone:focus-within { border-color: var(--sand); background: #fff5e8; }
.media-dropzone.is-dragging { border-color: var(--crimson); background: rgba(130, 27, 45, .05); transform: scale(1.01); }
.media-dropzone.is-disabled { opacity: .6; pointer-events: none; }

.media-queue { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.media-queue:empty { display: none; }
.media-queue-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--warm-200); border-radius: 12px; background: #fff; animation: heroIn .3s var(--ease) both; }
.media-queue-thumb { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; overflow: hidden; border-radius: 10px; background: var(--warm-100); color: var(--crimson); }
.media-queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-queue-info { flex: 1; min-width: 0; }
.media-queue-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.media-queue-meta { display: block; color: var(--muted); font-size: .76rem; }
.media-queue-bar { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: var(--warm-100); }
.media-queue-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--sand), var(--crimson)); transition: width .25s linear; }
.media-queue-item.is-uploading .media-queue-bar span { background-image: linear-gradient(90deg, var(--sand), var(--crimson), var(--sand)); background-size: 200% 100%; animation: barFlow 1.2s linear infinite; }
.media-queue-item.is-done { border-color: rgba(63, 125, 104, .45); }
.media-queue-item.is-done .media-queue-bar span { background: #3f7d68; }
.media-queue-remove { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--warm-100); color: var(--crimson); font-size: 1.2rem; line-height: 1; }
.media-queue-remove:hover { background: rgba(130, 27, 45, .12); }
.media-queue-remove:disabled { opacity: .4; }
@keyframes barFlow { to { background-position: -200% 0; } }
