/* ============================================================
   Tabyon B2B — Auth Page Styles
   Colors: Yellow #FFD000 | Blue #01659A
   Layout: Split-screen (brand panel left, form right)
   ============================================================ */

:root {
    --yellow:       #FFD000;
    --yellow-dark:  #e6bb00;
    --yellow-light: #fff4b3;
    --blue:         #01659A;
    --blue-dark:    #014f78;
    --blue-light:   #e6f3fa;
    --white:        #ffffff;
    --gray-50:      #f9fafb;
    --gray-100:     #f3f4f6;
    --gray-200:     #e5e7eb;
    --gray-400:     #9ca3af;
    --gray-600:     #4b5563;
    --gray-800:     #1f2937;
    --error:        #dc2626;
    --error-bg:     #fef2f2;
    --success:      #16a34a;
    --success-bg:   #f0fdf4;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.07);
    --shadow-lg:    0 10px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);
    --radius:       12px;
    --radius-lg:    20px;
    --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Wrapper ──────────────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   BRAND PANEL (left 42%)
   ============================================================ */
.brand-panel {
    position: relative;
    width: 42%;
    background: linear-gradient(145deg, var(--blue-dark) 0%, var(--blue) 55%, #0284c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    overflow: hidden;
    flex-shrink: 0;
}

/* Decorative background shapes */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 208, 0, 0.08);
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.brand-content {
   /* position: relative;*/
   position:absolute;
   top:117px;
    z-index: 1;
    max-width: 380px;
    width: 100%;
}

/* Logo */
.brand-logo {
    margin-bottom: 40px;
}

.logo-img {
    width: 200px;
    height: auto;
    filter: brightness(0) invert(1);  /* makes logo white on blue bg */
}

/* Fallback text logo if image fails */
.logo-text-fallback {
    display: none;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo-text-fallback span {
    color: var(--yellow);
}

.logo-img.errored + .logo-text-fallback { display: block; }

/* Tagline */
.brand-tagline {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.brand-tagline span {
    color: var(--yellow);
}

.brand-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Feature list */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.90);
    font-size: 0.95rem;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--gray-800);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Floating deco circles */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.deco-circle-1 {
    width: 180px;
    height: 180px;
    top: 60px;
    right: 40px;
    border: 1px solid rgba(255, 208, 0, 0.20);
}

.deco-circle-2 {
    width: 100px;
    height: 100px;
    top: 100px;
    right: 80px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.deco-circle-3 {
    width: 260px;
    height: 260px;
    bottom: 40px;
    left: -80px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ============================================================
   FORM PANEL (right 58%)
   ============================================================ */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--white);
    min-height: 100vh;
    position: relative;
}

.form-container {
    width: 100%;
    max-width: 440px;
}

/* Mobile logo (hidden on desktop) */
.mobile-logo {
    display: none;
    margin-bottom: 28px;
    text-align: center;
}

.logo-img-mobile {
    width: 160px;
    margin: 0 auto;
}

/* ── Auth Tabs ───────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 32px;
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-600);
    border-radius: calc(var(--radius) - 4px);
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    background: var(--white);
    color: var(--blue);
    box-shadow: var(--shadow-sm);
}

/* ── Form Header ─────────────────────────────────────────── */
.form-header {
    margin-bottom: 28px;
}

.form-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.4px;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* ── Auth Forms ──────────────────────────────────────────── */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 0;
    animation: slideIn 0.3s var(--transition) both;
}

.auth-form.active {
    display: flex;
}

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

/* ── Form Groups ─────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* ── Input Wrapper ───────────────────────────────────────── */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 42px 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

.input-wrapper input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(1, 101, 154, 0.12);
}

.input-wrapper input.is-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.input-wrapper input.is-valid {
    border-color: var(--success);
}

.input-wrapper select {
    width: 100%;
    padding: 11px 42px 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.input-wrapper select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(1, 101, 154, 0.12);
}

.input-wrapper select option[value=""] {
    color: var(--gray-400);
}

/* Tags multi-select */
.tags-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-option {
    cursor: pointer;
    margin: 0;
}

.tag-option input[type="checkbox"] {
    display: none;
}

.tag-option .tag-label {
    display: inline-block;
    padding: 6px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--gray-600);
    background: var(--white);
    transition: all var(--transition);
    user-select: none;
}

.tag-option .tag-label:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.tag-option input[type="checkbox"]:checked + .tag-label {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

/* Input icon (right side) */
.input-icon {
    position: absolute;
    right: 12px;
    color: var(--gray-400);
    font-size: 0.95rem;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Password toggle button */
.toggle-password {
    position: absolute;
    right: 10px;
    padding: 4px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--blue);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Field Errors ────────────────────────────────────────── */
.field-error {
    font-size: 0.8rem;
    color: var(--error);
    min-height: 18px;
    display: block;
}

/* ── Password Strength ───────────────────────────────────── */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -2px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 99px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.strength-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* ── Form Options (remember + forgot) ───────────────────── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

.forgot-link {
    color: var(--blue);
    font-weight: 500;
    transition: color var(--transition);
}

.forgot-link:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

/* ── Alert Banner ────────────────────────────────────────── */
.form-alert {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
    border-left: 3px solid transparent;
}

.form-alert.alert-error {
    display: block;
    background: var(--error-bg);
    color: var(--error);
    border-left-color: var(--error);
}

.form-alert.alert-success {
    display: block;
    background: var(--success-bg);
    color: var(--success);
    border-left-color: var(--success);
}

/* ── Primary Button ──────────────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 13px 24px;
    background: var(--yellow);
    color: var(--gray-800);
    font-size: 0.975rem;
    font-weight: 700;
    border-radius: var(--radius);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.01em;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-primary:hover {
    background: var(--yellow-dark);
    box-shadow: 0 4px 16px rgba(255, 208, 0, 0.40);
    transform: translateY(-1px);
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.3);
    border-top-color: var(--gray-800);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-loader.hidden { display: none; }

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

/* ── Form Switch ─────────────────────────────────────────── */
.form-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.form-switch button {
    color: var(--blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition);
}

.form-switch button:hover {
    color: var(--blue-dark);
}

/* ── Footer ──────────────────────────────────────────────── */
.form-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-400);
}
   .form-panel {
            position: relative;
        }

        .language-switcher {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 100;
        }

        .language-select {
            padding: 8px 12px;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            background-color: white;
            color: #333;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .language-select:hover {
            border-color: #ffd000;
            box-shadow: 0 2px 8px rgba(255, 208, 0, 0.1);
        }

        .language-select:focus {
            outline: none;
            border-color: #ffd000;
            box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.2);
        }
/* ============================================================
   RESPONSIVE — Tablet (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    .brand-panel {
        width: 38%;
        padding: 48px 36px;
    }

    .brand-tagline { font-size: 1.4rem; }
    .logo-img { width: 160px; }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 680px)
   Split becomes single column: form only, logo on top
   ============================================================ */
@media (max-width: 680px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .brand-panel {
        display: none;   /* hidden; replaced by mobile-logo */
    }

    .form-panel {
        padding: 40px 24px 80px;
        justify-content: flex-start;
        min-height: 100vh;
    }

    .mobile-logo {
        display: block;
    }

    .form-container {
        max-width: 100%;
    }

    .form-header h1 { font-size: 1.5rem; }
}

/* ============================================================
   RESPONSIVE — Small Mobile (≤ 380px)
   ============================================================ */
@media (max-width: 380px) {
    .form-panel { padding: 32px 16px 80px; }
    .btn-primary { padding: 12px 20px; }
    .auth-tabs { margin-bottom: 24px; }
}
