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

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-light: #1e293b;
    --gray-lighter: #334155;
    --border: #334155;
    --border-light: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-dark: linear-gradient(135deg, var(--darker) 0%, #1e293b 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    position: relative;
    color: var(--light);
    min-height: 100vh;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(/images/bg/bg-auth.jpg);
    background-size: cover;
    background-position: center;
    filter: blur(8px) brightness(0.3);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.4);
    z-index: -1;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    min-height: 650px;
}

.form-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.graphic-section {
    flex: 1;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.logo {
    position: absolute;
    top: 24px;
    left: 24px;
    font-weight: 700;
    font-size: 20px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    z-index: 10;
}

.logo i {
    margin-right: 8px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px;
    border-radius: 8px;
}

.form-header {
    margin-bottom: 32px;
    text-align: center;
}

.form-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--light);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light);
    font-size: 14px;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: var(--gray-light);
    color: var(--light);
    border-color: var(--border-light);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background-color: var(--gray-lighter);
}

.input-group input::placeholder {
    color: var(--gray);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.password-toggle:hover {
    background: var(--gray-lighter);
    color: var(--light);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember {
    display: flex;
    align-items: center;
}

.remember input {
    width: auto;
    margin-right: 8px;
}

.remember label {
    margin-bottom: 0;
    color: var(--gray);
    font-weight: 400;
}

.forgot-password {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    color: var(--primary);
    text-decoration: underline;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.support-link {
    text-align: center;
    margin-top: 24px;
}

.support-link a {
    color: var(--gray);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
    font-size: 14px;
}

.support-link a:hover {
    color: var(--primary-light);
}

.support-link i {
    margin-right: 6px;
}

/* Graphic Section - Dark Theme */
.graphic-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.graphic-content h2 {
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.graphic-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.5;
}

.graphic-visual {
    position: relative;
    margin: 32px 0;
}

.ai-orb {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulse 4s ease-in-out infinite;
}

.ai-orb i {
    font-size: 48px;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

.feature-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: 0.9;
    padding: 8px 0;
}

.feature-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Floating particles background */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.floating-element:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 30px;
    height: 30px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

.floating-element:nth-child(4) {
    width: 50px;
    height: 50px;
    top: 30%;
    left: 70%;
    animation-delay: 6s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 0.7;
    }
}

/* Demo Credentials - Dark Theme */
.demo-credentials {
    margin-top: 24px;
    padding: 20px;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.demo-credentials h3 {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--light);
    font-weight: 600;
}

.credentials-table {
    display: table;
    width: 100%;
    font-size: 13px;
}

.credential-row {
    display: table-row;
}

.credential-row > div {
    display: table-cell;
    padding: 6px 4px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    color: var(--gray);
}

.credential-row:last-child > div {
    border-bottom: none;
}

.role {
    font-weight: 600;
    font-size: 13px;
    color: var(--light);
}

.privacy-notice {
    margin-top: 24px;
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    line-height: 1.4;
}

.privacy-notice a {
    color: var(--primary-light);
    text-decoration: underline;
}

.header-logo {
    text-align: center;
    padding: 32px 0 24px 0;
}

.header-logo img {
    max-height: 60px;
    filter: brightness(0) invert(1);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        border: none;
    }
    
    .graphic-section {
        display: none;
    }
    
    .form-section {
        padding: 32px 24px;
    }
    
    body {
        padding: 0;
        background: var(--darker);
    }
    
    .form-header h1 {
        font-size: 24px;
    }
}

/* Form centering */
.form-section {
    text-align: center;
}

.form-group, .remember-forgot, .support-link, .privacy-notice {
    text-align: left;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Dark theme specific improvements */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover, 
.input-group input:-webkit-autofill:focus, 
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--gray-light) inset !important;
    -webkit-text-fill-color: var(--light) !important;
    border: 1.5px solid var(--border-light);
}

/* Checkbox dark theme */
.remember input[type="checkbox"] {
    filter: brightness(0.8);
}

.remember input[type="checkbox"]:checked {
    filter: brightness(1);
}


@media (max-height: 650px) {
    .page-auth.page-login {
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }
    
    .auth-container {
        min-height: auto !important;
        height: auto !important;
        margin: 20px 0;
    }
    
    body {
        overflow: auto;
        min-height: 100vh;
        padding: 10px;
        align-items: flex-start;
    }
    
    .header-logo {
        padding: 10px 0;
    }
    
    .header-logo img {
        max-height: 40px;
    }
    
    .form-section {
        padding: 55px;
    }
    
    .form-header {
        margin-bottom: 20px;
    }
    
    .form-header h1 {
        font-size: 24px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
}