/* ═══════════════════════════════════════════════
   AUTH — Login, Signup, Profile (App Development Companies theme)
   ═══════════════════════════════════════════════ */

:root {
    --auth-accent:    #007bff;
    --auth-accent-h:  #0056b3;
    --auth-bg:        #eef2f5;
    --auth-card:      #ffffff;
    --auth-border:    rgba(0, 123, 255, 0.12);
    --auth-text:      #242855;
    --auth-muted:     #5a6282;
    --auth-error:     #dc2626;
    --auth-success:   #16a34a;
    --auth-radius:    14px;
    --auth-shadow:    0 10px 30px rgba(0, 0, 0, 0.06);
    --auth-gradient:  linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    --transition:     all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Auth pages (login / signup — standalone) ── */
.auth-body {
    background: linear-gradient(180deg, #f4f7ff 0%, var(--auth-bg) 45%, #ffffff 100%);
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 16px 3rem;
}

.auth-card {
    background: var(--auth-card);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    padding: 48px 44px;
    width: 100%;
    max-width: 480px;
}

.auth-card--wide { max-width: 720px; }

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 52px; width: auto; max-width: 100%; }

.auth-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--auth-text);
    text-align: center;
    margin: 0 0 6px;
    font-family: 'Outfit', sans-serif;
}

.auth-sub {
    color: var(--auth-muted);
    font-size: .95rem;
    text-align: center;
    margin: 0 0 28px;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 20px;
}

.auth-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: var(--auth-error); }
.auth-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--auth-success); }

.social-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    transition: var(--transition);
    border: 1.5px solid var(--auth-border);
    background: #fff;
    color: #374151;
}

.btn-social:hover { border-color: var(--auth-accent); color: var(--auth-accent); }
.btn-social img { width: 20px; height: 20px; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: .82rem;
    margin-bottom: 22px;
}

.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }

/* ── Form elements (auth + profile) ── */
.auth-page .form-group,
.profile-page .form-group { margin-bottom: 18px; }

.auth-page .form-group label,
.profile-page .form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    color: var(--auth-text);
    margin-bottom: 6px;
    font-family: 'Outfit', sans-serif;
}

.req { color: var(--auth-error); }

.auth-page .form-control,
.profile-page .form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dde4f0;
    border-radius: 10px;
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    box-sizing: border-box;
    color: var(--auth-text);
    background: #fff;
}

.auth-page .form-control:focus,
.profile-page .form-control:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-right: 44px; }

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--auth-muted);
    padding: 4px;
}

.toggle-pw:hover { color: var(--auth-accent); }

.field-error { color: var(--auth-error); font-size: .8rem; margin-top: 4px; }

.form-row-inline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--auth-muted); cursor: pointer; }
.forgot-link { font-size: .88rem; color: var(--auth-accent); text-decoration: none; font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }

.pw-strength { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.pw-bar { flex: 1; height: 4px; background: #dde4f0; border-radius: 4px; overflow: hidden; }
.pw-bar span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .3s, background .3s; }
#pwLabel, #pwLabel2 { font-size: .78rem; font-weight: 600; min-width: 44px; text-transform: capitalize; }

.btn-auth {
    width: 100%;
    padding: 13px;
    background: var(--auth-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    margin-top: 4px;
}

.btn-auth:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    transform: translateY(-1px);
    color: #fff;
}

.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.auth-footer { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--auth-muted); }
.auth-footer a { color: var(--auth-accent); font-weight: 600; text-decoration: none; }

/* ── Avatar upload ── */
.avatar-upload-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.avatar-upload-wrap--sm { margin-bottom: 0; }

.avatar-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #dde4f0;
    transition: var(--transition);
}

.avatar-preview:hover { border-color: var(--auth-accent); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(36, 40, 85, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .75rem;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
}

.avatar-preview:hover .avatar-overlay,
.avatar-overlay.drag-over { opacity: 1; }

.avatar-hint { font-size: .78rem; color: var(--auth-muted); margin-top: 8px; text-align: center; }

/* ═══════════════════════════════════════════════
   PROFILE PAGE (with site header + footer)
   ═══════════════════════════════════════════════ */

.profile-page {
    padding: 7.5rem 0 4rem;
    background: linear-gradient(180deg, #f4f7ff 0%, var(--auth-bg) 35%, #ffffff 100%);
    min-height: calc(100vh - 120px);
}

.profile-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 991px) {
    .profile-container { grid-template-columns: 1fr; }
    .profile-sidebar { position: static !important; }
}

.profile-sidebar {
    background: #fff;
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    padding: 32px 24px;
    text-align: center;
    height: fit-content;
    position: sticky;
    top: 6.5rem;
}

.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 16px; }

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dde4f0;
}

