﻿/* ═══════════════════════════════════════════════════════════════════════════
   CARD IN CLOUD - Login Page
   Professional Authentication Design
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Brand Colors - Synced with light.css */
    --primary: #4F46E5;
    --primary-hover: #3730A3;
    --primary-light: #818CF8;
    --secondary: #7C3AED;
    --accent: #06B6D4;
    --deep: #1E1B4B;
    
    /* Gradients */
    --brand-gradient: linear-gradient(135deg, #7C3AED 0%, #4F46E5 50%, #06B6D4 100%);
    --primary-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    
    /* Neutrals */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #111827;
    
    /* Semantic */
    --error: #EF4444;
    --error-bg: #FEF2F2;
    --success: #10B981;
    
    /* 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 */
    --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);
    
    /* Focus */
    --focus-outline: rgba(79, 70, 229, 0.4);
}

/* 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.6;
    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
   ═══════════════════════════════════════════════════════════════════════════ */
.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.5), rgba(255,255,255,0.7));
    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: var(--white);
}

.form-content {
    width: 100%;
    max-width: 420px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary);
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-image {
    max-height: 40px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xl);
}

.footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: var(--space-xl);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════════════════════ */
.input-group {
    margin-bottom: var(--space-lg);
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    outline: none;
    display: block;
    -webkit-appearance: none;
    appearance: none;
}

.input-field::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

.input-field:hover {
    border-color: var(--gray-300);
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--focus-outline);
}

/* 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: var(--radius-md);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s ease;
    font-size: 1rem;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

.password-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hide browser password reveals */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
}

/* Auto-fill Styling */
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;
}

input:-webkit-autofill:focus {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 0 4px var(--focus-outline), 0 0 0 1000px var(--white) inset !important;
}

/* Validation */
.input-error {
    display: block;
    font-size: 0.8125rem;
    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: 0.875rem;
    margin-bottom: var(--space-lg);
}

.validation-errors ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS & FORM OPTIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    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;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    outline: 3px solid var(--focus-outline);
    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: 18px;
    height: 18px;
    margin-right: var(--space-sm);
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

.link-primary {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.15s ease;
}

.link-primary:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════════════════════════════════════════ */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-xl) 0;
    color: var(--gray-400);
    font-size: 0.875rem;
    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
   ═══════════════════════════════════════════════════════════════════════════ */
.social-button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    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;
}

.social-button:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.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 (Right Panel)
   ═══════════════════════════════════════════════════════════════════════════ */
.info-side {
    flex: 1;
    color: var(--white);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: visible;
    background: var(--brand-gradient);
    isolation: isolate;
    transform: translateZ(0);
}

/* Hexagon Pattern Overlay */
.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: soft-light;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.info-content {
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.info-logo {
    display: block;
    width: 120px;
    max-width: 40%;
    height: auto;
    margin: 0 0 1.5rem 0;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.info-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    color: var(--white);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.info-description {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: var(--space-md);
}

/* Accent Glow */
.gold-accent {
    position: absolute;
    right: -40px;
    top: 12px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.25), transparent 50%);
    filter: blur(30px);
    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: 300px;
*/    height: 340px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 50%;
    top:10%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15), 0 10px 40px rgba(0, 0, 0, 0.35);
    background: var(--deep);
    cursor: pointer;
    transition: transform 350ms cubic-bezier(.4,.0,.2,1), box-shadow 350ms cubic-bezier(.4,.0,.2,1);
}

.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.3), 0 22px 60px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@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: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .form-side {
        padding: var(--space-lg);
    }

    .logo {
        font-size: 1.25rem;
        margin-bottom: var(--space-lg);
    }

    .page-title {
        font-size: 1.375rem;
    }

    .input-field {
        padding: 0.75rem 1rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }

    .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;
    }
}
