/*=========================================================
   ApnaShops — Modern Auth Pages (Login / Register)
   Aesthetic: warm-teal ecommerce, Swiggy/Zomato/Blinkit feel
   ========================================================= */

:root {
    --auth-primary: #0f766e;
    --auth-primary-dark: #134e4a;
    --auth-primary-light: #14b8a6;
    --auth-accent: #f59e0b;
    --auth-accent-dark: #d97706;
    --auth-coral: #fb7185;
    --auth-ink: #0f172a;
    --auth-ink-2: #334155;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-bg: #fbfaf7;
    --auth-surface: #ffffff;
    --auth-danger: #ef4444;
    --auth-success: #10b981;
    --auth-radius-lg: 24px;
    --auth-radius-md: 16px;
    --auth-radius-sm: 12px;
    --auth-radius-pill: 999px;
    --auth-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --auth-shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --auth-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --auth-shadow-primary: 0 12px 28px rgba(15, 118, 110, 0.30);
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Base reset for auth pages */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.auth-body * {
    box-sizing: border-box;
}

/* =========================================================
   Split-screen layout
   ========================================================= */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .auth-shell {
        grid-template-columns: 5fr 6fr;
    }
}

/* =========================================================
   LEFT — Brand / Marketing side
   ========================================================= */
.auth-brand {
    display: none;
    position: relative;
    background: linear-gradient(135deg, #0f766e 0%, #0d5f5a 45%, #134e4a 100%);
    color: #fff;
    padding: 48px;
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-brand { display: flex; flex-direction: column; }
}

/* Animated grain texture */
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.5;
    pointer-events: none;
}

.auth-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    animation: fadeInDown 0.7s ease both;
}

.auth-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    display: grid;
    place-items: center;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.auth-brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
}
.auth-brand-name span { color: #fbbf24; }

.auth-brand-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 24px;
    animation: fadeInUp 0.7s 0.1s ease both;
}
.auth-brand-eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399; box-shadow: 0 0 12px #34d399;
    animation: pulse-dot 1.6s infinite;
}

.auth-brand-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 3.4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    animation: fadeInUp 0.7s 0.15s ease both;
}
.auth-brand-title em {
    font-style: normal;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-brand-lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    max-width: 440px;
    margin: 0 0 36px;
    animation: fadeInUp 0.7s 0.25s ease both;
}

.auth-perks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    animation: fadeInUp 0.7s 0.35s ease both;
}
.auth-perk {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    transition: transform 0.35s ease, background 0.35s ease;
}
.auth-perk:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
}
.auth-perk-ico {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
    display: grid; place-items: center;
    font-size: 18px;
    margin-bottom: 10px;
}
.auth-perk-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}
.auth-perk-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Floating animated blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.55;
    border-radius: 50%;
    pointer-events: none;
    animation: floatBlob 14s infinite ease-in-out alternate;
}
.blob-1 { width: 380px; height: 380px; background: #14b8a6; top: -80px; right: -100px; }
.blob-2 { width: 320px; height: 320px; background: #f59e0b; bottom: -80px; left: -80px; animation-delay: -6s; }
.blob-3 { width: 240px; height: 240px; background: #6366f1; top: 40%; right: 20%; opacity: 0.28; animation-delay: -10s; }

/* Floating illustrated cards */
.brand-illust {
    position: absolute;
    right: 40px;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2;
    animation: fadeInUp 0.9s 0.45s ease both;
}
.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--auth-ink);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    animation: floatCard 5s infinite ease-in-out alternate;
    max-width: 260px;
}
.brand-chip:nth-child(2) { animation-delay: -1.5s; margin-left: 40px; }
.brand-chip:nth-child(3) { animation-delay: -3s; }
.brand-chip .emoji {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #fef3c7;
    display: grid; place-items: center;
    font-size: 18px;
}
.brand-chip .txt-1 { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; line-height: 1.1; }
.brand-chip .txt-2 { font-size: 0.75rem; color: var(--auth-muted); margin-top: 2px; }

/* =========================================================
   RIGHT — Form side
   ========================================================= */
.auth-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
}
@media (min-width: 768px) {
    .auth-form-side { padding: 48px 40px; }
}

/* Mobile brand strip */
.auth-mobile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0 12px;
    margin-bottom: 20px;
    position: relative;
    animation: fadeInDown 0.6s ease both;
}
@media (min-width: 992px) {
    .auth-mobile-hero { display: none; }
}
.auth-mobile-hero .mobile-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem;
    color: var(--auth-ink);
}
.auth-mobile-hero .mobile-brand span { color: var(--auth-accent); }
.auth-mobile-hero .mobile-brand .m-logo {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    display: grid; place-items: center; color: #fff; font-size: 18px;
    box-shadow: var(--auth-shadow-primary);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow-md);
    padding: 36px 32px;
    animation: cardEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (min-width: 992px) {
    .auth-card { max-width: 500px; padding: 44px 44px; }
}
.auth-card--wide { max-width: 560px; }
@media (min-width: 992px) {
    .auth-card--wide { max-width: 580px; }
}

