/* ============================================
   style/styles.css — Portal de Proyectos
   EEST N°2 "República Argentina"
   ============================================ */

/* ── Google Fonts fallback ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════ */
/* VARIABLES CSS — Modo Claro (default)                   */
/* ═══════════════════════════════════════════════════════ */
:root {
    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light:#dbeafe;
    --success:      #10b981;
    --warning:      #f59e0b;
    --danger:       #ef4444;
    --info:         #06b6d4;

    --bg:           #f1f5f9;
    --bg-card:      #ffffff;
    --bg-subtle:    #f8fafc;
    --border:       #e2e8f0;

    --text:         #0f172a;
    --text-muted:   #64748b;
    --text-light:   #94a3b8;

    --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
    --shadow:       0 4px 12px rgba(0,0,0,.10);
    --shadow-lg:    0 12px 32px rgba(0,0,0,.14);

    --radius:       .625rem;
    --radius-lg:    1rem;
    --radius-xl:    1.5rem;
    --font:         'Plus Jakarta Sans', sans-serif;
    --font-mono:    'Space Grotesk', monospace;
}

/* ═══════════════════════════════════════════════════════ */
/* VARIABLES CSS — Modo Oscuro (.dark-mode)               */
/* ═══════════════════════════════════════════════════════ */
html.dark-mode {
    --primary:      #3b82f6;
    --primary-dark: #2563eb;
    --primary-light:#1e3a8a;

    --bg:           #0f172a;
    --bg-card:      #1e293b;
    --bg-subtle:    #0f172a;
    --border:       #334155;

    --text:         #f1f5f9;
    --text-muted:   #94a3b8;
    --text-light:   #64748b;

    --shadow-sm:    0 1px 3px rgba(0,0,0,.3);
    --shadow:       0 4px 12px rgba(0,0,0,.4);
    --shadow-lg:    0 12px 32px rgba(0,0,0,.6);
}

/* ── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    transition: background-color .3s, color .3s;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color .3s, color .3s;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }

/* ── Typography ─────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--text); }

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .25rem;
}

.page-subtitle { color: var(--text-muted); font-size: .95rem; margin-bottom: 2rem; }

/* ── Layout ─────────────────────────────────── */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.main-content {
    flex: 1;
    padding: 2rem 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ── NAVBAR ─────────────────────────────────── */
.navbar-portal {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(37,99,235,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 2px 20px rgba(37,99,235,.25);
}

html.dark-mode .navbar-portal {
    background: rgba(15,23,42,.95);
    border-bottom: 1px solid rgba(51,65,85,.6);
    box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: .65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
    color: #fff;
}

.nav-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.18);
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.nav-brand-text { display: flex; flex-direction: column; }
.nav-title      { font-size: .95rem; font-weight: 700; color: #fff; line-height: 1.2; }
.nav-subtitle   { font-size: .7rem; color: rgba(255,255,255,.7); }

.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .85rem;
    border-radius: .5rem;
    color: rgba(255,255,255,.88);
    font-size: .875rem;
    font-weight: 500;
    transition: all .2s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.nav-link-logout:hover { background: rgba(239,68,68,.25); }

.nav-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: .5rem;
}

/* Theme toggle */
.theme-toggle {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all .2s;
}
.theme-toggle:hover { background: rgba(255,255,255,.25); transform: rotate(20deg); }

.icon-moon { display: none; }
.icon-sun  { display: block; }
html.dark-mode .icon-moon { display: block; }
html.dark-mode .icon-sun  { display: none; }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all .25s;
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── CARDS ───────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s, border-color .25s;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.card-body  { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
}

/* Proyecto card */
.proyecto-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
}

.proyecto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.proyecto-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.proyecto-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #bfdbfe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
}

