/**
 * Login Page Styles
 * ABSENSI SDS SUNGAI RUMBIA DUA
 * Redesigned: Modern Floating Card (Fixed Layout)
 */

:root {
    --primary-color: #4ade80;
    --primary-dark: #22c55e;
    --primary-gradient: linear-gradient(135deg, #4ade80 0%, #10b981 100%);
    --bg-gradient: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-soft: 0 20px 40px -10px rgba(22, 163, 74, 0.15);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #86efac 0%, #22c55e 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Background Patterns */
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 20%);
    top: 0;
    left: -10%;
    z-index: 0;
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
    margin-top: 3rem;
    /* Space for floating logo */
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    position: relative;
    /* Anchor for logo */
    overflow: visible;
    /* Allow logo to float out */
    padding-top: 1px;
}

/* Floating Logo Design */
.login-header {
    text-align: center;
    padding: 0 2rem 1rem;
    padding-top: 4.5rem;
    /* Push text down to make room for logo */
    position: static;
    /* Important: Let logo position relative to card, not header */
}

.login-logo {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 50%;
    position: absolute;
    /* Relative to .login-card */
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 15px;
    z-index: 20;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin: 0;
    background: rgba(74, 222, 128, 0.1);
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 20px;
}

.login-body {
    padding: 1rem 2rem 2.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--primary-dark);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s;
    z-index: 5;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
    outline: none;
}

.form-control:focus+.input-icon {
    color: var(--primary-dark);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: var(--primary-dark);
}

/* Remember & Forgot */
.remember-forgot {
    display: flex;
    justify-content: flex-end;
    /* Align to right since Remember Me is gone */
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.remember-me {
    display: none;
    /* Hide if still present in HTML */
}

.forgot-password {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #15803d;
}

/* Button */
.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* Alerts */
.login-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Footer */
.copyright {
    text-align: center;
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 1rem;
    }

    .login-container {
        margin-top: 3rem;
    }

    .login-logo {
        width: 90px;
        height: 90px;
        top: -45px;
    }

    .login-header {
        padding-top: 4rem;
        /* Adjusted for mobile */
        padding-bottom: 0.5rem;
    }

    .login-title {
        font-size: 1.1rem;
    }

    .login-body {
        padding: 1.5rem;
    }
}