/* ========================================
   10ly Health — Auth Pages
   Shared styles for login, signup, reset, etc.
   ======================================== */

*, *::before, *::after { box-sizing: border-box; }

/* ---- Card ---- */
.auth-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}
.auth-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 8px;
}
.auth-card h1 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 6px;
}
.auth-card .auth-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ---- Icon badge (success/warning states) ---- */
.auth-icon-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 1.7rem;
}
.auth-icon-badge.blue  { background: #eef2ff; color: #1a365d; }
.auth-icon-badge.green { background: #f0fdf4; color: #16a34a; }
.auth-icon-badge.red   { background: #fff1f2; color: #E33F23; }

/* ---- Form fields ---- */
.field-wrap { margin-bottom: 18px; }

.field-wrap label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}

.field-row { display: flex; gap: 14px; }
.field-row .field-wrap { flex: 1; min-width: 0; }

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}
.field-header label { margin-bottom: 0; }

.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}
.input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1a202c;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    font-family: inherit;
    appearance: none;
}
.input-wrap input:focus {
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
    background: #fff;
}
.input-wrap input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.input-wrap input:focus.is-invalid {
    border-color: #ef4444;
}
/* No icon inputs */
.input-wrap.no-icon input { padding-left: 14px; }

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.88rem;
    border: none;
    background: none;
    padding: 4px;
    line-height: 1;
}
.toggle-pw:hover { color: #1a365d; }

.field-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 5px;
}
.field-error {
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 5px;
}

/* ---- Alert ---- */
.auth-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #b91c1c;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.auth-alert i { flex-shrink: 0; margin-top: 1px; }

/* ---- Button ---- */
.btn-auth {
    display: block;
    width: 100%;
    padding: 13px;
    background: #1E5082;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s;
    box-shadow: none;
    font-family: inherit;
    letter-spacing: 0.2px;
    text-decoration: none;
    text-align: center;
}
.btn-auth:hover {
    background: #174070;
    color: #fff;
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled {
    background: #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed;
    transform: none !important;
}

.btn-auth-outline {
    display: block;
    width: 100%;
    padding: 13px;
    background: transparent;
    color: #1a365d;
    border: 1.5px solid #1a365d;
    border-radius: 12px;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
}
.btn-auth-outline:hover { background: #f0f4ff; }

/* ---- Footer text ---- */
.auth-footer-text {
    text-align: center;
    margin-top: 22px;
    font-size: 0.83rem;
    color: #64748b;
}
.auth-footer-text a {
    color: #1a365d;
    font-weight: 600;
    text-decoration: none;
}
.auth-footer-text a:hover { text-decoration: underline; }

/* ---- Forgot/inline links ---- */
.auth-link {
    font-size: 0.82rem;
    color: #1E5082;
    font-weight: 600;
    text-decoration: none;
}
.auth-link:hover { text-decoration: underline; color: #174070; }

/* ---- Divider ---- */
.auth-divider {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 24px 0;
}

/* ---- OTP boxes ---- */
.otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}
.otp-box {
    width: 54px;
    height: 62px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    caret-color: transparent;
    font-family: inherit;
}
.otp-box:focus {
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
    background: #fff;
}
.otp-box.filled {
    border-color: #1a365d;
    background: #fff;
}

/* ---- Success/info state ---- */
.auth-success-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 10px;
}
.auth-success-body {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; }
    .field-row { flex-direction: column; gap: 0; }
    .otp-box { width: 44px; height: 52px; font-size: 1.3rem; }
}
