/* ===================================
   MODERN LOGIN PAGE - GLASS MORPHISM
   Updated: 2025-01-05
   Colors: From CSS_Dokumantasyon
   =================================== */

/* Variables - From CSS_Dokumantasyon */
:root {
    /* Primary Colors */
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --info-color: #4895ef;
    --warning-color: #f72585;
    --danger-color: #7209b7;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    
    /* Aliases for compatibility */
    --primary: #4361ee;
    --primary-dark: #3f37c9;
    --primary-light: #4895ef;
    --accent: #f72585;
    --success: #4cc9f0;
    --text-dark: #212529;
    --text-light: #6c757d;
    
    /* Glass morphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Other variables */
    --body-bg: #f9fafb;
    --card-bg: #ffffff;
    --card-border: 1px solid rgba(0,0,0,0.05);
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
    --card-radius: 0.75rem;
    --font-family: 'Inter', 'Poppins', sans-serif;
    --font-size-base: 0.95rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
}

body,
body#kt_body {
    height: 100% !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    font-family: var(--font-family) !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
    overflow: hidden !important;
    color: var(--dark-color) !important;
}

/* Animated Background Elements */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

body::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--warning-color) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

body::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--info-color) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Login Container */
#kt_login,
.login.login-1,
.login-content {
    flex: 1 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem 1rem !important;
    position: relative;
    z-index: 1;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
}

.modern-login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--warning-color), var(--success-color));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-logo {
    height: 70px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
}

/* Alert */
.info-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(72, 149, 239, 0.1));
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Form Groups */
.form-group-modern {
    margin-bottom: 1.5rem;
}

.modern-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
    transition: color 0.3s ease;
}

.modern-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    transition: all 0.3s ease;
    outline: none;
}

.modern-input::placeholder {
    color: #a0a0a0;
}

.modern-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.modern-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.modern-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    accent-color: var(--primary-color);
}

.modern-checkbox:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Modern Button */
.modern-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.modern-btn::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.6s ease;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn:active {
    transform: translateY(0);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.modern-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Decorative Elements */
.decoration {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    pointer-events: none;
    animation: decorationFloat 15s infinite ease-in-out;
}

.decoration-1 {
    width: 100px;
    height: 100px;
    top: -50px;
    right: -50px;
    animation-delay: 0s;
}

.decoration-2 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    left: -75px;
    animation-delay: 5s;
}

.decoration-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    right: -40px;
    animation-delay: 10s;
}

@keyframes decorationFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(90deg); }
    50% { transform: translate(-10px, 10px) rotate(180deg); }
    75% { transform: translate(10px, 10px) rotate(270deg); }
}

/* Footer */
footer,
.footer {
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 1rem 0 !important;
    margin: 0 !important;
    margin-top: auto !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    position: relative !important;
    width: 100% !important;
    z-index: 2 !important;
}

.footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0 1rem;
}

.footer .container > div:first-child {
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
}

.footer .container > div:nth-child(2),
.footer .container > div:nth-child(3) {
    text-align: right;
}

.footer .container > div {
    line-height: 1.5;
}

.footer .container span {
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .modern-login-container {
        max-width: 100%;
    }

    #kt_login,
    .login.login-1,
    .login-content {
        padding: 1rem !important;
    }

    .footer .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        text-align: center;
    }
    
    .footer .container > div:first-child {
        grid-row: auto;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .footer .container > div:nth-child(2),
    .footer .container > div:nth-child(3) {
        text-align: center;
    }

    .footer .container span {
        font-size: 0.75rem;
    }

    body#kt_body {
        overflow: hidden !important;
    }
}

/* Loading State */
.modern-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.modern-btn.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Override conflicting styles - HIGHEST PRIORITY */
html,
html body,
html body#kt_body,
html body#kt_body.header-fixed,
html body#kt_body.header-mobile-fixed,
html body#kt_body.subheader-enabled {
    height: 100% !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Remove any extra divs or wrappers */
body#kt_body > *:not(.login):not(.footer):not(script):not(style) {
    display: none !important;
}

/* Ensure login and footer take full height */
body#kt_body > .login.login-1 {
    flex: 1 !important;
}

body#kt_body > footer,
body#kt_body > .footer {
    flex: 0 0 auto !important;
}

/* FINAL OVERRIDE - MAXIMUM PRIORITY */
html {
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body#kt_body {
    min-height: 100vh !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
}

/* Force flexbox behavior */
body#kt_body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Login takes remaining space */
body#kt_body > .login,
body#kt_body > #kt_login,
body#kt_body > .login.login-1 {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Footer stays at bottom */
body#kt_body > footer,
body#kt_body > .footer {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
}
