/* ============================================
   AFRI SOKO CONNECT - PREMIUM LOGIN UI
   Standalone Auth Stylesheet
   Brand Colors: #caa033, #ead56c, #243b19, #fed923, #986a1c, #43621a, #a4a965, #ede32b, #5f390a
   ============================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
    --auth-bg: #0a0f07;
    --auth-card: #ffffff;
    --auth-text: #1a2410;
    --auth-muted: #6b705c;
    --auth-input-bg: #f9f7ed;
    --auth-input-border: #e0d9b8;
    --auth-error-bg: #fff5f0;
    --auth-error-text: #b64516;
    --auth-error-border: #f0c8a0;
    
    --brand-gold: #caa033;
    --brand-gold-light: #ead56c;
    --brand-green-dark: #243b19;
    --brand-yellow: #fed923;
    --brand-brown: #986a1c;
    --brand-green: #43621a;
    --brand-olive: #a4a965;
    --brand-yellow-bright: #ede32b;
    --brand-brown-dark: #5f390a;
    
    --gradient-hero: linear-gradient(160deg, #243b19 0%, #1a2e0f 25%, #0d1a06 50%, #1a2e0f 75%, #243b19 100%);
    --gradient-gold: linear-gradient(135deg, #caa033 0%, #fed923 50%, #ead56c 100%);
    --gradient-submit: linear-gradient(135deg, #caa033 0%, #fed923 60%, #ead56c 100%);
    --gradient-submit-hover: linear-gradient(135deg, #986a1c 0%, #caa033 50%, #ede32b 100%);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-card: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(234, 213, 108, 0.15);
    --shadow-input-focus: 0 0 0 4px rgba(202, 160, 51, 0.2);
    --shadow-submit: 0 8px 30px rgba(202, 160, 51, 0.45);
    --shadow-submit-hover: 0 14px 40px rgba(202, 160, 51, 0.6);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- RESET ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------- AUTH BODY ---------- */
.auth-body {
    background: var(--auth-bg);
    font-family: 'Open Sans', 'Lato', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated background pattern */
.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(202, 160, 51, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(67, 98, 26, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(254, 217, 35, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(234, 213, 108, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle grid pattern */
.auth-body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ---------- AUTH CONTAINER ---------- */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1050px;
    min-height: 620px;
    background: var(--auth-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 1;
}

/* ============================================
   LEFT: HERO PANEL
   ============================================ */
.login-hero {
    background: var(--gradient-hero);
    color: #f0f4e8;
    padding: 50px 44px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-hero__bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(254, 217, 35, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(202, 160, 51, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.login-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Brand */
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.login-brand__logo {
    flex-shrink: 0;
}

.login-brand__logo img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    padding: 5px;
    object-fit: contain;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(234, 213, 108, 0.5);
}

.login-brand__text h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 2px;
}

.login-brand__text span {
    font-size: 0.75rem;
    color: rgba(240, 244, 232, 0.6);
    letter-spacing: 0.5px;
    font-family: 'Lato', sans-serif;
}

/* Hero Title */
.login-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(to right, #ffffff, #fed923);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-hero__desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(240, 244, 232, 0.72);
    margin-bottom: 40px;
    font-weight: 400;
}

/* Features */
.login-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border-left: 3px solid #fed923;
    transition: all var(--transition-smooth);
}

.login-feature:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.login-feature__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: rgba(254, 217, 35, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fed923;
}

.login-feature__text h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fed923;
    margin-bottom: 4px;
}

.login-feature__text p {
    font-size: 0.82rem;
    color: rgba(240, 244, 232, 0.6);
    line-height: 1.5;
}

/* Decorative Orbs */
.login-hero__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-hero__orb--1 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(254, 217, 35, 0.12) 0%, transparent 70%);
    top: -60px;
    right: -80px;
}

.login-hero__orb--2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(234, 213, 108, 0.1) 0%, transparent 70%);
    bottom: -40px;
    left: -50px;
}

.login-hero__orb--3 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(202, 160, 51, 0.15) 0%, transparent 70%);
    top: 40%;
    right: 30px;
}

/* ============================================
   RIGHT: LOGIN FORM PANEL
   ============================================ */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
    overflow-y: auto;
}

.login-panel__inner {
    width: 100%;
    max-width: 380px;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(202, 160, 51, 0.15), rgba(254, 217, 35, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    color: #986a1c;
    border: 2px solid rgba(202, 160, 51, 0.3);
}

.login-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #1a2410;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.9rem;
    color: #6b705c;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Fields */
.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: #4a5038;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-field label i {
    font-size: 0.85rem;
    color: #986a1c;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    background: var(--auth-input-bg);
    border: 1.5px solid var(--auth-input-border);
    border-radius: var(--radius-md);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    color: #1a2410;
    outline: none;
    transition: all var(--transition-smooth);
}

