:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-soft: #f8fafd;
    --surface-muted: #eef3fd;
    --text: #1f2937;
    --muted: #64748b;
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-soft: rgba(26, 115, 232, 0.12);
    --success: #188038;
    --warning: #b06000;
    --danger: #c5221f;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(26, 115, 232, 0.18);
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;

    /* Motion & spacing tokens */
    --motion-fast: 480ms;
    --motion-medium: 1200ms;
    --motion-slow: 2600ms;
    --easing-smooth: cubic-bezier(0.16, 0.84, 0.24, 1);
    --gutter: 16px;
    --accent: #ff6b6b;
    --glass: rgba(255, 255, 255, 0.6);

    /* Skeleton/shimmer */
    --skeleton-base: #eef3f8;
    --skeleton-highlight: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
}

/* Motion utilities */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtlePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

.enter-up {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp var(--motion-medium) var(--easing-smooth) forwards;
}

.delay-1 {
    animation-delay: 360ms;
}
.delay-2 {
    animation-delay: 760ms;
}
.delay-3 {
    animation-delay: 1180ms;
}

/* Text animation (subtle float) */
.text-animate {
    display: inline-block;
    animation: textFloat var(--motion-slow) var(--easing-smooth) infinite
        alternate;
}

@keyframes textFloat {
    from {
        transform: translateY(0);
        opacity: 0.95;
    }
    to {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Typewriter handled by JS; lightweight hook */
.type-animate {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
}

.btn-animate {
    transition:
        transform var(--motion-fast) var(--easing-smooth),
        box-shadow var(--motion-fast) var(--easing-smooth);
}

.btn-animate:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 42px rgba(26, 115, 232, 0.18);
}

/* ── Fluid animation utilities ──────────────────────────── */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes gentleGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(26, 115, 232, 0); }
    50%      { box-shadow: 0 0 24px 4px var(--primary-soft); }
}

.scale-in {
    opacity: 0;
    animation: scaleIn var(--motion-medium) var(--easing-smooth) forwards;
}

.slide-in-left {
    opacity: 0;
    animation: slideInLeft var(--motion-medium) var(--easing-smooth) forwards;
}

.slide-in-right {
    opacity: 0;
    animation: slideInRight var(--motion-medium) var(--easing-smooth) forwards;
}

.slide-in-up {
    opacity: 0;
    animation: slideInUp var(--motion-medium) var(--easing-smooth) forwards;
}

.stagger-1 { animation-delay: 120ms; }
.stagger-2 { animation-delay: 240ms; }
.stagger-3 { animation-delay: 360ms; }
.stagger-4 { animation-delay: 480ms; }
.stagger-5 { animation-delay: 600ms; }

.glow-animate {
    animation: gentleGlow 3s var(--easing-smooth) infinite;
}

/* Focus & accessibility */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 8px 28px rgba(26, 115, 232, 0.12);
    border-color: var(--primary);
}

