@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600;700;800&family=Bebas+Neue&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    --gold: #C9A84C;
    --gold-light: #E8C96A;
    --gold-bright: #f5d97e;
    --gold-dark: #96721E;
    --black: #060606;
    --dark: #0a0a0a;
    --dark-2: #0e0e0e;
    --card: #161616;
    --card-2: #1a1a1a;
    --card-3: #1f1f1f;
    --text: #f2f2f2;
    --muted: #888888;
    --muted-2: #666666;
    --line: rgba(201, 168, 76, 0.15);
    --line-strong: rgba(201, 168, 76, 0.4);
    --green: #22C55E;
    --red: #EF4444;
    --blue: #3B82F6;
    --orange: #F97316;
    --purple: #A855F7;
    --shadow-deep: 0 30px 80px rgba(0, 0, 0, 0.6);
    --t-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --t: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --gold-grad: linear-gradient(135deg, #96721E 0%, #C9A84C 35%, #E8C96A 50%, #C9A84C 65%, #96721E 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--gold); color: var(--black); }

html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--black);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(201, 168, 76, 0.04) 0%, transparent 50%),
        var(--black);
    z-index: -2;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: var(--t-fast); }

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
}

.serif { font-family: 'Cormorant Garamond', serif; }
.italic-gold { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--gold); font-weight: 400; }
.display-font { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.04em; }

.gold-text {
    background: var(--gold-grad);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.eyebrow {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.4em;
    color: var(--gold);
    text-transform: uppercase;
}

/* ═════════════ LOGIN ═════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
}
@keyframes pulseGlow { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.login-card {
    background: linear-gradient(180deg, var(--card) 0%, var(--dark) 100%);
    border: 1px solid var(--line-strong);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 460px;
    position: relative;
    box-shadow: var(--shadow-deep);
    z-index: 1;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gold-grad);
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
}

.login-logo {
    width: 80px !important;
    height: 80px !important;
    object-fit: contain;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(201, 168, 76, 0.4));
    animation: floatLogo 5s ease-in-out infinite;
}
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.login-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--card-2);
    border: 1px solid var(--line);
    margin-bottom: 1.8rem;
    position: relative;
    border-radius: 2px;
}

.login-tab {
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.25em;
    font-size: 0.85rem;
    color: var(--muted);
    transition: var(--t-fast);
    background: transparent;
    border: none;
    z-index: 1;
    position: relative;
}

.login-tabs-indicator {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    background: var(--gold);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.login-tabs[data-active="admin"] .login-tabs-indicator { transform: translateX(100%); }
.login-tab.active { color: var(--black); font-weight: 700; }

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-field label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}

.login-field input {
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.95rem 1.1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    transition: var(--t-fast);
    outline: none;
}

.login-field input:focus {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.05);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.login-help {
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.5rem;
}

.login-help a { color: var(--gold); }

.demo-creds {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px dashed var(--line);
    background: var(--card-2);
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

.demo-creds strong { color: var(--gold); display: block; margin-bottom: 0.4rem; font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.25em; }

.btn-login {
    background: var(--gold);
    color: var(--black);
    padding: 1.05rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.25em;
    border: 2px solid var(--gold);
    cursor: pointer;
    transition: var(--t);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold-light);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-login:hover::before { transform: translateX(0); }
.btn-login span { position: relative; z-index: 1; }

.login-back {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ═════════════ APP LAYOUT ═════════════ */
.app {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--card) 0%, var(--dark) 100%);
    border-right: 1px solid var(--line);
    padding: 1.8rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0 1.8rem 1.8rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}

.sidebar-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(201, 168, 76, 0.4));
}

.sidebar-brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--text);
    line-height: 1;
}

.sidebar-brand-text small {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.35em;
    color: var(--gold);
    margin-top: 4px;
}

.sidebar-section {
    padding: 0 0.8rem;
    margin-bottom: 1.5rem;
}

.sidebar-section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--muted);
    padding: 0 1rem;
    margin-bottom: 0.6rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--t-fast);
    position: relative;
    margin-bottom: 0.15rem;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 0;
    background: var(--gold);
    transform: translateY(-50%);
    transition: height 0.3s ease;
}

