﻿/* ============================================
   CSS Variables & Reset
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* NEW Primary Color: #163300 */
    --primary: #163300;
    /* Lighter version for hover */
    --primary-hover: #244f00;
    --white: #ffffff;
    --black: #000000;
    /* Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Semantic Colors */
    --error: #dc2626;
    --error-bg: #fef2f2;
    --success: #16a34a;
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    /* Shadows - Adjusted for #163300 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    /* Luxury gold accents */
    --gold: #c9a14a;
    --gold-soft: rgba(201,161,74,0.08);
    /* Focus Outline Color (Based on Primary) */
    --focus-outline: rgba(22, 51, 0, 0.1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--gray-50);
    background-image: url("/images/image4.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

button {
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    border: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

input, textarea, select {
    font-family: inherit;
}

/* ============================================
   Layout Structure
   ============================================ */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: transparent;
    position: relative;
}

    .page-wrapper::before {
        content: "";
        position: fixed;
        inset: 0;
        background: linear-gradient(180deg, rgba(255,255,255,0.36), rgba(255,255,255,0.46));
        pointer-events: none;
        z-index: 0;
    }

.container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    min-height: 600px;
    position: relative;
    z-index: 2;
}

/* ============================================
   Form Side
   ============================================ */
.form-side {
    flex: 1;
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.96));
}

.form-content {
    width: 100%;
    max-width: 420px;
}

/* ============================================
   Typography
   ============================================ */
.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xl);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: var(--space-xl);
}

.footer-text {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
    margin-top: var(--space-xl);
}

/* ============================================
   Form Inputs - SAFARI FIXED VERSION
   ============================================ */
.input-group {
    margin-bottom: var(--space-lg);
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--gray-900);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, outline 0.2s ease;
    outline: none;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-size: 16px; /* Prevent iOS zoom */
}

    .input-field::placeholder {
        color: var(--gray-400);
        opacity: 1;
    }

    .input-field:hover {
        border-color: var(--gray-300);
    }

    .input-field:focus {
        border-color: var(--primary);
        border-width: 2px;
        /* Update glow to match new primary */
        outline: 4px solid var(--focus-outline);
        outline-offset: 0px;
    }

    .input-field::-webkit-input-placeholder {
        color: var(--gray-400);
        opacity: 1;
    }

    .input-field::-moz-placeholder {
        color: var(--gray-400);
        opacity: 1;
    }

    .input-field:-ms-input-placeholder {
        color: var(--gray-400);
        opacity: 1;
    }

/* Password wrapper */
.password-wrapper {
    position: relative;
}

.input-field.password {
    padding-right: 56px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s ease;
    font-size: 16px;
    z-index: 10;
}

    .password-toggle:hover {
        color: var(--gray-900);
        background: rgba(0,0,0,0.04);
    }

    .password-toggle:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--gray-900) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--white) inset !important;
    box-shadow: 0 0 0 1000px var(--white) inset !important;
    background-color: var(--white) !important;
    border: 2px solid var(--gray-200) !important;
    transition: background-color 5000s ease-in-out 0s, border-color 0.2s ease;
}

    input:-webkit-autofill:focus {
        border: 2px solid var(--primary) !important;
        outline: 4px solid var(--focus-outline) !important;
        outline-offset: 0px !important;
    }

/* Validation */
.input-error {
    display: block;
    font-size: 13px;
    color: var(--error);
    margin-top: var(--space-sm);
    font-weight: 500;
}

.validation-errors {
    padding: var(--space-md);
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 14px;
    margin-bottom: var(--space-lg);
}

    .validation-errors ul {
        margin: 0;
        padding-left: 20px;
        list-style: disc;
    }

/* ============================================
   Buttons & Form Options
   ============================================ */
.btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(180deg, var(--primary), var(--primary-hover));
    color: var(--white);
    /* Adjusted shadow to match #163300 */
    box-shadow: 0 10px 30px rgba(22, 51, 0, 0.2);
}

    .btn-primary:hover {
        filter: brightness(1.1);
        transform: translateY(-2px);
        box-shadow: 0 12px 35px rgba(22, 51, 0, 0.25);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-primary:focus {
        outline: 3px solid rgba(22, 51, 0, 0.4);
        outline-offset: 2px;
    }

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-input {
    width: 16px;
    height: 16px;
    margin-right: var(--space-sm);
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
}

.link-primary {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.15s ease;
}

    .link-primary:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

/* ============================================
   Divider Component
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-xl) 0;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid var(--gray-200);
    }

    .divider::before {
        margin-right: var(--space-md);
    }

    .divider::after {
        margin-left: var(--space-md);
    }

/* ============================================
   Social Button (Google)
   ============================================ */
.social-button {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 0;
}

    .social-button:hover {
        background: var(--gray-50);
        border-color: var(--gray-300);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .social-button:active {
        transform: translateY(1px);
    }

    .social-button:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    .social-button svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

/* ============================================
   Info Side
   ============================================ */
/*.info-side {
    flex: 1;
    color: var(--white);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: visible;*/
    /* New Gradient matching #163300 */
    /*background: linear-gradient(135deg, #163300 0%, #244f00 100%);
}*/

/* Find this section in login.css and update it */
.info-side {
    flex: 1;
    color: var(--white);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: visible; /* Keep visible for the avatar stack */
    /* 1. Ensure Background is OPAQUE (No rgba, use Hex) */
    background: linear-gradient(135deg, #163300 0%, #244f00 100%);
    /* 2. CRITICAL FIX FOR SAFARI: */
    /* This stops blend modes from mixing with the white container behind */
    isolation: isolate;
    /* Optional: Fix for Safari border-radius clipping if needed */
    transform: translateZ(0);
}

    /* ===============================================
       BEEHIVE / HONEYCOMB PATTERN
       =============================================== */
    /*.info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 28px 50px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.12'/%3E%3C/svg%3E");
        mix-blend-mode: soft-light;
        opacity: 0.8;
        pointer-events: none;
        z-index: 1;
    }*/

    /*.info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 16px 29px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-width='3' stroke-opacity='0.12'/%3E%3C/svg%3E");
        mix-blend-mode: normal;
        opacity: 0.8;
        pointer-events: none;
        z-index: 1;
    }*/

    .info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 42px 75px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.15'/%3E%3C/svg%3E");
        mix-blend-mode: soft-light;
        opacity: 0.87;
        pointer-events: none;
        z-index: 1;
    }

   /* .info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 28px 50px;
      
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23c9a14a' stroke-width='2' stroke-opacity='0.25'/%3E%3C/svg%3E");
        mix-blend-mode: screen;
        opacity: 0.7;
        pointer-events: none;
        z-index: 1;
    }*/

   /* .info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 28px 50px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='0%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23c9a14a'/%3E%3Cstop offset='100%25' stop-color='%23fbf5b7'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='url(%23g)' stroke-width='2' stroke-opacity='0.3'/%3E%3C/svg%3E");
        mix-blend-mode: overlay;
        opacity: 1;
        pointer-events: none;
        z-index: 1;
    }*/

   /* .info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 42px 75px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.12'/%3E%3C/svg%3E");
        mix-blend-mode: hard-light;
        opacity: 0.8;
        pointer-events: none;
        z-index: 1;
    }*/

    /*.info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 56px 100px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.12'/%3E%3C/svg%3E");
        mix-blend-mode: soft-light;
        opacity: 0.8;
        pointer-events: none;
        z-index: 1;
    }*/


   /* .info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 42px 75px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23c9a14a' stroke-width='2' stroke-opacity='0.25'/%3E%3C/svg%3E");
        mix-blend-mode: screen;
        opacity: 0.9;
        pointer-events: none;
        z-index: 1;
    }*/

    /*.info-side::after {
        content: "";
        position: absolute;
        inset: 0;
        background-size: 56px 100px;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23c9a14a' stroke-width='2' stroke-opacity='0.25'/%3E%3C/svg%3E");
        mix-blend-mode: screen;
        opacity: 0.9;
        pointer-events: none;
        z-index: 1;
    }*/


.info-content {
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.info-logo {
    display: block;
    width: 140px;
    max-width: 40%;
    height: auto;
    margin: 0 0 18px 0;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.45));
}

.info-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0,0,0,0.25);
}

.info-description {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: var(--space-md);
}

.gold-accent {
    position: absolute;
    right: -40px;
    top: 12px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 30% 30%, rgba(201,161,74,0.08), transparent 30%); /* Reduced opacity from 0.12 to 0.08 */
    filter: blur(16px);
    transform: rotate(12deg);
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   Avatar Stack
   ============================================ */
.avatar-stack {
    position: relative;
    width: 100%;
    min-height: 260px;
    z-index: 2;
    margin-top: var(--space-lg);
    margin-left: 12px;
}

.avatar {
    width: 200px;
    height: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1), 0 10px 40px rgba(0, 0, 0, 0.3);
    background: var(--gray-800);
    cursor: pointer;
    transition: transform 350ms cubic-bezier(.4,.0,.2,1), box-shadow 350ms cubic-bezier(.4,.0,.2,1), z-index 0ms 350ms;
}

    .avatar:nth-child(1) {
        transform: translateX(-110%) translateY(-20px) rotate(-15deg);
    }

    .avatar:nth-child(2) {
        transform: translateX(-70%) translateY(-40px) rotate(-5deg);
    }

    .avatar:nth-child(3) {
        transform: translateX(-30%) translateY(-50px) rotate(3deg);
    }

    .avatar:nth-child(4) {
        transform: translateX(10%) translateY(-40px) rotate(8deg);
    }

    .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 280ms ease;
    }

    .avatar:hover {
        z-index: 10;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25), 0 22px 60px rgba(0, 0, 0, 0.48);
        transition-delay: 0ms;
    }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        max-width: 680px;
    }

    .form-side, .info-side {
        flex: none;
        width: 100%;
    }

    .info-side {
        min-height: 400px;
    }

    .info-logo {
        width: 120px;
        max-width: 34%;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 0;
    }

    .container {
        border-radius: 0;
        min-height: 100vh;
    }

    .form-side {
        padding: var(--space-xl);
        background: rgba(255,255,255,0.98);
    }

    .info-side {
        display: none;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .form-side {
        padding: var(--space-lg);
    }

    .logo {
        font-size: 20px;
        margin-bottom: var(--space-lg);
    }

    .page-title {
        font-size: 22px;
    }

    .input-field {
        padding: 10px 14px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .info-logo {
        width: 100px;
        max-width: 46%;
    }

    .divider {
        margin: var(--space-lg) 0;
    }
}