.login-input-wrapper input:focus {
    border-color: #caa033;
    background: #ffffff;
    box-shadow: var(--shadow-input-focus);
}

.login-input-wrapper input::placeholder {
    color: #b5af90;
}

/* Password Toggle */
.login-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #8a8568;
    cursor: pointer;
    padding: 8px;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
}

.login-password-toggle:hover {
    color: #986a1c;
}

/* Error Message */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    border-radius: var(--radius-md);
    color: var(--auth-error-text);
    font-size: 0.85rem;
    font-weight: 600;
    animation: shakeError 0.5s ease;
}

.login-error i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-4px); }
    30%, 70% { transform: translateX(4px); }
}

/* Submit Button */
.login-submit {
    background: var(--gradient-submit);
    color: #1a2410;
    border: none;
    padding: 15px 24px;
    border-radius: var(--radius-md);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-submit);
    transition: all var(--transition-bounce);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-top: 4px;
}

.login-submit:hover {
    background: var(--gradient-submit-hover);
    color: #ffffff;
    box-shadow: var(--shadow-submit-hover);
    transform: translateY(-2px);
}

.login-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(202, 160, 51, 0.3);
}

.login-submit i {
    transition: transform var(--transition-smooth);
}

.login-submit:hover i {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 4px;
}

.login-forgot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b705c;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    padding: 8px 16px;
    border-radius: 20px;
}

.login-forgot:hover {
    color: #986a1c;
    background: rgba(202, 160, 51, 0.08);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (≤900px) */
@media (max-width: 900px) {
    .auth-body {
        padding: 16px;
        align-items: flex-start;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
        height: auto;
        margin: 0 auto;
    }
    
    .login-hero {
        padding: 36px 28px;
        order: 1;
    }
    
    .login-hero h1 {
        font-size: 1.6rem;
    }
    
    .login-hero__desc {
        font-size: 0.88rem;
        margin-bottom: 28px;
    }
    
    .login-features {
        gap: 14px;
    }
    
    .login-feature {
        padding: 12px 14px;
    }
    
    .login-feature__icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    
    .login-feature__text h4 {
        font-size: 0.88rem;
    }
    
    .login-feature__text p {
        font-size: 0.78rem;
    }
    
    .login-panel {
        padding: 32px 28px;
        order: 2;
        overflow-y: visible;
    }
    
    .login-panel__inner {
        max-width: 100%;
    }
    
    .login-header {
        margin-bottom: 28px;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .auth-body {
        padding: 0;
        align-items: flex-start;
    }
    
    .auth-container {
        border-radius: 0;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        max-width: 100%;
    }
    
    .login-hero {
        padding: 28px 20px;
    }
    
    .login-brand {
        gap: 10px;
        margin-bottom: 24px;
    }
    
    .login-brand__logo img {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    
    .login-brand__text h2 {
        font-size: 1.1rem;
    }
    
    .login-brand__text span {
        font-size: 0.7rem;
    }
    
    .login-hero h1 {
        font-size: 1.35rem;
    }
    
    .login-hero__desc {
        font-size: 0.82rem;
        margin-bottom: 24px;
    }
    
    .login-features {
        gap: 10px;
    }
    
    .login-feature {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .login-feature__icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .login-feature__text h4 {
        font-size: 0.82rem;
    }
    
    .login-feature__text p {
        font-size: 0.74rem;
    }
    
    .login-panel {
        padding: 24px 18px;
        overflow-y: visible;
    }
    
    .login-header__icon {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }
    
    .login-header h2 {
        font-size: 1.35rem;
    }
    
    .login-input-wrapper input {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
    
    .login-submit {
        padding: 13px 20px;
        font-size: 0.9rem;
    }
}

/* Large Desktop (≥1200px) */
@media (min-width: 1200px) {
    .auth-container {
        max-width: 1100px;
        min-height: 650px;
    }
    
    .login-hero {
        padding: 60px 52px;
    }
    
    .login-hero h1 {
        font-size: 2.5rem;
    }
    
    .login-panel {
        padding: 50px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .login-submit:hover {
        transform: none;
    }
    
    .login-submit:active {
        transform: scale(0.97);
    }
    
    .login-feature:hover {
        transform: none;
    }
}