.sidebar-link:hover { color: var(--text); background: var(--card-2); }
.sidebar-link.active { color: var(--gold); background: rgba(201, 168, 76, 0.08); }
.sidebar-link.active::before { height: 60%; }
.sidebar-link .icon { width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-link .icon svg { width: 19px; height: 19px; opacity: 0.9; }
.sidebar-link.active .icon svg { opacity: 1; }
.sidebar-link .badge {
    margin-left: auto;
    background: var(--gold);
    color: var(--black);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-weight: 700;
}

.sidebar-bottom { margin-top: auto; padding: 0 0.8rem; }

.main { padding: 1.7rem 2.2rem; overflow-x: hidden; }
/* Evita que el contenido se "estire" demasiado en pantallas anchas */
@media (min-width: 1480px) {
    .main { padding-left: calc((100% - 1340px) / 2); padding-right: calc((100% - 1340px) / 2); }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 1rem;
}

.topbar-left h1 { font-size: 2rem; margin-bottom: 0.2rem; }
.topbar-left p { color: var(--muted); font-size: 0.92rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.topbar-icon {
    width: 42px; height: 42px;
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--t-fast);
    font-size: 1.05rem;
    position: relative;
}
.topbar-icon:hover { border-color: var(--gold); color: var(--gold); }
.topbar-icon svg { width: 20px; height: 20px; }
.topbar-icon .dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--red);
}

.topbar-user {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--line);
    background: var(--card-2);
}

.topbar-avatar {
    width: 36px; height: 36px;
    background: var(--gold-grad);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    color: var(--black);
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
}
.avatar-img { border-radius: 50%; object-fit: cover; display: block; border: 1px solid var(--line-strong); }

.topbar-user-text { line-height: 1.2; }
.topbar-user-text .name { font-size: 0.88rem; color: var(--text); font-weight: 600; }
.topbar-user-text .role { font-size: 0.72rem; color: var(--muted); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--card) 0%, var(--card-2) 100%);
    border: 1px solid var(--line);
    padding: 1.3rem 1.4rem;
    position: relative;
    overflow: hidden;
    transition: var(--t);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--stat-color, var(--gold));
}

.stat-card:hover { transform: translateY(-4px); border-color: var(--stat-color, var(--gold)); }

.stat-card.gold { --stat-color: var(--gold); }
.stat-card.green { --stat-color: var(--green); }
.stat-card.blue { --stat-color: var(--blue); }
.stat-card.orange { --stat-color: var(--orange); }
.stat-card.purple { --stat-color: var(--purple); }
.stat-card.red { --stat-color: var(--red); }

.stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.6rem;
    display: flex; align-items: center; gap: 0.5rem;
}

.stat-icon {
    width: 32px; height: 32px;
    background: var(--card-3);
    border: 1px solid var(--line);
    color: var(--stat-color, var(--gold));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    margin-left: auto;
}
.stat-icon svg { width: 17px; height: 17px; }

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem;
    color: var(--text);
    font-weight: 500;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-trend {
    display: flex; align-items: center; gap: 0.3rem;
    font-size: 0.82rem; color: var(--muted);
}

.stat-trend.up { color: var(--green); }
.stat-trend.down { color: var(--red); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 1.5rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    gap: 1rem;
    flex-wrap: wrap;
}

.card-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; }
.card-subtitle { color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }
.card-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.3rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--t-fast);
    text-decoration: none;
}

.btn-primary { background: var(--gold); color: var(--black); border: 1px solid var(--gold); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-success { background: var(--green); color: white; border: 1px solid var(--green); }
.btn-success:hover { background: #16a34a; transform: translateY(-2px); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.78rem; }
.btn-icon-only { padding: 0.55rem; min-width: 36px; justify-content: center; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; }
.table thead { background: var(--card-2); }
.table th {
    text-align: left;
    padding: 1rem 1.2rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    border-bottom: 1px solid var(--line-strong);
}
.table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
    vertical-align: middle;
}
.table tr:hover td { background: rgba(201, 168, 76, 0.03); }
.table tr:last-child td { border-bottom: none; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    border-radius: 100px;
    border: 1px solid;
}
.pill::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}
.pill.success { color: var(--green); border-color: var(--green); background: rgba(34,197,94,0.08); }
.pill.warning { color: var(--orange); border-color: var(--orange); background: rgba(249,115,22,0.08); }
.pill.danger { color: var(--red); border-color: var(--red); background: rgba(239,68,68,0.08); }
.pill.info { color: var(--blue); border-color: var(--blue); background: rgba(59,130,246,0.08); }
.pill.gold { color: var(--gold); border-color: var(--gold); background: rgba(201,168,76,0.08); }
.pill.muted { color: var(--muted); border-color: var(--line); background: var(--card-2); }

