/* ═══════════════════════════════════════════════════════════════════════════
   TRADEFLOW AUTH DESIGN SYSTEM
   "Gelenekten gelen güven, dijitalde zirve"
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary-emerald: #0F2A22;
    --primary-emerald-light: #0F3D2E;
    --gold: #D4AF70;
    --gold-hover: #C49B5A;
    --gold-light: #E8D5B0;
    --gold-glow: rgba(212, 175, 112, 0.25);
    --ivory: #F4F3EF;
    --cream: #FAF9F6;
    --pearl: #F0EDE6;
    --navy: #0A1F33;
    --steel: #5F7D99;
    --text-primary: #2C3E50;
    --text-muted: #6B7C8A;
    --border-radius: 12px;
    --shadow-soft: 0 4px 24px -4px rgba(15, 42, 34, 0.12);
    --shadow-gold: 0 4px 20px -4px rgba(212, 175, 112, 0.35);
    --shadow-elevated: 0 20px 60px -15px rgba(15, 42, 34, 0.25);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    background: var(--primary-emerald);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ═══ LAYOUT ═══ */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Brand Panel */
.auth-brand {
    flex: 1;
    background: linear-gradient(160deg, var(--primary-emerald) 0%, var(--primary-emerald-light) 50%, var(--navy) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, var(--gold-glow) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

/* Flow Lines */
.flow-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.08;
}

.flow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
    animation: flowMove 12s linear infinite;
}

.flow-line:nth-child(1) {
    top: 25%;
    width: 60%;
    left: -20%;
    animation-delay: 0s;
}

.flow-line:nth-child(2) {
    top: 50%;
    width: 80%;
    left: -40%;
    animation-delay: 2s;
}

.flow-line:nth-child(3) {
    top: 75%;
    width: 70%;
    left: -30%;
    animation-delay: 4s;
}

@keyframes flowMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(200%);
    }
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 480px;
}

.brand-logo {
    margin-bottom: 3rem;
}

.brand-logo img {
    height: 100px;
    filter: brightness(0) invert(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.brand-tagline {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--ivory);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.brand-tagline .gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-description {
    font-size: 1rem;
    color: var(--pearl);
    opacity: 0.8;
    line-height: 1.7;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.trust-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(212, 175, 112, 0.1);
    border: 1px solid rgba(212, 175, 112, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.25rem;
}

.trust-badge-label {
    font-size: 0.75rem;
    color: var(--pearl);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Form Panel */
.auth-form-panel {
    flex: 1;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
}

.auth-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(15, 42, 34, 0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.auth-card--register {
    max-width: 560px;
}

.auth-header {
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-emerald);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.form-row>.form-group {
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-emerald);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--steel);
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    background: white;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.input-wrapper input::placeholder {
    color: var(--steel);
    opacity: 0.6;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: var(--shadow-soft), 0 0 0 4px var(--gold-glow);
}

.input-wrapper:focus-within i {
    color: var(--gold);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
}

.checkbox-wrapper a {
    color: var(--gold-hover);
    font-weight: 600;
    text-decoration: none;
}

.forgot-link {
    color: var(--gold-hover);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--gold);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
    color: var(--primary-emerald);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -4px rgba(212, 175, 112, 0.5);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 42, 34, 0.1), transparent);
}

.auth-divider span {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-emerald);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--gold);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-elevated);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hide {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.toast.success .toast-icon {
    background: rgba(46, 125, 90, 0.1);
    color: #2E7D5A;
}

.toast.error .toast-icon {
    background: rgba(181, 74, 74, 0.1);
    color: #B54A4A;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-emerald);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.5;
    transition: var(--transition);
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pearl);
}

.toast-progress-bar {
    height: 100%;
    background: var(--gold);
    animation: progress linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .auth-brand {
        padding: 3rem;
    }

    .brand-tagline {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-brand {
        padding: 3rem 2rem;
        min-height: auto;
    }

    .brand-logo img {
        height: 70px;
    }

    .brand-tagline {
        font-size: 1.5rem;
    }

    .brand-description {
        display: none;
    }

    .trust-badges {
        margin-top: 2rem;
    }

    .trust-badge-icon {
        width: 40px;
        height: 40px;
    }

    .auth-form-panel {
        padding: 2rem 1.5rem 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .phone-input-container {
        width: 100%;
    }

    .country-selector {
        min-width: 100px;
        flex-shrink: 0;
    }

    .phone-number-input {
        min-width: 0;
        flex: 1;
    }

    .city-selector-container,
    .city-selector-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-brand {
        padding: 2rem 1.5rem;
    }

    .brand-logo {
        margin-bottom: 1.5rem;
    }

    .brand-tagline {
        font-size: 1.25rem;
    }

    .trust-badges {
        gap: 1rem;
    }

    .trust-badge-label {
        font-size: 0.65rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
    }
}