/* ══════════════════════════════════════
   AUTH v2 — Login & Register
══════════════════════════════════════ */

.auth-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #f4f6f8;
}

.auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-bg-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 40%, rgba(124, 179, 66, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 20%, rgba(59, 130, 246, 0.08), transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 90%, rgba(16, 185, 129, 0.06), transparent 45%);
}

.auth-bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
}

@media (max-width: 1023px) {
    .auth-shell { grid-template-columns: 1fr; }
}

/* ── Left showcase ── */
.auth-showcase {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3.5rem;
    background: linear-gradient(155deg, #0c1f12 0%, #143d24 38%, #1a5230 70%, #0f2e1a 100%);
    position: relative;
    overflow: hidden;
}

.auth-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 179, 66, 0.25), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06), transparent 40%);
    pointer-events: none;
}

.auth-showcase::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, black, transparent 95%);
    pointer-events: none;
}

@media (max-width: 1023px) {
    .auth-showcase { display: none; }
}

.auth-showcase-inner {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    animation: authFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.auth-brand:hover { transform: translateX(4px); }

.auth-brand-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 6px;
}
.auth-brand-icon img { width: 100%; height: 100%; object-fit: contain; }

.auth-brand-text {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-brand-text span { color: #a5d66a; }

/* Card mockup */
.auth-visual {
    position: relative;
    height: 140px;
    margin-bottom: 2rem;
}

.auth-visual-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(124, 179, 66, 0.35), transparent 70%);
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    filter: blur(30px);
}

.auth-mock-stack {
    position: relative;
    width: 220px;
    height: 130px;
    margin: 0 auto;
}

.auth-mock-card {
    position: absolute;
    width: 200px;
    height: 115px;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-mock-back {
    top: 12px;
    left: 28px;
    background: linear-gradient(135deg, #2d5a3d, #1e3d2a);
    transform: rotate(8deg);
    opacity: 0.7;
    padding: 16px;
}

.auth-mock-bar {
    width: 40px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 12px;
}

.auth-mock-lines span {
    display: block;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    margin-bottom: 8px;
}

.auth-mock-lines span.short { width: 60%; }

.auth-mock-front {
    top: 0;
    left: 10px;
    background: linear-gradient(145deg, #ffffff, #f0fdf4);
    transform: rotate(-4deg);
    padding: 18px 20px;
    animation: authCardFloat 5s ease-in-out infinite;
}

@keyframes authCardFloat {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-8px); }
}

.auth-mock-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #7CB342, #558B2F);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.auth-mock-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
}

.auth-mock-sub {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 600;
}

.auth-headline {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    letter-spacing: -0.03em;
}

.auth-headline em {
    font-style: normal;
    color: #b8e986;
}

.auth-subline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
    margin: 0 0 1.75rem;
}

.auth-feature-list {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: background 0.3s ease, transform 0.3s ease;
}

.auth-feature-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(6px);
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(124, 179, 66, 0.2);
    color: #b8e986;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.auth-feature-list strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}

.auth-feature-list small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

.auth-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-stat {
    flex: 1;
    min-width: 90px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    text-align: center;
}

.auth-stat-num {
    font-size: 1.25rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.auth-stat-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 5px;
}

/* ── Right form panel ── */
.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 2.5rem;
    min-height: 100vh;
}

.auth-main-top {
    width: 100%;
    max-width: 440px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.auth-back-link:hover {
    color: #7CB342;
    border-color: rgba(124, 179, 66, 0.35);
    transform: translateX(-3px);
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    color: #1e293b;
    font-size: 1rem;
}

.auth-mobile-brand strong { color: #7CB342; font-weight: 900; }

.auth-mobile-brand-icon {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 900;
    overflow: hidden;
    padding: 4px;
}
.auth-mobile-brand-icon img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 1023px) {
    .auth-mobile-brand { display: inline-flex; }
}

.auth-form-wrap {
    width: 100%;
    max-width: 440px;
    animation: authSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form-card {
    background: #fff;
    border-radius: 24px;
    padding: 2rem 1.85rem 1.75rem;
    border: 1px solid #e8ecf0;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 40px rgba(15, 23, 42, 0.08);
}

.auth-form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f0fdf4;
    border: 1px solid rgba(124, 179, 66, 0.25);
    color: #3d7a1e;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.auth-form-badge-register {
    background: #eff6ff;
    border-color: rgba(59, 130, 246, 0.25);
    color: #1d4ed8;
}

.auth-form-header h1 {
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 0.35rem;
    letter-spacing: -0.03em;
}

.auth-form-header p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* OAuth */
.auth-oauth-block {
    margin-bottom: 0.25rem;
}

.auth-oauth-heading {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.75rem;
}

.auth-oauth-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 400px) {
    .auth-oauth-grid { grid-template-columns: 1fr; }
}