.welcome-banner {
    background: linear-gradient(135deg, var(--card) 0%, rgba(201,168,76,0.1) 100%);
    border: 1px solid var(--line-strong);
    padding: 2.5rem;
    margin-bottom: 2rem;
}
.welcome-banner h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.welcome-banner p { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 600px; }

.mi-paquete {
    background: linear-gradient(135deg, var(--card) 0%, var(--dark) 100%);
    border: 2px solid var(--gold);
    padding: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.mi-paquete-header { padding: 2rem 2rem 1.5rem; border-bottom: 1px solid var(--line); }
.mi-paquete-tier {
    font-family: 'Bebas Neue', sans-serif;
    color: var(--gold);
    letter-spacing: 0.4em;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.mi-paquete-name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}
.mi-paquete-precio {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}
.precio-total {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--gold);
    font-weight: 600;
    line-height: 1;
}
.precio-total small {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    display: block;
    margin-top: 0.4rem;
    text-transform: uppercase;
}
.mi-paquete-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.mi-paquete-section h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    color: var(--gold);
    margin-bottom: 1rem;
}
.mi-paquete-list { list-style: none; }
.mi-paquete-list li {
    padding: 0.5rem 0 0.5rem 1.4rem;
    position: relative;
    font-size: 0.88rem;
}
.mi-paquete-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: 700;
}

