/* ================================================
   GRN PROTEIN - LOGIN PAGE STYLES
   MOBILE-FIRST REDESIGN - Ultra Attractive
   ================================================ */

/* CSS Variables */
:root {
    --primary-orange: #FF6B35;
    --dark-orange: #E85A2A;
    --light-orange: #FF8C5A;
    --black: #1A1A1A;
    --soft-black: #2D2D2D;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --text-gray: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #F8F8F8;
    min-height: 100vh;
}

/* ================================================
   MOBILE-FIRST DESIGN (Default)
   ================================================ */

.container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-wrapper {
    width: 100%;
    min-height: calc(100vh - 70px);
    background: var(--white);
    display: flex;
    flex-direction: column;
}

/* ================================================
   MOBILE BRANDING HEADER
   ================================================ */

.login-brand {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    padding: 40px 20px 30px 20px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Animated background pattern */
.login-brand::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 36px;
    letter-spacing: 3px;
    margin-bottom: 8px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-tagline {
    font-size: 14px;
    font-weight: 300;
    opacity: 0.95;
    animation: fadeInUp 0.6s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-features {
    display: none; /* Hidden on mobile */
}

/* ================================================
   MOBILE LOGIN FORM
   ================================================ */

.login-form-section {
    flex: 1;
    padding: 35px 25px;
    background: var(--white);
    animation: fadeIn 0.6s ease 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 28px;
    color: var(--black);
    font-weight: 800;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.5;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--black);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--black);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #BDBDBD;
}

/* Form Footer */
.form-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    justify-content: center;
}

.remember-me input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-orange);
}

.remember-me label {
    color: var(--black);
    font-size: 14px;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.forgot-password {
    color: var(--primary-orange);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--dark-orange);
}

/* Submit Button - ATTRACTIVE */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--dark-orange) 100%);
    color: var(--white);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.submit-btn:active::before {
    left: 100%;
}

.submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 600;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--medium-gray), transparent);
}

.divider span {
    padding: 0 18px;
}

/* Signup Link */
.signup-link {
    text-align: center;
    color: var(--black);
    font-size: 15px;
    font-weight: 500;
}

.signup-link a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 800;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* ================================================
   SUCCESS/ERROR MESSAGES
   ================================================ */

.success-msg, 
.error-msg {
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    animation: slideInDown 0.4s ease;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-msg {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #2E7D32;
    border: 2px solid #4CAF50;
}

.error-msg {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: #C62828;
    border: 2px solid #F44336;
}

/* ================================================
   LOADING STATE
   ================================================ */

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { 
        transform: translateY(-50%) rotate(360deg); 
    }
}

/* ================================================
   TABLET (576px - 768px)
   ================================================ */

@media (min-width: 576px) {
    .container {
        padding: 20px;
        background: linear-gradient(135deg, #FF6B35 0%, #E85A2A 100%);
    }

    .login-wrapper {
        max-width: 480px;
        min-height: auto;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .login-brand {
        padding: 45px 30px 35px 30px;
    }

    .brand-logo {
        font-size: 40px;
    }

    .brand-tagline {
        font-size: 15px;
    }

    .login-form-section {
        padding: 40px 35px;
    }

    .form-header h2 {
        font-size: 30px;
    }

    .form-header p {
        font-size: 15px;
    }

    .form-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .remember-me {
        justify-content: flex-start;
    }

    .forgot-password {
        text-align: right;
    }
}

/* ================================================
   DESKTOP (969px+)
   ================================================ */

@media (min-width: 969px) {
    body {
        background: linear-gradient(135deg, var(--black) 0%, var(--soft-black) 50%, var(--black) 100%);
    }

    .container {
        padding: 40px 20px;
        background: transparent;
    }

    .login-wrapper {
        display: grid;
        grid-template-columns: 450px 1fr;
        max-width: 1000px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 24px;
        box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
    }

    .login-brand {
        padding: 50px 40px;
        text-align: center;
    }

    .login-brand::before {
        width: 300px;
        height: 300px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        top: -100px;
        right: -100px;
        animation: none;
    }

    .login-brand::after {
        content: '';
        position: absolute;
        width: 220px;
        height: 220px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
        bottom: -60px;
        left: -60px;
    }

    .brand-logo {
        font-size: 52px;
        letter-spacing: 4px;
        margin-bottom: 20px;
    }

    .brand-tagline {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .brand-features {
        display: block;
        list-style: none;
        margin-top: 35px;
        text-align: left;
    }

    .brand-features li {
        padding: 12px 0;
        font-size: 15px;
        display: flex;
        align-items: center;
        opacity: 0.9;
    }

    .brand-features li::before {
        content: '✓';
        margin-right: 12px;
        background: rgba(255, 255, 255, 0.2);
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 14px;
    }

    .login-form-section {
        padding: 50px 45px;
    }

    .form-header {
        text-align: left;
        margin-bottom: 30px;
    }

    .form-header h2 {
        font-size: 32px;
    }

    .form-header p {
        font-size: 15px;
    }

    .form-footer {
        flex-direction: row;
    }

    .remember-me {
        justify-content: flex-start;
    }

    .forgot-password {
        text-align: right;
    }

    .submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
    }

    .submit-btn:hover::before {
        left: 100%;
    }
}

/* ================================================
   LARGE DESKTOP (1200px+)
   ================================================ */

@media (min-width: 1200px) {
    .login-wrapper {
        max-width: 1100px;
        grid-template-columns: 480px 1fr;
    }
}

/* ================================================
   SMALL HEIGHT ADJUSTMENTS
   ================================================ */

@media (max-height: 700px) and (min-width: 969px) {
    .login-wrapper {
        grid-template-columns: 350px 1fr;
        max-width: 850px;
    }

    .login-brand {
        padding: 30px 25px;
    }

    .brand-logo {
        font-size: 38px;
    }

    .brand-features li {
        padding: 8px 0;
        font-size: 13px;
    }

    .login-form-section {
        padding: 30px 35px;
    }

    .form-header h2 {
        font-size: 26px;
    }

    .form-group {
        margin-bottom: 18px;
    }
}

/* ================================================
   LANDSCAPE MOBILE
   ================================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .login-wrapper {
        flex-direction: row;
        min-height: auto;
    }

    .login-brand {
        padding: 20px;
        flex: 0 0 40%;
    }

    .brand-logo {
        font-size: 28px;
        margin-bottom: 5px;
    }

    .brand-tagline {
        font-size: 12px;
    }

    .login-form-section {
        flex: 1;
        padding: 20px;
    }

    .form-header {
        margin-bottom: 15px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group input {
        padding: 10px 14px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 14px;
    }

    .divider {
        margin: 15px 0;
    }
}