.auth-oauth-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 16px;
    border: 1.5px solid #e8ecf0;
    background: #fafbfc;
    text-decoration: none;
    transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    min-height: 88px;
}

button.auth-oauth-item {
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

button.auth-oauth-item:disabled {
    opacity: 0.75;
    cursor: wait;
}

.auth-oauth-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.auth-oauth-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.auth-oauth-item span {
    font-size: 0.72rem;
    font-weight: 800;
    color: #334155;
    text-align: center;
    line-height: 1.2;
}

.auth-oauth-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.auth-oauth-google:hover {
    border-color: #ea4335;
    background: #fff;
}

.auth-oauth-paki:hover {
    border-color: #0d7a32;
    background: #f0fdf4;
}

.auth-oauth-rehan:hover {
    border-color: #1d4ed8;
    background: #eff6ff;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 1.35rem 0 1.25rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8ecf0;
}

.auth-divider span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* Form fields */
.auth-form .auth-field {
    margin-bottom: 1rem;
}

.auth-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 1;
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: #7CB342;
}

.auth-input {
    width: 100%;
    padding: 0.82rem 1rem 0.82rem 2.65rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.25s ease;
}

.auth-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.auth-input:focus {
    border-color: #7CB342;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.15);
}

.auth-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.9rem 1.5rem;
    margin-top: 0.35rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #7CB342 0%, #558B2F 100%);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(124, 179, 66, 0.35);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(124, 179, 66, 0.42);
}

.auth-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-btn-default,
.auth-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-btn-loading { display: none !important; }
.auth-btn.is-loading .auth-btn-default { display: none !important; }
.auth-btn.is-loading .auth-btn-loading { display: inline-flex !important; }

.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin: 1.35rem 0 0;
}

.auth-switch a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #7CB342;
    font-weight: 800;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-switch a:hover {
    color: #558B2F;
    transform: translateX(3px);
}

.auth-trust-row {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 0.25rem;
}

.auth-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
}

.auth-trust-row i {
    color: #7CB342;
    font-size: 0.68rem;
}

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

@media (max-width: 480px) {
    .auth-form-card { padding: 1.65rem 1.25rem 1.5rem; }
    .auth-row-2 { grid-template-columns: 1fr; }
}

/* ── Admin login (unchanged layout) ── */
.auth-admin {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 35%, #faf5ff 60%, #f8fafc 100%);
}

.auth-admin .auth-bg-mesh {
    background:
        radial-gradient(ellipse 80% 60% at 15% 40%, rgba(99, 102, 241, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 20%, rgba(124, 58, 237, 0.1), transparent 50%);
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    gap: 0;
}

.auth-wrap-single {
    grid-template-columns: 1fr;
    max-width: 480px;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2.25rem 2rem;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.1);
}

.auth-card-admin {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.12);
}

.auth-card-head { text-align: center; margin-bottom: 1.75rem; }

.auth-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(124, 179, 66, 0.12), rgba(124, 179, 66, 0.04));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #7CB342;
}

.auth-card-icon-admin {
    background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
    color: #fff !important;
}

.auth-card-title {
    font-size: 1.65rem;
    font-weight: 900;
    color: #111827;
    margin-bottom: 0.35rem;
}

.auth-card-desc { font-size: 0.875rem; color: #64748b; }

.auth-btn-admin {
    background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
}

.auth-btn-admin:hover:not(:disabled) {
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.45);
}

.auth-admin .auth-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.auth-admin .auth-input-wrap:focus-within .auth-input-icon { color: #6366f1; }

.auth-chips-center { justify-content: center; margin-top: 1.25rem; }

.auth-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1.5rem;
    justify-content: center;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0fdf4;
    border: 1px solid rgba(124, 179, 66, 0.2);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #15803d;
}

.auth-hint {
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 1rem;
}

.auth-hint strong { color: #6366f1; }

/* ── Success overlay (login) ── */
.auth-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    backdrop-filter: blur(6px);
    animation: authSuccessFadeIn 0.35s ease;
}

.auth-success-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 44px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(5, 150, 105, 0.22);
    border: 2px solid #10b981;
    min-width: 280px;
    animation: authSuccessPop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d399, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.35);
    animation: authSuccessPulse 0.7s ease;
}

.auth-success-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #065f46;
    margin: 0 0 6px;
}

.auth-success-text {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 20px;
}

.auth-success-bar {
    height: 4px;
    background: #d1fae5;
    border-radius: 999px;
    overflow: hidden;
}

.auth-success-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 999px;
    animation: authSuccessProgress 1.4s ease forwards;
}

@keyframes authSuccessFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes authSuccessPop {
    0% { opacity: 0; transform: scale(0.85) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes authSuccessPulse {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes authSuccessProgress {
    from { width: 0; }
    to { width: 100%; }
}

.auth-back-home {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.auth-bg-grid,
.auth-orb,
.auth-orb-1,
.auth-orb-2,
.auth-orb-3 { display: none; }