.progreso-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    position: relative;
    margin: 2rem 0;
}
.progreso-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 8%; right: 8%;
    height: 2px;
    background: var(--line);
    z-index: 0;
}
.progreso-step { position: relative; text-align: center; z-index: 1; }
.progreso-circle {
    width: 50px; height: 50px;
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.7rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--muted);
    transition: var(--t);
}
.progreso-step.completed .progreso-circle {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    box-shadow: 0 0 0 6px var(--black), 0 0 20px rgba(201, 168, 76, 0.5);
}
.progreso-step.active .progreso-circle {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 0 6px var(--black), 0 0 20px rgba(201, 168, 76, 0.4);
}
.progreso-label { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.progreso-step.completed .progreso-label, .progreso-step.active .progreso-label { color: var(--text); font-weight: 600; }
.progreso-bar {
    position: absolute;
    top: 24px;
    left: 8%;
    height: 2px;
    background: var(--gold);
    z-index: 0;
    box-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
}

.pago-card {
    background: linear-gradient(135deg, var(--card) 0%, rgba(34,197,94,0.05) 100%);
    border: 1px solid var(--green);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.pago-card.pendiente {
    background: linear-gradient(135deg, var(--card) 0%, rgba(249,115,22,0.05) 100%);
    border-color: var(--orange);
}
.pago-status { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.pago-resumen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--card-2);
    border: 1px solid var(--line);
}
.pago-resumen-item .label { font-size: 0.72rem; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; margin-bottom: 0.4rem; }
.pago-resumen-item .value { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 500; }
.pago-resumen-item .value.gold { color: var(--gold); }
.pago-resumen-item .value.green { color: var(--green); }
.pago-resumen-item .value.orange { color: var(--orange); }

.galeria-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
}
.foto-thumb {
    aspect-ratio: 1;
    background: var(--card-2);
    border: 1px solid var(--line);
    cursor: pointer;
    position: relative;
    transition: var(--t-fast);
}
.foto-thumb::before {
    content: '📷';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.3;
}
.foto-thumb:hover { border-color: var(--gold); transform: scale(0.97); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}
.form-field input, .form-field select, .form-field textarea {
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.85rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    outline: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.04);
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-field select option { background: var(--card-2); color: var(--text); }

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(15px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s;
}
.modal-bg.show { display: flex; opacity: 1; }
.modal-content {
    background: var(--card);
    border: 1px solid var(--line-strong);
    max-width: 540px;
    width: 100%;
    position: relative;
    transform: scale(0.92);
    transition: transform 0.4s;
    overflow: hidden;
}
.modal-bg.show .modal-content { transform: scale(1); }
.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gold-grad);
}
.modal-header { padding: 2rem 2rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-body { padding: 2rem; }
.modal-close {
    position: absolute;
    top: 1.2rem; right: 1.2rem;
    width: 32px; height: 32px;
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
}
.modal-close:hover { background: var(--red); border-color: var(--red); color: white; }

.chat-container {
    background: var(--card);
    border: 1px solid var(--line);
    height: 500px;
    display: flex;
    flex-direction: column;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.chat-msg {
    max-width: 75%;
    padding: 0.85rem 1.1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.chat-msg.received { background: var(--card-2); border: 1px solid var(--line); align-self: flex-start; }
.chat-msg.sent { background: var(--gold); color: var(--black); align-self: flex-end; }
.chat-msg-meta { font-size: 0.7rem; margin-top: 0.4rem; opacity: 0.7; }
.chat-input {
    border-top: 1px solid var(--line);
    padding: 1rem;
    display: flex;
    gap: 0.7rem;
}
.chat-input input {
    flex: 1;
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    outline: none;
}
.chat-input input:focus { border-color: var(--gold); }

.trabajadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}
.trabajador-card {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 1.5rem;
    text-align: center;
    transition: var(--t);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.trabajador-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: var(--gold-grad);
    opacity: 0.15;
}
.trabajador-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.trabajador-avatar {
    width: 80px; height: 80px;
    background: var(--gold-grad);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--black);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
    border: 4px solid var(--card);
}
.trabajador-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 0.3rem; }
.trabajador-rol {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--gold);
    margin-bottom: 0.8rem;
}
.trabajador-stats {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}
.trabajador-stat .num { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--gold); font-weight: 600; }
.trabajador-stat .lbl { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; margin-top: 0.2rem; }

.toast {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--card);
    border: 1px solid var(--gold);
    padding: 1.2rem 1.5rem;
    border-left: 4px solid var(--gold);
    transform: translateX(120%);
    transition: transform 0.5s;
    z-index: 9999;
    max-width: 360px;
    box-shadow: var(--shadow-deep);
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: var(--green); border-color: var(--green); }
.toast.error { border-left-color: var(--red); border-color: var(--red); }
.toast-title {
    color: var(--gold);
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}
.toast.success .toast-title { color: var(--green); }
.toast.error .toast-title { color: var(--red); }
.toast-msg { color: var(--text); font-size: 0.9rem; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.row-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }

@media (max-width: 1100px) {
    .row-2, .row-3, .row-2-1 { grid-template-columns: 1fr; }
    .mi-paquete-grid { grid-template-columns: 1fr; }
    .pago-resumen { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 980px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        top: 0; left: -100%;
        width: 280px;
        height: 100vh;
        transition: left 0.4s ease;
        z-index: 1000;
    }
    .sidebar.open { left: 0; }
    .main { padding: 1.5rem 1rem; }
    .progreso-timeline { grid-template-columns: 1fr; gap: 1.5rem; }
    .progreso-timeline::before { display: none; }
}

.menu-mobile { display: none; background: var(--gold); color: var(--black); border: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; }
.menu-mobile svg { width: 22px; height: 22px; }
@media (max-width: 980px) { .menu-mobile { display: flex; align-items: center; justify-content: center; } }

