/* ================================================================
   auth.css — Shared styles for Login / Register / Forgot / Reset
   Place at: public/css/auth.css
   Uses design tokens defined in public/css/app.css (:root)
================================================================ */

.auth-wrap {
    min-height: 100dvh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 20px;
    background: var(--page);
    position: relative; overflow: hidden;
}

.auth-card {
    width: 100%; max-width: 380px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 32px 28px 36px;
    position: relative; z-index: 1;
    box-shadow: var(--card-shadow);
}

.a-logo {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}
.a-logo-ring {
    width: 64px; height: 64px; border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--card-shadow);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.a-logo-ring img { width: 38px; height: 38px; object-fit: contain; }

.tab-row {
    display: flex; gap: 4px;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 12px; padding: 4px;
    margin-bottom: 28px;
}
.tab-btn {
    flex: 1; padding: 10px 0; border: none;
    border-radius: 9px; cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 700; font-size: 13px;
    transition: background .2s, color .2s;
    background: transparent;
    color: var(--sub);
}
.tab-btn.active {
    background: var(--teal);
    color: #fff;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.auth-title {
    font-family: var(--font-sans);
    font-weight: 800; font-size: 20px;
    color: var(--ink); margin-bottom: 4px;
}
.auth-sub {
    font-family: var(--font-sans);
    font-size: 12.5px; color: var(--sub);
    margin-bottom: 24px; font-weight: 400;
}

.field-group { display: flex; flex-direction: column; gap: 14px; }
.field-wrap { position: relative; }
.field-wrap.standalone { margin-bottom: 14px; }
.field-label {
    font-family: var(--font-sans);
    font-size: 11px; font-weight: 600;
    color: var(--sub);
    text-transform: uppercase; letter-spacing: .7px;
    margin-bottom: 6px; display: block;
}
.field-inner { position: relative; display: flex; align-items: center; }
.field-icon {
    position: absolute; left: 14px;
    width: 16px; height: 16px;
    stroke: var(--faint); fill: none; stroke-width: 1.7;
    pointer-events: none;
}
.field-input {
    width: 100%; padding: 13px 14px 13px 40px;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 400;
    outline: none;
    transition: border-color .2s, background .2s;
}
.field-input::placeholder { color: var(--faint); }
.field-input:focus {
    border-color: var(--teal);
    background: var(--teal-tint);
}

.pwd-toggle {
    position: absolute; right: 14px;
    background: none; border: none; cursor: pointer;
    padding: 0; display: flex; align-items: center;
}
.pwd-toggle svg {
    width: 18px; height: 18px;
    stroke: var(--faint); fill: none; stroke-width: 1.7;
    transition: stroke .2s;
}
.pwd-toggle:hover svg { stroke: var(--sub); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.forgot-row {
    display: flex; justify-content: flex-end;
    margin-top: 10px; margin-bottom: 4px;
}
.forgot-link {
    font-family: var(--font-sans);
    font-size: 12px; color: var(--teal);
    text-decoration: none; font-weight: 600;
    transition: color .2s;
}
.forgot-link:hover { color: #257e64; }

.terms-row {
    display: flex; align-items: flex-start; gap: 10px;
    margin-top: 4px;
}
.terms-check {
    width: 16px; height: 16px; flex-shrink: 0;
    margin-top: 2px; accent-color: var(--teal); cursor: pointer;
}
.terms-txt {
    font-family: var(--font-sans);
    font-size: 12px; color: var(--sub); line-height: 1.5;
}
.terms-txt a { color: var(--teal); text-decoration: none; font-weight: 600; }
.terms-txt a:hover { color: #257e64; }

.submit-btn {
    width: 100%; padding: 15px;
    border-radius: 14px; border: none;
    background: var(--teal); color: #fff;
    font-family: var(--font-sans);
    font-weight: 700; font-size: 15px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center; gap: 8px;
    margin-top: 22px;
    transition: background .2s, transform .15s, box-shadow .2s;
}
.submit-btn:hover  { background: #257e64; }
.submit-btn:active { transform: scale(.97); }
.submit-btn svg    { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2.2; }

.error-box {
    background: var(--red-tint);
    border: 1px solid rgba(192,57,43,0.2);
    border-radius: 10px; padding: 12px 14px;
    margin-bottom: 18px;
}
.error-box ul { list-style: none; }
.error-box li {
    font-family: var(--font-sans);
    font-size: 12.5px; color: var(--red-ink);
    padding: 2px 0;
}
.error-box li::before { content: '· '; }

.field-err {
    font-family: var(--font-sans);
    font-size: 11.5px; color: var(--red-ink);
    margin-top: 5px;
}

.auth-foot {
    margin-top: 26px; text-align: center;
    font-family: var(--font-mono);
    font-size: 10.5px; color: var(--faint);
    letter-spacing: .3px; position: relative; z-index: 1;
}

.success-box {
    background: var(--teal-tint);
    border: 1px solid rgba(47,158,124,0.2);
    border-radius: 10px; padding: 12px 14px;
    margin-bottom: 18px;
    font-family: var(--font-sans);
    font-size: 12.5px; color: var(--teal);
}

.back-link {
    display: flex; align-items: center; gap: 6px;
    margin-top: 20px; justify-content: center;
    font-family: var(--font-sans);
    font-size: 13px; color: var(--sub);
    text-decoration: none;
    transition: color .2s;
}
.back-link:hover { color: var(--teal); }
.back-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.icon-circle {
    width: 60px; height: 60px; border-radius: 50%;
    margin: 4px auto 18px; background: var(--teal-tint);
    display: flex; align-items: center; justify-content: center;
}

.strength { display: flex; gap: 4px; margin-top: 7px; }
.strength i { height: 3px; flex: 1; border-radius: 2px; background: var(--line); }
.strength i.on { background: var(--teal); }
