:root {
    --brand: #d82b75;
    --brand-hover: #c42267;
    --brand-dark: #8c1e4d;
    --ink: #321c2c;
    --paper: #fdf2f7;
    --soft-pink: #fae8f2;
    --card-bg: #ffffff;
    --border: #f0dbe7;
    --text-muted: #785a6e;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

* {
    box-sizing: border-box;
}

/* =========================================================
   FONDO GLOBAL SUAVE EN ROSADITO (TODO EL SISTEMA)
   ========================================================= */
body {
    margin: 0;
    background: linear-gradient(180deg, #fdf1f6 0%, #fae8f2 50%, #fdf2f7 100%);
    background-attachment: fixed;
    color: var(--ink);
    font: 16px/1.55 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

/* =========================================================
   TOPBAR ELEGANTE CON LOGO OFICIAL DE FLORISTERÍA EROZ
   ========================================================= */
.topbar {
    background: #ffffff;
    border-bottom: 2px solid #edd5e3;
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(180, 76, 120, 0.07);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.topbar-logo {
    height: 48px;
    max-height: 52px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.topbar-logo:hover {
    transform: scale(1.03);
}

.topbar-badge {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--brand);
    background: #fdf1f6;
    border: 1px solid #f2d4e3;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

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

.topbar .nav-link {
    color: #4a233b;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.topbar .nav-link:hover {
    color: var(--brand);
    background: #fdf0f6;
    text-decoration: none;
}

.topbar .btn-logout {
    background: #fdf0f6;
    color: var(--brand);
    border: 1px solid #f0d2e2;
    padding: 7px 15px;
}

.topbar .btn-logout:hover {
    background: #f8dae8;
    color: var(--brand-dark);
}

/* =========================================================
   CONTENEDOR & TARJETAS
   ========================================================= */
.container {
    max-width: 1120px;
    margin: 32px auto;
    padding: 0 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin: 20px 0;
    box-shadow: 0 8px 30px rgba(180, 76, 120, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 12px 35px rgba(180, 76, 120, 0.09);
}

.card h1, .card h2, .card h3 {
    font-family: var(--font-serif);
    color: #2e1526;
    margin-top: 0;
    font-weight: 700;
}

.card h1 {
    font-size: 30px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.narrow {
    max-width: 550px;
    margin: 45px auto;
}

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

/* Bloques de Estadísticas */
.grid .card .stats {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand);
    display: block;
    line-height: 1.1;
    margin-bottom: 4px;
    font-family: var(--font-sans);
}

.grid .card {
    background: linear-gradient(135deg, #ffffff 0%, #fff8fc 100%);
    border: 1px solid #f2dbe8;
    font-weight: 600;
    color: #6a4b60;
    text-transform: uppercase;
    font-size: 13.5px;
    letter-spacing: 0.6px;
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn, button {
    background: linear-gradient(135deg, #d82b75 0%, #ba2362 100%);
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 600;
    font-size: 14.5px;
    padding: 11px 20px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(180, 76, 120, 0.3);
    transition: all 0.25s ease;
}

.btn:hover, button:hover {
    background: linear-gradient(135deg, #e33882 0%, #c4296b 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(180, 76, 120, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn:active, button:active {
    transform: translateY(0);
}

.btn.secondary, button.secondary {
    background: #64495c;
    box-shadow: 0 4px 14px rgba(100, 73, 92, 0.2);
}

.btn.secondary:hover, button.secondary:hover {
    background: #503649;
    box-shadow: 0 6px 18px rgba(100, 73, 92, 0.3);
}

.btn.danger {
    background: #a32d3f;
    box-shadow: 0 4px 14px rgba(163, 45, 63, 0.25);
}

.btn.danger:hover {
    background: #872131;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

/* =========================================================
   FORMULARIOS
   ========================================================= */
label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    margin: 12px 0 6px;
    color: #3b2234;
}

input, select, textarea {
    border: 1.5px solid #e5d1dc;
    border-radius: 12px;
    font: inherit;
    font-size: 14.5px;
    padding: 11px 15px;
    width: 100%;
    background: #ffffff;
    color: #2e1727;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(216, 43, 117, 0.14);
    background: #ffffff;
    outline: none;
}

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

input[type=checkbox] {
    width: auto;
}

/* =========================================================
   TABLAS CON ESTILO FLORAL LIMPIO
   ========================================================= */
.table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(180, 76, 120, 0.03);
}

table {
    border-collapse: collapse;
    width: 100%;
    background: #ffffff;
}

th {
    background: #fbf1f6;
    color: #4a2139;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 16px;
    border-bottom: 2px solid #ecd3e2;
    text-align: left;
}

td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid #f4e7ef;
    color: #321c2c;
    font-size: 14.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #fff8fc;
}

/* =========================================================
   ALERTAS
   ========================================================= */
.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin: 16px 0;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.alert.success {
    background: #eaf8ed;
    color: #156226;
    border: 1px solid #c4ecc9;
}

.alert.error {
    background: #fff0f3;
    color: #9d1c31;
    border: 1px solid #fad0d7;
}

.muted {
    color: var(--text-muted);
}

.badge {
    background: #fdf0f6;
    border: 1px solid #f2d4e3;
    border-radius: 20px;
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 700;
    padding: 4px 12px;
    letter-spacing: 0.3px;
    display: inline-block;
}

.hero {
    background: linear-gradient(135deg, #ffffff 0%, #fff3f8 50%, #fde6f1 100%);
    padding: 40px;
    border-radius: 22px;
    border: 1px solid #f2d7e6;
    box-shadow: 0 10px 32px rgba(180, 76, 120, 0.08);
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 38px;
    color: #2d1425;
    margin: 0 0 8px;
}

.hero p {
    font-size: 15.5px;
    color: #6a4e61;
    margin-bottom: 22px;
}

/* =========================================================
   ESTILOS PREMIUM DE INICIO DE SESIÓN (LOGIN)
   ========================================================= */
body.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 15%, #ffe6f2 0%, #fdf4f8 45%, #f9e2ed 100%), #fdf2f7;
    position: relative;
    overflow-x: hidden;
    padding: 24px 16px;
}

.auth-bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: blobFloat 14s ease-in-out infinite alternate;
}

.auth-blob-1 {
    width: 380px;
    height: 380px;
    background: #f7b4d0;
    top: -90px;
    left: -70px;
}

.auth-blob-2 {
    width: 440px;
    height: 440px;
    background: #e8a0c2;
    bottom: -110px;
    right: -90px;
    animation-delay: -5s;
}

.auth-blob-3 {
    width: 280px;
    height: 280px;
    background: #fed5e6;
    top: 40%;
    left: 60%;
    animation-delay: -9s;
}

@keyframes blobFloat {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(22px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-blob { animation: none; }
}

.container.auth-body-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(234, 192, 215, 0.75);
    border-radius: 30px;
    box-shadow: 0 25px 65px -15px rgba(92, 32, 52, 0.16),
                0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    padding: 44px 38px 36px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

/* Contenedor del Logo Oficial de Floristería Eroz */
.auth-logo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    background: #ffffff;
    border-radius: 26px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(180, 76, 120, 0.18),
                0 0 0 3px #ffffff,
                0 0 0 5px rgba(235, 195, 215, 0.6);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.auth-logo-wrapper:hover {
    transform: scale(1.05) rotate(2deg);
}

.auth-real-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 18px;
    display: block;
}

.auth-brand-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--brand);
    background: #fdf0f6;
    border: 1px solid #f2d1df;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.auth-title {
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 700;
    color: #2e1526;
    margin: 0 0 8px;
    line-height: 1.15;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 13.5px;
    color: #725768;
    margin: 0;
    line-height: 1.5;
}

.auth-form {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3e2436;
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #a47d94;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: #ffffff;
    border: 1.5px solid #e5d1dc;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: #2e1627;
    transition: all 0.2s ease;
}

.auth-input.has-action {
    padding-right: 48px;
}

.auth-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(216, 43, 117, 0.15);
    background: #ffffff;
    outline: none;
}

.input-wrapper:focus-within .input-icon {
    color: var(--brand);
}

.auth-input::placeholder {
    color: #bfa5b3;
    font-size: 13.5px;
}

.btn-toggle-pw {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #9c7b91;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

.btn-toggle-pw:hover {
    color: var(--brand);
    background: #fbf1f6;
    transform: none;
}

.btn-auth-submit {
    width: 100%;
    margin-top: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #d82b75 0%, #ba2262 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 24px -3px rgba(216, 43, 117, 0.45);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, #e33882 0%, #c4296b 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -3px rgba(216, 43, 117, 0.5);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-auth-submit svg {
    transition: transform 0.2s ease;
}

.btn-auth-submit:hover svg {
    transform: translateX(4px);
}

.auth-footer-links {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px dashed #ebd9e3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.auth-footer-text {
    font-size: 12.5px;
    color: #8c7283;
}

.auth-install-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    background: #fdf0f6;
    border: 1px solid #f2d4e2;
    transition: all 0.2s ease;
}

.auth-install-link:hover {
    background: #f7dfe9;
    color: var(--brand-dark);
    text-decoration: none;
}

.auth-security {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #9c8393;
}

.auth-body-container .alert {
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 13.5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* =========================================================
   PÁGINA PÚBLICA DE INVITACIÓN
   ========================================================= */
.public {
    min-height: 100vh;
    background: #fff8fc;
}

.invite-cover {
    min-height: 440px;
    background: center/cover no-repeat;
    display: grid;
    place-items: center;
    position: relative;
}

.invite-cover:before {
    content: '';
    position: absolute;
    inset: 0;
    background: #26122066;
}

.invite-title {
    color: #fff;
    position: relative;
    text-align: center;
    padding: 20px;
    text-shadow: 0 2px 12px #000;
    animation: inviteRise 1.2s ease-out both;
}

.invite-title h1 {
    font-family: var(--font-serif);
    font-size: clamp(42px, 8vw, 86px);
    margin: 0;
}

.invite-content {
    max-width: 850px;
    margin: auto;
    padding: 35px 20px;
    text-align: center;
}

.details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
}

.details div {
    background: #fff;
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 3px 15px rgba(85, 34, 54, 0.08);
    border: 1px solid #f2dae7;
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 14px;
}

.rsvp {
    max-width: 600px;
    margin: 35px auto;
    text-align: left;
}

.rsvp h2 {
    text-align: center;
}

.music-control {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    padding: 0;
    font-size: 22px;
}

.hidden {
    display: none;
}

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

@media (prefers-reduced-motion: reduce) {
    .invite-title { animation: none; }
}

@media print {
    .topbar, .no-print, .actions { display: none; }
    .container { max-width: none; margin: 0; }
    .card { border: 0; box-shadow: none; padding: 0; }
}

@media (max-width: 680px) {
    .topbar {
        align-items: center;
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    .topbar nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 34px 22px 28px;
        border-radius: 24px;
    }
    .auth-title {
        font-size: 28px;
    }
    .auth-logo-wrapper {
        width: 100px;
        height: 100px;
    }
}