.auth-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.9rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 8px;
    color: var(--auth-ink);
}
.auth-subtitle {
    font-size: 0.95rem;
    color: var(--auth-muted);
    margin: 0 0 28px;
}

/* Role selector — segmented pills */
.role-group {
    margin-bottom: 20px;
}
.role-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--auth-muted);
    margin-bottom: 10px;
}
.role-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: var(--auth-radius-md);
}
.role-option {
    position: relative;
    padding: 12px 8px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--auth-ink-2);
    background: transparent;
    border: none;
    transition: all 0.25s ease;
    user-select: none;
}
.role-option .role-ico {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}
.role-option:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--auth-primary);
}
.role-option:hover .role-ico {
    transform: scale(1.15);
}
.role-option.is-active {
    background: #ffffff;
    color: var(--auth-primary);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.15), 0 1px 2px rgba(0,0,0,0.05);
}
.role-option.is-active .role-ico {
    transform: scale(1.1);
}

/* Field group with floating label */
.field {
    position: relative;
    margin-bottom: 16px;
}
.field-input,
.field-select {
    width: 100%;
    padding: 20px 16px 8px;
    font-size: 0.98rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--auth-ink);
    background: #ffffff;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}
.field-input:hover,
.field-select:hover {
    border-color: #cbd5e1;
}
.field-input:focus,
.field-select:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    background: #ffffff;
}
.field-input::placeholder {
    color: transparent;
}
.field-label {
    position: absolute;
    left: 16px;
    top: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-muted);
    pointer-events: none;
    transition: transform 0.2s ease, color 0.2s ease, font-size 0.2s ease;
    background: transparent;
    padding: 0 2px;
}
.field-input:focus + .field-label,
.field-input:not(:placeholder-shown) + .field-label,
.field-select:focus + .field-label,
.field-select:not([data-empty]) + .field-label {
    transform: translateY(-10px);
    font-size: 0.72rem;
    color: var(--auth-primary);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.field-select {
    padding-right: 40px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

/* Icon toggle button inside field (password) */
.field-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: grid; place-items: center;
    transition: color 0.2s ease, background 0.2s ease;
}
.field-toggle:hover { color: var(--auth-primary); background: rgba(15, 118, 110, 0.08); }

/* Field with prefix (phone +91) */
.field--prefix .field-input { padding-left: 60px; }
.field-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--auth-ink-2);
    font-size: 0.95rem;
    pointer-events: none;
}
.field--prefix .field-label { left: 60px; }

/* 2-col grid */
.field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 14px;
    margin-bottom: 16px;
}
@media (min-width: 576px) {
    .field-grid { grid-template-columns: 1fr 1fr; }
}
.field-grid > .field { margin-bottom: 0; }

/* Buttons */
.btn-auth-primary {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    border: none;
    border-radius: var(--auth-radius-pill);
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}
.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 118, 110, 0.42);
}
.btn-auth-primary:active {
    transform: translateY(0) scale(0.99);
}
.btn-auth-primary::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.28), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}
.btn-auth-primary:hover::after { left: 130%; }
.btn-auth-primary .arr {
    display: inline-block;
    transition: transform 0.25s ease;
}
.btn-auth-primary:hover .arr { transform: translateX(4px); }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
    color: var(--auth-muted);
    font-size: 0.8rem;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* Secondary link / footer */
.auth-footer-note {
    margin-top: 22px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.92rem;
}
.auth-footer-note a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
    position: relative;
}
.auth-footer-note a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--auth-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.auth-footer-note a:hover::after { transform: scaleX(1); }

/* Back-to-home floating link */
.auth-back {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    color: var(--auth-ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--auth-border);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 10;
}
.auth-back:hover {
    background: #fff;
    transform: translateX(-2px);
    color: var(--auth-primary);
}

/* Location card */
.loc-card {
    margin-top: 6px;
    padding: 18px;
    background: linear-gradient(135deg, #ecfeff 0%, #f0fdfa 100%);
    border: 1px dashed rgba(14, 165, 233, 0.35);
    border-radius: var(--auth-radius-md);
    text-align: center;
    transition: all 0.3s ease;
}
.loc-card h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--auth-ink);
    margin: 0 0 10px;
}
.loc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    color: var(--auth-primary);
    border: 1.5px solid var(--auth-primary);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.loc-btn:hover {
    background: var(--auth-primary);
    color: #fff;
    transform: translateY(-2px);
}
.loc-status {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--auth-muted);
}

/* Flash message container */
.auth-flash {
    max-width: 480px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--auth-radius-sm);
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.4s ease both;
}
.auth-flash.success { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.auth-flash.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* =========================================================
   Animations
   ========================================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes floatBlob {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.08); }
}
@keyframes floatCard {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.5; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Very small screens tuning */
@media (max-width: 380px) {
    .auth-card { padding: 28px 20px; }
    .auth-title { font-size: 1.55rem; }
    .role-option { font-size: 0.78rem; padding: 10px 4px; }
    .role-option .role-ico { font-size: 18px; }
}
