/* ---- Auth Page ---- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 48px 36px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-img {
    height: 100px;
    width: auto;
    margin: 0 auto 12px;
    display: block;
    object-fit: contain;
}

.auth-bar-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.auth-logo {
    width: 56px;
    height: 56px;
    background: #4f46e5;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 22px;
    color: #1e293b;
    margin: 0 0 6px;
    font-weight: 700;
}

.auth-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ---- Auth Buttons ---- */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.auth-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.auth-btn:active {
    transform: scale(0.99);
}

.auth-btn-apple {
    color: #000;
}

/* ---- Divider ---- */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
}

/* ---- Phone OTP ---- */
.auth-phone label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.phone-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.phone-input-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.phone-input-row input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-send-otp,
.btn-verify-otp {
    padding: 10px 20px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.15s;
}

.btn-send-otp:hover,
.btn-verify-otp:hover {
    background: #4338ca;
}

.btn-verify-otp {
    background: #059669;
}

.btn-verify-otp:hover {
    background: #047857;
}

#otpSection {
    margin-top: 4px;
}

/* ---- Error & Loading ---- */
.auth-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
}

.auth-loading {
    margin-top: 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-loading .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* ---- Auth Bar (on form/dashboard pages) ---- */
.auth-bar {
    background: #0f172a;
    color: #94a3b8;
    padding: 10px 24px;
    font-size: 13px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.auth-bar strong {
    color: #fff;
}

.auth-bar-link {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.auth-bar-link:hover {
    text-decoration: underline;
}
