/* ===========================================================
   AIVance — Inteligencia Artificial aplicada al negocio
   =========================================================== */

:root {
    --bg: #0a0a0c;
    --bg-2: #0f0e0d;
    --bg-3: #141210;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --border: rgba(214, 178, 92, 0.16);
    --border-strong: rgba(214, 178, 92, 0.34);

    --text: #f4efe4;
    --text-soft: #d3cbba;
    --muted: #9a917f;

    /* Paleta dorada de marca (alias mantenidos para reutilizar referencias) */
    --gold: #d4af37;
    --gold-light: #f6e3a1;
    --gold-deep: #b8860b;
    --cyan: var(--gold-light);
    --blue: var(--gold);
    --violet: var(--gold-deep);
    --grad: linear-gradient(120deg, #f8ecbf 0%, #d4af37 48%, #b8860b 100%);
    --grad-soft: linear-gradient(120deg, rgba(214, 175, 55, 0.18), rgba(184, 134, 11, 0.14));

    --radius: 18px;
    --radius-sm: 12px;
    --maxw: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    --font-head: "Space Grotesk", "Segoe UI", sans-serif;
    --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    --font-body: "Inter", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Fondo global con orbes de luz */
.bg-aura {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60% 50% at 78% -5%, rgba(214, 175, 55, 0.15), transparent 60%),
        radial-gradient(50% 45% at 8% 8%, rgba(184, 134, 11, 0.13), transparent 60%),
        radial-gradient(60% 50% at 50% 110%, rgba(246, 227, 161, 0.08), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.wrap { width: min(var(--maxw), calc(100% - 48px)); margin-inline: auto; }

/* ---------- Utilidades ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-head);
    font-size: 0.74rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cyan);
    font-weight: 500;
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--grad);
}
.gradient-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: 0;
    margin: 16px 0 14px;
    font-weight: 600;
}
.section-head p { color: var(--text-soft); font-size: 1.05rem; max-width: 640px; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
    white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
    background: var(--grad);
    color: #061018;
    font-weight: 600;
    box-shadow: 0 10px 34px -10px rgba(214, 175, 55, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(214, 175, 55, 0.9); }
.btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }

/* ===========================================================
   HEADER
   =========================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: rgba(10, 10, 12, 0.82);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand .logo-mark { width: 36px; height: 36px; }
.brand .logo-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 0.01em;
}
.brand .logo-text b { font-weight: 600; }
.nav-menu { display: flex; align-items: center; gap: 34px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
    font-size: 0.94rem;
    color: var(--text-soft);
    position: relative;
    transition: color 0.25s;
    font-weight: 450;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--grad);
    border-radius: 2px;
    transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface);
}
.lang-toggle button {
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 7px 13px;
    cursor: pointer;
    transition: color 0.25s, background 0.25s;
    letter-spacing: 0.04em;
}
.lang-toggle button.active { color: #061018; background: var(--cyan); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ===========================================================
   HERO
   =========================================================== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: 90px;
    overflow: hidden;
}
.hero-bg-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("../img/hero-bg.jpg") no-repeat center right / cover;
    opacity: 0.62;
    mask-image: radial-gradient(120% 90% at 80% 45%, #000 16%, transparent 72%);
    -webkit-mask-image: radial-gradient(120% 90% at 80% 45%, #000 16%, transparent 72%);
}
/* Velo oscuro a la izquierda para legibilidad del titular */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, var(--bg) 4%, rgba(10, 10, 12, 0.78) 30%, rgba(10, 10, 12, 0.25) 52%, transparent 68%);
    pointer-events: none;
}
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.85;
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px 7px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    color: var(--text-soft);
    margin-bottom: 28px;
}
.hero-badge .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 4px rgba(246, 227, 161, 0.2);
    animation: pulse 2.4s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(246, 227, 161, 0.22); }
    50% { box-shadow: 0 0 0 7px rgba(246, 227, 161, 0); }
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.9rem, 7.4vw, 5.6rem);
    line-height: 1.0;
    letter-spacing: 0;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero h1 .gradient-text { display: inline-block; }
