/* ══════════════════════════════════════════════════════
   ZeroFogli — Auth Styles
   Login Modal, Header Auth Buttons, etc.
   ══════════════════════════════════════════════════════ */

/* ── Auth Header Buttons ── */
.auth-btns { display: flex; gap: .5rem; align-items: center; margin-left: .5rem; }
.auth-btn { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600;
    font-size: .82rem; padding: .5rem 1.1rem; border-radius: 10px; transition: all .25s;
    cursor: pointer; border: none; font-family: inherit; white-space: nowrap; }
.auth-btn--login { background: transparent; color: #2B5797; border: 1.5px solid #2B5797; }
.auth-btn--login:hover { background: rgba(43,87,151,.06); transform: translateY(-1px); }
.auth-btn--register { background: #2B5797; color: #fff; box-shadow: 0 2px 8px rgba(43,87,151,.15); }
.auth-btn--register:hover { background: #1E3F6F; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(43,87,151,.2); }
.auth-btn svg { width: 16px; height: 16px; }

/* Logged-in state */
.auth-user { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.auth-user__avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #2B5797, #3A6DB5);
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
    font-size: .82rem; cursor: pointer; transition: all .25s; }
.auth-user__avatar:hover { transform: scale(1.08); box-shadow: 0 2px 10px rgba(43,87,151,.25); }
.auth-user__dropdown { position: absolute; top: 100%; right: 0; background: #fff; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(26,35,50,.12); border: 1px solid #e2e6eb; min-width: 220px;
    padding: .5rem; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all .25s; z-index: 1001; }
.auth-user__dropdown.open { opacity: 1; visibility: visible; transform: translateY(4px); }
.auth-user__info { padding: .75rem 1rem; border-bottom: 1px solid #f3f5f7; }
.auth-user__name { font-weight: 700; font-size: .88rem; color: #1A2332; }
.auth-user__email { font-size: .75rem; color: #8494A7; margin-top: 2px; }
.auth-user__menu-item { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem;
    border-radius: 8px; font-size: .85rem; color: #4A5568; cursor: pointer; transition: all .2s;
    width: 100%; border: none; background: none; font-family: inherit; text-align: left; }
.auth-user__menu-item:hover { background: #f3f5f7; color: #1A2332; }
.auth-user__menu-item--danger { color: #dc2626; }
.auth-user__menu-item--danger:hover { background: #fef2f2; color: #dc2626; }

/* ── Modal Overlay ── */
.auth-modal { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center;
    justify-content: center; padding: 1rem; }
.auth-modal.open { display: flex; }
.auth-modal__backdrop { position: absolute; inset: 0; background: rgba(26,35,50,.5);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.auth-modal__box { position: relative; background: #fff; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(26,35,50,.15); max-width: 440px; width: 100%;
    max-height: 90vh; overflow-y: auto; animation: modalSlideUp .35s ease; }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.auth-modal__header { padding: 1.5rem 2rem 0; display: flex; justify-content: space-between; align-items: flex-start; }
.auth-modal__title { font-size: 1.3rem; font-weight: 800; color: #1A2332; }
.auth-modal__subtitle { font-size: .88rem; color: #8494A7; margin-top: .25rem; }
.auth-modal__close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
    justify-content: center; cursor: pointer; border: none; background: #f3f5f7; color: #8494A7;
    transition: all .2s; flex-shrink: 0; }
.auth-modal__close:hover { background: #e2e6eb; color: #1A2332; }
.auth-modal__body { padding: 1.5rem 2rem 2rem; }

/* ── Form Styles ── */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-field label { font-size: .78rem; font-weight: 600; color: #4A5568; text-transform: uppercase; letter-spacing: .04em; }
.auth-field input { padding: .7rem 1rem; border: 1.5px solid #e2e6eb; border-radius: 10px;
    font-size: .92rem; font-family: inherit; transition: all .2s; background: #fafbfc; color: #1A2332; }
.auth-field input:focus { outline: none; border-color: #2B5797; background: #fff; box-shadow: 0 0 0 3px rgba(43,87,151,.1); }
.auth-field input::placeholder { color: #c5cdd8; }
.auth-field .field-error { font-size: .75rem; color: #dc2626; display: none; }
.auth-field.error input { border-color: #dc2626; }
.auth-field.error .field-error { display: block; }

.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.auth-submit { padding: .85rem 1.6rem; border-radius: 12px; font-weight: 700; font-size: .95rem;
    border: none; cursor: pointer; transition: all .3s; font-family: inherit;
    background: linear-gradient(135deg, #2B5797, #1E3F6F); color: #fff;
    box-shadow: 0 2px 12px rgba(43,87,151,.2); }
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(43,87,151,.25); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.auth-submit--green { background: linear-gradient(135deg, #2D8E3C, #1F6E2C);
    box-shadow: 0 2px 12px rgba(45,142,60,.2); }
.auth-submit--green:hover { box-shadow: 0 6px 24px rgba(45,142,60,.25); }

.auth-divider { text-align: center; color: #8494A7; font-size: .82rem; position: relative; margin: .5rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%;
    width: calc(50% - 1rem); height: 1px; background: #e2e6eb; }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-switch { text-align: center; font-size: .85rem; color: #8494A7; }
.auth-switch a { color: #2B5797; font-weight: 600; cursor: pointer; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-alert { padding: .75rem 1rem; border-radius: 10px; font-size: .85rem; display: none; }
.auth-alert--error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.auth-alert.show { display: block; }

/* ── Verification Code Input ── */
.code-inputs { display: flex; gap: .5rem; justify-content: center; margin: 1rem 0; }
.code-inputs input { width: 48px; height: 56px; text-align: center; font-size: 1.5rem;
    font-weight: 700; border: 2px solid #e2e6eb; border-radius: 12px; font-family: 'JetBrains Mono', monospace;
    transition: all .2s; color: #2B5797; background: #fafbfc; }
.code-inputs input:focus { outline: none; border-color: #2B5797; background: #fff;
    box-shadow: 0 0 0 3px rgba(43,87,151,.12); }

/* ── Spinner ── */
.auth-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile ── */
@media (max-width: 768px) {
    .auth-btns { gap: .3rem; }
    .auth-btn { font-size: .78rem; padding: .45rem .8rem; }
    .auth-modal__box { max-width: 100%; border-radius: 16px; }
    .auth-modal__header, .auth-modal__body { padding-left: 1.25rem; padding-right: 1.25rem; }
    .auth-row { grid-template-columns: 1fr; }
    .code-inputs input { width: 42px; height: 50px; font-size: 1.3rem; }
}
