/* Theme Variables from theme.json */
:root {
    /* Colors */
    --color-primary: #34B8C1;
    --color-primary-dark: #27949C;
    --color-primary-light: #6DD6DC;
    --color-accent: #FF6B35;
    --color-bg: #F7F9FA;
    --color-surface: #FFFFFF;
    --color-error: #E53E3E;
    --color-warning: #F2A900;
    --color-success: #2F9E44;
    --text-primary: #0F1720;
    --text-secondary: #5B6B73;
    --color-border: #E1E6E8;
    
    /* Typography */
    --font-family: Inter, Helvetica, Arial, sans-serif;
    
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(13, 30, 35, 0.06);
    --shadow-md: 0 6px 18px rgba(13, 30, 35, 0.08);
    --shadow-lg: 0 10px 40px rgba(13, 30, 35, 0.12);
}

/* Base styles */
body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Login Container - Center on page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #E0F7F8 0%, #B3FBFD 100%);
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

/* Enhanced Wavy Header Section with Overlays and Patterns */
.login-header {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 4rem 2rem 3rem;
    text-align: center;
    overflow: hidden;
}

/* Pattern Overlay */
.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px),
        repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px);
    pointer-events: none;
}

/* Gradient Overlay */
.login-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(109, 214, 220, 0.3) 0%, transparent 60%);
    pointer-events: none;
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(25px); }
}

/* Multi-layer Wave Design */
.wave-design {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

/* First Wave Layer */
.wave-design svg:nth-child(1) {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

/* Decorative Circles in Header */
.login-header .circle-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.login-header .circle-decoration:nth-child(1) {
    width: 100px;
    height: 100px;
    top: -20px;
    right: 20px;
    animation: float 6s ease-in-out infinite;
}

.login-header .circle-decoration:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60px;
    left: 30px;
    animation: float 8s ease-in-out infinite reverse;
}

.login-header .circle-decoration:nth-child(3) {
    width: 40px;
    height: 40px;
    bottom: 80px;
    right: 50px;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Enhanced Wave SVG Container */
.wave-design svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Logo Section */
.logo-section {
    position: relative;
    z-index: 10;
}

.logo-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 0 0 8px rgba(255, 255, 255, 0.1),
        0 0 0 16px rgba(255, 255, 255, 0.05);
    position: relative;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Logo glow effect */
.logo-circle::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 214, 220, 0.4) 0%, transparent 70%);
    z-index: -1;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.company-name {
    color: #FFFFFF;
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.company-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0.5rem 0 0;
    font-weight: 400;
    position: relative;
    z-index: 10;
}

/* Form Wrapper */
.login-form-wrapper {
    padding: 2.5rem 2rem;
    background: var(--color-surface);
    position: relative;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    font-size: 0.95rem;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(52, 184, 193, 0.12);
}

/* Form Options (Remember me & Forgot password) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Submit Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(52, 184, 193, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 184, 193, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-submit {
    width: 100%;
    margin-top: 0.5rem;
}

/* Register Link */
.register-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.register-link a {
    color: var(--color-primary);
    text-decoration: none;
    
    transition: color 0.2s ease;
}

.register-link a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem 0.5rem;
    }

    .login-card {
        border-radius: var(--radius-md);
    }

    .login-header {
        padding: 3rem 1.5rem 2.5rem;
    }

    .login-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .company-name {
        font-size: 1.5rem;
    }

    .logo-circle {
        width: 75px;
        height: 75px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(47, 158, 68, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(47, 158, 68, 0.2);
}

.alert-error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(229, 62, 62, 0.2);
}

.error-message {
    color: var(--color-error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.user-types-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(52, 184, 193, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(52, 184, 193, 0.2);
}

.user-type-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-type-icon {
    font-size: 1.2rem;
}

.login-card {
    max-width: 550px !important;
    width: 100% !important;
    /* border: 3px solid var(--color-primary); */
    margin: 0 auto !important;
}

.login-form-wrapper {
    padding: 2rem 2.5rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.login-form {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.form-group {
    width: 100%;
    box-sizing: border-box;
}

.form-input, .form-label, .btn {
    width: 100%;
    box-sizing: border-box;
}

.user-types-info {
    width: 100%;
    box-sizing: border-box;
}

.form-options {
    width: 100%;
    box-sizing: border-box;
}

.register-link {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.back-to-home-btn {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.back-to-home-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(-4px);
}

.back-to-home-btn svg {
    transition: transform 0.3s ease;
}

.back-to-home-btn:hover svg {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .login-card {
        max-width: 100% !important;
        margin: 0 0.5rem !important;
        width: calc(100% - 1rem) !important;
    }

    .login-form-wrapper {
        padding: 1.5rem 1rem !important;
    }

    .user-types-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .back-to-home-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .back-to-home-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        border-width: 2px;
    }

    .login-form-wrapper {
        padding: 1.25rem 0.75rem !important;
    }

    .user-types-info {
        font-size: 0.85rem;
    }
}