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

/* Reset și variabile pentru login */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --bg-input: #1a1a1a;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --gradient-start: #7c3aed;
    --gradient-end: #db2777;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* Container principal - split layout */
.login-wrapper {
    display: flex;
    height: 100vh;
}

/* Partea stângă - imagine/branding */
.login-left {
    flex: 1;
    background: var(--bg-panel);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagine de background pentru partea stângă */
.login-left-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

/* Overlay gradient pentru imagine */
.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.1) 0%,
        rgba(219, 39, 119, 0.1) 100%);
    z-index: 1;
}

/* Content branding */
.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.branding-logo {
    width: 120px;
    height: auto;
    margin-bottom: 30px;
}

.branding-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.branding-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
}

/* Animated lines pentru background */
.animated-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.1;
}

.line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--gradient-start),
        transparent);
    animation: moveLines 20s linear infinite;
}

.line:nth-child(1) { top: 20%; animation-delay: 0s; }
.line:nth-child(2) { top: 40%; animation-delay: 5s; }
.line:nth-child(3) { top: 60%; animation-delay: 10s; }
.line:nth-child(4) { top: 80%; animation-delay: 15s; }

@keyframes moveLines {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Partea dreaptă - form */
.login-right {
    flex: 1;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Form container */
.login-form-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

/* Logo în form dacă nu există în stânga */
.form-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 32px;
}

.login-header {
    margin-bottom: 40px;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form elements */
.form-group {
    margin-bottom: 24px;
}

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

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: #1f1f1f;
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* Remember me */
.form-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--accent-hover);
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

/* Social login */
.divider {
    text-align: center;
    margin: 32px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: var(--bg-dark);
    padding: 0 16px;
    position: relative;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.social-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-social:hover {
    background: #1f1f1f;
    border-color: var(--accent);
}

.social-icon {
    width: 20px;
    height: 20px;
}

/* Footer */
.login-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    color: var(--accent-hover);
}

/* Error/Success messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Loading state */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
    }

    .form-logo {
        display: block;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 24px;
    }

    .login-title {
        font-size: 28px;
    }

    .social-buttons {
        flex-direction: column;
    }
}
