/* =========================================================
   CAREEMSTREAM — PROFESSIONAL LOGIN STYLES
   Modern, Minimalist Design with Smooth Animations
========================================================= */

:root {
    --primary: #18a957;
    --primary-dark: #08783b;
    --primary-light: #eaf8f0;
    --secondary: #0f766e;
    --accent: #0891b2;
    --danger: #d92d3a;
    --text: #1a1a1a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f766e 100%);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(24, 169, 87, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(8, 120, 59, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-reverse 25s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -30px); }
    50% { transform: translate(0, -50px); }
    75% { transform: translate(-30px, -20px); }
}

@keyframes float-reverse {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-20px, 40px); }
    50% { transform: translate(0, 50px); }
    75% { transform: translate(20px, 20px); }
}

/* Main container */
.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: auto;
    gap: 0;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left side - Branding */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 50px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 118, 110, 0.3) 100%);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(24, 169, 87, 0.1) 100%);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 2;
    color: white;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 24px rgba(24, 169, 87, 0.3);
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin-bottom: 32px;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    animation: slideInLeft 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
}

/* Right side - Form */
.login-form-wrapper {
    flex: 1;
    min-width: 340px;
    padding: 60px 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.form-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--primary);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.form-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Form group styling */
.form-group {
    margin-bottom: 20px;
    animation: formGroupFade 0.5s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes formGroupFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Labels */
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input fields */
input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(24, 169, 87, 0.1);
    transform: translateY(-2px);
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: var(--text-light);
}

/* Submit buttons */
input[type="submit"],
.btn-submit {
    width: 100%;
    padding: 14px 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(24, 169, 87, 0.3);
    animation: buttonSlideIn 0.6s ease-out 0.4s backwards;
}

@keyframes buttonSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="submit"]::before,
.btn-submit::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 ease;
}

input[type="submit"]:hover::before,
.btn-submit:hover::before {
    left: 100%;
}

input[type="submit"]:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(24, 169, 87, 0.4);
}

input[type="submit"]:active,
.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(24, 169, 87, 0.3);
}

/* Additional form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Form divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Social/Alternative login */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary);
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    .login-container {
        flex-direction: column;
        max-width: 100%;
    }

    .login-brand {
        padding: 40px 30px;
        border-radius: 12px 12px 0 0;
        min-width: auto;
    }

    .login-form-wrapper {
        padding: 40px 30px;
        border-radius: 0 0 12px 12px;
        min-width: auto;
    }

    .form-title {
        font-size: 24px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-features {
        margin-top: 24px;
        padding-top: 24px;
    }
}

@media (max-width: 480px) {
    .login-container {
        width: 100%;
    }

    .login-brand,
    .login-form-wrapper {
        padding: 30px 20px;
    }

    .form-title {
        font-size: 20px;
    }

    .brand-title {
        font-size: 20px;
    }

    input[type="email"],
    input[type="password"],
    input[type="submit"] {
        font-size: 16px;
        padding: 12px 14px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .social-login {
        flex-direction: column;
    }

    .social-btn {
        width: 100%;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

/* Loading state */
input[type="submit"]:disabled,
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(24, 169, 87, 0.2);
}

input[type="submit"]:disabled:hover,
.btn-submit:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(24, 169, 87, 0.2);
}
