/* ── MarryMode shared styles ─────────────────────── */

body {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    background: #faf7f4;
    color: #3d2c2e;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, #f0ddd6 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 80%, #e8d5cf 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(201,169,110,0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ── Fixed nav (panel, dashboard, form pages) ── */
.app-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
    will-change: background;
}
.app-nav.scrolled {
    background: rgba(250, 247, 244, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(92, 64, 66, 0.06);
}
.app-nav-brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: #5c4042;
    text-decoration: none;
}
.app-nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.app-nav-actions span {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: #a08880;
    padding: 0.5rem 0.75rem;
}
.app-nav-actions a,
.app-nav-actions button {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid #c9a96e;
    color: #c9a96e;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.app-nav-actions a:hover,
.app-nav-actions button:hover {
    background: #c9a96e;
    color: #fff;
}


/* ── Load animation ── */
.fade-in {
    animation: app-fade-in 0.4s ease both;
}
@keyframes app-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .app-nav { padding: 1rem 1.25rem; }
    .app-nav-brand { font-size: 1.3rem; }
    .app-nav-actions span { display: none; }
}

/* ── Toast notifications ─────────────────────────── */

.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
    max-width: min(400px, calc(100vw - 2.5rem));
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 0.65rem;
    background: rgba(253, 252, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201, 169, 110, 0.18);
    box-shadow:
        0 8px 32px rgba(92, 64, 66, 0.10),
        0 1px 3px rgba(92, 64, 66, 0.06);
    font-family: 'Josefin Sans', 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(calc(100% + 1.25rem));
    animation: toast-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast.toast--hiding {
    animation: toast-out 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.toast__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast__text {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    color: #3d2c2e;
}
.toast__text a {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.toast__text a:hover {
    opacity: 0.75;
}

.toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #a08880;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}
.toast__close:hover {
    color: #5c4042;
    background: rgba(92, 64, 66, 0.06);
}

.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform-origin: left;
    animation: toast-progress 5s linear forwards;
}

/* -- Success -- */
.toast--success .toast__icon {
    background: rgba(122, 158, 126, 0.12);
    color: #5a8a5e;
}
.toast--success .toast__progress { background: #7a9e7e; }
.toast--success { border-left: 3px solid #7a9e7e; }

/* -- Error -- */
.toast--error .toast__icon {
    background: rgba(176, 114, 114, 0.12);
    color: #a05252;
}
.toast--error .toast__progress { background: #b07272; }
.toast--error { border-left: 3px solid #b07272; }

/* -- Warning -- */
.toast--warning .toast__icon {
    background: rgba(184, 159, 106, 0.12);
    color: #8a7440;
}
.toast--warning .toast__progress { background: #b89f6a; }
.toast--warning { border-left: 3px solid #b89f6a; }

/* -- Info -- */
.toast--info .toast__icon {
    background: rgba(201, 169, 110, 0.12);
    color: #c9a96e;
}
.toast--info .toast__progress { background: #c9a96e; }
.toast--info { border-left: 3px solid #c9a96e; }

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 1.25rem));
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(calc(100% + 1.25rem));
    }
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 480px) {
    .toast-container {
        top: 0.75rem;
        right: 0.75rem;
        max-width: calc(100vw - 1.5rem);
    }
    .toast {
        padding: 0.75rem 0.85rem;
        gap: 0.6rem;
    }
    .toast__text { font-size: 0.82rem; }
    .toast__icon { width: 28px; height: 28px; }
    .toast__icon svg { width: 15px; height: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .toast.toast--hiding {
        animation: none;
        display: none;
    }
    .toast__progress {
        animation: none;
        display: none;
    }
}