html.dark-mode .proyecto-card-img-placeholder {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.proyecto-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.proyecto-card-cat {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .25rem .65rem;
    border-radius: 99px;
    margin-bottom: .75rem;
}

.cat-juegos     { background: #fef3c7; color: #92400e; }
.cat-arduino    { background: #d1fae5; color: #065f46; }
html.dark-mode .cat-juegos  { background: #78350f; color: #fde68a; }
html.dark-mode .cat-arduino { background: #064e3b; color: #a7f3d0; }

.proyecto-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.proyecto-card-alumno {
    font-size: .8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: .35rem;
}

.proyecto-card-meta {
    font-size: .78rem;
    color: var(--text-muted);
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.proyecto-card-desc {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.proyecto-card-footer {
    padding: .875rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    background: var(--bg-subtle);
}

.proyecto-card-escuela {
    font-size: .78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .6rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e40af 100%);
    box-shadow: 0 6px 20px rgba(37,99,235,.4);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16,185,129,.3);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(16,185,129,.4); color: #fff; }

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239,68,68,.3);
}
.btn-danger:hover { color: #fff; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: .4rem .85rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── FORMS ───────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-weight: 600;
    font-size: .875rem;
    color: var(--text);
    margin-bottom: .4rem;
}

.form-control {
    width: 100%;
    padding: .7rem 1rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: .9rem;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-hint {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .3rem;
}

.form-error {
    font-size: .78rem;
    color: var(--danger);
    margin-top: .3rem;
    display: none;
}

/* Input con ícono */
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .form-control {
    padding-left: 2.8rem;
}
.input-icon-wrap .input-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1rem;
    pointer-events: none;
}

/* Password toggle */
.input-icon-wrap .input-icon-right {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    background: none;
    border: none;
    padding: 0;
}

/* ── ALERTS ──────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}
.alert i { flex-shrink: 0; margin-top: .1rem; }
.alert-success  { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-danger   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning  { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }
.alert-info     { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--primary); }
html.dark-mode .alert-success  { background: #064e3b; color: #a7f3d0; }
html.dark-mode .alert-danger   { background: #7f1d1d; color: #fecaca; }
html.dark-mode .alert-warning  { background: #78350f; color: #fde68a; }
html.dark-mode .alert-info     { background: #1e3a8a; color: #bfdbfe; }

/* ── BADGES ──────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .65rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.badge-primary  { background: var(--primary-light); color: var(--primary-dark); }
.badge-success  { background: #d1fae5; color: #065f46; }
.badge-warning  { background: #fef3c7; color: #92400e; }
html.dark-mode .badge-primary  { background: #1e3a8a; color: #93c5fd; }
html.dark-mode .badge-success  { background: #064e3b; color: #a7f3d0; }
html.dark-mode .badge-warning  { background: #78350f; color: #fde68a; }

/* ── STATS ───────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon-blue   { background: #dbeafe; color: var(--primary); }
.stat-icon-green  { background: #d1fae5; color: var(--success); }
.stat-icon-yellow { background: #fef3c7; color: var(--warning); }
.stat-icon-cyan   { background: #cffafe; color: var(--info); }
html.dark-mode .stat-icon-blue   { background: #1e3a8a; color: #93c5fd; }
html.dark-mode .stat-icon-green  { background: #064e3b; color: #a7f3d0; }
html.dark-mode .stat-icon-yellow { background: #78350f; color: #fde68a; }
html.dark-mode .stat-icon-cyan   { background: #0c4a6e; color: #67e8f9; }

.stat-info { min-width: 0; }
.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

/* ── GRID DE PROYECTOS ───────────────────────── */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ── LOGIN / REGISTRO ────────────────────────── */
.auth-wrap {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeUp .4s ease;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: #fff;
}

.auth-icon {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.auth-header h2 { color: #fff; font-size: 1.5rem; margin: 0; }
.auth-header p  { color: rgba(255,255,255,.8); font-size: .9rem; margin-top: .3rem; }

.auth-body { padding: 2rem; }

.auth-divider {
    text-align: center;
    margin: 1.25rem 0;
    position: relative;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 .75rem;
    color: var(--text-muted);
    font-size: .82rem;
}

/* ── FILTROS ─────────────────────────────────── */
.filters-bar {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.filters-bar .form-control {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
    padding: .55rem .9rem;
    font-size: .875rem;
}

/* ── MODAL / LIGHTBOX ────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn .2s;
}
.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: scaleIn .25s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.1rem; color: var(--text); }

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: .25rem;
    border-radius: .25rem;
    transition: color .2s;
}
.modal-close:hover { color: var(--danger); }

.modal-body { padding: 1.5rem; }

/* ── GALERÍA DE IMÁGENES ─────────────────────── */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
}

.galeria-item {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
}
.galeria-item:hover { border-color: var(--primary); transform: scale(1.02); }
.galeria-item img { width: 100%; height: 100%; object-fit: cover; }

/* Upload preview grid */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}
.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: .65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── PERFIL ───────────────────────────────────── */
.perfil-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.perfil-avatar {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.perfil-info h2 { color: #fff; font-size: 1.6rem; margin-bottom: .25rem; }
.perfil-info p  { color: rgba(255,255,255,.8); font-size: .9rem; }

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state i     { font-size: 3.5rem; margin-bottom: 1rem; opacity: .4; }
.empty-state h3    { font-size: 1.2rem; color: var(--text); margin-bottom: .5rem; }
.empty-state p     { font-size: .9rem; }

/* ── FOOTER ──────────────────────────────────── */
.portal-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 1.5rem;
    margin-top: auto;
}
html.dark-mode .portal-footer { background: #0f172a; border-top: 1px solid var(--border); }

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
}
.footer-copy { font-size: .8rem; }

/* ── UTILITIES ───────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center  { text-align: center; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-1        { gap: .5rem; }
.gap-2        { gap: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }

/* ── ANIMATIONS ───────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

.fade-in { animation: fadeIn .4s ease; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(15,23,42,.97);
        flex-direction: column;
        padding: 1rem;
        gap: .25rem;
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .nav-links.open  { display: flex; }
    .nav-hamburger   { display: flex; }
    .navbar-portal   { position: relative; }

    .proyectos-grid { grid-template-columns: 1fr; }
    .stats-grid     { grid-template-columns: repeat(2, 1fr); }
    .perfil-header  { padding: 1.5rem; }
    .auth-body      { padding: 1.5rem; }
    .filters-bar .form-control { max-width: 100%; }
    .footer-inner   { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-title { font-size: 1.5rem; }
}

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
