/* =========================================================================
   GARCES FRUIT - LOGIN PORTAL DE PRODUCTORES
   Design System based on Figma Design
   ========================================================================= */

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Garces Fruit Brand Colors */
    --gf-primary: #117050;
    --gf-primary-hover: #0d5a40;
    --gf-primary-light: #1a8c64;
    --gf-link-blue: #1379F0;
    --gf-link-blue-hover: #0d5fc7;
    /* Text Colors */
    --gf-text-dark: #181C32;
    --gf-text-gray-900: #2C2D30;
    --gf-text-gray-700: #676A72;
    --gf-text-gray-600: #8E9198;
    /* Background & Border */
    --gf-white: #FFFFFF;
    --gf-gray-300: #DCDDDE;
    --gf-gray-100: #F4F4F4;
    --gf-gray-50: #EEEEEE;
    /* Banner Colors */
    --gf-red-primary: #C41E3A;
    --gf-red-dark: #8B0000;
    --gf-orange-fruit: #F5A623;
    --gf-green-leaf: #117050;
    /* Typography */
    --gf-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Shadows */
    --gf-shadow-input: 0px 1px 2px rgba(0, 0, 0, 0.08);
    --gf-shadow-card: 0px 4px 20px rgba(0, 0, 0, 0.1);
    /* Transitions */
    --gf-transition: 200ms ease-in-out;
}

/* === BASE RESET === */
.login-garces *,
.login-garces *::before,
.login-garces *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === MAIN CONTAINER === */
.login-garces {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    background-color: var(--gf-white);
    font-family: var(--gf-font-family);
    overflow: hidden;
}

/* === LEFT BANNER === */
.login-banner {
    width: 560px;
    min-width: 500px;
    height: 100vh;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.login-banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(139, 0, 0, 0.85) 0%, rgba(196, 30, 58, 0.9) 50%, rgba(196, 30, 58, 0.95) 100%);
    z-index: 1;
}

.login-banner-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.login-banner-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px;
}

/* Decorative Elements */
.banner-decorations {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background-color: var(--gf-gray-100);
    opacity: 0.3;
}

.decoration-circle-1 {
    width: 142px;
    height: 142px;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

.decoration-circle-2 {
    width: 142px;
    height: 142px;
    right: -50px;
    top: 140px;
}

.decoration-circle-3 {
    width: 142px;
    height: 142px;
    right: -50px;
    bottom: 60px;
}

.decoration-circle-4 {
    width: 148px;
    height: 148px;
    left: 44%;
    top: 42%;
}

.decoration-circle-5 {
    width: 148px;
    height: 148px;
    left: 44%;
    top: 17%;
}

/* Fruit Decorations */
.fruit-decoration {
    position: absolute;
    z-index: 3;
}

.fruit-orange {
    width: 152px;
    height: 186px;
}

.fruit-orange-1 {
    left: 43%;
    bottom: 16%;
}

.fruit-orange-2 {
    right: -50px;
    top: 37%;
}

.fruit-orange svg,
.fruit-orange img {
    width: 100%;
    height: 100%;
}

/* Banner Wave/Curve */
.banner-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    z-index: 2;
}

    .banner-wave svg {
        width: 100%;
        height: 100%;
    }

/* Vertical Text */
.banner-vertical-text {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    white-space: nowrap;
    z-index: 4;
}

    .banner-vertical-text h2 {
        font-family: var(--gf-font-family);
        font-weight: 600;
        font-size: 30px;
        line-height: 30px;
        letter-spacing: -0.6px;
        color: var(--gf-white);
        margin: 0;
    }

/* === RIGHT CONTENT (LOGIN FORM) === */
.login-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: var(--gf-white);
    min-height: 100vh;
}

