/* =========================================
   WEDDING SMART PLANNER - LOGIN STYLES
   ========================================= */

/* ===== TOKENS ===== */
:root {
    --primary: #e6005c;
    --primary-dark: #c9004f;
    --pink-soft: #fff2f7;
    --pink-light: #ffe6f0;
    --pink-lighter: #fff8fb;
    --text: #111827;
    --text-soft: #374151;
    --muted: #6b7280;
    --border: #ececf0;
    --border-soft: #f3f4f6;
    --success: #22a45d;
    --warning: #f59e0b;
    --danger: #ef4444;
    --white: #ffffff;
    --bg: #fffaf7;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.08);
    --shadow-pink: 0 10px 28px rgba(230, 0, 92, 0.22);
    --shadow-card: 0 24px 60px rgba(17, 24, 39, 0.10);

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-script: 'Dancing Script', cursive;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, var(--pink-lighter) 100%);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; color: inherit; }
h1 { line-height: 1.2; color: var(--text); font-weight: 800; }

/* ===== LAYOUT ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
}

.floral-decoration {
    position: absolute;
    top: 30px;
    width: 200px;
    pointer-events: none;
    opacity: 0.7;
}
.floral-decoration.left { left: 0; }
.floral-decoration.right { right: 0; }
.floral-decoration svg { width: 100%; height: auto; }

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.logo-script {
    font-family: var(--font-script);
    color: var(--primary);
    font-size: 1.9rem;
    font-weight: 700;
}
.logo-block { display: flex; flex-direction: column; line-height: 1; }
.logo-bold { font-weight: 800; letter-spacing: 1px; font-size: 1.1rem; color: var(--text); }
.logo-sub { font-size: 0.6rem; letter-spacing: 4px; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* ===== AUTH CARD ===== */
.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px 36px 32px;
    width: 100%;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
}
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.auth-header p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ===== FORM ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 16px;
    color: var(--muted);
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: all 0.15s ease;
    font-size: 0.95rem;
}
.input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--pink-light);
}
.input-wrap input.error { border-color: var(--danger); }
.toggle-pwd {
    position: absolute;
    right: 12px;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.toggle-pwd:hover { color: var(--primary); background: var(--pink-soft); }
.field-error {
    font-size: 0.78rem;
    color: var(--danger);
    min-height: 1em;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: -4px;
}
.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-soft);
}
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.check-mark {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.remember input:checked + .check-mark {
    border-color: var(--primary);
    background: var(--primary);
}
.remember input:checked + .check-mark::after {
    content: '';
    width: 9px; height: 5px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(-45deg) translate(1px, -1px);
}
.forgot {
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
}
.forgot:hover { text-decoration: underline; }

.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pink-soft);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-pink);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-block { width: 100%; }
.arrow { display: inline-flex; }

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    margin: 22px 0;
    color: var(--muted);
    font-size: 0.78rem;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}
.divider span { padding: 0 14px; }

/* ===== DEMO ACCOUNTS ===== */
.demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}
.demo-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    text-align: left;
    transition: all 0.2s ease;
}
.demo-btn:hover {
    border-color: var(--primary);
    background: var(--pink-soft);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.demo-btn > div {
    flex: 1;
    line-height: 1.3;
}
.demo-btn strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 2px;
}
.demo-btn span:not(.arrow):not(.demo-icon) {
    color: var(--muted);
    font-size: 0.78rem;
}
.demo-btn .arrow {
    color: var(--primary);
    font-size: 1.1rem;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.demo-btn:hover .arrow {
    opacity: 1;
    transform: translateX(4px);
}
.demo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.demo-icon.sposi { background: var(--pink-light); color: var(--primary); }
.demo-icon.planner { background: rgba(186, 230, 253, 0.4); color: #0369a1; }
.demo-icon.admin { background: rgba(254, 215, 170, 0.5); color: #c2410c; }

/* ===== DEMO CREDENTIALS ===== */
.demo-creds {
    background: var(--pink-lighter);
    border: 1px solid var(--pink-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.82rem;
}
.demo-creds summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.demo-creds summary::after {
    content: '+';
    font-size: 1.2rem;
    line-height: 1;
}
.demo-creds[open] summary::after { content: '−'; }
.demo-creds ul {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pink-light);
}
.demo-creds li {
    padding: 4px 0;
    color: var(--text-soft);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.78rem;
}
.demo-creds strong { color: var(--text); margin-right: 4px; }

/* ===== AUTH FOOTER ===== */
.auth-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
}
.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* ===== BACK HOME ===== */
.back-home {
    color: var(--muted);
    font-size: 0.85rem;
    transition: color 0.15s ease;
}
.back-home:hover { color: var(--primary); }

/* ===== TOAST (login feedback) ===== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    z-index: 100;
    animation: slideIn 0.3s ease;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .auth-page { padding: 20px 16px; }
    .auth-card { padding: 28px 22px 24px; border-radius: var(--radius-lg); }
    .auth-header h1 { font-size: 1.5rem; }
    .floral-decoration { display: none; }
    .demo-btn { padding: 12px 14px; gap: 12px; }
    .demo-icon { width: 36px; height: 36px; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