[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}
[data-reveal].visible { opacity: 1; transform: translateY(0); }
[data-reveal][data-delay="1"].visible { transition-delay: 0.1s; }
[data-reveal][data-delay="2"].visible { transition-delay: 0.2s; }
[data-reveal][data-delay="3"].visible { transition-delay: 0.3s; }
[data-reveal][data-delay="4"].visible { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════════
   DESIGN SYSTEM 2.0 — Panel (overhaul jun 2026)
═══════════════════════════════════════════════════════════════ */
:root {
    --black: #06080f;
    --bg-deep: #04060c;
    --card: #10131d;
    --card-2: #161a26;
    --text: #f5f5f7;
    --muted: #9b9ba6;
    --radius: 16px;
    --hair: rgba(150,180,230,0.10);
    --shadow-deep: 0 26px 70px rgba(0,0,0,0.6), 0 2px 10px rgba(0,0,0,0.4);
}

/* Escala fluida según pantalla (arregla "muy pequeño" en monitor grande) */
html { font-size: clamp(15px, 0.32vw + 12px, 18.5px); }

/* Más presencia y legibilidad en el panel */
.form-field label, .field label { font-size: 0.82rem; color: var(--text); opacity: 0.92; margin-bottom: 0.45rem; letter-spacing: 0.04em; }
input, select, textarea {
    font-size: 0.95rem;
    padding: 0.62rem 0.85rem;
    background: var(--card-2);
    border: 1px solid var(--line);
    color: var(--text);
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
/* El autocompletado del navegador ya no pinta los campos de blanco */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
textarea:-webkit-autofill, select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--card-2) inset;
    box-shadow: 0 0 0 1000px var(--card-2) inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out 0s;
}