.login-form-container {
    width: 100%;
    max-width: 490px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

/* Logo */
.login-logo {
    width: 100px;
    height: 48px;
}

.login-logo img,
.login-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Form Section */
.login-form-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Title Section */
.login-title-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-title {
    font-family: var(--gf-font-family);
    font-weight: 600;
    font-size: 24px;
    line-height: 24px;
    letter-spacing: -0.24px;
    color: var(--gf-text-dark);
    margin: 0;
}

.login-subtitle {
    font-family: var(--gf-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 22px;
    color: var(--gf-text-gray-700);
    margin: 0;
}

/* Form */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form Group */
.gf-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.gf-form-label {
    font-family: var(--gf-font-family);
    font-weight: 500;
    font-size: 12px;
    line-height: 12px;
    color: var(--gf-text-gray-900);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .gf-form-label .label-icon {
        display: none; /* Hide icons as per Figma design */
    }

/* Input Fields */
.gf-input-wrapper {
    position: relative;
    width: 100%;
}

.gf-form-control {
    width: 100%;
    height: 34px;
    padding: 10px 12px;
    background: var(--gf-white);
    border: 1px solid var(--gf-gray-300);
    border-radius: 6px;
    box-shadow: var(--gf-shadow-input);
    font-family: var(--gf-font-family);
    font-weight: 400;
    font-size: 13px;
    line-height: 14px;
    color: var(--gf-text-gray-900);
    transition: border-color var(--gf-transition), box-shadow var(--gf-transition);
}

    .gf-form-control::placeholder {
        color: var(--gf-text-gray-600);
    }

    .gf-form-control:focus {
        outline: none;
        border-color: var(--gf-primary);
        box-shadow: var(--gf-shadow-input), 0 0 0 3px rgba(17, 112, 80, 0.1);
    }

    .gf-form-control:disabled {
        background-color: var(--gf-gray-50);
        cursor: not-allowed;
        opacity: 0.7;
    }

/* Password Input with Toggle */
.gf-password-wrapper {
    position: relative;
}

    .gf-password-wrapper .gf-form-control {
        padding-right: 40px;
    }

.gf-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--gf-text-gray-900);
    transition: color var(--gf-transition);
}

    .gf-password-toggle:hover {
        color: var(--gf-primary);
    }

    .gf-password-toggle svg {
        width: 16px;
        height: 16px;
    }

/* Forgot Password Link */
.gf-forgot-password {
    font-family: var(--gf-font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 22px;
    color: var(--gf-link-blue);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color var(--gf-transition);
    display: inline-block;
    margin-top: -12px;
    width: auto;
}

    .gf-forgot-password:hover {
        color: var(--gf-link-blue-hover);
        text-decoration: underline;
    }

/* Primary Button */
.gf-btn-primary {
    width: 100%;
    height: 40px;
    padding: 13px 20px;
    background-color: var(--gf-primary);
    border: none;
    border-radius: 99px;
    font-family: var(--gf-font-family);
    font-weight: 500;
    font-size: 13px;
    line-height: 14px;
    letter-spacing: -0.13px;
    color: var(--gf-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color var(--gf-transition), transform var(--gf-transition);
}

    .gf-btn-primary:hover:not(:disabled) {
        background-color: var(--gf-primary-hover);
    }

    .gf-btn-primary:active:not(:disabled) {
        transform: scale(0.98);
    }

    .gf-btn-primary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

    .gf-btn-primary .btn-icon {
        display: none; /* Hide button icons as per Figma */
    }

/* Loading Spinner */
.gf-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--gf-white);
    border-radius: 50%;
    animation: gf-spin 0.8s linear infinite;
}

@keyframes gf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Validation Messages */
.gf-validation-message {
    font-family: var(--gf-font-family);
    font-size: 12px;
    color: #EF4444;
    margin-top: 4px;
}

/* Connection Error */
.gf-connection-error {
    width: 100%;
    padding: 16px;
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.gf-error-icon {
    color: #EF4444;
    flex-shrink: 0;
}

.gf-error-content {
    flex: 1;
}

.gf-error-title {
    font-weight: 600;
    font-size: 14px;
    color: #991B1B;
    margin-bottom: 4px;
}

.gf-error-message {
    font-size: 13px;
    color: #B91C1C;
}

.gf-error-details {
    margin-top: 8px;
    font-size: 12px;
    color: #7F1D1D;
}

.gf-btn-dismiss {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #991B1B;
    border-radius: 4px;
    transition: background-color var(--gf-transition);
}

    .gf-btn-dismiss:hover {
        background-color: rgba(153, 27, 27, 0.1);
    }

/* Reset Password Section */
.gf-reset-header {
    text-align: center;
    margin-bottom: 24px;
}

.gf-back-to-login {
    font-family: var(--gf-font-family);
    font-weight: 500;
    font-size: 14px;
    color: var(--gf-link-blue);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    transition: color var(--gf-transition);
}

    .gf-back-to-login:hover {
        color: var(--gf-link-blue-hover);
    }

    .gf-back-to-login svg {
        width: 16px;
        height: 16px;
    }

/* Language Switcher */
.gf-language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

/* Security Footer - Hidden for cleaner design */
.gf-security-footer {
    display: none;
}

/* === RESPONSIVE DESIGN === */

/* Tablet & Small Desktop */
@media (max-width: 1200px) {
    .login-banner {
        width: 400px;
        min-width: 400px;
    }

    .banner-vertical-text h2 {
        font-size: 24px;
    }

    .fruit-orange {
        width: 120px;
        height: 146px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .login-garces {
        flex-direction: column;
    }

    .login-banner {
        width: 100%;
        min-width: 100%;
        height: 200px;
        min-height: 200px;
        order: 2;
    }

    .login-content {
        order: 1;
        min-height: auto;
    }

    .banner-vertical-text {
        transform: none;
        left: auto;
        top: auto;
        bottom: 30px;
        right: 30px;
        text-align: right;
    }

        .banner-vertical-text h2 {
            font-size: 20px;
        }

    .decoration-circle,
    .fruit-decoration {
        display: none;
    }

    .login-content {
        min-height: auto;
        padding: 40px 24px;
    }

    .login-form-container {
        gap: 32px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .login-banner {
        height: 280px;
        min-height: 210px;
    }

    .banner-vertical-text h2 {
        font-size: 18px;
    }

    .login-content {
        min-height: auto;
        padding: 32px 20px;
    }

    .login-form-container {
        gap: 24px;
        max-width: 100%;
    }

    .login-logo {
        width: 88px;
        height: 42px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .gf-btn-primary {
        height: 44px;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .login-banner {
        height: 190px;
        min-height: 140px;
    }

    .login-content {
        padding: 24px 16px;
    }

    .login-title {
        font-size: 18px;
    }
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Styles */
.gf-form-control:focus-visible,
.gf-btn-primary:focus-visible,
.gf-password-toggle:focus-visible,
.gf-forgot-password:focus-visible,
.gf-back-to-login:focus-visible {
    outline: 2px solid var(--gf-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .gf-form-control {
        border-width: 2px;
    }

    .gf-btn-primary {
        border: 2px solid var(--gf-white);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *:not(.gf-app-loading-bar-fill),
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