.hero-sub {
    font-size: clamp(1.05rem, 1.8vw, 1.28rem);
    color: var(--text-soft);
    max-width: 660px;
    margin-bottom: 38px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 52px; }
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
}
.hero-tags span {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
}
.hero-scroll {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.hero-scroll .mouse {
    width: 22px; height: 34px;
    border: 1.5px solid var(--border-strong);
    border-radius: 12px;
    position: relative;
}
.hero-scroll .mouse::after {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 3px; height: 7px;
    border-radius: 2px;
    background: var(--cyan);
    animation: scrolldot 1.8s infinite;
}
@keyframes scrolldot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 11px); } 100% { opacity: 0; } }

/* ===========================================================
   SERVICIOS
   =========================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
}
.service-card {
    position: relative;
    padding: 32px 30px 34px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.service-card:hover::before { opacity: 1; }
.service-card.featured { grid-column: span 1; }
.service-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--grad-soft);
    border: 1px solid var(--border-strong);
    margin-bottom: 22px;
}
.service-icon svg { width: 26px; height: 26px; stroke: var(--cyan); }
.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0;
}
.service-card p { color: var(--text-soft); font-size: 0.97rem; }
.service-num {
    position: absolute;
    top: 26px; right: 28px;
    font-family: var(--font-head);
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

/* ===========================================================
   CASOS DE USO
   =========================================================== */
#casos { background: linear-gradient(180deg, transparent, rgba(13, 20, 38, 0.5), transparent); }
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 18px;
}
.case-card {
    position: relative;
    display: flex;
    gap: 18px;
    padding: 28px 28px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.35s var(--ease), background 0.35s, border-color 0.35s;
}
.case-card:hover { transform: translateY(-4px); background: var(--surface-2); border-color: var(--border-strong); }
.case-badge {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(246, 227, 161, 0.1);
    border: 1px solid rgba(246, 227, 161, 0.25);
}
.case-badge svg { width: 22px; height: 22px; stroke: var(--cyan); }
.case-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 9px;
    line-height: 1.18;
}
.case-card p { color: var(--text-soft); font-size: 0.93rem; }
.case-card .tag {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-head);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--violet);
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.22);
}

/* ===========================================================
   PROCESO
   =========================================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    counter-reset: step;
}
.process-step {
    position: relative;
    padding: 30px 26px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}
.process-step .step-num {
    font-family: var(--font-head);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 18px;
}
.process-step h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; }
.process-step p { color: var(--text-soft); font-size: 0.93rem; }

/* ===========================================================
   POR QUÉ / BENEFICIOS
   =========================================================== */
.why-wrap {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 60px;
    align-items: center;
}
.why-list { display: grid; gap: 18px; margin-top: 30px; }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-item .check {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--grad-soft);
    border: 1px solid var(--border-strong);
}
.why-item .check svg { width: 16px; height: 16px; stroke: var(--cyan); }
.why-item h4 { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; margin-bottom: 4px; }
.why-item p { color: var(--text-soft); font-size: 0.93rem; }
.why-visual {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg-3);
}
.why-visual img { width: 100%; height: 100%; object-fit: cover; }
.why-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(7, 11, 20, 0.55));
}
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 64px;
}
.stat {
    padding: 28px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
}
.stat .num {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1;
}
.stat .label { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ===========================================================
   NOSOTROS
   =========================================================== */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.about-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.6vw, 3.3rem);
    line-height: 1.05;
    letter-spacing: 0;
    font-weight: 600;
    margin: 16px 0 20px;
}
.about-copy p { color: var(--text-soft); margin-bottom: 16px; }
.about-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(214, 175, 55, 0.08), rgba(184, 134, 11, 0.04));
    padding: 40px 36px;
}
.about-card .label { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-head); }
.about-card .company { font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; margin: 8px 0 22px; }
.about-card ul { display: grid; gap: 14px; }
.about-card li { display: flex; gap: 12px; align-items: center; color: var(--text-soft); font-size: 0.96rem; }
.about-card li svg { width: 18px; height: 18px; stroke: var(--cyan); flex-shrink: 0; }

