/* ══ ANA Auth – logowanie ═════════════════════════════════ */

.ana-auth-box {
    max-width: 380px;
    background: linear-gradient(135deg, #14102b, #0d1322);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 16px;
    padding: 26px 24px;
}
.ana-auth-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}
.ana-auth-sub {
    font-size: 13px;
    color: #7a8ab0;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Przyciski OAuth ─────────────────────────────────────── */
.ana-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: opacity 0.16s ease;
    cursor: pointer;
    border: none;
}
.ana-auth-btn:hover { opacity: 0.9; }

.ana-auth-google {
    background: #fff;
    color: #1f1f1f !important;
}
.ana-auth-fb {
    background: #1877f2;
    color: #fff !important;
}
.ana-auth-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 13px;
}
.ana-auth-google .ana-auth-ico {
    background: linear-gradient(135deg, #4285f4, #ea4335);
    color: #fff;
}
.ana-auth-fb .ana-auth-ico {
    background: #fff;
    color: #1877f2;
}

/* ── Separator ───────────────────────────────────────────── */
.ana-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0;
}
.ana-auth-divider::before,
.ana-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.ana-auth-divider span {
    padding: 0 12px;
    font-size: 12px;
    color: #5a6a8a;
}

/* ── Formularz email ─────────────────────────────────────── */
.ana-auth-email-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.ana-auth-email {
    width: 100%;
    background: rgba(13, 11, 31, 0.8) !important;
    border: 1px solid rgba(124, 58, 237, 0.4) !important;
    border-radius: 8px !important;
    padding: 11px 13px !important;
    font-size: 14px !important;
    color: #fff !important;
    box-sizing: border-box !important;
}
.ana-auth-email:focus {
    outline: none !important;
    border-color: #7c3aed !important;
}
.ana-auth-email::placeholder { color: #4a5a7a !important; }

.ana-auth-magic-btn {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #29d4b6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.16s ease;
}
.ana-auth-magic-btn:hover { opacity: 0.9; }
.ana-auth-magic-btn:disabled { opacity: 0.5; cursor: default; }

.ana-auth-status {
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    min-height: 18px;
}
.ana-auth-status-ok    { color: #29d4b6; }
.ana-auth-status-error { color: #ef4444; }

/* ── Stan zalogowany ─────────────────────────────────────── */
.ana-auth-loggedin {
    display: flex;
    align-items: center;
    gap: 11px;
    max-width: none;
    padding: 12px 16px;
}
.ana-auth-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ana-auth-avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed, #29d4b6);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
}
.ana-auth-name {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.ana-auth-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a0b0cc;
    border-radius: 7px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}
.ana-auth-logout:hover {
    border-color: #ef4444;
    color: #ef4444;
}

@media ( max-width: 600px ) {
    .ana-auth-box { padding: 20px 18px; max-width: 100%; }
    /* Większe przyciski + font 16px (bez zoomu iOS) */
    .ana-auth-btn { min-height: 46px; font-size: 15px; }
    .ana-auth-email {
        font-size: 16px !important;
        min-height: 46px;
    }
    .ana-auth-magic-btn { min-height: 46px; font-size: 15px; }
    .ana-auth-logout { min-height: 38px; padding: 8px 16px; }
    /* Stan zalogowany — nie zawijaj brzydko */
    .ana-auth-loggedin { flex-wrap: wrap; }
}

/* ══ Panel profilu (zalogowany) ═══════════════════════════ */
.ana-auth-profile {
    max-width: 400px;
}
.ana-profile-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ana-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ana-profile-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}
.ana-profile-email {
    font-size: 13px;
    color: #6a7a9a;
}
.ana-profile-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}
.ana-profile-sub {
    font-size: 13px;
    color: #7a8ab0;
    margin: 0 0 12px;
}
.ana-profile-name-form {
    display: flex;
    gap: 8px;
}
.ana-profile-name-input {
    flex: 1;
    background: rgba(13, 11, 31, 0.8) !important;
    border: 1px solid rgba(124, 58, 237, 0.4) !important;
    border-radius: 8px !important;
    padding: 10px 13px !important;
    font-size: 14px !important;
    color: #fff !important;
    box-sizing: border-box !important;
}
.ana-profile-name-input:focus {
    outline: none !important;
    border-color: #7c3aed !important;
}
.ana-profile-save {
    background: linear-gradient(135deg, #7c3aed, #29d4b6);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.16s ease;
}
.ana-profile-save:hover { opacity: 0.9; }
.ana-profile-save:disabled { opacity: 0.5; cursor: default; }
.ana-profile-status {
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    min-height: 18px;
}
.ana-profile-status.ana-auth-status-ok    { color: #29d4b6; }
.ana-profile-status.ana-auth-status-error { color: #ef4444; }
.ana-auth-profile .ana-auth-logout {
    margin-top: 18px;
    width: 100%;
}

@media ( max-width: 600px ) {
    .ana-profile-name-form { flex-direction: column; }
    .ana-profile-name-input { font-size: 16px !important; min-height: 46px; }
    .ana-profile-save { min-height: 46px; }
}

/* ══ Sekcja zachęty do logowania (dół strony głównej) ═════ */
.ana-join-section {
    margin: 36px 0 24px;
    display: flex;
    justify-content: center;
}
.ana-join-inner {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(160deg, rgba(124,58,237,0.12), rgba(41,212,182,0.06));
    border: 1px solid rgba(124,58,237,0.3);
    border-radius: 16px;
    padding: 28px 26px;
    text-align: center;
}
.ana-join-head {
    margin-bottom: 20px;
}
.ana-join-title {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
    font-family: 'Montserrat', -apple-system, sans-serif;
}
.ana-join-sub {
    font-size: 14px;
    line-height: 1.55;
    color: #a8b4c8;
    margin: 0;
}
.ana-join-form .ana-auth-box {
    max-width: 100%;
    margin: 0;
}
/* W tej sekcji nagłówek panelu logowania jest zbędny — mamy własny */
.ana-join-form .ana-auth-title {
    display: none;
}

@media ( max-width: 600px ) {
    .ana-join-section { margin: 28px 0 20px; }
    .ana-join-inner { padding: 22px 18px; }
    .ana-join-title { font-size: 19px; }
}