.profile-avatar-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    background: var(--auth-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .65rem;
    border: 2px solid #fff;
}

.profile-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 4px;
    font-family: 'Outfit', sans-serif;
}

.profile-email { font-size: .85rem; color: var(--auth-muted); margin: 0 0 10px; word-break: break-word; }
.profile-bio { font-size: .85rem; color: var(--auth-muted); margin: 0 0 20px; line-height: 1.5; }

.profile-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }

.profile-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: .9rem;
    font-weight: 500;
    color: var(--auth-muted);
    text-decoration: none;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.profile-nav-btn i { width: 18px; text-align: center; }

.profile-nav-btn:hover,
.profile-nav-btn.active {
    background: rgba(0, 123, 255, 0.08);
    color: var(--auth-accent);
}

.profile-nav-btn.active { font-weight: 700; }

.profile-nav-logout { color: var(--auth-error) !important; }
.profile-nav-logout:hover { background: #fef2f2 !important; }

.profile-nav .badge {
    margin-left: auto;
    background: var(--auth-accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.profile-main { min-width: 0; }

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

.profile-card {
    background: #fff;
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    overflow: hidden;
    margin-bottom: 24px;
}

.profile-card-header {
    padding: 20px 28px;
    border-bottom: 1px solid #eef2f5;
    background: #fafbfd;
}

.profile-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--auth-text);
    font-family: 'Outfit', sans-serif;
}

.profile-card form { padding: 24px 28px; }

.form-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.form-actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.btn-primary-action {
    padding: 11px 28px;
    background: var(--auth-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-action:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary-action {
    padding: 11px 24px;
    background: #fff;
    color: var(--auth-muted);
    border: 1.5px solid #dde4f0;
    border-radius: 50px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.btn-secondary-action:hover {
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

/* Reviews list on profile */
.reviews-list { padding: 8px 28px 28px; }

.review-item {
    border: 1px solid #eef2f5;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.review-item:hover { box-shadow: 0 8px 24px rgba(0, 123, 255, 0.08); }

.review-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.review-company { font-size: .95rem; font-weight: 700; color: var(--auth-text); margin: 0 0 3px; }
.review-headline { font-size: .85rem; color: var(--auth-muted); margin: 0; }

.review-stars { display: flex; align-items: center; gap: 3px; font-size: .85rem; color: #f59e0b; }

.review-status {
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.review-status--approved { background: #dcfce7; color: #15803d; }
.review-status--pending { background: #fef9c3; color: #a16207; }
.review-status--rejected { background: #fee2e2; color: #b91c1c; }
.review-status--hold,
.review-status--on_hold { background: #dbeafe; color: #1d4ed8; }

.review-body { font-size: .88rem; color: var(--auth-muted); line-height: 1.6; margin: 0 0 12px; }

.review-item-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.review-date { font-size: .8rem; color: #94a3b8; }

.btn-review-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.btn-edit { background: rgba(0, 123, 255, 0.1); color: var(--auth-accent); }
.btn-edit:hover { background: rgba(0, 123, 255, 0.18); }

.empty-state {
    padding: 48px 28px;
    text-align: center;
    color: var(--auth-muted);
}

.empty-state i { font-size: 3rem; color: #cbd5e1; margin-bottom: 16px; display: block; }
.empty-state p { margin: 0 0 20px; }

/* Review Q&A toggle */
.review-qa-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 8px 18px;
    background: rgba(0, 123, 255, 0.08);
    color: var(--auth-accent);
    border: 1.5px solid rgba(0, 123, 255, 0.25);
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

.review-qa-toggle-btn:hover {
    background: var(--auth-accent);
    color: #fff;
    border-color: var(--auth-accent);
}

.review-qa-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height .35s ease, opacity .3s ease;
    opacity: 0;
}

.review-qa-body.open { max-height: 2000px; opacity: 1; }

.review-company-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--auth-accent);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}

.review-qa-item {
    background: #f9fafb;
    border-left: 3px solid var(--auth-accent);
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
}

.review-qa-item .qa-q {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
    font-size: .875rem;
}

.review-qa-item .qa-q i { color: var(--auth-accent); margin-right: 6px; }

.review-qa-item .qa-a {
    color: #4b5563;
    line-height: 1.65;
    font-size: .875rem;
    padding-left: 22px;
}

.btn-review-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--auth-gradient);
    color: #fff;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

.btn-review-edit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.25);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
    max-width: 340px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast--success { background: #16a34a; }
.toast--error { background: var(--auth-error); }

@media (max-width: 600px) {
    .auth-card { padding: 32px 20px; }
    .profile-card form { padding: 20px 16px; }
    .profile-card-header { padding: 16px 20px; }
    .reviews-list { padding: 8px 16px 20px; }
}