/* ===========================================================
   CONTACTO
   =========================================================== */
#contacto { position: relative; }
.contact-card {
    position: relative;
    border-radius: 28px;
    border: 1px solid var(--border-strong);
    background:
        radial-gradient(80% 120% at 80% 0%, rgba(214, 175, 55, 0.16), transparent 60%),
        radial-gradient(70% 120% at 10% 100%, rgba(184, 134, 11, 0.14), transparent 60%),
        rgba(255, 255, 255, 0.025);
    padding: clamp(40px, 6vw, 72px);
    text-align: center;
    overflow: hidden;
}
.contact-card h2 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.4vw, 4rem);
    line-height: 1.02;
    letter-spacing: 0;
    font-weight: 600;
    margin-bottom: 18px;
}
.contact-card p { color: var(--text-soft); font-size: 1.08rem; max-width: 560px; margin: 0 auto 34px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 36px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.92rem;
}
.contact-meta a { color: var(--text-soft); }
.contact-meta a:hover { color: var(--cyan); }

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 34px; }
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}
.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h5 {
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 500;
}
.footer-col a { display: block; color: var(--text-soft); font-size: 0.93rem; margin-bottom: 11px; transition: color 0.25s; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

/* ===========================================================
   REVEAL ANIM
   =========================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    * { scroll-behavior: auto; }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 900px) {
    .why-wrap, .about-wrap { grid-template-columns: 1fr; gap: 40px; }
    .why-visual { aspect-ratio: 16 / 10; }
    .stat-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 74px; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(8, 12, 22, 0.97);
        backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--border);
        padding: 8px 24px 24px;
        transform: translateY(-130%);
        transition: transform 0.4s var(--ease);
        align-items: stretch;
    }
    .nav-menu.open { transform: translateY(0); }
    .nav-links { flex-direction: column; gap: 0; width: 100%; }
    .nav-links a { padding: 15px 0; border-bottom: 1px solid var(--border); }
    .nav-actions { padding-top: 16px; justify-content: space-between; }
    .nav-toggle { display: flex; }
    .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .stat-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .wrap { width: calc(100% - 36px); }
    .hero-cta .btn { width: 100%; justify-content: center; }
}

/* ===========================================================
   ACCESO / ÁREA PRIVADA
   =========================================================== */
.auth-body { min-height: 100svh; display: grid; place-items: center; padding: 48px 0; }
.auth-card {
    position: relative;
    width: min(440px, calc(100% - 40px));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    padding: 44px 38px 40px;
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.auth-card .brand { justify-content: center; margin-bottom: 22px; }
.auth-eyebrow { display: block; text-align: center; }
.auth-card h1 {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 600;
    text-align: center;
    margin: 10px 0 6px;
}
.auth-card .auth-sub { color: var(--text-soft); text-align: center; font-size: 0.95rem; margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 7px;
}
.field input {
    width: 100%;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.98rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(214, 175, 55, 0.16);
}
.auth-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.auth-msg {
    display: none;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 11px;
    font-size: 0.9rem;
    text-align: center;
}
.auth-msg.show { display: block; }
.auth-msg.error { background: rgba(220, 70, 70, 0.12); border: 1px solid rgba(220, 70, 70, 0.35); color: #ffb4b4; }
.auth-msg.info { background: rgba(214, 175, 55, 0.1); border: 1px solid var(--border-strong); color: var(--gold-light); }
.auth-foot { text-align: center; margin-top: 26px; font-size: 0.88rem; }
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--gold-light); }

/* Barra superior del área privada */
.app-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 70px;
    background: rgba(10, 10, 12, 0.82);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border);
}
.app-bar .user-box { display: flex; align-items: center; gap: 14px; }
.app-bar .user-email { color: var(--text-soft); font-size: 0.9rem; }
.app-bar .btn-logout {
    font-family: var(--font-head);
    font-size: 0.85rem;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background 0.25s;
}
.app-bar .btn-logout:hover { background: var(--surface-2); }

