/* ===== LOGIN PAGE - SPECIFIK STYLING FÖR INLOGGNINGSSIDAN ===== */

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xxl);
    padding: 60px 70px;
    max-width: 650px;
    width: 92%;
    margin: 60px auto;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    animation: slideUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.login-box h1 {
    color: var(--color-primary);
    text-align: center;
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: var(--z-base);
    letter-spacing: -2px;
}

.login-box h1::after {
    content: '📚';
    margin-left: 15px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 45px;
    font-size: 1.15em;
    position: relative;
    z-index: var(--z-base);
    letter-spacing: 0.5px;
}

.demo-info {
    margin-top: 40px;
    padding: 30px 35px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 18px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    position: relative;
    z-index: var(--z-base);
}

.demo-info::before {
    content: '🎓';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5em;
    opacity: 0.3;
}

.demo-info h3 {
    margin-bottom: 20px;
    color: var(--color-primary);
    font-size: 1.2em;
    font-weight: 700;
}

.demo-info p {
    margin: 12px 0;
    font-size: 14.5px;
    color: var(--color-text-secondary);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.demo-info p:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.demo-info strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* ===== LÖSENORDSFÄLT MED VISA/DÖLJ-KNAPP ===== */

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 50px; /* Ge plats för visa-knappen */
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 6px;
    z-index: 10;
}

.toggle-password:hover {
    background: rgba(102, 126, 234, 0.1);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    font-size: 1.3em;
    line-height: 1;
    user-select: none;
}

/* ===== CHECKBOX FÖR "HÅLL MIG INLOGGAD" ===== */

.remember-me-wrapper {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.remember-me-wrapper input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Anpassad checkbox styling */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 10px 0;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0d0;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: white;
    margin: 0;
}

.custom-checkbox input[type="checkbox"]:hover {
    border-color: var(--color-primary);
}

.custom-checkbox input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.custom-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.custom-checkbox label {
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: 0.95em;
    margin: 0;
}

.custom-checkbox:hover label {
    color: var(--color-primary);
}

/* ===== RESPONSIV DESIGN FÖR MINDRE SKÄRMAR ===== */

@media (max-width: 768px) {
    .login-box {
        padding: 40px 30px;
    }
    
    .login-box h1 {
        font-size: 2.5em;
    }
    
    .password-input-wrapper input {
        padding-right: 45px;
    }
    
    .toggle-password {
        right: 8px;
        padding: 6px;
    }
    
    .eye-icon {
        font-size: 1.2em;
    }
}