/* Preview card micro interactions */
.preview-card {
    transition:
        transform var(--motion-medium) var(--easing-smooth),
        box-shadow var(--motion-medium) var(--easing-smooth);
}
.preview-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.06);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .enter-up,
    .scale-in,
    .slide-in-left,
    .slide-in-right,
    .slide-in-up,
    .glow-animate,
    .text-animate,
    .preview-card,
    .btn-animate,
    .peer-msg,
    .peer-status-dot.sending {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background:
        radial-gradient(
            circle at top left,
            rgba(26, 115, 232, 0.08),
            transparent 34%
        ),
        linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

* + * {
    min-width: 0;
}

a {
    color: var(--primary);
}

.topbar {
    width: min(1360px, calc(100% - 24px));
    margin: 0 auto;
    padding: 14px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-logo {
    width: 188px;
    height: 60px;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 1.02rem;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-shell {
    width: min(1360px, calc(100% - 24px));
    margin: 0 auto 28px;
    padding-bottom: 24px;
}

.page-footer {
    width: min(1360px, calc(100% - 24px));
    margin: 0 auto;
    padding: 0 0 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.panel,
.card-panel,
.hero-card,
.preview-window,
.classroom-summary-card,
.stat-card,
.feature-card,
.team-card,
.people-card,
.assignment-card,
.stream-card,
.action-block,
.alert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.panel,
.card-panel,
.hero-card {
    padding: 28px;
}

.panel-light,
.panel-soft {
    background: var(--surface-soft);
}

.hero-card {
    display: grid;
    gap: 24px;
    margin-top: 10px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
}

.classroom-hero,
.compact-hero {
    min-height: 380px;
}

.hero-copy h1,
.panel h1,
.panel h2,
.assignment-head h3,
.classroom-title h1,
.classroom-summary-banner h3 {
    margin: 0;
    line-height: 1.1;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.lead,
.muted,
.panel p,
.assignment-desc,
.stream-text,
.empty-state {
    color: var(--muted);
    line-height: 1.65;
}

.form-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.form-row.two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

label {
    font-size: 0.95rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 0.98rem;
    font-family: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
}

button,
.button {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(26, 115, 232, 0.22);
}

.button-secondary {
    background: #edf4ff;
    color: var(--primary-dark);
    box-shadow: none;
}

.form-help {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
    font-size: 0.94rem;
}

.error {
    color: var(--danger);
    font-weight: 600;
}

.login-side,
.classroom-sidebar {
    padding: 24px;
}

.simple-list,
.people-list,
.team-members ul,
.file-list ul {
    margin: 0;
    padding-left: 18px;
}

.preview-window {
    overflow: hidden;
}

.preview-topbar {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.preview-topbar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d7e3fc;
}

.preview-banner,
.classroom-hero-banner {
    padding: 24px;
    border-radius: var(--radius-lg);
    color: #fff;
    background: linear-gradient(135deg, #1a73e8 0%, #4c8df6 54%, #7cb4ff 100%);
    box-shadow: 0 22px 44px rgba(26, 115, 232, 0.24);
}

.preview-banner p,
.classroom-hero-banner p,
.classroom-hero-banner .lead {
    color: rgba(255, 255, 255, 0.9);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}

.preview-card {
    border-radius: 18px;
    background: var(--surface-soft);
    padding: 18px;
}

.preview-card.wide {
    grid-column: 1 / -1;
}

.features-grid,
.admin-stats,
.dashboard-grid,
.classroom-cards-grid,
.hero-stats-grid,
.summary-metrics {
    display: grid;
    gap: 16px;
}

.feature-strip,
.hero-stats-grid,
.admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 20px;
}

.teacher-dashboard-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    align-items: start;
}

.hero-stat,
.stat-card {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 18px;
}

.stat-card {
    background: var(--surface);
    border-color: var(--border);
}

.hero-stat span,
.stat-card span {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
}

.hero-stat p,
.stat-card p {
    margin: 8px 0 0;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.top-gap {
    margin-top: 16px;
}
.top-gap-sm {
    margin-top: 8px;
}
.top-gap-lg {
    margin-top: 28px;
}

.stream-list,
.assignment-list,
.classwork-grid,
.stacked-forms {
    display: grid;
    gap: 16px;
}

.stream-card,
.assignment-card,
.classwork-card,
.action-block,
.people-card,
.classroom-summary-card {
    padding: 20px;
}

.stream-meta,
.assignment-head,
.classwork-head,
.classroom-summary-banner,
.classroom-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.classroom-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.32fr) minmax(0, 1fr);
    gap: 20px;
}

.classroom-main,
.classroom-sidebar {
    height: fit-content;
}

.classroom-tabs,
.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
}

.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #edf2fa;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.tab.active {
    background: var(--primary);
    color: #fff;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge-pendiente {
    background: #fff1db;
    color: var(--warning);
}

.badge-entregado {
    background: #e8f0fe;
    color: var(--primary);
}

.badge-calificado {
    background: #e6f4ea;
    color: var(--success);
}

.code-badge,
.class-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.class-code-pill {
    font-size: 1.1rem;
    margin: 8px 0;
}

.inline-form,
.task-actions,
.classroom-actions,
.classwork-actions,
.summary-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.responsive-inline-form {
    flex: 1 1 360px;
}

.responsive-inline-form select {
    min-width: 220px;
}

.compact-form,
.compact-grade-form {
    gap: 10px;
}

.submission-form.rich-submission-form textarea {
    min-height: 110px;
}

.enhanced-classwork-grid,
.classroom-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.feedback-line,
.resource-item p {
    margin: 0;
}

.feedback-stack,
.help-panel,
.file-list,
.resource-list,
.team-members {
    display: grid;
    gap: 12px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

thead th {
    text-align: left;
    font-size: 0.92rem;
    padding: 14px 16px;
    color: var(--muted);
}

tbody tr {
    border-top: 1px solid var(--border);
}

tbody td {
    padding: 14px 16px;
    vertical-align: top;
}

.alert-warning {
    background: #fff8e6;
    border-color: rgba(176, 96, 0, 0.18);
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin: 8px 0 18px;
}

.flash-card {
    padding: 16px 18px;
}

.flash-card p,
.config-callout p {
    margin: 6px 0 0;
}

.flash-warning {
    background: #fff8e6;
    border-color: rgba(176, 96, 0, 0.18);
}

.admin-banner {
    margin-top: 10px;
}

.directora-pitch-panel {
    padding: 28px;
}

.directora-benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.directora-benefit-card,
.directora-message-card,
.directora-cta-panel {
    border-color: var(--border-strong);
}

.highlight-quote {
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(
        135deg,
        rgba(26, 115, 232, 0.12),
        rgba(124, 180, 255, 0.2)
    );
    border: 1px solid var(--border-strong);
}

.highlight-quote p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--primary-dark);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.comparison-card {
    padding: 20px;
}

.comparison-card-primary {
    border-color: rgba(26, 115, 232, 0.28);
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
}

.comparison-list {
    display: grid;
    gap: 10px;
}

.compact-comment-card {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.action-block summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.action-block summary::-webkit-details-marker {
    display: none;
}

@media (max-width: 1024px) {
    .hero-grid,
    .teacher-dashboard-grid,
    .classroom-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .topbar,
    .page-shell,
    .page-footer {
        width: min(100%, calc(100% - 16px));
    }

    .panel,
    .card-panel,
    .hero-card,
    .stream-card,
    .assignment-card,
    .classwork-card,
    .classroom-summary-card {
        padding: 18px;
    }

    .form-row.two-cols,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .stream-meta,
    .assignment-head,
    .classwork-head,
    .classroom-summary-banner,
    .classroom-header {
        flex-direction: column;
    }

    table {
        min-width: 560px;
    }
}

/* Dark mode — tablas y hero-stats */
html[data-theme="dark"] tbody tr {
    border-top-color: var(--border);
}
html[data-theme="dark"] thead th {
    border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .hero-stat {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .badge-pendiente {
    background: rgba(176, 96, 0, 0.18);
}
html[data-theme="dark"] .badge-entregado {
    background: rgba(76, 141, 246, 0.18);
}
html[data-theme="dark"] .badge-calificado {
    background: rgba(24, 128, 56, 0.18);
}

/* ── Panel layout helpers ────────────────────────────────── */
.panel-header {
    margin-bottom: 20px;
}
.panel-header h1,
.panel-header h2 {
    margin: 0 0 6px;
}
.panel-header p {
    margin: 0;
    color: var(--muted);
}
.panel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
}
.panel-success {
    background: #e6f4ea;
    border-color: rgba(24, 128, 56, 0.22);
}
html[data-theme="dark"] .panel-success {
    background: rgba(24, 128, 56, 0.12);
    border-color: rgba(24, 128, 56, 0.28);
}
/* WCAG AA fix */
:root {
    --muted: #4b5563;
}

/* ═══════════════════════════════════════════════════════════
   MEJORAS UI/UX - Animaciones y efectos visuales avanzados
   ═══════════════════════════════════════════════════════════ */

/* Smooth scroll behavior mejorado */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Glassmorphism effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hover effects mejorados para cards */
.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), #9334e6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        #f8fafc 50%,
        var(--skeleton-base) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

/* Ripple effect for buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Floating labels para inputs */
.floating-label-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-label-group input,
.floating-label-group textarea {
    padding-top: 24px;
    padding-bottom: 8px;
}

.floating-label-group label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    transition: all 0.2s ease;
    pointer-events: none;
    color: var(--muted);
}

.floating-label-group input:focus + label,
.floating-label-group input:not(:placeholder-shown) + label,
.floating-label-group textarea:focus + label,
.floating-label-group textarea:not(:placeholder-shown) + label {
    top: 12px;
    font-size: 0.8rem;
    color: var(--primary);
}

/* Progress bars animadas */
@keyframes progressFill {
    from {
        width: 0;
    }
}

.progress-bar-animated .progress-bar-fill {
    animation: progressFill 1s ease-out;
}

/* Notification badge pulse */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.notification-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Tooltip mejorado */
.tooltip-container {
    position: relative;
}

.tooltip-container::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: var(--text);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.tooltip-container:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface-soft);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    border: 2px solid var(--surface-soft);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
}

/* Micro-interactions para checkboxes y radios */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Fade transitions para tabs y contenido dinámico */
.fade-enter {
    opacity: 0;
    transform: translateY(10px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Bounce animation para notificaciones */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Parallax sutil para backgrounds */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Sticky header con sombra dinámica */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.sticky-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Mejoras de accesibilidad - focus visible */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
    .glass-effect {
        background: rgba(30, 30, 30, 0.7);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    ::-webkit-scrollbar-track {
        background: #2a2a2a;
    }
    
    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #4a9eff, #1a73e8);
    }
}

/* Responsive animations - desactivar en móviles para performance */
@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
    
    .card-hover-lift:hover {
        transform: translateY(-4px) scale(1.01);
    }
}