.app-main { padding: clamp(40px, 7vw, 80px) 0 100px; }
.app-main .section-head { margin-bottom: 36px; }
.docs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.docs-count { color: var(--muted); font-size: 0.9rem; }
.docs-list { display: grid; gap: 12px; }
.doc-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.doc-item:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.doc-ico {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--grad-soft);
    border: 1px solid var(--border-strong);
}
.doc-ico svg { width: 22px; height: 22px; stroke: var(--gold-light); }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.doc-dl {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-head);
    font-size: 0.86rem;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--grad);
    color: #1a1407;
    font-weight: 600;
    border: none; cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
}
.doc-dl:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(214, 175, 55, 0.8); }
.doc-dl svg { width: 15px; height: 15px; }
.docs-empty, .docs-loading {
    padding: 50px 30px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border-strong);
    border-radius: 16px;
}
.spinner {
    width: 30px; height: 30px;
    margin: 0 auto 16px;
    border: 3px solid var(--border-strong);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 540px) {
    .doc-item { flex-wrap: wrap; }
    .doc-dl { width: 100%; justify-content: center; }
}

/* ---------- Modal (cambiar contraseña) ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 4, 6, 0.74);
    backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; animation: fadein 0.2s var(--ease); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    position: relative;
    width: min(420px, 100%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 40px 34px 32px;
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-title {
    font-family: var(--font-display);
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 8px 0 22px;
}
.modal-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ---------- Zona de subida (área privada, solo editores) ---------- */
.upload-zone { margin-bottom: 24px; }
.upload-drop {
    border: 1.5px dashed var(--border-strong);
    border-radius: 16px;
    padding: 30px 24px;
    text-align: center;
    background: rgba(214, 175, 55, 0.03);
    transition: border-color 0.25s, background 0.25s;
    cursor: default;
}
.upload-drop.dragover { border-color: var(--gold); background: rgba(214, 175, 55, 0.1); }
.upload-ico { width: 30px; height: 30px; stroke: var(--gold); margin-bottom: 8px; }
.upload-text { color: var(--text-soft); font-size: 0.98rem; }
.upload-text b { color: var(--text); }
.upload-pick {
    background: none; border: none; padding: 0;
    color: var(--gold-light); font: inherit; cursor: pointer; text-decoration: underline;
}
.upload-pick:hover { color: var(--gold); }
.upload-hint { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 6px; }
.upload-status { display: none; margin-top: 12px; text-align: center; font-size: 0.9rem; color: var(--gold-light); }
.upload-status.show { display: block; }
.doc-del {
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border-radius: 11px;
    background: rgba(214, 90, 90, 0.08);
    border: 1px solid rgba(214, 90, 90, 0.28);
    color: #e8a0a0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.doc-del:hover { background: rgba(214, 90, 90, 0.18); border-color: rgba(214, 90, 90, 0.55); color: #f3bcbc; }
.doc-del svg { width: 17px; height: 17px; }
.doc-admin {
    display: inline-flex; align-items: center; gap: 7px;
    flex-shrink: 0;
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}
.doc-admin:hover { color: var(--text-soft); border-color: var(--border-strong); }
.doc-admin input { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; margin: 0; }
.doc-item.is-admin-only { border-color: rgba(214, 175, 55, 0.4); background: rgba(214, 175, 55, 0.05); }
.doc-item.is-admin-only .doc-admin { color: var(--gold-light); }