/* Pasos numerados (página de pagos del cliente) */
.pago-paso { display: flex; gap: 1rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.pago-paso:first-of-type { border-top: none; padding-top: 0.4rem; }
.pago-paso-num { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: var(--gold-grad); color: var(--black); display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.15rem; }
.pago-paso-titulo { font-family: 'Playfair Display', serif; font-size: 1.18rem; color: var(--text); }
.pago-cuenta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.8rem; }
.pago-dato { padding: 0.85rem 1rem; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; cursor: pointer; transition: var(--t-fast); }
.pago-dato:hover { border-color: var(--gold); border-style: solid; }
.pago-dato .lbl { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.3rem; }
.pago-dato .val { font-weight: 600; font-size: 0.98rem; word-break: break-word; }
.pago-dato.destacado { background: var(--gold); border: 1px solid var(--gold); color: var(--black); }
.pago-dato.destacado .lbl { color: rgba(0,0,0,0.6); }
.pago-dato.destacado .val { font-size: 1.25rem; font-family: monospace; font-weight: 700; }
select option { background-color: #161616; color: #f2f2f2; }
.card-title { font-size: clamp(1.15rem, 1.4vw, 1.5rem); }
.topbar-left h1 { font-size: clamp(1.5rem, 2vw, 1.9rem); }
.topbar-left p { font-size: 0.95rem; }
.table td, .table th { font-size: 0.95rem; }
.btn { padding: 0.7rem 1.3rem; }

body { background: var(--bg-deep); }
body::before {
    background:
        radial-gradient(900px 520px at 0% 0%, rgba(201,168,76,0.10), transparent 55%),
        radial-gradient(820px 620px at 100% 0%, rgba(60,110,200,0.10), transparent 55%),
        radial-gradient(820px 620px at 100% 100%, rgba(201,168,76,0.06), transparent 55%),
        linear-gradient(180deg, #0b1020 0%, #070b16 50%, #04060c 100%) !important;
}

/* Sidebar con un poco más de profundidad */
.sidebar { background: linear-gradient(180deg, #0d0d12, #08080b); border-right: 1px solid var(--hair); }

/* Tarjetas: radio + hairline + elevación */
.card, .stat-card, .pago-card, .mi-paquete, .chat-container, .login-card, .gal-frame, .table-wrap {
    border-radius: var(--radius);
    border: 1px solid var(--hair);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0) 42%);
    background-color: var(--card);
    transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.card:hover, .stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-deep);
}

/* Botones estilo Apple */
.btn { border-radius: 12px; transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast); }
.btn:active { transform: scale(0.97); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px rgba(201,168,76,0.38); }
input, select, textarea { border-radius: 10px; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN / REGISTRO 2.0 — compacto, centrado, con efectos
═══════════════════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh; overflow-y: auto !important;
    align-items: center; justify-content: center;
    padding: 4vh 1.2rem !important;
    background: radial-gradient(900px 600px at 50% -10%, rgba(60,110,200,0.12), transparent 60%),
                radial-gradient(700px 500px at 50% 110%, rgba(201,168,76,0.1), transparent 60%),
                linear-gradient(180deg, #0b1020, #04060c);
}
.login-card {
    margin: auto;                      /* permite scroll si es muy alto */
    max-width: 420px;
    padding: 2.2rem 2.2rem 2.4rem !important;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(20,24,36,0.95), rgba(10,13,22,0.95));
    backdrop-filter: blur(10px);
    border: 1px solid var(--line-strong);
    animation: loginCardIn 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes loginCardIn { from { opacity: 0; transform: translateY(28px) scale(0.96); } to { opacity: 1; transform: none; } }
.login-card::before { border-radius: 20px 20px 0 0; }
.login-logo { width: 66px !important; height: 66px !important; margin: 0 auto 1rem !important; }
.login-title { font-size: clamp(1.5rem, 3vw, 1.9rem) !important; margin-bottom: 0.3rem; }
.login-subtitle { font-size: 0.88rem !important; margin-bottom: 1.4rem !important; }
.login-form { gap: 0.85rem !important; }
.login-field label { font-size: 0.74rem; letter-spacing: 0.08em; }
.login-field input { padding: 0.8rem 1rem; }
.btn-login {
    margin-top: 0.5rem; padding: 0.95rem; border-radius: 12px;
    box-shadow: 0 12px 34px rgba(201,168,76,0.32);
    transition: transform 0.25s, box-shadow 0.25s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(201,168,76,0.45); }
.login-help { font-size: 0.85rem; margin-top: 0.2rem; }
/* Link discreto para el equipo (admin) */
.login-team { text-align: center; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--hair); }
.login-team a { color: var(--muted); font-size: 0.8rem; transition: color 0.2s; }
.login-team a:hover { color: var(--gold); }
.login-back { margin-top: 1rem; text-align: center; font-size: 0.85rem; }
/* Registro: campos en 2 columnas para que sea compacto */
.login-reg .login-card { max-width: 500px; }
.login-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.login-row .login-field { min-width: 0; }                 /* evita que los inputs se salgan */
.login-row .login-field input { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 440px) { .login-row { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════
   ASISTENTE DE ADMIN/EQUIPO (chat con texto libre)
═══════════════════════════════════════════════════════════════ */
.aia { position: fixed; right: 24px; bottom: 24px; z-index: 1200; }
.aia-launch { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--gold-grad); background-size: 200% auto; color: #1a1206; border: none; cursor: pointer; padding: 0.8rem 1.2rem 0.8rem 0.9rem; border-radius: 999px; font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 0.9rem; box-shadow: 0 12px 36px rgba(201,168,76,0.4); animation: shimmer 5s linear infinite; transition: transform 0.25s; }
.aia-launch:hover { transform: translateY(-3px); }
.aia-launch.hidden { display: none; }
.aia-launch svg { width: 22px; height: 22px; }
.aia-panel { position: absolute; right: 0; bottom: 0; width: min(390px, calc(100vw - 36px)); height: min(580px, calc(100vh - 90px)); background: linear-gradient(180deg, #0d1322, #080b14); border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 40px 100px rgba(0,0,0,0.7); opacity: 0; transform: translateY(20px) scale(0.96); transform-origin: right bottom; pointer-events: none; transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1), transform 0.35s cubic-bezier(0.16,1,0.3,1); }
.aia-panel.show { opacity: 1; transform: none; pointer-events: auto; }
.aia-head { display: flex; align-items: center; gap: 0.7rem; padding: 1rem 1.1rem; background: linear-gradient(135deg, rgba(201,168,76,0.16), rgba(60,110,200,0.1)); border-bottom: 1px solid var(--hair); }
.aia-head-ic { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; color: var(--gold); background: rgba(201,168,76,0.12); border: 1px solid var(--line-strong); border-radius: 50%; }
.aia-head-ic svg { width: 24px; height: 24px; }
.aia-head-tx { flex: 1; line-height: 1.25; }
.aia-head-tx strong { font-family: 'Playfair Display', serif; font-size: 1.05rem; }
.aia-head-tx small { color: var(--muted); font-size: 0.74rem; }
.aia-close { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.aia-close:hover { color: var(--text); }
.aia-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.aia-msg { max-width: 90%; padding: 0.7rem 0.95rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.55; animation: aiaIn 0.35s ease; }
@keyframes aiaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.aia-msg.bot { align-self: flex-start; background: #161c2b; color: var(--text); border-bottom-left-radius: 4px; }
.aia-msg.user { align-self: flex-end; background: var(--gold); color: #1a1206; font-weight: 600; border-bottom-right-radius: 4px; }
.aia-msg.typing { display: flex; gap: 5px; }
.aia-msg.typing span { width: 7px; height: 7px; background: var(--muted); border-radius: 50%; animation: aiaDot 1.2s infinite; }
.aia-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.aia-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiaDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.aia-sugs { padding: 0.5rem 0.9rem; display: flex; gap: 0.4rem; overflow-x: auto; flex-shrink: 0; }
.aia-sug { white-space: nowrap; background: rgba(201,168,76,0.08); border: 1px solid var(--line-strong); color: var(--text); padding: 0.4rem 0.7rem; border-radius: 999px; font-size: 0.78rem; cursor: pointer; transition: background 0.2s; }
.aia-sug:hover { background: var(--gold); color: #1a1206; }
.aia-input { display: flex; gap: 0.5rem; padding: 0.8rem 0.9rem; border-top: 1px solid var(--hair); }
.aia-input input { flex: 1; min-width: 0; background: #0e1320; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 0.7rem 1rem; font-size: 0.9rem; }
.aia-input button { width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--gold); color: #1a1206; font-size: 1.2rem; cursor: pointer; transition: transform 0.2s; }
.aia-input button:hover { transform: scale(1.08); }
@media (max-width: 520px) { .aia { right: 14px; bottom: 14px; } .aia-launch span { display: none; } .aia-launch { padding: 0.8rem; } }

/* ═══════════════════════════════════════════════════════════════
   SELECTOR MULTI-EVENTO (panel cliente)
═══════════════════════════════════════════════════════════════ */
.ev-selector {
    margin-bottom: 1.6rem; padding: 1.1rem 1.2rem;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.ev-selector-head { margin-bottom: 0.9rem; }
.ev-selector-title { display: block; font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--text); }
.ev-selector-hint { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.15rem; }
.ev-selector-tabs { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.ev-tab {
    flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px;
    padding: 0.9rem 1.1rem; border: 1.5px solid var(--line); border-radius: 12px;
    background: var(--card-2); transition: var(--t-fast); cursor: pointer; min-width: 0;
}
.ev-tab:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.3); }
.ev-tab.active { border-color: var(--gold); background: rgba(201,168,76,0.12); }
.ev-tab-tipo { font-weight: 700; color: var(--text); font-size: 1.02rem; line-height: 1.2; }
.ev-tab.active .ev-tab-tipo { color: var(--gold); }
.ev-tab-meta { font-size: 0.78rem; color: var(--muted); }
.ev-tab-state { margin-top: 0.5rem; font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.12em; font-size: 0.8rem; display: flex; align-items: center; gap: 0.4rem; }
.ev-tab.active .ev-tab-state { color: var(--gold); }
.ev-tab:not(.active) .ev-tab-state { color: var(--muted-2); }
.ev-tab:not(.active):hover .ev-tab-state { color: var(--gold); }
.ev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: evPulse 1.6s ease-in-out infinite; flex-shrink: 0; }
@keyframes evPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══════════════════════════════════════════════════════════════
   VISOR DE COMPROBANTE (modal, misma página)
═══════════════════════════════════════════════════════════════ */
.cmp-modal { max-width: min(840px, 94vw) !important; }
.cmp-body { padding-top: 0.6rem; text-align: center; }
.cmp-img { max-width: 100%; max-height: 76vh; display: block; margin: 0 auto; border-radius: 8px; background: #fff; }
.cmp-doc { width: 100%; height: 76vh; border: 0; border-radius: 8px; background: #fff; display: block; }
